From e5bc66b4870e1bc7f968aa2a92d7a740724dda50 Mon Sep 17 00:00:00 2001 From: Aran Roig Date: Sat, 12 Sep 2026 19:46:09 +0200 Subject: [PATCH] Test --- .obsidian/plugins/initiative-tracker/main.js | 150 + .../plugins/initiative-tracker/manifest.json | 10 + .../plugins/initiative-tracker/styles.css | 1 + .../plugins/obsidian-5e-statblocks/data.json | 33315 +++++++++++++++- .../plugins/obsidian-git/obsidian_askpass.sh | 23 + .obsidian/workspace.json | 142 +- Ideas generales importantes.md | 37 + Old/Alyria IV.md | 2 +- Old/Boric Rebama.md | 2 +- Old/Dragones de las columnas.md | 2 +- Old/Finarbor.md | 2 +- Old/Goldrach.md | 2 +- Old/Hibolica.md | 2 +- Planning campana.md | 20 + content/Hibolia/Hibolia.md | 21 +- .../Ciudades Libres/Ciudades Libres.md | 2 +- .../Hibolia/Lugares/Ciudades Libres/Hirra.md | 0 .../Hibolia/Lugares/Ciudades Libres/Limdor.md | 13 + .../Lugares/Ciudades Libres/Narbora.md | 6 - .../Lugares/Ciudades Libres/Turlium.md | 0 content/Hibolia/Lugares/Continentes/Elysia.md | 10 + content/Hibolia/Lugares/Continentes/Nilsia.md | 0 content/Hibolia/Lugares/Continentes/Volsia.md | 0 ...mperio de Nozt.md => Imperio Morválico.md} | 0 .../Organizaciones/Gremio de Cazadores.md | 7 - content/Hibolia/Razas/Elfos.md | 2 + content/Hibolia/Razas/Humanos.md | 4 +- content/index.md | 42 +- 28 files changed, 33722 insertions(+), 95 deletions(-) create mode 100644 .obsidian/plugins/initiative-tracker/main.js create mode 100644 .obsidian/plugins/initiative-tracker/manifest.json create mode 100644 .obsidian/plugins/initiative-tracker/styles.css create mode 100755 .obsidian/plugins/obsidian-git/obsidian_askpass.sh create mode 100644 Ideas generales importantes.md create mode 100644 Planning campana.md create mode 100644 content/Hibolia/Lugares/Ciudades Libres/Hirra.md create mode 100644 content/Hibolia/Lugares/Ciudades Libres/Limdor.md delete mode 100644 content/Hibolia/Lugares/Ciudades Libres/Narbora.md create mode 100644 content/Hibolia/Lugares/Ciudades Libres/Turlium.md create mode 100644 content/Hibolia/Lugares/Continentes/Elysia.md create mode 100644 content/Hibolia/Lugares/Continentes/Nilsia.md create mode 100644 content/Hibolia/Lugares/Continentes/Volsia.md rename content/Hibolia/Lugares/{Imperio de Nozt.md => Imperio Morválico.md} (100%) delete mode 100644 content/Hibolia/Organizaciones/Gremio de Cazadores.md diff --git a/.obsidian/plugins/initiative-tracker/main.js b/.obsidian/plugins/initiative-tracker/main.js new file mode 100644 index 0000000..4d53dfd --- /dev/null +++ b/.obsidian/plugins/initiative-tracker/main.js @@ -0,0 +1,150 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source, please visit the github repository of this plugin +*/ + +"use strict";var R5=Object.create;var El=Object.defineProperty;var M5=Object.getOwnPropertyDescriptor;var I5=Object.getOwnPropertyNames;var N5=Object.getPrototypeOf,j5=Object.prototype.hasOwnProperty;var Z5=(i,e,t)=>e in i?El(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var Qe=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),z5=(i,e)=>{for(var t in e)El(i,t,{get:e[t],enumerable:!0})},wy=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of I5(e))!j5.call(i,r)&&r!==t&&El(i,r,{get:()=>e[r],enumerable:!(n=M5(e,r))||n.enumerable});return i};var Dp=(i,e,t)=>(t=i!=null?R5(N5(i)):{},wy(e||!i||!i.__esModule?El(t,"default",{value:i,enumerable:!0}):t,i)),q5=i=>wy(El({},"__esModule",{value:!0}),i);var J=(i,e,t)=>(Z5(i,typeof e!="symbol"?e+"":e,t),t),ky=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)};var Fu=(i,e,t)=>(ky(i,e,"read from private field"),t?t.call(i):e.get(i)),Tl=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)};var Qp=(i,e,t)=>(ky(i,e,"access private method"),t);var Gp=Qe((IF,Qy)=>{"use strict";var Yp=Object.defineProperty,xE=Object.getOwnPropertyDescriptor,PE=Object.getOwnPropertyNames,CE=Object.prototype.hasOwnProperty,EE=(i,e)=>{for(var t in e)Yp(i,t,{get:e[t],enumerable:!0})},TE=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of PE(e))!CE.call(i,r)&&r!==t&&Yp(i,r,{get:()=>e[r],enumerable:!(n=xE(e,r))||n.enumerable});return i},AE=i=>TE(Yp({},"__esModule",{value:!0}),i),Dy={};EE(Dy,{FileInputSuggest:()=>QE,FolderInputSuggest:()=>DE,FuzzyInputSuggest:()=>Hp,setNodeIcon:()=>IE});Qy.exports=AE(Dy);var Up=require("obsidian"),Hp=class extends Up.AbstractInputSuggest{constructor(i,e,t){super(i,e.inputEl),this.items=t}getSuggestions(i){let e=(0,Up.prepareSimpleSearch)(i),t=[];for(let n of this.items){let r=e(this.getItemText(n));r&&t.push({item:n,match:r})}return t}renderSuggestion(i,e){e.addClass("mod-complex");let t=e.createDiv({cls:"suggestion-content"});if(!i?.item){t.setText("No match found"),t.parentElement?.addClass("is-selected");return}let n=t.createDiv("suggestion-title");this.renderTitle(n,i);let r=t.createDiv("suggestion-note");this.renderNote(r,i)}renderMatches(i,e,t,n){(0,Up.renderMatches)(i,e,t,n)}},Ty=require("obsidian"),DE=class extends Hp{getItemText(i){return i.path}renderNote(i,e){let{item:t,match:n}=e;(0,Ty.renderMatches)(i,t.path,n.matches)}renderTitle(i,e){let{item:t,match:n}=e;(0,Ty.renderMatches)(i,t.name,n.matches,t.path.length-t.name.length)}},Ay=require("obsidian"),QE=class extends Hp{getItemText(i){return i.path}renderNote(i,e){let{item:t,match:n}=e;(0,Ay.renderMatches)(i,t.path,n.matches)}renderTitle(i,e){let{item:t,match:n}=e;(0,Ay.renderMatches)(i,t.name,n.matches,t.path.length-t.name.length)}},RE=require("obsidian"),ME={"has-node-icon":"helpers_has-node-icon","x-small":"helpers_x-small",small:"helpers_small",medium:"helpers_medium",large:"helpers_large","x-large":"helpers_x-large"};function IE(i,e){i.addClass(ME["has-node-icon"]),(0,RE.setIcon)(i,e)}});var au=Qe(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.regexpCode=pt.getEsmExportName=pt.getProperty=pt.safeStringify=pt.stringify=pt.strConcat=pt.addCodeArg=pt.str=pt._=pt.nil=pt._Code=pt.Name=pt.IDENTIFIER=pt._CodeOrName=void 0;var su=class{};pt._CodeOrName=su;pt.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Jo=class extends su{constructor(e){if(super(),!pt.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};pt.Name=Jo;var Vn=class extends su{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,n)=>(n instanceof Jo&&(t[n.str]=(t[n.str]||0)+1),t),{})}};pt._Code=Vn;pt.nil=new Vn("");function w4(i,...e){let t=[i[0]],n=0;for(;n{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.ValueScope=Ki.ValueScopeName=Ki.Scope=Ki.varKinds=Ki.UsedValueState=void 0;var On=au(),IO=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},NO;(function(i){i[i.Started=0]="Started",i[i.Completed=1]="Completed"})(NO=Ki.UsedValueState||(Ki.UsedValueState={}));Ki.varKinds={const:new On.Name("const"),let:new On.Name("let"),var:new On.Name("var")};var Lh=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof On.Name?e:this.name(e)}name(e){return new On.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if(!((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Ki.Scope=Lh;var $h=class extends On.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=(0,On._)`.${new On.Name(t)}[${n}]`}};Ki.ValueScopeName=$h;var ij=(0,On._)`\n`,jO=class extends Lh{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?ij:On.nil}}get(){return this._scope}name(e){return new $h(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(e),{prefix:s}=r,o=(n=t.key)!==null&&n!==void 0?n:t.ref,a=this._values[s];if(a){let u=a.get(o);if(u)return u}else a=this._values[s]=new Map;a.set(o,r);let l=this._scope[s]||(this._scope[s]=[]),c=l.length;return l[c]=t.ref,r.setValue(t,{property:s,itemIndex:c}),r}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,On._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,n)}_reduceValues(e,t,n={},r){let s=On.nil;for(let o in e){let a=e[o];if(!a)continue;let l=n[o]=n[o]||new Map;a.forEach(c=>{if(l.has(c))return;l.set(c,NO.Started);let u=t(c);if(u){let f=this.opts.es5?Ki.varKinds.var:Ki.varKinds.const;s=(0,On._)`${s}${f} ${c} = ${u};${this.opts._n}`}else if(u=r?.(c))s=(0,On._)`${s}${u}${this.opts._n}`;else throw new IO(c);l.set(c,NO.Completed)})}return s}};Ki.ValueScope=jO});var Je=Qe(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.or=Ye.and=Ye.not=Ye.CodeGen=Ye.operators=Ye.varKinds=Ye.ValueScopeName=Ye.ValueScope=Ye.Scope=Ye.Name=Ye.regexpCode=Ye.stringify=Ye.getProperty=Ye.nil=Ye.strConcat=Ye.str=Ye._=void 0;var ot=au(),_r=ZO(),oo=au();Object.defineProperty(Ye,"_",{enumerable:!0,get:function(){return oo._}});Object.defineProperty(Ye,"str",{enumerable:!0,get:function(){return oo.str}});Object.defineProperty(Ye,"strConcat",{enumerable:!0,get:function(){return oo.strConcat}});Object.defineProperty(Ye,"nil",{enumerable:!0,get:function(){return oo.nil}});Object.defineProperty(Ye,"getProperty",{enumerable:!0,get:function(){return oo.getProperty}});Object.defineProperty(Ye,"stringify",{enumerable:!0,get:function(){return oo.stringify}});Object.defineProperty(Ye,"regexpCode",{enumerable:!0,get:function(){return oo.regexpCode}});Object.defineProperty(Ye,"Name",{enumerable:!0,get:function(){return oo.Name}});var Wh=ZO();Object.defineProperty(Ye,"Scope",{enumerable:!0,get:function(){return Wh.Scope}});Object.defineProperty(Ye,"ValueScope",{enumerable:!0,get:function(){return Wh.ValueScope}});Object.defineProperty(Ye,"ValueScopeName",{enumerable:!0,get:function(){return Wh.ValueScopeName}});Object.defineProperty(Ye,"varKinds",{enumerable:!0,get:function(){return Wh.varKinds}});Ye.operators={GT:new ot._Code(">"),GTE:new ot._Code(">="),LT:new ot._Code("<"),LTE:new ot._Code("<="),EQ:new ot._Code("==="),NEQ:new ot._Code("!=="),NOT:new ot._Code("!"),OR:new ot._Code("||"),AND:new ot._Code("&&"),ADD:new ot._Code("+")};var _s=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},zO=class extends _s{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?_r.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${r};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=ul(this.rhs,e,t)),this}get names(){return this.rhs instanceof ot._CodeOrName?this.rhs.names:{}}},Fh=class extends _s{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof ot.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=ul(this.rhs,e,t),this}get names(){let e=this.lhs instanceof ot.Name?{}:{...this.lhs.names};return Vh(e,this.rhs)}},qO=class extends Fh{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},LO=class extends _s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},$O=class extends _s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},FO=class extends _s{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},BO=class extends _s{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=ul(this.code,e,t),this}get names(){return this.code instanceof ot._CodeOrName?this.code.names:{}}},lu=class extends _s{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let s=n[r];s.optimizeNames(e,t)||(nj(e,s.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>ia(e,t.names),{})}},ws=class extends lu{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},VO=class extends lu{},cl=class extends ws{};cl.kind="else";var ea=class i extends ws{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new cl(n):n}if(t)return e===!1?t instanceof i?t:t.nodes:this.nodes.length?this:new i(S4(e),t instanceof i?[t]:t.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,t),!!(super.optimizeNames(e,t)||this.else))return this.condition=ul(this.condition,e,t),this}get names(){let e=super.names;return Vh(e,this.condition),this.else&&ia(e,this.else.names),e}};ea.kind="if";var ta=class extends ws{};ta.kind="for";var WO=class extends ta{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=ul(this.iteration,e,t),this}get names(){return ia(super.names,this.iteration.names)}},XO=class extends ta{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?_r.varKinds.var:this.varKind,{name:n,from:r,to:s}=this;return`for(${t} ${n}=${r}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){let e=Vh(super.names,this.from);return Vh(e,this.to)}},Bh=class extends ta{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=ul(this.iterable,e,t),this}get names(){return ia(super.names,this.iterable.names)}},cu=class extends ws{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};cu.kind="func";var uu=class extends lu{render(e){return"return "+super.render(e)}};uu.kind="return";var UO=class extends ws{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(r=this.finally)===null||r===void 0||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&ia(e,this.catch.names),this.finally&&ia(e,this.finally.names),e}},fu=class extends ws{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};fu.kind="catch";var du=class extends ws{render(e){return"finally"+super.render(e)}};du.kind="finally";var YO=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?` +`:""},this._extScope=e,this._scope=new _r.Scope({parent:e}),this._nodes=[new VO]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let s=this._scope.toName(t);return n!==void 0&&r&&(this._constants[s.str]=n),this._leafNode(new zO(e,s,n)),s}const(e,t,n){return this._def(_r.varKinds.const,e,t,n)}let(e,t,n){return this._def(_r.varKinds.let,e,t,n)}var(e,t,n){return this._def(_r.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new Fh(e,t,n))}add(e,t){return this._leafNode(new qO(e,Ye.operators.ADD,t))}code(e){return typeof e=="function"?e():e!==ot.nil&&this._leafNode(new BO(e)),this}object(...e){let t=["{"];for(let[n,r]of e)t.length>1&&t.push(","),t.push(n),(n!==r||this.opts.es5)&&(t.push(":"),(0,ot.addCodeArg)(t,r));return t.push("}"),new ot._Code(t)}if(e,t,n){if(this._blockNode(new ea(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new ea(e))}else(){return this._elseNode(new cl)}endIf(){return this._endBlockNode(ea,cl)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new WO(e),t)}forRange(e,t,n,r,s=this.opts.es5?_r.varKinds.var:_r.varKinds.let){let o=this._scope.toName(e);return this._for(new XO(s,o,t,n),()=>r(o))}forOf(e,t,n,r=_r.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let o=t instanceof ot.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,ot._)`${o}.length`,a=>{this.var(s,(0,ot._)`${o}[${a}]`),n(s)})}return this._for(new Bh("of",r,s,t),()=>n(s))}forIn(e,t,n,r=this.opts.es5?_r.varKinds.var:_r.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,ot._)`Object.keys(${t})`,n);let s=this._scope.toName(e);return this._for(new Bh("in",r,s,t),()=>n(s))}endFor(){return this._endBlockNode(ta)}label(e){return this._leafNode(new LO(e))}break(e){return this._leafNode(new $O(e))}return(e){let t=new uu;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(uu)}try(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new UO;if(this._blockNode(r),this.code(e),t){let s=this.name("e");this._currNode=r.catch=new fu(s),t(s)}return n&&(this._currNode=r.finally=new du,this.code(n)),this._endBlockNode(fu,du)}throw(e){return this._leafNode(new FO(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=ot.nil,n,r){return this._blockNode(new cu(e,t,n)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(cu)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof ea))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};Ye.CodeGen=YO;function ia(i,e){for(let t in e)i[t]=(i[t]||0)+(e[t]||0);return i}function Vh(i,e){return e instanceof ot._CodeOrName?ia(i,e.names):i}function ul(i,e,t){if(i instanceof ot.Name)return n(i);if(!r(i))return i;return new ot._Code(i._items.reduce((s,o)=>(o instanceof ot.Name&&(o=n(o)),o instanceof ot._Code?s.push(...o._items):s.push(o),s),[]));function n(s){let o=t[s.str];return o===void 0||e[s.str]!==1?s:(delete e[s.str],o)}function r(s){return s instanceof ot._Code&&s._items.some(o=>o instanceof ot.Name&&e[o.str]===1&&t[o.str]!==void 0)}}function nj(i,e){for(let t in e)i[t]=(i[t]||0)-(e[t]||0)}function S4(i){return typeof i=="boolean"||typeof i=="number"||i===null?!i:(0,ot._)`!${HO(i)}`}Ye.not=S4;var rj=x4(Ye.operators.AND);function sj(...i){return i.reduce(rj)}Ye.and=sj;var oj=x4(Ye.operators.OR);function aj(...i){return i.reduce(oj)}Ye.or=aj;function x4(i){return(e,t)=>e===ot.nil?t:t===ot.nil?e:(0,ot._)`${HO(e)} ${i} ${HO(t)}`}function HO(i){return i instanceof ot.Name?i:(0,ot._)`(${i})`}});var mt=Qe(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.checkStrictMode=He.getErrorPath=He.Type=He.useFunc=He.setEvaluated=He.evaluatedPropsToName=He.mergeEvaluated=He.eachItem=He.unescapeJsonPointer=He.escapeJsonPointer=He.escapeFragment=He.unescapeFragment=He.schemaRefOrVal=He.schemaHasRulesButRef=He.schemaHasRules=He.checkUnknownRules=He.alwaysValidSchema=He.toHash=void 0;var Rt=Je(),lj=au();function cj(i){let e={};for(let t of i)e[t]=!0;return e}He.toHash=cj;function uj(i,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(E4(i,e),!T4(e,i.self.RULES.all))}He.alwaysValidSchema=uj;function E4(i,e=i.schema){let{opts:t,self:n}=i;if(!t.strictSchema||typeof e=="boolean")return;let r=n.RULES.keywords;for(let s in e)r[s]||R4(i,`unknown keyword: "${s}"`)}He.checkUnknownRules=E4;function T4(i,e){if(typeof i=="boolean")return!i;for(let t in i)if(e[t])return!0;return!1}He.schemaHasRules=T4;function fj(i,e){if(typeof i=="boolean")return!i;for(let t in i)if(t!=="$ref"&&e.all[t])return!0;return!1}He.schemaHasRulesButRef=fj;function dj({topSchemaRef:i,schemaPath:e},t,n,r){if(!r){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Rt._)`${t}`}return(0,Rt._)`${i}${e}${(0,Rt.getProperty)(n)}`}He.schemaRefOrVal=dj;function hj(i){return A4(decodeURIComponent(i))}He.unescapeFragment=hj;function pj(i){return encodeURIComponent(GO(i))}He.escapeFragment=pj;function GO(i){return typeof i=="number"?`${i}`:i.replace(/~/g,"~0").replace(/\//g,"~1")}He.escapeJsonPointer=GO;function A4(i){return i.replace(/~1/g,"/").replace(/~0/g,"~")}He.unescapeJsonPointer=A4;function mj(i,e){if(Array.isArray(i))for(let t of i)e(t);else e(i)}He.eachItem=mj;function P4({mergeNames:i,mergeToName:e,mergeValues:t,resultToName:n}){return(r,s,o,a)=>{let l=o===void 0?s:o instanceof Rt.Name?(s instanceof Rt.Name?i(r,s,o):e(r,s,o),o):s instanceof Rt.Name?(e(r,o,s),s):t(s,o);return a===Rt.Name&&!(l instanceof Rt.Name)?n(r,l):l}}He.mergeEvaluated={props:P4({mergeNames:(i,e,t)=>i.if((0,Rt._)`${t} !== true && ${e} !== undefined`,()=>{i.if((0,Rt._)`${e} === true`,()=>i.assign(t,!0),()=>i.assign(t,(0,Rt._)`${t} || {}`).code((0,Rt._)`Object.assign(${t}, ${e})`))}),mergeToName:(i,e,t)=>i.if((0,Rt._)`${t} !== true`,()=>{e===!0?i.assign(t,!0):(i.assign(t,(0,Rt._)`${t} || {}`),KO(i,t,e))}),mergeValues:(i,e)=>i===!0?!0:{...i,...e},resultToName:D4}),items:P4({mergeNames:(i,e,t)=>i.if((0,Rt._)`${t} !== true && ${e} !== undefined`,()=>i.assign(t,(0,Rt._)`${e} === true ? true : ${t} > ${e} ? ${t} : ${e}`)),mergeToName:(i,e,t)=>i.if((0,Rt._)`${t} !== true`,()=>i.assign(t,e===!0?!0:(0,Rt._)`${t} > ${e} ? ${t} : ${e}`)),mergeValues:(i,e)=>i===!0?!0:Math.max(i,e),resultToName:(i,e)=>i.var("items",e)})};function D4(i,e){if(e===!0)return i.var("props",!0);let t=i.var("props",(0,Rt._)`{}`);return e!==void 0&&KO(i,t,e),t}He.evaluatedPropsToName=D4;function KO(i,e,t){Object.keys(t).forEach(n=>i.assign((0,Rt._)`${e}${(0,Rt.getProperty)(n)}`,!0))}He.setEvaluated=KO;var C4={};function gj(i,e){return i.scopeValue("func",{ref:e,code:C4[e.code]||(C4[e.code]=new lj._Code(e.code))})}He.useFunc=gj;var Q4;(function(i){i[i.Num=0]="Num",i[i.Str=1]="Str"})(Q4=He.Type||(He.Type={}));function Oj(i,e,t){if(i instanceof Rt.Name){let n=e===Q4.Num;return t?n?(0,Rt._)`"[" + ${i} + "]"`:(0,Rt._)`"['" + ${i} + "']"`:n?(0,Rt._)`"/" + ${i}`:(0,Rt._)`"/" + ${i}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Rt.getProperty)(i).toString():"/"+GO(i)}He.getErrorPath=Oj;function R4(i,e,t=i.opts.strictSchema){if(t){if(e=`strict mode: ${e}`,t===!0)throw new Error(e);i.self.logger.warn(e)}}He.checkStrictMode=R4});var ks=Qe(JO=>{"use strict";Object.defineProperty(JO,"__esModule",{value:!0});var Li=Je(),vj={data:new Li.Name("data"),valCxt:new Li.Name("valCxt"),instancePath:new Li.Name("instancePath"),parentData:new Li.Name("parentData"),parentDataProperty:new Li.Name("parentDataProperty"),rootData:new Li.Name("rootData"),dynamicAnchors:new Li.Name("dynamicAnchors"),vErrors:new Li.Name("vErrors"),errors:new Li.Name("errors"),this:new Li.Name("this"),self:new Li.Name("self"),scope:new Li.Name("scope"),json:new Li.Name("json"),jsonPos:new Li.Name("jsonPos"),jsonLen:new Li.Name("jsonLen"),jsonPart:new Li.Name("jsonPart")};JO.default=vj});var hu=Qe($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.extendErrors=$i.resetErrorsCount=$i.reportExtraError=$i.reportError=$i.keyword$DataError=$i.keywordError=void 0;var ft=Je(),Xh=mt(),Ji=ks();$i.keywordError={message:({keyword:i})=>(0,ft.str)`must pass "${i}" keyword validation`};$i.keyword$DataError={message:({keyword:i,schemaType:e})=>e?(0,ft.str)`"${i}" keyword must be ${e} ($data)`:(0,ft.str)`"${i}" keyword is invalid ($data)`};function yj(i,e=$i.keywordError,t,n){let{it:r}=i,{gen:s,compositeRule:o,allErrors:a}=r,l=N4(i,e,t);n??(o||a)?M4(s,l):I4(r,(0,ft._)`[${l}]`)}$i.reportError=yj;function bj(i,e=$i.keywordError,t){let{it:n}=i,{gen:r,compositeRule:s,allErrors:o}=n,a=N4(i,e,t);M4(r,a),s||o||I4(n,Ji.default.vErrors)}$i.reportExtraError=bj;function _j(i,e){i.assign(Ji.default.errors,e),i.if((0,ft._)`${Ji.default.vErrors} !== null`,()=>i.if(e,()=>i.assign((0,ft._)`${Ji.default.vErrors}.length`,e),()=>i.assign(Ji.default.vErrors,null)))}$i.resetErrorsCount=_j;function wj({gen:i,keyword:e,schemaValue:t,data:n,errsCount:r,it:s}){if(r===void 0)throw new Error("ajv implementation error");let o=i.name("err");i.forRange("i",r,Ji.default.errors,a=>{i.const(o,(0,ft._)`${Ji.default.vErrors}[${a}]`),i.if((0,ft._)`${o}.instancePath === undefined`,()=>i.assign((0,ft._)`${o}.instancePath`,(0,ft.strConcat)(Ji.default.instancePath,s.errorPath))),i.assign((0,ft._)`${o}.schemaPath`,(0,ft.str)`${s.errSchemaPath}/${e}`),s.opts.verbose&&(i.assign((0,ft._)`${o}.schema`,t),i.assign((0,ft._)`${o}.data`,n))})}$i.extendErrors=wj;function M4(i,e){let t=i.const("err",e);i.if((0,ft._)`${Ji.default.vErrors} === null`,()=>i.assign(Ji.default.vErrors,(0,ft._)`[${t}]`),(0,ft._)`${Ji.default.vErrors}.push(${t})`),i.code((0,ft._)`${Ji.default.errors}++`)}function I4(i,e){let{gen:t,validateName:n,schemaEnv:r}=i;r.$async?t.throw((0,ft._)`new ${i.ValidationError}(${e})`):(t.assign((0,ft._)`${n}.errors`,e),t.return(!1))}var na={keyword:new ft.Name("keyword"),schemaPath:new ft.Name("schemaPath"),params:new ft.Name("params"),propertyName:new ft.Name("propertyName"),message:new ft.Name("message"),schema:new ft.Name("schema"),parentSchema:new ft.Name("parentSchema")};function N4(i,e,t){let{createErrors:n}=i.it;return n===!1?(0,ft._)`{}`:kj(i,e,t)}function kj(i,e,t={}){let{gen:n,it:r}=i,s=[Sj(r,t),xj(i,t)];return Pj(i,e,s),n.object(...s)}function Sj({errorPath:i},{instancePath:e}){let t=e?(0,ft.str)`${i}${(0,Xh.getErrorPath)(e,Xh.Type.Str)}`:i;return[Ji.default.instancePath,(0,ft.strConcat)(Ji.default.instancePath,t)]}function xj({keyword:i,it:{errSchemaPath:e}},{schemaPath:t,parentSchema:n}){let r=n?e:(0,ft.str)`${e}/${i}`;return t&&(r=(0,ft.str)`${r}${(0,Xh.getErrorPath)(t,Xh.Type.Str)}`),[na.schemaPath,r]}function Pj(i,{params:e,message:t},n){let{keyword:r,data:s,schemaValue:o,it:a}=i,{opts:l,propertyName:c,topSchemaRef:u,schemaPath:f}=a;n.push([na.keyword,r],[na.params,typeof e=="function"?e(i):e||(0,ft._)`{}`]),l.messages&&n.push([na.message,typeof t=="function"?t(i):t]),l.verbose&&n.push([na.schema,o],[na.parentSchema,(0,ft._)`${u}${f}`],[Ji.default.data,s]),c&&n.push([na.propertyName,c])}});var Z4=Qe(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});fl.boolOrEmptySchema=fl.topBoolOrEmptySchema=void 0;var Cj=hu(),Ej=Je(),Tj=ks(),Aj={message:"boolean schema is false"};function Dj(i){let{gen:e,schema:t,validateName:n}=i;t===!1?j4(i,!1):typeof t=="object"&&t.$async===!0?e.return(Tj.default.data):(e.assign((0,Ej._)`${n}.errors`,null),e.return(!0))}fl.topBoolOrEmptySchema=Dj;function Qj(i,e){let{gen:t,schema:n}=i;n===!1?(t.var(e,!1),j4(i)):t.var(e,!0)}fl.boolOrEmptySchema=Qj;function j4(i,e){let{gen:t,data:n}=i,r={gen:t,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:i};(0,Cj.reportError)(r,Aj,void 0,e)}});var ev=Qe(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.getRules=dl.isJSONType=void 0;var Rj=["string","number","integer","boolean","null","object","array"],Mj=new Set(Rj);function Ij(i){return typeof i=="string"&&Mj.has(i)}dl.isJSONType=Ij;function Nj(){let i={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...i,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},i.number,i.string,i.array,i.object],post:{rules:[]},all:{},keywords:{}}}dl.getRules=Nj});var tv=Qe(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.shouldUseRule=ao.shouldUseGroup=ao.schemaHasRulesForType=void 0;function jj({schema:i,self:e},t){let n=e.RULES.types[t];return n&&n!==!0&&z4(i,n)}ao.schemaHasRulesForType=jj;function z4(i,e){return e.rules.some(t=>q4(i,t))}ao.shouldUseGroup=z4;function q4(i,e){var t;return i[e.keyword]!==void 0||((t=e.definition.implements)===null||t===void 0?void 0:t.some(n=>i[n]!==void 0))}ao.shouldUseRule=q4});var mu=Qe(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.reportTypeError=Di.checkDataTypes=Di.checkDataType=Di.coerceAndCheckDataType=Di.getJSONTypes=Di.getSchemaTypes=Di.DataType=void 0;var Zj=ev(),zj=tv(),qj=hu(),Ve=Je(),L4=mt(),pu;(function(i){i[i.Correct=0]="Correct",i[i.Wrong=1]="Wrong"})(pu=Di.DataType||(Di.DataType={}));function Lj(i){let e=$4(i.type);if(e.includes("null")){if(i.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&i.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');i.nullable===!0&&e.push("null")}return e}Di.getSchemaTypes=Lj;function $4(i){let e=Array.isArray(i)?i:i?[i]:[];if(e.every(Zj.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Di.getJSONTypes=$4;function $j(i,e){let{gen:t,data:n,opts:r}=i,s=Fj(e,r.coerceTypes),o=e.length>0&&!(s.length===0&&e.length===1&&(0,zj.schemaHasRulesForType)(i,e[0]));if(o){let a=nv(e,n,r.strictNumbers,pu.Wrong);t.if(a,()=>{s.length?Bj(i,e,s):rv(i)})}return o}Di.coerceAndCheckDataType=$j;var F4=new Set(["string","number","integer","boolean","null"]);function Fj(i,e){return e?i.filter(t=>F4.has(t)||e==="array"&&t==="array"):[]}function Bj(i,e,t){let{gen:n,data:r,opts:s}=i,o=n.let("dataType",(0,Ve._)`typeof ${r}`),a=n.let("coerced",(0,Ve._)`undefined`);s.coerceTypes==="array"&&n.if((0,Ve._)`${o} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>n.assign(r,(0,Ve._)`${r}[0]`).assign(o,(0,Ve._)`typeof ${r}`).if(nv(e,r,s.strictNumbers),()=>n.assign(a,r))),n.if((0,Ve._)`${a} !== undefined`);for(let c of t)(F4.has(c)||c==="array"&&s.coerceTypes==="array")&&l(c);n.else(),rv(i),n.endIf(),n.if((0,Ve._)`${a} !== undefined`,()=>{n.assign(r,a),Vj(i,a)});function l(c){switch(c){case"string":n.elseIf((0,Ve._)`${o} == "number" || ${o} == "boolean"`).assign(a,(0,Ve._)`"" + ${r}`).elseIf((0,Ve._)`${r} === null`).assign(a,(0,Ve._)`""`);return;case"number":n.elseIf((0,Ve._)`${o} == "boolean" || ${r} === null + || (${o} == "string" && ${r} && ${r} == +${r})`).assign(a,(0,Ve._)`+${r}`);return;case"integer":n.elseIf((0,Ve._)`${o} === "boolean" || ${r} === null + || (${o} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(a,(0,Ve._)`+${r}`);return;case"boolean":n.elseIf((0,Ve._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(a,!1).elseIf((0,Ve._)`${r} === "true" || ${r} === 1`).assign(a,!0);return;case"null":n.elseIf((0,Ve._)`${r} === "" || ${r} === 0 || ${r} === false`),n.assign(a,null);return;case"array":n.elseIf((0,Ve._)`${o} === "string" || ${o} === "number" + || ${o} === "boolean" || ${r} === null`).assign(a,(0,Ve._)`[${r}]`)}}}function Vj({gen:i,parentData:e,parentDataProperty:t},n){i.if((0,Ve._)`${e} !== undefined`,()=>i.assign((0,Ve._)`${e}[${t}]`,n))}function iv(i,e,t,n=pu.Correct){let r=n===pu.Correct?Ve.operators.EQ:Ve.operators.NEQ,s;switch(i){case"null":return(0,Ve._)`${e} ${r} null`;case"array":s=(0,Ve._)`Array.isArray(${e})`;break;case"object":s=(0,Ve._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=o((0,Ve._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=o();break;default:return(0,Ve._)`typeof ${e} ${r} ${i}`}return n===pu.Correct?s:(0,Ve.not)(s);function o(a=Ve.nil){return(0,Ve.and)((0,Ve._)`typeof ${e} == "number"`,a,t?(0,Ve._)`isFinite(${e})`:Ve.nil)}}Di.checkDataType=iv;function nv(i,e,t,n){if(i.length===1)return iv(i[0],e,t,n);let r,s=(0,L4.toHash)(i);if(s.array&&s.object){let o=(0,Ve._)`typeof ${e} != "object"`;r=s.null?o:(0,Ve._)`!${e} || ${o}`,delete s.null,delete s.array,delete s.object}else r=Ve.nil;s.number&&delete s.integer;for(let o in s)r=(0,Ve.and)(r,iv(o,e,t,n));return r}Di.checkDataTypes=nv;var Wj={message:({schema:i})=>`must be ${i}`,params:({schema:i,schemaValue:e})=>typeof i=="string"?(0,Ve._)`{type: ${i}}`:(0,Ve._)`{type: ${e}}`};function rv(i){let e=Xj(i);(0,qj.reportError)(e,Wj)}Di.reportTypeError=rv;function Xj(i){let{gen:e,data:t,schema:n}=i,r=(0,L4.schemaRefOrVal)(i,n,"type");return{gen:e,keyword:"type",data:t,schema:n.type,schemaCode:r,schemaValue:r,parentSchema:n,params:{},it:i}}});var V4=Qe(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});Uh.assignDefaults=void 0;var hl=Je(),Uj=mt();function Yj(i,e){let{properties:t,items:n}=i.schema;if(e==="object"&&t)for(let r in t)B4(i,r,t[r].default);else e==="array"&&Array.isArray(n)&&n.forEach((r,s)=>B4(i,s,r.default))}Uh.assignDefaults=Yj;function B4(i,e,t){let{gen:n,compositeRule:r,data:s,opts:o}=i;if(t===void 0)return;let a=(0,hl._)`${s}${(0,hl.getProperty)(e)}`;if(r){(0,Uj.checkStrictMode)(i,`default is ignored for: ${a}`);return}let l=(0,hl._)`${a} === undefined`;o.useDefaults==="empty"&&(l=(0,hl._)`${l} || ${a} === null || ${a} === ""`),n.if(l,(0,hl._)`${a} = ${(0,hl.stringify)(t)}`)}});var Wn=Qe(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.validateUnion=Et.validateArray=Et.usePattern=Et.callValidateCode=Et.schemaProperties=Et.allSchemaProperties=Et.noPropertyInData=Et.propertyInData=Et.isOwnProperty=Et.hasPropFunc=Et.reportMissingProp=Et.checkMissingProp=Et.checkReportMissingProp=void 0;var Lt=Je(),sv=mt(),lo=ks(),Hj=mt();function Gj(i,e){let{gen:t,data:n,it:r}=i;t.if(av(t,n,e,r.opts.ownProperties),()=>{i.setParams({missingProperty:(0,Lt._)`${e}`},!0),i.error()})}Et.checkReportMissingProp=Gj;function Kj({gen:i,data:e,it:{opts:t}},n,r){return(0,Lt.or)(...n.map(s=>(0,Lt.and)(av(i,e,s,t.ownProperties),(0,Lt._)`${r} = ${s}`)))}Et.checkMissingProp=Kj;function Jj(i,e){i.setParams({missingProperty:e},!0),i.error()}Et.reportMissingProp=Jj;function W4(i){return i.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Lt._)`Object.prototype.hasOwnProperty`})}Et.hasPropFunc=W4;function ov(i,e,t){return(0,Lt._)`${W4(i)}.call(${e}, ${t})`}Et.isOwnProperty=ov;function eZ(i,e,t,n){let r=(0,Lt._)`${e}${(0,Lt.getProperty)(t)} !== undefined`;return n?(0,Lt._)`${r} && ${ov(i,e,t)}`:r}Et.propertyInData=eZ;function av(i,e,t,n){let r=(0,Lt._)`${e}${(0,Lt.getProperty)(t)} === undefined`;return n?(0,Lt.or)(r,(0,Lt.not)(ov(i,e,t))):r}Et.noPropertyInData=av;function X4(i){return i?Object.keys(i).filter(e=>e!=="__proto__"):[]}Et.allSchemaProperties=X4;function tZ(i,e){return X4(e).filter(t=>!(0,sv.alwaysValidSchema)(i,e[t]))}Et.schemaProperties=tZ;function iZ({schemaCode:i,data:e,it:{gen:t,topSchemaRef:n,schemaPath:r,errorPath:s},it:o},a,l,c){let u=c?(0,Lt._)`${i}, ${e}, ${n}${r}`:e,f=[[lo.default.instancePath,(0,Lt.strConcat)(lo.default.instancePath,s)],[lo.default.parentData,o.parentData],[lo.default.parentDataProperty,o.parentDataProperty],[lo.default.rootData,lo.default.rootData]];o.opts.dynamicRef&&f.push([lo.default.dynamicAnchors,lo.default.dynamicAnchors]);let d=(0,Lt._)`${u}, ${t.object(...f)}`;return l!==Lt.nil?(0,Lt._)`${a}.call(${l}, ${d})`:(0,Lt._)`${a}(${d})`}Et.callValidateCode=iZ;var nZ=(0,Lt._)`new RegExp`;function rZ({gen:i,it:{opts:e}},t){let n=e.unicodeRegExp?"u":"",{regExp:r}=e.code,s=r(t,n);return i.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,Lt._)`${r.code==="new RegExp"?nZ:(0,Hj.useFunc)(i,r)}(${t}, ${n})`})}Et.usePattern=rZ;function sZ(i){let{gen:e,data:t,keyword:n,it:r}=i,s=e.name("valid");if(r.allErrors){let a=e.let("valid",!0);return o(()=>e.assign(a,!1)),a}return e.var(s,!0),o(()=>e.break()),s;function o(a){let l=e.const("len",(0,Lt._)`${t}.length`);e.forRange("i",0,l,c=>{i.subschema({keyword:n,dataProp:c,dataPropType:sv.Type.Num},s),e.if((0,Lt.not)(s),a)})}}Et.validateArray=sZ;function oZ(i){let{gen:e,schema:t,keyword:n,it:r}=i;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some(l=>(0,sv.alwaysValidSchema)(r,l))&&!r.opts.unevaluated)return;let o=e.let("valid",!1),a=e.name("_valid");e.block(()=>t.forEach((l,c)=>{let u=i.subschema({keyword:n,schemaProp:c,compositeRule:!0},a);e.assign(o,(0,Lt._)`${o} || ${a}`),i.mergeValidEvaluated(u,a)||e.if((0,Lt.not)(o))})),i.result(o,()=>i.reset(),()=>i.error(!0))}Et.validateUnion=oZ});var H4=Qe(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.validateKeywordUsage=es.validSchemaType=es.funcKeywordCode=es.macroKeywordCode=void 0;var en=Je(),ra=ks(),aZ=Wn(),lZ=hu();function cZ(i,e){let{gen:t,keyword:n,schema:r,parentSchema:s,it:o}=i,a=e.macro.call(o.self,r,s,o),l=Y4(t,n,a);o.opts.validateSchema!==!1&&o.self.validateSchema(a,!0);let c=t.name("valid");i.subschema({schema:a,schemaPath:en.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:l,compositeRule:!0},c),i.pass(c,()=>i.error(!0))}es.macroKeywordCode=cZ;function uZ(i,e){var t;let{gen:n,keyword:r,schema:s,parentSchema:o,$data:a,it:l}=i;dZ(l,e);let c=!a&&e.compile?e.compile.call(l.self,s,o,l):e.validate,u=Y4(n,r,c),f=n.let("valid");i.block$data(f,d),i.ok((t=e.valid)!==null&&t!==void 0?t:f);function d(){if(e.errors===!1)m(),e.modifying&&U4(i),g(()=>i.error());else{let O=e.async?h():p();e.modifying&&U4(i),g(()=>fZ(i,O))}}function h(){let O=n.let("ruleErrs",null);return n.try(()=>m((0,en._)`await `),w=>n.assign(f,!1).if((0,en._)`${w} instanceof ${l.ValidationError}`,()=>n.assign(O,(0,en._)`${w}.errors`),()=>n.throw(w))),O}function p(){let O=(0,en._)`${u}.errors`;return n.assign(O,null),m(en.nil),O}function m(O=e.async?(0,en._)`await `:en.nil){let w=l.opts.passContext?ra.default.this:ra.default.self,S=!("compile"in e&&!a||e.schema===!1);n.assign(f,(0,en._)`${O}${(0,aZ.callValidateCode)(i,u,w,S)}`,e.modifying)}function g(O){var w;n.if((0,en.not)((w=e.valid)!==null&&w!==void 0?w:f),O)}}es.funcKeywordCode=uZ;function U4(i){let{gen:e,data:t,it:n}=i;e.if(n.parentData,()=>e.assign(t,(0,en._)`${n.parentData}[${n.parentDataProperty}]`))}function fZ(i,e){let{gen:t}=i;t.if((0,en._)`Array.isArray(${e})`,()=>{t.assign(ra.default.vErrors,(0,en._)`${ra.default.vErrors} === null ? ${e} : ${ra.default.vErrors}.concat(${e})`).assign(ra.default.errors,(0,en._)`${ra.default.vErrors}.length`),(0,lZ.extendErrors)(i)},()=>i.error())}function dZ({schemaEnv:i},e){if(e.async&&!i.$async)throw new Error("async keyword in sync schema")}function Y4(i,e,t){if(t===void 0)throw new Error(`keyword "${e}" failed to compile`);return i.scopeValue("keyword",typeof t=="function"?{ref:t}:{ref:t,code:(0,en.stringify)(t)})}function hZ(i,e,t=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(i):n==="object"?i&&typeof i=="object"&&!Array.isArray(i):typeof i==n||t&&typeof i>"u")}es.validSchemaType=hZ;function pZ({schema:i,opts:e,self:t,errSchemaPath:n},r,s){if(Array.isArray(r.keyword)?!r.keyword.includes(s):r.keyword!==s)throw new Error("ajv implementation error");let o=r.dependencies;if(o?.some(a=>!Object.prototype.hasOwnProperty.call(i,a)))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(r.validateSchema&&!r.validateSchema(i[s])){let l=`keyword "${s}" value is invalid at path "${n}": `+t.errorsText(r.validateSchema.errors);if(e.validateSchema==="log")t.logger.error(l);else throw new Error(l)}}es.validateKeywordUsage=pZ});var K4=Qe(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.extendSubschemaMode=co.extendSubschemaData=co.getSubschema=void 0;var ts=Je(),G4=mt();function mZ(i,{keyword:e,schemaProp:t,schema:n,schemaPath:r,errSchemaPath:s,topSchemaRef:o}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=i.schema[e];return t===void 0?{schema:a,schemaPath:(0,ts._)`${i.schemaPath}${(0,ts.getProperty)(e)}`,errSchemaPath:`${i.errSchemaPath}/${e}`}:{schema:a[t],schemaPath:(0,ts._)`${i.schemaPath}${(0,ts.getProperty)(e)}${(0,ts.getProperty)(t)}`,errSchemaPath:`${i.errSchemaPath}/${e}/${(0,G4.escapeFragment)(t)}`}}if(n!==void 0){if(r===void 0||s===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:r,topSchemaRef:o,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}co.getSubschema=mZ;function gZ(i,e,{dataProp:t,dataPropType:n,data:r,dataTypes:s,propertyName:o}){if(r!==void 0&&t!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(t!==void 0){let{errorPath:c,dataPathArr:u,opts:f}=e,d=a.let("data",(0,ts._)`${e.data}${(0,ts.getProperty)(t)}`,!0);l(d),i.errorPath=(0,ts.str)`${c}${(0,G4.getErrorPath)(t,n,f.jsPropertySyntax)}`,i.parentDataProperty=(0,ts._)`${t}`,i.dataPathArr=[...u,i.parentDataProperty]}if(r!==void 0){let c=r instanceof ts.Name?r:a.let("data",r,!0);l(c),o!==void 0&&(i.propertyName=o)}s&&(i.dataTypes=s);function l(c){i.data=c,i.dataLevel=e.dataLevel+1,i.dataTypes=[],e.definedProperties=new Set,i.parentData=e.data,i.dataNames=[...e.dataNames,c]}}co.extendSubschemaData=gZ;function OZ(i,{jtdDiscriminator:e,jtdMetadata:t,compositeRule:n,createErrors:r,allErrors:s}){n!==void 0&&(i.compositeRule=n),r!==void 0&&(i.createErrors=r),s!==void 0&&(i.allErrors=s),i.jtdDiscriminator=e,i.jtdMetadata=t}co.extendSubschemaMode=OZ});var lv=Qe((Ote,J4)=>{"use strict";J4.exports=function i(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!i(e[r],t[r]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){var o=s[r];if(!i(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}});var tC=Qe((vte,eC)=>{"use strict";var uo=eC.exports=function(i,e,t){typeof e=="function"&&(t=e,e={}),t=e.cb||t;var n=typeof t=="function"?t:t.pre||function(){},r=t.post||function(){};Yh(e,n,r,i,"",i)};uo.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};uo.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};uo.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};uo.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Yh(i,e,t,n,r,s,o,a,l,c){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,r,s,o,a,l,c);for(var u in n){var f=n[u];if(Array.isArray(f)){if(u in uo.arrayKeywords)for(var d=0;d{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.getSchemaRefs=vn.resolveUrl=vn.normalizeId=vn._getFullPath=vn.getFullPath=vn.inlineRef=void 0;var yZ=mt(),bZ=lv(),_Z=tC(),wZ=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function kZ(i,e=!0){return typeof i=="boolean"?!0:e===!0?!cv(i):e?iC(i)<=e:!1}vn.inlineRef=kZ;var SZ=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function cv(i){for(let e in i){if(SZ.has(e))return!0;let t=i[e];if(Array.isArray(t)&&t.some(cv)||typeof t=="object"&&cv(t))return!0}return!1}function iC(i){let e=0;for(let t in i){if(t==="$ref")return 1/0;if(e++,!wZ.has(t)&&(typeof i[t]=="object"&&(0,yZ.eachItem)(i[t],n=>e+=iC(n)),e===1/0))return 1/0}return e}function nC(i,e="",t){t!==!1&&(e=pl(e));let n=i.parse(e);return rC(i,n)}vn.getFullPath=nC;function rC(i,e){return i.serialize(e).split("#")[0]+"#"}vn._getFullPath=rC;var xZ=/#\/?$/;function pl(i){return i?i.replace(xZ,""):""}vn.normalizeId=pl;function PZ(i,e,t){return t=pl(t),i.resolve(e,t)}vn.resolveUrl=PZ;var CZ=/^[a-z_][-a-z0-9._]*$/i;function EZ(i,e){if(typeof i=="boolean")return{};let{schemaId:t,uriResolver:n}=this.opts,r=pl(i[t]||e),s={"":r},o=nC(n,r,!1),a={},l=new Set;return _Z(i,{allKeys:!0},(f,d,h,p)=>{if(p===void 0)return;let m=o+d,g=s[p];typeof f[t]=="string"&&(g=O.call(this,f[t])),w.call(this,f.$anchor),w.call(this,f.$dynamicAnchor),s[d]=g;function O(S){let C=this.opts.uriResolver.resolve;if(S=pl(g?C(g,S):S),l.has(S))throw u(S);l.add(S);let k=this.refs[S];return typeof k=="string"&&(k=this.refs[k]),typeof k=="object"?c(f,k.schema,S):S!==pl(m)&&(S[0]==="#"?(c(f,a[S],S),a[S]=f):this.refs[S]=m),S}function w(S){if(typeof S=="string"){if(!CZ.test(S))throw new Error(`invalid anchor "${S}"`);O.call(this,`#${S}`)}}}),a;function c(f,d,h){if(d!==void 0&&!bZ(f,d))throw u(h)}function u(f){return new Error(`reference "${f}" resolves to more than one schema`)}}vn.getSchemaRefs=EZ});var yu=Qe(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.getData=fo.KeywordCxt=fo.validateFunctionCode=void 0;var cC=Z4(),sC=mu(),fv=tv(),Hh=mu(),TZ=V4(),vu=H4(),uv=K4(),Me=Je(),ze=ks(),AZ=gu(),Ss=mt(),Ou=hu();function DZ(i){if(dC(i)&&(hC(i),fC(i))){MZ(i);return}uC(i,()=>(0,cC.topBoolOrEmptySchema)(i))}fo.validateFunctionCode=DZ;function uC({gen:i,validateName:e,schema:t,schemaEnv:n,opts:r},s){r.code.es5?i.func(e,(0,Me._)`${ze.default.data}, ${ze.default.valCxt}`,n.$async,()=>{i.code((0,Me._)`"use strict"; ${oC(t,r)}`),RZ(i,r),i.code(s)}):i.func(e,(0,Me._)`${ze.default.data}, ${QZ(r)}`,n.$async,()=>i.code(oC(t,r)).code(s))}function QZ(i){return(0,Me._)`{${ze.default.instancePath}="", ${ze.default.parentData}, ${ze.default.parentDataProperty}, ${ze.default.rootData}=${ze.default.data}${i.dynamicRef?(0,Me._)`, ${ze.default.dynamicAnchors}={}`:Me.nil}}={}`}function RZ(i,e){i.if(ze.default.valCxt,()=>{i.var(ze.default.instancePath,(0,Me._)`${ze.default.valCxt}.${ze.default.instancePath}`),i.var(ze.default.parentData,(0,Me._)`${ze.default.valCxt}.${ze.default.parentData}`),i.var(ze.default.parentDataProperty,(0,Me._)`${ze.default.valCxt}.${ze.default.parentDataProperty}`),i.var(ze.default.rootData,(0,Me._)`${ze.default.valCxt}.${ze.default.rootData}`),e.dynamicRef&&i.var(ze.default.dynamicAnchors,(0,Me._)`${ze.default.valCxt}.${ze.default.dynamicAnchors}`)},()=>{i.var(ze.default.instancePath,(0,Me._)`""`),i.var(ze.default.parentData,(0,Me._)`undefined`),i.var(ze.default.parentDataProperty,(0,Me._)`undefined`),i.var(ze.default.rootData,ze.default.data),e.dynamicRef&&i.var(ze.default.dynamicAnchors,(0,Me._)`{}`)})}function MZ(i){let{schema:e,opts:t,gen:n}=i;uC(i,()=>{t.$comment&&e.$comment&&mC(i),zZ(i),n.let(ze.default.vErrors,null),n.let(ze.default.errors,0),t.unevaluated&&IZ(i),pC(i),$Z(i)})}function IZ(i){let{gen:e,validateName:t}=i;i.evaluated=e.const("evaluated",(0,Me._)`${t}.evaluated`),e.if((0,Me._)`${i.evaluated}.dynamicProps`,()=>e.assign((0,Me._)`${i.evaluated}.props`,(0,Me._)`undefined`)),e.if((0,Me._)`${i.evaluated}.dynamicItems`,()=>e.assign((0,Me._)`${i.evaluated}.items`,(0,Me._)`undefined`))}function oC(i,e){let t=typeof i=="object"&&i[e.schemaId];return t&&(e.code.source||e.code.process)?(0,Me._)`/*# sourceURL=${t} */`:Me.nil}function NZ(i,e){if(dC(i)&&(hC(i),fC(i))){jZ(i,e);return}(0,cC.boolOrEmptySchema)(i,e)}function fC({schema:i,self:e}){if(typeof i=="boolean")return!i;for(let t in i)if(e.RULES.all[t])return!0;return!1}function dC(i){return typeof i.schema!="boolean"}function jZ(i,e){let{schema:t,gen:n,opts:r}=i;r.$comment&&t.$comment&&mC(i),qZ(i),LZ(i);let s=n.const("_errs",ze.default.errors);pC(i,s),n.var(e,(0,Me._)`${s} === ${ze.default.errors}`)}function hC(i){(0,Ss.checkUnknownRules)(i),ZZ(i)}function pC(i,e){if(i.opts.jtd)return aC(i,[],!1,e);let t=(0,sC.getSchemaTypes)(i.schema),n=(0,sC.coerceAndCheckDataType)(i,t);aC(i,t,!n,e)}function ZZ(i){let{schema:e,errSchemaPath:t,opts:n,self:r}=i;e.$ref&&n.ignoreKeywordsWithRef&&(0,Ss.schemaHasRulesButRef)(e,r.RULES)&&r.logger.warn(`$ref: keywords ignored in schema at path "${t}"`)}function zZ(i){let{schema:e,opts:t}=i;e.default!==void 0&&t.useDefaults&&t.strictSchema&&(0,Ss.checkStrictMode)(i,"default is ignored in the schema root")}function qZ(i){let e=i.schema[i.opts.schemaId];e&&(i.baseId=(0,AZ.resolveUrl)(i.opts.uriResolver,i.baseId,e))}function LZ(i){if(i.schema.$async&&!i.schemaEnv.$async)throw new Error("async schema in sync schema")}function mC({gen:i,schemaEnv:e,schema:t,errSchemaPath:n,opts:r}){let s=t.$comment;if(r.$comment===!0)i.code((0,Me._)`${ze.default.self}.logger.log(${s})`);else if(typeof r.$comment=="function"){let o=(0,Me.str)`${n}/$comment`,a=i.scopeValue("root",{ref:e.root});i.code((0,Me._)`${ze.default.self}.opts.$comment(${s}, ${o}, ${a}.schema)`)}}function $Z(i){let{gen:e,schemaEnv:t,validateName:n,ValidationError:r,opts:s}=i;t.$async?e.if((0,Me._)`${ze.default.errors} === 0`,()=>e.return(ze.default.data),()=>e.throw((0,Me._)`new ${r}(${ze.default.vErrors})`)):(e.assign((0,Me._)`${n}.errors`,ze.default.vErrors),s.unevaluated&&FZ(i),e.return((0,Me._)`${ze.default.errors} === 0`))}function FZ({gen:i,evaluated:e,props:t,items:n}){t instanceof Me.Name&&i.assign((0,Me._)`${e}.props`,t),n instanceof Me.Name&&i.assign((0,Me._)`${e}.items`,n)}function aC(i,e,t,n){let{gen:r,schema:s,data:o,allErrors:a,opts:l,self:c}=i,{RULES:u}=c;if(s.$ref&&(l.ignoreKeywordsWithRef||!(0,Ss.schemaHasRulesButRef)(s,u))){r.block(()=>OC(i,"$ref",u.all.$ref.definition));return}l.jtd||BZ(i,e),r.block(()=>{for(let d of u.rules)f(d);f(u.post)});function f(d){(0,fv.shouldUseGroup)(s,d)&&(d.type?(r.if((0,Hh.checkDataType)(d.type,o,l.strictNumbers)),lC(i,d),e.length===1&&e[0]===d.type&&t&&(r.else(),(0,Hh.reportTypeError)(i)),r.endIf()):lC(i,d),a||r.if((0,Me._)`${ze.default.errors} === ${n||0}`))}}function lC(i,e){let{gen:t,schema:n,opts:{useDefaults:r}}=i;r&&(0,TZ.assignDefaults)(i,e.type),t.block(()=>{for(let s of e.rules)(0,fv.shouldUseRule)(n,s)&&OC(i,s.keyword,s.definition,e.type)})}function BZ(i,e){i.schemaEnv.meta||!i.opts.strictTypes||(VZ(i,e),i.opts.allowUnionTypes||WZ(i,e),XZ(i,i.dataTypes))}function VZ(i,e){if(e.length){if(!i.dataTypes.length){i.dataTypes=e;return}e.forEach(t=>{gC(i.dataTypes,t)||dv(i,`type "${t}" not allowed by context "${i.dataTypes.join(",")}"`)}),YZ(i,e)}}function WZ(i,e){e.length>1&&!(e.length===2&&e.includes("null"))&&dv(i,"use allowUnionTypes to allow union type keyword")}function XZ(i,e){let t=i.self.RULES.all;for(let n in t){let r=t[n];if(typeof r=="object"&&(0,fv.shouldUseRule)(i.schema,r)){let{type:s}=r.definition;s.length&&!s.some(o=>UZ(e,o))&&dv(i,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function UZ(i,e){return i.includes(e)||e==="number"&&i.includes("integer")}function gC(i,e){return i.includes(e)||e==="integer"&&i.includes("number")}function YZ(i,e){let t=[];for(let n of i.dataTypes)gC(e,n)?t.push(n):e.includes("integer")&&n==="number"&&t.push("integer");i.dataTypes=t}function dv(i,e){let t=i.schemaEnv.baseId+i.errSchemaPath;e+=` at "${t}" (strictTypes)`,(0,Ss.checkStrictMode)(i,e,i.opts.strictTypes)}var Gh=class{constructor(e,t,n){if((0,vu.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Ss.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",vC(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,vu.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const("_errs",ze.default.errors))}result(e,t,n){this.failResult((0,Me.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,Me.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,Me._)`${t} !== undefined && (${(0,Me.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?Ou.reportExtraError:Ou.reportError)(this,this.def.error,t)}$dataError(){(0,Ou.reportError)(this,this.def.$dataError||Ou.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ou.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=Me.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=Me.nil,t=Me.nil){if(!this.$data)return;let{gen:n,schemaCode:r,schemaType:s,def:o}=this;n.if((0,Me.or)((0,Me._)`${r} === undefined`,t)),e!==Me.nil&&n.assign(e,!0),(s.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==Me.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:r,it:s}=this;return(0,Me.or)(o(),a());function o(){if(n.length){if(!(t instanceof Me.Name))throw new Error("ajv implementation error");let l=Array.isArray(n)?n:[n];return(0,Me._)`${(0,Hh.checkDataTypes)(l,t,s.opts.strictNumbers,Hh.DataType.Wrong)}`}return Me.nil}function a(){if(r.validateSchema){let l=e.scopeValue("validate$data",{ref:r.validateSchema});return(0,Me._)`!${l}(${t})`}return Me.nil}}subschema(e,t){let n=(0,uv.getSubschema)(this.it,e);(0,uv.extendSubschemaData)(n,this.it,e),(0,uv.extendSubschemaMode)(n,e);let r={...this.it,...n,items:void 0,props:void 0};return NZ(r,t),r}mergeEvaluated(e,t){let{it:n,gen:r}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Ss.mergeEvaluated.props(r,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=Ss.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:r}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return r.if(t,()=>this.mergeEvaluated(e,Me.Name)),!0}};fo.KeywordCxt=Gh;function OC(i,e,t,n){let r=new Gh(i,t,e);"code"in t?t.code(r,n):r.$data&&t.validate?(0,vu.funcKeywordCode)(r,t):"macro"in t?(0,vu.macroKeywordCode)(r,t):(t.compile||t.validate)&&(0,vu.funcKeywordCode)(r,t)}var HZ=/^\/(?:[^~]|~0|~1)*$/,GZ=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function vC(i,{dataLevel:e,dataNames:t,dataPathArr:n}){let r,s;if(i==="")return ze.default.rootData;if(i[0]==="/"){if(!HZ.test(i))throw new Error(`Invalid JSON-pointer: ${i}`);r=i,s=ze.default.rootData}else{let c=GZ.exec(i);if(!c)throw new Error(`Invalid JSON-pointer: ${i}`);let u=+c[1];if(r=c[2],r==="#"){if(u>=e)throw new Error(l("property/index",u));return n[e-u]}if(u>e)throw new Error(l("data",u));if(s=t[e-u],!r)return s}let o=s,a=r.split("/");for(let c of a)c&&(s=(0,Me._)`${s}${(0,Me.getProperty)((0,Ss.unescapeJsonPointer)(c))}`,o=(0,Me._)`${o} && ${s}`);return o;function l(c,u){return`Cannot access ${c} ${u} levels up, current level is ${e}`}}fo.getData=vC});var Kh=Qe(pv=>{"use strict";Object.defineProperty(pv,"__esModule",{value:!0});var hv=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};pv.default=hv});var Jh=Qe(Ov=>{"use strict";Object.defineProperty(Ov,"__esModule",{value:!0});var mv=gu(),gv=class extends Error{constructor(e,t,n,r){super(r||`can't resolve reference ${n} from id ${t}`),this.missingRef=(0,mv.resolveUrl)(e,t,n),this.missingSchema=(0,mv.normalizeId)((0,mv.getFullPath)(e,this.missingRef))}};Ov.default=gv});var tp=Qe(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.resolveSchema=Xn.getCompilingSchema=Xn.resolveRef=Xn.compileSchema=Xn.SchemaEnv=void 0;var wr=Je(),KZ=Kh(),sa=ks(),kr=gu(),yC=mt(),JZ=yu(),ml=class{constructor(e){var t;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,kr.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};Xn.SchemaEnv=ml;function yv(i){let e=bC.call(this,i);if(e)return e;let t=(0,kr.getFullPath)(this.opts.uriResolver,i.root.baseId),{es5:n,lines:r}=this.opts.code,{ownProperties:s}=this.opts,o=new wr.CodeGen(this.scope,{es5:n,lines:r,ownProperties:s}),a;i.$async&&(a=o.scopeValue("Error",{ref:KZ.default,code:(0,wr._)`require("ajv/dist/runtime/validation_error").default`}));let l=o.scopeName("validate");i.validateName=l;let c={gen:o,allErrors:this.opts.allErrors,data:sa.default.data,parentData:sa.default.parentData,parentDataProperty:sa.default.parentDataProperty,dataNames:[sa.default.data],dataPathArr:[wr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:i.schema,code:(0,wr.stringify)(i.schema)}:{ref:i.schema}),validateName:l,ValidationError:a,schema:i.schema,schemaEnv:i,rootId:t,baseId:i.baseId||t,schemaPath:wr.nil,errSchemaPath:i.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,wr._)`""`,opts:this.opts,self:this},u;try{this._compilations.add(i),(0,JZ.validateFunctionCode)(c),o.optimize(this.opts.code.optimize);let f=o.toString();u=`${o.scopeRefs(sa.default.scope)}return ${f}`,this.opts.code.process&&(u=this.opts.code.process(u,i));let h=new Function(`${sa.default.self}`,`${sa.default.scope}`,u)(this,this.scope.get());if(this.scope.value(l,{ref:h}),h.errors=null,h.schema=i.schema,h.schemaEnv=i,i.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:l,validateCode:f,scopeValues:o._values}),this.opts.unevaluated){let{props:p,items:m}=c;h.evaluated={props:p instanceof wr.Name?void 0:p,items:m instanceof wr.Name?void 0:m,dynamicProps:p instanceof wr.Name,dynamicItems:m instanceof wr.Name},h.source&&(h.source.evaluated=(0,wr.stringify)(h.evaluated))}return i.validate=h,i}catch(f){throw delete i.validate,delete i.validateName,u&&this.logger.error("Error compiling schema, function code:",u),f}finally{this._compilations.delete(i)}}Xn.compileSchema=yv;function ez(i,e,t){var n;t=(0,kr.resolveUrl)(this.opts.uriResolver,e,t);let r=i.refs[t];if(r)return r;let s=nz.call(this,i,t);if(s===void 0){let o=(n=i.localRefs)===null||n===void 0?void 0:n[t],{schemaId:a}=this.opts;o&&(s=new ml({schema:o,schemaId:a,root:i,baseId:e}))}if(s!==void 0)return i.refs[t]=tz.call(this,s)}Xn.resolveRef=ez;function tz(i){return(0,kr.inlineRef)(i.schema,this.opts.inlineRefs)?i.schema:i.validate?i:yv.call(this,i)}function bC(i){for(let e of this._compilations)if(iz(e,i))return e}Xn.getCompilingSchema=bC;function iz(i,e){return i.schema===e.schema&&i.root===e.root&&i.baseId===e.baseId}function nz(i,e){let t;for(;typeof(t=this.refs[e])=="string";)e=t;return t||this.schemas[e]||ep.call(this,i,e)}function ep(i,e){let t=this.opts.uriResolver.parse(e),n=(0,kr._getFullPath)(this.opts.uriResolver,t),r=(0,kr.getFullPath)(this.opts.uriResolver,i.baseId,void 0);if(Object.keys(i.schema).length>0&&n===r)return vv.call(this,t,i);let s=(0,kr.normalizeId)(n),o=this.refs[s]||this.schemas[s];if(typeof o=="string"){let a=ep.call(this,i,o);return typeof a?.schema!="object"?void 0:vv.call(this,t,a)}if(typeof o?.schema=="object"){if(o.validate||yv.call(this,o),s===(0,kr.normalizeId)(e)){let{schema:a}=o,{schemaId:l}=this.opts,c=a[l];return c&&(r=(0,kr.resolveUrl)(this.opts.uriResolver,r,c)),new ml({schema:a,schemaId:l,root:i,baseId:r})}return vv.call(this,t,o)}}Xn.resolveSchema=ep;var rz=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function vv(i,{baseId:e,schema:t,root:n}){var r;if(((r=i.fragment)===null||r===void 0?void 0:r[0])!=="/")return;for(let a of i.fragment.slice(1).split("/")){if(typeof t=="boolean")return;let l=t[(0,yC.unescapeFragment)(a)];if(l===void 0)return;t=l;let c=typeof t=="object"&&t[this.opts.schemaId];!rz.has(a)&&c&&(e=(0,kr.resolveUrl)(this.opts.uriResolver,e,c))}let s;if(typeof t!="boolean"&&t.$ref&&!(0,yC.schemaHasRulesButRef)(t,this.RULES)){let a=(0,kr.resolveUrl)(this.opts.uriResolver,e,t.$ref);s=ep.call(this,n,a)}let{schemaId:o}=this.opts;if(s=s||new ml({schema:t,schemaId:o,root:n,baseId:e}),s.schema!==s.root.schema)return s}});var _C=Qe((Ste,sz)=>{sz.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var kC=Qe((ip,wC)=>{(function(i,e){typeof ip=="object"&&typeof wC<"u"?e(ip):typeof define=="function"&&define.amd?define(["exports"],e):e(i.URI=i.URI||{})})(ip,function(i){"use strict";function e(){for(var F=arguments.length,N=Array(F),W=0;W1){N[0]=N[0].slice(0,-1);for(var K=N.length-1,te=1;te= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=h-p,Z=Math.floor,Q=String.fromCharCode;function D(F){throw new RangeError(x[F])}function E(F,N){for(var W=[],K=F.length;K--;)W[K]=N(F[K]);return W}function j(F,N){var W=F.split("@"),K="";W.length>1&&(K=W[0]+"@",F=W[1]),F=F.replace(P,".");var te=F.split("."),Ce=E(te,N).join(".");return K+Ce}function z(F){for(var N=[],W=0,K=F.length;W=55296&&te<=56319&&W>1,N+=Z(N/W);N>R*m>>1;te+=h)N=Z(N/R);return Z(te+(R+1)*N/(N+g))},Pe=function(N){var W=[],K=N.length,te=0,Ce=S,Le=w,st=N.lastIndexOf(C);st<0&&(st=0);for(var Ot=0;Ot=128&&D("not-basic"),W.push(N.charCodeAt(Ot));for(var Yt=st>0?st+1:0;Yt=K&&D("invalid-input");var Mt=G(N.charCodeAt(Yt++));(Mt>=h||Mt>Z((d-te)/Zt))&&D("overflow"),te+=Mt*Zt;var ct=Ht<=Le?p:Ht>=Le+m?m:Ht-Le;if(MtZ(d/zt)&&D("overflow"),Zt*=zt}var _t=W.length+1;Le=ce(te-it,_t,it==0),Z(te/_t)>d-Ce&&D("overflow"),Ce+=Z(te/_t),te%=_t,W.splice(te++,0,Ce)}return String.fromCodePoint.apply(String,W)},ue=function(N){var W=[];N=z(N);var K=N.length,te=S,Ce=0,Le=w,st=!0,Ot=!1,Yt=void 0;try{for(var it=N[Symbol.iterator](),Zt;!(st=(Zt=it.next()).done);st=!0){var Ht=Zt.value;Ht<128&&W.push(Q(Ht))}}catch(I){Ot=!0,Yt=I}finally{try{!st&&it.return&&it.return()}finally{if(Ot)throw Yt}}var Mt=W.length,ct=Mt;for(Mt&&W.push(C);ct=te&&BiZ((d-Ce)/on)&&D("overflow"),Ce+=(zt-te)*on,te=zt;var Qn=!0,os=!1,Hn=void 0;try{for(var wo=N[Symbol.iterator](),fa;!(Qn=(fa=wo.next()).done);Qn=!0){var da=fa.value;if(dad&&D("overflow"),da==te){for(var Cs=Ce,Es=h;;Es+=h){var Gn=Es<=Le?p:Es>=Le+m?m:Es-Le;if(Cs>6|192).toString(16).toUpperCase()+"%"+(N&63|128).toString(16).toUpperCase():W="%"+(N>>12|224).toString(16).toUpperCase()+"%"+(N>>6&63|128).toString(16).toUpperCase()+"%"+(N&63|128).toString(16).toUpperCase(),W}function ke(F){for(var N="",W=0,K=F.length;W=194&&te<224){if(K-W>=6){var Ce=parseInt(F.substr(W+4,2),16);N+=String.fromCharCode((te&31)<<6|Ce&63)}else N+=F.substr(W,6);W+=6}else if(te>=224){if(K-W>=9){var Le=parseInt(F.substr(W+4,2),16),st=parseInt(F.substr(W+7,2),16);N+=String.fromCharCode((te&15)<<12|(Le&63)<<6|st&63)}else N+=F.substr(W,9);W+=9}else N+=F.substr(W,3),W+=3}return N}function yt(F,N){function W(K){var te=ke(K);return te.match(N.UNRESERVED)?te:K}return F.scheme&&(F.scheme=String(F.scheme).replace(N.PCT_ENCODED,W).toLowerCase().replace(N.NOT_SCHEME,"")),F.userinfo!==void 0&&(F.userinfo=String(F.userinfo).replace(N.PCT_ENCODED,W).replace(N.NOT_USERINFO,oe).replace(N.PCT_ENCODED,r)),F.host!==void 0&&(F.host=String(F.host).replace(N.PCT_ENCODED,W).toLowerCase().replace(N.NOT_HOST,oe).replace(N.PCT_ENCODED,r)),F.path!==void 0&&(F.path=String(F.path).replace(N.PCT_ENCODED,W).replace(F.scheme?N.NOT_PATH:N.NOT_PATH_NOSCHEME,oe).replace(N.PCT_ENCODED,r)),F.query!==void 0&&(F.query=String(F.query).replace(N.PCT_ENCODED,W).replace(N.NOT_QUERY,oe).replace(N.PCT_ENCODED,r)),F.fragment!==void 0&&(F.fragment=String(F.fragment).replace(N.PCT_ENCODED,W).replace(N.NOT_FRAGMENT,oe).replace(N.PCT_ENCODED,r)),F}function It(F){return F.replace(/^0*(.*)/,"$1")||"0"}function at(F,N){var W=F.match(N.IPV4ADDRESS)||[],K=u(W,2),te=K[1];return te?te.split(".").map(It).join("."):F}function Nt(F,N){var W=F.match(N.IPV6ADDRESS)||[],K=u(W,3),te=K[1],Ce=K[2];if(te){for(var Le=te.toLowerCase().split("::").reverse(),st=u(Le,2),Ot=st[0],Yt=st[1],it=Yt?Yt.split(":").map(It):[],Zt=Ot.split(":").map(It),Ht=N.IPV4ADDRESS.test(Zt[Zt.length-1]),Mt=Ht?7:8,ct=Zt.length-Mt,zt=Array(Mt),_t=0;_t1){var kt=zt.slice(0,Fi.index),Bi=zt.slice(Fi.index+Fi.length);sn=kt.join(":")+"::"+Bi.join(":")}else sn=zt.join(":");return Ce&&(sn+="%"+Ce),sn}else return F}var Pr=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,nn="".match(/(){0}/)[1]===void 0;function $t(F){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W={},K=N.iri!==!1?c:l;N.reference==="suffix"&&(F=(N.scheme?N.scheme+":":"")+"//"+F);var te=F.match(Pr);if(te){nn?(W.scheme=te[1],W.userinfo=te[3],W.host=te[4],W.port=parseInt(te[5],10),W.path=te[6]||"",W.query=te[7],W.fragment=te[8],isNaN(W.port)&&(W.port=te[5])):(W.scheme=te[1]||void 0,W.userinfo=F.indexOf("@")!==-1?te[3]:void 0,W.host=F.indexOf("//")!==-1?te[4]:void 0,W.port=parseInt(te[5],10),W.path=te[6]||"",W.query=F.indexOf("?")!==-1?te[7]:void 0,W.fragment=F.indexOf("#")!==-1?te[8]:void 0,isNaN(W.port)&&(W.port=F.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?te[4]:void 0)),W.host&&(W.host=Nt(at(W.host,K),K)),W.scheme===void 0&&W.userinfo===void 0&&W.host===void 0&&W.port===void 0&&!W.path&&W.query===void 0?W.reference="same-document":W.scheme===void 0?W.reference="relative":W.fragment===void 0?W.reference="absolute":W.reference="uri",N.reference&&N.reference!=="suffix"&&N.reference!==W.reference&&(W.error=W.error||"URI is not a "+N.reference+" reference.");var Ce=Re[(N.scheme||W.scheme||"").toLowerCase()];if(!N.unicodeSupport&&(!Ce||!Ce.unicodeSupport)){if(W.host&&(N.domainHost||Ce&&Ce.domainHost))try{W.host=pe.toASCII(W.host.replace(K.PCT_ENCODED,ke).toLowerCase())}catch(Le){W.error=W.error||"Host's domain name can not be converted to ASCII via punycode: "+Le}yt(W,l)}else yt(W,K);Ce&&Ce.parse&&Ce.parse(W,N)}else W.error=W.error||"URI can not be parsed.";return W}function Tt(F,N){var W=N.iri!==!1?c:l,K=[];return F.userinfo!==void 0&&(K.push(F.userinfo),K.push("@")),F.host!==void 0&&K.push(Nt(at(String(F.host),W),W).replace(W.IPV6ADDRESS,function(te,Ce,Le){return"["+Ce+(Le?"%25"+Le:"")+"]"})),(typeof F.port=="number"||typeof F.port=="string")&&(K.push(":"),K.push(String(F.port))),K.length?K.join(""):void 0}var lt=/^\.\.?\//,dt=/^\/\.(\/|$)/,gt=/^\/\.\.(\/|$)/,jt=/^\/?(?:.|\n)*?(?=\/|$)/;function Cr(F){for(var N=[];F.length;)if(F.match(lt))F=F.replace(lt,"");else if(F.match(dt))F=F.replace(dt,"/");else if(F.match(gt))F=F.replace(gt,"/"),N.pop();else if(F==="."||F==="..")F="";else{var W=F.match(jt);if(W){var K=W[0];F=F.slice(K.length),N.push(K)}else throw new Error("Unexpected dot segment condition")}return N.join("")}function bt(F){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=N.iri?c:l,K=[],te=Re[(N.scheme||F.scheme||"").toLowerCase()];if(te&&te.serialize&&te.serialize(F,N),F.host&&!W.IPV6ADDRESS.test(F.host)){if(N.domainHost||te&&te.domainHost)try{F.host=N.iri?pe.toUnicode(F.host):pe.toASCII(F.host.replace(W.PCT_ENCODED,ke).toLowerCase())}catch(st){F.error=F.error||"Host's domain name can not be converted to "+(N.iri?"Unicode":"ASCII")+" via punycode: "+st}}yt(F,W),N.reference!=="suffix"&&F.scheme&&(K.push(F.scheme),K.push(":"));var Ce=Tt(F,N);if(Ce!==void 0&&(N.reference!=="suffix"&&K.push("//"),K.push(Ce),F.path&&F.path.charAt(0)!=="/"&&K.push("/")),F.path!==void 0){var Le=F.path;!N.absolutePath&&(!te||!te.absolutePath)&&(Le=Cr(Le)),Ce===void 0&&(Le=Le.replace(/^\/\//,"/%2F")),K.push(Le)}return F.query!==void 0&&(K.push("?"),K.push(F.query)),F.fragment!==void 0&&(K.push("#"),K.push(F.fragment)),K.join("")}function et(F,N){var W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},K=arguments[3],te={};return K||(F=$t(bt(F,W),W),N=$t(bt(N,W),W)),W=W||{},!W.tolerant&&N.scheme?(te.scheme=N.scheme,te.userinfo=N.userinfo,te.host=N.host,te.port=N.port,te.path=Cr(N.path||""),te.query=N.query):(N.userinfo!==void 0||N.host!==void 0||N.port!==void 0?(te.userinfo=N.userinfo,te.host=N.host,te.port=N.port,te.path=Cr(N.path||""),te.query=N.query):(N.path?(N.path.charAt(0)==="/"?te.path=Cr(N.path):((F.userinfo!==void 0||F.host!==void 0||F.port!==void 0)&&!F.path?te.path="/"+N.path:F.path?te.path=F.path.slice(0,F.path.lastIndexOf("/")+1)+N.path:te.path=N.path,te.path=Cr(te.path)),te.query=N.query):(te.path=F.path,N.query!==void 0?te.query=N.query:te.query=F.query),te.userinfo=F.userinfo,te.host=F.host,te.port=F.port),te.scheme=F.scheme),te.fragment=N.fragment,te}function rs(F,N,W){var K=o({scheme:"null"},W);return bt(et($t(F,K),$t(N,K),K,!0),K)}function wl(F,N){return typeof F=="string"?F=bt($t(F,N),N):n(F)==="object"&&(F=$t(bt(F,N),N)),F}function Nu(F,N,W){return typeof F=="string"?F=bt($t(F,W),W):n(F)==="object"&&(F=bt(F,W)),typeof N=="string"?N=bt($t(N,W),W):n(N)==="object"&&(N=bt(N,W)),F===N}function ju(F,N){return F&&F.toString().replace(!N||!N.iri?l.ESCAPE:c.ESCAPE,oe)}function Dn(F,N){return F&&F.toString().replace(!N||!N.iri?l.PCT_ENCODED:c.PCT_ENCODED,ke)}var xs={scheme:"http",domainHost:!0,parse:function(N,W){return N.host||(N.error=N.error||"HTTP URIs must have a host."),N},serialize:function(N,W){var K=String(N.scheme).toLowerCase()==="https";return(N.port===(K?443:80)||N.port==="")&&(N.port=void 0),N.path||(N.path="/"),N}},kl={scheme:"https",domainHost:xs.domainHost,parse:xs.parse,serialize:xs.serialize};function Oo(F){return typeof F.secure=="boolean"?F.secure:String(F.scheme).toLowerCase()==="wss"}var vo={scheme:"ws",domainHost:!0,parse:function(N,W){var K=N;return K.secure=Oo(K),K.resourceName=(K.path||"/")+(K.query?"?"+K.query:""),K.path=void 0,K.query=void 0,K},serialize:function(N,W){if((N.port===(Oo(N)?443:80)||N.port==="")&&(N.port=void 0),typeof N.secure=="boolean"&&(N.scheme=N.secure?"wss":"ws",N.secure=void 0),N.resourceName){var K=N.resourceName.split("?"),te=u(K,2),Ce=te[0],Le=te[1];N.path=Ce&&Ce!=="/"?Ce:void 0,N.query=Le,N.resourceName=void 0}return N.fragment=void 0,N}},Zu={scheme:"wss",domainHost:vo.domainHost,parse:vo.parse,serialize:vo.serialize},ca={},Yn=!0,Er="[A-Za-z0-9\\-\\.\\_\\~"+(Yn?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",rn="[0-9A-Fa-f]",yo=t(t("%[EFef]"+rn+"%"+rn+rn+"%"+rn+rn)+"|"+t("%[89A-Fa-f]"+rn+"%"+rn+rn)+"|"+t("%"+rn+rn)),bo="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",zu="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Sl=e(zu,'[\\"\\\\]'),Sp="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",xp=new RegExp(Er,"g"),Ps=new RegExp(yo,"g"),Pp=new RegExp(e("[^]",bo,"[\\.]",'[\\"]',Sl),"g"),ua=new RegExp(e("[^]",Er,Sp),"g"),Cp=ua;function xl(F){var N=ke(F);return N.match(xp)?N:F}var _o={scheme:"mailto",parse:function(N,W){var K=N,te=K.to=K.path?K.path.split(","):[];if(K.path=void 0,K.query){for(var Ce=!1,Le={},st=K.query.split("&"),Ot=0,Yt=st.length;Ot{"use strict";Object.defineProperty(bv,"__esModule",{value:!0});var SC=kC();SC.code='require("ajv/dist/runtime/uri").default';bv.default=SC});var RC=Qe(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.CodeGen=Qi.Name=Qi.nil=Qi.stringify=Qi.str=Qi._=Qi.KeywordCxt=void 0;var oz=yu();Object.defineProperty(Qi,"KeywordCxt",{enumerable:!0,get:function(){return oz.KeywordCxt}});var gl=Je();Object.defineProperty(Qi,"_",{enumerable:!0,get:function(){return gl._}});Object.defineProperty(Qi,"str",{enumerable:!0,get:function(){return gl.str}});Object.defineProperty(Qi,"stringify",{enumerable:!0,get:function(){return gl.stringify}});Object.defineProperty(Qi,"nil",{enumerable:!0,get:function(){return gl.nil}});Object.defineProperty(Qi,"Name",{enumerable:!0,get:function(){return gl.Name}});Object.defineProperty(Qi,"CodeGen",{enumerable:!0,get:function(){return gl.CodeGen}});var az=Kh(),AC=Jh(),lz=ev(),bu=tp(),cz=Je(),_u=gu(),np=mu(),wv=mt(),PC=_C(),uz=xC(),DC=(i,e)=>new RegExp(i,e);DC.code="new RegExp";var fz=["removeAdditional","useDefaults","coerceTypes"],dz=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),hz={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},pz={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},CC=200;function mz(i){var e,t,n,r,s,o,a,l,c,u,f,d,h,p,m,g,O,w,S,C,k,_,P,x,R;let Z=i.strict,Q=(e=i.code)===null||e===void 0?void 0:e.optimize,D=Q===!0||Q===void 0?1:Q||0,E=(n=(t=i.code)===null||t===void 0?void 0:t.regExp)!==null&&n!==void 0?n:DC,j=(r=i.uriResolver)!==null&&r!==void 0?r:uz.default;return{strictSchema:(o=(s=i.strictSchema)!==null&&s!==void 0?s:Z)!==null&&o!==void 0?o:!0,strictNumbers:(l=(a=i.strictNumbers)!==null&&a!==void 0?a:Z)!==null&&l!==void 0?l:!0,strictTypes:(u=(c=i.strictTypes)!==null&&c!==void 0?c:Z)!==null&&u!==void 0?u:"log",strictTuples:(d=(f=i.strictTuples)!==null&&f!==void 0?f:Z)!==null&&d!==void 0?d:"log",strictRequired:(p=(h=i.strictRequired)!==null&&h!==void 0?h:Z)!==null&&p!==void 0?p:!1,code:i.code?{...i.code,optimize:D,regExp:E}:{optimize:D,regExp:E},loopRequired:(m=i.loopRequired)!==null&&m!==void 0?m:CC,loopEnum:(g=i.loopEnum)!==null&&g!==void 0?g:CC,meta:(O=i.meta)!==null&&O!==void 0?O:!0,messages:(w=i.messages)!==null&&w!==void 0?w:!0,inlineRefs:(S=i.inlineRefs)!==null&&S!==void 0?S:!0,schemaId:(C=i.schemaId)!==null&&C!==void 0?C:"$id",addUsedSchema:(k=i.addUsedSchema)!==null&&k!==void 0?k:!0,validateSchema:(_=i.validateSchema)!==null&&_!==void 0?_:!0,validateFormats:(P=i.validateFormats)!==null&&P!==void 0?P:!0,unicodeRegExp:(x=i.unicodeRegExp)!==null&&x!==void 0?x:!0,int32range:(R=i.int32range)!==null&&R!==void 0?R:!0,uriResolver:j}}var wu=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...mz(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new cz.ValueScope({scope:{},prefixes:dz,es5:t,lines:n}),this.logger=_z(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,lz.getRules)(),EC.call(this,hz,e,"NOT SUPPORTED"),EC.call(this,pz,e,"DEPRECATED","warn"),this._metaOpts=yz.call(this),e.formats&&Oz.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&vz.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),gz.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=PC;n==="id"&&(r={...PC},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return"$async"in n||(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(u,f){await s.call(this,u.$schema);let d=this._addSchema(u,f);return d.validate||o.call(this,d)}async function s(u){u&&!this.getSchema(u)&&await r.call(this,{$ref:u},!0)}async function o(u){try{return this._compileSchemaEnv(u)}catch(f){if(!(f instanceof AC.default))throw f;return a.call(this,f),await l.call(this,f.missingSchema),o.call(this,u)}}function a({missingSchema:u,missingRef:f}){if(this.refs[u])throw new Error(`AnySchema ${u} is loaded but ${f} cannot be resolved`)}async function l(u){let f=await c.call(this,u);this.refs[u]||await s.call(this,f.$schema),this.refs[u]||this.addSchema(f,u,t)}async function c(u){let f=this._loading[u];if(f)return f;try{return await(this._loading[u]=n(u))}finally{delete this._loading[u]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(let o of e)this.addSchema(o,void 0,n,r);return this}let s;if(typeof e=="object"){let{schemaId:o}=this.opts;if(s=e[o],s!==void 0&&typeof s!="string")throw new Error(`schema ${o} must be string`)}return t=(0,_u.normalizeId)(t||s),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return r}getSchema(e){let t;for(;typeof(t=TC.call(this,e))=="string";)e=t;if(t===void 0){let{schemaId:n}=this.opts,r=new bu.SchemaEnv({schema:{},schemaId:n});if(t=bu.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=TC.call(this,e);return typeof t=="object"&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,_u.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e=="string")n=e,typeof t=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else if(typeof e=="object"&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(kz.call(this,n,t),!t)return(0,wv.eachItem)(n,s=>_v.call(this,s)),this;xz.call(this,t);let r={...t,type:(0,np.getJSONTypes)(t.type),schemaType:(0,np.getJSONTypes)(t.schemaType)};return(0,wv.eachItem)(n,r.type.length===0?s=>_v.call(this,s,r):s=>r.type.forEach(o=>_v.call(this,s,r,o))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let r=n.rules.findIndex(s=>s.keyword===e);r>=0&&n.rules.splice(r,1)}return this}addFormat(e,t){return typeof t=="string"&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(r=>`${n}${r.instancePath} ${r.message}`).reduce((r,s)=>r+t+s)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let r of t){let s=r.split("/").slice(1),o=e;for(let a of s)o=o[a];for(let a in n){let l=n[a];if(typeof l!="object")continue;let{$data:c}=l.definition,u=o[a];c&&u&&(o[a]=QC(u))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&(typeof r=="string"?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,s=this.opts.addUsedSchema){let o,{schemaId:a}=this.opts;if(typeof e=="object")o=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let l=this._cache.get(e);if(l!==void 0)return l;n=(0,_u.normalizeId)(o||n);let c=_u.getSchemaRefs.call(this,e,n);return l=new bu.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:n,localRefs:c}),this._cache.set(l.schema,l),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=l),r&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):bu.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{bu.compileSchema.call(this,e)}finally{this.opts=t}}};Qi.default=wu;wu.ValidationError=az.default;wu.MissingRefError=AC.default;function EC(i,e,t,n="error"){for(let r in i){let s=r;s in e&&this.logger[n](`${t}: option ${r}. ${i[s]}`)}}function TC(i){return i=(0,_u.normalizeId)(i),this.schemas[i]||this.refs[i]}function gz(){let i=this.opts.schemas;if(i)if(Array.isArray(i))this.addSchema(i);else for(let e in i)this.addSchema(i[e],e)}function Oz(){for(let i in this.opts.formats){let e=this.opts.formats[i];e&&this.addFormat(i,e)}}function vz(i){if(Array.isArray(i)){this.addVocabulary(i);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in i){let t=i[e];t.keyword||(t.keyword=e),this.addKeyword(t)}}function yz(){let i={...this.opts};for(let e of fz)delete i[e];return i}var bz={log(){},warn(){},error(){}};function _z(i){if(i===!1)return bz;if(i===void 0)return console;if(i.log&&i.warn&&i.error)return i;throw new Error("logger must implement log, warn and error methods")}var wz=/^[a-z_$][a-z0-9_$:-]*$/i;function kz(i,e){let{RULES:t}=this;if((0,wv.eachItem)(i,n=>{if(t.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!wz.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function _v(i,e,t){var n;let r=e?.post;if(t&&r)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,o=r?s.post:s.rules.find(({type:l})=>l===t);if(o||(o={type:t,rules:[]},s.rules.push(o)),s.keywords[i]=!0,!e)return;let a={keyword:i,definition:{...e,type:(0,np.getJSONTypes)(e.type),schemaType:(0,np.getJSONTypes)(e.schemaType)}};e.before?Sz.call(this,o,a,e.before):o.rules.push(a),s.all[i]=a,(n=e.implements)===null||n===void 0||n.forEach(l=>this.addKeyword(l))}function Sz(i,e,t){let n=i.rules.findIndex(r=>r.keyword===t);n>=0?i.rules.splice(n,0,e):(i.rules.push(e),this.logger.warn(`rule ${t} is not defined`))}function xz(i){let{metaSchema:e}=i;e!==void 0&&(i.$data&&this.opts.$data&&(e=QC(e)),i.validateSchema=this.compile(e,!0))}var Pz={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function QC(i){return{anyOf:[i,Pz]}}});var MC=Qe(kv=>{"use strict";Object.defineProperty(kv,"__esModule",{value:!0});var Cz={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};kv.default=Cz});var ZC=Qe(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.callRef=oa.getValidate=void 0;var Ez=Jh(),IC=Wn(),yn=Je(),Ol=ks(),NC=tp(),rp=mt(),Tz={keyword:"$ref",schemaType:"string",code(i){let{gen:e,schema:t,it:n}=i,{baseId:r,schemaEnv:s,validateName:o,opts:a,self:l}=n,{root:c}=s;if((t==="#"||t==="#/")&&r===c.baseId)return f();let u=NC.resolveRef.call(l,c,r,t);if(u===void 0)throw new Ez.default(n.opts.uriResolver,r,t);if(u instanceof NC.SchemaEnv)return d(u);return h(u);function f(){if(s===c)return sp(i,o,s,s.$async);let p=e.scopeValue("root",{ref:c});return sp(i,(0,yn._)`${p}.validate`,c,c.$async)}function d(p){let m=jC(i,p);sp(i,m,p,p.$async)}function h(p){let m=e.scopeValue("schema",a.code.source===!0?{ref:p,code:(0,yn.stringify)(p)}:{ref:p}),g=e.name("valid"),O=i.subschema({schema:p,dataTypes:[],schemaPath:yn.nil,topSchemaRef:m,errSchemaPath:t},g);i.mergeEvaluated(O),i.ok(g)}}};function jC(i,e){let{gen:t}=i;return e.validate?t.scopeValue("validate",{ref:e.validate}):(0,yn._)`${t.scopeValue("wrapper",{ref:e})}.validate`}oa.getValidate=jC;function sp(i,e,t,n){let{gen:r,it:s}=i,{allErrors:o,schemaEnv:a,opts:l}=s,c=l.passContext?Ol.default.this:yn.nil;n?u():f();function u(){if(!a.$async)throw new Error("async schema referenced by sync schema");let p=r.let("valid");r.try(()=>{r.code((0,yn._)`await ${(0,IC.callValidateCode)(i,e,c)}`),h(e),o||r.assign(p,!0)},m=>{r.if((0,yn._)`!(${m} instanceof ${s.ValidationError})`,()=>r.throw(m)),d(m),o||r.assign(p,!1)}),i.ok(p)}function f(){i.result((0,IC.callValidateCode)(i,e,c),()=>h(e),()=>d(e))}function d(p){let m=(0,yn._)`${p}.errors`;r.assign(Ol.default.vErrors,(0,yn._)`${Ol.default.vErrors} === null ? ${m} : ${Ol.default.vErrors}.concat(${m})`),r.assign(Ol.default.errors,(0,yn._)`${Ol.default.vErrors}.length`)}function h(p){var m;if(!s.opts.unevaluated)return;let g=(m=t?.validate)===null||m===void 0?void 0:m.evaluated;if(s.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(s.props=rp.mergeEvaluated.props(r,g.props,s.props));else{let O=r.var("props",(0,yn._)`${p}.evaluated.props`);s.props=rp.mergeEvaluated.props(r,O,s.props,yn.Name)}if(s.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(s.items=rp.mergeEvaluated.items(r,g.items,s.items));else{let O=r.var("items",(0,yn._)`${p}.evaluated.items`);s.items=rp.mergeEvaluated.items(r,O,s.items,yn.Name)}}}oa.callRef=sp;oa.default=Tz});var zC=Qe(Sv=>{"use strict";Object.defineProperty(Sv,"__esModule",{value:!0});var Az=MC(),Dz=ZC(),Qz=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Az.default,Dz.default];Sv.default=Qz});var qC=Qe(xv=>{"use strict";Object.defineProperty(xv,"__esModule",{value:!0});var op=Je(),ho=op.operators,ap={maximum:{okStr:"<=",ok:ho.LTE,fail:ho.GT},minimum:{okStr:">=",ok:ho.GTE,fail:ho.LT},exclusiveMaximum:{okStr:"<",ok:ho.LT,fail:ho.GTE},exclusiveMinimum:{okStr:">",ok:ho.GT,fail:ho.LTE}},Rz={message:({keyword:i,schemaCode:e})=>(0,op.str)`must be ${ap[i].okStr} ${e}`,params:({keyword:i,schemaCode:e})=>(0,op._)`{comparison: ${ap[i].okStr}, limit: ${e}}`},Mz={keyword:Object.keys(ap),type:"number",schemaType:"number",$data:!0,error:Rz,code(i){let{keyword:e,data:t,schemaCode:n}=i;i.fail$data((0,op._)`${t} ${ap[e].fail} ${n} || isNaN(${t})`)}};xv.default=Mz});var LC=Qe(Pv=>{"use strict";Object.defineProperty(Pv,"__esModule",{value:!0});var ku=Je(),Iz={message:({schemaCode:i})=>(0,ku.str)`must be multiple of ${i}`,params:({schemaCode:i})=>(0,ku._)`{multipleOf: ${i}}`},Nz={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Iz,code(i){let{gen:e,data:t,schemaCode:n,it:r}=i,s=r.opts.multipleOfPrecision,o=e.let("res"),a=s?(0,ku._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${s}`:(0,ku._)`${o} !== parseInt(${o})`;i.fail$data((0,ku._)`(${n} === 0 || (${o} = ${t}/${n}, ${a}))`)}};Pv.default=Nz});var FC=Qe(Cv=>{"use strict";Object.defineProperty(Cv,"__esModule",{value:!0});function $C(i){let e=i.length,t=0,n=0,r;for(;n=55296&&r<=56319&&n{"use strict";Object.defineProperty(Ev,"__esModule",{value:!0});var aa=Je(),jz=mt(),Zz=FC(),zz={message({keyword:i,schemaCode:e}){let t=i==="maxLength"?"more":"fewer";return(0,aa.str)`must NOT have ${t} than ${e} characters`},params:({schemaCode:i})=>(0,aa._)`{limit: ${i}}`},qz={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:zz,code(i){let{keyword:e,data:t,schemaCode:n,it:r}=i,s=e==="maxLength"?aa.operators.GT:aa.operators.LT,o=r.opts.unicode===!1?(0,aa._)`${t}.length`:(0,aa._)`${(0,jz.useFunc)(i.gen,Zz.default)}(${t})`;i.fail$data((0,aa._)`${o} ${s} ${n}`)}};Ev.default=qz});var VC=Qe(Tv=>{"use strict";Object.defineProperty(Tv,"__esModule",{value:!0});var Lz=Wn(),lp=Je(),$z={message:({schemaCode:i})=>(0,lp.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,lp._)`{pattern: ${i}}`},Fz={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:$z,code(i){let{data:e,$data:t,schema:n,schemaCode:r,it:s}=i,o=s.opts.unicodeRegExp?"u":"",a=t?(0,lp._)`(new RegExp(${r}, ${o}))`:(0,Lz.usePattern)(i,n);i.fail$data((0,lp._)`!${a}.test(${e})`)}};Tv.default=Fz});var WC=Qe(Av=>{"use strict";Object.defineProperty(Av,"__esModule",{value:!0});var Su=Je(),Bz={message({keyword:i,schemaCode:e}){let t=i==="maxProperties"?"more":"fewer";return(0,Su.str)`must NOT have ${t} than ${e} properties`},params:({schemaCode:i})=>(0,Su._)`{limit: ${i}}`},Vz={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Bz,code(i){let{keyword:e,data:t,schemaCode:n}=i,r=e==="maxProperties"?Su.operators.GT:Su.operators.LT;i.fail$data((0,Su._)`Object.keys(${t}).length ${r} ${n}`)}};Av.default=Vz});var XC=Qe(Dv=>{"use strict";Object.defineProperty(Dv,"__esModule",{value:!0});var xu=Wn(),Pu=Je(),Wz=mt(),Xz={message:({params:{missingProperty:i}})=>(0,Pu.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,Pu._)`{missingProperty: ${i}}`},Uz={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Xz,code(i){let{gen:e,schema:t,schemaCode:n,data:r,$data:s,it:o}=i,{opts:a}=o;if(!s&&t.length===0)return;let l=t.length>=a.loopRequired;if(o.allErrors?c():u(),a.strictRequired){let h=i.parentSchema.properties,{definedProperties:p}=i.it;for(let m of t)if(h?.[m]===void 0&&!p.has(m)){let g=o.schemaEnv.baseId+o.errSchemaPath,O=`required property "${m}" is not defined at "${g}" (strictRequired)`;(0,Wz.checkStrictMode)(o,O,o.opts.strictRequired)}}function c(){if(l||s)i.block$data(Pu.nil,f);else for(let h of t)(0,xu.checkReportMissingProp)(i,h)}function u(){let h=e.let("missing");if(l||s){let p=e.let("valid",!0);i.block$data(p,()=>d(h,p)),i.ok(p)}else e.if((0,xu.checkMissingProp)(i,t,h)),(0,xu.reportMissingProp)(i,h),e.else()}function f(){e.forOf("prop",n,h=>{i.setParams({missingProperty:h}),e.if((0,xu.noPropertyInData)(e,r,h,a.ownProperties),()=>i.error())})}function d(h,p){i.setParams({missingProperty:h}),e.forOf(h,n,()=>{e.assign(p,(0,xu.propertyInData)(e,r,h,a.ownProperties)),e.if((0,Pu.not)(p),()=>{i.error(),e.break()})},Pu.nil)}}};Dv.default=Uz});var UC=Qe(Qv=>{"use strict";Object.defineProperty(Qv,"__esModule",{value:!0});var Cu=Je(),Yz={message({keyword:i,schemaCode:e}){let t=i==="maxItems"?"more":"fewer";return(0,Cu.str)`must NOT have ${t} than ${e} items`},params:({schemaCode:i})=>(0,Cu._)`{limit: ${i}}`},Hz={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Yz,code(i){let{keyword:e,data:t,schemaCode:n}=i,r=e==="maxItems"?Cu.operators.GT:Cu.operators.LT;i.fail$data((0,Cu._)`${t}.length ${r} ${n}`)}};Qv.default=Hz});var cp=Qe(Rv=>{"use strict";Object.defineProperty(Rv,"__esModule",{value:!0});var YC=lv();YC.code='require("ajv/dist/runtime/equal").default';Rv.default=YC});var HC=Qe(Iv=>{"use strict";Object.defineProperty(Iv,"__esModule",{value:!0});var Mv=mu(),Ri=Je(),Gz=mt(),Kz=cp(),Jz={message:({params:{i,j:e}})=>(0,Ri.str)`must NOT have duplicate items (items ## ${e} and ${i} are identical)`,params:({params:{i,j:e}})=>(0,Ri._)`{i: ${i}, j: ${e}}`},eq={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Jz,code(i){let{gen:e,data:t,$data:n,schema:r,parentSchema:s,schemaCode:o,it:a}=i;if(!n&&!r)return;let l=e.let("valid"),c=s.items?(0,Mv.getSchemaTypes)(s.items):[];i.block$data(l,u,(0,Ri._)`${o} === false`),i.ok(l);function u(){let p=e.let("i",(0,Ri._)`${t}.length`),m=e.let("j");i.setParams({i:p,j:m}),e.assign(l,!0),e.if((0,Ri._)`${p} > 1`,()=>(f()?d:h)(p,m))}function f(){return c.length>0&&!c.some(p=>p==="object"||p==="array")}function d(p,m){let g=e.name("item"),O=(0,Mv.checkDataTypes)(c,g,a.opts.strictNumbers,Mv.DataType.Wrong),w=e.const("indices",(0,Ri._)`{}`);e.for((0,Ri._)`;${p}--;`,()=>{e.let(g,(0,Ri._)`${t}[${p}]`),e.if(O,(0,Ri._)`continue`),c.length>1&&e.if((0,Ri._)`typeof ${g} == "string"`,(0,Ri._)`${g} += "_"`),e.if((0,Ri._)`typeof ${w}[${g}] == "number"`,()=>{e.assign(m,(0,Ri._)`${w}[${g}]`),i.error(),e.assign(l,!1).break()}).code((0,Ri._)`${w}[${g}] = ${p}`)})}function h(p,m){let g=(0,Gz.useFunc)(e,Kz.default),O=e.name("outer");e.label(O).for((0,Ri._)`;${p}--;`,()=>e.for((0,Ri._)`${m} = ${p}; ${m}--;`,()=>e.if((0,Ri._)`${g}(${t}[${p}], ${t}[${m}])`,()=>{i.error(),e.assign(l,!1).break(O)})))}}};Iv.default=eq});var GC=Qe(jv=>{"use strict";Object.defineProperty(jv,"__esModule",{value:!0});var Nv=Je(),tq=mt(),iq=cp(),nq={message:"must be equal to constant",params:({schemaCode:i})=>(0,Nv._)`{allowedValue: ${i}}`},rq={keyword:"const",$data:!0,error:nq,code(i){let{gen:e,data:t,$data:n,schemaCode:r,schema:s}=i;n||s&&typeof s=="object"?i.fail$data((0,Nv._)`!${(0,tq.useFunc)(e,iq.default)}(${t}, ${r})`):i.fail((0,Nv._)`${s} !== ${t}`)}};jv.default=rq});var KC=Qe(Zv=>{"use strict";Object.defineProperty(Zv,"__esModule",{value:!0});var Eu=Je(),sq=mt(),oq=cp(),aq={message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,Eu._)`{allowedValues: ${i}}`},lq={keyword:"enum",schemaType:"array",$data:!0,error:aq,code(i){let{gen:e,data:t,$data:n,schema:r,schemaCode:s,it:o}=i;if(!n&&r.length===0)throw new Error("enum must have non-empty array");let a=r.length>=o.opts.loopEnum,l,c=()=>l??(l=(0,sq.useFunc)(e,oq.default)),u;if(a||n)u=e.let("valid"),i.block$data(u,f);else{if(!Array.isArray(r))throw new Error("ajv implementation error");let h=e.const("vSchema",s);u=(0,Eu.or)(...r.map((p,m)=>d(h,m)))}i.pass(u);function f(){e.assign(u,!1),e.forOf("v",s,h=>e.if((0,Eu._)`${c()}(${t}, ${h})`,()=>e.assign(u,!0).break()))}function d(h,p){let m=r[p];return typeof m=="object"&&m!==null?(0,Eu._)`${c()}(${t}, ${h}[${p}])`:(0,Eu._)`${t} === ${m}`}}};Zv.default=lq});var JC=Qe(zv=>{"use strict";Object.defineProperty(zv,"__esModule",{value:!0});var cq=qC(),uq=LC(),fq=BC(),dq=VC(),hq=WC(),pq=XC(),mq=UC(),gq=HC(),Oq=GC(),vq=KC(),yq=[cq.default,uq.default,fq.default,dq.default,hq.default,pq.default,mq.default,gq.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Oq.default,vq.default];zv.default=yq});var Lv=Qe(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.validateAdditionalItems=void 0;var la=Je(),qv=mt(),bq={message:({params:{len:i}})=>(0,la.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,la._)`{limit: ${i}}`},_q={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:bq,code(i){let{parentSchema:e,it:t}=i,{items:n}=e;if(!Array.isArray(n)){(0,qv.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas');return}e3(i,n)}};function e3(i,e){let{gen:t,schema:n,data:r,keyword:s,it:o}=i;o.items=!0;let a=t.const("len",(0,la._)`${r}.length`);if(n===!1)i.setParams({len:e.length}),i.pass((0,la._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,qv.alwaysValidSchema)(o,n)){let c=t.var("valid",(0,la._)`${a} <= ${e.length}`);t.if((0,la.not)(c),()=>l(c)),i.ok(c)}function l(c){t.forRange("i",e.length,a,u=>{i.subschema({keyword:s,dataProp:u,dataPropType:qv.Type.Num},c),o.allErrors||t.if((0,la.not)(c),()=>t.break())})}}Tu.validateAdditionalItems=e3;Tu.default=_q});var $v=Qe(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.validateTuple=void 0;var t3=Je(),up=mt(),wq=Wn(),kq={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){let{schema:e,it:t}=i;if(Array.isArray(e))return i3(i,"additionalItems",e);t.items=!0,!(0,up.alwaysValidSchema)(t,e)&&i.ok((0,wq.validateArray)(i))}};function i3(i,e,t=i.schema){let{gen:n,parentSchema:r,data:s,keyword:o,it:a}=i;u(r),a.opts.unevaluated&&t.length&&a.items!==!0&&(a.items=up.mergeEvaluated.items(n,t.length,a.items));let l=n.name("valid"),c=n.const("len",(0,t3._)`${s}.length`);t.forEach((f,d)=>{(0,up.alwaysValidSchema)(a,f)||(n.if((0,t3._)`${c} > ${d}`,()=>i.subschema({keyword:o,schemaProp:d,dataProp:d},l)),i.ok(l))});function u(f){let{opts:d,errSchemaPath:h}=a,p=t.length,m=p===f.minItems&&(p===f.maxItems||f[e]===!1);if(d.strictTuples&&!m){let g=`"${o}" is ${p}-tuple, but minItems or maxItems/${e} are not specified or different at path "${h}"`;(0,up.checkStrictMode)(a,g,d.strictTuples)}}}Au.validateTuple=i3;Au.default=kq});var n3=Qe(Fv=>{"use strict";Object.defineProperty(Fv,"__esModule",{value:!0});var Sq=$v(),xq={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:i=>(0,Sq.validateTuple)(i,"items")};Fv.default=xq});var s3=Qe(Bv=>{"use strict";Object.defineProperty(Bv,"__esModule",{value:!0});var r3=Je(),Pq=mt(),Cq=Wn(),Eq=Lv(),Tq={message:({params:{len:i}})=>(0,r3.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,r3._)`{limit: ${i}}`},Aq={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Tq,code(i){let{schema:e,parentSchema:t,it:n}=i,{prefixItems:r}=t;n.items=!0,!(0,Pq.alwaysValidSchema)(n,e)&&(r?(0,Eq.validateAdditionalItems)(i,r):i.ok((0,Cq.validateArray)(i)))}};Bv.default=Aq});var o3=Qe(Vv=>{"use strict";Object.defineProperty(Vv,"__esModule",{value:!0});var Un=Je(),fp=mt(),Dq={message:({params:{min:i,max:e}})=>e===void 0?(0,Un.str)`must contain at least ${i} valid item(s)`:(0,Un.str)`must contain at least ${i} and no more than ${e} valid item(s)`,params:({params:{min:i,max:e}})=>e===void 0?(0,Un._)`{minContains: ${i}}`:(0,Un._)`{minContains: ${i}, maxContains: ${e}}`},Qq={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Dq,code(i){let{gen:e,schema:t,parentSchema:n,data:r,it:s}=i,o,a,{minContains:l,maxContains:c}=n;s.opts.next?(o=l===void 0?1:l,a=c):o=1;let u=e.const("len",(0,Un._)`${r}.length`);if(i.setParams({min:o,max:a}),a===void 0&&o===0){(0,fp.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&o>a){(0,fp.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,fp.alwaysValidSchema)(s,t)){let m=(0,Un._)`${u} >= ${o}`;a!==void 0&&(m=(0,Un._)`${m} && ${u} <= ${a}`),i.pass(m);return}s.items=!0;let f=e.name("valid");a===void 0&&o===1?h(f,()=>e.if(f,()=>e.break())):o===0?(e.let(f,!0),a!==void 0&&e.if((0,Un._)`${r}.length > 0`,d)):(e.let(f,!1),d()),i.result(f,()=>i.reset());function d(){let m=e.name("_valid"),g=e.let("count",0);h(m,()=>e.if(m,()=>p(g)))}function h(m,g){e.forRange("i",0,u,O=>{i.subschema({keyword:"contains",dataProp:O,dataPropType:fp.Type.Num,compositeRule:!0},m),g()})}function p(m){e.code((0,Un._)`${m}++`),a===void 0?e.if((0,Un._)`${m} >= ${o}`,()=>e.assign(f,!0).break()):(e.if((0,Un._)`${m} > ${a}`,()=>e.assign(f,!1).break()),o===1?e.assign(f,!0):e.if((0,Un._)`${m} >= ${o}`,()=>e.assign(f,!0)))}}};Vv.default=Qq});var c3=Qe(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});is.validateSchemaDeps=is.validatePropertyDeps=is.error=void 0;var Wv=Je(),Rq=mt(),Du=Wn();is.error={message:({params:{property:i,depsCount:e,deps:t}})=>{let n=e===1?"property":"properties";return(0,Wv.str)`must have ${n} ${t} when property ${i} is present`},params:({params:{property:i,depsCount:e,deps:t,missingProperty:n}})=>(0,Wv._)`{property: ${i}, + missingProperty: ${n}, + depsCount: ${e}, + deps: ${t}}`};var Mq={keyword:"dependencies",type:"object",schemaType:"object",error:is.error,code(i){let[e,t]=Iq(i);a3(i,e),l3(i,t)}};function Iq({schema:i}){let e={},t={};for(let n in i){if(n==="__proto__")continue;let r=Array.isArray(i[n])?e:t;r[n]=i[n]}return[e,t]}function a3(i,e=i.schema){let{gen:t,data:n,it:r}=i;if(Object.keys(e).length===0)return;let s=t.let("missing");for(let o in e){let a=e[o];if(a.length===0)continue;let l=(0,Du.propertyInData)(t,n,o,r.opts.ownProperties);i.setParams({property:o,depsCount:a.length,deps:a.join(", ")}),r.allErrors?t.if(l,()=>{for(let c of a)(0,Du.checkReportMissingProp)(i,c)}):(t.if((0,Wv._)`${l} && (${(0,Du.checkMissingProp)(i,a,s)})`),(0,Du.reportMissingProp)(i,s),t.else())}}is.validatePropertyDeps=a3;function l3(i,e=i.schema){let{gen:t,data:n,keyword:r,it:s}=i,o=t.name("valid");for(let a in e)(0,Rq.alwaysValidSchema)(s,e[a])||(t.if((0,Du.propertyInData)(t,n,a,s.opts.ownProperties),()=>{let l=i.subschema({keyword:r,schemaProp:a},o);i.mergeValidEvaluated(l,o)},()=>t.var(o,!0)),i.ok(o))}is.validateSchemaDeps=l3;is.default=Mq});var f3=Qe(Xv=>{"use strict";Object.defineProperty(Xv,"__esModule",{value:!0});var u3=Je(),Nq=mt(),jq={message:"property name must be valid",params:({params:i})=>(0,u3._)`{propertyName: ${i.propertyName}}`},Zq={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:jq,code(i){let{gen:e,schema:t,data:n,it:r}=i;if((0,Nq.alwaysValidSchema)(r,t))return;let s=e.name("valid");e.forIn("key",n,o=>{i.setParams({propertyName:o}),i.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},s),e.if((0,u3.not)(s),()=>{i.error(!0),r.allErrors||e.break()})}),i.ok(s)}};Xv.default=Zq});var Yv=Qe(Uv=>{"use strict";Object.defineProperty(Uv,"__esModule",{value:!0});var dp=Wn(),Sr=Je(),zq=ks(),hp=mt(),qq={message:"must NOT have additional properties",params:({params:i})=>(0,Sr._)`{additionalProperty: ${i.additionalProperty}}`},Lq={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:qq,code(i){let{gen:e,schema:t,parentSchema:n,data:r,errsCount:s,it:o}=i;if(!s)throw new Error("ajv implementation error");let{allErrors:a,opts:l}=o;if(o.props=!0,l.removeAdditional!=="all"&&(0,hp.alwaysValidSchema)(o,t))return;let c=(0,dp.allSchemaProperties)(n.properties),u=(0,dp.allSchemaProperties)(n.patternProperties);f(),i.ok((0,Sr._)`${s} === ${zq.default.errors}`);function f(){e.forIn("key",r,g=>{!c.length&&!u.length?p(g):e.if(d(g),()=>p(g))})}function d(g){let O;if(c.length>8){let w=(0,hp.schemaRefOrVal)(o,n.properties,"properties");O=(0,dp.isOwnProperty)(e,w,g)}else c.length?O=(0,Sr.or)(...c.map(w=>(0,Sr._)`${g} === ${w}`)):O=Sr.nil;return u.length&&(O=(0,Sr.or)(O,...u.map(w=>(0,Sr._)`${(0,dp.usePattern)(i,w)}.test(${g})`))),(0,Sr.not)(O)}function h(g){e.code((0,Sr._)`delete ${r}[${g}]`)}function p(g){if(l.removeAdditional==="all"||l.removeAdditional&&t===!1){h(g);return}if(t===!1){i.setParams({additionalProperty:g}),i.error(),a||e.break();return}if(typeof t=="object"&&!(0,hp.alwaysValidSchema)(o,t)){let O=e.name("valid");l.removeAdditional==="failing"?(m(g,O,!1),e.if((0,Sr.not)(O),()=>{i.reset(),h(g)})):(m(g,O),a||e.if((0,Sr.not)(O),()=>e.break()))}}function m(g,O,w){let S={keyword:"additionalProperties",dataProp:g,dataPropType:hp.Type.Str};w===!1&&Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1}),i.subschema(S,O)}}};Uv.default=Lq});var p3=Qe(Gv=>{"use strict";Object.defineProperty(Gv,"__esModule",{value:!0});var $q=yu(),d3=Wn(),Hv=mt(),h3=Yv(),Fq={keyword:"properties",type:"object",schemaType:"object",code(i){let{gen:e,schema:t,parentSchema:n,data:r,it:s}=i;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&h3.default.code(new $q.KeywordCxt(s,h3.default,"additionalProperties"));let o=(0,d3.allSchemaProperties)(t);for(let f of o)s.definedProperties.add(f);s.opts.unevaluated&&o.length&&s.props!==!0&&(s.props=Hv.mergeEvaluated.props(e,(0,Hv.toHash)(o),s.props));let a=o.filter(f=>!(0,Hv.alwaysValidSchema)(s,t[f]));if(a.length===0)return;let l=e.name("valid");for(let f of a)c(f)?u(f):(e.if((0,d3.propertyInData)(e,r,f,s.opts.ownProperties)),u(f),s.allErrors||e.else().var(l,!0),e.endIf()),i.it.definedProperties.add(f),i.ok(l);function c(f){return s.opts.useDefaults&&!s.compositeRule&&t[f].default!==void 0}function u(f){i.subschema({keyword:"properties",schemaProp:f,dataProp:f},l)}}};Gv.default=Fq});var v3=Qe(Kv=>{"use strict";Object.defineProperty(Kv,"__esModule",{value:!0});var m3=Wn(),pp=Je(),g3=mt(),O3=mt(),Bq={keyword:"patternProperties",type:"object",schemaType:"object",code(i){let{gen:e,schema:t,data:n,parentSchema:r,it:s}=i,{opts:o}=s,a=(0,m3.allSchemaProperties)(t),l=a.filter(m=>(0,g3.alwaysValidSchema)(s,t[m]));if(a.length===0||l.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;let c=o.strictSchema&&!o.allowMatchingProperties&&r.properties,u=e.name("valid");s.props!==!0&&!(s.props instanceof pp.Name)&&(s.props=(0,O3.evaluatedPropsToName)(e,s.props));let{props:f}=s;d();function d(){for(let m of a)c&&h(m),s.allErrors?p(m):(e.var(u,!0),p(m),e.if(u))}function h(m){for(let g in c)new RegExp(m).test(g)&&(0,g3.checkStrictMode)(s,`property ${g} matches pattern ${m} (use allowMatchingProperties)`)}function p(m){e.forIn("key",n,g=>{e.if((0,pp._)`${(0,m3.usePattern)(i,m)}.test(${g})`,()=>{let O=l.includes(m);O||i.subschema({keyword:"patternProperties",schemaProp:m,dataProp:g,dataPropType:O3.Type.Str},u),s.opts.unevaluated&&f!==!0?e.assign((0,pp._)`${f}[${g}]`,!0):!O&&!s.allErrors&&e.if((0,pp.not)(u),()=>e.break())})})}}};Kv.default=Bq});var y3=Qe(Jv=>{"use strict";Object.defineProperty(Jv,"__esModule",{value:!0});var Vq=mt(),Wq={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(i){let{gen:e,schema:t,it:n}=i;if((0,Vq.alwaysValidSchema)(n,t)){i.fail();return}let r=e.name("valid");i.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),i.failResult(r,()=>i.reset(),()=>i.error())},error:{message:"must NOT be valid"}};Jv.default=Wq});var b3=Qe(ey=>{"use strict";Object.defineProperty(ey,"__esModule",{value:!0});var Xq=Wn(),Uq={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Xq.validateUnion,error:{message:"must match a schema in anyOf"}};ey.default=Uq});var _3=Qe(ty=>{"use strict";Object.defineProperty(ty,"__esModule",{value:!0});var mp=Je(),Yq=mt(),Hq={message:"must match exactly one schema in oneOf",params:({params:i})=>(0,mp._)`{passingSchemas: ${i.passing}}`},Gq={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Hq,code(i){let{gen:e,schema:t,parentSchema:n,it:r}=i;if(!Array.isArray(t))throw new Error("ajv implementation error");if(r.opts.discriminator&&n.discriminator)return;let s=t,o=e.let("valid",!1),a=e.let("passing",null),l=e.name("_valid");i.setParams({passing:a}),e.block(c),i.result(o,()=>i.reset(),()=>i.error(!0));function c(){s.forEach((u,f)=>{let d;(0,Yq.alwaysValidSchema)(r,u)?e.var(l,!0):d=i.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},l),f>0&&e.if((0,mp._)`${l} && ${o}`).assign(o,!1).assign(a,(0,mp._)`[${a}, ${f}]`).else(),e.if(l,()=>{e.assign(o,!0),e.assign(a,f),d&&i.mergeEvaluated(d,mp.Name)})})}}};ty.default=Gq});var w3=Qe(iy=>{"use strict";Object.defineProperty(iy,"__esModule",{value:!0});var Kq=mt(),Jq={keyword:"allOf",schemaType:"array",code(i){let{gen:e,schema:t,it:n}=i;if(!Array.isArray(t))throw new Error("ajv implementation error");let r=e.name("valid");t.forEach((s,o)=>{if((0,Kq.alwaysValidSchema)(n,s))return;let a=i.subschema({keyword:"allOf",schemaProp:o},r);i.ok(r),i.mergeEvaluated(a)})}};iy.default=Jq});var x3=Qe(ny=>{"use strict";Object.defineProperty(ny,"__esModule",{value:!0});var gp=Je(),S3=mt(),eL={message:({params:i})=>(0,gp.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,gp._)`{failingKeyword: ${i.ifClause}}`},tL={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:eL,code(i){let{gen:e,parentSchema:t,it:n}=i;t.then===void 0&&t.else===void 0&&(0,S3.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let r=k3(n,"then"),s=k3(n,"else");if(!r&&!s)return;let o=e.let("valid",!0),a=e.name("_valid");if(l(),i.reset(),r&&s){let u=e.let("ifClause");i.setParams({ifClause:u}),e.if(a,c("then",u),c("else",u))}else r?e.if(a,c("then")):e.if((0,gp.not)(a),c("else"));i.pass(o,()=>i.error(!0));function l(){let u=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);i.mergeEvaluated(u)}function c(u,f){return()=>{let d=i.subschema({keyword:u},a);e.assign(o,a),i.mergeValidEvaluated(d,o),f?e.assign(f,(0,gp._)`${u}`):i.setParams({ifClause:u})}}}};function k3(i,e){let t=i.schema[e];return t!==void 0&&!(0,S3.alwaysValidSchema)(i,t)}ny.default=tL});var P3=Qe(ry=>{"use strict";Object.defineProperty(ry,"__esModule",{value:!0});var iL=mt(),nL={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:i,parentSchema:e,it:t}){e.if===void 0&&(0,iL.checkStrictMode)(t,`"${i}" without "if" is ignored`)}};ry.default=nL});var C3=Qe(sy=>{"use strict";Object.defineProperty(sy,"__esModule",{value:!0});var rL=Lv(),sL=n3(),oL=$v(),aL=s3(),lL=o3(),cL=c3(),uL=f3(),fL=Yv(),dL=p3(),hL=v3(),pL=y3(),mL=b3(),gL=_3(),OL=w3(),vL=x3(),yL=P3();function bL(i=!1){let e=[pL.default,mL.default,gL.default,OL.default,vL.default,yL.default,uL.default,fL.default,cL.default,dL.default,hL.default];return i?e.push(sL.default,aL.default):e.push(rL.default,oL.default),e.push(lL.default),e}sy.default=bL});var E3=Qe(oy=>{"use strict";Object.defineProperty(oy,"__esModule",{value:!0});var si=Je(),_L={message:({schemaCode:i})=>(0,si.str)`must match format "${i}"`,params:({schemaCode:i})=>(0,si._)`{format: ${i}}`},wL={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:_L,code(i,e){let{gen:t,data:n,$data:r,schema:s,schemaCode:o,it:a}=i,{opts:l,errSchemaPath:c,schemaEnv:u,self:f}=a;if(!l.validateFormats)return;r?d():h();function d(){let p=t.scopeValue("formats",{ref:f.formats,code:l.code.formats}),m=t.const("fDef",(0,si._)`${p}[${o}]`),g=t.let("fType"),O=t.let("format");t.if((0,si._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>t.assign(g,(0,si._)`${m}.type || "string"`).assign(O,(0,si._)`${m}.validate`),()=>t.assign(g,(0,si._)`"string"`).assign(O,m)),i.fail$data((0,si.or)(w(),S()));function w(){return l.strictSchema===!1?si.nil:(0,si._)`${o} && !${O}`}function S(){let C=u.$async?(0,si._)`(${m}.async ? await ${O}(${n}) : ${O}(${n}))`:(0,si._)`${O}(${n})`,k=(0,si._)`(typeof ${O} == "function" ? ${C} : ${O}.test(${n}))`;return(0,si._)`${O} && ${O} !== true && ${g} === ${e} && !${k}`}}function h(){let p=f.formats[s];if(!p){w();return}if(p===!0)return;let[m,g,O]=S(p);m===e&&i.pass(C());function w(){if(l.strictSchema===!1){f.logger.warn(k());return}throw new Error(k());function k(){return`unknown format "${s}" ignored in schema at path "${c}"`}}function S(k){let _=k instanceof RegExp?(0,si.regexpCode)(k):l.code.formats?(0,si._)`${l.code.formats}${(0,si.getProperty)(s)}`:void 0,P=t.scopeValue("formats",{key:s,ref:k,code:_});return typeof k=="object"&&!(k instanceof RegExp)?[k.type||"string",k.validate,(0,si._)`${P}.validate`]:["string",k,P]}function C(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!u.$async)throw new Error("async format in sync schema");return(0,si._)`await ${O}(${n})`}return typeof g=="function"?(0,si._)`${O}(${n})`:(0,si._)`${O}.test(${n})`}}}};oy.default=wL});var T3=Qe(ay=>{"use strict";Object.defineProperty(ay,"__esModule",{value:!0});var kL=E3(),SL=[kL.default];ay.default=SL});var A3=Qe(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});vl.contentVocabulary=vl.metadataVocabulary=void 0;vl.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];vl.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Q3=Qe(ly=>{"use strict";Object.defineProperty(ly,"__esModule",{value:!0});var xL=zC(),PL=JC(),CL=C3(),EL=T3(),D3=A3(),TL=[xL.default,PL.default,(0,CL.default)(),EL.default,D3.metadataVocabulary,D3.contentVocabulary];ly.default=TL});var R3=Qe(Qu=>{"use strict";Object.defineProperty(Qu,"__esModule",{value:!0});Qu.DiscrError=void 0;var AL;(function(i){i.Tag="tag",i.Mapping="mapping"})(AL=Qu.DiscrError||(Qu.DiscrError={}))});var I3=Qe(uy=>{"use strict";Object.defineProperty(uy,"__esModule",{value:!0});var yl=Je(),cy=R3(),M3=tp(),DL=mt(),QL={message:({params:{discrError:i,tagName:e}})=>i===cy.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:i,tag:e,tagName:t}})=>(0,yl._)`{error: ${i}, tag: ${t}, tagValue: ${e}}`},RL={keyword:"discriminator",type:"object",schemaType:"object",error:QL,code(i){let{gen:e,data:t,schema:n,parentSchema:r,it:s}=i,{oneOf:o}=r;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");let l=e.let("valid",!1),c=e.const("tag",(0,yl._)`${t}${(0,yl.getProperty)(a)}`);e.if((0,yl._)`typeof ${c} == "string"`,()=>u(),()=>i.error(!1,{discrError:cy.DiscrError.Tag,tag:c,tagName:a})),i.ok(l);function u(){let h=d();e.if(!1);for(let p in h)e.elseIf((0,yl._)`${c} === ${p}`),e.assign(l,f(h[p]));e.else(),i.error(!1,{discrError:cy.DiscrError.Mapping,tag:c,tagName:a}),e.endIf()}function f(h){let p=e.name("valid"),m=i.subschema({keyword:"oneOf",schemaProp:h},p);return i.mergeEvaluated(m,yl.Name),p}function d(){var h;let p={},m=O(r),g=!0;for(let C=0;C{ML.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var z3=Qe((Ut,Z3)=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.MissingRefError=Ut.ValidationError=Ut.CodeGen=Ut.Name=Ut.nil=Ut.stringify=Ut.str=Ut._=Ut.KeywordCxt=void 0;var IL=RC(),NL=Q3(),jL=I3(),j3=N3(),ZL=["/properties"],Op="http://json-schema.org/draft-07/schema",vp=class extends IL.default{_addVocabularies(){super._addVocabularies(),NL.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(jL.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(j3,ZL):j3;this.addMetaSchema(e,Op,!1),this.refs["http://json-schema.org/schema"]=Op}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Op)?Op:void 0)}};Z3.exports=Ut=vp;Object.defineProperty(Ut,"__esModule",{value:!0});Ut.default=vp;var zL=yu();Object.defineProperty(Ut,"KeywordCxt",{enumerable:!0,get:function(){return zL.KeywordCxt}});var bl=Je();Object.defineProperty(Ut,"_",{enumerable:!0,get:function(){return bl._}});Object.defineProperty(Ut,"str",{enumerable:!0,get:function(){return bl.str}});Object.defineProperty(Ut,"stringify",{enumerable:!0,get:function(){return bl.stringify}});Object.defineProperty(Ut,"nil",{enumerable:!0,get:function(){return bl.nil}});Object.defineProperty(Ut,"Name",{enumerable:!0,get:function(){return bl.Name}});Object.defineProperty(Ut,"CodeGen",{enumerable:!0,get:function(){return bl.CodeGen}});var qL=Kh();Object.defineProperty(Ut,"ValidationError",{enumerable:!0,get:function(){return qL.default}});var LL=Jh();Object.defineProperty(Ut,"MissingRefError",{enumerable:!0,get:function(){return LL.default}})});var M$={};z5(M$,{default:()=>kp});module.exports=q5(M$);var tn=require("obsidian");var Sy=require("obsidian");var ls=[{name:"Blinded",id:"Blinded",description:`A blinded creature can\u2019t see and automatically fails any ability check that requires sight. +Attack rolls against the creature have advantage, and the creature\u2019s Attack rolls have disadvantage.`},{name:"Charmed",id:"Charmed",description:`A charmed creature can\u2019t Attack the charmer or target the charmer with harmful Abilities or magical Effects. +The charmer has advantage on any ability check to interact socially with the creature.`},{name:"Concentrating",id:"Concentrating",description:`Some spells require you to maintain concentration in order to keep their magic active. If you lose concentration, such a spell ends. +A creature loses concentration when: it casts another spell that requires concentration, is incapacitated, or dies. +When a creature takes damage, it must make a constitution saving throw with a DC of 10 or half the damage it took, whichever is higher. On a failure, concentration is lost.`},{name:"Deafened",id:"Deafened",description:"A deafened creature can\u2019t hear and automatically fails any ability check that requires hearing."},{name:"Frightened",id:"Frightened",description:`A frightened creature has disadvantage on Ability Checks and Attack rolls while the source of its fear is within Line of Sight. +The creature can\u2019t willingly move closer to the source of its fear.`},{name:"Grappled",id:"Grappled",description:`A grappled creature\u2019s speed becomes 0, and it can\u2019t benefit from any bonus to its speed. +The condition ends if the Grappler is incapacitated. +The condition also ends if an Effect removes the grappled creature from the reach of the Grappler or Grappling Effect, such as when a creature is hurled away by the Thunderwave spell.`},{name:"Incapacitated",id:"Incapacitated",description:"An incapacitated creature can\u2019t take Actions or Reactions."},{name:"Invisible",id:"Invisible",description:`An invisible creature is impossible to see without the aid of magic or a Special sense. For the Purpose of Hiding, the creature is heavily obscured. The creature\u2019s Location can be detected by any noise it makes or any tracks it leaves. +Attack rolls against the creature have disadvantage, and the creature\u2019s Attack rolls have advantage.`},{name:"Paralyzed",id:"Paralyzed",description:`A paralyzed creature is incapacitated and can\u2019t move or speak. +The creature automatically fails Strength and Dexterity Saving Throws. +Attack rolls against the creature have advantage. +Any Attack that hits the creature is a critical hit if the attacker is within 5 feet of the creature.`},{name:"Petrified",id:"Petrified",description:`A petrified creature is transformed, along with any nonmagical object it is wearing or carrying, into a solid inanimate substance (usually stone). Its weight increases by a factor of ten, and it ceases aging. +The creature is incapacitated, can\u2019t move or speak, and is unaware of its surroundings. +Attack rolls against the creature have advantage. +The creature automatically fails Strength and Dexterity Saving Throws. +The creature has Resistance to all damage. +The creature is immune to poison and disease, although a poison or disease already in its system is suspended, not neutralized.`},{name:"Poisoned",id:"Poisoned",description:"A poisoned creature has disadvantage on Attack rolls and Ability Checks."},{name:"Prone",id:"Prone",description:`A prone creature\u2019s only Movement option is to crawl, unless it stands up and thereby ends the condition. +The creature has disadvantage on Attack rolls. +An Attack roll against the creature has advantage if the attacker is within 5 feet of the creature. Otherwise, the Attack roll has disadvantage.`},{name:"Reacted",id:"Reacted",description:`A creature, unless otherwise specified, gets one reaction per round of combat. +A reaction is an instant response to a trigger of some kind, which can occur on your turn or on someone else\u2019s. +A reaction can be spent to make an opportunity attack, do a readied action, or use an ability that requires a reaction. +A creature that has already reacted cannot use a reaction until the start of its turn.`},{name:"Restrained",id:"Restrained",description:`A restrained creature\u2019s speed becomes 0, and it can\u2019t benefit from any bonus to its speed. +Attack rolls against the creature have advantage, and the creature\u2019s Attack rolls have disadvantage. +The creature has disadvantage on Dexterity Saving Throws.`},{name:"Stunned",id:"Stunned",description:`A stunned creature is incapacitated, can\u2019t move, and can speak only falteringly. +The creature automatically fails Strength and Dexterity Saving Throws. +Attack rolls against the creature have advantage.`},{name:"Unconscious",id:"Unconscious",description:`An unconscious creature is incapacitated, can\u2019t move or speak, and is unaware of its surroundings. +The creature drops whatever it\u2019s holding and falls prone. +The creature automatically fails Strength and Dexterity Saving Throws. +Attack rolls against the creature have advantage. +Any Attack that hits the creature is a critical hit if the attacker is within 5 feet of the creature.`}];var Mn="initiative-tracker-view",Ds="initiative-tracker-player-view",ko="initiative-tracker-creature-view";var We="\u2013",W$=Sy.Platform.isMacOS?"Meta":"Control";var In={ignore:"ignore",current:"current",temp:"temp"},Jn={playerFirst:"playerFirst",npcFirst:"npcFirst",random:"random"},xy={players:[],parties:[],defaultParty:null,statuses:[...ls],unconsciousId:"Unconscious",version:[],canUseDiceRoll:!1,preferStatblockLink:!1,initiative:"1d20 + %mod%",modifier:null,sync:!1,playerMarker:"default",monsterMarker:"default",state:{creatures:[],state:!1,name:null,round:null,logFile:null},condense:!1,clamp:!0,autoStatus:!0,beginnerTips:!0,displayDifficulty:!0,encounters:{},warnedAboutImports:!1,openState:{battle:!0,party:!0,status:!0,plugin:!0,player:!0,builder:!0},hpOverflow:In.ignore,additiveTemp:!1,rpgSystem:"dnd5e",logging:!1,logFolder:"/",resolveTies:Jn.playerFirst,useLegacy:!1,diplayPlayerHPValues:!0,rollHP:!1,descending:!0,builder:{showParty:!0,showXP:!0,sidebarIcon:!0},rollPlayerInitiatives:0},Rp={.125:"\u215B",.25:"\xBC",.375:"\u215C",.5:"\xBD",.625:"\u215D",.75:"\xBE",.875:"\u215E"};var SE=require("obsidian");var vt=require("obsidian"),cs="RANDOM_HP";function Py(){(0,vt.addIcon)(cs,` + + + + + + + + +`),(0,vt.addIcon)(Zp,$5),(0,vt.addIcon)(Al,B5),(0,vt.addIcon)(zp,V5),(0,vt.addIcon)(W5,X5),(0,vt.addIcon)(qp,U5),(0,vt.addIcon)(Lp,Y5),(0,vt.addIcon)($p,H5),(0,vt.addIcon)(Fp,G5),(0,vt.addIcon)(K5,J5),(0,vt.addIcon)(an,eE),(0,vt.addIcon)(ir,tE),(0,vt.addIcon)(iE,nE),(0,vt.addIcon)(Ql,sE),(0,vt.addIcon)(Dl,rE),(0,vt.addIcon)(Bp,lE),(0,vt.addIcon)(oE,aE),(0,vt.addIcon)(So,cE),(0,vt.addIcon)(Vp,uE),(0,vt.addIcon)(Wu,fE),(0,vt.addIcon)(Qs,dE),(0,vt.addIcon)(us,F5),(0,vt.addIcon)(Wp,hE),(0,vt.addIcon)(Bu,''),(0,vt.addIcon)(Mp,''),(0,vt.addIcon)(L5,''),(0,vt.addIcon)(Ip,''),(0,vt.addIcon)(pE,mE),(0,vt.addIcon)(nr,gE),(0,vt.addIcon)(jp,''),(0,vt.addIcon)(Np,'')}var Mp="expand-creatures",Bu="group-creatures",L5="initiative-tracker-active",Ip="initiative-tracker-creature-view",er="eye-off",tr="heart-handshake",Np="ARROW_DOWN_A-Z",jp="ARROW_DOWN_0-1",Zp="initiative-tracker",$5='',us="crossed-swords",F5='',Al="initiative-tracker-save",B5='',zp="initiative-tracker-add",V5='',Vu="trash";var W5="initiative-tracker-restart",X5='',qp="initiative-tracker-play",U5='',Lp="initiative-tracker-forward",Y5='',$p="initiative-tracker-backward",H5='',Fp="initiative-tracker-stop",G5='',K5="initiative-tracker-grip",J5='',an="initiative-tracker-hp",eE='',ir="initiative-tracker-ac",tE='',iE="initiative-tracker-hamburger",nE='',Dl="initiative-tracker-disable",rE='',Ql="initiative-tracker-enable",sE='',oE="initiative-tracker-edit",aE='',Bp="initiative-tracker-tags",lE='',So="initiative-tracker-initiative",cE='',Vp="initiative-tracker-redo",uE='',Wu="initiative-tracker-new",fE='',Qs="initiative-tracker-dice",dE='',Wp="initiative-tracker-copy",hE='',pE="initiative-tracker-player-view",mE='',nr="intiative-tracker-encounter-builder",gE='';var ln=class{constructor(){J(this,"displayName",We);J(this,"valueUnit","XP")}getCreatureDifficulty(e,t){return 0}getAdditionalCreatureDifficultyStats(e,t){return[]}getEncounterDifficulty(e,t){return{displayName:We,cssClass:"",value:0,title:"Total XP",summary:We,intermediateValues:[]}}getDifficultyThresholds(e){return[]}formatDifficultyValue(e,t){return isNaN(e)?We:t?`${e.toLocaleString()} ${this.valueUnit}`:e.toLocaleString()}getAdditionalDifficultyBudgets(e){return[]}};var Cy={1:{daily:300,easy:25,medium:50,hard:75,deadly:100},2:{daily:600,easy:50,medium:100,hard:150,deadly:200},3:{daily:1200,easy:75,medium:150,hard:225,deadly:400},4:{daily:1700,easy:125,medium:250,hard:375,deadly:500},5:{daily:3500,easy:250,medium:500,hard:750,deadly:1100},6:{daily:4e3,easy:300,medium:600,hard:900,deadly:1400},7:{daily:5e3,easy:350,medium:750,hard:1100,deadly:1700},8:{daily:6e3,easy:450,medium:900,hard:1400,deadly:2100},9:{daily:7500,easy:550,medium:1100,hard:1600,deadly:2400},10:{daily:9e3,easy:600,medium:1200,hard:1900,deadly:2800},11:{daily:10500,easy:800,medium:1600,hard:2400,deadly:3600},12:{daily:11500,easy:1e3,medium:2e3,hard:3e3,deadly:4500},13:{daily:13500,easy:1100,medium:2200,hard:3400,deadly:5100},14:{daily:15e3,easy:1250,medium:2500,hard:3800,deadly:5700},15:{daily:18e3,easy:1400,medium:2800,hard:4300,deadly:6400},16:{daily:2e4,easy:1600,medium:3200,hard:4800,deadly:7200},17:{daily:25e3,easy:2e3,medium:3900,hard:5900,deadly:8800},18:{daily:27e3,easy:2100,medium:4200,hard:6300,deadly:9500},19:{daily:3e4,easy:2400,medium:4900,hard:7300,deadly:10900},20:{daily:4e4,easy:2800,medium:5700,hard:8500,deadly:12700}},OE={0:0,"0.125":25,"1/8":25,"0.25":50,"1/4":50,"0.5":100,"1/2":100,1:200,2:450,3:700,4:1100,5:1800,6:2300,7:2900,8:3900,9:5e3,10:5900,11:7200,12:8400,13:1e4,14:11500,15:13e3,16:15e3,17:18e3,18:2e4,19:22e3,20:25e3,21:33e3,22:41e3,23:5e4,24:62e3,25:75e3,26:9e4,27:105e3,28:12e4,29:135e3,30:155e3},Xu,Ey,va=class extends ln{constructor(t){super();Tl(this,Xu);J(this,"plugin");J(this,"systemDifficulties",["Easy","Medium","Hard","Deadly"]);this.plugin=t,this.displayName="DnD 5e"}getCreatureDifficulty(t,n){let r=cn(this.plugin,t,o=>o?.xp??0);if(r)return r;let s=cn(this.plugin,t,o=>o?.cr??"0");return OE[s]??0}getAdditionalCreatureDifficultyStats(t,n){let r=cn(this.plugin,t,s=>s?.cr??0);return[`${fs(r)} CR`]}getEncounterDifficulty(t,n){let r=[...t].reduce((d,[h,p])=>d+this.getCreatureDifficulty(h)*p,0),s=[...t.values()].reduce((d,h)=>d+h,0),o=Qp(this,Xu,Ey).call(this,s,n.length),a=n.length==0||s==0?0:r*o,l=this.getDifficultyThresholds(n),c=l.reverse().find(d=>a>=d.minValue)?.displayName??"Trivial",u=l.map(d=>`${d.displayName}: ${d.minValue}`).join(` +`),f=`Encounter is ${c} +Total XP: ${r} +Adjusted XP: ${a} (x${o}) + +Threshold +${u}`;return{displayName:c,summary:f,cssClass:c.toLowerCase(),value:a,title:"Adjusted XP",intermediateValues:[{label:"Total XP",value:r}]}}getDifficultyThresholds(t){let n={easy:0,medium:0,hard:0,deadly:0},r=t.filter(s=>s&&s>0).map(s=>Math.max(1,Math.min(s,20)));return Object.keys(n).forEach(s=>{n[s]+=r.reduce((o,a)=>o+(Cy[a]?.[s]??0),0)}),Object.entries(n).map(([s,o])=>({displayName:s.charAt(0).toUpperCase()+s.slice(1),minValue:o})).sort((s,o)=>s.minValue-o.minValue)}getAdditionalDifficultyBudgets(t){return[{displayName:"Daily Budget",minValue:t.filter(n=>n&&n>0).reduce((n,r)=>n+Cy[Math.max(1,Math.min(r,20))].daily,0)}]}};Xu=new WeakSet,Ey=function(t,n){let r=[.5,1,1.5,2,2.5,3,4,5],s=1;switch(n<3?s++:n>5&&s--,!0){case t>=15:{s+=5;break}case t>=11:{s+=4;break}case t>=7:{s+=3;break}case t>=3:{s+=2;break}case t>=2:{s+=1;break}}return r[Math.min(s,r.length-1)]};var Uu=class extends ln{constructor(t){super();J(this,"plugin");J(this,"dnd5eRpgSystem");J(this,"systemDifficulties",["Not Deadly","Deadly"]);this.plugin=t,this.valueUnit="CR",this.displayName="DnD 5e Lazy GM",this.dnd5eRpgSystem=new va(t)}getCreatureDifficulty(t,n){return hi(cn(this.plugin,t,r=>r?.cr??0))}getAdditionalCreatureDifficultyStats(t,n){let r=this.dnd5eRpgSystem.getCreatureDifficulty(t);return[this.dnd5eRpgSystem.formatDifficultyValue(r,!0)]}getDifficultyThresholds(t){let n=t.reduce((s,o)=>s+o,0),r=t.length>0?n/t.length:0;return[{displayName:"Deadly",minValue:n/(r>4?2:4)}]}getEncounterDifficulty(t,n){let r=[...t].reduce((c,[u,f])=>c+this.getCreatureDifficulty(u)*f,0),s=this.getDifficultyThresholds(n).first()?.minValue??0,o=r>s?"Deadly":"Not Deadly",a=[...t].reduce((c,[u,f])=>c+this.dnd5eRpgSystem.getCreatureDifficulty(u)*f,0),l=`Encounter is ${o} +Total XP: ${a} +Total CR: ${r} +Total levels: ${n.reduce((c,u)=>c+u,0)} +Deadly Threshold: ${s}`;return{displayName:o,summary:l,cssClass:o=="Deadly"?"deadly":"easy",value:r,title:"Total CR",intermediateValues:[{label:"Total XP",value:a}]}}formatDifficultyValue(t,n){return t?fs(t)+(n?" CR":""):We}};var vE={1:11,2:14,3:18,4:23,5:32,6:35,7:41,8:44,9:49,10:53,11:62,12:68,13:71,14:74,15:82,16:84,17:103,18:119,19:131,20:141},yE={0:1,"1/8":5,"0.25":5,"1/4":10,"0.5":10,"1/2":16,1:22,2:28,3:37,4:48,5:60,6:65,7:70,8:85,9:85,10:95,11:106,12:115,13:120,14:125,15:130,16:140,17:150,18:160,19:165,20:180,21:200,22:225,23:250,24:275,25:300,26:325,27:350,28:375,29:400,30:425},bE={Mild:"easy",Bruising:"medium",Bloody:"medium",Brutal:"hard",Oppressive:"deadly"},Yu=class extends ln{constructor(t){super();J(this,"plugin");J(this,"valueUnit","Power");J(this,"systemDifficulties",["Mild","Bruising","Bloody","Brutal","Oppressive"]);this.plugin=t,this.displayName="DnD 5e CR2.0 Simple"}getCreatureDifficulty(t,n){let r=cn(this.plugin,t,s=>s?.cr??"0");return yE[r]??0}getAdditionalCreatureDifficultyStats(t,n){let r=cn(this.plugin,t,s=>s?.cr??0);return[`${fs(r)} CR`]}getEncounterDifficulty(t,n){let r=[...t].reduce((c,[u,f])=>c+this.getCreatureDifficulty(u)*f,0),s=this.getDifficultyThresholds(n),o=s.reverse().find(c=>r>=c.minValue)?.displayName??"Mild",a=s.map(c=>`${c.displayName}: ${c.minValue}`).join(` +`),l=`Encounter is ${o} +Total Power: ${r} + + +Threshold +${a}`;return{displayName:o,summary:l,cssClass:bE[o],value:r,title:"Total Creature Power",intermediateValues:[]}}getDifficultyThresholds(t){let n={mild:.4,bruising:.6,bloody:.75,brutal:.9,Oppressive:1},r=t.map(s=>vE[s]).reduce((s,o)=>s+o,0);return Object.entries(n).map(([s,o])=>({displayName:s.charAt(0).toUpperCase()+s.slice(1),minValue:Math.round(o*r)})).sort((s,o)=>s.minValue-o.minValue)}};var Hu={1:{easy:.125,standard:.125,hard:.25,cap:1},2:{easy:.125,standard:.25,hard:.5,cap:3},3:{easy:.25,standard:.5,hard:.75,cap:4},4:{easy:.5,standard:.75,hard:1,cap:6},5:{easy:1,standard:1.5,hard:2.5,cap:8},6:{easy:1.5,standard:2,hard:3,cap:9},7:{easy:2,standard:2.5,hard:3.5,cap:10},8:{easy:2.5,standard:3,hard:4,cap:12},9:{easy:3,standard:3.5,hard:4.5,cap:13},10:{easy:3.5,standard:4,hard:5,cap:15},11:{easy:4,standard:4.5,hard:5.5,cap:16},12:{easy:4.5,standard:5,hard:6,cap:17},13:{easy:5,standard:5.5,hard:6.5,cap:19},14:{easy:5.5,standard:6,hard:7,cap:20},15:{easy:6,standard:6.5,hard:7.5,cap:22},16:{easy:6.5,standard:7,hard:8,cap:24},17:{easy:7,standard:7.5,hard:8.5,cap:25},18:{easy:7.5,standard:8,hard:9,cap:26},19:{easy:8,standard:8.5,hard:9.5,cap:28},20:{easy:8.5,standard:9,hard:10,cap:30}},_E={0:{xp:2,minionsPerStandard:5},"1/8":{xp:5,minionsPerStandard:5},"1/4":{xp:10,minionsPerStandard:5},"1/2":{xp:20,minionsPerStandard:5},1:{xp:40,minionsPerStandard:5},2:{xp:90,minionsPerStandard:5},3:{xp:140,minionsPerStandard:5},4:{xp:220,minionsPerStandard:5},5:{xp:225,minionsPerStandard:8},6:{xp:285,minionsPerStandard:8},7:{xp:360,minionsPerStandard:8},8:{xp:485,minionsPerStandard:8},9:{xp:500,minionsPerStandard:10},10:{xp:590,minionsPerStandard:10},11:{xp:720,minionsPerStandard:10},12:{xp:840,minionsPerStandard:10},13:{xp:1e3,minionsPerStandard:10},14:{xp:1150,minionsPerStandard:10},15:{xp:1300,minionsPerStandard:10},16:{xp:1500,minionsPerStandard:10},17:{xp:1800,minionsPerStandard:10},18:{xp:2e3,minionsPerStandard:10},19:{xp:2200,minionsPerStandard:10},20:{xp:2500,minionsPerStandard:10},21:{xp:3300,minionsPerStandard:10},22:{xp:4100,minionsPerStandard:10},23:{xp:5e3,minionsPerStandard:10},24:{xp:6200,minionsPerStandard:10},25:{xp:7500,minionsPerStandard:10},26:{xp:9e3,minionsPerStandard:10},27:{xp:10500,minionsPerStandard:10},28:{xp:12e3,minionsPerStandard:10},29:{xp:13500,minionsPerStandard:10},30:{xp:15500,minionsPerStandard:10}},Gu={Trivial:{encounterPoints:0,cssClass:"trivial"},Easy:{encounterPoints:1,cssClass:"easy"},Standard:{encounterPoints:2,cssClass:"medium"},Hard:{encounterPoints:4,cssClass:"hard"},Extreme:{encounterPoints:8,cssClass:"deadly"}},Ku=class extends ln{constructor(t){super();J(this,"plugin");J(this,"systemDifficulties",["Trivial","Easy","Standard","Hard","Extreme"]);this.plugin=t,this.displayName="DnD 5e Flee, Mortals!",this.valueUnit="CR"}isMinion(t){return"traits"in t&&t.traits?.find(n=>n.name==="Minion")}getAveragePlayerLevel(t){if(t.length===0)return 1;let n=t.filter(r=>r&&r>0).map(r=>Math.max(1,Math.min(r,20))).reduce((r,s)=>r+s,0);return Math.floor(n/t.length)}getCreatureStatistics(t){let n=0,r=0;return t.forEach((s,o)=>{let a=cn(this.plugin,o,c=>c?.cr??0),l=hi(o.cr);if(this.isMinion(o)){let c=_E[a].minionsPerStandard;a=l*Math.floor(s/c)}else a=l*s;rs?.cr??"0");return hi(r)}getEncounterDifficulty(t,n){let r=this.getAveragePlayerLevel(n),s=Hu[r]?.cap,{totalCreatureCr:o,maxCreatureCr:a}=this.getCreatureStatistics(t),l=this.getDifficultyThresholds(n),c=l.reverse().find(p=>o>=p.minValue)?.displayName,u=Gu[c].encounterPoints,f=Gu[c].cssClass;a>s&&(c="Extreme (Exceeds CR cap)",u=Gu.Extreme.encounterPoints,f=Gu.Extreme.cssClass);let d=l.map(p=>`${p.displayName}: ${p.minValue}`).join(` +`),h=`Encounter is ${c} +Total Creature CR: ${o} +Daily Encounter Points: ${u} +Party's CR Cap: ${s} + +Threshold +${d}`;return{displayName:c,summary:h,cssClass:f,value:o,title:"Total Creature CR",intermediateValues:[{label:"Daily Encounter Points",value:u},{label:"Creature CR Cap",value:s}]}}getDifficultyThresholds(t){let n=this.getAveragePlayerLevel(t),r=Hu[n]?.standard*t.length,s=Hu[n]?.hard*t.length,o=s+(s-r);return[{displayName:"Trivial",minValue:0},{displayName:"Easy",minValue:Hu[n]?.easy*t.length},{displayName:"Standard",minValue:r},{displayName:"Hard",minValue:s},{displayName:"Extreme",minValue:o}]}getAdditionalDifficultyBudgets(t){return[{displayName:"Encounter Points per Day",minValue:8}]}formatDifficultyValue(t,n){return isNaN(t)?We:n?`${fs(t)} ${this.valueUnit}`:fs(t)}};var wE={"-4":10,"-3":15,"-2":20,"-1":30,0:40,1:60,2:80,3:120,4:160};var kE={trivial:"trivial",low:"easy",moderate:"medium",severe:"hard",extreme:"deadly"},Ju=class extends ln{constructor(t){super();J(this,"plugin");J(this,"systemDifficulties",["Trivial","Low","Moderate","Severe","Extreme"]);this.plugin=t,this.displayName="Pathfinder 2e"}getCreatureDifficulty(t,n){let r=cn(this.plugin,t,a=>a?.level)?.toString().split(" ").slice(-1);if(r==null||r==null)return 0;let s=Math.round(n?.length??0>0?n.reduce((a,l)=>a+l)/n.length:0),o=String(r-s);return wE[o]??0}getDifficultyThresholds(t){let n=t.length*20,r={trivial:Math.floor(n*.5),low:Math.floor(n*.75),moderate:n,severe:Math.floor(n*1.5),extreme:Math.floor(n*2)};return Object.entries(r).map(([s,o])=>({displayName:s.charAt(0).toUpperCase()+s.slice(1),minValue:o})).sort((s,o)=>s.minValue-o.minValue)}getEncounterDifficulty(t,n){let r=[...t].reduce((c,[u,f])=>c+this.getCreatureDifficulty(u,n)*f,0),s=this.getDifficultyThresholds(n),o=s.findLast(c=>r>=c.minValue)?.displayName??"Trivial",a=s.map(c=>`${c.displayName}: ${c.minValue}`).join(` +`),l=`Encounter is ${o} + Total XP: ${r} + Threshold + ${a}`;return{displayName:o,summary:l,cssClass:kE[o.toLowerCase()]??"trivial",value:r,title:"Total XP",intermediateValues:[{label:"Total XP",value:r}]}}};var Rl=(s=>(s.Dnd5e="dnd5e",s.Dnd5eLazyGm="dnd5e-lazygm",s.Dnd5eCR2Simple="dnd5e-cr2-simple",s.Dnd5eFleeMortals="dnd5e-flee-mortals",s.Pathfinder2e="pathfinder2e",s))(Rl||{}),Xp=class extends ln{constructor(){super(...arguments);J(this,"systemDifficulties",[We,We])}};function ki(i,e){switch(e||i.data.rpgSystem){case"dnd5e":return new va(i);case"dnd5e-lazygm":return new Uu(i);case"dnd5e-cr2-simple":return new Yu(i);case"dnd5e-flee-mortals":return new Ku(i);case"pathfinder2e":return new Ju(i)}return new Xp}function hi(i){if(typeof i=="number")return i;if(typeof i!="string")return null;if(!i||i=="undefined"||!i.length)return 0;let e=i.split("/");return e.length==1?isNaN(Number(i))?0:Number(i):Number(e[0])/Number(e[1])}function fs(i){if(typeof i=="string"&&(i=hi(i)),i==0)return"0";let e=i%1,t=Math.floor(i);if(e==0)return t.toString();let n=t==0?"":t.toString();return e in Rp?n+=Rp[e]:n+=e.toString().slice(1),n}function cn(i,e,t){let n=t(e);return n||t(i.getCreatureFromBestiary(e.name))}var be=require("obsidian");var nf=Dp(Gp()),Ml=class extends nf.FuzzyInputSuggest{renderNote(e,t){e.setText([t.item.source].flat().join(", "))}renderTitle(e,t){this.renderMatches(e,t.item.name,t.match.matches)}getItemText(e){return e.name}},ef=class extends nf.FuzzyInputSuggest{renderNote(e,t){}renderTitle(e,t){this.renderMatches(e,t.item,t.match.matches)}getItemText(e){return e}},tf=class extends nf.FuzzyInputSuggest{renderNote(e,t){}renderTitle(e,t){this.renderMatches(e,t.item.name,t.match.matches)}getItemText(e){return e.name}};var _f=Dp(Gp());var Eo=require("obsidian");function xt(){return"ID_xyxyxyxyxyxy".replace(/[xy]/g,function(i){var e=Math.random()*16|0,t=i=="x"?e:e&3|8;return t.toString(16)})}var je=class i{constructor(e,t=0){this.creature=e;J(this,"active");J(this,"name");J(this,"modifier");J(this,"hp");J(this,"hit_dice");J(this,"rollHP");J(this,"temp");J(this,"ac");J(this,"current_ac");J(this,"dirty_ac");J(this,"note");J(this,"enabled",!0);J(this,"hidden",!1);J(this,"max");J(this,"current_max");J(this,"level");J(this,"player");J(this,"status",new Set);J(this,"marker");J(this,"initiative");J(this,"manualOrder");J(this,"static",!1);J(this,"source");J(this,"id");J(this,"xp");J(this,"viewing",!1);J(this,"number",0);J(this,"display");J(this,"friendly",!1);J(this,"statblock-link");J(this,"cr");J(this,"path");this.name=e.name,this.display=e.display,this.initiative="initiative"in e?e.initiative:Number(t??0),this.static=e.static??!1,this.setModifier(e.modifier),this.current_ac=this.ac=e.ac??void 0,this.dirty_ac=!1,this.max=this.current_max=e.hp?Number(e.hp):0,this.note=e.note,this.level=e.level,this.player=e.player,this.rollHP=e.rollHP,this.marker=e.marker,this.hp=this.max,this.temp=0,this.source=e.source,this.friendly=e.friendly??this.friendly,this.active=e.active,this.hidden=e.hidden??!1,this.note=e.note,this.path=e.path,this.xp=e.xp,this.cr=e.cr,this.id=e.id??xt(),"statblock-link"in e&&(this["statblock-link"]=e["statblock-link"]),"hit_dice"in e&&typeof e.hit_dice=="string"&&(this.hit_dice=e.hit_dice)}setModifier(e){e&&(Array.isArray(e)&&(this.modifier=[...e]),isNaN(Number(e))||(this.modifier=Number(e))),this.modifier=this.modifier??0}addCondition(e){[...this.status].find(t=>t.name===e.name&&t.amount===e.amount)||this.status.add(e)}removeCondition(e){this.status=new Set([...this.status].filter(t=>t.id!=e.id))}get hpDisplay(){return this.current_max?` + 0?`aria-label="Temp HP: ${this.temp}" style="font-weight:bold"`:""}>${this.hp+this.temp}/${this.current_max} + `:We}getName(){let e=[this.display??this.name];return this.number>0&&e.push(`${this.number}`),e.join(" ")}getStatblockLink(){if("statblock-link"in this){let e=this["statblock-link"];return e.startsWith("#")?`[${this.name}](${this.note}${e})`:e}}*[Symbol.iterator](){yield this.name,yield this.initiative,yield this.static,yield this.modifier,yield this.max,yield this.ac,yield this.note,yield this.path,yield this.id,yield this.marker,yield this.xp,yield this.hidden,yield this.hit_dice,yield this.current_ac,yield this.rollHP}static new(e){return new i({...e,id:xt()},e.initiative)}static from(e){let t="modifier"in e?e.modifier:Math.floor((("stats"in e&&e.stats.length>1?e.stats[1]:10)-10)/2);return new i({...e,modifier:t})}update(e){this.name=e.name,this.setModifier(e.modifier),this.current_max=this.max=e.hp?Number(e.hp):0,this.hp>this.max&&(this.hp=this.max),this.current_ac=this.ac=e.ac??void 0,this.note=e.note,this.level=e.level,this.player=e.player,this["statblock-link"]=e["statblock-link"],this.marker=e.marker,this.source=e.source}toProperties(){return{...this}}toJSON(){return{name:this.name,display:this.display,initiative:this.initiative,static:this.static,modifier:this.modifier,hp:this.max,currentMaxHP:this.current_max,cr:this.cr,ac:this.ac,currentAC:this.current_ac,note:this.note,path:this.path,id:this.id,marker:this.marker,currentHP:this.hp,tempHP:this.temp,status:Array.from(this.status).map(e=>e.name),enabled:this.enabled,level:this.level,player:this.player,xp:this.xp,active:this.active,hidden:this.hidden,friendly:this.friendly,"statblock-link":this["statblock-link"],hit_dice:this.hit_dice,rollHP:this.rollHP}}static fromJSON(e,t){let n;e.player?(n=t.getPlayerByName(e.name)??new i(e,e.initiative),n.initiative=e.initiative):n=new i(e,e.initiative),n.enabled=e.enabled,n.temp=e.tempHP?e.tempHP:0,n.current_max=e.currentMaxHP,n.hp=e.currentHP,n.current_ac=e.currentAC;let r=[];for(let s of e.status){let o=ls.find(({name:a})=>s==a);o?r.push(o):r.push({name:s,description:null,id:xt()})}return n.status=new Set(r),n.active=e.active,n}};function X(){}var Nn=i=>i;function ti(i,e){for(let t in e)i[t]=e[t];return i}function Kp(i){return i()}function rf(){return Object.create(null)}function de(i){i.forEach(Kp)}function Ge(i){return typeof i=="function"}function ie(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}function Ry(i){return Object.keys(i).length===0}function Mi(i,...e){if(i==null){for(let n of e)n(void 0);return X}let t=i.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function ut(i){let e;return Mi(i,t=>e=t)(),e}function Se(i,e,t){i.$$.on_destroy.push(Mi(e,t))}function Gt(i,e,t,n){if(i){let r=My(i,e,t,n);return i[0](r)}}function My(i,e,t,n){return i[1]&&n?ti(t.ctx.slice(),i[1](n(e))):t.ctx}function Kt(i,e,t,n){if(i[2]&&n){let r=i[2](n(t));if(e.dirty===void 0)return r;if(typeof r=="object"){let s=[],o=Math.max(e.dirty.length,r.length);for(let a=0;a32){let e=[],t=i.ctx.length/32;for(let n=0;nwindow.performance.now():()=>Date.now(),Il=Iy?i=>requestAnimationFrame(i):X;var ya=new Set;function Ny(i){ya.forEach(e=>{e.c(i)||(ya.delete(e),e.f())}),ya.size!==0&&Il(Ny)}function Rs(i){let e;return ya.size===0&&Il(Ny),{promise:new Promise(t=>{ya.add(e={c:i,f:t})}),abort(){ya.delete(e)}}}var Nl=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;var sf=class i{constructor(e){J(this,"_listeners","WeakMap"in Nl?new WeakMap:void 0);J(this,"_observer");J(this,"options");this.options=e}observe(e,t){return this._listeners.set(e,t),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){return this._observer??(this._observer=new ResizeObserver(e=>{for(let t of e)i.entries.set(t.target,t),this._listeners.get(t.target)?.(t)}))}};sf.entries="WeakMap"in Nl?new WeakMap:void 0;var jy=!1;function Zy(){jy=!0}function zy(){jy=!1}function y(i,e){i.appendChild(e)}function se(i,e,t){let n=of(i);if(!n.getElementById(e)){let r=b("style");r.id=e,r.textContent=t,Ly(n,r)}}function of(i){if(!i)return document;let e=i.getRootNode?i.getRootNode():i.ownerDocument;return e&&e.host?e:i.ownerDocument}function qy(i){let e=b("style");return e.textContent="/* empty */",Ly(of(i),e),e.sheet}function Ly(i,e){return y(i.head||i,e),e.sheet}function A(i,e,t){i.insertBefore(e,t||null)}function T(i){i.parentNode&&i.parentNode.removeChild(i)}function Ie(i,e){for(let t=0;ti.removeEventListener(e,t,n)}function Jp(i){return function(e){return e.preventDefault(),i.call(this,e)}}function Vt(i){return function(e){return e.stopPropagation(),i.call(this,e)}}function $y(i){return function(e){e.target===this&&i.call(this,e)}}function v(i,e,t){t==null?i.removeAttribute(e):i.getAttribute(e)!==t&&i.setAttribute(e,t)}function Ar(i,e){for(let t in e)v(i,t,e[t])}function pi(i){return i===""?null:+i}function Fy(i){return Array.from(i.childNodes)}function me(i,e){e=""+e,i.data!==e&&(i.data=e)}function Xe(i,e){i.value=e??""}function Te(i,e,t,n){t==null?i.style.removeProperty(e):i.style.setProperty(e,t,n?"important":"")}function ge(i,e,t){i.classList.toggle(e,!!t)}function Zl(i,e,{bubbles:t=!1,cancelable:n=!1}={}){return new CustomEvent(i,{detail:e,bubbles:t,cancelable:n})}var jl=class{constructor(e=!1){J(this,"is_svg",!1);J(this,"e");J(this,"n");J(this,"t");J(this,"a");this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=sr(t.nodeName):this.e=b(t.nodeType===11?"TEMPLATE":t.nodeName),this.t=t.tagName!=="TEMPLATE"?t:t.content,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let t=0;t{e[t.slot||"default"]=!0}),e}var af=new Map,lf=0;function jE(i){let e=5381,t=i.length;for(;t--;)e=(e<<5)-e^i.charCodeAt(t);return e>>>0}function ZE(i,e){let t={stylesheet:qy(e),rules:{}};return af.set(i,t),t}function zl(i,e,t,n,r,s,o,a=0){let l=16.666/n,c=`{ +`;for(let g=0;g<=1;g+=l){let O=e+(t-e)*s(g);c+=g*100+`%{${o(O,1-O)}} +`}let u=c+`100% {${o(t,1-t)}} +}`,f=`__svelte_${jE(u)}_${a}`,d=of(i),{stylesheet:h,rules:p}=af.get(d)||ZE(d,i);p[f]||(p[f]=!0,h.insertRule(`@keyframes ${f} ${u}`,h.cssRules.length));let m=i.style.animation||"";return i.style.animation=`${m?`${m}, `:""}${f} ${n}ms linear ${r}ms 1 both`,lf+=1,f}function cf(i,e){let t=(i.style.animation||"").split(", "),n=t.filter(e?s=>s.indexOf(e)<0:s=>s.indexOf("__svelte")===-1),r=t.length-n.length;r&&(i.style.animation=n.join(", "),lf-=r,lf||zE())}function zE(){Il(()=>{lf||(af.forEach(i=>{let{ownerNode:e}=i.stylesheet;e&&T(e)}),af.clear())})}function Dr(i,e,t,n){if(!e)return X;let r=i.getBoundingClientRect();if(e.left===r.left&&e.right===r.right&&e.top===r.top&&e.bottom===r.bottom)return X;let{delay:s=0,duration:o=300,easing:a=Nn,start:l=ds()+s,end:c=l+o,tick:u=X,css:f}=t(i,{from:e,to:r},n),d=!0,h=!1,p;function m(){f&&(p=zl(i,0,1,o,s,a,f)),s||(h=!0)}function g(){f&&cf(i,p),d=!1}return Rs(O=>{if(!h&&O>=l&&(h=!0),h&&O>=c&&(u(1,0),g()),!d)return!1;if(h){let w=O-l,S=0+1*a(w/o);u(S,1-S)}return!0}),m(),u(0,1),g}function Qr(i){let e=getComputedStyle(i);if(e.position!=="absolute"&&e.position!=="fixed"){let{width:t,height:n}=e,r=i.getBoundingClientRect();i.style.position="absolute",i.style.width=t,i.style.height=n,qE(i,r)}}function qE(i,e){let t=i.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){let n=getComputedStyle(i),r=n.transform==="none"?"":n.transform;i.style.transform=`${r} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}var Ms;function hs(i){Ms=i}function ba(){if(!Ms)throw new Error("Function called outside component initialization");return Ms}function uf(i){ba().$$.on_mount.push(i)}function ff(i){ba().$$.on_destroy.push(i)}function Fe(){let i=ba();return(e,t,{cancelable:n=!1}={})=>{let r=i.$$.callbacks[e];if(r){let s=Zl(e,t,{cancelable:n});return r.slice().forEach(o=>{o.call(i,s)}),!s.defaultPrevented}return!0}}function Vi(i,e){return ba().$$.context.set(i,e),e}function Ue(i){return ba().$$.context.get(i)}function ht(i,e){let t=i.$$.callbacks[e.type];t&&t.slice().forEach(n=>n.call(this,e))}var xo=[];var mi=[],wa=[],tm=[],Vy=Promise.resolve(),im=!1;function nm(){im||(im=!0,Vy.then(hf))}function df(){return nm(),Vy}function _n(i){wa.push(i)}function Rr(i){tm.push(i)}var em=new Set,_a=0;function hf(){if(_a!==0)return;let i=Ms;do{try{for(;_ai.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),wa=e}var ql;function $E(){return ql||(ql=Promise.resolve(),ql.then(()=>{ql=null})),ql}function rm(i,e,t){i.dispatchEvent(Zl(`${e?"intro":"outro"}${t}`))}var pf=new Set,ps;function Ae(){ps={r:0,c:[],p:ps}}function De(){ps.r||de(ps.c),ps=ps.p}function $(i,e){i&&i.i&&(pf.delete(i),i.i(e))}function V(i,e,t,n){if(i&&i.o){if(pf.has(i))return;pf.add(i),ps.c.push(()=>{pf.delete(i),n&&(t&&i.d(1),n())}),i.o(e)}else n&&n()}var FE={duration:0};function Po(i,e,t,n){let s=e(i,t,{direction:"both"}),o=n?0:1,a=null,l=null,c=null,u;function f(){c&&cf(i,c)}function d(p,m){let g=p.b-o;return m*=Math.abs(g),{a:o,b:p.b,d:g,duration:m,start:p.start,end:p.start+m,group:p.group}}function h(p){let{delay:m=0,duration:g=300,easing:O=Nn,tick:w=X,css:S}=s||FE,C={start:ds()+m,b:p};p||(C.group=ps,ps.r+=1),"inert"in i&&(p?u!==void 0&&(i.inert=u):(u=i.inert,i.inert=!0)),a||l?l=C:(S&&(f(),c=zl(i,o,p,g,m,O,S)),p&&w(0,1),a=d(C,g),_n(()=>rm(i,p,"start")),Rs(k=>{if(l&&k>l.start&&(a=d(l,g),l=null,rm(i,a.b,"start"),S&&(f(),c=zl(i,o,a.b,a.duration,0,O,s.css))),a){if(k>=a.end)w(o=a.b,1-o),rm(i,a.b,"end"),l||(a.b?f():--a.group.r||de(a.group.c)),a=null;else if(k>=a.start){let _=k-a.start;o=a.a+a.d*O(_/a.duration),w(o,1-o)}}return!!(a||l)}))}return{run(p){Ge(s)?$E().then(()=>{s=s({direction:p?"in":"out"}),h(p)}):h(p)},end(){f(),a=l=null}}}function fe(i){return i?.length!==void 0?i:Array.from(i)}function ms(i,e){i.d(1),e.delete(i.key)}function BE(i,e){V(i,1,1,()=>{e.delete(i.key)})}function mf(i,e){i.f(),ms(i,e)}function ka(i,e){i.f(),BE(i,e)}function yi(i,e,t,n,r,s,o,a,l,c,u,f){let d=i.length,h=s.length,p=d,m={};for(;p--;)m[i[p].key]=p;let g=[],O=new Map,w=new Map,S=[];for(p=h;p--;){let P=f(r,s,p),x=t(P),R=o.get(x);R?n&&S.push(()=>R.p(P,e)):(R=c(x,P),R.c()),O.set(x,g[p]=R),x in m&&w.set(x,Math.abs(p-m[x]))}let C=new Set,k=new Set;function _(P){$(P,1),P.m(a,u),o.set(P.key,P),u=P.first,h--}for(;d&&h;){let P=g[h-1],x=i[d-1],R=P.key,Z=x.key;P===x?(u=P.first,d--,h--):O.has(Z)?!o.has(R)||C.has(R)?_(P):k.has(Z)?d--:w.get(R)>w.get(Z)?(k.add(R),_(P)):(C.add(Z),d--):(l(x,o),d--)}for(;d--;){let P=i[d];O.has(P.key)||l(P,o)}for(;h;)_(g[h-1]);return de(S),g}function Mr(i,e){let t={},n={},r={$$scope:1},s=i.length;for(;s--;){let o=i[s],a=e[s];if(a){for(let l in o)l in a||(n[l]=1);for(let l in a)r[l]||(t[l]=a[l],r[l]=1);i[s]=a}else for(let l in o)r[l]=1}for(let o in n)o in t||(t[o]=void 0);return t}function sm(i){return typeof i=="object"&&i!==null?i:{}}var VE=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],WE=new Set([...VE]);function Ir(i,e,t){let n=i.$$.props[e];n!==void 0&&(i.$$.bound[n]=t,t(i.$$.ctx[n]))}function ye(i){i&&i.c()}function Oe(i,e,t){let{fragment:n,after_update:r}=i.$$;n&&n.m(e,t),_n(()=>{let s=i.$$.on_mount.map(Kp).filter(Ge);i.$$.on_destroy?i.$$.on_destroy.push(...s):de(s),i.$$.on_mount=[]}),r.forEach(_n)}function ve(i,e){let t=i.$$;t.fragment!==null&&(Wy(t.after_update),de(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function UE(i,e){i.$$.dirty[0]===-1&&(xo.push(i),nm(),i.$$.dirty.fill(0)),i.$$.dirty[e/31|0]|=1<{let p=h.length?h[0]:d;return c.ctx&&r(c.ctx[f],c.ctx[f]=p)&&(!c.skip_bound&&c.bound[f]&&c.bound[f](p),u&&UE(i,f)),d}):[],c.update(),u=!0,de(c.before_update),c.fragment=n?n(c.ctx):!1,e.target){if(e.hydrate){Zy();let f=Fy(e.target);c.fragment&&c.fragment.l(f),f.forEach(T)}else c.fragment&&c.fragment.c();e.intro&&$(i.$$.fragment),Oe(i,e.target,e.anchor),zy(),hf()}hs(l)}var YE;typeof HTMLElement=="function"&&(YE=class extends HTMLElement{constructor(e,t,n){super();J(this,"$$ctor");J(this,"$$s");J(this,"$$c");J(this,"$$cn",!1);J(this,"$$d",{});J(this,"$$r",!1);J(this,"$$p_d",{});J(this,"$$l",{});J(this,"$$l_u",new Map);this.$$ctor=e,this.$$s=t,n&&this.attachShadow({mode:"open"})}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){let r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(s){return()=>{let o;return{c:function(){o=b("slot"),s!=="default"&&v(o,"name",s)},m:function(c,u){A(c,o,u)},d:function(c){c&&T(o)}}}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let t={},n=By(this);for(let s of this.$$s)s in n&&(t[s]=[e(s)]);for(let s of this.attributes){let o=this.$$g_p(s.name);o in this.$$d||(this.$$d[o]=om(o,s.value,this.$$p_d,"toProp"))}for(let s in this.$$p_d)!(s in this.$$d)&&this[s]!==void 0&&(this.$$d[s]=this[s],delete this[s]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$scope:{ctx:[]}}});let r=()=>{this.$$r=!0;for(let s in this.$$p_d)if(this.$$d[s]=this.$$c.$$.ctx[this.$$c.$$.props[s]],this.$$p_d[s].reflect){let o=om(s,this.$$d[s],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,o)}this.$$r=!1};this.$$c.$$.after_update.push(r),r();for(let s in this.$$l)for(let o of this.$$l[s]){let a=this.$$c.$on(s,o);this.$$l_u.set(o,a)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=om(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function om(i,e,t,n){let r=t[i]?.type;if(e=r==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!t[i])return e;if(n==="toAttribute")switch(r){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}var ne=class{constructor(){J(this,"$$");J(this,"$$set")}$destroy(){ve(this,1),this.$destroy=X}$on(e,t){if(!Ge(t))return X;let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let r=n.indexOf(t);r!==-1&&n.splice(r,1)}}$set(e){this.$$set&&!Ry(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var Xy="4";var Sa=[];function HE(i,e){return{subscribe:$e(i,e).subscribe}}function $e(i,e=X){let t,n=new Set;function r(a){if(ie(i,a)&&(i=a,t)){let l=!Sa.length;for(let c of n)c[1](),Sa.push(c,i);if(l){for(let c=0;c{n.delete(c),n.size===0&&t&&(t(),t=null)}}return{set:r,update:s,subscribe:o}}function oi(i,e,t){let n=!Array.isArray(i),r=n?[i]:i;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let s=e.length<2;return HE(t,(o,a)=>{let l=!1,c=[],u=0,f=X,d=()=>{if(u)return;f();let p=e(n?c[0]:c,o,a);s?o(p):f=Ge(p)?p:X},h=r.map((p,m)=>Mi(p,g=>{c[m]=g,u&=~(1<{u|=1<{(0,gf.setIcon)(m,cs)},d=m=>{(0,gf.setIcon)(m,tr)},h=m=>{(0,gf.setIcon)(m,er)},p=m=>s.openCombatant(a,m.ctrlKey||m.metaKey);return i.$$set=m=>{"creature"in m&&t(0,a=m.creature),"count"in m&&t(1,l=m.count),"xp"in m&&t(2,c=m.xp),"shouldShowRoll"in m&&t(3,u=m.shouldShowRoll),"$$scope"in m&&t(9,r=m.$$scope)},[a,l,c,u,s,o,f,d,h,r,n,p]}var am=class extends ne{constructor(e){super(),re(this,e,tT,eT,ie,{creature:0,count:1,xp:2,shouldShowRoll:3},GE)}},Of=am;function iT(i){se(i,"svelte-s37km9",".encounter-name.svelte-s37km9.svelte-s37km9{display:flex;justify-content:flex-start;align-items:center}.encounter-name.svelte-s37km9 .initiative-tracker-name.svelte-s37km9{margin:0}.encounter-instance.svelte-s37km9>.creatures-container>.encounter-creatures:first-of-type h4.svelte-s37km9,.encounter-creatures.svelte-s37km9>ul.svelte-s37km9{margin-top:0}.creature-li.svelte-s37km9.svelte-s37km9{width:fit-content}.xp-parent.svelte-s37km9.svelte-s37km9{display:inline-flex}.difficulty.svelte-s37km9.svelte-s37km9{width:fit-content}.deadly.svelte-s37km9 .difficulty-label.svelte-s37km9{color:red}.hard.svelte-s37km9 .difficulty-label.svelte-s37km9{color:orange}.medium.svelte-s37km9 .difficulty-label.svelte-s37km9{color:yellow}.easy.svelte-s37km9 .difficulty-label.svelte-s37km9{color:green}.trivial.svelte-s37km9 .difficulty-label.svelte-s37km9{color:#aaaaaa}.icons.svelte-s37km9.svelte-s37km9{display:flex}.icons.svelte-s37km9>div.svelte-s37km9:first-child .clickable-icon{margin-right:0}.creature-name.svelte-s37km9.svelte-s37km9{display:inline-flex;align-items:center;gap:0.25rem}.has-icon.svelte-s37km9.svelte-s37km9{display:flex;align-items:center}")}function Ky(i,e,t){let n=i.slice();return n[21]=e[t][0],n[22]=e[t][1],n}function Jy(i,e,t){let n=i.slice();return n[25]=e[t],n}function eb(i){let e;function t(s,o){if(s[3]instanceof Array&&s[3].length)return rT;if(!s[3])return nT}let n=t(i,-1),r=n&&n(i);return{c(){r&&r.c(),e=tt()},m(s,o){r&&r.m(s,o),A(s,e,o)},p(s,o){n===(n=t(s,o))&&r?r.p(s,o):(r&&r.d(1),r=n&&n(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&T(e),r&&r.d(s)}}}function nT(i){let e;return{c(){e=b("div"),e.innerHTML='

No Players

',v(e,"class","encounter-creatures encounter-players")},m(t,n){A(t,e,n)},p:X,d(t){t&&T(e)}}}function rT(i){let e,t,n=(i[4]?i[4]:"Players")+"",r,s,o,a=fe(i[3]),l=[];for(let c=0;c{u[p]=null}),De(),s=u[r],s?s.p(d,h):(s=u[r]=c[r](d),s.c()),$(s,1),s.m(o.parentNode,o))},i(d){a||($(s),a=!0)},o(d){V(s),a=!1},d(d){d&&(T(e),T(n),T(o)),l&&l.d(),u[r].d(d)}}}function nb(i){let e,t,n,r;return{c(){e=b("span"),v(e,"class","has-icon svelte-s37km9"),v(e,"aria-label","Rolling for HP")},m(s,o){A(s,e,o),n||(r=H(t=i[17].call(null,e)),n=!0)},d(s){s&&T(e),n=!1,r()}}}function sT(i){let e;return{c(){e=b("strong"),e.textContent="No creatures"},m(t,n){A(t,e,n)},p:X,i:X,o:X,d(t){t&&T(e)}}}function oT(i){let e,t,n=fe([...i[2]]),r=[];for(let o=0;oV(r[o],1,1,()=>{r[o]=null});return{c(){e=b("ul");for(let o=0;o0&&ab(i);return{c(){e=b("span"),t=b("strong"),r=ae(n),s=M(),o=b("span"),a=b("span"),a.textContent="(",l=M(),c=b("span"),p&&p.c(),u=M(),f=b("span"),f.textContent=")",v(t,"class","difficulty-label svelte-s37km9"),v(a,"class","paren left"),v(c,"class","xp-container"),v(f,"class","paren right"),v(o,"class","xp-parent difficulty svelte-s37km9"),v(e,"aria-label",d=i[9].summary),v(e,"class",h=un(i[9].cssClass)+" svelte-s37km9")},m(m,g){A(m,e,g),y(e,t),y(t,r),y(e,s),y(e,o),y(o,a),y(o,l),y(o,c),p&&p.m(c,null),y(o,u),y(o,f)},p(m,g){g&512&&n!==(n=m[9].displayName+"")&&me(r,n),m[9].value>0?p?p.p(m,g):(p=ab(m),p.c(),p.m(c,null)):p&&(p.d(1),p=null),g&512&&d!==(d=m[9].summary)&&v(e,"aria-label",d),g&512&&h!==(h=un(m[9].cssClass)+" svelte-s37km9")&&v(e,"class",h)},d(m){m&&T(e),p&&p.d()}}}function ab(i){let e,t=i[10].formatDifficultyValue(i[9].value)+"",n,r,s;return{c(){e=b("span"),n=ae(t),r=M(),s=b("span"),s.textContent=`${i[10].valueUnit}`,v(e,"class","xp number"),v(s,"class","xp text")},m(o,a){A(o,e,a),y(e,n),A(o,r,a),A(o,s,a)},p(o,a){a&512&&t!==(t=o[10].formatDifficultyValue(o[9].value)+"")&&me(n,t)},d(o){o&&(T(e),T(r),T(s))}}}function lT(i){let e,t,n,r,s,o,a,l,c,u,f,d,h,p=!i[5].includes("players"),m,g,O=!i[5].includes("creatures"),w,S,C,k,_=p&&eb(i),P=O&&ib(i),x=i[0].data.displayDifficulty&&sb(i);return{c(){e=b("div"),t=b("div"),n=b("h3"),r=ae(i[1]),s=M(),o=b("div"),a=b("div"),c=M(),u=b("div"),d=M(),h=b("div"),_&&_.c(),m=M(),g=b("div"),P&&P.c(),w=M(),x&&x.c(),v(n,"data-heading",i[1]),v(n,"class","initiative-tracker-name svelte-s37km9"),v(a,"aria-label","Start Encounter"),v(a,"class","svelte-s37km9"),v(u,"aria-label","Add to Encounter"),v(u,"class","svelte-s37km9"),v(o,"class","icons svelte-s37km9"),v(t,"class","encounter-name svelte-s37km9"),v(g,"class","encounter-creatures svelte-s37km9"),v(h,"class","creatures-container"),v(e,"class","encounter-instance svelte-s37km9")},m(R,Z){A(R,e,Z),y(e,t),y(t,n),y(n,r),y(t,s),y(t,o),y(o,a),y(o,c),y(o,u),y(e,d),y(e,h),_&&_.m(h,null),y(h,m),y(h,g),P&&P.m(g,null),y(h,w),x&&x.m(h,null),S=!0,C||(k=[H(l=i[11].call(null,a)),U(a,"click",i[12]),H(f=i[13].call(null,u)),U(u,"click",i[14])],C=!0)},p(R,[Z]){(!S||Z&2)&&me(r,R[1]),(!S||Z&2)&&v(n,"data-heading",R[1]),Z&32&&(p=!R[5].includes("players")),p?_?_.p(R,Z):(_=eb(R),_.c(),_.m(h,m)):_&&(_.d(1),_=null),Z&32&&(O=!R[5].includes("creatures")),O?P?(P.p(R,Z),Z&32&&$(P,1)):(P=ib(R),P.c(),$(P,1),P.m(g,null)):P&&(Ae(),V(P,1,1,()=>{P=null}),De()),R[0].data.displayDifficulty?x?x.p(R,Z):(x=sb(R),x.c(),x.m(h,null)):x&&(x.d(1),x=null)},i(R){S||($(P),S=!0)},o(R){V(P),S=!1},d(R){R&&T(e),_&&_.d(),P&&P.d(),x&&x.d(),C=!1,de(k)}}}function cT(i,e,t){let n,r,s;Se(i,he,x=>t(19,s=x));let{plugin:o}=e;Vi("plugin",o);let{name:a="Encounter"}=e,{creatures:l=new Map}=e,{players:c}=e,{party:u=null}=e,{hide:f=[]}=e,{rollHP:d=o.data.rollHP}=e,{playerLevels:h}=e,p=new Map,m=new Map,g=ki(o);for(let[x,R]of l){let Z=Number(R);if(o.canUseDiceRoller){let Q=o.getRoller(`${R}`);Q?(Q.on("new-result",()=>{p.set(x,Q.result),t(18,p)}),m.set(x,Q),Q.rollSync()):p.set(x,Z)}else p.set(x,Z)}let O=x=>{new Ll.ExtraButtonComponent(x).setIcon(us)},w=async()=>{o.view||await o.addTrackerView();let x=o.view,R=[...p].map(([E,j])=>isNaN(Number(j))||j<1?[E]:[...Array(j).keys()].map(z=>je.new(E))).flat(),Z=[],Q=[...u?o.getPlayerNamesForParty(u):[],...c],D=[];for(let E of new Set(Q))D.push(o.getPlayerByName(E));for(let E of[...D,...R])Z.push(E.toJSON());he.new(o,{creatures:Z,name:a,round:1,state:!1,logFile:null,roll:!0,rollHP:d,newLog:!0}),o.app.workspace.revealLeaf(x.leaf)},S=x=>{new Ll.ExtraButtonComponent(x).setIcon("plus-with-circle")},C=async x=>{o.view||await o.addTrackerView();let R=[...p].map(([Z,Q])=>isNaN(Number(Q))||Q<1?[Z]:[...Array(Q).keys()].map(D=>je.new(Z))).flat();for(let Z of c)s.find(Q=>Q.name===Z)||R.push(o.getPlayerByName(Z));he.add(o,d,...R)},k=(x,R)=>{o.canUseDiceRoller&&m.has(R)&&!m.get(R).isStatic?x.appendChild(m.get(R)?.containerEl??createSpan({text:`${p.get(R)}`})):x.setText(`${p.get(R)}`)},_=x=>{if(!x)return;let R=[];return x.hp&&R.push(`HP: ${x.hp}`),x.ac&&R.push(`AC: ${x.ac}`),x.modifier&&R.push(`MOD: ${x.modifier}`),`${R.join(", ")}`},P=x=>{(0,Ll.setIcon)(x,cs)};return i.$$set=x=>{"plugin"in x&&t(0,o=x.plugin),"name"in x&&t(1,a=x.name),"creatures"in x&&t(2,l=x.creatures),"players"in x&&t(3,c=x.players),"party"in x&&t(4,u=x.party),"hide"in x&&t(5,f=x.hide),"rollHP"in x&&t(6,d=x.rollHP),"playerLevels"in x&&t(7,h=x.playerLevels)},i.$$.update=()=>{i.$$.dirty&262272&&t(9,n=g.getEncounterDifficulty(p,h)),i.$$.dirty&68&&t(8,r=d&&[...l.keys()].filter(x=>x.hit_dice?.length).length==l.size)},[o,a,l,c,u,f,d,h,r,n,g,O,w,S,C,k,_,P,p]}var lm=class extends ne{constructor(e){super(),re(this,e,cT,lT,ie,{plugin:0,name:1,creatures:2,players:3,party:4,hide:5,rollHP:6,playerLevels:7},iT)}},lb=lm;var $l=require("obsidian");function uT(i){se(i,"svelte-1hp1xp6",".deadly.svelte-1hp1xp6 .difficulty-label.svelte-1hp1xp6{color:red}.hard.svelte-1hp1xp6 .difficulty-label.svelte-1hp1xp6{color:orange}.medium.svelte-1hp1xp6 .difficulty-label.svelte-1hp1xp6{color:yellow}.easy.svelte-1hp1xp6 .difficulty-label.svelte-1hp1xp6{color:green}.trivial.svelte-1hp1xp6 .difficulty-label.svelte-1hp1xp6{color:#aaaaaa}.icons.svelte-1hp1xp6.svelte-1hp1xp6{display:flex}.icons.svelte-1hp1xp6>div.svelte-1hp1xp6:first-child .clickable-icon{margin-right:0}ul.svelte-1hp1xp6.svelte-1hp1xp6{margin:0}")}function cb(i,e,t){let n=i.slice();return n[19]=e[t],n}function ub(i,e,t){let n=i.slice();return n[22]=e[t][0],n[23]=e[t][1],n}function fb(i){let e,t,n,r,s,o,a=[dT,fT],l=[];function c(u,f){return f&10&&(n=null),n==null&&(n=!!(!u[3].includes("creatures")&&u[1].size)),n?0:1}return r=c(i,-1),s=l[r]=a[r](i),{c(){e=b("td"),t=b("ul"),s.c(),v(t,"class","encounter-creatures encounter-list svelte-1hp1xp6")},m(u,f){A(u,e,f),y(e,t),l[r].m(t,null),o=!0},p(u,f){let d=r;r=c(u,f),r===d?l[r].p(u,f):(Ae(),V(l[d],1,1,()=>{l[d]=null}),De(),s=l[r],s?s.p(u,f):(s=l[r]=a[r](u),s.c()),$(s,1),s.m(t,null))},i(u){o||($(s),o=!0)},o(u){V(s),o=!1},d(u){u&&T(e),l[r].d()}}}function fT(i){let e;return{c(){e=ae("-")},m(t,n){A(t,e,n)},p:X,i:X,o:X,d(t){t&&T(e)}}}function dT(i){let e,t,n=fe([...i[1]]),r=[];for(let o=0;oV(r[o],1,1,()=>{r[o]=null});return{c(){for(let o=0;o{C=null}),De()),x&64&&(a=P[6].includes("players")),a?k?k.p(P,x):(k=hb(P),k.c(),k.m(e,l)):k&&(k.d(1),k=null),P[5].data.displayDifficulty?_?_.p(P,x):(_=mb(P),_.c(),_.m(e,c)):_&&(_.d(1),_=null)},i(P){O||($(C),O=!0)},o(P){V(C),O=!1},d(P){P&&T(e),C&&C.d(),k&&k.d(),_&&_.d(),w=!1,de(S)}}}function yT(i,e,t){let n,{name:r="Encounter"}=e,{creatures:s}=e,{players:o}=e,{hide:a=[]}=e,{playerLevels:l}=e,{plugin:c}=e;Vi("plugin",c);let{headers:u}=e,{rollHP:f=c.data.rollHP}=e,d=new Map,h=new Map,p=ki(c);for(let[_,P]of s){let x=Number(P);if(c.canUseDiceRoller){let R=c.getRoller(`${P}`);R?(R.on("new-result",()=>{d.set(_,R.result),t(15,d)}),h.set(_,R),R.rollSync()):d.set(_,x)}else d.set(_,x)}let m=_=>{new $l.ExtraButtonComponent(_).setIcon(us).setTooltip("Begin Encounter").onClick(async()=>{c.view||await c.addTrackerView();let P=c.view,x=[...d].map(([Z,Q])=>isNaN(Number(Q))||Q<1?[Z.toJSON()]:[...Array(Q).keys()].map(D=>je.new(Z).toJSON())).flat(),R=o.map(Z=>c.getPlayerByName(Z).toJSON());he.new(c,{creatures:[...R,...x],name:r,round:1,state:!1,logFile:null,newLog:!0,roll:!0,rollHP:f}),c.app.workspace.revealLeaf(P.leaf)})},g=_=>{new $l.ExtraButtonComponent(_).setIcon("plus-with-circle")},O=async _=>{c.view||await c.addTrackerView();let P=c.view,x=[...d].map(([R,Z])=>isNaN(Number(Z))||Z<1?[R]:[...Array(Z).keys()].map(Q=>je.new(R))).flat();he.add(c,f,...x)},w=(_,P)=>{c.canUseDiceRoller&&h.has(P)&&!h.get(P).isStatic?_.appendChild(h.get(P)?.containerEl??createSpan({text:`${d.get(P)}`})):_.setText(`${d.get(P)}`)},S=(_,P)=>{if(P==1||_==0)return"";let x=P>2?",":"";return _==P-1?`${x} and `:`${x} `},C=_=>{if(!_)return;let P=[];return _.hp&&P.push(`HP: ${_.hp}`),_.ac&&P.push(`AC: ${_.ac}`),_.modifier&&P.push(`MOD: ${_.modifier}`),`${P.join(", ")}`},k=_=>{(0,$l.setIcon)(_,cs)};return i.$$set=_=>{"name"in _&&t(0,r=_.name),"creatures"in _&&t(1,s=_.creatures),"players"in _&&t(2,o=_.players),"hide"in _&&t(3,a=_.hide),"playerLevels"in _&&t(4,l=_.playerLevels),"plugin"in _&&t(5,c=_.plugin),"headers"in _&&t(6,u=_.headers),"rollHP"in _&&t(7,f=_.rollHP)},i.$$.update=()=>{i.$$.dirty&32784&&t(8,n=p.getEncounterDifficulty(d,l))},[r,s,o,a,l,c,u,f,n,p,m,g,O,w,C,d]}var cm=class extends ne{constructor(e){super(),re(this,e,yT,vT,ie,{name:0,creatures:1,players:2,hide:3,playerLevels:4,plugin:5,headers:6,rollHP:7},uT)}},gb=cm;function Ob(i,e,t){let n=i.slice();return n[3]=e[t],n}function bT(i){let e;return{c(){e=b("th"),e.textContent="Creatures"},m(t,n){A(t,e,n)},d(t){t&&T(e)}}}function _T(i){let e;return{c(){e=b("th"),e.textContent="Players"},m(t,n){A(t,e,n)},d(t){t&&T(e)}}}function vb(i){let e;return{c(){e=b("th"),e.textContent="Difficulty"},m(t,n){A(t,e,n)},d(t){t&&T(e)}}}function yb(i){let e,t,n=[i[3],{headers:i[2]},{plugin:i[1]}],r={};for(let s=0;sV(S[k],1,1,()=>{S[k]=null});return{c(){e=b("table"),t=b("thead"),n=b("tr"),r=b("th"),r.textContent="Name",s=M(),m&&m.c(),a=M(),g&&g.c(),c=M(),O&&O.c(),u=M(),f=b("th"),f.textContent="Launch",d=M(),h=b("tbody");for(let k=0;k!o.hide.includes("players")&&(typeof o.players=="boolean"&&o.players||o.players instanceof Array&&o.players.length))&&s.push("players"),n.some(o=>!o.hide.includes("creatures")&&o.creatures.size)&&s.push("creatures"),i.$$set=o=>{"encounters"in o&&t(0,n=o.encounters),"plugin"in o&&t(1,r=o.plugin)},[n,r,s]}var um=class extends ne{constructor(e){super(),re(this,e,kT,wT,ie,{encounters:0,plugin:1})}},bb=um;var Ns=(i,e)=>i.name==e.name&&i.display==e.display&&i.ac==e.ac&&ST(i.modifier,e.modifier)&&i.xp==e.xp&&i.hidden==e.hidden&&i.friendly==e.friendly&&i.static==e.static;function ST(i,e){if(typeof i!=typeof e)return!1;if(typeof i=="number")return i==e;if(Array.isArray(i)&&Array.isArray(e)){for(let t=0;tthis.plugin.getPlayerByName(f)).map(f=>f.level).filter(f=>f&&!isNaN(Number(f)));return{name:t,players:n,party:r,hide:s,creatures:l,xp:c,playerLevels:u,rollHP:a}}parseHide(e){return"hide"in(e??{})?typeof e.hide=="string"?["creatures","players"].filter(t=>e.hide==t):Array.isArray(e.hide)?["creatures","players"].filter(t=>e.hide.includes(t)):[]:[]}parsePlayers(e){let t=[],n=e.players;if(e.party&&this.plugin.data.parties.find(r=>r.name.toLowerCase()==e.party.toLowerCase())){let r=this.plugin.data.parties.find(s=>s.name.toLowerCase()==e.party.toLowerCase());t.push(...r.players)}if(n=="none"||n==!1?t.splice(0,t.length):n==!0?t.push(...[...this.plugin.players.values()].map(r=>r.name)):typeof n=="string"?t.push(n):Array.isArray(n)&&t.push(...[...this.plugin.players.values()??[]].map(r=>r.name).filter(r=>n.map(s=>s.toLowerCase()).includes(r.toLowerCase()))),!t.length){let r=this.plugin.defaultParty?.name;if(r&&this.plugin.data.parties.find(s=>s.name.toLowerCase()==r.toLowerCase())){let s=this.plugin.data.parties.find(o=>o.name.toLowerCase()==r.toLowerCase());t.push(...s.players)}}return Array.from(new Set(t))}async parseRawCreatures(e,t){let n=new Map;if(e&&Array.isArray(e))for(let r of e){let{creature:s,number:o=1}=this.parseRawCreature(r,t)??{};if(!s)continue;let a={name:s.name,display:s.display,ac:s.ac,hp:s.hp,modifier:s.modifier,xp:s.xp,hidden:s.hidden,friendly:s.friendly,rollHP:s.rollHP},l=[...n].find(([c])=>Ns(c,a));if(!l)n.set(s,o);else{let c;!isNaN(Number(o))&&!isNaN(Number(l[1]))?c=Number(o)+l[1]:c=`${o} + ${l[1]}`,n.set(l[0],c)}}return n}parseRawCreature(e,t){if(!e)return{};let n,r=1;if(typeof e=="string"){let g=e.match(/(\d+)?:?\s?(.+)/)??[];r=isNaN(Number(g[1]??null))?r:Number(g[1]),n=g[2]}else if(Array.isArray(e))n=e;else if(typeof e=="object"){let g=Object.entries(e).flat();r=g[0],n=g[1]}if(!n)return{};typeof r=="string"&&!this.plugin.canUseDiceRoller&&/\d+d\d+/.test(r)&&(r=1),isNaN(Number(r))||(r=Number(r)),r!=0&&!r&&(r=1),typeof r=="number"&&r<1&&(r=0);let s,o,a,l,c,u,f=!1,d=!1,h=t;if(typeof n=="string"?(n.match(/,\s+hidden/)&&(f=!0,n=n.replace(/,\s*hidden/,"")),(n.match(/,\s+friend(?:ly)?/)||n.match(/,\s+ally/))&&(d=!0,n=n.replace(/,\s*friend(?:ly)?/,"").replace(/,\s*ally/,"")),s=n.split(/,\s?/)[0],[a,l,c,u]=n.split(/,\s?/).slice(1).map(g=>isNaN(Number(g))?null:Number(g))):Array.isArray(n)?(typeof n[0]=="string"?(s=n[0],o=n[1]):Array.isArray(n[0])&&(s=n[0][0],o=n[0][1]),f=n.slice(1).find(g=>g=="hidden")!=null,d=n.slice(1).find(g=>g=="friend"||g=="friendly"||g=="ally")!=null,[a,l,c,u]=n.slice(1).filter(g=>g!="hidden"&&g!="friend"&&g!="friendly"&&g!="ally").map(g=>isNaN(Number(g))?null:Number(g))):typeof n=="object"&&({creature:s,name:o,hp:a,ac:l,mod:c,xp:u}=n,f=n.hidden||!1,d=n.friend||n.ally||!1),a&&(h=!1),!s||typeof s!="string")return{};let p=this.plugin.getCreatureFromBestiary(s),m=p?je.from(p):new je({name:s});return m.display=o,m.hp=a??m.hp,m.ac=l??m.ac,m.modifier=c??m.modifier,m.xp=u??m.xp,m.hidden=f??m.hidden,m.friendly=d??m.friendly,m.rollHP=h??t??m.rollHP,{creature:m,number:r}}},fm=class{constructor(e,t,n){this.params=e;this.encounterEl=t;this.plugin=n;J(this,"instance");this.display()}async display(){this.instance=new lb({target:this.encounterEl,props:{plugin:this.plugin,name:this.params.name,party:this.params.party,players:this.params.players,playerLevels:this.params.playerLevels,creatures:this.params.creatures,hide:this.params.hide,rollHP:this.params.rollHP}})}},Co=class extends Is.MarkdownRenderChild{constructor(t,n,r,s=!1){super(r);this.plugin=t;this.src=n;this.containerEl=r;this.table=s;J(this,"parser");this.parser=new Fl(this.plugin),this.init()}init(){this.table?this.postprocessTable():this.postprocess()}async postprocess(){let t=this.src.split("---")??[],n=this.containerEl.createDiv("encounter-container"),r=n.createSpan({text:"No encounters created. Please check your syntax and try again."});for(let s of t)if(s?.trim().length)try{let o=(0,Is.parseYaml)(s);new fm(await this.parser.parse(o),n.createDiv("encounter-instance"),this.plugin),r.detach()}catch(o){console.error(o),new Is.Notice(`Initiative Tracker: here was an issue parsing: + +`+s)}this.plugin.register(()=>{this.containerEl.empty(),this.containerEl.createEl("pre").createEl("code",{text:`\`\`\`encounter +${this.src}\`\`\``})})}async postprocessTable(){let t=this.src.split("---")??[],r=this.containerEl.createDiv("encounter-container").createSpan({text:"No encounters created. Please check your syntax and try again."}),s=[];for(let o of t)if(o?.trim().length)try{let a=(0,Is.parseYaml)(o);s.push(await this.parser.parse(a))}catch(a){console.error(a),new Is.Notice(`Initiative Tracker: here was an issue parsing: + +`+o)}s.length&&(r.detach(),new bb({target:this.containerEl,props:{encounters:s,plugin:this.plugin}})),this.plugin.register(()=>{this.containerEl.empty(),this.containerEl.createEl("pre").createEl("code",{text:`\`\`\`encounter-table +${this.src}\`\`\``})})}};var dm=require("obsidian");var PT=dm.Platform.isMacOS?"Meta":"Control";function CT(){let i=$e([]),e=$e(new Map),t=$e(),{subscribe:n,set:r,update:s}=i,o=$e(),a,l=$e(1),c=$e(!1),u=Q=>{c.set(Q),Q?a?.logging?a?.log("Combat re-started"):a?.new({name:ut(f),players:O.filter(D=>D.player),creatures:O.filter(D=>!D.player),round:ut(l)}).then(()=>{o.set(a.getFile())}):a?.log("Combat stopped"),x(D=>(D.length&&!D.find(E=>E.active)&&(O[0].active=!0),D))},f=$e(),d=$e(),h=$e(),p=oi(h,Q=>Q.descending),m,g=oi(i,Q=>(m?.condense&&Q.forEach((D,E,j)=>{let z=j.filter(Y=>Ns(Y,D)),q=z.map(Y=>Y.initiative),G=q[Math.floor(Math.random()*q.length)];z.forEach(Y=>{Y.static||(Y.initiative=G)})}),Q)),O=[],w=oi([g,h],([Q,D])=>{let E=[...Q];return E.sort((j,z)=>{if(j.initiative!=z.initiative)return D.descending?z.initiative-j.initiative:j.initiative-z.initiative;if(j.manualOrder!==null&&j.manualOrder!==void 0&&z.manualOrder!==null&&z.manualOrder!==void 0&&j.manualOrder!==z.manualOrder){let q=j.manualOrder||0,G=z.manualOrder||0;return q-G}switch(m.resolveTies){case Jn.random:return Math.random()<.5?1:-1;case Jn.playerFirst:case Jn.npcFirst:let q=j.player?1:0,G=z.player?1:0;return m.resolveTies==Jn.playerFirst?G-q:q-G}}),O=E,E}),S=Q=>{a?.log(`${Q.getName()} initiative changed to ${Q.initiative}`)},C=(Q,...D)=>{for(let{creature:E,change:j}of D){if(j.initiative&&(E.initiative=Number(j.initiative),S(E)),j.name&&(E.name=j.name,E.number=0),j.hp){if(j.hp=Number(j.hp),j.hp<0&&E.temp>0){let z=E.temp+j.hp;E.temp=Math.max(0,z),j.hp=Math.min(0,z)}if(m.clamp&&E.hp+j.hp<0&&(j.hp=-E.hp),j.hp>0&&j.hp+E.hp>E.current_max)switch(m.hpOverflow){case In.ignore:j.hp=Math.max(E.current_max-E.hp,0);break;case In.temp:j.temp=j.hp-Math.min(E.current_max-E.hp,0),j.hp-=j.temp;break;case In.current:break}if(E.hp+=j.hp,m.autoStatus&&E.hp<=0){let z=m.statuses.find(q=>q.id==m.unconsciousId);z&&E.addCondition(z)}}if(j.max&&(E.current_max=Math.max(0,E.current_max+j.max),E.hp>=E.current_max&&m.hpOverflow!==In.current&&(E.hp=E.current_max)),j.set_hp&&(E.hp=j.set_hp),j.set_max_hp&&(E.current_max=E.max=j.set_max_hp),j.ac&&(E.current_ac=E.ac=j.ac),j.temp){let z=0;m.additiveTemp&&(z=E.temp),j.temp>0?E.temp=Math.max(E.temp,z+j.temp):E.temp=Math.max(0,E.temp+j.temp)}if(j.marker&&(E.marker=j.marker),j.status?.length)for(let z of j.status)E.addCondition(z);if(j.remove_status?.length)for(let z of j.remove_status)E.removeCondition(z);"hidden"in j&&(E.hidden=j.hidden,a.log(`${E.getName()} ${E.hidden?"hidden":"revealed"}`)),"enabled"in j&&(E.enabled=j.enabled,a.log(`${E.getName()} ${E.enabled?"enabled":"disabled"}`)),Q.includes(E)||Q.push(E)}return Q},k=(...Q)=>x(D=>C(D,...Q)),_=()=>({creatures:ut(i).map(Q=>Q.toJSON()),state:ut(c),name:ut(f),round:ut(l),logFile:a?.getLogFile()??null,rollHP:!1}),P=()=>{app.workspace.trigger("initiative-tracker:save-state",_())};function x(Q){s(Q),P()}let R=Q=>{for(let D=0;Dz.name==E.name).length==1||E.number>0)continue;let j=Q.filter(z=>z.display?z.display==E.display:z.name==E.name).map(z=>z.number);E.number=j?.length?Math.max(...j)+1:1}};function Z(Q,D){for(let E of D)E.static&&E.initiative||(E.active=!1,!(E.player&&Q.data.rollPlayerInitiatives==1)&&(E.player&&Q.data.rollPlayerInitiatives==2?E.initiative=0:E.initiative=Q.getInitiativeValue(E.modifier),E.manualOrder=null));return D}return{subscribe:n,set:r,data:h,setData:Q=>{h.set(Q),m=Q},getLogger:()=>a,setLogger:Q=>{a=Q},updating:e,updateTarget:t,updateCreatures:k,updateCreatureByName:(Q,D)=>x(E=>{let j=E.find(z=>z.name==Q);if(j){if(isNaN(Number(D.hp))||(j.hp=D.hp),D.max&&(j.current_max=Math.max(0,j.current_max+D.max),j.hp>=j.current_max&&m.hpOverflow!==In.current&&(j.hp=j.current_max)),D.temp){let z=0;m.additiveTemp&&(z=j.temp),D.temp>0?j.temp=Math.max(j.temp,z+D.temp):j.temp=Math.max(0,j.temp+D.temp)}if(D.marker&&(j.marker=D.marker),(typeof D.ac=="string"||!isNaN(Number(D.ac)))&&(j.ac=j.current_ac=D.ac),(typeof D.current_ac=="string"||!isNaN(Number(D.current_ac)))&&(j.current_ac=D.ac),isNaN(Number(D.initiative))||(j.initiative=D.initiative),typeof D.name=="string"&&(j.name=D.name),"hidden"in D&&(j.hidden=D.hidden),"enabled"in D&&(j.enabled=D.enabled),Array.isArray(D.status)&&D.status?.length)for(let z of D.status)if(typeof z=="string"){let q=m.statuses.find(G=>G.name==z)??{name:z,description:"",id:xt()};j.addCondition(q)}else typeof z=="object"&&z.name?.length&&j.addCondition(z)}return E}),players:oi(w,Q=>Q.filter(D=>D.player)),setUpdate:(Q,D)=>e.update(E=>(E.has(Q)?E.delete(Q):E.set(Q,{saved:D.getModifierState("Shift"),resist:D.getModifierState(PT),customMod:D.getModifierState("Alt")?"2":"1"}),E)),doUpdate:(Q,D,E,j=[])=>e.update(z=>{let q=[],G=[];return z.forEach((Y,ce)=>{let Pe=!Q.includes("."),ue={},B=(Y.saved?.5:1)*(Y.resist?.5:1)*Number(Y.customMod),ee=[ce.name];ce.number>0&&ee.push(`${ce.number}`);let pe={name:ee.join(" "),hp:null,temp:!1,max:!1,status:null,remove_status:null,saved:!1,unc:!1,ac:null,ac_add:!1};if(Q.charAt(0)=="t"){let Re=Number(Q.slice(1));pe.hp=Re,pe.temp=!0,ue.temp=Re}else{let Re=Q.charAt(0)==="m",oe=Number(Q.slice(+Re));oe=-1*Math.sign(oe)*Math.max(Math.abs(oe)*B,1),oe=Pe?Math.trunc(oe):oe,pe.hp=oe,Re&&(pe.max=!0,ue.max=oe),ue.hp=oe,ce.hp<=0&&(pe.unc=!0)}if(D.length&&(pe.status=D.map(Re=>Re.name),Y.saved?pe.saved=!0:ue.status=D),j.length&&(ue.remove_status=j),E){if(E.charAt(0)=="+"||E.charAt(0)=="-"){let Re=parseInt(String(ce.current_ac));isNaN(Re)?ce.current_ac=ce.current_ac+E:ce.current_ac=Re+parseInt(E),pe.ac_add=!0}else ce.current_ac=E.slice(+(E.charAt(0)=="\\"));pe.ac=E.slice(+(E.charAt(0)=="\\"))}q.push(pe),G.push({creature:ce,change:ue})}),a?.logUpdate(q),k(...G),z.clear(),z}),clearUpdate:()=>e.update(Q=>(Q.clear(),Q)),round:l,name:f,sort:p,party:d,setParty:(Q,D)=>x(E=>{let j=D.getPlayersForParty(Q);return d.set(Q),E=[...E.filter(z=>!z.player),...j],E}),state:c,getState:()=>ut(c),toggleState:()=>{u(!ut(c))},setState:u,goToNext:()=>x(Q=>{let D=O.findIndex(E=>E.active);if(D==-1)O[0].active=!0;else{let E,j=D;do if(j=((j+1)%O.length+O.length)%O.length,E=O[j],j==D)break;while(!E.enabled);if(E){if(O[D].active=!1,j!G.resetOnRound));a?.log("###",`Round ${z}`)}a?.log("#####",`${E.getName()}'s turn`),E.active=!0}}return Q}),goToPrevious:()=>x(Q=>{let D=O.findIndex(E=>E.active);if(D==0&&ut(l)==1)return Q;if(D==-1)O[0].active=!0;else{let E,j=D;do if(j=((j-1)%O.length+O.length)%O.length,E=O[j],j==D)break;while(!E.enabled);if(E){if(O[D].active=!1,j>D){let z=ut(l)-1;l.set(z);for(let q of Q)q.status=new Set([...q.status].filter(G=>!G.resetOnRound));a?.log("###",`Round ${z}`)}a?.log("#####",`${E.getName()}'s turn`),E.active=!0}}return Q}),ordered:w,add:async(Q,D=Q.data.rollHP,...E)=>x(j=>{Q.canUseDiceRoller&&D&&_b(E,Q,D),j.push(...E);let z=[];if(!m.condense)z.push(...E);else for(let q of E){let G=O.find(Y=>Ns(Y,q));G?q.initiative=G.initiative:z.push(q)}return Z(Q,z),a?.log(a?.join(E.map(q=>q.name)),"added to the combat."),R(j),j}),remove:(...Q)=>x(D=>(D=D.filter(E=>!Q.includes(E)),a?.log(a?.join(Q.map(E=>E.name)),"removed from the combat."),D)),replace:(Q,D)=>{x(E=>(E.splice(E.indexOf(Q),1,D),R(E),E))},update:()=>s(Q=>Q),updateAndSave:()=>x(Q=>Q),roll:Q=>x(D=>(Z(Q,D),D)),new:(Q,D)=>x(E=>{if(l.set(D?.round??1),c.set(D?.state??!1),f.set(D?.name??null),!D?.creatures)E=E.filter(j=>j.player);else{let j=[],z=ut(d),q=new Map([...z?Q.getPlayersForParty(z):[],...E.filter(G=>G.player)].map(G=>[G.id,G])).values();for(let G of D.creatures){let Y=null;G.player&&(Y=E.find(ce=>ce.player&&ce.id===G.id))&&Y!=null?j.push(Y):j.push(je.fromJSON(G,Q))}for(let G of q)j.find(Y=>Y.player&&Y.id==G.id)||j.push(G);E=j}return(!D||D?.roll)&&Z(Q,E),R(E),Q.canUseDiceRoller&&(D?.rollHP??Q.data.rollHP)&&_b(E,Q),D?.logFile&&a?.new(D.logFile).then(()=>{o.set(a.getFile())}),(!D&&a||D?.newLog)&&(a.logging=!1,o.set(null)),E}),reset:()=>x(Q=>{for(let D of Q)D.current_ac=D.ac,D.hp=D.current_max=D.max,D.enabled=!0,D.status.clear();return a?.log("Encounter HP & Statuses reset"),Q}),getOrderedCreatures:()=>ut(w),logUpdate:Q=>{let D=[];for(let E of Q){let j=[];E.hp&&(E.temp?j.push(`${E.name} gained ${E.hp.toString()} temporary HP`):E.max?E.hp<0?j.push(`${E.name} took ${(-1*E.hp).toString()} max HP damage${E.unc?" and died":""}`):j.push(`${E.name} gained ${(-1*E.hp).toString()} max HP`):E.hp<0?j.push(`${E.name} took ${(-1*E.hp).toString()} damage${E.unc?" and was knocked unconscious":""}`):E.hp>0&&j.push(`${E.name} was healed for ${E.hp.toString()} HP`)),E.status&&(j.length?j.push("and"):j.push(E.name),E.saved?j.push(`saved against ${E.status}`):j.push(`took ${E.status} status`)),D.push(j.join(" "))}a?.log(`${D.join(". ")}.`)},logNewInitiative:S,logFile:o,getEncounterState:_,updateState:()=>s(Q=>Q),difficulty:Q=>oi([i,h],([D])=>{let E=[],j=new Map,z=ki(Q);for(let q of D){if(!q.enabled||q.friendly)continue;if(q.player&&q.level){E.push(q.level);continue}let G={name:q.name,display:q.display,ac:q.ac,hp:q.hp,modifier:q.modifier,xp:q.xp,hidden:q.hidden},Y=[...j].find(([ce])=>Ns(ce,G));if(!Y){j.set(q,1);continue}j.set(Y[0],Y[1]+1)}return{difficulty:z.getEncounterDifficulty(j,E),thresholds:z.getDifficultyThresholds(E),labels:z.systemDifficulties}})}}var he=CT();function _b(i,e,t=!1){for(let n of i){if(!n.rollHP&&!t||!n.hit_dice?.length)continue;let r=e.getRoller(n.hit_dice);r&&(n.hp=n.max=n.current_max=r.rollSync())}}var Bl=class extends be.PluginSettingTab{constructor(t){super(t.app,t);this.plugin=t}async display(){try{let{containerEl:t}=this;t.empty(),t.addClass("initiative-tracker-settings"),t.createEl("h2",{text:"Initiative Tracker Settings"}),this._displayBase(t.createDiv()),this.plugin.data.openState||(this.plugin.data.openState={battle:!0,player:!0,party:!0,plugin:!0,status:!0,builder:!0}),this._displayBattle(t.createEl("details",{cls:"initiative-tracker-additional-container",attr:{...this.plugin.data.openState.player?{open:!0}:{}}})),this._displayPlayers(t.createEl("details",{cls:"initiative-tracker-additional-container",attr:{...this.plugin.data.openState.player?{open:!0}:{}}})),this._displayParties(t.createEl("details",{cls:"initiative-tracker-additional-container",attr:{...this.plugin.data.openState.party?{open:!0}:{}}})),this._displayBuilder(t.createEl("details",{cls:"initiative-tracker-additional-container",attr:{...this.plugin.data.openState.builder?{open:!0}:{}}})),this._displayStatuses(t.createEl("details",{cls:"initiative-tracker-additional-container",attr:{...this.plugin.data.openState.status?{open:!0}:{}}})),this._displayIntegrations(t.createEl("details",{cls:"initiative-tracker-additional-container",attr:{...this.plugin.data.openState.plugin?{open:!0}:{}}})),t.createDiv("coffee").createEl("a",{href:"https://www.buymeacoffee.com/valentine195"}).createEl("img",{attr:{src:"https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=\u2615&slug=valentine195&button_colour=e3e7ef&font_colour=262626&font_family=Inter&outline_colour=262626&coffee_colour=ff0000"}})}catch(t){console.error(t),new be.Notice("There was an error displaying the settings tab for Obsidian Initiative Tracker.")}}_displayBase(t){t.empty(),new be.Setting(t).setHeading().setName("Basic Settings"),new be.Setting(t).setName("Display Beginner Tips").setDesc("Display instructions in the initiative tracker, helping you get used to the workflow.").addToggle(n=>{n.setValue(this.plugin.data.beginnerTips).onChange(async r=>{this.plugin.data.beginnerTips=r,await this.plugin.saveSettings()})}),new be.Setting(t).setName("Display Encounter Difficulty").setDesc("Display encounter difficulty based on creature CR and player level. Creatures without CR or level will not be considered in the calculation.").addToggle(n=>{n.setValue(this.plugin.data.displayDifficulty).onChange(async r=>{this.plugin.data.displayDifficulty=r,await this.plugin.saveSettings()})}),new be.Setting(t).setName("Roll Equivalent Creatures Together").setDesc("Equivalent creatures (same Name and AC) will roll the same initiative by default.").addToggle(n=>{n.setValue(this.plugin.data.condense).onChange(async r=>{this.plugin.data.condense=r,await this.plugin.saveSettings()})}),new be.Setting(t).setName("Embed statblock-link content in the Creature View").setDesc("Prefer embedded content from a statblock-link attribute when present. Fall back to the TTRPG plugin if the link is missing and the plugin is enabled.").addToggle(n=>{n.setValue(this.plugin.data.preferStatblockLink).onChange(async r=>{this.plugin.data.preferStatblockLink=r,await this.plugin.saveSettings()})})}async _displayBattle(t){t.empty(),t.ontoggle=()=>{this.plugin.data.openState.battle=t.open};let n=t.createEl("summary");new be.Setting(n).setHeading().setName("Battle"),n.createDiv("collapser").createDiv("handle"),new be.Setting(t).setName("Clamp Minimum HP").setDesc("When a creature takes damage that would reduce its HP below 0, its HP is set to 0 instead.").addToggle(s=>{s.setValue(this.plugin.data.clamp).onChange(async o=>{this.plugin.data.clamp=o,await this.plugin.saveSettings()})}),new be.Setting(t).setName("Overflow Healing").setDesc("Set what happens to healing which goes above creatures' max HP threshold.").addDropdown(s=>{s.addOption(In.ignore,"Ignore"),s.addOption(In.temp,"Add to temp HP"),s.addOption(In.current,"Add to current HP"),s.setValue(this.plugin.data.hpOverflow??In.ignore),s.onChange(async o=>{this.plugin.data.hpOverflow=o,this.plugin.saveSettings()})}),new be.Setting(t).setName("Automatic Unconscious Status Application").setDesc('When a creature takes damage that would reduce its HP below 0, it gains the "Unconscious" status effect.').addToggle(s=>{s.setValue(this.plugin.data.autoStatus).onChange(async o=>{this.plugin.data.autoStatus=o,await this.plugin.saveSettings()})}),new be.Setting(t).setName("Additive Temporary HP").setDesc("Any temporary HP added to a creature will be added on top of existing temporary HP.").addToggle(s=>{s.setValue(this.plugin.data.additiveTemp).onChange(async o=>{this.plugin.data.additiveTemp=o,await this.plugin.saveSettings()})}),new be.Setting(t).setName("Display Player HP in Player View").setDesc("If turned off, player health will display as 'Healthy', 'Hurt', etc.").addToggle(s=>{s.setValue(this.plugin.data.diplayPlayerHPValues).onChange(async o=>{this.plugin.data.diplayPlayerHPValues=o,await this.plugin.saveSettings()})}),new be.Setting(t).setName("Roll HP for Creatures").setDesc(createFragment(s=>{s.createSpan({text:"Creatures added to encounters will automatically roll for HP if the "}),s.createEl("code",{text:"hit_dice"}),s.createSpan({text:" property is set for the creature."})})).addToggle(s=>{s.setValue(this.plugin.data.rollHP).onChange(async o=>{this.plugin.data.rollHP=o,await this.plugin.saveSettings()})}),new be.Setting(t).setName("Log Battles").setDesc("Actions taken during battle will be logged to the specified log folder.").addToggle(s=>s.setValue(this.plugin.data.logging).onChange(async o=>{this.plugin.data.logging=o,await this.plugin.saveSettings()}));let r=await this.plugin.app.vault.adapter.exists(this.plugin.data.logFolder);new be.Setting(t).setName("Log Folder").setDesc(createFragment(async s=>{if(s.createSpan({text:"A new note will be created in this folder for each battle."}),s.createEl("br"),s.createSpan({text:"Current: "}),s.createEl("code",{text:this.plugin.data.logFolder}),!r){s.createEl("br");let o=s.createDiv("initiative-tracker-warning");(0,be.setIcon)(o,"initiative-tracker-warning"),o.createSpan({text:"This folder does not exist and will be created when a log file is written for the first time."})}})).addText(s=>{s.setValue(this.plugin.data.logFolder);let o=this.app.vault.getAllLoadedFiles().filter(l=>l instanceof be.TFolder);new _f.FolderInputSuggest(this.app,s,o).onSelect(async({item:l})=>{this.plugin.data.logFolder=(0,be.normalizePath)(l.path),await this.plugin.saveSettings(),this.display()})}),new be.Setting(t).setName("Resolve Initiative Ties").setDesc("Define what happens if two creatures have the same initiative.").addDropdown(s=>{s.addOption(Jn.playerFirst,"Player first"),s.addOption(Jn.npcFirst,"NPC first"),s.addOption(Jn.random,"Random"),s.setValue(this.plugin.data.resolveTies??Jn.playerFirst),s.onChange(async o=>{this.plugin.data.resolveTies=o,this.plugin.saveSettings()})})}_displayPlayers(t){t.empty(),t.ontoggle=()=>{this.plugin.data.openState.player=t.open};let n=t.createEl("summary");new be.Setting(n).setHeading().setName("Players"),n.createDiv("collapser").createDiv("handle"),new be.Setting(t).setName("Add New Player").setDesc("Players added here will be available to add to a party. If you do not have a party created, all players will be added to a new encounter.").addButton(o=>o.setTooltip("Add Player").setButtonText("+").onClick(async()=>{let l=new vf(this.plugin);l.open(),l.onClose=async()=>{l.saved&&(await this.plugin.savePlayer({...l.player,player:!0}),this._displayPlayers(t))}}));let r=t.createDiv("additional"),s=r.createDiv("initiative-tracker-players");if(!this.plugin.players.size)r.createDiv({attr:{style:"display: flex; justify-content: center; padding-bottom: 18px;"}}).createSpan({text:"No saved players! Create one to see it here."});else{let o=s.createDiv("initiative-tracker-player headers");o.createDiv({text:"Name"}),(0,be.setIcon)(o.createDiv({attr:{"aria-label":"Level"}}),"swords"),(0,be.setIcon)(o.createDiv({attr:{"aria-label":"Max HP"}}),an),(0,be.setIcon)(o.createDiv({attr:{"aria-label":"Armor Class"}}),ir),(0,be.setIcon)(o.createDiv({attr:{"aria-label":"Initiative Modifier"}}),So),o.createDiv();for(let a of this.plugin.data.players){let l=s.createDiv("initiative-tracker-player");l.createDiv({text:a.name}),l.createDiv({text:`${a.level??We}`}),l.createDiv({text:`${a.hp??We}`}),l.createDiv({text:`${a.ac??We}`}),l.createDiv({text:`${a.modifier??We}`});let c=l.createDiv("initiative-tracker-player-icon");new be.ExtraButtonComponent(c.createDiv()).setIcon("pencil").setTooltip("Edit").onClick(()=>{let u=new vf(this.plugin,a);u.open(),u.onClose=async()=>{u.saved&&(await this.plugin.updatePlayer(a,u.player),this._displayPlayers(t))}}),new be.ExtraButtonComponent(c.createDiv()).setIcon("trash").setTooltip("Delete").onClick(async()=>{this.plugin.deletePlayer(a),await this.plugin.saveSettings(),this._displayPlayers(t)})}for(let[a,l]of this.plugin.statblock_players){let c=s.createDiv("initiative-tracker-player");c.createDiv({text:a}),c.createDiv({text:`${l.level??We}`}),c.createDiv({text:`${l.hp??We}`}),c.createDiv({text:`${l.ac??We}`}),c.createDiv({text:`${l.modifier??We}`});let u=c.createDiv({cls:"initiative-tracker-player-icon imported",attr:{"aria-label":"Imported from Fantasy Statblocks"}});(0,be.setIcon)(u,"heart-handshake")}}}_displayBuilder(t){t.empty(),t.ontoggle=()=>{this.plugin.data.openState.player=t.open};let n=t.createEl("summary");new be.Setting(n).setHeading().setName("Encounters"),n.createDiv("collapser").createDiv("handle");let r=t.createDiv("initiative-tracker-explanation");r.createEl("span",{text:"The encounter builder allows you to quickly create encounters that can be saved for later use or immediately launched into a battle."}),r.createEl("br"),r.createEl("br"),r.createEl("span",{text:"It can be opened using the sidebar shortcut (if enabled) or by using the Open Encounter Builder command."}),new be.Setting(t).setName("Add Sidebar Shortcut").setDesc("A sidebar shortcut will be added to open the Encounter Builder.").addToggle(o=>{o.setValue(this.plugin.data.builder.sidebarIcon).onChange(a=>{this.plugin.data.builder.sidebarIcon=a,this.plugin.setBuilderIcon()})}),new be.Setting(t).setName("XP System").setDesc("XP system to use for encounters").addDropdown(o=>{Object.values(Rl).forEach(a=>o.addOption(a,ki(this.plugin,a).displayName)),o.setValue(this.plugin.data.rpgSystem??"dnd5e"),o.onChange(async a=>{this.plugin.data.rpgSystem=a,this.plugin.saveSettings()})});let s=t.createDiv("additional");if(new be.Setting(s).setHeading().setName("Saved Encounters"),!Object.keys(this.plugin.data.encounters).length)s.createDiv({attr:{style:"display: flex; justify-content: center; padding-bottom: 18px;"}}).createSpan({text:"No saved encounters! Create one to see it here."});else for(let[o,a]of Object.entries(this.plugin.data.encounters))new be.Setting(s).setName(o).setDesc(createFragment(l=>{let c=[],u=[];for(let f of a.creatures)f.player?c.push(f.name):u.push(f.name);c.length&&(l.createSpan({text:`Players: ${c.join(", ")}`}),l.createEl("br")),u.length&&(l.createSpan({text:`Creatures: ${u.join(", ")}`}),l.createEl("br")),a.timestamp&&l.createSpan({text:`${new Date(a.timestamp).toLocaleString()}`})})).addExtraButton(l=>{l.setIcon("trash").onClick(async()=>{this.plugin.removeEncounter(o),await this.plugin.saveSettings(),this._displayBuilder(t)})})}_displayParties(t){t.empty(),t.ontoggle=()=>{this.plugin.data.openState.party=t.open};let n=t.createEl("summary");new be.Setting(n).setHeading().setName("Parties"),n.createDiv("collapser").createDiv("handle");let r=t.createDiv("initiative-tracker-explanation");r.createEl("span",{text:"Parties allow you to create different groups of your players. Each player can be a member of multiple parties."}),r.createEl("br"),r.createEl("br"),r.createEl("span",{text:"You can set a default party for encounters to use, or specify the party for the encounter in the encounter block. While running an encounter in the tracker, you can change the active party, allowing you to quickly switch which players are in combat."}),new be.Setting(t).setName("Default Party").setDesc("The tracker will load this party to encounters by default.").addDropdown(o=>{o.addOption("none","None");for(let a of this.plugin.data.parties)o.addOption(a.name,a.name);o.setValue(this.plugin.data.defaultParty??"none"),o.onChange(async a=>{this.plugin.data.defaultParty=a=="none"?null:a,this.plugin.saveSettings()})}),new be.Setting(t).setName("Add New Party").addButton(o=>o.setTooltip("Add Party").setButtonText("+").onClick(async()=>{let l=new bf(this.plugin);l.open(),l.onClose=async()=>{if(!l.canceled&&!(!l.party.name||!l.party.name.length)){if(this.plugin.data.parties.filter(c=>c.name==l.party.name)){let c=new Map([...this.plugin.data.parties].map(u=>[u.name,u]));c.set(l.party.name,l.party),this.plugin.data.parties=Array.from(c.values())}else this.plugin.data.parties.push(l.party);await this.plugin.saveSettings(),this._displayParties(t)}}}));let s=t.createDiv("additional");if(!this.plugin.data.parties.length)s.createDiv({attr:{style:"display: flex; justify-content: center; padding-bottom: 18px;"}}).createSpan({text:"No saved parties! Create one to see it here."});else for(let o of this.plugin.data.parties)new be.Setting(s).setName(o.name).setDesc(o.players.join(", ")).addExtraButton(a=>{a.setIcon("pencil").onClick(()=>{let l=new bf(this.plugin,o);l.open(),l.onClose=async()=>{if(!l.canceled&&!(!l.party.name||!l.party.name.length)){if(this.plugin.data.parties.splice(this.plugin.data.parties.indexOf(o),1,l.party),this.plugin.data.parties.filter(c=>c.name==l.party.name).length>1&&this.plugin.data.parties.filter(c=>c.name==l.party.name)){let c=new Map(this.plugin.data.parties.map(u=>[u.name,u]));c.set(l.party.name,l.party),this.plugin.data.parties=Array.from(c.values())}await this.plugin.saveSettings(),this._displayParties(t)}}})}).addExtraButton(a=>{a.setIcon("trash").onClick(async()=>{this.plugin.data.parties=this.plugin.data.parties.filter(l=>l.name!=o.name),this.plugin.data.defaultParty==o.name&&(this.plugin.data.defaultParty=this.plugin.data.parties[0]?.name??null),await this.plugin.saveSettings(),this._displayParties(t)})})}_displayStatuses(t){t.empty(),t.ontoggle=()=>{this.plugin.data.openState.status=t.open};let n=t.createEl("summary");new be.Setting(n).setHeading().setName("Statuses"),new be.Setting(t).setName("Unconscious Status").setDesc("Choose a different status to be used as the default Unconscious status.").addDropdown(o=>{for(let a of this.plugin.data.statuses)o.addOption(a.id,a.name);o.setValue(this.plugin.data.unconsciousId),o.onChange(a=>this.plugin.data.unconsciousId=a)}),n.createDiv("collapser").createDiv("handle");let r=new be.Setting(t).setName("Add New Status").setDesc("These statuses will be available to apply to creatures.").addButton(o=>o.setTooltip("Add Status").setButtonText("+").onClick(async()=>{let l=new yf(this.plugin);l.onClose=async()=>{if(!l.canceled&&l.status.name){if(this.plugin.data.statuses.filter(c=>c.name==l.status.name)){let c=new Map([...this.plugin.data.statuses].map(u=>[u.name,u]));c.set(l.status.name,l.status),this.plugin.data.statuses=Array.from(c.values())}else this.plugin.data.statuses.push(l.status);await this.plugin.saveSettings(),this._displayStatuses(t)}},l.open()}));ls.every(o=>this.plugin.data.statuses.includes(o))||r.addExtraButton(o=>o.setIcon("reset").setTooltip("Re-add Default Statuses").onClick(async()=>{this.plugin.data.statuses=Array.from(new Map([...this.plugin.data.statuses,...ls].map(a=>[a.name,a])).values()),await this.plugin.saveSettings(),this._displayStatuses(t)}));let s=t.createDiv("additional");for(let o of this.plugin.data.statuses)new be.Setting(s).setName(createFragment(a=>{let l=a.createDiv("status-name-container");l.createSpan({text:o.name}),l.createDiv("status-metadata-container"),o.resetOnRound&&(0,be.setIcon)(l.createDiv({attr:{"aria-label":"Reset Each Round"}}),"timer-reset"),o.hasAmount&&(0,be.setIcon)(l.createDiv({attr:{"aria-label":"Has Amount"}}),"hash")})).setDesc(o.description??"").addExtraButton(a=>a.setIcon("pencil").onClick(()=>{let l=new yf(this.plugin,o);l.onClose=async()=>{if(!l.canceled&&l.status.name){if(this.plugin.data.statuses.splice(this.plugin.data.statuses.indexOf(o),1,l.status),this.plugin.data.statuses.filter(c=>c.name==l.status.name).length>1&&this.plugin.data.statuses.filter(c=>c.name==l.status.name)){let c=new Map(this.plugin.data.statuses.map(u=>[u.name,u]));c.set(l.status.name,l.status),this.plugin.data.statuses=Array.from(c.values())}await this.plugin.saveSettings(),this._displayStatuses(t)}},l.open()})).addExtraButton(a=>a.setIcon("trash").onClick(async()=>{this.plugin.data.statuses=this.plugin.data.statuses.filter(l=>l.name!=o.name),this.plugin.data.unconsciousId==o.id&&(this.plugin.data.unconsciousId="Unconscious"),await this.plugin.saveSettings(),this._displayStatuses(t)})).setClass("initiative-status-item")}async _displayIntegrations(t){t.empty(),t.ontoggle=()=>{this.plugin.data.openState.plugin=t.open};let n=t.createEl("summary");if(new be.Setting(n).setHeading().setName("Plugin Integrations"),n.createDiv("collapser").createDiv("handle"),this.plugin.canUseStatBlocks||(this.plugin.data.sync=!1,await this.plugin.saveSettings()),new be.Setting(t).setName("Sync Monsters from Fantasy Statblocks").setDesc(createFragment(r=>{r.createSpan({text:"Homebrew creatures saved to the Fantasy Statblocks plugin will be available to use."}),this.plugin.canUseStatBlocks||(r.createEl("br"),r.createEl("br"),r.createSpan({text:"Install and enable the "}),r.createEl("a",{text:"Fantasy Statblocks",href:"obsidian://show-plugin?id=obsidian-5e-statblocks"}),r.createSpan({text:" plugin to use homebrew creatures."}))})).addToggle(r=>{r.setDisabled(!this.plugin.canUseStatBlocks).setValue(this.plugin.data.sync),r.onChange(async s=>{this.plugin.data.sync=s,await this.plugin.saveSettings(),this._displayIntegrations(t)})}),this.plugin.data.sync){let r=new be.Setting(t).setDesc(`${this.plugin.bestiary.length} creatures synced.`);r.settingEl.addClass("initiative-synced"),(0,be.setIcon)(r.nameEl,"check-in-circle"),r.nameEl.appendChild(createSpan({text:"Synced"}))}new be.Setting(t).setName("Initiative Formula").setDesc(createFragment(r=>{r.createSpan({text:"Initiative formula to use when calculating initiative. Use "}),r.createEl("code",{text:"%mod%"}),r.createSpan({text:" for the modifier placeholder."}),this.plugin.canUseDiceRoller||(r.createEl("br"),r.createEl("br"),r.createSpan({attr:{style:"color: var(--text-error);"},text:"Requires the "}),r.createEl("a",{text:"Dice Roller",href:"https://github.com/valentine195/obsidian-dice-roller",cls:"external-link"}),r.createSpan({attr:{style:"color: var(--text-error);"},text:" plugin to modify."}))})).addText(r=>{this.plugin.canUseDiceRoller||(r.setDisabled(!0),this.plugin.data.initiative="1d20 + %mod%"),r.setValue(this.plugin.data.initiative),r.onChange(s=>{this.plugin.data.initiative=s}),r.inputEl.onblur=async()=>{he.roll(this.plugin),await this.plugin.saveSettings()}})}},vf=class extends Eo.Modal{constructor(t,n={}){super(t.app);this.plugin=t;this.original=n;J(this,"player");J(this,"saved");this.player={...n??{}}}async display(t){let{contentEl:n}=this;n.addClass("initiative-tracker-add-player-modal"),n.empty();let r=!1;n.createEl("h2",{text:this.original?"Edit Player":"New Player"}),new be.Setting(n).setName("Link to Note").setDesc("Link player to a note in your vault.").addText(f=>{f.setValue(this.player.note??"");let d=this.app.vault.getFiles();new _f.FileInputSuggest(this.app,f,d).onSelect(async({item:p})=>{if(!p)return;let m=this.app.metadataCache.getFileCache(p);if(this.player.note=p.basename,this.player.path=p.path,this.player.name=p.basename,!m||!m.frontmatter)return;let{ac:g,hp:O,modifier:w,level:S,name:C}=m.frontmatter;this.player.name=C??this.player.name,this.player.ac=parseInt(g??this.player.ac,10),this.player.hp=parseInt(O??this.player.hp,10),this.player.level=parseInt(S??this.player.level,10),this.player.modifier=parseInt(w??this.player.modifier,10),this.player["statblock-link"]=m.frontmatter["statblock-link"],this.display()})});let s,o,a,l;new be.Setting(n).setName("Name").setDesc("Player name. Must be unique!").addText(f=>{s={input:f.inputEl,validate:d=>{let h=!1;return(!d.value.length&&!t||this.plugin.players.has(d.value)&&this.player.name!=this.original.name)&&(d.addClass("has-error"),h=!0),h}},f.setValue(this.player.name??""),f.onChange(d=>{f.inputEl.removeClass("has-error"),this.player.name=d})}),new be.Setting(n).setName("Level").setDesc("Player level.").addText(f=>{o={input:f.inputEl,validate:d=>{let h=!1;return(isNaN(Number(d.value))||Number(d.value)<=0)&&(d.addClass("has-error"),h=!0),h}},f.setValue(`${this.player.level??""}`),f.onChange(d=>{f.inputEl.removeClass("has-error"),this.player.level=Number(d)})}),new be.Setting(n).setName("Max Hit Points").addText(f=>{a={input:f.inputEl,validate:d=>{let h=!1;return isNaN(Number(d.value))&&(d.addClass("has-error"),h=!0),h}},f.setValue(`${this.player.hp??""}`),f.onChange(d=>{f.inputEl.removeClass("has-error"),this.player.hp=Number(d)})}),new be.Setting(n).setName("Armor Class").addText(f=>{f.setValue(`${this.player.ac??""}`),f.onChange(d=>{this.player.ac=d})}),new be.Setting(n).setName("Initiative Modifier").setDesc("This will be added to randomly-rolled initiatives.").addText(f=>{l={input:f.inputEl,validate:d=>{let h=!1;return isNaN(Number(d.value))&&(f.inputEl.addClass("has-error"),h=!0),h}},f.setValue(`${this.player.modifier??""}`),f.onChange(d=>{this.player.modifier=Number(d)})});let c=n.createDiv(),u=new be.Setting(c);u.addButton(f=>(f.setTooltip("Save").setIcon("checkmark").onClick(async()=>{if(this.validateInputs(s,a,l)){new be.Notice("Fix errors before saving.");return}this.saved=!0,this.close()}),f)),u.addExtraButton(f=>(f.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),f)),this.validateInputs(s,a,l)}validateInputs(...t){let n=!1;for(let r of t)r.validate(r.input)?n=!0:r.input.removeClass("has-error");return n}onOpen(){this.display(!0)}};(0,be.addIcon)("initiative-tracker-warning",'');var yf=class extends Eo.Modal{constructor(t,n){super(t.app);this.plugin=t;J(this,"status",{name:null,description:null,id:xt()});J(this,"canceled",!1);J(this,"editing",!1);J(this,"original");J(this,"warned",!1);n&&(this.editing=!0,this.original=n.name,this.status={name:n.name,description:n.description,id:n.id??xt()})}onOpen(){this.titleEl.setText(this.editing?"Edit Status":"New Status"),this.contentEl.empty();let t=new be.Setting(this.contentEl).setName("Name").addText(n=>{n.setValue(this.status.name).onChange(r=>{this.status.name=r,this.plugin.data.statuses.find(s=>s.name==this.status.name)&&!this.warned&&this.original!=this.status.name?(this.warned=!0,t.setDesc(createFragment(s=>{let o=s.createDiv("initiative-tracker-warning");(0,be.setIcon)(o,"initiative-tracker-warning"),o.createSpan({text:"A status by this name already exists and will be overwritten."})}))):this.warned&&(this.warned=!1,t.setDesc(""))})});new be.Setting(this.contentEl).setName("Description").addTextArea(n=>{n.setValue(this.status.description).onChange(r=>this.status.description=r)}),new be.Setting(this.contentEl).setName("Remove Each Round").setDesc("This status will be removed from all creatures at the start of a new round.").addToggle(n=>n.setValue(this.status.resetOnRound).onChange(r=>this.status.resetOnRound=r)),new be.Setting(this.contentEl).setName("Has Amount").setDesc("This status has an amount that can be increased or decreased during combat.").addToggle(n=>n.setValue(this.status.hasAmount).onChange(r=>{this.status.hasAmount=r,this.onOpen()})),this.status.hasAmount&&new be.Setting(this.contentEl).setName("Starting Amount").setDesc("The status will default to this amount when added.").addText(n=>n.setValue(`${this.status.startingAmount}`).onChange(r=>{this.status.amount=this.status.startingAmount=Number(r)}).inputEl.type="number"),new Eo.ButtonComponent(this.contentEl.createDiv("initiative-tracker-cancel")).setButtonText("Cancel").onClick(()=>{this.canceled=!0,this.close()})}},bf=class extends Eo.Modal{constructor(t,n){super(t.app);this.plugin=t;J(this,"party",{name:null,players:[]});J(this,"canceled",!1);J(this,"editing",!1);J(this,"warned",!1);J(this,"original");n&&(this.editing=!0,this.original=n.name,this.party={name:n.name,players:[...n.players??[]]})}onOpen(){this.titleEl.setText(this.editing?`Edit ${this.party.name??"Party"}`:"New Party");let t=new be.Setting(this.contentEl).setName("Name").addText(o=>{o.setValue(this.party.name).onChange(a=>{this.party.name=a,this.plugin.data.parties.find(l=>l.name==this.party.name)&&!this.warned&&this.original!=this.party.name?(this.warned=!0,t.setDesc(createFragment(l=>{let c=l.createDiv("initiative-tracker-warning");(0,be.setIcon)(c,"initiative-tracker-warning"),c.createSpan({text:"A party by this name already exists and will be overwritten."})}))):this.warned&&(this.warned=!1,t.setDesc(""))})}),n=this.contentEl.createDiv("initiative-tracker-additional-container"),r;new be.Setting(n).setName("Add Player to Party").addText(o=>{r=o;let a=new tf(this.plugin.app,o,[...this.plugin.players.values()]).onSelect(({item:l})=>{o.setValue(l.name),a.close()})}).addExtraButton(o=>o.setIcon("plus-with-circle").onClick(()=>{if(!(!r.getValue()||!r.getValue().length)){if(this.party.players.includes(r.getValue())){new be.Notice("That player is already in this party!");return}if(!this.plugin.players.has(r.getValue())){new be.Notice("That player doesn't exist! You should make them first.");return}this.party.players.push(r.getValue()),this.displayPlayers(s),r.setValue("")}}));let s=n.createDiv("additional");this.displayPlayers(s),new Eo.ButtonComponent(this.contentEl.createDiv("initiative-tracker-cancel")).setButtonText("Cancel").onClick(()=>{this.canceled=!0,this.close()})}displayPlayers(t){if(t.empty(),this.party.players.length)for(let n of this.party.players)new be.Setting(t).setName(n).addExtraButton(r=>{r.setIcon("trash").onClick(()=>{this.party.players.splice(this.party.players.indexOf(n),1),this.displayPlayers(t)})});else t.createDiv({attr:{style:"display: flex; justify-content: center; padding-bottom: 18px;"}}).createSpan({text:"Add a player to the party to see it here."})}};var hm=require("obsidian");function ET(i){se(i,"svelte-10ii9u0",".creature-name.svelte-10ii9u0.svelte-10ii9u0{cursor:pointer}.encounter-line.svelte-10ii9u0.svelte-10ii9u0{display:flex;gap:1rem}.icons.svelte-10ii9u0.svelte-10ii9u0{display:flex}.icons.svelte-10ii9u0>span.svelte-10ii9u0 .clickable-icon{margin-right:0}")}function wb(i,e,t){let n=i.slice();return n[13]=e[t][0],n[14]=e[t][1],n[16]=t,n}function TT(i){let e;return{c(){e=ae("-")},m(t,n){A(t,e,n)},p:X,d(t){t&&T(e)}}}function AT(i){let e,t=fe([...i[0]]),n=[];for(let r=0;r{o.set(g,S.result)}),a.set(g,S),S.rollSync()):o.set(g,w)}else o.set(g,w)}let l=g=>{new hm.ExtraButtonComponent(g).setIcon(us)},c=async()=>{r.view||await r.addTrackerView();let g=r.view,O=[...o].map(([w,S])=>isNaN(Number(S))||S<1?[w]:[...Array(S).keys()].map(C=>je.new(w))).flat();he.new(r,{creatures:O.map(w=>w.toJSON()),name:null,state:!1,round:1,logFile:null,newLog:!0,roll:!0}),r.app.workspace.revealLeaf(g.leaf)},u=g=>{new hm.ExtraButtonComponent(g).setIcon("plus-with-circle")},f=async g=>{r.view||await r.addTrackerView();let O=[...o].map(([w,S])=>isNaN(Number(S))||S<1?[w]:[...Array(S).keys()].map(C=>je.new(w))).flat();he.add(r,s,...O)},d=(g,O)=>{r.canUseDiceRoller&&a.has(O)&&!a.get(O).isStatic?g.appendChild(a.get(O)?.containerEl??createSpan({text:`${o.get(O)}`})):g.setText(`${o.get(O)}`)},h=(g,O)=>{if(O==1||g==0)return"";let w=O>2?",":"";return g==O-1?`${w} and `:`${w} `},p=g=>{if(!g)return;let O=[];return g.hp&&O.push(`HP: ${g.hp}`),g.ac&&O.push(`AC: ${g.ac}`),g.modifier&&O.push(`MOD: ${g.modifier}`),`${O.join(", ")}`},m=(g,O)=>r.openCombatant(g,O.ctrlKey||O.metaKey);return i.$$set=g=>{"creatures"in g&&t(0,n=g.creatures),"plugin"in g&&t(1,r=g.plugin),"rollHP"in g&&t(9,s=g.rollHP)},[n,r,l,c,u,f,d,h,p,s,m]}var pm=class extends ne{constructor(e){super(),re(this,e,MT,RT,ie,{creatures:0,plugin:1,rollHP:9},ET)}},Sb=pm;var kn=require("obsidian");var Wi=require("obsidian");function IT(i){se(i,"svelte-g63m31",".buttons.svelte-g63m31.svelte-g63m31{display:flex;justify-content:space-between;padding:0 0 0.5rem 0}.state.svelte-g63m31.svelte-g63m31{display:flex;justify-content:flex-start;align-items:center}.clean.svelte-g63m31.svelte-g63m31{display:flex;justify-content:flex-end;align-items:center}.state.svelte-g63m31>.svelte-g63m31:not(:last-child),.clean.svelte-g63m31>.svelte-g63m31:not(:last-child){margin-right:0.25rem}")}function NT(i){let e,t,n,r;return{c(){e=b("div"),v(e,"class","svelte-g63m31")},m(s,o){A(s,e,o),n||(r=H(t=i[8].call(null,e)),n=!0)},d(s){s&&T(e),n=!1,r()}}}function jT(i){let e,t,n,r,s,o,a,l,c,u;return{c(){e=b("div"),n=M(),r=b("div"),o=M(),a=b("div"),v(e,"class","svelte-g63m31"),v(r,"class","svelte-g63m31"),v(a,"class","svelte-g63m31")},m(f,d){A(f,e,d),A(f,n,d),A(f,r,d),A(f,o,d),A(f,a,d),c||(u=[H(t=i[9].call(null,e)),H(s=i[11].call(null,r)),H(l=i[10].call(null,a))],c=!0)},d(f){f&&(T(e),T(n),T(r),T(o),T(a)),c=!1,de(u)}}}function xb(i){let e,t,n,r;return{c(){e=b("div"),v(e,"aria-label","Open Log File"),v(e,"class","svelte-g63m31")},m(s,o){A(s,e,o),n||(r=[H(t=i[16].call(null,e)),U(e,"click",i[17])],n=!0)},p:X,d(s){s&&T(e),n=!1,de(r)}}}function ZT(i){let e,t,n,r;return{c(){e=b("div"),v(e,"aria-label","Open Player View"),v(e,"class","svelte-g63m31")},m(s,o){A(s,e,o),n||(r=[H(t=i[15].call(null,e)),U(e,"click",i[18])],n=!0)},p:X,d(s){s&&T(e),n=!1,de(r)}}}function zT(i){let e,t,n,r,s,o,a,l,c,u;function f(g,O){return g[1]?jT:NT}let d=f(i,-1),h=d(i),p=i[0]&&xb(i),m=i[7]&&ZT(i);return{c(){e=b("div"),t=b("div"),h.c(),n=M(),r=b("div"),p&&p.c(),s=M(),m&&m.c(),o=M(),a=b("div"),v(t,"class","state svelte-g63m31"),v(a,"class","svelte-g63m31"),v(r,"class","clean svelte-g63m31"),v(e,"class","buttons svelte-g63m31")},m(g,O){A(g,e,O),y(e,t),h.m(t,null),y(e,n),y(e,r),p&&p.m(r,null),y(r,s),m&&m.m(r,null),y(r,o),y(r,a),c||(u=[H(l=i[14].call(null,a)),U(a,"click",i[19])],c=!0)},p(g,[O]){d!==(d=f(g,O))&&(h.d(1),h=d(g),h&&(h.c(),h.m(t,null))),g[0]?p?p.p(g,O):(p=xb(g),p.c(),p.m(r,s)):p&&(p.d(1),p=null),g[7]&&m.p(g,O)},i:X,o:X,d(g){g&&T(e),h.d(),p&&p.d(),m&&m.d(),c=!1,de(u)}}}function qT(i,e,t){let n,r,s,o,a,{state:l,data:c,logFile:u,sort:f,party:d}=he;Se(i,l,Q=>t(1,a=Q)),Se(i,c,Q=>t(22,s=Q)),Se(i,u,Q=>t(0,n=Q)),Se(i,f,Q=>t(23,o=Q)),Se(i,d,Q=>t(21,r=Q));let h=Wi.Platform.isDesktop,p=Q=>{new Wi.ExtraButtonComponent(Q).setIcon(qp).setTooltip("Play").onClick(()=>he.setState(!0))},m=Q=>{new Wi.ExtraButtonComponent(Q).setIcon(Fp).setTooltip("Stop").onClick(()=>he.setState(!1))},g=Q=>{new Wi.ExtraButtonComponent(Q).setIcon(Lp).setTooltip("Next").onClick(()=>he.goToNext())},O=Q=>{new Wi.ExtraButtonComponent(Q).setIcon($p).setTooltip("Previous").onClick(()=>he.goToPrevious())},w=Ue("plugin"),S=Fe(),C=Q=>{let D=new Wi.Menu;if(D.addItem(E=>{E.setIcon(Wu).setTitle("New Encounter").onClick(()=>he.new(w))}),D.addItem(E=>{E.setIcon(Wu).setTitle("Add Creatures").onClick(()=>S("add-creatures"))}),D.addItem(E=>{E.setIcon(Vp).setTitle("Reset HP / Status").onClick(()=>he.reset())}),D.addItem(E=>{E.setIcon(Qs).setTitle("Re-roll Initiatives").onClick(()=>he.roll(w))}),D.addItem(E=>{E.setIcon(Bu).setTitle(w.data.condense?"Expand Creatures":"Group Creatures").onClick(async()=>{w.data.condense=!w.data.condense,await w.saveSettings(),E.setIcon(w.data.condense?Mp:Bu),E.setTitle(w.data.condense?"Expand Creatures":"Group Creatures")})}),D.addItem(E=>{E.setTitle(o?"Sort Ascending":"Sort Descending").onClick(async()=>{w.data.descending=!w.data.descending,await w.saveSettings(),E.setTitle(w.data.descending?"Sort Ascending":"Sort Descending")})}),D.addSeparator(),s.parties&&s.parties.length)if(Wi.Platform.isMobile){D.addItem(E=>{E.setIcon("switch").setTitle("Switch Party").setIsLabel(!0)}),D.addItem(E=>{E.setTitle("None").onClick(()=>{he.setParty("",w)}).setChecked(!r||r=="")});for(let E of s.parties)D.addItem(j=>{j.setTitle(E.name).onClick(()=>{he.setParty(E.name,w)}).setChecked(r==E.name)})}else D.addItem(E=>{let j=E.setIcon("switch").setTitle("Switch Party").setSubmenu();j.addItem(z=>{z.setTitle("None").onClick(()=>{he.setParty("",w)}).setChecked(!r||r=="")});for(let z of s.parties)j.addItem(q=>{q.setTitle(z.name).onClick(()=>{he.setParty(z.name,w)}).setChecked(r==z.name)})});if(Wi.Platform.isMobile?(D.addItem(E=>{E.setIcon("dice").setTitle("Party Rolling Behavior").setIsLabel(!0)}),D.addItem(E=>{E.setTitle("Always Roll").onClick(async()=>{w.data.rollPlayerInitiatives=0,await w.saveSettings()}).setChecked(w.data.rollPlayerInitiatives==0)}),D.addItem(E=>{E.setTitle("Never Roll").onClick(async()=>{w.data.rollPlayerInitiatives=1,await w.saveSettings()}).setChecked(w.data.rollPlayerInitiatives==1)}),D.addItem(E=>{E.setTitle("Set to Zero").onClick(async()=>{w.data.rollPlayerInitiatives=2,await w.saveSettings()}).setChecked(w.data.rollPlayerInitiatives==2)})):D.addItem(E=>{let j=E.setIcon("dice").setTitle("Party Rolling Behavior").setSubmenu();j.addItem(z=>{z.setTitle("Always Roll").onClick(async()=>{w.data.rollPlayerInitiatives=0,await w.saveSettings()}).setChecked(w.data.rollPlayerInitiatives==0)}),j.addItem(z=>{z.setTitle("Never Roll").onClick(async()=>{w.data.rollPlayerInitiatives=1,await w.saveSettings()}).setChecked(w.data.rollPlayerInitiatives==1)}),j.addItem(z=>{z.setTitle("Set to Zero").onClick(async()=>{w.data.rollPlayerInitiatives=2,await w.saveSettings()}).setChecked(w.data.rollPlayerInitiatives==2)})}),D.addSeparator(),!Wi.Platform.isMobile)D.addItem(E=>{let j=E.setIcon("open-elsewhere-glyph").setTitle("Load Encounter").setDisabled(Object.keys(w.data.encounters).length==0).setSubmenu().setNoIcon();for(let z of Object.keys(w.data.encounters))j.addItem(q=>{q.setTitle(z).onClick(()=>{he.new(w,w.data.encounters[z])})})});else{D.addItem(E=>{E.setIcon("open-elsewhere-glyph").setTitle("Load Encounter").setIsLabel(!0)});for(let E of Object.keys(w.data.encounters))D.addItem(j=>{j.setTitle(E).onClick(()=>{he.new(w,w.data.encounters[E])})})}D.addItem(E=>{E.setIcon(Al).setTitle("Save Encounter").onClick(()=>{S("save")})}),D.showAtMouseEvent(Q)};return[n,a,l,c,u,f,d,h,p,m,g,O,S,C,Q=>{new Wi.ExtraButtonComponent(Q).setIcon("vertical-three-dots")},Q=>{new Wi.ExtraButtonComponent(Q).setIcon("view")},Q=>{new Wi.ExtraButtonComponent(Q).setIcon("file-signature")},async()=>{n&&w.app.workspace.getLeaf().openFile(n)},Q=>S("player-view"),Q=>C(Q)]}var mm=class extends ne{constructor(e){super(),re(this,e,qT,zT,ie,{},IT)}},Pb=mm;var ic=require("obsidian");var Eb=require("obsidian");function LT(i){se(i,"svelte-1kp13ds",'.tree-item-flair-outer.svelte-1kp13ds::after{content:""}.initiative.svelte-1kp13ds{display:block;padding:0;width:20px;text-align:center;white-space:nowrap;user-select:all;border:0;color:inherit}')}function Cb(i){let e,t,n,r;return{c(){e=b("input"),v(e,"class","editable initiative tree-item-flair svelte-1kp13ds"),v(e,"aria-label",t=`${i[0]-i[1]} + ${i[1]}`),e.value=i[0]},m(s,o){A(s,e,o),n||(r=[U(e,"click",FT),U(e,"blur",i[3]),U(e,"keydown",BT)],n=!0)},p(s,o){o&3&&t!==(t=`${s[0]-s[1]} + ${s[1]}`)&&v(e,"aria-label",t),o&1&&e.value!==s[0]&&(e.value=s[0])},d(s){s&&T(e),n=!1,de(r)}}}function $T(i){let e,t=i[0],n=Cb(i);return{c(){e=b("div"),n.c(),v(e,"class","tree-item-flair-outer svelte-1kp13ds")},m(r,s){A(r,e,s),n.m(e,null)},p(r,[s]){s&1&&ie(t,t=r[0])?(n.d(1),n=Cb(r),n.c(),n.m(e,null)):n.p(r,s)},i:X,o:X,d(r){r&&T(e),n.d(r)}}}var FT=function(i){this.select()},BT=function(i){if(i.key==="Enter"||i.key==="Tab"){i.preventDefault(),this.blur();return}if(!/^(-?\d*\.?\d*|Backspace|Delete|Arrow\w+)$/.test(i.key))return i.preventDefault(),!1};function VT(i,e,t){let n=Fe(),{initiative:r}=e,{modifier:s}=e,o=function(a){let l=this.value;if(isNaN(Number(l))){new Eb.Notice("Enter a valid initiative."),this.value=`${r}`;return}r!=Number(l)&&n("initiative",Number(l))};return i.$$set=a=>{"initiative"in a&&t(0,r=a.initiative),"modifier"in a&&t(1,s=a.modifier)},[r,s,n,o]}var gm=class extends ne{constructor(e){super(),re(this,e,VT,$T,ie,{initiative:0,modifier:1},LT)}},Tb=gm;var wf=require("obsidian");function WT(i){se(i,"svelte-ptr4mi",".controls.svelte-ptr4mi{display:flex;justify-content:flex-end}.icon.svelte-ptr4mi .clickable-icon{margin-right:0}")}function XT(i){let e,t,n,r,s;return{c(){e=b("div"),t=b("div"),v(t,"class","add-button icon svelte-ptr4mi"),v(e,"class","controls svelte-ptr4mi")},m(o,a){A(o,e,a),y(e,t),r||(s=H(n=i[0].call(null,t)),r=!0)},p:X,i:X,o:X,d(o){o&&T(e),r=!1,s()}}}function UT(i,e,t){let n=Fe(),{creature:r}=e,s=Ue("plugin"),o=a=>{let l=new wf.ExtraButtonComponent(a).setIcon("vertical-three-dots").setTooltip("Actions");l.extraSettingsEl.onclick=c=>{c.stopPropagation();let u=new wf.Menu;u.addItem(f=>{f.setIcon(an).setTitle("Set Health/Status").onClick(d=>{he.updateTarget.set("hp"),he.setUpdate(r,d)})}),r.current_ac!=r.ac&&u.addItem(f=>{f.setIcon(an).setTitle("Reset AC").onClick(d=>{t(1,r.current_ac=r.ac,r),he.updateAndSave()})}),u.addItem(f=>{f.setIcon("pencil").setTitle("Edit").onClick(()=>{n("edit",r)})}),r.hidden?u.addItem(f=>{f.setIcon("eye").setTitle("Show").onClick(()=>{he.updateCreatures({creature:r,change:{hidden:!1}})})}):u.addItem(f=>{f.setIcon(er).setTitle("Hide").onClick(()=>{he.updateCreatures({creature:r,change:{hidden:!0}})})}),r.enabled?u.addItem(f=>{f.setIcon(Dl).setTitle("Disable").onClick(()=>{he.updateCreatures({creature:r,change:{enabled:!1}})})}):u.addItem(f=>{f.setIcon(Ql).setTitle("Enable").onClick(()=>{he.updateCreatures({creature:r,change:{enabled:!0}})})}),u.addItem(f=>{f.setIcon(Vu).setTitle("Remove").onClick(()=>{he.remove(r)})}),u.showAtPosition(c)}};return i.$$set=a=>{"creature"in a&&t(1,r=a.creature)},[o,r]}var Om=class extends ne{constructor(e){super(),re(this,e,UT,XT,ie,{creature:1},WT)}},Ab=Om;var Vl=require("obsidian");function YT(i){se(i,"svelte-i278pw",".amount.svelte-i278pw,.tag.svelte-i278pw{display:flex;align-items:center;gap:0.125rem}.tag.svelte-i278pw{color:var(--text-muted);font-size:small;width:fit-content;border-color:var(--border-color);border-radius:0.25rem}.tag.svelte-i278pw .clickable-icon{margin:0}.icon.svelte-i278pw{display:flex;align-items:center}")}function Db(i){let e,t,n,r,s,o=i[0].amount+"",a,l,c,u,f,d;return{c(){e=b("div"),t=b("div"),r=M(),s=b("span"),a=ae(o),l=M(),c=b("div"),v(t,"class","icon svelte-i278pw"),v(c,"class","icon svelte-i278pw"),v(e,"class","amount svelte-i278pw")},m(h,p){A(h,e,p),y(e,t),y(e,r),y(e,s),y(s,a),y(e,l),y(e,c),f||(d=[H(n=i[3].call(null,t)),U(t,"click",i[5]),H(u=i[4].call(null,c)),U(c,"click",i[6])],f=!0)},p(h,p){p&1&&o!==(o=h[0].amount+"")&&me(a,o)},d(h){h&&T(e),f=!1,de(d)}}}function HT(i){let e,t,n=i[0].name+"",r,s,o,a,l,c,u,f,d=i[0].hasAmount&&Db(i);return{c(){e=b("div"),t=b("span"),r=ae(n),o=M(),d&&d.c(),a=M(),l=b("div"),v(t,"aria-label-classes","initiative-tracker-condition-tooltip"),v(t,"aria-label",s=i[0].description?.length?i[0].description:null),v(e,"class","tag svelte-i278pw")},m(h,p){A(h,e,p),y(e,t),y(t,r),y(e,o),d&&d.m(e,null),y(e,a),y(e,l),u||(f=[H(c=i[2].call(null,l)),U(l,"click",i[7])],u=!0)},p(h,[p]){p&1&&n!==(n=h[0].name+"")&&me(r,n),p&1&&s!==(s=h[0].description?.length?h[0].description:null)&&v(t,"aria-label",s),h[0].hasAmount?d?d.p(h,p):(d=Db(h),d.c(),d.m(e,a)):d&&(d.d(1),d=null)},i:X,o:X,d(h){h&&T(e),d&&d.d(),u=!1,de(f)}}}function GT(i,e,t){let n=Fe(),{status:r}=e;(isNaN(r.amount)||r.amount<0)&&(r.amount=r.startingAmount);let s=f=>{new Vl.ExtraButtonComponent(f).setIcon("cross-in-box")},o=f=>{(0,Vl.setIcon)(f,"minus")},a=f=>{(0,Vl.setIcon)(f,"plus")},l=()=>{t(0,r.amount--,r),r.amount<=0&&n("remove")},c=()=>t(0,r.amount++,r),u=()=>n("remove");return i.$$set=f=>{"status"in f&&t(0,r=f.status)},[r,n,s,o,a,l,c,u]}var vm=class extends ne{constructor(e){super(),re(this,e,GT,HT,ie,{status:0},YT)}},kf=vm;var xa=require("obsidian");function KT(i){se(i,"svelte-nkq4jj",".name-holder.svelte-nkq4jj{display:flex;align-items:center;gap:0.25rem;font-size:small}.centered-icon.svelte-nkq4jj{display:flex;align-items:center}.name.svelte-nkq4jj{display:block;text-align:left;background-color:inherit;border:0;padding:0;height:unset;word-break:keep-all}.center.svelte-nkq4jj{text-align:center}.creature-adder.svelte-nkq4jj{cursor:pointer}.statuses.svelte-nkq4jj{display:flex;flex-flow:row wrap;column-gap:0.25rem}.initiative-container.svelte-nkq4jj{border-top-left-radius:0.25rem;border-bottom-left-radius:0.25rem}.controls-container.svelte-nkq4jj{border-top-right-radius:0.25rem;border-bottom-right-radius:0.25rem}.dirty-ac.svelte-nkq4jj{font-weight:var(--font-bold)}.mobile.svelte-nkq4jj{font-size:smaller}")}function Qb(i,e,t){let n=i.slice();return n[21]=e[t],n}function Rb(i){let e,t,n,r;return{c(){e=b("div"),v(e,"class","centered-icon svelte-nkq4jj")},m(s,o){A(s,e,o),n||(r=H(t=i[6].call(null,e)),n=!0)},d(s){s&&T(e),n=!1,r()}}}function Mb(i){let e,t,n,r;return{c(){e=b("div"),v(e,"class","centered-icon svelte-nkq4jj")},m(s,o){A(s,e,o),n||(r=H(t=i[7].call(null,e)),n=!0)},d(s){s&&T(e),n=!1,r()}}}function JT(i){let e;return{c(){e=b("span"),e.textContent=`${i[5]()}`,v(e,"class","name svelte-nkq4jj")},m(t,n){A(t,e,n)},p:X,d(t){t&&T(e)}}}function e6(i){let e,t=i[0].name+"",n;return{c(){e=b("strong"),n=ae(t),v(e,"class","name player svelte-nkq4jj")},m(r,s){A(r,e,s),y(e,n)},p(r,s){s&1&&t!==(t=r[0].name+"")&&me(n,t)},d(r){r&&T(e)}}}function Ib(i){let e,t,n=fe([...i[1]]),r=[];for(let o=0;oV(r[o],1,1,()=>{r[o]=null});return{c(){for(let o=0;o{z=null}),De()),(!P||G&1)&&h!==(h=q[0].hpDisplay+"")&&(d.innerHTML=h),(!P||G&1)&&O!==(O=(q[0].current_ac?q[0].current_ac:We)+"")&&me(w,O),(!P||G&1&&S!==(S=q[0].current_ac!=q[0].ac?`${q[0].ac}`:""))&&v(g,"aria-label",S),(!P||G&1)&&ge(g,"dirty-ac",q[0].current_ac!=q[0].ac);let ce={};G&1&&(ce.creature=q[0]),_.$set(ce)},i(q){P||($(t.$$.fragment,q),$(z),$(_.$$.fragment,q),P=!0)},o(q){V(t.$$.fragment,q),V(z),V(_.$$.fragment,q),P=!1},d(q){q&&(T(e),T(n),T(r),T(u),T(f),T(p),T(m),T(C),T(k)),ve(t),Z&&Z.d(),Q&&Q.d(),j.d(),z&&z.d(),ve(_),x=!1,de(R)}}}var jb=(i,e)=>i+e,i6=i=>i.stopPropagation(),n6=i=>i.stopPropagation(),r6=i=>i.stopPropagation(),s6=i=>i.stopPropagation();function o6(i,e,t){let n,r,s=Fe(),{updateTarget:o}=he;Se(i,o,x=>t(2,r=x));let{creature:a}=e,l=()=>a.getName(),c=()=>a.getStatblockLink(),u=x=>{(0,xa.setIcon)(x,er)},f=x=>{(0,xa.setIcon)(x,tr)},d={hoverPopover:null},h=null,p=x=>{h=setTimeout(()=>{if(a["statblock-link"]){let R=c();/\[.+\]\(.+\)/.test(R)?[,R]=R.match(/\[.+?\]\((.+?)\)/):/\[\[.+\]\]/.test(R)&&([,R]=R.match(/\[\[(.+?)(?:\|.+?)?\]\]/)),app.workspace.trigger("hover-link",{event:x,source:Mn,hoverParent:d,targetEl:x.target,linktext:R})}},1e3)},m=x=>{clearTimeout(h)},g=x=>{he.updateCreatures({creature:a,change:{initiative:Number(x.detail)}})},O=x=>{s("open-combatant",{creature:a,newLeaf:x.ctrlKey||x.metaKey})},w=x=>{he.updateCreatures({creature:a,change:{remove_status:[x]}})},S=x=>{let R=r;Ke(o,r="hp",r),R!="ac"&&he.setUpdate(a,x)},C=x=>{let R=r;Ke(o,r="ac",r),R!="hp"&&he.setUpdate(a,x)};function k(x){ht.call(this,i,x)}function _(x){ht.call(this,i,x)}function P(x){ht.call(this,i,x)}return i.$$set=x=>{"creature"in x&&t(0,a=x.creature)},i.$$.update=()=>{i.$$.dirty&1&&t(1,n=a.status)},[a,n,r,s,o,l,u,f,p,m,g,O,w,S,C,k,_,P]}var ym=class extends ne{constructor(e){super(),re(this,e,o6,t6,ie,{creature:0},KT)}},Zb=ym;function zb(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function Pf(i){for(var e=1;e=0)&&(t[r]=i[r]);return t}function l6(i,e){if(i==null)return{};var t=a6(i,e),n,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(i,n)&&(t[n]=i[n])}return t}function c6(i,e){return f6(i)||h6(i,e)||Tm(i,e)||m6()}function Zn(i){return u6(i)||d6(i)||Tm(i)||p6()}function u6(i){if(Array.isArray(i))return _m(i)}function f6(i){if(Array.isArray(i))return i}function d6(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function h6(i,e){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var n=[],r=!0,s=!1,o,a;try{for(t=t.call(i);!(r=(o=t.next()).done)&&(n.push(o.value),!(e&&n.length===e));r=!0);}catch(l){s=!0,a=l}finally{try{!r&&t.return!=null&&t.return()}finally{if(s)throw a}}return n}}function Tm(i,e){if(i){if(typeof i=="string")return _m(i,e);var t=Object.prototype.toString.call(i).slice(8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Array.from(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return _m(i,e)}}function _m(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,n=new Array(e);t=i.length?{done:!0}:{done:!1,value:i[n++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,o=!1,a;return{s:function(){t=t.call(i)},n:function(){var l=t.next();return s=l.done,l},e:function(l){o=!0,a=l},f:function(){try{!s&&t.return!=null&&t.return()}finally{if(o)throw a}}}}var g6="finalize",O6="consider";function Ta(i,e,t){i.dispatchEvent(new CustomEvent(g6,{detail:{items:e,info:t}}))}function qs(i,e,t){i.dispatchEvent(new CustomEvent(O6,{detail:{items:e,info:t}}))}var Rf="draggedEntered",Jl="draggedLeft",Mf="draggedOverIndex",Am="draggedLeftDocument",Cf={LEFT_FOR_ANOTHER:"leftForAnother",OUTSIDE_OF_ANY:"outsideOfAny"};function v6(i,e,t){i.dispatchEvent(new CustomEvent(Rf,{detail:{indexObj:e,draggedEl:t}}))}function y6(i,e,t){i.dispatchEvent(new CustomEvent(Jl,{detail:{draggedEl:e,type:Cf.LEFT_FOR_ANOTHER,theOtherDz:t}}))}function b6(i,e){i.dispatchEvent(new CustomEvent(Jl,{detail:{draggedEl:e,type:Cf.OUTSIDE_OF_ANY}}))}function _6(i,e,t){i.dispatchEvent(new CustomEvent(Mf,{detail:{indexObj:e,draggedEl:t}}))}function w6(i){window.dispatchEvent(new CustomEvent(Am,{detail:{draggedEl:i}}))}var Xi={DRAG_STARTED:"dragStarted",DRAGGED_ENTERED:Rf,DRAGGED_ENTERED_ANOTHER:"dragEnteredAnother",DRAGGED_OVER_INDEX:Mf,DRAGGED_LEFT:Jl,DRAGGED_LEFT_ALL:"draggedLeftAll",DROPPED_INTO_ZONE:"droppedIntoZone",DROPPED_INTO_ANOTHER:"droppedIntoAnother",DROPPED_OUTSIDE_OF_ANY:"droppedOutsideOfAny",DRAG_STOPPED:"dragStopped"},dn={POINTER:"pointer",KEYBOARD:"keyboard"},If="isDndShadowItem",Dm="data-is-dnd-shadow-item-internal",k6="data-is-dnd-shadow-item-hint",ec="id:dnd-shadow-placeholder-0000",S6="dnd-action-dragged-el",bi="id",wm=0;function Kb(){wm++}function Jb(){if(wm===0)throw new Error("Bug! trying to decrement when there are no dropzones");wm--}var Qm=typeof window>"u",Be=function(){};function km(i){var e,t=i.getBoundingClientRect(),n=getComputedStyle(i),r=n.transform;if(r){var s,o,a,l;if(r.startsWith("matrix3d("))e=r.slice(9,-1).split(/, /),s=+e[0],o=+e[5],a=+e[12],l=+e[13];else if(r.startsWith("matrix("))e=r.slice(7,-1).split(/, /),s=+e[0],o=+e[3],a=+e[4],l=+e[5];else return t;var c=n.transformOrigin,u=t.x-a-(1-s)*parseFloat(c),f=t.y-l-(1-o)*parseFloat(c.slice(c.indexOf(" ")+1)),d=s?t.width/s:i.offsetWidth,h=o?t.height/o:i.offsetHeight;return{x:u,y:f,width:d,height:h,top:f,right:u+d,bottom:f+h,left:u}}else return t}function e_(i){var e=km(i);return{top:e.top+window.scrollY,bottom:e.bottom+window.scrollY,left:e.left+window.scrollX,right:e.right+window.scrollX}}function t_(i){var e=i.getBoundingClientRect();return{top:e.top+window.scrollY,bottom:e.bottom+window.scrollY,left:e.left+window.scrollX,right:e.right+window.scrollX}}function i_(i){return{x:(i.left+i.right)/2,y:(i.top+i.bottom)/2}}function x6(i,e){return Math.sqrt(Math.pow(i.x-e.x,2)+Math.pow(i.y-e.y,2))}function Nf(i,e){return i.y<=e.bottom&&i.y>=e.top&&i.x>=e.left&&i.x<=e.right}function Yl(i){return i_(t_(i))}function qb(i,e){var t=Yl(i),n=e_(e);return Nf(t,n)}function P6(i,e){var t=Yl(i),n=Yl(e);return x6(t,n)}function C6(i){var e=t_(i);return e.right<0||e.left>document.documentElement.scrollWidth||e.bottom<0||e.top>document.documentElement.scrollHeight}var Pa;function Rm(){Be(function(){return"resetting indexes cache"}),Pa=new Map}Rm();function E6(i){var e=Array.from(i.children).findIndex(function(t){return t.getAttribute(Dm)});if(e>=0)return Pa.has(i)||Pa.set(i,new Map),Pa.get(i).set(e,e_(i.children[e])),e}function T6(i,e){if(!qb(i,e))return null;var t=e.children;if(t.length===0)return{index:0,isProximityBased:!0};for(var n=E6(e),r=0;r1&&arguments[1]!==void 0?arguments[1]:0;return i.parentElement?n_(i.parentElement,e+1):e-1}function A6(i,e){if(Object.keys(i).length!==Object.keys(e).length)return!1;for(var t in i)if(!{}.hasOwnProperty.call(e,t)||e[t]!==i[t])return!1;return!0}function D6(i,e){if(i.length!==e.length)return!1;for(var t=0;t2&&arguments[2]!==void 0?arguments[2]:Q6,n=arguments.length>3?arguments[3]:void 0,r,s,o=!1,a,l=Array.from(e).sort(function(u,f){return Ef(f)-Ef(u)});function c(){var u=Yl(i),f=n.multiScrollIfNeeded();if(!f&&a&&Math.abs(a.x-u.x)o.clientHeight&&(a.bottomo.clientWidth&&(a.right0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;Be(function(){return"creating multi-scroller"});var t=z6(i),n=Array.from(t).sort(function(a,l){return Ef(l)-Ef(a)}),r=I6(),s=r.scrollIfNeeded;function o(){var a=e();if(!a||!n)return!1;for(var l=n.filter(function(f){return Nf(a,f.getBoundingClientRect())||f===document.scrollingElement}),c=0;c0?o:function(){return!1}}}function Z6(i){if(!i)return[];for(var e=[],t=i;t;){var n=window.getComputedStyle(t),r=n.overflow;r.split(" ").some(function(s){return s.includes("auto")||s.includes("scroll")})&&e.push(t),t=t.parentElement}return e}function z6(i){var e=new Set,t=Kl(i),n;try{for(t.s();!(n=t.n()).done;){var r=n.value;Z6(r).forEach(function(s){return e.add(s)})}}catch(s){t.e(s)}finally{t.f()}return(document.scrollingElement.scrollHeight>document.scrollingElement.clientHeight||document.scrollingElement.scrollWidth>document.scrollingElement.clientHeight)&&e.add(document.scrollingElement),e}function q6(i){var e=i.cloneNode(!0),t=[],n=i.tagName==="SELECT",r=n?[i]:Zn(i.querySelectorAll("select")),s=Kl(r),o;try{for(s.s();!(o=s.n()).done;){var a=o.value;t.push(a.value)}}catch(S){s.e(S)}finally{s.f()}if(r.length>0)for(var l=n?[e]:Zn(e.querySelectorAll("select")),c=0;c0)for(var m=h?[e]:Zn(e.querySelectorAll("canvas")),g=0;g1&&arguments[1]!==void 0?arguments[1]:function(){},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return[]};i.forEach(function(n){var r=e(n);Object.keys(r).forEach(function(s){n.style[s]=r[s]}),t(n).forEach(function(s){return n.classList.add(s)})})}function Tf(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return[]};i.forEach(function(n){var r=e(n);Object.keys(r).forEach(function(s){n.style[s]=""}),t(n).forEach(function(s){return n.classList.contains(s)&&n.classList.remove(s)})})}function Y6(i){var e=i.style.minHeight;i.style.minHeight=window.getComputedStyle(i).getPropertyValue("height");var t=i.style.minWidth;return i.style.minWidth=window.getComputedStyle(i).getPropertyValue("width"),function(){i.style.minHeight=e,i.style.minWidth=t}}var H6="--any--",G6=100,K6=20,$b=3,Fb={outline:"rgba(255, 255, 102, 0.7) solid 2px"},Bb="data-is-dnd-original-dragged-item",or,Pi,fn,jf,Wt,Zf,zs,xi,js,wn,Do=!1,Mm=!1,Im,tc=!1,Xl=[],cr=new Map,li=new Map,bm=new WeakMap;function J6(i,e){Be(function(){return"registering drop-zone if absent"}),cr.has(e)||cr.set(e,new Set),cr.get(e).has(i)||(cr.get(e).add(i),Kb())}function Vb(i,e){cr.get(e).delete(i),Jb(),cr.get(e).size===0&&cr.delete(e)}function e7(){Be(function(){return"watching dragged element"});var i=cr.get(jf),e=Kl(i),t;try{for(e.s();!(t=e.n()).done;){var n=t.value;n.addEventListener(Rf,a_),n.addEventListener(Jl,l_),n.addEventListener(Mf,c_)}}catch(a){e.e(a)}finally{e.f()}window.addEventListener(Am,Aa);var r=Math.max.apply(Math,Zn(Array.from(i.keys()).map(function(a){return li.get(a).dropAnimationDurationMs}))),s=r===0?K6:Math.max(r,G6),o=j6(i,function(){return wn});R6(Pi,i,s*1.07,o)}function t7(){Be(function(){return"unwatching dragged element"});var i=cr.get(jf),e=Kl(i),t;try{for(e.s();!(t=e.n()).done;){var n=t.value;n.removeEventListener(Rf,a_),n.removeEventListener(Jl,l_),n.removeEventListener(Mf,c_)}}catch(r){e.e(r)}finally{e.f()}window.removeEventListener(Am,Aa),M6()}function zf(i){return i.findIndex(function(e){return!!e[If]})}function i7(i){var e;return Pf(Pf({},i),{},(e={},Ea(e,If,!0),Ea(e,bi,ec),e))}function a_(i){Be(function(){return["dragged entered",i.currentTarget,i.detail]});var e=li.get(i.currentTarget),t=e.items,n=e.dropFromOthersDisabled;if(n&&i.currentTarget!==Wt){Be(function(){return"ignoring dragged entered because drop is currently disabled"});return}if(tc=!1,t=t.filter(function(u){return u[bi]!==zs[bi]}),Be(function(){return"dragged entered items ".concat(Nr(t))}),Wt!==i.currentTarget){var r=li.get(Wt).items,s=r.filter(function(u){return!u[If]});qs(Wt,s,{trigger:Xi.DRAGGED_ENTERED_ANOTHER,id:fn[bi],source:dn.POINTER})}var o=i.detail.indexObj,a=o.index,l=o.isProximityBased,c=l&&a===i.currentTarget.children.length-1?a+1:a;xi=i.currentTarget,t.splice(c,0,zs),qs(i.currentTarget,t,{trigger:Xi.DRAGGED_ENTERED,id:fn[bi],source:dn.POINTER})}function l_(i){if(Do){Be(function(){return["dragged left",i.currentTarget,i.detail]});var e=li.get(i.currentTarget),t=e.items,n=e.dropFromOthersDisabled;if(n&&i.currentTarget!==Wt&&i.currentTarget!==xi){Be(function(){return"drop is currently disabled"});return}var r=Zn(t),s=zf(r);s!==-1&&r.splice(s,1);var o=xi;xi=void 0;var a=i.detail,l=a.type,c=a.theOtherDz;if(l===Cf.OUTSIDE_OF_ANY||l===Cf.LEFT_FOR_ANOTHER&&c!==Wt&&li.get(c).dropFromOthersDisabled){Be(function(){return"dragged left all, putting shadow element back in the origin dz"}),tc=!0,xi=Wt;var u=o===Wt?r:Zn(li.get(Wt).items);u.splice(Zf,0,zs),qs(Wt,u,{trigger:Xi.DRAGGED_LEFT_ALL,id:fn[bi],source:dn.POINTER})}qs(i.currentTarget,r,{trigger:Xi.DRAGGED_LEFT,id:fn[bi],source:dn.POINTER})}}function c_(i){Be(function(){return["dragged is over index",i.currentTarget,i.detail]});var e=li.get(i.currentTarget),t=e.items,n=e.dropFromOthersDisabled;if(n&&i.currentTarget!==Wt){Be(function(){return"drop is currently disabled"});return}var r=Zn(t);tc=!1;var s=i.detail.indexObj.index,o=zf(r);o!==-1&&r.splice(o,1),r.splice(s,0,zs),qs(i.currentTarget,r,{trigger:Xi.DRAGGED_OVER_INDEX,id:fn[bi],source:dn.POINTER})}function Af(i){i.preventDefault();var e=i.touches?i.touches[0]:i;wn={x:e.clientX,y:e.clientY},Pi.style.transform="translate3d(".concat(wn.x-js.x,"px, ").concat(wn.y-js.y,"px, 0)")}function Aa(){Be(function(){return"dropped"}),Mm=!0,window.removeEventListener("mousemove",Af),window.removeEventListener("touchmove",Af),window.removeEventListener("mouseup",Aa),window.removeEventListener("touchend",Aa),t7(),B6(Pi),xi||(Be(function(){return"element was dropped right after it left origin but before entering somewhere else"}),xi=Wt),Be(function(){return["dropped in dz",xi]});var i=li.get(xi),e=i.items,t=i.type;Tf(cr.get(t),function(s){return li.get(s).dropTargetStyle},function(s){return li.get(s).dropTargetClasses});var n=zf(e);n===-1&&xi===Wt&&(n=Zf),e=e.map(function(s){return s[If]?fn:s});function r(){Im(),Ta(xi,e,{trigger:tc?Xi.DROPPED_OUTSIDE_OF_ANY:Xi.DROPPED_INTO_ZONE,id:fn[bi],source:dn.POINTER}),xi!==Wt&&Ta(Wt,li.get(Wt).items,{trigger:Xi.DROPPED_INTO_ANOTHER,id:fn[bi],source:dn.POINTER}),n!==-1&&U6(xi.children[n]),s7()}n7(n,r)}function n7(i,e){var t=i>-1?km(xi.children[i]):km(xi),n={x:t.left-parseFloat(Pi.style.left),y:t.top-parseFloat(Pi.style.top)},r=li.get(xi),s=r.dropAnimationDurationMs,o="transform ".concat(s,"ms ease");Pi.style.transition=Pi.style.transition?Pi.style.transition+","+o:o,Pi.style.transform="translate3d(".concat(n.x,"px, ").concat(n.y,"px, 0)"),window.setTimeout(e,s)}function r7(i,e){Xl.push({dz:i,destroy:e}),window.requestAnimationFrame(function(){o_(i),document.body.appendChild(i)})}function s7(){Pi.remove(),or.remove(),Xl.length&&(Be(function(){return["will destroy zones that were removed during drag",Xl]}),Xl.forEach(function(i){var e=i.dz,t=i.destroy;t(),e.remove()}),Xl=[]),Pi=void 0,or=void 0,fn=void 0,jf=void 0,Wt=void 0,Zf=void 0,zs=void 0,xi=void 0,js=void 0,wn=void 0,Do=!1,Mm=!1,Im=void 0,tc=!1}function o7(i,e){var t=!1,n={items:void 0,type:void 0,flipDurationMs:0,dragDisabled:!1,morphDisabled:!1,dropFromOthersDisabled:!1,dropTargetStyle:Fb,dropTargetClasses:[],transformDraggedElement:function(){},centreDraggedOnCursor:!1};Be(function(){return["dndzone good to go options: ".concat(Nr(e),", config: ").concat(Nr(n)),{node:i}]});var r=new Map;function s(){window.addEventListener("mousemove",l,{passive:!1}),window.addEventListener("touchmove",l,{passive:!1,capture:!1}),window.addEventListener("mouseup",a,{passive:!1}),window.addEventListener("touchend",a,{passive:!1})}function o(){window.removeEventListener("mousemove",l),window.removeEventListener("touchmove",l),window.removeEventListener("mouseup",a),window.removeEventListener("touchend",a)}function a(d){o(),or=void 0,js=void 0,wn=void 0,d.type==="touchend"&&d.target.click()}function l(d){d.preventDefault();var h=d.touches?d.touches[0]:d;wn={x:h.clientX,y:h.clientY},(Math.abs(wn.x-js.x)>=$b||Math.abs(wn.y-js.y)>=$b)&&(o(),u())}function c(d){if(d.target!==d.currentTarget&&(d.target.value!==void 0||d.target.isContentEditable)){Be(function(){return"won't initiate drag on a nested input element"});return}if(d.button){Be(function(){return"ignoring none left click button: ".concat(d.button)});return}if(Do){Be(function(){return"cannot start a new drag before finalizing previous one"});return}d.preventDefault(),d.stopPropagation();var h=d.touches?d.touches[0]:d;js={x:h.clientX,y:h.clientY},wn=Pf({},js),or=d.currentTarget,s()}function u(){Be(function(){return["drag start config: ".concat(Nr(n)),or]}),Do=!0;var d=r.get(or);Zf=d,Wt=or.parentElement;var h=Wt.closest("dialog")||Wt.getRootNode(),p=h.body||h,m=n.items,g=n.type,O=n.centreDraggedOnCursor,w=Zn(m);fn=w[d],jf=g,zs=i7(fn),Pi=F6(or,O&&wn),or.setAttribute(Bb,!0);function S(){Pi.parentElement?window.requestAnimationFrame(S):(p.appendChild(Pi),Pi.focus(),e7(),o_(or),p.appendChild(or),zs[bi]=fn[bi])}window.requestAnimationFrame(S),xf(Array.from(cr.get(n.type)).filter(function(C){return C===Wt||!li.get(C).dropFromOthersDisabled}),function(C){return li.get(C).dropTargetStyle},function(C){return li.get(C).dropTargetClasses}),w.splice(d,1,zs),Im=Y6(Wt),qs(Wt,w,{trigger:Xi.DRAG_STARTED,id:fn[bi],source:dn.POINTER}),window.addEventListener("mousemove",Af,{passive:!1}),window.addEventListener("touchmove",Af,{passive:!1,capture:!1}),window.addEventListener("mouseup",Aa,{passive:!1}),window.addEventListener("touchend",Aa,{passive:!1})}function f(d){var h=d.items,p=h===void 0?void 0:h,m=d.flipDurationMs,g=m===void 0?0:m,O=d.type,w=O===void 0?H6:O,S=d.dragDisabled,C=S===void 0?!1:S,k=d.morphDisabled,_=k===void 0?!1:k,P=d.dropFromOthersDisabled,x=P===void 0?!1:P,R=d.dropTargetStyle,Z=R===void 0?Fb:R,Q=d.dropTargetClasses,D=Q===void 0?[]:Q,E=d.transformDraggedElement,j=E===void 0?function(){}:E,z=d.centreDraggedOnCursor,q=z===void 0?!1:z;n.dropAnimationDurationMs=g,n.type&&w!==n.type&&Vb(i,n.type),n.type=w,n.items=Zn(p),n.dragDisabled=C,n.morphDisabled=_,n.transformDraggedElement=j,n.centreDraggedOnCursor=q,t&&Do&&!Mm&&(!A6(Z,n.dropTargetStyle)||!D6(D,n.dropTargetClasses))&&(Tf([i],function(){return n.dropTargetStyle},function(){return D}),xf([i],function(){return Z},function(){return D})),n.dropTargetStyle=Z,n.dropTargetClasses=Zn(D);function G(ue,B){return li.get(ue)?li.get(ue)[B]:n[B]}t&&Do&&n.dropFromOthersDisabled!==x&&(x?Tf([i],function(ue){return G(ue,"dropTargetStyle")},function(ue){return G(ue,"dropTargetClasses")}):xf([i],function(ue){return G(ue,"dropTargetStyle")},function(ue){return G(ue,"dropTargetClasses")})),n.dropFromOthersDisabled=x,li.set(i,n),J6(i,w);for(var Y=zf(n.items),ce=0;ce".concat(e,"

"),t.style.display="none",t.style.position="fixed",t.style.zIndex="-5",t}function Ca(i){if(!Qm){ai||Pm(),ai.innerHTML="";var e=document.createTextNode(i);ai.appendChild(e),ai.style.display="none",ai.style.display="inline"}}var f7="--any--",Wb={outline:"rgba(255, 255, 102, 0.7) solid 2px"},jn=!1,Cm,Ii,Qo="",Ao,ar,Zs="",Df=new WeakSet,Xb=new WeakMap,Ub=new WeakMap,Em=new Map,Si=new Map,lr=new Map,Qf;function d7(i,e){Be(function(){return"registering drop-zone if absent"}),lr.size===0&&(Be(function(){return"adding global keydown and click handlers"}),Qf=l7(),window.addEventListener("keydown",f_),window.addEventListener("click",d_)),lr.has(e)||lr.set(e,new Set),lr.get(e).has(i)||(lr.get(e).add(i),Kb())}function Yb(i,e){Be(function(){return"unregistering drop-zone"}),Ii===i&&Gl(),lr.get(e).delete(i),Jb(),lr.get(e).size===0&&lr.delete(e),lr.size===0&&(Be(function(){return"removing global keydown and click handlers"}),window.removeEventListener("keydown",f_),window.removeEventListener("click",d_),Qf=void 0,c7())}function f_(i){if(jn)switch(i.key){case"Escape":{Gl();break}}}function d_(){jn&&(Df.has(document.activeElement)||(Be(function(){return"clicked outside of any draggable"}),Gl()))}function h7(i){if(Be(function(){return"zone focus"}),!!jn){var e=i.currentTarget;if(e!==Ii){Qo=e.getAttribute("aria-label")||"";var t=Si.get(Ii),n=t.items,r=n.find(function(f){return f[bi]===ar}),s=n.indexOf(r),o=n.splice(s,1)[0],a=Si.get(e),l=a.items,c=a.autoAriaDisabled;e.getBoundingClientRect().top0&&arguments[0]!==void 0?arguments[0]:!0;Be(function(){return"drop"}),Si.get(Ii).autoAriaDisabled||Ca("Stopped dragging item ".concat(Zs)),Df.has(document.activeElement)&&document.activeElement.blur(),i&&qs(Ii,Si.get(Ii).items,{trigger:Xi.DRAG_STOPPED,id:ar,source:dn.KEYBOARD}),Tf(lr.get(Cm),function(e){return Si.get(e).dropTargetStyle},function(e){return Si.get(e).dropTargetClasses}),Ao=null,ar=null,Zs="",Cm=null,Ii=null,Qo="",jn=!1,h_()}function p7(i,e){var t={items:void 0,type:void 0,dragDisabled:!1,zoneTabIndex:0,zoneItemTabIndex:0,dropFromOthersDisabled:!1,dropTargetStyle:Wb,dropTargetClasses:[],autoAriaDisabled:!1};function n(u,f,d){u.length<=1||u.splice(d,1,u.splice(f,1,u[d])[0])}function r(u){switch(Be(function(){return["handling key down",u.key]}),u.key){case"Enter":case" ":{if((u.target.disabled!==void 0||u.target.href||u.target.isContentEditable)&&!Df.has(u.target))return;u.preventDefault(),u.stopPropagation(),jn?Gl():s(u);break}case"ArrowDown":case"ArrowRight":{if(!jn)return;u.preventDefault(),u.stopPropagation();var f=Si.get(i),d=f.items,h=Array.from(i.children),p=h.indexOf(u.currentTarget);Be(function(){return["arrow down",p]}),p0&&(t.autoAriaDisabled||Ca("Moved item ".concat(Zs," to position ").concat(w," in the list ").concat(Qo)),n(g,w,w-1),Ta(i,g,{trigger:Xi.DROPPED_INTO_ZONE,id:ar,source:dn.KEYBOARD}));break}}}function s(u){Be(function(){return"drag start"}),a(u.currentTarget),Ii=i,Cm=t.type,jn=!0;var f=Array.from(lr.get(t.type)).filter(function(h){return h===Ii||!Si.get(h).dropFromOthersDisabled});if(xf(f,function(h){return Si.get(h).dropTargetStyle},function(h){return Si.get(h).dropTargetClasses}),!t.autoAriaDisabled){var d="Started dragging item ".concat(Zs,". Use the arrow keys to move it within its list ").concat(Qo);f.length>1&&(d+=", or tab to another list in order to move the item into it"),Ca(d)}qs(i,Si.get(i).items,{trigger:Xi.DRAG_STARTED,id:ar,source:dn.KEYBOARD}),h_()}function o(u){jn&&u.currentTarget!==Ao&&(u.stopPropagation(),Gl(!1),s(u))}function a(u){var f=Si.get(i),d=f.items,h=Array.from(i.children),p=h.indexOf(u);Ao=u,Ao.tabIndex=t.zoneItemTabIndex,ar=d[p][bi],Zs=h[p].getAttribute("aria-label")||""}function l(u){var f=u.items,d=f===void 0?[]:f,h=u.type,p=h===void 0?f7:h,m=u.dragDisabled,g=m===void 0?!1:m,O=u.zoneTabIndex,w=O===void 0?0:O,S=u.zoneItemTabIndex,C=S===void 0?0:S,k=u.dropFromOthersDisabled,_=k===void 0?!1:k,P=u.dropTargetStyle,x=P===void 0?Wb:P,R=u.dropTargetClasses,Z=R===void 0?[]:R,Q=u.autoAriaDisabled,D=Q===void 0?!1:Q;t.items=Zn(d),t.dragDisabled=g,t.dropFromOthersDisabled=_,t.zoneTabIndex=w,t.zoneItemTabIndex=C,t.dropTargetStyle=x,t.dropTargetClasses=Z,t.autoAriaDisabled=D,t.type&&p!==t.type&&Yb(i,t.type),t.type=p,d7(i,p),D||(i.setAttribute("aria-disabled",g),i.setAttribute("role","list"),i.setAttribute("aria-describedby",g?Qf.DND_ZONE_DRAG_DISABLED:Qf.DND_ZONE_ACTIVE)),Si.set(i,t),jn?i.tabIndex=i===Ii||Ao.contains(i)||t.dropFromOthersDisabled||Ii&&t.type!==Si.get(Ii).type?-1:0:i.tabIndex=t.zoneTabIndex,i.addEventListener("focus",h7);for(var E=function(q){var G=i.children[q];Df.add(G),G.tabIndex=jn?-1:t.zoneItemTabIndex,D||G.setAttribute("role","listitem"),G.removeEventListener("keydown",Xb.get(G)),G.removeEventListener("click",Ub.get(G)),g||(G.addEventListener("keydown",r),Xb.set(G,r),G.addEventListener("click",o),Ub.set(G,o)),jn&&t.items[q][bi]===ar&&(Be(function(){return["focusing on",{i:q,focusedItemId:ar}]}),Ao=G,Ao.tabIndex=t.zoneItemTabIndex,G.focus())},j=0;j0&&console.warn("dndzone will ignore unknown options",p),!e)throw new Error("no 'items' key provided to dndzone");var m=e.find(function(g){return!{}.hasOwnProperty.call(g,bi)});if(m)throw new Error("missing '".concat(bi,"' property for item ").concat(Nr(m)));if(u&&!Array.isArray(u))throw new Error("dropTargetClasses should be an array but instead it is a ".concat(Ul(u),", ").concat(Nr(u)));if(a&&!Gb(a))throw new Error("zoneTabIndex should be a number but instead it is a ".concat(Ul(a),", ").concat(Nr(a)));if(l&&!Gb(l))throw new Error("zoneItemTabIndex should be a number but instead it is a ".concat(Ul(l),", ").concat(Nr(l)))}function Gb(i){return!isNaN(i)&&function(e){return(e|0)===e}(parseFloat(i))}function Da(i){let e=i-1;return e*e*e+1}function jr(i,{from:e,to:t},n={}){let r=getComputedStyle(i),s=r.transform==="none"?"":r.transform,[o,a]=r.transformOrigin.split(" ").map(parseFloat),l=e.left+e.width*o/t.width-(t.left+o),c=e.top+e.height*a/t.height-(t.top+a),{delay:u=0,duration:f=h=>Math.sqrt(h)*120,easing:d=Da}=n;return{delay:u,duration:Ge(f)?f(Math.sqrt(l*l+c*c)):f,easing:d,css:(h,p)=>{let m=p*l,g=p*c,O=h+p*e.width/t.width,w=h+p*e.height/t.height;return`transform: ${s} translate(${m}px, ${g}px) scale(${O}, ${w});`}}}function O7(i){se(i,"svelte-mzbbdu",".no-creatures.svelte-mzbbdu{margin:1rem;text-align:center}.initiative-tracker-table.svelte-mzbbdu{padding:0.5rem;align-items:center;gap:0.25rem 0.5rem;width:100%;margin-left:0rem;table-layout:fixed;border-collapse:separate;border-spacing:0 2px}.left.svelte-mzbbdu{text-align:left}.center.svelte-mzbbdu{text-align:center}.tracker-table-header.svelte-mzbbdu{font-weight:bolder;display:contents}.initiative-tracker-creature.svelte-mzbbdu{position:relative}.initiative-tracker-creature.active.svelte-mzbbdu{background-color:rgba(0, 0, 0, 0.1)}.theme-dark .initiative-tracker-creature.active.svelte-mzbbdu{background-color:rgba(255, 255, 255, 0.1)}.initiative-tracker-creature.disabled.svelte-mzbbdu *{color:var(--text-faint)}.initiative-tracker-creature.svelte-mzbbdu td{border-top:1px solid transparent;border-bottom:1px solid transparent}.initiative-tracker-creature.svelte-mzbbdu td:first-child{border-left:1px solid transparent}.initiative-tracker-creature.svelte-mzbbdu td:last-child{border-right:1px solid transparent}.initiative-tracker-creature.svelte-mzbbdu:hover td,.initiative-tracker-creature.viewing.svelte-mzbbdu td{border-top:1px solid var(--background-modifier-border);border-bottom:1px solid var(--background-modifier-border)}.initiative-tracker-creature.svelte-mzbbdu:hover td:first-child,.initiative-tracker-creature.viewing.svelte-mzbbdu td:first-child{border-left:1px solid var(--background-modifier-border)}.initiative-tracker-creature.svelte-mzbbdu:hover td:last-child,.initiative-tracker-creature.viewing.svelte-mzbbdu td:last-child{border-right:1px solid var(--background-modifier-border)}")}function p_(i,e,t){let n=i.slice();return n[19]=e[t].creature,n[20]=e[t].id,n}function v7(i){let e;return{c(){e=b("div"),e.innerHTML="

Add a creature to get started!

Players may be created in settings.",v(e,"class","no-creatures svelte-mzbbdu")},m(t,n){A(t,e,n)},p:X,i:X,o:X,d(t){t&&T(e)}}}function y7(i){let e,t,n,r,s,o,a,l,c,u,f,d,h,p,m,g=[],O=new Map,w,S,C,k,_=fe(i[1]),P=x=>x[20];for(let x=0;x<_.length;x+=1){let R=p_(i,_,x),Z=P(R);O.set(Z,g[x]=m_(Z,R))}return{c(){e=b("thead"),t=b("td"),r=M(),s=b("th"),s.textContent="Name",o=M(),a=b("th"),c=M(),u=b("th"),d=M(),h=b("th"),p=M(),m=b("tbody");for(let x=0;x{o[u]=null}),De(),n=o[t],n?n.p(l,c):(n=o[t]=s[t](l),n.c()),$(n,1),n.m(e,null))},i(l){r||($(n),r=!0)},o(l){V(n),r=!1},d(l){l&&T(e),o[t].d()}}}var Nm=300;function _7(i,e,t){let n,r,s,o;Se(i,he,_=>t(18,r=_));let a=Ue("plugin"),{state:l,ordered:c}=he;Se(i,l,_=>t(2,o=_)),Se(i,c,_=>t(0,s=_));let u=Fe(),f=_=>{(0,ic.setIcon)(_,an)},d=_=>{(0,ic.setIcon)(_,ir)};function h(_){t(1,n=_.detail.items)}function p(_){if(_.detail.items.length>1){let P=_.detail.items.find(({id:R})=>R==_.detail.info.id),x=_.detail.items.findIndex(R=>R.id==_.detail.info.id);x==_.detail.items.length-1?P.creature.initiative=_.detail.items[x-1].creature.initiative:P.creature.initiative=_.detail.items[x+1].creature.initiative,he.logNewInitiative(P.creature)}t(1,n=_.detail.items),Ke(he,r=[...n.map(({creature:P},x)=>(P.manualOrder=x,P))],r)}let m=_=>{new ic.ExtraButtonComponent(_).setIcon(Qs)},g=_=>he.roll(a);function O(_){ht.call(this,i,_)}function w(_){ht.call(this,i,_)}function S(_){ht.call(this,i,_)}function C(_){ht.call(this,i,_)}let k=(_,P)=>{u("open-combatant",{creature:_,newLeaf:P.ctrlKey||P.metaKey}),P.stopPropagation()};return i.$$.update=()=>{i.$$.dirty&1&&t(1,n=[...s].map(_=>({creature:_,id:xt()})))},[s,n,o,a,l,c,u,f,d,h,p,m,g,O,w,S,C,k]}var jm=class extends ne{constructor(e){super(),re(this,e,_7,b7,ie,{},O7)}},g_=jm;function Qa(i){return Object.prototype.toString.call(i)==="[object Date]"}function Zm(i,e,t,n){if(typeof t=="number"||Qa(t)){let r=n-t,s=(t-e)/(i.dt||1/60),o=i.opts.stiffness*r,a=i.opts.damping*s,l=(o-a)*i.inv_mass,c=(s+l)*i.dt;return Math.abs(c)Zm(i,e[s],t[s],n[s]));if(typeof t=="object"){let r={};for(let s in t)r[s]=Zm(i,e[s],t[s],n[s]);return r}else throw new Error(`Cannot spring ${typeof t} values`)}}function O_(i,e={}){let t=$e(i),{stiffness:n=.15,damping:r=.8,precision:s=.01}=e,o,a,l,c=i,u=i,f=1,d=0,h=!1;function p(g,O={}){u=g;let w=l={};return i==null||O.hard||m.stiffness>=1&&m.damping>=1?(h=!0,o=ds(),c=g,t.set(i=u),Promise.resolve()):(O.soft&&(d=1/((O.soft===!0?.5:+O.soft)*60),f=0),a||(o=ds(),h=!1,a=Rs(S=>{if(h)return h=!1,a=null,!1;f=Math.min(f+d,1);let C={inv_mass:f,opts:m,settled:!0,dt:(S-o)*60/1e3},k=Zm(C,c,i,u);return o=S,c=i,t.set(i=k),C.settled&&(a=null),!C.settled})),new Promise(S=>{a.promise.then(()=>{w===l&&S()})}))}let m={set:p,update:(g,O)=>p(g(u,i),O),subscribe:t.subscribe,stiffness:n,damping:r,precision:s};return m}function zm(i,e){if(i===e||i!==i)return()=>i;let t=typeof i;if(t!==typeof e||Array.isArray(i)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(i)){let n=e.map((r,s)=>zm(i[s],r));return r=>n.map(s=>s(r))}if(t==="object"){if(!i||!e)throw new Error("Object cannot be null");if(Qa(i)&&Qa(e)){i=i.getTime(),e=e.getTime();let s=e-i;return o=>new Date(i+o*s)}let n=Object.keys(e),r={};return n.forEach(s=>{r[s]=zm(i[s],e[s])}),s=>{let o={};return n.forEach(a=>{o[a]=r[a](s)}),o}}if(t==="number"){let n=e-i;return r=>i+r*n}throw new Error(`Cannot interpolate ${t} values`)}function v_(i,e={}){let t=$e(i),n,r=i;function s(o,a){if(i==null)return t.set(i=o),Promise.resolve();r=o;let l=n,c=!1,{delay:u=0,duration:f=400,easing:d=Nn,interpolate:h=zm}=ti(ti({},e),a);if(f===0)return l&&(l.abort(),l=null),t.set(i=r),Promise.resolve();let p=ds()+u,m;return n=Rs(g=>{if(gf?(t.set(i=o),!1):(t.set(i=m(d(O/f))),!0)}),n.promise}return{set:s,update:(o,a)=>s(o(r,i),a),subscribe:t.subscribe}}function w7(i){se(i,"svelte-137y560",".difficulty-bar-container.svelte-137y560{display:grid;grid-template-columns:auto 1fr auto;gap:0.5rem;align-items:center;padding:0 0.5rem;margin-bottom:0.5rem;width:100%}.difficulty-bar.svelte-137y560{width:100%;border:1px solid #ccc;border-radius:3px}")}function k7(i){let e,t,n=(i[0].labels?.[0]??"")+"",r,s,o,a,l,c,u=(i[0].labels?.last()??"")+"",f;return{c(){e=b("div"),t=b("span"),r=ae(n),s=M(),o=b("span"),a=b("meter"),l=M(),c=b("span"),f=ae(u),v(a,"class","difficulty-bar svelte-137y560"),v(a,"min","0"),v(a,"low","0.33"),v(a,"high","0.66"),v(a,"optimum","0"),a.value=i[2],v(e,"class","difficulty-bar-container svelte-137y560"),v(e,"aria-label",i[1])},m(d,h){A(d,e,h),y(e,t),y(t,r),y(e,s),y(e,o),y(o,a),y(e,l),y(e,c),y(c,f)},p(d,[h]){h&1&&n!==(n=(d[0].labels?.[0]??"")+"")&&me(r,n),h&4&&(a.value=d[2]),h&1&&u!==(u=(d[0].labels?.last()??"")+"")&&me(f,u),h&2&&v(e,"aria-label",d[1])},i:X,o:X,d(d){d&&T(e)}}}function S7(i,e,t){let n,r,s,{difficulty:o}=he,a=Ue("plugin"),l=o(a);Se(i,l,u=>t(0,r=u));let c=v_(0,{duration:400,easing:Da});return Se(i,c,u=>t(2,s=u)),i.$$.update=()=>{i.$$.dirty&1&&r.thresholds.last().minValue>0&&c.set(Math.min(r.difficulty.value/r.thresholds.last().minValue,1)),i.$$.dirty&1&&t(1,n=r.difficulty.summary)},[r,n,s,l,c]}var qm=class extends ne{constructor(e){super(),re(this,e,S7,k7,ie,{},w7)}},y_=qm;function x7(i){se(i,"svelte-1uuf6mm",".initiave-tracker-party.svelte-1uuf6mm{padding:0 0.5rem;margin:0}.initiative-tracker-name-container.svelte-1uuf6mm{display:flex;justify-content:space-between;align-items:center;padding:0 0.5rem;margin:0;margin-bottom:0.5rem}.initiative-tracker-name.svelte-1uuf6mm{margin:0}.initiative-tracker-round-container.svelte-1uuf6mm{padding:0 0.5rem}")}function b_(i){let e,t;return{c(){e=b("h2"),t=ae(i[0]),v(e,"class","initiative-tracker-name svelte-1uuf6mm")},m(n,r){A(n,e,r),y(e,t)},p(n,r){r&1&&me(t,n[0])},d(n){n&&T(e)}}}function __(i){let e,t=i[9].formatDifficultyValue(i[1]?.difficulty?.value,!0)+"",n;return{c(){e=b("span"),n=ae(t),v(e,"class","initiative-tracker-xp encounter-xp")},m(r,s){A(r,e,s),y(e,n)},p(r,s){s&2&&t!==(t=r[9].formatDifficultyValue(r[1]?.difficulty?.value,!0)+"")&&me(n,t)},d(r){r&&T(e)}}}function w_(i){let e,t;return e=new y_({}),{c(){ye(e.$$.fragment)},m(n,r){Oe(e,n,r),t=!0},i(n){t||($(e.$$.fragment,n),t=!0)},o(n){V(e.$$.fragment,n),t=!1},d(n){ve(e,n)}}}function k_(i){let e,t;return{c(){e=b("h4"),t=ae(i[2]),v(e,"class","initiave-tracker-party svelte-1uuf6mm")},m(n,r){A(n,e,r),y(e,t)},p(n,r){r&4&&me(t,n[2])},d(n){n&&T(e)}}}function S_(i){let e,t,n,r,s;return{c(){e=b("div"),t=b("small"),n=b("em"),r=ae("Round "),s=ae(i[4]),v(e,"class","initiative-tracker-round-container svelte-1uuf6mm")},m(o,a){A(o,e,a),y(e,t),y(t,n),y(n,r),y(n,s)},p(o,a){a&16&&me(s,o[4])},d(o){o&&T(e)}}}function P7(i){let e,t,n,r,s,o,a,l=i[0]&&i[0].length&&b_(i),c=i[1]?.difficulty?.value>0&&__(i),u=i[1]&&w_(i),f=i[2]&&k_(i),d=i[3]&&S_(i);return{c(){e=b("div"),t=b("div"),l&&l.c(),n=M(),c&&c.c(),r=M(),u&&u.c(),s=M(),f&&f.c(),o=M(),d&&d.c(),v(t,"class","initiative-tracker-name-container svelte-1uuf6mm"),v(e,"class","initiatie-tracker-metadata")},m(h,p){A(h,e,p),y(e,t),l&&l.m(t,null),y(t,n),c&&c.m(t,null),y(e,r),u&&u.m(e,null),y(e,s),f&&f.m(e,null),y(e,o),d&&d.m(e,null),a=!0},p(h,[p]){h[0]&&h[0].length?l?l.p(h,p):(l=b_(h),l.c(),l.m(t,n)):l&&(l.d(1),l=null),h[1]?.difficulty?.value>0?c?c.p(h,p):(c=__(h),c.c(),c.m(t,null)):c&&(c.d(1),c=null),h[1]?u?p&2&&$(u,1):(u=w_(h),u.c(),$(u,1),u.m(e,s)):u&&(Ae(),V(u,1,1,()=>{u=null}),De()),h[2]?f?f.p(h,p):(f=k_(h),f.c(),f.m(e,o)):f&&(f.d(1),f=null),h[3]?d?d.p(h,p):(d=S_(h),d.c(),d.m(e,null)):d&&(d.d(1),d=null)},i(h){a||($(u),a=!0)},o(h){V(u),a=!1},d(h){h&&T(e),l&&l.d(),c&&c.d(),u&&u.d(),f&&f.d(),d&&d.d()}}}function C7(i,e,t){let n,r,s,o,a,{state:l,name:c,round:u,party:f,difficulty:d}=he;Se(i,l,g=>t(3,o=g)),Se(i,c,g=>t(0,n=g)),Se(i,u,g=>t(4,a=g)),Se(i,f,g=>t(2,s=g));let h=Ue("plugin"),p=ki(h),m=d(h);return Se(i,m,g=>t(1,r=g)),[n,r,s,o,a,l,c,u,f,p,m]}var Lm=class extends ne{constructor(e){super(),re(this,e,C7,P7,ie,{},x7)}},x_=Lm;var $m=require("obsidian");function E7(i){se(i,"svelte-1ud8n4x",".saving-container.svelte-1ud8n4x.svelte-1ud8n4x{padding:0.5rem}.saving-encounter.svelte-1ud8n4x.svelte-1ud8n4x{display:flex;align-items:center;justify-content:space-between}.save-buttons.svelte-1ud8n4x.svelte-1ud8n4x{margin-top:1rem;display:flex;justify-content:flex-end;gap:1rem}.save-buttons.svelte-1ud8n4x>div.svelte-1ud8n4x{display:flex;align-items:center}.save-buttons.svelte-1ud8n4x .clickable-icon{margin:0}.save-buttons.svelte-1ud8n4x>.save.svelte-1ud8n4x .clickable-icon.is-disabled{cursor:not-allowed;color:var(--text-faint)}")}function P_(i){let e;return{c(){e=b("span"),e.innerHTML="An encounter by that name already exists. Are you sure?",v(e,"class","checking")},m(t,n){A(t,e,n)},d(t){t&&T(e)}}}function T7(i){let e,t,n,r,s,o,a,l,c,u,f,d,h,p,m,g=i[1]&&P_(i);return{c(){e=b("div"),t=b("div"),n=b("span"),n.textContent="Save encounter as:",r=M(),s=b("input"),o=M(),a=b("div"),g&&g.c(),l=M(),c=b("div"),f=M(),d=b("div"),v(s,"type","text"),v(t,"class","saving-encounter svelte-1ud8n4x"),v(c,"class","save svelte-1ud8n4x"),v(d,"class","cancel svelte-1ud8n4x"),v(a,"class","save-buttons svelte-1ud8n4x"),v(e,"class","saving-container svelte-1ud8n4x")},m(O,w){A(O,e,w),y(e,t),y(t,n),y(t,r),y(t,s),Xe(s,i[0]),y(e,o),y(e,a),g&&g.m(a,null),y(a,l),y(a,c),y(a,f),y(a,d),p||(m=[U(s,"input",i[6]),U(s,"input",i[3]),H(u=i[4].call(null,c)),H(h=i[5].call(null,d))],p=!0)},p(O,[w]){w&1&&s.value!==O[0]&&Xe(s,O[0]),O[1]?g||(g=P_(O),g.c(),g.m(a,l)):g&&(g.d(1),g=null)},i:X,o:X,d(O){O&&T(e),g&&g.d(),p=!1,de(m)}}}function A7(i,e,t){let n,{name:r}=he;Se(i,r,p=>t(8,n=p));let s=n,o=Ue("plugin"),a,l=()=>{s?.length&&a.disabled?a.setDisabled(!1):!s?.length&&!a.disabled&&a.setDisabled(!0)},c=!1,u=p=>{a=new $m.ExtraButtonComponent(p).setIcon(Al).setDisabled(!(s!=null&&s?.length>0)).onClick(async()=>{s&&s in o.data.encounters&&!c?t(1,c=!0):(o.addEncounter(s,{...he.getEncounterState(),name:s,rollHP:o.data.rollHP,timestamp:Date.now()}),await o.saveSettings(),f("cancel"))})},f=Fe(),d=p=>{new $m.ExtraButtonComponent(p).setIcon("cross").onClick(()=>{f("cancel")})};function h(){s=this.value,t(0,s)}return[s,c,r,l,u,d,h]}var Fm=class extends ne{constructor(e){super(),re(this,e,A7,T7,ie,{},E7)}},C_=Fm;var qf=require("obsidian");function D7(i){se(i,"svelte-vsvyan",".controls.svelte-vsvyan.svelte-vsvyan{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--background-modifier-border)}.controls.svelte-vsvyan h4.svelte-vsvyan{margin:0}.loading-container.svelte-vsvyan.svelte-vsvyan{display:flex;flex-flow:column nowrap;gap:0.5rem;padding:0.5rem;height:100%}.loading-container.svelte-vsvyan .clickable-icon{margin:0}.encounter-container.svelte-vsvyan.svelte-vsvyan{height:100%;display:flex;flex-flow:column nowrap;gap:1rem;overflow-y:auto}.no-encounters.svelte-vsvyan.svelte-vsvyan{color:var(--text-muted);display:flex;justify-content:center}.encounter.svelte-vsvyan.svelte-vsvyan{display:flex;justify-content:space-between;align-items:center}.encounter-controls.svelte-vsvyan.svelte-vsvyan{display:flex;align-items:center;gap:1rem}")}function E_(i,e,t){let n=i.slice();return n[7]=e[t],n}function T_(i){let e;return{c(){e=b("span"),e.innerHTML="There are no saved encounters.",v(e,"class","no-encounters svelte-vsvyan")},m(t,n){A(t,e,n)},d(t){t&&T(e)}}}function A_(i,e){let t,n,r=e[7]+"",s,o,a,l,c,u,f,d,h,p,m;return{key:i,first:null,c(){t=b("div"),n=b("span"),s=ae(r),o=M(),a=b("div"),l=b("div"),u=M(),f=b("div"),h=M(),v(a,"class","encounter-controls svelte-vsvyan"),v(t,"class","encounter svelte-vsvyan"),this.first=t},m(g,O){A(g,t,O),y(t,n),y(n,s),y(t,o),y(t,a),y(a,l),y(a,u),y(a,f),y(t,h),p||(m=[H(c=e[3].call(null,l,e[7])),H(d=e[4].call(null,f,e[7]))],p=!0)},p(g,O){e=g,O&1&&r!==(r=e[7]+"")&&me(s,r),c&&Ge(c.update)&&O&1&&c.update.call(null,e[7]),d&&Ge(d.update)&&O&1&&d.update.call(null,e[7])},d(g){g&&T(t),p=!1,de(m)}}}function Q7(i){let e,t,n,r,s,o,a,l,c=!i[0]||!Object.keys(i[0])?.length,u,f=[],d=new Map,h,p,m=c&&T_(i),g=fe(Object.keys(i[0])),O=w=>w[7];for(let w=0;w{new qf.ExtraButtonComponent(u).setIcon("cross").setTooltip("Cancel")},a=(u,f)=>{new qf.ExtraButtonComponent(u).setIcon("open-elsewhere-glyph").setTooltip("Load Encounter").onClick(()=>{he.new(s,n[f]),r("cancel")})},l=(u,f)=>{new qf.ExtraButtonComponent(u).setIcon("trash").setTooltip("Delete Encounter").onClick(()=>{s.removeEncounter(f),t(0,n=s.data.encounters)})},c=()=>r("cancel");return t(0,n=s.data.encounters),[n,r,o,a,l,c]}var Bm=class extends ne{constructor(e){super(),re(this,e,R7,Q7,ie,{},D7)}},D_=Bm;var Ia=require("obsidian");var ur=require("obsidian");function M7(i){se(i,"svelte-1u2coj9",".input.svelte-1u2coj9.svelte-1u2coj9{display:flex;align-items:center;gap:0.5rem}.is-disabled{cursor:not-allowed}.input-status.svelte-1u2coj9.svelte-1u2coj9{display:flex;justify-content:space-between}.input.svelte-1u2coj9>div.svelte-1u2coj9,.input-status.svelte-1u2coj9>div.svelte-1u2coj9,td.svelte-1u2coj9.svelte-1u2coj9:has(> svg),th.svelte-1u2coj9.svelte-1u2coj9:has(> svg){display:flex;align-items:center}.status-list.svelte-1u2coj9.svelte-1u2coj9{display:flex;margin:0.5rem 0 0.1rem 0}.status-list-entries.svelte-1u2coj9.svelte-1u2coj9{display:flex;flex-flow:row wrap;column-gap:0.25rem;margin:0 2rem 0 0.5rem}.left.svelte-1u2coj9.svelte-1u2coj9{text-align:left}.center.svelte-1u2coj9.svelte-1u2coj9{text-align:center}.updating-hp.svelte-1u2coj9.svelte-1u2coj9{display:flex;flex-flow:column;gap:0.5rem}.updating-container.svelte-1u2coj9.svelte-1u2coj9{display:flex;flex-flow:column nowrap;gap:0.5rem}.hp-status.svelte-1u2coj9.svelte-1u2coj9{display:flex;flex-flow:column}.updating-buttons.svelte-1u2coj9.svelte-1u2coj9{display:flex;justify-content:flex-end;gap:1rem;margin-right:0.7rem}td.svelte-1u2coj9>input.svelte-1u2coj9{margin:0}")}function Q_(i,e,t){let n=i.slice();return n[39]=e[t][0],n[40]=e[t][1],n[41]=e,n[42]=t,n}function R_(i,e,t){let n=i.slice();return n[0]=e[t],n}function I7(i){let e,t,n;return{c(){e=b("div")},m(r,s){A(r,e,s),t||(n=U(e,"load",i[36]),t=!0)},p:X,i:X,o:X,d(r){r&&T(e),t=!1,n()}}}function N7(i){let e,t,n,r,s,o,a,l,c,u,f,d,h,p,m,g,O,w,S,C,k,_=[Z7,j7],P=[];function x(D,E){return D[4]=="hp"?0:1}t=x(i,[-1,-1]),n=P[t]=_[t](i);let R=i[4]=="hp"&&N_(i),Z=fe([...i[6].entries()]),Q=[];for(let D=0;D{P[j]=null}),De(),n=P[t],n?n.p(D,E):(n=P[t]=_[t](D),n.c()),$(n,1),n.m(e,null)),D[4]=="hp"?R||(R=N_(D),R.c(),R.m(a,null)):R&&(R.d(1),R=null),E[0]&120){Z=fe([...D[6].entries()]);let z;for(z=0;z{E=null}),De())},i(j){x||($(E),x=!0)},o(j){V(E),x=!1},d(j){j&&T(e),Q&&Q.d(),D&&D.d(),E&&E.d(),R=!1,de(Z)}}}function z7(i){let e;return{c(){e=b("small"),e.textContent="Set AC",v(e,"class","label")},m(t,n){A(t,e,n)},d(t){t&&T(e)}}}function q7(i){let e;return{c(){e=b("small"),e.textContent="Apply damage, (-)healing, (t)temp HP, or (m)max HP",v(e,"class","label")},m(t,n){A(t,e,n)},d(t){t&&T(e)}}}function L7(i){let e;return{c(){e=b("small"),e.textContent=`Apply status effect to creatures that fail their + saving throw`,v(e,"class","label")},m(t,n){A(t,e,n)},d(t){t&&T(e)}}}function M_(i){let e,t,n,r,s,o,a,l,c=fe(i[5]),u=[];for(let d=0;dV(u[d],1,1,()=>{u[d]=null});return{c(){e=b("div"),t=b("div"),r=M(),s=b("div");for(let d=0;d{o[u]=null}),De(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),$(t,1),t.m(n.parentNode,n))},i(l){r||($(t),r=!0)},o(l){V(t),r=!1},d(l){l&&T(n),o[e].d(l)}}}var F7=function(i){if(i.key==="Escape"){this.value="1";return}if(i.key==="Enter"){i.preventDefault();return}};function B7(i,e,t){let n,r,s,{updating:o,updateTarget:a}=he;Se(i,o,oe=>t(6,s=oe)),Se(i,a,oe=>t(4,n=oe));let l=Ue("plugin"),c=oe=>{(0,ur.setIcon)(oe,an)},u=oe=>{(0,ur.setIcon)(oe,ir)},f=oe=>{(0,ur.setIcon)(oe,Bp)},d,h=oe=>{t(22,d=new ur.ExtraButtonComponent(oe).setIcon("plus-circle"))},p=oe=>{(0,ur.setIcon)(oe,Vu)},m=oe=>{(0,ur.setIcon)(oe,"check")},g=oe=>{(0,ur.setIcon)(oe,"cross-in-box")},O="",w="",S=null,C=$e([]);Se(i,C,oe=>t(5,r=oe));let k=()=>{S&&(Ke(C,r=[...r,{...l.data.statuses.find(oe=>oe.name==S)??{name:S,id:xt(),description:""}}],r),t(0,S=null),t(3,_.items=l.data.statuses.filter(oe=>!r.find(ke=>ke.id==oe.id)).map(oe=>oe.name),_),P.setValue(""))},_,P,x=oe=>{P=new ur.TextComponent(oe),P.onChange(ke=>t(0,S=ke)),oe.onkeydown=ke=>{ke.key==="Enter"&&(S?k():Q(!0))},R()},R=()=>{t(3,_=new ef(l.app,P,l.data.statuses.filter(oe=>!r.find(ke=>ke.id==oe.id)).map(oe=>oe.name))),_.onSelect(async({item:oe})=>{t(0,S=oe),P.setValue(oe),_.close(),k()})};function Z(oe,ke){n==ke&&oe.focus()}let Q=oe=>{oe?he.doUpdate(O??"",r,w):he.clearUpdate(),t(1,O=null),t(0,S=null),t(2,w=null),Ke(C,r=[],r),t(3,_=null),Ke(a,n=null,n)};function D(){O=this.value,t(1,O)}let E=function(oe){if(oe.key=="Tab")return!0;if(oe.key=="Enter"||oe.key=="Escape"){Q(oe.key=="Enter");return}if(!/^((t|m)?-?\d*\.?\d*(Backspace|Delete|Arrow\w+)?)$/.test(this.value+oe.key))return oe.preventDefault(),!1},j=function(oe){Ke(C,r=[],r)},z=function(oe,ke){r.remove(oe),C.set(r)};function q(){w=this.value,t(2,w)}let G=function(){t(3,_=null)},Y=function(oe){if(oe.key=="Tab")return!0;if(oe.key=="Enter"||oe.key=="Escape"){Q(oe.key=="Enter");return}},ce=function(oe,ke,yt,It){Ke(o,ke[yt][1].saved=!oe.saved,s)},Pe=function(oe,ke,yt,It){Ke(o,ke[yt][1].resist=!oe.resist,s)};function ue(oe,ke){oe[ke][1].customMod=pi(this.value)}let B=function(oe,ke){he.setUpdate(oe,ke),s.size||(Ke(C,r=[],r),t(3,_=null))},ee=()=>Q(!0),pe=()=>Q(!1),Re=()=>Q(!1);return i.$$.update=()=>{i.$$.dirty[0]&4194305&&d&&d.setDisabled(!S)},[S,O,w,_,n,r,s,o,a,l,c,u,f,h,p,m,g,C,k,x,Z,Q,d,D,E,j,z,q,G,Y,ce,Pe,ue,B,ee,pe,Re]}var Vm=class extends ne{constructor(e){super(),re(this,e,B7,$7,ie,{},M7,[-1,-1])}},z_=Vm;var Ra=require("obsidian");var nc=class{constructor(e){this.plugin=e;J(this,"logFile");J(this,"file");J(this,"logging",!1)}async setLogFile(e){this.logFile=e,this.logging=!0,await this.setFile()}getLogFile(){return this.logFile?(0,Ra.normalizePath)(this.logFile):""}async setFile(){let e=await this.adapter.exists((0,Ra.normalizePath)(this.logFile))?await this.vault.getAbstractFileByPath((0,Ra.normalizePath)(this.logFile)):await this.vault.create(this.logFile,"");e instanceof Ra.TFile&&(this.file=e)}getFile(){return this.file}get enabled(){return this.plugin.data.logging}get folder(){return this.plugin.data.logFolder}get vault(){return this.plugin.app.vault}get adapter(){return this.plugin.app.vault.adapter}async new(e){if(this.enabled)if(typeof e=="string")await this.setLogFile(e);else{await this.setLogFile(`${this.folder}/${Date.now()} - ${e.name??"Combat"}.md`),await this.log(`**Combat started ${new Date().toLocaleString()}** + +`),await this.log("## Players"),await this.log("| Player | Initiative | HP | Statuses |"),await this.log("| --- | :-: | :-: | :-: |");for(let t of e.players.sort((n,r)=>r.initiative-n.initiative))await this.log("|",t.getName().replace("|","\\|"),"|",t.initiative.toString(),"|",t.hp?`${t.hp}/${t.max}`:"-","|",[...t.status.size?[...t.status].map(n=>n.name):["-"]].join(", ").replace("|","\\|"),"|");await this.log("## Creatures"),await this.log("| Creature | Initiative | HP | Statuses |"),await this.log("| --- | :-: | :-: | :-: |");for(let t of e.creatures.sort((n,r)=>r.initiative-n.initiative))await this.log("|",t.getName().replace("|","\\|"),"|",t.initiative.toString(),"|",t.hp?`${t.hp}/${t.max}`:"-","|",[...t.status.size?[...t.status].map(n=>n.name):["-"]].join(", ").replace("|","\\|"),"|");await this.log(` + +## Combat Log`),await this.log(` +### Round 1`),await this.log(` +##### ${he.getOrderedCreatures()[0].getName()}'s turn`)}}async log(...e){this.enabled&&this.file&&(await this.adapter.exists(this.logFile)||await this.setLogFile(this.logFile),await this.vault.append(this.file,`${e.join(" ")} +`))}join(e,t="and"){return e.length==1?e[0]:`${e.slice(0,-1).join(", ")} ${t} ${e.slice(-1)}`}logUpdate(e){let t=[];for(let n of e){let r=[];if(n.hp&&(n.temp?r.push(`${n.name} gained ${(-1*n.hp).toString()} temporary HP`):n.max?n.hp<0?r.push(`${n.name} took ${(-1*n.hp).toString()} max HP damage${n.unc?" and died":""}`):r.push(`${n.name} gained ${n.hp.toString()} max HP`):n.hp<0?r.push(`${n.name} took ${(-1*n.hp).toString()} damage${n.unc?" and was knocked unconscious":""}`):n.hp>0&&r.push(`${n.name} was healed for ${n.hp.toString()} HP`)),n.ac&&(r.length&&!n.status?r.push("and"):r.length&&r.push(","),n.ac_add?r.push(`${n.name} added ${n.ac} to AC`):r.push(`${n.name} AC set to ${n.ac?n.ac:"be blank"}`)),n.status){r.length?r.push("and"):r.push(n.name);let s;n.status.length>1?(s=[n.status.slice(0,n.status.length-1).join(", ")],s.push(n.status[n.status.length-1])):s=[n.status[0]],n.saved?r.push(`saved against ${s.join(" and ")}`):r.push(`took ${s.join(" and ")} status`)}if(n.remove_status){r.length?r.push("and"):r.push(n.name);let s;n.remove_status.length>1?(s=[n.remove_status.slice(0,n.remove_status.length-1).join(", ")],s.push(n.remove_status[n.remove_status.length-1])):s=[n.remove_status[0]],r.push(`relieved of ${s.join(" and ")} status`)}t.push(r.join(" "))}this.log(`${t.join(". ")}.`)}};var Ma=require("obsidian");var hn=require("obsidian");var _i=require("obsidian");function V7(i){se(i,"svelte-1rjv45j",".create-new.svelte-1rjv45j>.svelte-1rjv45j{display:grid;grid-template-columns:33% 66%;margin-bottom:0.5rem}.context-buttons.svelte-1rjv45j.svelte-1rjv45j{display:flex;justify-content:flex-end;align-items:center;grid-gap:0.125rem}.cancel-button.svelte-1rjv45j.svelte-1rjv45j{color:var(--text-faint)}.initiative.svelte-1rjv45j.svelte-1rjv45j{position:relative}.initiative.svelte-1rjv45j>.dice.svelte-1rjv45j{position:absolute;right:0.25rem;top:50%;transform:translateY(-50%)}")}function q_(i){let e,t,n,r,s,o,a,l,c,u,f,d,h,p,m,g,O,w,S;return{c(){e=b("div"),t=b("label"),t.textContent="Static Initiative",n=M(),r=b("div"),o=M(),a=b("div"),l=b("label"),l.textContent="Hidden",c=M(),u=b("div"),d=M(),h=b("div"),p=b("label"),p.textContent="Friendly",m=M(),g=b("div"),v(t,"for","add-mod"),v(e,"class","svelte-1rjv45j"),v(l,"for","add-mod"),v(a,"class","svelte-1rjv45j"),v(p,"for","add-mod"),v(h,"class","svelte-1rjv45j")},m(C,k){A(C,e,k),y(e,t),y(e,n),y(e,r),A(C,o,k),A(C,a,k),y(a,l),y(a,c),y(a,u),A(C,d,k),A(C,h,k),y(h,p),y(h,m),y(h,g),w||(S=[H(s=i[14].call(null,r)),H(f=i[13].call(null,u)),H(O=i[15].call(null,g))],w=!0)},p:X,d(C){C&&(T(e),T(o),T(a),T(d),T(h)),w=!1,de(S)}}}function L_(i){let e,t,n,r,s,o;function a(u,f){return u[7]?X7:W7}let l=a(i,-1),c=l(i);return{c(){e=b("div"),t=b("div"),r=M(),c.c(),v(t,"class","add-button cancel-button svelte-1rjv45j"),v(e,"class","context-buttons svelte-1rjv45j")},m(u,f){A(u,e,f),y(e,t),y(e,r),c.m(e,null),s||(o=H(n=i[10].call(null,t)),s=!0)},p(u,f){l!==(l=a(u,f))&&(c.d(1),c=l(u),c&&(c.c(),c.m(e,null)))},d(u){u&&T(e),c.d(),s=!1,o()}}}function W7(i){let e,t,n,r;return{c(){e=b("div"),v(e,"class","add-button")},m(s,o){A(s,e,o),n||(r=H(t=i[8].call(null,e)),n=!0)},d(s){s&&T(e),n=!1,r()}}}function X7(i){let e,t,n,r;return{c(){e=b("div"),v(e,"class","add-button")},m(s,o){A(s,e,o),n||(r=H(t=i[9].call(null,e)),n=!0)},d(s){s&&T(e),n=!1,r()}}}function U7(i){let e,t,n,r,s,o,a,l,c,u,f,d,h,p,m,g,O,w,S,C,k,_,P,x,R,Z,Q,D,E,j,z,q,G,Y,ce,Pe,ue,B,ee,pe,Re,oe=i[4],ke,yt,It,at,Nt,Pr,nn,$t,Tt=q_(i),lt=!i[3]&&!_i.Platform.isMobile&&L_(i);return{c(){e=b("div"),t=b("div"),n=b("div"),r=b("label"),r.textContent="Creature",s=M(),o=b("div"),l=M(),c=b("div"),u=b("label"),u.textContent="Display Name",f=M(),d=b("input"),h=M(),p=b("div"),m=b("label"),m.textContent="HP",g=M(),O=b("input"),w=M(),S=b("div"),C=b("label"),C.textContent="Hit Dice",k=M(),_=b("input"),P=M(),x=b("div"),R=b("label"),R.textContent="AC",Z=M(),Q=b("input"),D=M(),E=b("div"),j=b("label"),j.textContent="Modifier",z=M(),q=b("input"),G=M(),Y=b("div"),ce=b("label"),ce.textContent="Initiative",Pe=M(),ue=b("input"),B=M(),ee=b("div"),Re=M(),Tt.c(),ke=M(),yt=b("div"),It=b("label"),It.textContent="Amount",at=M(),Nt=b("input"),Pr=M(),lt&<.c(),v(r,"for","add-name"),v(o,"id","add-name"),v(n,"class","svelte-1rjv45j"),v(u,"for","add-display"),v(d,"id","add-display"),v(d,"type","text"),v(d,"name","display"),v(d,"tabindex","0"),v(c,"class","svelte-1rjv45j"),v(m,"for","add-hp"),v(O,"id","add-hp"),v(O,"type","number"),v(O,"name","hp"),v(O,"tabindex","0"),v(p,"class","svelte-1rjv45j"),v(C,"for","hit-dice"),v(_,"id","hit-dice"),v(_,"type","text"),v(_,"name","hitdice"),v(_,"tabindex","0"),v(S,"class","svelte-1rjv45j"),v(R,"for","add-ac"),v(Q,"id","add-ac"),v(Q,"name","ac"),v(Q,"type","text"),v(Q,"tabindex","0"),v(x,"class","svelte-1rjv45j"),v(j,"for","add-mod"),v(q,"id","add-mod"),v(q,"type","text"),v(q,"name","add-mod"),v(q,"tabindex","0"),v(E,"class","svelte-1rjv45j"),v(ce,"for","add-init"),v(ue,"id","add-init"),v(ue,"type","number"),v(ue,"name","initiative"),v(ue,"tabindex","0"),v(ee,"class","dice svelte-1rjv45j"),v(Y,"class","initiative svelte-1rjv45j"),v(It,"for","add-init"),v(Nt,"id","add-init"),v(Nt,"type","number"),v(Nt,"name","initiative"),v(Nt,"tabindex","0"),v(yt,"class","amount svelte-1rjv45j"),v(t,"class","create-new svelte-1rjv45j"),v(e,"class","initiative-tracker-editor")},m(dt,gt){A(dt,e,gt),y(e,t),y(t,n),y(n,r),y(n,s),y(n,o),y(t,l),y(t,c),y(c,u),y(c,f),y(c,d),Xe(d,i[4].display),i[19](d),y(t,h),y(t,p),y(p,m),y(p,g),y(p,O),Xe(O,i[4].hp),y(t,w),y(t,S),y(S,C),y(S,k),y(S,_),Xe(_,i[4].hit_dice),y(t,P),y(t,x),y(x,R),y(x,Z),y(x,Q),Xe(Q,i[4].ac),y(t,D),y(t,E),y(E,j),y(E,z),y(E,q),Xe(q,i[5]),y(t,G),y(t,Y),y(Y,ce),y(Y,Pe),y(Y,ue),Xe(ue,i[4].initiative),y(Y,B),y(Y,ee),y(t,Re),Tt.m(t,null),y(t,ke),y(t,yt),y(yt,It),y(yt,at),y(yt,Nt),Xe(Nt,i[0]),y(e,Pr),lt&<.m(e,null),nn||($t=[H(a=i[12].call(null,o)),U(d,"input",i[18]),U(O,"input",i[20]),U(_,"input",i[21]),U(Q,"input",i[22]),U(Q,"change",i[23]),U(q,"input",i[24]),U(ue,"input",i[25]),H(pe=i[11].call(null,ee)),U(Nt,"input",i[26])],nn=!0)},p(dt,[gt]){gt&16&&d.value!==dt[4].display&&Xe(d,dt[4].display),gt&16&&pi(O.value)!==dt[4].hp&&Xe(O,dt[4].hp),gt&16&&_.value!==dt[4].hit_dice&&Xe(_,dt[4].hit_dice),gt&16&&Q.value!==dt[4].ac&&Xe(Q,dt[4].ac),gt&32&&q.value!==dt[5]&&Xe(q,dt[5]),gt&16&&pi(ue.value)!==dt[4].initiative&&Xe(ue,dt[4].initiative),gt&16&&ie(oe,oe=dt[4])?(Tt.d(1),Tt=q_(dt),Tt.c(),Tt.m(t,ke)):Tt.p(dt,gt),gt&1&&pi(Nt.value)!==dt[0]&&Xe(Nt,dt[0]),!dt[3]&&!_i.Platform.isMobile?lt?lt.p(dt,gt):(lt=L_(dt),lt.c(),lt.m(e,null)):lt&&(lt.d(1),lt=null)},i:X,o:X,d(dt){dt&&T(e),i[19](null),Tt.d(dt),lt&<.d(),nn=!1,de($t)}}}function Y7(i,e,t){let n,r=X,s=()=>(r(),r=Mi(h,B=>t(7,n=B)),h),o,a=X,l=()=>(a(),a=Mi(d,B=>t(17,o=B)),d);i.$$.on_destroy.push(()=>r()),i.$$.on_destroy.push(()=>a());let c=new je({}),{amount:u=1}=e,{plugin:f}=e,{adding:d}=e;l();let{editing:h}=e;s();let{isEditing:p}=e;h.subscribe(B=>{B&&t(4,c=B)});let m=JSON.stringify(c.modifier??0),g=m,O=B=>{new _i.ExtraButtonComponent(B).setTooltip("Add Creature").setIcon("plus").onClick(async()=>{if(!c||!c.name||!c.name?.length){new _i.Notice("Enter a name!");return}try{t(4,c.modifier=JSON.parse(`${m}`),c)}catch{console.warn("Initiative Tracker: Non-parseable modifier provided to creature."),t(4,c.modifier=JSON.parse(g),c)}c.modifier||t(4,c.modifier=JSON.parse(g),c),(Array.isArray(c.modifier)&&!c.modifier.every(pe=>!isNaN(Number(pe)))||isNaN(Number(c.modifier)))&&(console.warn("Initiative Tracker: Non-numeric modifier provided to creature."),t(4,c.modifier=0,c)),(c.initiative<=0||c.initiative==null||isNaN(c.initiative))&&t(4,c.initiative=await f.getInitiativeValue(c.modifier),c);let ee=o.findIndex(([pe])=>Ns(pe,c));ee>-1?Ke(d,o[ee][1]+=u,o):o.push([c,u]),d.set(o),Ke(h,n=null,n),t(4,c=new je({}))})},w=B=>{new _i.ExtraButtonComponent(B).setTooltip("Add Creature").setIcon("save").onClick(async()=>{if(!c||!c.name||!c.name?.length){new _i.Notice("Enter a name!");return}c.modifier||t(4,c.modifier=0,c),(c.initiative<=0||c.initiative==null||isNaN(c.initiative))&&t(4,c.initiative=await f.getInitiativeValue(c.modifier),c);let ee=o.findIndex(([pe])=>pe!=c&&Ns(pe,c));if(ee>-1&&await F_(app,`This will merge ${c.name} with ${o[ee][0].name}.`)){let pe=o.findIndex(([Re])=>Re==c);Ke(d,o[ee][1]+=o[pe][1],o),o.splice(pe,1)}d.set(o),Ke(h,n=null,n),t(4,c=new je({}))})},S=B=>{new _i.ExtraButtonComponent(B).setTooltip("Cancel").setIcon("reset").onClick(()=>{t(4,c=new je({}))})},C=B=>{new _i.ExtraButtonComponent(B).setIcon(Qs).setTooltip("Roll Initiative").onClick(async()=>{t(4,c.initiative=await f.getInitiativeValue(c.modifier),c)})},k,_,P=B=>{k=new _i.TextComponent(B).setValue(c.name).onChange(ee=>t(4,c.name=ee,c))},x,R=()=>{x=new Ml(f.app,k,f.bestiary),x.onSelect(async B=>{B.item&&(t(4,c=je.from(B.item)),t(4,c.initiative=await f.getInitiativeValue(c.modifier),c),k.setValue(c.name)),x.close()})};uf(()=>{p?setImmediate(()=>{_.focus(),R()}):R()});let Z=B=>{new _i.ToggleComponent(B).setValue(c.hidden).onChange(ee=>t(4,c.hidden=ee,c))},Q=B=>{new _i.ToggleComponent(B).setValue(c.static).onChange(ee=>t(4,c.static=ee,c))},D=B=>{new _i.ToggleComponent(B).setValue(c.friendly).onChange(ee=>t(4,c.friendly=ee,c))};function E(){c.display=this.value,t(4,c)}function j(B){mi[B?"unshift":"push"](()=>{_=B,t(6,_)})}function z(){c.hp=pi(this.value),t(4,c)}function q(){c.hit_dice=this.value,t(4,c)}function G(){c.ac=this.value,t(4,c)}let Y=()=>t(4,c.dirty_ac=!0,c);function ce(){m=this.value,t(5,m)}function Pe(){c.initiative=pi(this.value),t(4,c)}function ue(){u=pi(this.value),t(0,u)}return i.$$set=B=>{"amount"in B&&t(0,u=B.amount),"plugin"in B&&t(16,f=B.plugin),"adding"in B&&l(t(1,d=B.adding)),"editing"in B&&s(t(2,h=B.editing)),"isEditing"in B&&t(3,p=B.isEditing)},i.$$.update=()=>{i.$$.dirty&131089&&_i.Platform.isMobile&&o.splice(0,1,[c,u])},[u,d,h,p,c,m,_,n,O,w,S,C,P,Z,Q,D,f,o,E,j,z,q,G,Y,ce,Pe,ue]}var Wm=class extends ne{constructor(e){super(),re(this,e,Y7,U7,ie,{amount:0,plugin:16,adding:1,editing:2,isEditing:3},V7)}},$_=Wm;var fr=require("obsidian");function H7(i){se(i,"svelte-uvd81j",".initiative-tracker-list.svelte-uvd81j{display:flex;flex:1 1 auto;flex-flow:column nowrap;height:0px;overflow:scroll}.creature.svelte-uvd81j{border-radius:0.5rem;padding:0.5rem}.creature.svelte-uvd81j:hover{background-color:var(--background-secondary)}.creature-metadata.svelte-uvd81j{display:flex;align-items:center;gap:0.5rem}.creature-amount.svelte-uvd81j{margin-left:auto;display:grid;grid-template-columns:1fr 1fr 1fr 1fr;align-items:center;text-align:center}.creature-data.svelte-uvd81j{--icon-size:10px;display:flex;align-items:center;gap:0.375rem}.list-header.svelte-uvd81j{margin-top:0;margin-bottom:0.5rem}")}function B_(i,e,t){let n=i.slice();return n[21]=e[t][0],n[22]=e[t][1],n[24]=t,n}function G7(i){let e;return{c(){e=b("span"),e.textContent="Add a creature."},m(t,n){A(t,e,n)},p:X,d(t){t&&T(e)}}}function K7(i){let e,t=fe(i[3]),n=[];for(let r=0;r(r(),r=Mi(c,D=>t(3,n=D)),c),o,a=X,l=()=>(a(),a=Mi(u,D=>t(4,o=D)),u);i.$$.on_destroy.push(()=>r()),i.$$.on_destroy.push(()=>a());let{adding:c}=e;s();let{editing:u}=e;l();let{rollHP:f}=e,d=(D,E)=>{new fr.ExtraButtonComponent(D).setIcon("minus")},h=(D,E)=>{if(n[E][1]-1<1){O(D,E);return}Ke(c,n[E][1]-=1,n),c.set(n)},p=(D,E)=>{new fr.ExtraButtonComponent(D).setIcon("plus")},m=(D,E)=>{Ke(c,n[E][1]+=1,n),c.set(n)},g=(D,E)=>{new fr.ExtraButtonComponent(D).setIcon("trash")},O=(D,E)=>{n.splice(E,1),c.set(n)},w=D=>{(0,fr.setIcon)(D,an)},S=D=>{(0,fr.setIcon)(D,cs)},C=D=>{(0,fr.setIcon)(D,ir)},k=D=>{(0,fr.setIcon)(D,So)},_=D=>{(0,fr.setIcon)(D,er)},P=D=>{(0,fr.setIcon)(D,tr)},x=(D,E)=>h(E,D),R=(D,E)=>m(E,D),Z=(D,E)=>O(E,D),Q=D=>Ke(u,o=D,o);return i.$$set=D=>{"adding"in D&&s(t(0,c=D.adding)),"editing"in D&&l(t(1,u=D.editing)),"rollHP"in D&&t(2,f=D.rollHP)},[c,u,f,n,o,d,h,p,m,g,O,w,S,C,k,_,P,x,R,Z,Q]}var Xm=class extends ne{constructor(e){super(),re(this,e,iA,tA,ie,{adding:0,editing:1,rollHP:2},H7)}},U_=Xm;function nA(i){se(i,"svelte-caa9tv",".initiative-tracker-creator.svelte-caa9tv{margin-top:1rem;display:grid;grid-template-columns:1fr 1fr;gap:0.5rem}.initiative-tracker-creator.editing.svelte-caa9tv{grid-template-columns:1fr}.buttons.svelte-caa9tv{display:flex;margin-left:auto;justify-content:flex-end;gap:0.5rem}div.disabled.svelte-caa9tv>button{cursor:not-allowed}.creator-list.svelte-caa9tv{display:flex;justify-content:space-between;flex-flow:column nowrap;gap:0.5rem;margin-bottom:0.5rem}")}function Y_(i){let e,t,n,r,s,o,a,l,c,u;return t=new U_({props:{adding:i[4],editing:i[5],rollHP:i[2]}}),{c(){e=b("div"),ye(t.$$.fragment),n=M(),r=b("div"),s=b("input"),o=M(),a=b("label"),a.textContent="Roll for HP",v(s,"type","checkbox"),v(s,"name","roll-hp"),v(s,"id","roll-hp"),v(a,"for","roll-hp"),v(e,"class","creator-list svelte-caa9tv")},m(f,d){A(f,e,d),Oe(t,e,null),y(e,n),y(e,r),y(r,s),s.checked=i[2],y(r,o),y(r,a),l=!0,c||(u=U(s,"change",i[9]),c=!0)},p(f,d){let h={};d&4&&(h.rollHP=f[2]),t.$set(h),d&4&&(s.checked=f[2])},i(f){l||($(t.$$.fragment,f),l=!0)},o(f){V(t.$$.fragment,f),l=!1},d(f){f&&T(e),ve(t),c=!1,u()}}}function rA(i){let e,t,n,r,s,o,a,l,c,u,f,d,h,p;n=new $_({props:{plugin:i[0],editing:i[5],adding:i[4],isEditing:i[1]}});let m=!i[1]&&!hn.Platform.isMobile&&Y_(i);return{c(){e=b("div"),t=b("div"),ye(n.$$.fragment),r=M(),m&&m.c(),s=M(),o=b("div"),a=b("div"),c=M(),u=b("div"),v(t,"class","initiative-tracker-creator svelte-caa9tv"),ge(t,"editing",i[1]||hn.Platform.isMobile),v(u,"class","svelte-caa9tv"),ge(u,"disabled",!i[3].length&&!i[1]&&!hn.Platform.isMobile),v(o,"class","buttons svelte-caa9tv"),v(e,"class","initiative-tracker-creator-container"),ge(e,"mobile",hn.Platform.isMobileApp)},m(g,O){A(g,e,O),y(e,t),Oe(n,t,null),y(t,r),m&&m.m(t,null),y(e,s),y(e,o),y(o,a),y(o,c),y(o,u),d=!0,h||(p=[H(l=i[6].call(null,a)),H(f=i[7].call(null,u))],h=!0)},p(g,[O]){let w={};O&1&&(w.plugin=g[0]),O&2&&(w.isEditing=g[1]),n.$set(w),!g[1]&&!hn.Platform.isMobile?m?(m.p(g,O),O&2&&$(m,1)):(m=Y_(g),m.c(),$(m,1),m.m(t,null)):m&&(Ae(),V(m,1,1,()=>{m=null}),De()),(!d||O&2)&&ge(t,"editing",g[1]||hn.Platform.isMobile),(!d||O&10)&&ge(u,"disabled",!g[3].length&&!g[1]&&!hn.Platform.isMobile)},i(g){d||($(n.$$.fragment,g),$(m),d=!0)},o(g){V(n.$$.fragment,g),V(m),d=!1},d(g){g&&T(e),ve(n),m&&m.d(),h=!1,de(p)}}}function sA(i,e,t){let n,r,s=Fe(),{plugin:o}=e,{isEditing:a=!1}=e,{creature:l=null}=e,c=o.data.rollHP,u=$e([]);Se(i,u,m=>t(3,n=m));let f=$e(l);Se(i,f,m=>t(10,r=m));let d=m=>{new hn.ButtonComponent(m).setCta().setButtonText("Cancel").onClick(()=>{s("close")})},h=m=>{new hn.ButtonComponent(m).setButtonText(a?"Save":"Add to Encounter").onClick(async()=>{if(!(!n.length&&!a&&!hn.Platform.isMobile)){if(a)r.hp!=l.max&&t(8,l.max=t(8,l.current_max=r.hp,l),l),l.dirty_ac&&(t(8,l.current_ac=r.ac,l),t(8,l.dirty_ac=!1,l)),he.replace(l,r);else{let g=n.flatMap(([O,w])=>[...Array(w).keys()].map(S=>je.new(O)));he.add(o,c,...g)}if(l?.player&&l?.path){let g=await o.app.vault.getAbstractFileByPath(l.path);g&&g instanceof hn.TFile&&o.app.fileManager.processFrontMatter(g,O=>{O.ac=l.ac,O.hp=l.max,O.level=l.level,O.modifier=l.modifier})}s("close")}})};function p(){c=this.checked,t(2,c)}return i.$$set=m=>{"plugin"in m&&t(0,o=m.plugin),"isEditing"in m&&t(1,a=m.isEditing),"creature"in m&&t(8,l=m.creature)},[o,a,c,n,u,f,d,h,l,p]}var Um=class extends ne{constructor(e){super(),re(this,e,sA,rA,ie,{plugin:0,isEditing:1,creature:8},nA)}},H_=Um;var Lf=class extends Ma.Modal{constructor(t,n){super(t.app);this.plugin=t;this.creature=n}onOpen(){this.containerEl.addClass("initiative-tracker-modal"),new H_({target:this.contentEl,props:{plugin:this.plugin,...this.creature?{creature:this.creature,isEditing:!0}:{}}}).$on("close",()=>this.close())}};async function F_(i,e,t={cta:"Yes",secondary:"No"}){return new Promise((n,r)=>{try{let s=new Ym(i,e,t);s.onClose=()=>{n(s.confirmed)},s.open()}catch{r()}})}var Ym=class extends Ma.Modal{constructor(t,n,r){super(t);this.text=n;this.buttons=r;J(this,"confirmed",!1)}async display(){this.containerEl.addClass("initiative-tracker-modal"),this.contentEl.empty(),this.contentEl.addClass("confirm-modal"),this.contentEl.createEl("p",{text:this.text});let t=this.contentEl.createDiv("confirm-buttons");new Ma.ButtonComponent(t).setButtonText(this.buttons.cta).setCta().onClick(()=>{this.confirmed=!0,this.close()}),new Ma.ButtonComponent(t).setButtonText(this.buttons.secondary).onClick(()=>{this.close()})}onOpen(){this.display()}};var Hm=require("obsidian");function oA(i){se(i,"svelte-1yp1f6q",".obsidian-initiative-tracker.svelte-1yp1f6q{margin:0.5rem;min-width:180px;overflow-y:auto}.add-creature-container.svelte-1yp1f6q{display:flex;flex-flow:column nowrap;justify-content:flex-start;margin-right:0.5rem}.context-container.svelte-1yp1f6q{display:flex;flex-flow:row nowrap;justify-content:space-between}.copy-button.svelte-1yp1f6q{width:min-content;opacity:0.25}.copy-button.svelte-1yp1f6q:hover{opacity:1}.add-button.svelte-1yp1f6q{width:min-content}.add-button.svelte-1yp1f6q .clickable-icon{margin:0}")}function aA(i){let e,t,n,r,s,o,a,l,c;return{c(){e=b("div"),t=b("div"),n=b("div"),s=M(),o=b("div"),v(n,"class","copy-button svelte-1yp1f6q"),v(o,"class","add-button svelte-1yp1f6q"),v(t,"class","context-container svelte-1yp1f6q"),v(e,"class","add-creature-container svelte-1yp1f6q")},m(u,f){A(u,e,f),y(e,t),y(t,n),y(t,s),y(t,o),l||(c=[H(r=i[7].call(null,n)),H(a=i[6].call(null,o)),U(o,"click",i[18])],l=!0)},p:X,i:X,o:X,d(u){u&&T(e),l=!1,de(c)}}}function lA(i){let e,t;return e=new D_({}),e.$on("cancel",i[17]),{c(){ye(e.$$.fragment)},m(n,r){Oe(e,n,r),t=!0},p:X,i(n){t||($(e.$$.fragment,n),t=!0)},o(n){V(e.$$.fragment,n),t=!1},d(n){ve(e,n)}}}function cA(i){let e,t;return e=new C_({}),e.$on("cancel",i[16]),{c(){ye(e.$$.fragment)},m(n,r){Oe(e,n,r),t=!0},p:X,i(n){t||($(e.$$.fragment,n),t=!0)},o(n){V(e.$$.fragment,n),t=!1},d(n){ve(e,n)}}}function uA(i){let e,t,n,r,s,o,a,l,c,u,f,d;t=new Pb({}),t.$on("save",i[9]),t.$on("load",i[10]),t.$on("add-creatures",i[11]),t.$on("player-view",i[12]),t.$on("open-map",i[13]),r=new x_({}),o=new g_({}),o.$on("edit",i[14]),o.$on("open-combatant",i[15]),l=new z_({});let h=[cA,lA,aA],p=[];function m(g,O){return g[1]?0:g[2]?1:2}return u=m(i,-1),f=p[u]=h[u](i),{c(){e=b("div"),ye(t.$$.fragment),n=M(),ye(r.$$.fragment),s=M(),ye(o.$$.fragment),a=M(),ye(l.$$.fragment),c=M(),f.c(),v(e,"class","obsidian-initiative-tracker svelte-1yp1f6q")},m(g,O){A(g,e,O),Oe(t,e,null),y(e,n),Oe(r,e,null),y(e,s),Oe(o,e,null),y(e,a),Oe(l,e,null),y(e,c),p[u].m(e,null),d=!0},p(g,[O]){let w=u;u=m(g,O),u===w?p[u].p(g,O):(Ae(),V(p[w],1,1,()=>{p[w]=null}),De(),f=p[u],f?f.p(g,O):(f=p[u]=h[u](g),f.c()),$(f,1),f.m(e,null))},i(g){d||($(t.$$.fragment,g),$(r.$$.fragment,g),$(o.$$.fragment,g),$(l.$$.fragment,g),$(f),d=!0)},o(g){V(t.$$.fragment,g),V(r.$$.fragment,g),V(o.$$.fragment,g),V(l.$$.fragment,g),V(f),d=!1},d(g){g&&T(e),ve(t),ve(r),ve(o),ve(l),p[u].d()}}}function fA(i,e,t){let n,r,s,{plugin:o}=e,{data:a}=he;Se(i,a,x=>t(8,s=x)),he.setData(o.data),he.setLogger(new nc(o)),o.data.state?he.new(o,o.data.state):(he.setParty(o.data.defaultParty,o),he.roll(o));let{ordered:l}=he;Se(i,l,x=>t(20,r=x)),Vi("plugin",o);let c=!1,u=!1,f=x=>{let R=new Lf(o,x);R.onClose=()=>{},R.open()},d=x=>{new Ia.ExtraButtonComponent(x).setTooltip("Add Creature").setIcon(zp)},h=x=>{new Ia.ExtraButtonComponent(x).setTooltip("Copy Initiative Order").setIcon(Wp).onClick(async()=>{let R=r.map(Z=>`${Z.initiative} ${Z.name}`).join(` +`);try{await navigator.clipboard.writeText(R),new Ia.Notice("Initiative order copied to clipboard.")}catch{new Ia.Notice("Initiative order could not be copied to clipboard.")}})},p=()=>t(1,c=!0),m=()=>t(2,u=!0),g=()=>f();function O(x){ht.call(this,i,x)}function w(x){ht.call(this,i,x)}let S=x=>f(x.detail),C=x=>o.openCombatant(x.detail.creature,x.detail.newLeaf),k=()=>t(1,c=!1),_=()=>t(2,u=!1),P=()=>f();return i.$$set=x=>{"plugin"in x&&t(0,o=x.plugin)},i.$$.update=()=>{i.$$.dirty&256&&(n=s.displayDifficulty)},[o,c,u,a,l,f,d,h,s,p,m,g,O,w,S,C,k,_,P]}var Gm=class extends ne{constructor(e){super(),re(this,e,fA,uA,ie,{plugin:0},oA)}},G_=Gm;var Na=class extends kn.ItemView{constructor(t,n){super(t);this.leaf=t;this.plugin=n;J(this,"ui");J(this,"playerViewOpened",!1);this.plugin.data.state?.creatures?.length}async onOpen(){this.ui=new G_({target:this.contentEl,props:{plugin:this.plugin}}),this.ui.$on("player-view",()=>this.openPlayerView())}async onClose(){this.ui?.$destroy()}getViewType(){return Mn}getDisplayText(){return"Initiative Tracker"}getIcon(){return Zp}get pcs(){return[]}get npcs(){return[]}getExistingPlayerView(){let t=this.plugin.app.workspace.getLeavesOfType(Ds);if(t.length)return t[0].view}async getPlayerView(){let t=this.getExistingPlayerView();if(t)return this.app.workspace.revealLeaf(t.leaf),t;let n=this.app.workspace.getLeaf("window");return await n.setViewState({type:Ds}),await this.app.workspace.setActiveLeaf(n,{focus:!0}),n.view}async openPlayerView(){await this.getPlayerView(),this.playerViewOpened=!0}},ja=class extends kn.ItemView{constructor(t,n){super(t);this.plugin=n;J(this,"buttonEl",this.contentEl.createDiv("creature-view-button"));J(this,"statblockEl",this.contentEl.createDiv("creature-statblock-container"));J(this,"currentCreatureId",null);J(this,"currentCreatureName",null);J(this,"bestiaryUnload",null);this.load(),this.containerEl.addClass("creature-view-container"),this.containerEl.on("mouseover","a.internal-link",(0,kn.debounce)(r=>this.app.workspace.trigger("hover-link",{event:r,source:Mn,hoverParent:this,targetEl:r.target,linktext:r.target.dataset.href??""}),10)),this.containerEl.on("click","a.internal-link",r=>this.app.workspace.openLinkText(r.target.dataset.href,"initiative-tracker"))}onload(){new kn.ExtraButtonComponent(this.buttonEl).setIcon("cross").setTooltip("Close Statblock").onClick(async()=>{await this.render(),this.app.workspace.trigger("initiative-tracker:stop-viewing")})}onunload(){this.bestiaryUnload&&(this.bestiaryUnload(),this.bestiaryUnload=null),this.app.workspace.trigger("initiative-tracker:stop-viewing")}getState(){return{creatureId:this.currentCreatureId,creatureName:this.currentCreatureName}}async setState(t,n){let r=typeof t?.creatureId=="string"?t.creatureId:null,s=typeof t?.creatureName=="string"?t.creatureName:null;if(!r&&!s){this.currentCreatureId=null,this.currentCreatureName=null,await this.render(),await super.setState(t,n);return}this.currentCreatureId=r,this.currentCreatureName=s;let o=async()=>{let a=this.plugin.tracker.getOrderedCreatures(),l=(r?a.find(c=>c.id===r):void 0)??(s?a.find(c=>c.name===s):void 0)??(s?this.plugin.playerCreatures.get(s):void 0)??(s?this.plugin.getCreatureFromBestiary(s):void 0);if(l){try{await this.render(l)}catch(c){console.error("Failed to restore creature view",c)}return}this.currentCreatureId=null,this.currentCreatureName=null,t.creatureId=null,t.creatureName=null,await this.render()};if(this.plugin.canUseStatBlocks&&!window.FantasyStatblocks.isResolved()){this.statblockEl.empty(),this.statblockEl.createEl("em",{text:"Loading bestiary\u2026"});let a=window.FantasyStatblocks.onResolved(()=>{this.bestiaryUnload=null,o().finally(a)});this.bestiaryUnload=a}else await o();await super.setState(t,n)}async render(t){if(this.currentCreatureId=t?.id??null,this.currentCreatureName=t?.name??null,this.statblockEl.empty(),!t){this.statblockEl.createEl("em",{text:"Select a creature to view it here."});return}if(t["statblock-link"]&&(this.plugin.data.preferStatblockLink||!this.plugin.canUseStatBlocks))await this.renderEmbed(t.getStatblockLink());else if(this.plugin.canUseStatBlocks){let n=window.FantasyStatblocks.render(t.creature,this.statblockEl,t.display);this.addChild(n)}else this.statblockEl.createEl("em",{text:"Install the TTRPG Statblocks plugin or add a statblock-link to your monster to use this feature!"})}async renderEmbed(t){this.plugin.canUseStatBlocks&&window.FantasyStatblocks.isStatblockLink?.(t)&&(t=window.FantasyStatblocks.parseStatblockLink(t)),/\[.+\]\(.+\)/.test(t)?[,t]=t.match(/\[.+?\]\((.+?)\)/):/\[\[.+\]\]/.test(t)&&([,t]=t.match(/\[\[(.+?)(?:\|.+?)?\]\]/));let{path:n,subpath:r}=(0,kn.parseLinktext)(t),s=this.app.metadataCache.getFirstLinkpathDest(n,"/"),o=`Oops! Something is wrong with your statblock-link:
${t}`;if(s){let a=await this.app.vault.cachedRead(s);if(r&&a){let l=this.app.metadataCache.getFileCache(s),c=(0,kn.resolveSubpath)(l,r);c&&(o=a.slice(c.start.offset,c.end.offset))}else a&&(o=a)}await kn.MarkdownRenderer.render(this.app,o,this.statblockEl.createDiv("markdown-rendered"),n,this)}getDisplayText(){return"Combatant"}getIcon(){return Ip}getViewType(){return ko}};var w5=require("obsidian");var qY=$e(0);function dA(){let i=$e([]),{subscribe:e,set:t,update:n}=i,r=oi(i,a=>a.filter(l=>l.isPlayer)),s=oi(i,a=>a.filter(l=>l.isPlayer==!1)),o=oi(i,a=>[...a].reduce((l,c)=>l+c.count,0));return{subscribe:e,party:r,generics:s,count:o,modifier:oi(o,a=>a<3?1:a>5?-1:0),average:oi(i,a=>a.length?a.reduce((l,c)=>l+(c.enabled?c.level:0),0)/a.length:0),add:a=>n(l=>((!a.count||a.count<=0)&&(a.count=1),l.push(a),l)),addFromState:a=>n(l=>{let c=a;return c.isPlayer=!0,(!c.count||c.count<=0)&&(c.count=1),l.push(c),l}),remove:a=>n(l=>(l=l.filter(c=>c!=a),l)),delete:a=>n(l=>(l=l.filter(c=>c!=a),l)),set:(a,l)=>n(c=>{let u=c.find(f=>f==a);return u.count=l,c}),setLevel:(a,l)=>n(c=>{let u=c.find(f=>f==a);return u.level=l,c}),switchParty:a=>{n(l=>(l=[...a,...ut(s)],l))},empty:()=>t([]),toggleEnabled:a=>n(l=>{let c=l.find(u=>u==a);return c.enabled=!c.enabled,l})}}var Ni=dA();var rc=require("obsidian");function hA(){let i=$e(new Map),{subscribe:e,set:t,update:n}=i;return{players:Ni,subscribe:e,add:r=>n(s=>(s.set(r,(s.get(r)??0)+1),s)),remove:r=>n(s=>{let o=s.get(r);return o&&(o==1&&s.delete(r),o>1&&s.set(r,o-1)),s}),delete:r=>n(s=>(s.delete(r),s)),set:(r,s)=>n(o=>(o.set(r,s),o)),setMultiple:r=>n(s=>{for(let[o,a]of r)s.set(o,a);return s}),empty:()=>t(new Map),update:r=>n(s=>(s.set(r,s.get(r)??1),s))}}var ii=hA();function pA(i){let e;return{c(){e=ae(i[0])},m(t,n){A(t,e,n)},p(t,[n]){n&1&&me(e,t[0])},i:X,o:X,d(t){t&&T(e)}}}function mA(i,e,t){let{str:n=We}=e;return i.$$set=r=>{"str"in r&&t(0,n=r.str)},[n]}var Km=class extends ne{constructor(e){super(),re(this,e,mA,pA,ie,{str:0})}},$f=Km;function gA(i){se(i,"svelte-ywuffm",`.creature-name-container.svelte-ywuffm{display:grid;grid-template-areas:"add name" + ". desc";justify-content:flex-start;align-items:center;grid-template-columns:auto 1fr}.creature-name.svelte-ywuffm{cursor:pointer;display:flex;justify-content:space-between}.setting-item-description.svelte-ywuffm{grid-area:desc}`)}function K_(i,e,t){let n=i.slice();return n[14]=e[t],n}function J_(i){let e,t,n,r,s;return{c(){e=b("div"),v(e,"class","contains-icon"),v(e,"aria-label",t="This creature is significantly under the average party level and might not contribute much to the fight.")},m(o,a){A(o,e,a),r||(s=H(n=i[8].call(null,e)),r=!0)},d(o){o&&T(e),r=!1,s()}}}function ew(i){let e,t,n,r,s;return{c(){e=b("div"),v(e,"class","contains-icon"),v(e,"aria-label",t="This creature is significantly over the average party level and might prove a challenge.")},m(o,a){A(o,e,a),r||(s=H(n=i[9].call(null,e)),r=!0)},d(o){o&&T(e),r=!1,s()}}}function tw(i){let e,t=nw(i[0].source)+"",n,r;return{c(){e=b("span"),n=ae(t),v(e,"aria-label",r=rw(i[0].source))},m(s,o){A(s,e,o),y(e,n)},p(s,o){o&1&&t!==(t=nw(s[0].source)+"")&&me(n,t),o&1&&r!==(r=rw(s[0].source))&&v(e,"aria-label",r)},d(s){s&&T(e)}}}function iw(i){let e,t,n;return t=new $f({props:{str:i[0][i[14].field]??We}}),{c(){e=b("td"),ye(t.$$.fragment)},m(r,s){A(r,e,s),Oe(t,e,null),n=!0},p(r,s){let o={};s&9&&(o.str=r[0][r[14].field]??We),t.$set(o)},i(r){n||($(t.$$.fragment,r),n=!0)},o(r){V(t.$$.fragment,r),n=!1},d(r){r&&T(e),ve(t)}}}function OA(i){let e,t,n,r,s,o,a,l=i[0].name+"",c,u,f,d,h,p,m,g,O,w=i[2]&&J_(i),S=i[1]&&ew(i),C=i[0].source?.length&&tw(i),k=fe(i[3]),_=[];for(let x=0;xV(_[x],1,1,()=>{_[x]=null});return{c(){e=b("tr"),t=b("td"),n=b("div"),r=b("div"),o=M(),a=b("div"),c=ae(l),u=M(),w&&w.c(),f=M(),S&&S.c(),d=M(),h=b("div"),C&&C.c(),p=M();for(let x=0;x<_.length;x+=1)_[x].c();v(a,"class","setting-item-name creature-name svelte-ywuffm"),v(h,"class","setting-item-description svelte-ywuffm"),v(n,"class","creature-name-container svelte-ywuffm"),v(e,"class","creature")},m(x,R){A(x,e,R),y(e,t),y(t,n),y(n,r),y(n,o),y(n,a),y(a,c),y(a,u),w&&w.m(a,null),y(a,f),S&&S.m(a,null),y(n,d),y(n,h),C&&C.m(h,null),y(e,p);for(let Z=0;Z<_.length;Z+=1)_[Z]&&_[Z].m(e,null);m=!0,g||(O=[H(s=i[7].call(null,r)),U(r,"click",i[11]),U(a,"click",i[12])],g=!0)},p(x,[R]){if((!m||R&1)&&l!==(l=x[0].name+"")&&me(c,l),x[2]?w||(w=J_(x),w.c(),w.m(a,f)):w&&(w.d(1),w=null),x[1]?S||(S=ew(x),S.c(),S.m(a,null)):S&&(S.d(1),S=null),x[0].source?.length?C?C.p(x,R):(C=tw(x),C.c(),C.m(h,null)):C&&(C.d(1),C=null),R&9){k=fe(x[3]);let Z;for(Z=0;ZFf(s,e++)).join(t)}${n?")":""}`);else if(typeof i=="object")for(let s of Object.values(i))r.push(Ff(s,e++));return r.join(" ")}function nw(i){if(!Array.isArray(i))return i;let e=i.slice(0,2);return i.length>2&&e.push(`and ${i.length-2} more`),Ff(e,0,", ",!1)}function rw(i){return Array.isArray(i)?Ff(i,0,", ",!1):""}function vA(i,e,t){let n,r,s,o,{players:a}=ii,{average:l}=a;Se(i,l,O=>t(10,s=O));let c=Ue("plugin"),u=Ue("table");Se(i,u,O=>t(3,o=O));let{creature:f}=e,d=O=>{new rc.ExtraButtonComponent(O).setIcon("plus-with-circle")},h=O=>(0,rc.setIcon)(O,"baby"),p=O=>(0,rc.setIcon)(O,"skull"),m=()=>ii.add(f),g=O=>c.openCombatant(je.from(f),O.ctrlKey||O.metaKey);return i.$$set=O=>{"creature"in O&&t(0,f=O.creature)},i.$$.update=()=>{i.$$.dirty&1025&&t(2,n="cr"in f&&f.cr&&hi(f.cr)s+3)},[f,r,n,o,l,c,u,d,h,p,s,m,g]}var Jm=class extends ne{constructor(e){super(),re(this,e,vA,OA,ie,{creature:0},gA)}},sw=Jm;var Kf=require("obsidian");function Bf(i,{delay:e=0,duration:t=400,easing:n=Nn}={}){let r=+getComputedStyle(i).opacity;return{delay:e,duration:t,easing:n,css:s=>`opacity: ${s*r}`}}function eg(i,{delay:e=0,duration:t=400,easing:n=Da,axis:r="y"}={}){let s=getComputedStyle(i),o=+s.opacity,a=r==="y"?"height":"width",l=parseFloat(s[a]),c=r==="y"?["top","bottom"]:["left","right"],u=c.map(O=>`${O[0].toUpperCase()}${O.slice(1)}`),f=parseFloat(s[`padding${u[0]}`]),d=parseFloat(s[`padding${u[1]}`]),h=parseFloat(s[`margin${u[0]}`]),p=parseFloat(s[`margin${u[1]}`]),m=parseFloat(s[`border${u[0]}Width`]),g=parseFloat(s[`border${u[1]}Width`]);return{delay:e,duration:t,easing:n,css:O=>`overflow: hidden;opacity: ${Math.min(O*20,1)*o};${a}: ${O*l}px;padding-${c[0]}: ${O*f}px;padding-${c[1]}: ${O*d}px;margin-${c[0]}: ${O*h}px;margin-${c[1]}: ${O*p}px;border-${c[0]}-width: ${O*m}px;border-${c[1]}-width: ${O*g}px;`}}var yA=Function.prototype.toString,tg=Object.create,bA=Object.prototype.toString,_A=function(){function i(){this._keys=[],this._values=[]}return i.prototype.has=function(e){return!!~this._keys.indexOf(e)},i.prototype.get=function(e){return this._values[this._keys.indexOf(e)]},i.prototype.set=function(e,t){this._keys.push(e),this._values.push(t)},i}();function wA(){return new _A}function kA(){return new WeakMap}var SA=typeof WeakMap<"u"?kA:wA;function ng(i){if(!i)return tg(null);var e=i.constructor;if(e===Object)return i===Object.prototype?{}:tg(i);if(e&&~yA.call(e).indexOf("[native code]"))try{return new e}catch{}return tg(i)}function xA(i){var e="";return i.global&&(e+="g"),i.ignoreCase&&(e+="i"),i.multiline&&(e+="m"),i.unicode&&(e+="u"),i.sticky&&(e+="y"),e}function PA(i){return i.flags}var CA=/test/g.flags==="g"?PA:xA;function ow(i){var e=bA.call(i);return e.substring(8,e.length-1)}function EA(i){return i[Symbol.toStringTag]||ow(i)}var TA=typeof Symbol<"u"?EA:ow,AA=Object.defineProperty,DA=Object.getOwnPropertyDescriptor,aw=Object.getOwnPropertyNames,rg=Object.getOwnPropertySymbols,lw=Object.prototype,cw=lw.hasOwnProperty,QA=lw.propertyIsEnumerable,uw=typeof rg=="function";function RA(i){return aw(i).concat(rg(i))}var MA=uw?RA:aw;function Wf(i,e,t){for(var n=MA(i),r=0,s=n.length,o=void 0,a=void 0;r{let e=$e([...i.options]),{update:t,set:n,subscribe:r}=e,s=oi(e,o=>i.options[0]==o[0]&&i.options[1]==o[1]);return{isDefault:s,getIsDefault:()=>ut(s),update:t,set:n,subscribe:r,reset:()=>n([...i.options]),compare:o=>{if(ut(s))return!0;let a=ut(e);return hi(o)>=a[0]&&hi(o)<=a[1]},filter:i,...i}};function Xf(i){return typeof i!="string"?i:i.toLowerCase()}var JA=i=>{let e=$e([]),{subscribe:t,set:n,update:r}=e,s=oi(e,o=>!o.length);return{isDefault:s,getIsDefault:()=>ut(s),subscribe:t,set:n,reset:()=>n([]),compare:o=>{if(ut(s))return!0;if(typeof o=="number")return!1;let a=ut(e);return Array.isArray(o)?o.some(l=>a.includes(Xf(l))):a.includes(Xf(o))},update:r,filter:i,...i}},eD=i=>{let e="",t=$e(e),{subscribe:n,set:r,update:s}=t,o=oi(t,l=>!l.length),a=(0,ag.prepareSimpleSearch)("");return t.subscribe(l=>a=(0,ag.prepareSimpleSearch)(l)),{isDefault:o,getIsDefault:()=>ut(o),subscribe:n,set:r,reset:()=>r(e),compare:l=>ut(o)?!0:typeof l=="number"?!1:ut(o)||a(l)!=null,update:s,filter:i,...i}};function gw(i){switch(i.type){case 2:return JA(i);case 0:return KA(i);case 1:return eD(i)}}function Ow(i,e){let t=new Map(e.map(n=>[n,new Set]));for(let n of i)for(let r of e)for(let s of r.fields)if(s in n){switch(r.type){case 0:{let o=hi(n[s]);if(o==null||isNaN(o))continue;let a=[...t.get(r)];a.length||(a[0]=1/0,a[1]=-1/0),a[0]=Math.min(a[0],o),Math.max(a[1],o)!=a[0]&&(a[1]=Math.max(a[1],o)),t.set(r,new Set(a));break}case 2:{if(Array.isArray(n[s]))for(let o of n[s])t.get(r).add(Xf(o));else typeof n[s]=="string"&&t.get(r).add(Xf(n[s]));break}case 1:continue}continue}return t}function yw(i,e){let t=k=>{let _=gw(k);return n.set(k.id,_),o.set(k.id,_.subscribe(P=>{r.update(x=>x)})),_},n=new Map,r=$e(n),s=new Map;r.subscribe(k=>{for(let[_,P]of k)s.set(_,P.filter)});let o=new Map;e.data.builder||(e.data.builder={sidebarIcon:!0,showParty:!0,showXP:!0});let a=()=>ci(e.data.builder?.filters?.layout??vw),l=()=>ci(e.data.builder?.filters?.filters??og);e.data.builder.filters||(e.data.builder.filters={filters:l(),layout:a()});let c=e.data.builder?.filters?.filters??og,u=e.data.builder?.filters?.layout??a();if(c.filter(k=>k.derive).length){let k=Ow(ut(i),c);for(let[_,P]of k)_.options=Array.from(P)}for(let k of c)t(k);let d=oi([i,r],([k,_])=>{let P=[],x=Array.from(_.values());for(let R of k)x.every(Z=>{if(!Z.filter.fields.length)return!0;for(let Q of Z.filter.fields)if(Q in R)return Z.compare(R[Q]);return!0})&&P.push(R);return P}),h=$e(u??a()),p=k=>{h.set(k),e.data.builder.filters.layout=k,e.saveSettings()},m=k=>{p(k?vw:a()),g(_=>{_.clear();let P=k?og:l();for(let x of P)t(x);return _})};function g(k){r.update(_=>{let P=k(_);return e.data.builder.filters.filters=[...P.values()].map(x=>x.filter),e.saveSettings(),P})}let O=oi(r,k=>{let _=0;for(let P of k.values())P.getIsDefault()||_++;return _}),w=t(tD),S=(k,_)=>{if(k.derive){let x=Ow(ut(i),[k]);for(let[R,Z]of x)R.options=Array.from(Z)}let P=gw(k);return _.set(k.id,P),o.set(k.id,P.subscribe(x=>r.update(R=>R))),_},C=(k,_)=>(_.delete(k),o.has(k)&&(o.get(k)(),o.delete(k)),_);return{add:k=>g(_=>S(k,_)),update:(k,_)=>g(P=>(C(k,P),S(_,P))),remove:k=>g(_=>C(k.id,_)),reset:()=>g(k=>{for(let _ of k.values())_.reset();return k}),active:O,filtered:d,filters:r,filterMap:s,layout:{subscribe:h.subscribe,set:p},resetLayout:m,getOrDefault(k){return s?.get(k)??ci(lg)},name:w}}var pH=$e(),tD={type:1,text:"Name",fields:["name"],options:"",id:"ID_DEFAULT_NAME_FILTER",derive:!1},og=[{type:0,text:"CR",fields:["cr"],options:[0,30],id:"ID_DEFAULT_CR_FILTER",derive:!0},{type:2,text:"Size",fields:["size"],options:[],id:"ID_DEFAULT_SIZE_FILTER",derive:!0},{type:2,text:"Type",fields:["type"],options:[],id:"ID_DEFAULT_TYPE_FILTER",derive:!0},{type:2,text:"Alignment",fields:["alignment"],options:[],id:"ID_DEFAULT_ALIGNMENT_FILTER",derive:!0}],vw=[{nested:[{id:"ID_DEFAULT_CR_FILTER",type:"filter"}],id:"ID_DEFAULT_NESTED_CR",type:"nested"},{id:"ID_DEFAULT_NESTED_LAYOUT",type:"nested",nested:[{id:"ID_DEFAULT_SIZE_FILTER",type:"filter"},{id:"ID_DEFAULT_TYPE_FILTER",type:"filter"},{id:"ID_DEFAULT_ALIGNMENT_FILTER",type:"filter"}]}];function iD(i){se(i,"svelte-1dlbj12",'.thumb.svelte-1dlbj12{position:absolute;top:50%;width:0;height:0}.thumb-content.svelte-1dlbj12{position:relative;width:fit-content;height:fit-content;transform:translate(-50%, -50%)}.thumb-content.svelte-1dlbj12::before{content:"";position:absolute;width:200%;height:200%;transform:translate(-25%, -25%) scale(0);border-radius:100vh;background:var(--interactive-hover);opacity:30%;transition:transform 100ms ease-in-out}.thumb-content.active.svelte-1dlbj12::before{transform:translate(-25%, -25%) scale(1)}')}function nD(i){let e,t,n,r,s,o,a,l=i[4].default,c=Gt(l,i,i[3],null);return{c(){e=b("div"),t=b("div"),c&&c.c(),v(t,"class","thumb-content svelte-1dlbj12"),ge(t,"active",i[1]),v(e,"class","thumb svelte-1dlbj12"),v(e,"style",n=`left: ${i[0]*100}%;`)},m(u,f){A(u,e,f),y(e,t),c&&c.m(t,null),s=!0,o||(a=[H(r=rD.call(null,e)),U(e,"dragstart",i[6]),U(e,"drag",i[7]),U(e,"dragend",i[8]),U(e,"click",Vt(i[5]))],o=!0)},p(u,[f]){c&&c.p&&(!s||f&8)&&Jt(c,l,u,u[3],s?Kt(l,u[3],f,null):ei(u[3]),null),(!s||f&2)&&ge(t,"active",u[1]),(!s||f&1&&n!==(n=`left: ${u[0]*100}%;`))&&v(e,"style",n)},i(u){s||($(c,u),s=!0)},o(u){V(c,u),s=!1},d(u){u&&T(e),c&&c.d(u),o=!1,de(a)}}}function rD(i){let e=sD(i);return i.addEventListener("touchstart",e),i.addEventListener("mousedown",e),{destroy(){i.removeEventListener("touchstart",e),i.removeEventListener("mousedown",e)}}}function sD(i){let e=oD(i);return function(t){t.preventDefault(),i.dispatchEvent(new CustomEvent("dragstart"));let n="touches"in t?"touchmove":"mousemove",r="touches"in t?"touchend":"mouseup";document.addEventListener(n,e),document.addEventListener(r,s);function s(o){o.stopPropagation(),document.removeEventListener(n,e),document.removeEventListener(r,s),i.dispatchEvent(new CustomEvent("dragend"))}}}function oD(i){let e=i.parentElement;return function(t){let{left:n,width:r}=e.getBoundingClientRect(),s="touches"in t?t.touches[0].clientX:t.clientX,o=Math.min(Math.max((s-n)/r,0),1)||0;i.dispatchEvent(new CustomEvent("drag",{detail:o}))}}function aD(i,e,t){let{$$slots:n={},$$scope:r}=e,s=Fe(),o,{pos:a}=e;function l(d){ht.call(this,i,d)}let c=()=>(t(1,o=!0),s("active",!0)),u=({detail:d})=>t(0,a=d),f=()=>(t(1,o=!1),s("active",!1));return i.$$set=d=>{"pos"in d&&t(0,a=d.pos),"$$scope"in d&&t(3,r=d.$$scope)},[a,o,s,r,n,l,c,u,f]}var cg=class extends ne{constructor(e){super(),re(this,e,aD,nD,ie,{pos:0},iD)}},ug=cg;function lD(i){se(i,"svelte-1skvzai","input.svelte-1skvzai{display:none}.track-container.svelte-1skvzai{width:calc(100% - 16px);height:16px;display:flex;align-items:center}.track.svelte-1skvzai{margin:0 8px;position:relative;height:4px;width:calc(100% - 16px);border-radius:100vh;background:var(--background-modifier-form-field)}.progress.svelte-1skvzai{position:absolute;left:0;right:0;top:0;bottom:0;border-radius:100vh;background:var(--interactive-accent)}.thumb.svelte-1skvzai{width:16px;height:16px;border-radius:100vh;background:var(--interactive-accent)}.thumb.svelte-1skvzai:hover,.thumb.svelte-1skvzai:active{background:var(--interactive-hover)}")}function bw(i){let e,t,n;return{c(){e=b("input"),v(e,"type","number"),e.value=t=i[0][1],v(e,"name",n=i[1][1]),v(e,"class","svelte-1skvzai")},m(r,s){A(r,e,s)},p(r,s){s&1&&t!==(t=r[0][1])&&e.value!==t&&(e.value=t),s&2&&n!==(n=r[1][1])&&v(e,"name",n)},d(r){r&&T(e)}}}function cD(i){let e;return{c(){e=b("div"),v(e,"class","thumb svelte-1skvzai")},m(t,n){A(t,e,n)},p:X,d(t){t&&T(e)}}}function _w(i){let e,t,n;function r(o){i[13](o)}let s={$$slots:{default:[uD]},$$scope:{ctx:i}};return i[3][1]!==void 0&&(s.pos=i[3][1]),e=new ug({props:s}),mi.push(()=>Ir(e,"pos",r)),e.$on("active",i[14]),{c(){ye(e.$$.fragment)},m(o,a){Oe(e,o,a),n=!0},p(o,a){let l={};a&524288&&(l.$$scope={dirty:a,ctx:o}),!t&&a&8&&(t=!0,l.pos=o[3][1],Rr(()=>t=!1)),e.$set(l)},i(o){n||($(e.$$.fragment,o),n=!0)},o(o){V(e.$$.fragment,o),n=!1},d(o){ve(e,o)}}}function uD(i){let e;return{c(){e=b("div"),v(e,"class","thumb svelte-1skvzai")},m(t,n){A(t,e,n)},p:X,d(t){t&&T(e)}}}function fD(i){let e,t,n,r,s,o,a,l,c,u,f,d,h,p,m,g=i[2]&&bw(i);function O(C){i[11](C)}let w={$$slots:{default:[cD]},$$scope:{ctx:i}};i[3][0]!==void 0&&(w.pos=i[3][0]),u=new ug({props:w}),mi.push(()=>Ir(u,"pos",O)),u.$on("active",i[12]);let S=i[2]&&_w(i);return{c(){e=b("div"),t=b("input"),s=M(),g&&g.c(),o=M(),a=b("div"),l=b("div"),c=M(),ye(u.$$.fragment),d=M(),S&&S.c(),v(t,"type","number"),t.value=n=i[0][0],v(t,"name",r=i[1][0]),v(t,"class","svelte-1skvzai"),v(l,"class","progress svelte-1skvzai"),v(l,"style",i[5]),v(a,"class","track svelte-1skvzai"),v(e,"class","track-container svelte-1skvzai")},m(C,k){A(C,e,k),y(e,t),y(e,s),g&&g.m(e,null),y(e,o),y(e,a),y(a,l),y(a,c),Oe(u,a,null),y(a,d),S&&S.m(a,null),h=!0,p||(m=U(e,"click",i[6]),p=!0)},p(C,[k]){(!h||k&1&&n!==(n=C[0][0])&&t.value!==n)&&(t.value=n),(!h||k&2&&r!==(r=C[1][0]))&&v(t,"name",r),C[2]?g?g.p(C,k):(g=bw(C),g.c(),g.m(e,o)):g&&(g.d(1),g=null),(!h||k&32)&&v(l,"style",C[5]);let _={};k&524288&&(_.$$scope={dirty:k,ctx:C}),!f&&k&8&&(f=!0,_.pos=C[3][0],Rr(()=>f=!1)),u.$set(_),C[2]?S?(S.p(C,k),k&4&&$(S,1)):(S=_w(C),S.c(),$(S,1),S.m(a,null)):S&&(Ae(),V(S,1,1,()=>{S=null}),De())},i(C){h||($(u.$$.fragment,C),$(S),h=!0)},o(C){V(u.$$.fragment,C),V(S),h=!1},d(C){C&&T(e),g&&g.d(),ve(u),S&&S.d(),p=!1,m()}}}function dD(i){return[Math.min(...i),Math.max(...i)]}function hD(i,e,t){let n,r=Fe(),{name:s=[]}=e,{range:o=!1}=e,{min:a=0}=e,{max:l=100}=e,{step:c=1}=e,{value:u=[a,l]}=e,f,d=!1,{order:h=!1}=e;function p(_){let P=a%c,x=l-a;t(0,u=_.map(R=>a+R*x).map(R=>Math.round((R-P)/c)*c+P)),r("input",u)}function m(_){t(3,f=_.map(P=>Math.min(Math.max(P,a),l)).map(P=>(P-a)/(l-a)))}function g(){m(u),p(f)}function O(_){let P=_.target,x=_.offsetX/P.clientWidth,R=f.map(Z=>Math.abs(x-Z));R[1]>R[0]?t(3,f=[x,f[1]]):t(3,f=[f[0],x]),p(f)}function w(_){i.$$.not_equal(f[0],_)&&(f[0]=_,t(3,f),t(2,o),t(10,h),t(4,d))}let S=({detail:_})=>t(4,d=_);function C(_){i.$$.not_equal(f[1],_)&&(f[1]=_,t(3,f),t(2,o),t(10,h),t(4,d))}let k=({detail:_})=>t(4,d=_);return i.$$set=_=>{"name"in _&&t(1,s=_.name),"range"in _&&t(2,o=_.range),"min"in _&&t(7,a=_.min),"max"in _&&t(8,l=_.max),"step"in _&&t(9,c=_.step),"value"in _&&t(0,u=_.value),"order"in _&&t(10,h=_.order)},i.$$.update=()=>{i.$$.dirty&1052&&o&&h&&d&&t(3,f=dD(f)),i.$$.dirty&24&&d&&p(f),i.$$.dirty&17&&(d||m(u)),i.$$.dirty&384&&g(),i.$$.dirty&12&&t(5,n=` + left: ${o?Math.min(f[0],f[1])*100:0}%; + right: ${100-Math.max(f[0],o?f[1]:f[0])*100}%; + `)},[u,s,o,f,d,n,O,a,l,c,h,w,S,C,k]}var fg=class extends ne{constructor(e){super(),re(this,e,hD,fD,ie,{name:1,range:2,min:7,max:8,step:9,value:0,order:10},lD)}},ww=fg;function pD(i){se(i,"svelte-191t5bs",".range-filter.svelte-191t5bs{display:flex;align-items:center;gap:1rem;width:100%;white-space:nowrap}")}function mD(i){let e,t,n,r,s,o,a,l,c,u,f,d,h,p,m,g,O,w,S,C;function k(P){i[5](P)}let _={range:!0,order:!0,min:i[0].options[0],max:i[0].options[1]};return i[3]!==void 0&&(_.value=i[3]),c=new ww({props:_}),mi.push(()=>Ir(c,"value",k)),{c(){e=b("div"),t=b("span"),n=ae(i[2]),r=M(),s=b("input"),l=M(),ye(c.$$.fragment),f=M(),d=b("input"),m=M(),g=b("span"),O=ae(i[1]),v(s,"type","number"),v(s,"placeholder",i[2]),v(s,"min",o=i[0].options[0]),v(s,"max",a=i[0].options[1]),v(d,"type","number"),v(d,"placeholder",i[1]),v(d,"min",h=i[0].options[0]),v(d,"max",p=i[0].options[1]),v(e,"class","range-filter svelte-191t5bs")},m(P,x){A(P,e,x),y(e,t),y(t,n),y(e,r),y(e,s),Xe(s,i[3][0]),y(e,l),Oe(c,e,null),y(e,f),y(e,d),Xe(d,i[3][1]),y(e,m),y(e,g),y(g,O),w=!0,S||(C=[U(s,"input",i[4]),U(d,"input",i[6])],S=!0)},p(P,[x]){(!w||x&4)&&me(n,P[2]),(!w||x&4)&&v(s,"placeholder",P[2]),(!w||x&1&&o!==(o=P[0].options[0]))&&v(s,"min",o),(!w||x&1&&a!==(a=P[0].options[1]))&&v(s,"max",a),x&8&&pi(s.value)!==P[3][0]&&Xe(s,P[3][0]);let R={};x&1&&(R.min=P[0].options[0]),x&1&&(R.max=P[0].options[1]),!u&&x&8&&(u=!0,R.value=P[3],Rr(()=>u=!1)),c.$set(R),(!w||x&2)&&v(d,"placeholder",P[1]),(!w||x&1&&h!==(h=P[0].options[0]))&&v(d,"min",h),(!w||x&1&&p!==(p=P[0].options[1]))&&v(d,"max",p),x&8&&pi(d.value)!==P[3][1]&&Xe(d,P[3][1]),(!w||x&2)&&me(O,P[1])},i(P){w||($(c.$$.fragment,P),w=!0)},o(P){V(c.$$.fragment,P),w=!1},d(P){P&&T(e),ve(c),S=!1,de(C)}}}function gD(i,e,t){let n,r,s,o=X,a=()=>(o(),o=Mi(l,d=>t(3,s=d)),l);i.$$.on_destroy.push(()=>o());let{filter:l}=e;a();function c(){s[0]=pi(this.value),l.set(s)}function u(d){s=d,l.set(s)}function f(){s[1]=pi(this.value),l.set(s)}return i.$$set=d=>{"filter"in d&&a(t(0,l=d.filter))},i.$$.update=()=>{i.$$.dirty&1&&t(2,n=`Min ${l.filter.text}`),i.$$.dirty&1&&t(1,r=`Max ${l.filter.text}`)},[l,r,n,s,c,u,f]}var dg=class extends ne{constructor(e){super(),re(this,e,gD,mD,ie,{filter:0},pD)}},kw=dg;function OD(i){se(i,"svelte-66wdl1","div.svelte-66wdl1{display:inline-block;vertical-align:middle;margin:0 3pt;border-width:calc(1em / 5);border-style:solid;border-radius:50%;animation:var(--duration) infinite svelte-66wdl1-rotate}@keyframes svelte-66wdl1-rotate{100%{transform:rotate(360deg)}}")}function vD(i){let e,t=`${i[0]} transparent ${i[0]} + ${i[0]}`;return{c(){e=b("div"),Te(e,"--duration",i[1]),v(e,"class","svelte-66wdl1"),Te(e,"border-color",t),Te(e,"width",i[2]),Te(e,"height",i[2])},m(n,r){A(n,e,r)},p(n,[r]){r&2&&Te(e,"--duration",n[1]);let s=r&2;(r&3&&t!==(t=`${n[0]} transparent ${n[0]} + ${n[0]}`)||s)&&Te(e,"border-color",t),(r&6||s)&&Te(e,"width",n[2]),(r&6||s)&&Te(e,"height",n[2])},i:X,o:X,d(n){n&&T(e)}}}function yD(i,e,t){let{color:n="cornflowerblue"}=e,{duration:r="1.5s"}=e,{size:s="1em"}=e;return i.$$set=o=>{"color"in o&&t(0,n=o.color),"duration"in o&&t(1,r=o.duration),"size"in o&&t(2,s=o.size)},[n,r,s]}var hg=class extends ne{constructor(e){super(),re(this,e,yD,vD,ie,{color:0,duration:1,size:2},OD)}},pg=hg;function bD(i){let e,t=`rotate(${i[0].angle}deg) scale(${i[0].scale}) translate(${i[0].dx}px, + ${i[0].dy}px)`,n,r=i[11].default,s=Gt(r,i,i[10],null);return{c(){e=b("span"),s&&s.c(),Te(e,"transform",t)},m(o,a){A(o,e,a),s&&s.m(e,null),n=!0},p(o,[a]){s&&s.p&&(!n||a&1024)&&Jt(s,r,o,o[10],n?Kt(r,o[10],a,null):ei(o[10]),null),a&1&&t!==(t=`rotate(${o[0].angle}deg) scale(${o[0].scale}) translate(${o[0].dx}px, + ${o[0].dy}px)`)&&Te(e,"transform",t)},i(o){n||($(s,o),n=!0)},o(o){V(s,o),n=!1},d(o){o&&T(e),s&&s.d(o)}}}function _D(i,e,t){let n,{$$slots:r={},$$scope:s}=e,{wiggle:o=!1}=e,{angle:a=0}=e,{scale:l=1}=e,{dx:c=0}=e,{dy:u=0}=e,{duration:f=200}=e,{stiffness:d=.05}=e,{damping:h=.1}=e,p={angle:0,scale:1,dx:0,dy:0},m=O_(p,{stiffness:d,damping:h});return Se(i,m,g=>t(0,n=g)),i.$$set=g=>{"wiggle"in g&&t(2,o=g.wiggle),"angle"in g&&t(3,a=g.angle),"scale"in g&&t(4,l=g.scale),"dx"in g&&t(5,c=g.dx),"dy"in g&&t(6,u=g.dy),"duration"in g&&t(7,f=g.duration),"stiffness"in g&&t(8,d=g.stiffness),"damping"in g&&t(9,h=g.damping),"$$scope"in g&&t(10,s=g.$$scope)},i.$$.update=()=>{i.$$.dirty&132&&o&&setTimeout(()=>t(2,o=!1),f),i.$$.dirty&124&&m.set(o?{scale:l,angle:a,dx:c,dy:u}:p)},[n,m,o,a,l,c,u,f,d,h,s,r]}var mg=class extends ne{constructor(e){super(),re(this,e,_D,bD,ie,{wiggle:2,angle:3,scale:4,dx:5,dy:6,duration:7,stiffness:8,damping:9})}},gg=mg;function wD(i){let e,t,n=[i[0],{fill:"currentColor"},{viewBox:"0 0 16 16"}],r={};for(let s=0;s{t(0,e=ti(ti({},e),rr(n)))},e=rr(e),[e]}var Og=class extends ne{constructor(e){super(),re(this,e,kD,wD,ie,{})}},vg=Og;function SD(i){let e,t,n=[i[0],{viewBox:"0 0 24 24"},{fill:"currentColor"}],r={};for(let s=0;s{t(0,e=ti(ti({},e),rr(n)))},e=rr(e),[e]}var yg=class extends ne{constructor(e){super(),re(this,e,xD,SD,ie,{})}},Uf=yg;function PD(i){let e,t,n=[i[0],{viewBox:"0 0 24 24"},{fill:"currentColor"}],r={};for(let s=0;s{t(0,e=ti(ti({},e),rr(n)))},e=rr(e),[e]}var bg=class extends ne{constructor(e){super(),re(this,e,CD,PD,ie,{})}},_g=bg;var wi=i=>i instanceof Object?(i.label===void 0&&console.error(`MultiSelect option ${JSON.stringify(i)} is an object but has no label key`),i.label):`${i}`;function sc(i,e=null){let t="";if(["selected","option",null].includes(e)||console.error(`MultiSelect: Invalid key=${e} for get_style`),typeof i=="object"&&i.style&&(typeof i.style=="string"&&(t=i.style),typeof i.style=="object")){if(e&&e in i.style)return i.style[e]??"";console.error(`Invalid style object for option=${JSON.stringify(i)}`)}return t.trim()&&!t.trim().endsWith(";")&&(t+=";"),t}var{Boolean:ED}=Nl;function TD(i){se(i,"svelte-1r2hsto",".svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(div.multiselect){position:relative;align-items:center;display:flex;cursor:text;box-sizing:border-box;border:var(--sms-border, 1pt solid lightgray);border-radius:var(--sms-border-radius, 3pt);background:var(--sms-bg);width:var(--sms-width);max-width:var(--sms-max-width);padding:var(--sms-padding, 0 3pt);color:var(--sms-text-color);font-size:var(--sms-font-size, inherit);min-height:var(--sms-min-height, 22pt);margin:var(--sms-margin)}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(div.multiselect.open){z-index:var(--sms-open-z-index, 4)}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(div.multiselect:focus-within){border:var(--sms-focus-border, 1pt solid var(--sms-active-color, cornflowerblue))}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(div.multiselect.disabled){background:var(--sms-disabled-bg, lightgray);cursor:not-allowed}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(div.multiselect > ul.selected){display:flex;flex:1;padding:0;margin:0;flex-wrap:wrap}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(div.multiselect > ul.selected > li){align-items:center;border-radius:3pt;display:flex;margin:2pt;line-height:normal;transition:0.3s;white-space:nowrap;background:var(--sms-selected-bg, rgba(0, 0, 0, 0.15));padding:var(--sms-selected-li-padding, 1pt 5pt);color:var(--sms-selected-text-color, var(--sms-text-color))}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(div.multiselect > ul.selected > li[draggable='true']){cursor:grab}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(div.multiselect > ul.selected > li.active){background:var(--sms-li-active-bg, var(--sms-active-color, rgba(0, 0, 0, 0.15)))}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(div.multiselect button){border-radius:50%;display:flex;transition:0.2s;color:inherit;background:transparent;border:none;cursor:pointer;outline:none;padding:0;margin:0 0 0 3pt}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(div.multiselect button.remove-all){margin:0 3pt}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(ul.selected > li button:hover, button.remove-all:hover, button:focus){color:var(--sms-remove-btn-hover-color, lightskyblue);background:var(--sms-remove-btn-hover-bg, rgba(0, 0, 0, 0.2))}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(div.multiselect input){margin:auto 0;padding:0}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(div.multiselect > ul.selected > input){border:none;outline:none;background:none;flex:1;min-width:2em;color:var(--sms-text-color);font-size:inherit;cursor:inherit;border-radius:0}div.multiselect.svelte-1r2hsto>ul.selected.svelte-1r2hsto>input.svelte-1r2hsto::placeholder{padding-left:5pt;color:var(--sms-placeholder-color);opacity:var(--sms-placeholder-opacity)}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(div.multiselect > input.form-control){width:2em;position:absolute;background:transparent;border:none;outline:none;z-index:-1;opacity:0;pointer-events:none}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(div.multiselect > ul.options){list-style:none;top:100%;left:0;width:100%;position:absolute;overflow:auto;transition:all 0.2s;box-sizing:border-box;background:var(--sms-options-bg, white);max-height:var(--sms-options-max-height, 50vh);overscroll-behavior:var(--sms-options-overscroll, none);box-shadow:var(--sms-options-shadow, 0 0 14pt -8pt black);border:var(--sms-options-border);border-width:var(--sms-options-border-width);border-radius:var(--sms-options-border-radius, 1ex);padding:var(--sms-options-padding);margin:var(--sms-options-margin, inherit)}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(div.multiselect > ul.options.hidden){visibility:hidden;opacity:0;transform:translateY(50px)}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(div.multiselect > ul.options > li){padding:3pt 2ex;cursor:pointer;scroll-margin:var(--sms-options-scroll-margin, 100px)}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(div.multiselect > ul.options .user-msg){display:block;padding:3pt 2ex}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(div.multiselect > ul.options > li.selected){background:var(--sms-li-selected-bg);color:var(--sms-li-selected-color)}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(div.multiselect > ul.options > li.active){background:var(--sms-li-active-bg, var(--sms-active-color, rgba(0, 0, 0, 0.15)))}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(div.multiselect > ul.options > li.disabled){cursor:not-allowed;background:var(--sms-li-disabled-bg, #f5f5f6);color:var(--sms-li-disabled-text, #b8b8b8)}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto:where(span.max-select-msg){padding:0 3pt}.svelte-1r2hsto.svelte-1r2hsto.svelte-1r2hsto::highlight(sms-search-matches){color:mediumaquamarine}")}var AD=i=>({searchText:i[0]&16,msgType:i[0]&68660|i[1]&16,msg:i[0]&101428|i[1]&16}),Sw=i=>({searchText:i[4],msgType:i[124],msg:i[125]});function wg(i){let e=i.slice(),t={dupe:e[15],create:e[10],"no-match":e[35]}[e[124]];return e[125]=t,e}function kg(i){let e=i.slice(),t=e[5].map(wi).includes(e[4]);e[120]=t;let n=!e[16]&&e[120]&&"dupe";e[121]=n;let r=!!(e[11]&&e[10])&&"create";e[122]=r;let s=!!(e[2]?.length==0&&e[35])&&"no-match";e[123]=s;let o=e[121]||e[122]||e[123];return e[124]=o,e}function xw(i,e,t){let n=i.slice();n[126]=e[t],n[133]=t;let r=n[126]instanceof Object?n[126]:{label:n[126]};n[127]=r.label,n[50]=r.disabled!==void 0?r.disabled:null,n[128]=r.title!==void 0?r.title:null,n[129]=r.selectedTitle!==void 0?r.selectedTitle:null,n[130]=r.disabledTitle!==void 0?r.disabledTitle:n[13];let s=n[0]===n[133];return n[131]=s,n}var DD=i=>({option:i[0]&1073741828}),Pw=i=>({option:i[126],idx:i[133]}),QD=i=>({option:i[0]&1073741828}),Cw=i=>({option:i[126],idx:i[133]}),RD=i=>({}),Ew=i=>({}),MD=i=>({}),Tw=i=>({}),ID=i=>({}),Aw=i=>({}),ND=i=>({selected:i[0]&32,disabled:i[1]&524288,invalid:i[0]&128,id:i[0]&262144,placeholder:i[1]&256,open:i[0]&256,required:i[1]&4096}),Dw=i=>({selected:i[5],disabled:i[50],invalid:i[7],id:i[18],placeholder:i[39],open:i[8],required:i[43]});function Qw(i,e,t){let n=i.slice();return n[126]=e[t],n[133]=t,n}var jD=i=>({}),Rw=i=>({}),ZD=i=>({option:i[0]&32,idx:i[0]&32}),Mw=i=>({option:i[126],idx:i[133]}),zD=i=>({option:i[0]&32,idx:i[0]&32}),Iw=i=>({option:i[126],idx:i[133]}),qD=i=>({open:i[0]&256}),Nw=i=>({open:i[8]});function LD(i){let e,t;return e=new vg({props:{width:"15px",style:"min-width: 1em; padding: 0 1pt; cursor: pointer;"}}),{c(){ye(e.$$.fragment)},m(n,r){Oe(e,n,r),t=!0},p:X,i(n){t||($(e.$$.fragment,n),t=!0)},o(n){V(e.$$.fragment,n),t=!1},d(n){ve(e,n)}}}function $D(i){let e=wi(i[126])+"",t;return{c(){t=ae(e)},m(n,r){A(n,t,r)},p(n,r){r[0]&32&&e!==(e=wi(n[126])+"")&&me(t,e)},d(n){n&&T(t)}}}function FD(i){let e,t=wi(i[126])+"",n;return{c(){e=new jl(!1),n=tt(),e.a=n},m(r,s){e.m(t,r,s),A(r,n,s)},p(r,s){s[0]&32&&t!==(t=wi(r[126])+"")&&e.p(t)},d(r){r&&(T(n),e.d())}}}function BD(i){let e;function t(s,o){return s[37]?FD:$D}let n=t(i,[-1,-1,-1,-1,-1]),r=n(i);return{c(){r.c(),e=tt()},m(s,o){r.m(s,o),A(s,e,o)},p(s,o){n===(n=t(s,o))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&T(e),r.d(s)}}}function VD(i){let e,t=i[77].default,n=Gt(t,i,i[115],Mw),r=n||BD(i);return{c(){r&&r.c()},m(s,o){r&&r.m(s,o),e=!0},p(s,o){n?n.p&&(!e||o[0]&32|o[3]&4194304)&&Jt(n,t,s,s[115],e?Kt(t,s[115],o,ZD):ei(s[115]),Mw):r&&r.p&&(!e||o[0]&32|o[1]&64)&&r.p(s,e?o:[-1,-1,-1,-1,-1])},i(s){e||($(r,s),e=!0)},o(s){V(r,s),e=!1},d(s){r&&r.d(s)}}}function jw(i){let e,t,n,r,s,o=i[77]["remove-icon"],a=Gt(o,i,i[115],Rw),l=a||WD(i);function c(){return i[97](i[126])}function u(){return i[98](i[126])}return{c(){e=b("button"),l&&l.c(),v(e,"type","button"),v(e,"title",t=i[41]+" "+wi(i[126])),v(e,"class","remove svelte-1r2hsto")},m(f,d){A(f,e,d),l&&l.m(e,null),n=!0,r||(s=[U(e,"mouseup",Vt(c)),U(e,"keydown",function(){Ge(i[62](u))&&i[62](u).apply(this,arguments)})],r=!0)},p(f,d){i=f,a&&a.p&&(!n||d[3]&4194304)&&Jt(a,o,i,i[115],n?Kt(o,i[115],d,jD):ei(i[115]),Rw),(!n||d[0]&32|d[1]&1024&&t!==(t=i[41]+" "+wi(i[126])))&&v(e,"title",t)},i(f){n||($(l,f),n=!0)},o(f){V(l,f),n=!1},d(f){f&&T(e),l&&l.d(f),r=!1,de(s)}}}function WD(i){let e,t;return e=new Uf({props:{width:"15px"}}),{c(){ye(e.$$.fragment)},m(n,r){Oe(e,n,r),t=!0},p:X,i(n){t||($(e.$$.fragment,n),t=!0)},o(n){V(e.$$.fragment,n),t=!1},d(n){ve(e,n)}}}function Zw(i,e){let t,n,r,s,o,a,l=X,c,u,f,d=e[77].selected,h=Gt(d,e,e[115],Iw),p=h||VD(e),m=!e[50]&&(e[42]===null||e[5].length>e[42])&&jw(e);function g(){return e[99](e[133])}return{key:i,first:null,c(){t=b("li"),p&&p.c(),n=M(),m&&m.c(),v(t,"class",r=un(e[26])+" svelte-1r2hsto"),v(t,"role","option"),v(t,"aria-selected","true"),v(t,"draggable",s=e[44]&&!e[50]&&e[5].length>1),v(t,"style",o=sc(e[126],"selected")+" "+e[27]),ge(t,"active",e[54]===e[133]),this.first=t},m(O,w){A(O,t,w),p&&p.m(t,null),y(t,n),m&&m.m(t,null),c=!0,u||(f=[U(t,"dragstart",function(){Ge(e[65](e[133]))&&e[65](e[133]).apply(this,arguments)}),U(t,"drop",Jp(function(){Ge(e[64](e[133]))&&e[64](e[133]).apply(this,arguments)})),U(t,"dragenter",g),U(t,"dragover",Jp(e[93]))],u=!0)},p(O,w){e=O,h?h.p&&(!c||w[0]&32|w[3]&4194304)&&Jt(h,d,e,e[115],c?Kt(d,e[115],w,zD):ei(e[115]),Iw):p&&p.p&&(!c||w[0]&32|w[1]&64|w[3]&4194304)&&p.p(e,c?w:[-1,-1,-1,-1,-1]),!e[50]&&(e[42]===null||e[5].length>e[42])?m?(m.p(e,w),w[0]&32|w[1]&526336&&$(m,1)):(m=jw(e),m.c(),$(m,1),m.m(t,null)):m&&(Ae(),V(m,1,1,()=>{m=null}),De()),(!c||w[0]&67108864&&r!==(r=un(e[26])+" svelte-1r2hsto"))&&v(t,"class",r),(!c||w[0]&32|w[1]&532480&&s!==(s=e[44]&&!e[50]&&e[5].length>1))&&v(t,"draggable",s),(!c||w[0]&134217760&&o!==(o=sc(e[126],"selected")+" "+e[27]))&&v(t,"style",o),(!c||w[0]&67108896|w[1]&8388608)&&ge(t,"active",e[54]===e[133])},r(){a=t.getBoundingClientRect()},f(){Qr(t),l()},a(){l(),l=Dr(t,a,jr,{duration:100})},i(O){c||($(p,O),$(m),c=!0)},o(O){V(p,O),V(m),c=!1},d(O){O&&T(t),p&&p.d(O),m&&m.d(),u=!1,de(f)}}}function zw(i){let e,t=i[77].spinner,n=Gt(t,i,i[115],Aw),r=n||XD(i);return{c(){r&&r.c()},m(s,o){r&&r.m(s,o),e=!0},p(s,o){n&&n.p&&(!e||o[3]&4194304)&&Jt(n,t,s,s[115],e?Kt(t,s[115],o,ID):ei(s[115]),Aw)},i(s){e||($(r,s),e=!0)},o(s){V(r,s),e=!1},d(s){r&&r.d(s)}}}function XD(i){let e,t;return e=new pg({}),{c(){ye(e.$$.fragment)},m(n,r){Oe(e,n,r),t=!0},i(n){t||($(e.$$.fragment,n),t=!0)},o(n){V(e.$$.fragment,n),t=!1},d(n){ve(e,n)}}}function UD(i){let e,t,n,r=i[31]&&(i[31]>1||i[32])&&qw(i),s=i[31]!==1&&i[5].length>1&&Lw(i);return{c(){r&&r.c(),e=M(),s&&s.c(),t=tt()},m(o,a){r&&r.m(o,a),A(o,e,a),s&&s.m(o,a),A(o,t,a),n=!0},p(o,a){o[31]&&(o[31]>1||o[32])?r?(r.p(o,a),a[1]&3&&$(r,1)):(r=qw(o),r.c(),$(r,1),r.m(e.parentNode,e)):r&&(Ae(),V(r,1,1,()=>{r=null}),De()),o[31]!==1&&o[5].length>1?s?(s.p(o,a),a[0]&32|a[1]&1&&$(s,1)):(s=Lw(o),s.c(),$(s,1),s.m(t.parentNode,t)):s&&(Ae(),V(s,1,1,()=>{s=null}),De())},i(o){n||($(r),$(s),n=!0)},o(o){V(r),V(s),n=!1},d(o){o&&(T(e),T(t)),r&&r.d(o),s&&s.d(o)}}}function YD(i){let e,t=i[77]["disabled-icon"],n=Gt(t,i,i[115],Tw),r=n||KD(i);return{c(){r&&r.c()},m(s,o){r&&r.m(s,o),e=!0},p(s,o){n&&n.p&&(!e||o[3]&4194304)&&Jt(n,t,s,s[115],e?Kt(t,s[115],o,MD):ei(s[115]),Tw)},i(s){e||($(r,s),e=!0)},o(s){V(r,s),e=!1},d(s){r&&r.d(s)}}}function qw(i){let e,t,n;function r(o){i[102](o)}let s={angle:20,$$slots:{default:[HD]},$$scope:{ctx:i}};return i[51]!==void 0&&(s.wiggle=i[51]),e=new gg({props:s}),mi.push(()=>Ir(e,"wiggle",r)),{c(){ye(e.$$.fragment)},m(o,a){Oe(e,o,a),n=!0},p(o,a){let l={};a[0]&32|a[1]&7|a[3]&4194304&&(l.$$scope={dirty:a,ctx:o}),!t&&a[1]&1048576&&(t=!0,l.wiggle=o[51],Rr(()=>t=!1)),e.$set(l)},i(o){n||($(e.$$.fragment,o),n=!0)},o(o){V(e.$$.fragment,o),n=!1},d(o){ve(e,o)}}}function HD(i){let e,t=i[32]?.(i[5].length,i[31])+"",n,r;return{c(){e=b("span"),n=ae(t),v(e,"class",r="max-select-msg "+i[33]+" svelte-1r2hsto")},m(s,o){A(s,e,o),y(e,n)},p(s,o){o[0]&32|o[1]&3&&t!==(t=s[32]?.(s[5].length,s[31])+"")&&me(n,t),o[1]&4&&r!==(r="max-select-msg "+s[33]+" svelte-1r2hsto")&&v(e,"class",r)},d(s){s&&T(e)}}}function Lw(i){let e,t,n,r,s=i[77]["remove-icon"],o=Gt(s,i,i[115],Ew),a=o||GD(i);return{c(){e=b("button"),a&&a.c(),v(e,"type","button"),v(e,"class","remove remove-all svelte-1r2hsto"),v(e,"title",i[40])},m(l,c){A(l,e,c),a&&a.m(e,null),t=!0,n||(r=[U(e,"mouseup",Vt(i[61])),U(e,"keydown",i[62](i[61]))],n=!0)},p(l,c){o&&o.p&&(!t||c[3]&4194304)&&Jt(o,s,l,l[115],t?Kt(s,l[115],c,RD):ei(l[115]),Ew),(!t||c[1]&512)&&v(e,"title",l[40])},i(l){t||($(a,l),t=!0)},o(l){V(a,l),t=!1},d(l){l&&T(e),a&&a.d(l),n=!1,de(r)}}}function GD(i){let e,t;return e=new Uf({props:{width:"15px"}}),{c(){ye(e.$$.fragment)},m(n,r){Oe(e,n,r),t=!0},p:X,i(n){t||($(e.$$.fragment,n),t=!0)},o(n){V(e.$$.fragment,n),t=!1},d(n){ve(e,n)}}}function KD(i){let e,t;return e=new _g({props:{width:"14pt",style:"margin: 0 2pt;","data-name":"disabled-icon"}}),{c(){ye(e.$$.fragment)},m(n,r){Oe(e,n,r),t=!0},p:X,i(n){t||($(e.$$.fragment,n),t=!0)},o(n){V(e.$$.fragment,n),t=!1},d(n){ve(e,n)}}}function $w(i){let e,t,n,r,s,o,a=fe(i[2].slice(0,Math.max(0,i[30]??0)||1/0)),l=[];for(let f=0;fV(l[f],1,1,()=>{l[f]=null}),u=i[4]&&Bw(kg(i));return{c(){e=b("ul");for(let f=0;f1),v(e,"aria-expanded",i[8]),v(e,"aria-disabled",s=i[50]?"true":null),v(e,"style",i[49]),ge(e,"hidden",!i[8])},m(f,d){A(f,e,d);for(let h=0;h{u=null}),De()),(!o||d[1]&32768&&n!==(n="options "+f[46]+" svelte-1r2hsto"))&&v(e,"class",n),(!o||d[1]&1&&r!==(r=f[31]===null||f[31]>1))&&v(e,"aria-multiselectable",r),(!o||d[0]&256)&&v(e,"aria-expanded",f[8]),(!o||d[1]&524288&&s!==(s=f[50]?"true":null))&&v(e,"aria-disabled",s),(!o||d[1]&262144)&&v(e,"style",f[49]),(!o||d[0]&256|d[1]&32768)&&ge(e,"hidden",!f[8])},i(f){if(!o){for(let d=0;d{n=null}),De())},i(r){t||($(n),t=!0)},o(r){V(n),t=!1},d(r){r&&T(e),n&&n.d(r)}}}function Vw(i){let e,t,n,r,s,o=i[77]["user-msg"],a=Gt(o,i,i[115],Sw),l=a||n8(i);return{c(){e=b("li"),l&&l.c(),v(e,"title",i[10]),v(e,"role","option"),v(e,"aria-selected","false"),v(e,"class",t="user-msg "+i[28]+" "+(i[52]?i[23]:"")+" svelte-1r2hsto"),ge(e,"active",i[52]),Te(e,"cursor",{dupe:"not-allowed",create:"pointer","no-match":"default"}[i[124]])},m(c,u){A(c,e,u),l&&l.m(e,null),n=!0,r||(s=[U(e,"mousedown",Vt(i[78])),U(e,"mouseup",Vt(i[108])),U(e,"mouseover",i[109]),U(e,"focus",i[110]),U(e,"mouseout",i[111]),U(e,"blur",i[112])],r=!0)},p(c,u){a?a.p&&(!n||u[0]&101428|u[1]&16|u[3]&4194304)&&Jt(a,o,c,c[115],n?Kt(o,c[115],u,AD):ei(c[115]),Sw):l&&l.p&&(!n||u[0]&101428|u[1]&16)&&l.p(c,n?u:[-1,-1,-1,-1,-1]),(!n||u[0]&1024)&&v(e,"title",c[10]),(!n||u[0]&276824064|u[1]&2097152&&t!==(t="user-msg "+c[28]+" "+(c[52]?c[23]:"")+" svelte-1r2hsto"))&&v(e,"class",t),(!n||u[0]&276824064|u[1]&2097152)&&ge(e,"active",c[52]),u[0]&68660|u[1]&16&&Te(e,"cursor",{dupe:"not-allowed",create:"pointer","no-match":"default"}[c[124]])},i(c){n||($(l,c),n=!0)},o(c){V(l,c),n=!1},d(c){c&&T(e),l&&l.d(c),r=!1,de(s)}}}function n8(i){let e=i[125]+"",t;return{c(){t=ae(e)},m(n,r){A(n,t,r)},p(n,r){r[0]&101428|r[1]&16&&e!==(e=n[125]+"")&&me(t,e)},d(n){n&&T(t)}}}function r8(i){let e,t,n,r,s,o,a=[],l=new Map,c,u,f,d,h,p,m,g,O,w,S,C,k,_,P,x,R;_n(i[94]);let Z=i[77]["expand-icon"],Q=Gt(Z,i,i[115],Nw),D=Q||LD(i),E=fe(i[5]),j=B=>B[16]?[B[17](B[126]),B[133]]:B[17](B[126]);for(let B=0;B0?1:-1}~(w=Pe(i,[-1,-1,-1,-1,-1]))&&(S=ce[w]=Y[w](i));let ue=(i[4]&&i[35]||i[3]?.length>0)&&$w(i);return{c(){e=b("div"),t=b("input"),r=M(),D&&D.c(),s=M(),o=b("ul");for(let B=0;B=Number(i[43])?JSON.stringify(i[5]):null,v(t,"tabindex","-1"),v(t,"aria-hidden","true"),v(t,"aria-label","ignore this, used only to prevent form submission if select is required but empty"),v(t,"class","form-control svelte-1r2hsto"),v(u,"class",f=un(i[19])+" svelte-1r2hsto"),v(u,"style",i[20]),v(u,"id",i[18]),u.disabled=i[50],v(u,"autocomplete",i[12]),v(u,"inputmode",i[21]),v(u,"pattern",i[38]),v(u,"placeholder",d=i[5].length==0?i[39]:null),v(u,"aria-invalid",h=i[7]?"true":null),v(u,"ondrop","return false"),v(o,"class",m="selected "+i[47]+" svelte-1r2hsto"),v(o,"aria-label","selected options"),v(o,"style",i[48]),v(e,"class",k="multiselect "+i[36]+" svelte-1r2hsto"),v(e,"title",_=i[50]?i[14]:null),v(e,"data-id",i[18]),v(e,"role","searchbox"),v(e,"tabindex","-1"),v(e,"style",i[45]),ge(e,"disabled",i[50]),ge(e,"single",i[31]===1),ge(e,"open",i[8]),ge(e,"invalid",i[7])},m(B,ee){A(B,e,ee),y(e,t),i[95](t),y(e,r),D&&D.m(e,null),y(e,s),y(e,o);for(let pe=0;pe=Number(B[43])?JSON.stringify(B[5]):null)&&t.value!==n)&&(t.value=n),Q&&Q.p&&(!P||ee[0]&256|ee[3]&4194304)&&Jt(Q,Z,B,B[115],P?Kt(Z,B[115],ee,qD):ei(B[115]),Nw),ee[0]&201523232|ee[1]&143141952|ee[2]&13|ee[3]&4194304){E=fe(B[5]),Ae();for(let Re=0;Re{G=null}),De());let pe=w;w=Pe(B,ee),w===pe?~w&&ce[w].p(B,ee):(S&&(Ae(),V(ce[pe],1,1,()=>{ce[pe]=null}),De()),~w?(S=ce[w],S?S.p(B,ee):(S=ce[w]=Y[w](B),S.c()),$(S,1),S.m(e,C)):S=null),B[4]&&B[35]||B[3]?.length>0?ue?(ue.p(B,ee),ee[0]&24|ee[1]&16&&$(ue,1)):(ue=$w(B),ue.c(),$(ue,1),ue.m(e,null)):ue&&(Ae(),V(ue,1,1,()=>{ue=null}),De()),(!P||ee[1]&32&&k!==(k="multiselect "+B[36]+" svelte-1r2hsto"))&&v(e,"class",k),(!P||ee[0]&16384|ee[1]&524288&&_!==(_=B[50]?B[14]:null))&&v(e,"title",_),(!P||ee[0]&262144)&&v(e,"data-id",B[18]),(!P||ee[1]&16384)&&v(e,"style",B[45]),(!P||ee[1]&524320)&&ge(e,"disabled",B[50]),(!P||ee[1]&33)&&ge(e,"single",B[31]===1),(!P||ee[0]&256|ee[1]&32)&&ge(e,"open",B[8]),(!P||ee[0]&128|ee[1]&32)&&ge(e,"invalid",B[7])},i(B){if(!P){$(D,B);for(let ee=0;ee`${wi(I)}`.toLowerCase()}=e,{filterFunc:C=(I,nt)=>nt?`${wi(I)}`.toLowerCase().includes(nt.toLowerCase()):!0}=e,{closeDropdownOnSelect:k="desktop"}=e,{form_input:_=null}=e,{highlightMatches:P=!0}=e,{id:x=null}=e,{input:R=null}=e,{inputClass:Z=""}=e,{inputStyle:Q=null}=e,{inputmode:D=null}=e,{invalid:E=!1}=e,{liActiveOptionClass:j=""}=e,{liActiveUserMsgClass:z=""}=e,{liOptionClass:q=""}=e,{liOptionStyle:G=null}=e,{liSelectedClass:Y=""}=e,{liSelectedStyle:ce=null}=e,{liUserMsgClass:Pe=""}=e,{loading:ue=!1}=e,{matchingOptions:B=[]}=e,{maxOptions:ee=void 0}=e,{maxSelect:pe=null}=e,{maxSelectMsg:Re=(I,nt)=>nt>1?`${I}/${nt}`:""}=e,{maxSelectMsgClass:oe=""}=e,{name:ke=null}=e,{noMatchingOptionsMsg:yt="No matching options"}=e,{open:It=!1}=e,{options:at}=e,{outerDiv:Nt=null}=e,{outerDivClass:Pr=""}=e,{parseLabelsAsHtml:nn=!1}=e,{pattern:$t=null}=e,{placeholder:Tt=null}=e,{removeAllTitle:lt="Remove all"}=e,{removeBtnTitle:dt="Remove"}=e,{minSelect:gt=null}=e,{required:jt=!1}=e,{resetFilterOnAdd:Cr=!0}=e,{searchText:bt=""}=e,{selected:et=at?.filter(I=>I instanceof Object&&I?.preselected).slice(0,pe??void 0)??[]}=e,{sortSelected:rs=!1}=e,{selectedOptionsDraggable:wl=!rs}=e,{style:Nu=null}=e,{ulOptionsClass:ju=""}=e,{ulSelectedClass:Dn=""}=e,{ulSelectedStyle:xs=null}=e,{ulOptionsStyle:kl=null}=e,{value:Oo=null}=e,vo=I=>{t(67,Oo=pe===1?I[0]??null:I)},Zu=I=>{pe===1?t(5,et=I?[I]:[]):t(5,et=I??[])},ca=!1;at?.length>0||(c||ue||m||u?at=[]:console.error("MultiSelect received no options")),pe!==null&&pe<1&&console.error(`MultiSelect's maxSelect must be null or positive integer, got ${pe}`),Array.isArray(et)||console.error(`MultiSelect's selected prop should always be an array, got ${et}`),pe&&typeof jt=="number"&&jt>pe&&console.error(`MultiSelect maxSelect=${pe} < required=${jt}, makes it impossible for users to submit a valid form`),nn&&c&&console.warn("Don't combine parseLabelsAsHtml and allowUserOptions. It's susceptible to XSS attacks!"),rs&&wl&&console.warn("MultiSelect's sortSelected and selectedOptionsDraggable should not be combined as any user re-orderings of selected options will be undone by sortSelected on component re-renders."),c&&!l&&l!==null&&console.error(`MultiSelect has allowUserOptions=${c} but createOptionMsg=${l} is falsy. This prevents the "Add option" from showing up, resulting in a confusing user experience.`),ee&&(typeof ee!="number"||ee<0||ee%1!=0)&&console.error(`MultiSelect's maxOptions must be undefined or a positive integer, got ${ee}`);let Yn=Fe(),Er=!1,rn;if(o!==null&&!B[o])throw`Run time error, activeIndex=${o} is out of bounds, matchingOptions.length=${B.length}`;function yo(I,nt){pe&&pe>1&&et.length>=pe&&t(51,ca=!0),!isNaN(Number(I))&&typeof et.map(wi)[0]=="number"&&(I=Number(I));let Bt=et.map(S).includes(S(I));if((pe===null||pe===1||et.length0&&(typeof at[0]=="object"?I={label:bt}:(["number","undefined"].includes(typeof at[0])&&!isNaN(Number(bt))?I=Number(bt):I=bt,Yn("create",{option:I})),c==="append"&&t(3,at=[...at,I])),Cr&&t(4,bt=""),["",void 0,null].includes(I)){console.error(`MultiSelect: encountered falsy option ${I}`);return}pe===1?t(5,et=[I]):(t(5,et=[...et,I]),rs===!0?t(5,et=et.sort((as,Tr)=>{let[Kn,ha]=[wi(as),wi(Tr)];return`${Kn}`.localeCompare(`${ha}`)})):typeof rs=="function"&&t(5,et=et.sort(rs)));let vi=et.length===pe,Rn=k===!0||k==="desktop"&&rnS(vi)===S(I)),[Bt]=et.splice(nt,1);if(Bt===void 0&&c&&(Bt=typeof at[0]?{label:I}:I),Bt===void 0)return console.error(`Multiselect can't remove selected option ${JSON.stringify(I)}, not found in selected list`);t(5,et=[...et]),t(7,E=!1),_?.setCustomValidity(""),Yn("remove",{option:Bt}),Yn("change",{option:Bt,type:"remove"})}function zu(I){m||(t(8,It=!0),I instanceof FocusEvent||R?.focus(),Yn("open",{event:I}))}function Sl(I){t(8,It=!1),R?.blur(),t(0,o=null),Yn("close",{event:I})}async function Sp(I){if(I.key==="Escape"||I.key==="Tab")Sl(I),t(4,bt="");else if(I.key==="Enter")I.preventDefault(),a?(et.includes(a)?bo(a):yo(a,I),t(4,bt="")):c&&bt.length>0?yo(bt,I):zu(I);else if(["ArrowDown","ArrowUp"].includes(I.key)){if(o===null&&B.length>0){t(0,o=0);return}else if(c&&!B.length&&bt.length>0){t(52,Er=!Er);return}else if(o===null)return;I.preventDefault();let nt=I.key==="ArrowUp"?-1:1;if(t(0,o=(o+nt)%B.length),o<0&&t(0,o=B.length-1),d){await df();let Bt=document.querySelector("ul.options > li.active");Bt&&Bt.scrollIntoViewIfNeeded?.()}}else I.key==="Backspace"&&et.length>0&&!bt?bo(et.at(-1)):B.length>0&&t(0,o=0)}function xp(){Yn("removeAll",{options:et}),Yn("change",{options:et,type:"removeAll"}),t(5,et=[]),t(4,bt="")}let Ps=I=>nt=>{["Enter","Space"].includes(nt.code)&&(nt.preventDefault(),I())};function Pp(I){Nt&&!Nt.contains(I.target)&&Sl(I)}let ua=null,Cp=I=>nt=>{if(!nt.dataTransfer)return;nt.dataTransfer.dropEffect="move";let Bt=parseInt(nt.dataTransfer.getData("text/plain")),vi=[...et];Btnt=>{nt.dataTransfer&&(nt.dataTransfer.effectAllowed="move",nt.dataTransfer.dropEffect="move",nt.dataTransfer.setData("text/plain",`${I}`))},_o;function Ep(I){if(!P||typeof CSS>"u"||!CSS.highlights)return;CSS.highlights.clear();let nt=I?.target?.value.trim().toLowerCase();if(!nt)return;let Bt=document.createTreeWalker(_o,NodeFilter.SHOW_TEXT,{acceptNode:Tr=>Tr?.textContent===yt?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),vi=[],Rn=Bt.nextNode();for(;Rn;)vi.push(Rn),Rn=Bt.nextNode();let as=vi.map(Tr=>{let Kn=Tr.textContent?.toLowerCase(),ha=[],pa=0;for(;Kn&&pa{let bn=new Range;return bn.setStart(Tr,As),bn.setEnd(Tr,As+nt.length),bn})});CSS.highlights.set("sms-search-matches",new Highlight(...as.flat()))}function qu(I){ht.call(this,i,I)}function Tp(I){ht.call(this,i,I)}function Lu(I){ht.call(this,i,I)}function F(I){ht.call(this,i,I)}function N(I){ht.call(this,i,I)}function W(I){ht.call(this,i,I)}function K(I){ht.call(this,i,I)}function te(I){ht.call(this,i,I)}function Ce(I){ht.call(this,i,I)}function Le(I){ht.call(this,i,I)}function st(I){ht.call(this,i,I)}function Ot(I){ht.call(this,i,I)}function Yt(I){ht.call(this,i,I)}function it(I){ht.call(this,i,I)}function Zt(I){ht.call(this,i,I)}function Ht(I){ht.call(this,i,I)}function Mt(){t(53,rn=window.innerWidth)}function ct(I){mi[I?"unshift":"push"](()=>{_=I,t(1,_)})}let zt=()=>{t(7,E=!0);let I;pe&&pe>1&&Number(jt)>1?I=`Please select between ${jt} and ${pe} options`:Number(jt)>1?I=`Please select at least ${jt} options`:I="Please select an option",_?.setCustomValidity(I)},_t=I=>bo(I),ss=I=>bo(I),Fi=I=>t(54,ua=I);function sn(I){mi[I?"unshift":"push"](()=>{R=I,t(6,R)})}function kt(){bt=this.value,t(4,bt)}function Bi(I){ca=I,t(51,ca)}let on=(I,nt,Bt)=>{I||yo(nt,Bt)},Qn=(I,nt)=>{I||t(0,o=nt)},os=(I,nt)=>{I||t(0,o=nt)},Hn=()=>t(0,o=null),wo=()=>t(0,o=null),fa=I=>{c&&yo(bt,I)},da=()=>t(52,Er=!0),Cs=()=>t(52,Er=!0),Es=()=>t(52,Er=!1),Gn=()=>t(52,Er=!1);function Ts(I){mi[I?"unshift":"push"](()=>{_o=I,t(55,_o)})}function Pl(I){mi[I?"unshift":"push"](()=>{Nt=I,t(9,Nt)})}return i.$$set=I=>{"activeIndex"in I&&t(0,o=I.activeIndex),"activeOption"in I&&t(68,a=I.activeOption),"createOptionMsg"in I&&t(10,l=I.createOptionMsg),"allowUserOptions"in I&&t(11,c=I.allowUserOptions),"allowEmpty"in I&&t(69,u=I.allowEmpty),"autocomplete"in I&&t(12,f=I.autocomplete),"autoScroll"in I&&t(70,d=I.autoScroll),"breakpoint"in I&&t(71,h=I.breakpoint),"defaultDisabledTitle"in I&&t(13,p=I.defaultDisabledTitle),"disabled"in I&&t(50,m=I.disabled),"disabledInputTitle"in I&&t(14,g=I.disabledInputTitle),"duplicateOptionMsg"in I&&t(15,O=I.duplicateOptionMsg),"duplicates"in I&&t(16,w=I.duplicates),"key"in I&&t(17,S=I.key),"filterFunc"in I&&t(72,C=I.filterFunc),"closeDropdownOnSelect"in I&&t(73,k=I.closeDropdownOnSelect),"form_input"in I&&t(1,_=I.form_input),"highlightMatches"in I&&t(74,P=I.highlightMatches),"id"in I&&t(18,x=I.id),"input"in I&&t(6,R=I.input),"inputClass"in I&&t(19,Z=I.inputClass),"inputStyle"in I&&t(20,Q=I.inputStyle),"inputmode"in I&&t(21,D=I.inputmode),"invalid"in I&&t(7,E=I.invalid),"liActiveOptionClass"in I&&t(22,j=I.liActiveOptionClass),"liActiveUserMsgClass"in I&&t(23,z=I.liActiveUserMsgClass),"liOptionClass"in I&&t(24,q=I.liOptionClass),"liOptionStyle"in I&&t(25,G=I.liOptionStyle),"liSelectedClass"in I&&t(26,Y=I.liSelectedClass),"liSelectedStyle"in I&&t(27,ce=I.liSelectedStyle),"liUserMsgClass"in I&&t(28,Pe=I.liUserMsgClass),"loading"in I&&t(29,ue=I.loading),"matchingOptions"in I&&t(2,B=I.matchingOptions),"maxOptions"in I&&t(30,ee=I.maxOptions),"maxSelect"in I&&t(31,pe=I.maxSelect),"maxSelectMsg"in I&&t(32,Re=I.maxSelectMsg),"maxSelectMsgClass"in I&&t(33,oe=I.maxSelectMsgClass),"name"in I&&t(34,ke=I.name),"noMatchingOptionsMsg"in I&&t(35,yt=I.noMatchingOptionsMsg),"open"in I&&t(8,It=I.open),"options"in I&&t(3,at=I.options),"outerDiv"in I&&t(9,Nt=I.outerDiv),"outerDivClass"in I&&t(36,Pr=I.outerDivClass),"parseLabelsAsHtml"in I&&t(37,nn=I.parseLabelsAsHtml),"pattern"in I&&t(38,$t=I.pattern),"placeholder"in I&&t(39,Tt=I.placeholder),"removeAllTitle"in I&&t(40,lt=I.removeAllTitle),"removeBtnTitle"in I&&t(41,dt=I.removeBtnTitle),"minSelect"in I&&t(42,gt=I.minSelect),"required"in I&&t(43,jt=I.required),"resetFilterOnAdd"in I&&t(75,Cr=I.resetFilterOnAdd),"searchText"in I&&t(4,bt=I.searchText),"selected"in I&&t(5,et=I.selected),"sortSelected"in I&&t(76,rs=I.sortSelected),"selectedOptionsDraggable"in I&&t(44,wl=I.selectedOptionsDraggable),"style"in I&&t(45,Nu=I.style),"ulOptionsClass"in I&&t(46,ju=I.ulOptionsClass),"ulSelectedClass"in I&&t(47,Dn=I.ulSelectedClass),"ulSelectedStyle"in I&&t(48,xs=I.ulSelectedStyle),"ulOptionsStyle"in I&&t(49,kl=I.ulOptionsStyle),"value"in I&&t(67,Oo=I.value),"$$scope"in I&&t(115,s=I.$$scope)},i.$$.update=()=>{i.$$.dirty[0]&32&&vo(et),i.$$.dirty[2]&32&&Zu(Oo),i.$$.dirty[0]&196664|i.$$.dirty[2]&1024&&t(2,B=at.filter(I=>C(I,bt)&&(!et.map(S).includes(S(I))||w))),i.$$.dirty[0]&5&&t(68,a=B[o??-1]??null),i.$$.dirty[0]&32&&t(56,n=I=>et.map(wi).includes(I)),i.$$.dirty[0]&2|i.$$.dirty[1]&4096&&_?.setCustomValidity("")},[o,_,B,at,bt,et,R,E,It,Nt,l,c,f,p,g,O,w,S,x,Z,Q,D,j,z,q,G,Y,ce,Pe,ue,ee,pe,Re,oe,ke,yt,Pr,nn,$t,Tt,lt,dt,gt,jt,wl,Nu,ju,Dn,xs,kl,m,ca,Er,rn,ua,_o,n,yo,bo,zu,Sp,xp,Ps,Pp,Cp,xl,Ep,Oo,a,u,d,h,C,k,P,Cr,rs,r,qu,Tp,Lu,F,N,W,K,te,Ce,Le,st,Ot,Yt,it,Zt,Ht,Mt,ct,zt,_t,ss,Fi,sn,kt,Bi,on,Qn,os,Hn,wo,fa,da,Cs,Es,Gn,Ts,Pl,s]}var Sg=class extends ne{constructor(e){super(),re(this,e,s8,r8,ie,{activeIndex:0,activeOption:68,createOptionMsg:10,allowUserOptions:11,allowEmpty:69,autocomplete:12,autoScroll:70,breakpoint:71,defaultDisabledTitle:13,disabled:50,disabledInputTitle:14,duplicateOptionMsg:15,duplicates:16,key:17,filterFunc:72,closeDropdownOnSelect:73,form_input:1,highlightMatches:74,id:18,input:6,inputClass:19,inputStyle:20,inputmode:21,invalid:7,liActiveOptionClass:22,liActiveUserMsgClass:23,liOptionClass:24,liOptionStyle:25,liSelectedClass:26,liSelectedStyle:27,liUserMsgClass:28,loading:29,matchingOptions:2,maxOptions:30,maxSelect:31,maxSelectMsg:32,maxSelectMsgClass:33,name:34,noMatchingOptionsMsg:35,open:8,options:3,outerDiv:9,outerDivClass:36,parseLabelsAsHtml:37,pattern:38,placeholder:39,removeAllTitle:40,removeBtnTitle:41,minSelect:42,required:43,resetFilterOnAdd:75,searchText:4,selected:5,sortSelected:76,selectedOptionsDraggable:44,style:45,ulOptionsClass:46,ulSelectedClass:47,ulSelectedStyle:48,ulOptionsStyle:49,value:67},TD,[-1,-1,-1,-1,-1])}},oc=Sg;function o8(i=!0){let e=this,t=new IntersectionObserver(function([n]){let r=n.intersectionRatio;if(r<1){let s=r<=0&&i?"center":"nearest";e.scrollIntoView({block:s,inline:s})}this.disconnect()});return t.observe(e),t}typeof Element<"u"&&!Element.prototype?.scrollIntoViewIfNeeded&&typeof IntersectionObserver<"u"&&(Element.prototype.scrollIntoViewIfNeeded=o8);function a8(i){se(i,"svelte-1dl3a9e",".multiselect-container.svelte-1dl3a9e{width:100%}.multiselect-container.svelte-1dl3a9e .multiselect-dropdown{height:auto;min-height:var(--input-height, 30px)}.multiselect-container.svelte-1dl3a9e div.multiselect{--sms-border:none;--sms-bg:var(--interactive-normal);--sms-options-bg:var(--interactive-normal);--sms-border-radius:var(--radius)}.multiselect-container.svelte-1dl3a9e div.multiselect ul{padding-left:0;border-radius:var(--radius)}.multiselect-container.svelte-1dl3a9e div.multiselect button{height:0}.multiselect-container.svelte-1dl3a9e div.multiselect input{width:0;font-size:var(--font-ui-small)}.multiselect-container.svelte-1dl3a9e div.multiselect li{border-left:none}.multiselect-container.svelte-1dl3a9e div.multiselect li::before{content:none}")}function l8(i){let e,t,n,r;function s(a){i[2](a)}let o={options:i[0].options.flat(),outerDivClass:"multiselect-dropdown",placeholder:i[0].text};return i[1]!==void 0&&(o.selected=i[1]),t=new oc({props:o}),mi.push(()=>Ir(t,"selected",s)),{c(){e=b("div"),ye(t.$$.fragment),v(e,"class","multiselect-container svelte-1dl3a9e")},m(a,l){A(a,e,l),Oe(t,e,null),r=!0},p(a,[l]){let c={};l&1&&(c.options=a[0].options.flat()),l&1&&(c.placeholder=a[0].text),!n&&l&2&&(n=!0,c.selected=a[1],Rr(()=>n=!1)),t.$set(c)},i(a){r||($(t.$$.fragment,a),r=!0)},o(a){V(t.$$.fragment,a),r=!1},d(a){a&&T(e),ve(t)}}}function c8(i,e,t){let n,r=X,s=()=>(r(),r=Mi(o,l=>t(1,n=l)),o);i.$$.on_destroy.push(()=>r());let{filter:o}=e;s();function a(l){n=l,o.set(n)}return i.$$set=l=>{"filter"in l&&s(t(0,o=l.filter))},[o,n,a]}var xg=class extends ne{constructor(e){super(),re(this,e,c8,l8,ie,{filter:0},a8)}},Ww=xg;var Yf=require("obsidian");function u8(i){se(i,"svelte-1xutc2s",".search.svelte-1xutc2s,.search.svelte-1xutc2s input{width:100%}")}function f8(i){let e,t,n,r;return{c(){e=b("div"),v(e,"class","search svelte-1xutc2s")},m(s,o){A(s,e,o),n||(r=H(t=i[1].call(null,e)),n=!0)},p:X,i:X,o:X,d(s){s&&T(e),n=!1,r()}}}function d8(i,e,t){let n,r=X,s=()=>(r(),r=Mi(o,l=>t(2,n=l)),o);i.$$.on_destroy.push(()=>r());let{filter:o}=e;s();let a=l=>{new Yf.TextComponent(l).setPlaceholder(o.text).onChange((0,Yf.debounce)(c=>{Ke(o,n=c,n)},10))};return i.$$set=l=>{"filter"in l&&s(t(0,o=l.filter))},[o,a]}var Pg=class extends ne{constructor(e){super(),re(this,e,d8,f8,ie,{filter:0},u8)}},Hf=Pg;function h8(i){se(i,"svelte-hht686",".nested-filter-container{display:flex;flex-flow:row wrap;gap:0.5rem}.filter-container.svelte-hht686{flex-grow:1;flex-basis:0}")}function Xw(i,e,t){let n=i.slice();return n[5]=e[t],n}function p8(i){let e,t,n,r,s=i[1].type==0&&Uw(i),o=i[1].type==2&&Yw(i),a=i[1].type==1&&Hw(i);return{c(){e=b("div"),s&&s.c(),t=M(),o&&o.c(),n=M(),a&&a.c(),v(e,"class","filter-container svelte-hht686")},m(l,c){A(l,e,c),s&&s.m(e,null),y(e,t),o&&o.m(e,null),y(e,n),a&&a.m(e,null),r=!0},p(l,c){l[1].type==0?s?(s.p(l,c),c&2&&$(s,1)):(s=Uw(l),s.c(),$(s,1),s.m(e,t)):s&&(Ae(),V(s,1,1,()=>{s=null}),De()),l[1].type==2?o?(o.p(l,c),c&2&&$(o,1)):(o=Yw(l),o.c(),$(o,1),o.m(e,n)):o&&(Ae(),V(o,1,1,()=>{o=null}),De()),l[1].type==1?a?(a.p(l,c),c&2&&$(a,1)):(a=Hw(l),a.c(),$(a,1),a.m(e,null)):a&&(Ae(),V(a,1,1,()=>{a=null}),De())},i(l){r||($(s),$(o),$(a),r=!0)},o(l){V(s),V(o),V(a),r=!1},d(l){l&&T(e),s&&s.d(),o&&o.d(),a&&a.d()}}}function m8(i){let e,t,n=fe(i[0].nested),r=[];for(let o=0;oV(r[o],1,1,()=>{r[o]=null});return{c(){e=b("div");for(let o=0;o{o[u]=null}),De(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),$(t,1),t.m(n.parentNode,n))},i(l){r||($(t),r=!0)},o(l){V(t),r=!1},d(l){l&&T(n),o[e].d(l)}}}function O8(i,e,t){let n,r=Ue("filters"),{filters:s}=r;Se(i,s,l=>t(3,n=l));let{layout:o}=e,a;return i.$$set=l=>{"layout"in l&&t(0,o=l.layout)},i.$$.update=()=>{i.$$.dirty&9&&("nested"in o||t(1,a=n.get(o.id)))},[o,a,s,n]}var Gf=class extends ne{constructor(e){super(),re(this,e,O8,g8,ie,{layout:0},h8)}},Jw=Gf;function v8(i){se(i,"svelte-1teebz7",".filters-container.svelte-1teebz7{display:flex;flex-flow:column nowrap;gap:1rem}.controls.svelte-1teebz7{display:flex;justify-content:space-between;align-items:center;gap:0.5rem}.filter-button.svelte-1teebz7{position:relative}.filter-number.svelte-1teebz7{position:absolute;bottom:0;right:0;background-color:var(--interactive-normal);border-radius:50%;width:14px;height:14px;display:flex;align-items:center;justify-content:center;font-size:var(--font-smallest);pointer-events:none}.filters.svelte-1teebz7{display:flex;flex-flow:column nowrap;gap:1rem}")}function ek(i,e,t){let n=i.slice();return n[10]=e[t],n}function tk(i){let e,t,n,r=fe(i[2]),s=[];for(let a=0;aV(s[a],1,1,()=>{s[a]=null});return{c(){e=b("div");for(let a=0;a{n&&(t||(t=Po(e,eg,{easing:Nn},!0)),t.run(1))}),n=!0}},o(a){s=s.filter(Boolean);for(let l=0;l{k=null}),De())},i(_){w||($(n.$$.fragment,_),$(k),w=!0)},o(_){V(n.$$.fragment,_),V(k),w=!1},d(_){_&&T(e),ve(n),k&&k.d(),S=!1,de(C)}}}function b8(i,e,t){let n,r,s=!1,o=Fe(),a=Ue("filters"),{active:l,name:c,layout:u}=a;return Se(i,l,O=>t(1,n=O)),Se(i,u,O=>t(2,r=O)),[s,n,r,o,a,l,c,O=>{new Kf.ExtraButtonComponent(O).setIcon("reset")},O=>{new Kf.ExtraButtonComponent(O).setIcon("filter")},O=>{new Kf.ExtraButtonComponent(O).setIcon("settings")},u,()=>t(0,s=!s),()=>a.reset(),O=>o("settings",O)]}var Cg=class extends ne{constructor(e){super(),re(this,e,b8,y8,ie,{},v8)}},nk=Cg;var po=require("obsidian");var Ro=require("obsidian");function _8(i){se(i,"svelte-zo5pkp",".pagination.svelte-zo5pkp{display:flex;justify-content:space-between;align-items:center;gap:1rem}.paginated-container.svelte-zo5pkp{display:flex;align-items:center;gap:1rem}.paginated.svelte-zo5pkp{display:flex;align-items:center;gap:1rem}.clickable-icon.active.svelte-zo5pkp{background-color:var(--background-modifier-hover)}.slicer.svelte-zo5pkp{display:flex;align-items:center;gap:0.5rem}")}function rk(i,e,t){let n=i.slice();return n[14]=e[t],n}function w8(i){let e,t=i[14]+"",n,r,s,o;function a(){return i[13](i[14])}return{c(){e=b("span"),n=ae(t),r=M(),v(e,"class","clickable-icon svelte-zo5pkp"),ge(e,"active",i[14]==i[0])},m(l,c){A(l,e,c),y(e,n),y(e,r),s||(o=U(e,"click",a),s=!0)},p(l,c){i=l,c&2&&t!==(t=i[14]+"")&&me(n,t),c&3&&ge(e,"active",i[14]==i[0])},d(l){l&&T(e),s=!1,o()}}}function k8(i){let e,t,n;return{c(){e=b("span"),e.textContent="..."},m(r,s){A(r,e,s),t||(n=U(e,"click",i[12]),t=!0)},p:X,d(r){r&&T(e),t=!1,n()}}}function sk(i){let e;function t(s,o){return s[14]==null?k8:w8}let n=t(i,-1),r=n(i);return{c(){r.c(),e=tt()},m(s,o){r.m(s,o),A(s,e,o)},p(s,o){n===(n=t(s,o))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&T(e),r.d(s)}}}function S8(i){let e,t,n,r,s,o,a,l,c,u,f,d,h,p,m,g,O,w=fe(i[1]),S=[];for(let C=0;C{new Ro.DropdownComponent(O).addOptions({10:"10",25:"25",50:"50",100:"100",200:"200"}).setValue(`${s}`).onChange(w=>l("slice",Number(w)))},u,f=O=>{t(9,u=new Ro.ExtraButtonComponent(O).setIcon("chevron-left").setDisabled(o==1).onClick(()=>{l("previous")}))},d,h=O=>{t(10,d=new Ro.ExtraButtonComponent(O).setIcon("chevron-right").setDisabled(o==a).onClick(()=>{l("next")}))},p=O=>{let w=new Ro.Menu;for(let S of n)w.addItem(C=>{C.setTitle(`${S}`).onClick(()=>{l("page",S)})});w.showAtMouseEvent(O)},m=O=>p(O),g=O=>l("page",O);return i.$$set=O=>{"slice"in O&&t(7,s=O.slice),"page"in O&&t(0,o=O.page),"pages"in O&&t(8,a=O.pages)},i.$$.update=()=>{i.$$.dirty&256&&t(11,n=[...Array(a).keys()].map(O=>O+1)),i.$$.dirty&1793&&d&&u&&(d.setDisabled(o==a),u.setDisabled(o==1)),i.$$.dirty&2305&&t(1,r=n.reduce((O,w)=>(w==1||o==1&&(w==2||w==3)||w==a||o==a&&(w==a-1||w==a-2)||w==o-1||w==o||w==o+1?O.push(w):O.length>=1&&O[O.length-1]!=null&&O.push(null),O),[]))},[o,r,l,c,f,h,p,s,a,u,d,n,m,g]}var Eg=class extends ne{constructor(e){super(),re(this,e,x8,S8,ie,{slice:7,page:0,pages:8},_8)}},ok=Eg;var a4=require("obsidian");var nK=require("obsidian");var aK=$e(0),$s=class i{constructor(e,t,n,r){this.text=e;this.field=t;this.type=n;this.func=r;J(this,"active");J(this,"id",xt());J(this,"_func",this.getSortByType())}getSortByType(){switch(this.type){case 0:return(e,t)=>(e[this.field]??"").localeCompare(t[this.field]??"");case 1:return(e,t)=>hi(e[this.field]??0)-hi(t[this.field]??0);case 2:return new Function("a","b",this.func)}}sortAsc(e,t){return this._func(e,t)}sortDesc(e,t){return this._func(t,e)}toState(){return{text:this.text,field:this.field,type:this.type,...this.func&&this.func.length?{func:this.func}:{}}}static fromState(e){return new i(e.text,e.field,e.type,e.func)}static get defaultState(){return{text:"",field:"",type:0}}},ak=[{text:"CR",field:"cr",type:1},{text:"Type",field:"type",type:0},{text:"Size",field:"size",type:0},{text:"Alignment",field:"alignment",type:0}],ac=$s.fromState({text:"Name",field:"name",type:0});function ck(i,e){i.data.builder||(i.data.builder={sidebarIcon:!0,showParty:!0,showXP:!0}),i.data.builder.headers||(i.data.builder.headers=ci(ak),i.saveSettings());let t=$e(i.data.builder.headers.map(f=>$s.fromState(f))),{subscribe:n,set:r,update:s}=t,o=$e(ci(e)),a=$e(!0),l=oi(t,f=>[ac,...f]),c=f=>s(d=>{if(f.active)a.update(h=>!h);else{let h=ut(l).find(p=>p.active);h&&(h.active=!1),f.active=!0,a.set(!0)}return o.update(h=>(h.sort(ut(a)?f.sortAsc.bind(f):f.sortDesc.bind(f)),h)),d});function u(f){s(f),i.saveSettings()}return{allHeaders:l,subscribe:n,set:r,update:s,sort:c,sortDir:a,creatures:o,reset:()=>o.update(()=>ci(e)),setHeadersFromState:f=>u(d=>{i.data.builder.headers=f;let h=f.map(m=>$s.fromState(m)),p=d.findIndex(m=>m.active);return p>=0&&pu(f=>(i.data.builder.headers=ci(ak),i.data.builder.headers.map(d=>$s.fromState(d))))}}var Jr=require("obsidian");var Kr=require("obsidian");var Ag=[],hk=[];(()=>{let i="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e>1;if(i=hk[n])e=n+1;else return!0;if(e==t)return!1}}function uk(i){return i>=127462&&i<=127487}var fk=8205;function pk(i,e,t=!0,n=!0){return(t?mk:C8)(i,e,n)}function mk(i,e,t){if(e==i.length)return e;e&&gk(i.charCodeAt(e))&&Ok(i.charCodeAt(e-1))&&e--;let n=Tg(i,e);for(e+=dk(n);e=0&&uk(Tg(i,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function C8(i,e,t){for(;e>0;){let n=mk(i,e-2,t);if(n=56320&&i<57344}function Ok(i){return i>=55296&&i<56320}function dk(i){return i<65536?1:2}var rt=class i{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=$a(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),za.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=$a(this,e,t);let n=[];return this.decompose(e,t,n,0),za.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new No(this),s=new No(e);for(let o=t,a=t;;){if(r.next(o),s.next(o),o=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new No(this,e)}iterRange(e,t=this.length){return new id(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new nd(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?i.empty:e.length<=32?new Sn(e):za.from(Sn.split(e,[]))}},Sn=class i extends rt{constructor(e,t=E8(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let s=0;;s++){let o=this.text[s],a=r+o.length;if((t?n:a)>=e)return new Qg(r,a,n,o);r=a+1,n++}}decompose(e,t,n,r){let s=e<=0&&t>=this.length?this:new i(vk(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let o=n.pop(),a=td(s.text,o.text.slice(),0,s.length);if(a.length<=32)n.push(new i(a,o.length+s.length));else{let l=a.length>>1;n.push(new i(a.slice(0,l)),new i(a.slice(l)))}}else n.push(s)}replace(e,t,n){if(!(n instanceof i))return super.replace(e,t,n);[e,t]=$a(this,e,t);let r=td(this.text,td(n.text,vk(this.text,0,e)),t),s=this.length+n.length-(t-e);return r.length<=32?new i(r,s):za.from(i.split(r,[]),s)}sliceString(e,t=this.length,n=` +`){[e,t]=$a(this,e,t);let r="";for(let s=0,o=0;s<=t&&oe&&o&&(r+=n),es&&(r+=a.slice(Math.max(0,e-s),t-s)),s=l+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],r=-1;for(let s of e)n.push(s),r+=s.length+1,n.length==32&&(t.push(new i(n,r)),n=[],r=-1);return r>-1&&t.push(new i(n,r)),t}},za=class i extends rt{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let n of e)this.lines+=n.lines}lineInner(e,t,n,r){for(let s=0;;s++){let o=this.children[s],a=r+o.length,l=n+o.lines-1;if((t?l:a)>=e)return o.lineInner(e,t,n,r);r=a+1,n=l+1}}decompose(e,t,n,r){for(let s=0,o=0;o<=t&&s=o){let c=r&((o<=e?1:0)|(l>=t?2:0));o>=e&&l<=t&&!c?n.push(a):a.decompose(e-o,t-o,n,c)}o=l+1}}replace(e,t,n){if([e,t]=$a(this,e,t),n.lines=s&&t<=a){let l=o.replace(e-s,t-s,n),c=this.lines-o.lines+l.lines;if(l.lines>4&&l.lines>c>>6){let u=this.children.slice();return u[r]=l,new i(u,this.length-(t-e)+n.length)}return super.replace(s,a,l)}s=a+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n=` +`){[e,t]=$a(this,e,t);let r="";for(let s=0,o=0;se&&s&&(r+=n),eo&&(r+=a.sliceString(e-o,t-o,n)),o=l+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof i))return 0;let n=0,[r,s,o,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,s+=t){if(r==o||s==a)return n;let l=this.children[r],c=e.children[s];if(l!=c)return n+l.scanIdentical(c,t);n+=l.length+1}}static from(e,t=e.reduce((n,r)=>n+r.length+1,-1)){let n=0;for(let h of e)n+=h.lines;if(n<32){let h=[];for(let p of e)p.flatten(h);return new Sn(h,t)}let r=Math.max(32,n>>5),s=r<<1,o=r>>1,a=[],l=0,c=-1,u=[];function f(h){let p;if(h.lines>s&&h instanceof i)for(let m of h.children)f(m);else h.lines>o&&(l>o||!l)?(d(),a.push(h)):h instanceof Sn&&l&&(p=u[u.length-1])instanceof Sn&&h.lines+p.lines<=32?(l+=h.lines,c+=h.length+1,u[u.length-1]=new Sn(p.text.concat(h.text),p.length+1+h.length)):(l+h.lines>r&&d(),l+=h.lines,c+=h.length+1,u.push(h))}function d(){l!=0&&(a.push(u.length==1?u[0]:i.from(u,c)),c=-1,l=u.length=0)}for(let h of e)f(h);return d(),a.length==1?a[0]:new i(a,t)}};rt.empty=new Sn([""],0);function E8(i){let e=-1;for(let t of i)e+=t.length+1;return e}function td(i,e,t=0,n=1e9){for(let r=0,s=0,o=!0;s=t&&(l>n&&(a=a.slice(0,n-r)),r0?1:(e instanceof Sn?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],s=this.offsets[n],o=s>>1,a=r instanceof Sn?r.text.length:r.children.length;if(o==(t>0?a:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(r instanceof Sn){let l=r.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,l.length>Math.max(0,e))return this.value=e==0?l:t>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=r.children[o+(t<0?-1:0)];e>l.length?(e-=l.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(l),this.offsets.push(t>0?1:(l instanceof Sn?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},id=class{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new No(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}},nd=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<"u"&&(rt.prototype[Symbol.iterator]=function(){return this.iter()},No.prototype[Symbol.iterator]=id.prototype[Symbol.iterator]=nd.prototype[Symbol.iterator]=function(){return this});var Qg=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function $a(i,e,t){return e=Math.max(0,Math.min(i.length,e)),[e,Math.max(e,Math.min(i.length,t))]}function ui(i,e,t=!0,n=!0){return pk(i,e,t,n)}function T8(i){return i>=56320&&i<57344}function A8(i){return i>=55296&&i<56320}function Zi(i,e){let t=i.charCodeAt(e);if(!A8(t)||e+1==i.length)return t;let n=i.charCodeAt(e+1);return T8(n)?(t-55296<<10)+(n-56320)+65536:t}function hc(i){return i<=65535?String.fromCharCode(i):(i-=65536,String.fromCharCode((i>>10)+55296,(i&1023)+56320))}function xn(i){return i<65536?1:2}var Rg=/\r\n?|\n/,Ci=function(i){return i[i.Simple=0]="Simple",i[i.TrackDel=1]="TrackDel",i[i.TrackBefore=2]="TrackBefore",i[i.TrackAfter=3]="TrackAfter",i}(Ci||(Ci={})),gs=class i{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return s+(e-r);s+=a}else{if(n!=Ci.Simple&&c>=e&&(n==Ci.TrackDel&&re||n==Ci.TrackBefore&&re))return null;if(c>e||c==e&&t<0&&!a)return e==r||t<0?s:s+l;s+=l}r=c}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,t=e){for(let n=0,r=0;n=0&&r<=t&&a>=e)return rt?"cover":!0;r=a}return!1}toString(){let e="";for(let t=0;t=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new i(e)}static create(e){return new i(e)}},Ui=class i extends gs{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Mg(this,(t,n,r,s,o)=>e=e.replace(r,r+(n-t),o),!1),e}mapDesc(e,t=!1){return Ig(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let r=0,s=0;r=0){t[r]=a,t[r+1]=o;let l=r>>1;for(;n.length0&&Fs(n,t,s.text),s.forward(u),a+=u}let c=e[o++];for(;a>1].toJSON()))}return e}static of(e,t,n){let r=[],s=[],o=0,a=null;function l(u=!1){if(!u&&!r.length)return;od||f<0||d>t)throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${t})`);let p=h?typeof h=="string"?rt.of(h.split(n||Rg)):h:rt.empty,m=p.length;if(f==d&&m==0)return;fo&&ji(r,f-o,-1),ji(r,d-f,m),Fs(s,r,p),o=d}}return c(e),l(!a),a}static empty(e){return new i(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let r=0;ra&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;n.length=0&&t<=0&&t==i[r+1]?i[r]+=e:r>=0&&e==0&&i[r]==0?i[r+1]+=t:n?(i[r]+=e,i[r+1]+=t):i.push(e,t)}function Fs(i,e,t){if(t.length==0)return;let n=e.length-2>>1;if(n>1])),!(t||o==i.sections.length||i.sections[o+1]<0);)a=i.sections[o++],l=i.sections[o++];e(r,c,s,u,f),r=c,s=u}}}function Ig(i,e,t,n=!1){let r=[],s=n?[]:null,o=new jo(i),a=new jo(e);for(let l=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&a.ins==-1){let c=Math.min(o.len,a.len);ji(r,c,-1),o.forward(c),a.forward(c)}else if(a.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(a.len=0&&l=0){let c=0,u=o.len;for(;u;)if(a.ins==-1){let f=Math.min(u,a.len);c+=f,u-=f,a.forward(f)}else if(a.ins==0&&a.lenl||o.ins>=0&&o.len>l)&&(a||n.length>c),s.forward2(l),o.forward(l)}}}}var jo=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?rt.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?rt.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},Za=class i{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let n,r;return this.empty?n=r=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),n==this.from&&r==this.to?this:new i(n,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return le.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return le.range(this.anchor,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return le.range(e.anchor,e.head)}static create(e,t,n){return new i(e,t,n)}},le=class i{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:i.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;ne.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new i(e.ranges.map(t=>Za.fromJSON(t)),e.main)}static single(e,t=e){return new i([i.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let n=0,r=0;re?8:0)|s)}static normalized(e,t=0){let n=e[t];e.sort((r,s)=>r.from-s.from),t=e.indexOf(n);for(let r=1;rs.head?i.range(l,a):i.range(a,l))}}return new i(e,t)}};function xk(i,e){for(let t of i.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}var Vg=0,Ee=class i{constructor(e,t,n,r,s){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=Vg++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new i(e.combine||(t=>t),e.compareInput||((t,n)=>t===n),e.compare||(e.combine?(t,n)=>t===n:Wg),!!e.static,e.enables)}of(e){return new qa([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new qa(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new qa(e,this,2,t)}from(e,t){return t||(t=n=>n),this.compute([e],n=>t(n.field(e)))}};function Wg(i,e){return i==e||i.length==e.length&&i.every((t,n)=>t===e[n])}var qa=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=Vg++}dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,s=this.id,o=e[s]>>1,a=this.type==2,l=!1,c=!1,u=[];for(let f of this.dependencies)f=="doc"?l=!0:f=="selection"?c=!0:((t=e[f.id])!==null&&t!==void 0?t:1)&1||u.push(e[f.id]);return{create(f){return f.values[o]=n(f),1},update(f,d){if(l&&d.docChanged||c&&(d.docChanged||d.selection)||Ng(f,u)){let h=n(f);if(a?!yk(h,f.values[o],r):!r(h,f.values[o]))return f.values[o]=h,1}return 0},reconfigure:(f,d)=>{let h,p=d.config.address[s];if(p!=null){let m=ad(d,p);if(this.dependencies.every(g=>g instanceof Ee?d.facet(g)===f.facet(g):g instanceof Xt?d.field(g,!1)==f.field(g,!1):!0)||(a?yk(h=n(f),m,r):r(h=n(f),m)))return f.values[o]=m,0}else h=n(f);return f.values[o]=h,1}}}};function yk(i,e,t){if(i.length!=e.length)return!1;for(let n=0;ni[l.id]),r=t.map(l=>l.type),s=n.filter(l=>!(l&1)),o=i[e.id]>>1;function a(l){let c=[];for(let u=0;un===r),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(bk).find(n=>n.field==this);return(t?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:n=>(n.values[t]=this.create(n),1),update:(n,r)=>{let s=n.values[t],o=this.updateF(s,r);return this.compareF(s,o)?0:(n.values[t]=o,1)},reconfigure:(n,r)=>r.config.address[this.id]!=null?(n.values[t]=r.field(this),0):(n.values[t]=this.create(n),1)}}init(e){return[this,bk.of({field:this,create:e})]}get extension(){return this}},Mo={lowest:4,low:3,default:2,high:1,highest:0};function lc(i){return e=>new rd(e,i)}var hr={highest:lc(Mo.highest),high:lc(Mo.high),default:lc(Mo.default),low:lc(Mo.low),lowest:lc(Mo.lowest)},rd=class{constructor(e,t){this.inner=e,this.prec=t}},sd=class i{of(e){return new uc(this,e)}reconfigure(e){return i.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}},uc=class{constructor(e,t){this.compartment=e,this.inner=t}},od=class i{constructor(e,t,n,r,s,o){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,n){let r=[],s=Object.create(null),o=new Map;for(let d of Q8(e,t,o))d instanceof Xt?r.push(d):(s[d.facet.id]||(s[d.facet.id]=[])).push(d);let a=Object.create(null),l=[],c=[];for(let d of r)a[d.id]=c.length<<1,c.push(h=>d.slot(h));let u=n?.config.facets;for(let d in s){let h=s[d],p=h[0].facet,m=u&&u[d]||[];if(h.every(g=>g.type==0))if(a[p.id]=l.length<<1|1,Wg(m,h))l.push(n.facet(p));else{let g=p.combine(h.map(O=>O.value));l.push(n&&p.compare(g,n.facet(p))?n.facet(p):g)}else{for(let g of h)g.type==0?(a[g.id]=l.length<<1|1,l.push(g.value)):(a[g.id]=c.length<<1,c.push(O=>g.dynamicSlot(O)));a[p.id]=c.length<<1,c.push(g=>D8(g,p,h))}}let f=c.map(d=>d(a));return new i(e,o,f,a,l,s)}};function Q8(i,e,t){let n=[[],[],[],[],[]],r=new Map;function s(o,a){let l=r.get(o);if(l!=null){if(l<=a)return;let c=n[l].indexOf(o);c>-1&&n[l].splice(c,1),o instanceof uc&&t.delete(o.compartment)}if(r.set(o,a),Array.isArray(o))for(let c of o)s(c,a);else if(o instanceof uc){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(o.compartment)||o.inner;t.set(o.compartment,c),s(c,a)}else if(o instanceof rd)s(o.inner,o.prec);else if(o instanceof Xt)n[a].push(o),o.provides&&s(o.provides,a);else if(o instanceof qa)n[a].push(o),o.facet.extensions&&s(o.facet.extensions,Mo.default);else{let c=o.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(c,a)}}return s(i,Mo.default),n.reduce((o,a)=>o.concat(a))}function cc(i,e){if(e&1)return 2;let t=e>>1,n=i.status[t];if(n==4)throw new Error("Cyclic dependency between fields and/or facets");if(n&2)return n;i.status[t]=4;let r=i.computeSlot(i,i.config.dynamicSlots[t]);return i.status[t]=2|r}function ad(i,e){return e&1?i.config.staticValues[e>>1]:i.values[e>>1]}var Pk=Ee.define(),jg=Ee.define({combine:i=>i.some(e=>e),static:!0}),Ck=Ee.define({combine:i=>i.length?i[0]:void 0,static:!0}),Ek=Ee.define(),Tk=Ee.define(),Ak=Ee.define(),Dk=Ee.define({combine:i=>i.length?i[0]:!1}),pn=class{constructor(e,t){this.type=e,this.value=t}static define(){return new Zg}},Zg=class{of(e){return new pn(this,e)}},zg=class{constructor(e){this.map=e}of(e){return new Ze(this,e)}},Ze=class i{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new i(this.type,t)}is(e){return this.type==e}static define(e={}){return new zg(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let s=r.map(t);s&&n.push(s)}return n}};Ze.reconfigure=Ze.define();Ze.appendConfig=Ze.define();var gi=class i{constructor(e,t,n,r,s,o){this.startState=e,this.changes=t,this.selection=n,this.effects=r,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,n&&xk(n,t.newLength),s.some(a=>a.type==i.time)||(this.annotations=s.concat(i.time.of(Date.now())))}static create(e,t,n,r,s,o){return new i(e,t,n,r,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(i.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}};gi.time=pn.define();gi.userEvent=pn.define();gi.addToHistory=pn.define();gi.remote=pn.define();function R8(i,e){let t=[];for(let n=0,r=0;;){let s,o;if(n=i[n]))s=i[n++],o=i[n++];else if(r=0;r--){let s=n[r](i);s instanceof gi?i=s:Array.isArray(s)&&s.length==1&&s[0]instanceof gi?i=s[0]:i=Rk(e,La(s),!1)}return i}function I8(i){let e=i.startState,t=e.facet(Ak),n=i;for(let r=t.length-1;r>=0;r--){let s=t[r](i);s&&Object.keys(s).length&&(n=Qk(n,qg(e,s,i.changes.newLength),!0))}return n==i?i:gi.create(e,i.changes,i.selection,n.effects,n.annotations,n.scrollIntoView)}var N8=[];function La(i){return i==null?N8:Array.isArray(i)?i:[i]}var Pt=function(i){return i[i.Word=0]="Word",i[i.Space=1]="Space",i[i.Other=2]="Other",i}(Pt||(Pt={})),j8=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Lg;try{Lg=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function Z8(i){if(Lg)return Lg.test(i);for(let e=0;e"\x80"&&(t.toUpperCase()!=t.toLowerCase()||j8.test(t)))return!0}return!1}function z8(i){return e=>{if(!/\S/.test(e))return Pt.Space;if(Z8(e))return Pt.Word;for(let t=0;t-1)return Pt.Word;return Pt.Other}}var At=class i{constructor(e,t,n,r,s,o){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let a=0;ar.set(c,l)),t=null),r.set(a.value.compartment,a.value.extension)):a.is(Ze.reconfigure)?(t=null,n=a.value):a.is(Ze.appendConfig)&&(t=null,n=La(n).concat(a.value));let s;t?s=e.startState.values.slice():(t=od.resolve(n,r,this),s=new i(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let o=e.startState.facet(jg)?e.newSelection:e.newSelection.asSingle();new i(t,e.newDoc,o,s,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:le.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),s=[n.range],o=La(n.effects);for(let a=1;ao.spec.fromJSON(a,l)))}}return i.create({doc:e.doc,selection:le.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=od.resolve(e.extensions||[],new Map),n=e.doc instanceof rt?e.doc:rt.of((e.doc||"").split(t.staticFacet(i.lineSeparator)||Rg)),r=e.selection?e.selection instanceof le?e.selection:le.single(e.selection.anchor,e.selection.head):le.single(0);return xk(r,n.length),t.staticFacet(jg)||(r=r.asSingle()),new i(t,n,r,t.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(i.tabSize)}get lineBreak(){return this.facet(i.lineSeparator)||` +`}get readOnly(){return this.facet(Dk)}phrase(e,...t){for(let n of this.facet(i.phrases))if(Object.prototype.hasOwnProperty.call(n,e)){e=n[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(n,r)=>{if(r=="$")return"$";let s=+(r||1);return!s||s>t.length?n:t[s-1]})),e}languageDataAt(e,t,n=-1){let r=[];for(let s of this.facet(Pk))for(let o of s(this,t,n))Object.prototype.hasOwnProperty.call(o,e)&&r.push(o[e]);return r}charCategorizer(e){return z8(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-n,a=e-n;for(;o>0;){let l=ui(t,o,!1);if(s(t.slice(l,o))!=Pt.Word)break;o=l}for(;ai.length?i[0]:4});At.lineSeparator=Ck;At.readOnly=Dk;At.phrases=Ee.define({compare(i,e){let t=Object.keys(i),n=Object.keys(e);return t.length==n.length&&t.every(r=>i[r]==e[r])}});At.languageData=Pk;At.changeFilter=Ek;At.transactionFilter=Tk;At.transactionExtender=Ak;sd.reconfigure=Ze.define();function mn(i,e,t={}){let n={};for(let r of i)for(let s of Object.keys(r)){let o=r[s],a=n[s];if(a===void 0)n[s]=o;else if(!(a===o||o===void 0))if(Object.hasOwnProperty.call(t,s))n[s]=t[s](a,o);else throw new Error("Config merge conflict for field "+s)}for(let r in e)n[r]===void 0&&(n[r]=e[r]);return n}var dr=class{eq(e){return this==e}range(e,t=e){return fc.create(e,t,this)}};dr.prototype.startSide=dr.prototype.endSide=0;dr.prototype.point=!1;dr.prototype.mapMode=Ci.TrackDel;var fc=class i{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new i(e,t,n)}};function $g(i,e){return i.from-e.from||i.value.startSide-e.value.startSide}var Fg=class i{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,r=0){let s=n?this.to:this.from;for(let o=r,a=s.length;;){if(o==a)return o;let l=o+a>>1,c=s[l]-e||(n?this.value[l].endSide:this.value[l].startSide)-t;if(l==o)return c>=0?o:a;c>=0?a=l:o=l+1}}between(e,t,n,r){for(let s=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,s);sh||d==h&&c.startSide>0&&c.endSide<=0)continue;(h-d||c.endSide-c.startSide)<0||(o<0&&(o=d),c.point&&(a=Math.max(a,h-d)),n.push(c),r.push(d-o),s.push(h-o))}return{mapped:n.length?new i(r,s,n,a):null,pos:o}}},St=class i{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(e,t,n,r){return new i(e,t,n,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:r=0,filterTo:s=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(n&&(t=t.slice().sort($g)),this.isEmpty)return t.length?i.of(t):this;let a=new ld(this,null,-1).goto(0),l=0,c=[],u=new Zr;for(;a.value||l=0){let f=t[l++];u.addInner(f.from,f.to,f.value)||c.push(f)}else a.rangeIndex==1&&a.chunkIndexthis.chunkEnd(a.chunkIndex)||sa.to||s=s&&e<=s+o.length&&o.between(s,e-s,t-s,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return dc.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return dc.from(e).goto(t)}static compare(e,t,n,r,s=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),a=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),l=_k(o,a,n),c=new Io(o,l,s),u=new Io(a,l,s);n.iterGaps((f,d,h)=>wk(c,f,u,d,h,r)),n.empty&&n.length==0&&wk(c,0,u,0,0,r)}static eq(e,t,n=0,r){r==null&&(r=999999999);let s=e.filter(u=>!u.isEmpty&&t.indexOf(u)<0),o=t.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let a=_k(s,o),l=new Io(s,a,0).goto(n),c=new Io(o,a,0).goto(n);for(;;){if(l.to!=c.to||!Bg(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>r)return!0;l.next(),c.next()}}static spans(e,t,n,r,s=-1){let o=new Io(e,null,s).goto(t),a=t,l=o.openStart;for(;;){let c=Math.min(o.to,n);if(o.point){let u=o.activeForPoint(o.to),f=o.pointFroma&&(r.span(a,c,o.active,l),l=o.openEnd(c));if(o.to>n)return l+(o.point&&o.to>n?1:0);a=o.to,o.next()}}static of(e,t=!1){let n=new Zr;for(let r of e instanceof fc?[e]:t?q8(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(e){if(!e.length)return i.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let r=e[n];r!=i.empty;r=r.nextLayer)t=new i(r.chunkPos,r.chunk,t,Math.max(r.maxPoint,t.maxPoint));return t}};St.empty=new St([],[],null,-1);function q8(i){if(i.length>1)for(let e=i[0],t=1;t0)return i.slice().sort($g);e=n}return i}St.empty.nextLayer=St.empty;var Zr=class i{finishChunk(e){this.chunks.push(new Fg(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new i)).add(e,t,n)}addInner(e,t,n){let r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(St.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=St.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}};function _k(i,e,t){let n=new Map;for(let s of i)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=n&&r.push(new ld(o,t,n,s));return r.length==1?r[0]:new i(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let n=this.heap.length>>1;n>=0;n--)Dg(this.heap,n);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let n=this.heap.length>>1;n>=0;n--)Dg(this.heap,n);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Dg(this.heap,0)}}};function Dg(i,e){for(let t=i[e];;){let n=(e<<1)+1;if(n>=i.length)break;let r=i[n];if(n+1=0&&(r=i[n+1],n++),t.compare(r)<0)break;i[n]=t,i[e]=r,e=n}}var Io=class{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=dc.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Jf(this.active,e),Jf(this.activeTo,e),Jf(this.activeRank,e),this.minActive=kk(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:s}=this.cursor;for(;t0;)t++;ed(this.active,t,n),ed(this.activeTo,t,r),ed(this.activeRank,t,s),e&&ed(e,t,this.cursor.from),this.minActive=kk(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&Jf(n,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&n[r]=0&&!(this.activeRank[n]e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}};function wk(i,e,t,n,r,s){i.goto(e),t.goto(n);let o=n+r,a=n,l=n-e;for(;;){let c=i.to+l-t.to,u=c||i.endSide-t.endSide,f=u<0?i.to+l:t.to,d=Math.min(f,o);if(i.point||t.point?i.point&&t.point&&(i.point==t.point||i.point.eq(t.point))&&Bg(i.activeForPoint(i.to),t.activeForPoint(t.to))||s.comparePoint(a,d,i.point,t.point):d>a&&!Bg(i.active,t.active)&&s.compareRange(a,d,i.active,t.active),f>o)break;(c||i.openEnd!=t.openEnd)&&s.boundChange&&s.boundChange(f),a=f,u<=0&&i.next(),u>=0&&t.next()}}function Bg(i,e){if(i.length!=e.length)return!1;for(let t=0;t=e;n--)i[n+1]=i[n];i[e]=t}function kk(i,e){let t=-1,n=1e9;for(let r=0;r=e)return r;if(r==i.length)break;s+=i.charCodeAt(r)==9?t-s%t:1,r=ui(i,r)}return n===!0?-1:i.length}var Xg="\u037C",Mk=typeof Symbol>"u"?"__"+Xg:Symbol.for(Xg),Ug=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Ik=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},zn=class{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,a,l,c){let u=[],f=/^@(\w+)\b/.exec(o[0]),d=f&&f[1]=="keyframes";if(f&&a==null)return l.push(o[0]+";");for(let h in a){let p=a[h];if(/&/.test(h))s(h.split(/,\s*/).map(m=>o.map(g=>m.replace(/&/,g))).reduce((m,g)=>m.concat(g)),p,l);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+h+") should be a primitive value.");s(r(h),p,u,d)}else p!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,m=>"-"+m.toLowerCase())+": "+p+";")}(u.length||d)&&l.push((n&&!f&&!c?o.map(n):o).join(", ")+" {"+u.join(" ")+"}")}for(let o in e)s(r(o),e[o],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=Ik[Mk]||1;return Ik[Mk]=e+1,Xg+e.toString(36)}static mount(e,t,n){let r=e[Ug],s=n&&n.nonce;r?s&&r.setNonce(s):r=new Yg(e,s),r.mount(Array.isArray(t)?t:[t],e)}},Nk=new Map,Yg=class{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let s=Nk.get(n);if(s)return e[Ug]=s;this.sheet=new r.CSSStyleSheet,Nk.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Ug]=this}mount(e,t){let n=this.sheet,r=0,s=0;for(let o=0;o-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,a),n)for(let c=0;c",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},L8=typeof navigator<"u"&&/Mac/.test(navigator.platform),$8=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(fi=0;fi<10;fi++)Os[48+fi]=Os[96+fi]=String(fi);var fi;for(fi=1;fi<=24;fi++)Os[fi+111]="F"+fi;var fi;for(fi=65;fi<=90;fi++)Os[fi]=String.fromCharCode(fi+32),Fa[fi]=String.fromCharCode(fi);var fi;for(ud in Os)Fa.hasOwnProperty(ud)||(Fa[ud]=Os[ud]);var ud;function jk(i){var e=L8&&i.metaKey&&i.shiftKey&&!i.ctrlKey&&!i.altKey||$8&&i.shiftKey&&i.key&&i.key.length==1||i.key=="Unidentified",t=!e&&i.key||(i.shiftKey?Fa:Os)[i.keyCode]||i.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function wt(){var i=arguments[0];typeof i=="string"&&(i=document.createElement(i));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];typeof r=="string"?i.setAttribute(n,r):r!=null&&(i[n]=r)}e++}for(;e2),xe={mac:Lk||/Mac/.test(Yi.platform),windows:/Win/.test(Yi.platform),linux:/Linux|X11/.test(Yi.platform),ie:qd,ie_version:S2?i0.documentMode||6:r0?+r0[1]:n0?+n0[1]:0,gecko:zk,gecko_version:zk?+(/Firefox\/(\d+)/.exec(Yi.userAgent)||[0,0])[1]:0,chrome:!!Hg,chrome_version:Hg?+Hg[1]:0,ios:Lk,android:/Android\b/.test(Yi.userAgent),webkit:qk,webkit_version:qk?+(/\bAppleWebKit\/(\d+)/.exec(Yi.userAgent)||[0,0])[1]:0,safari:s0,safari_version:s0?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Yi.userAgent)||[0,0])[1]:0,tabSize:i0.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function xc(i){let e;return i.nodeType==11?e=i.getSelection?i:i.ownerDocument:e=i,e.getSelection()}function o0(i,e){return e?i==e||i.contains(e.nodeType!=1?e.parentNode:e):!1}function bd(i,e){if(!e.anchorNode)return!1;try{return o0(i,e.anchorNode)}catch{return!1}}function Pc(i){return i.nodeType==3?Lo(i,0,i.nodeValue.length).getClientRects():i.nodeType==1?i.getClientRects():[]}function yc(i,e,t,n){return t?$k(i,e,t,n,-1)||$k(i,e,t,n,1):!1}function qo(i){for(var e=0;;e++)if(i=i.previousSibling,!i)return e}function xd(i){return i.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(i.nodeName)}function $k(i,e,t,n,r){for(;;){if(i==t&&e==n)return!0;if(e==(r<0?0:Fr(i))){if(i.nodeName=="DIV")return!1;let s=i.parentNode;if(!s||s.nodeType!=1)return!1;e=qo(i)+(r<0?0:1),i=s}else if(i.nodeType==1){if(i=i.childNodes[e+(r<0?-1:0)],i.nodeType==1&&i.contentEditable=="false")return!1;e=r<0?Fr(i):0}else return!1}}function Fr(i){return i.nodeType==3?i.nodeValue.length:i.childNodes.length}function Ld(i,e){let t=e?i.left:i.right;return{left:t,right:t,top:i.top,bottom:i.bottom}}function F8(i){let e=i.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:i.innerWidth,top:0,bottom:i.innerHeight}}function x2(i,e){let t=e.width/i.offsetWidth,n=e.height/i.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-i.offsetWidth)<1)&&(t=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.height-i.offsetHeight)<1)&&(n=1),{scaleX:t,scaleY:n}}function B8(i,e,t,n,r,s,o,a){let l=i.ownerDocument,c=l.defaultView||window;for(let u=i,f=!1;u&&!f;)if(u.nodeType==1){let d,h=u==l.body,p=1,m=1;if(h)d=F8(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(f=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let w=u.getBoundingClientRect();({scaleX:p,scaleY:m}=x2(u,w)),d={left:w.left,right:w.left+u.clientWidth*p,top:w.top,bottom:w.top+u.clientHeight*m}}let g=0,O=0;if(r=="nearest")e.top0&&e.bottom>d.bottom+O&&(O=e.bottom-d.bottom+o)):e.bottom>d.bottom&&(O=e.bottom-d.bottom+o,t<0&&e.top-O0&&e.right>d.right+g&&(g=e.right-d.right+s)):e.right>d.right&&(g=e.right-d.right+s,t<0&&e.leftd.bottom||e.leftd.right)&&(e={left:Math.max(e.left,d.left),right:Math.min(e.right,d.right),top:Math.max(e.top,d.top),bottom:Math.min(e.bottom,d.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function V8(i){let e=i.ownerDocument,t,n;for(let r=i.parentNode;r&&!(r==e.body||t&&n);)if(r.nodeType==1)!n&&r.scrollHeight>r.clientHeight&&(n=r),!t&&r.scrollWidth>r.clientWidth&&(t=r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;return{x:t,y:n}}var a0=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?Fr(t):0),n,Math.min(e.focusOffset,n?Fr(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}},Zo=null;xe.safari&&xe.safari_version>=26&&(Zo=!1);function P2(i){if(i.setActive)return i.setActive();if(Zo)return i.focus(Zo);let e=[];for(let t=i;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(i.focus(Zo==null?{get preventScroll(){return Zo={preventScroll:!0},!0}}:void 0),!Zo){Zo=!1;for(let t=0;tMath.max(1,i.scrollHeight-i.clientHeight-4)}function T2(i,e){for(let t=i,n=e;;){if(t.nodeType==3&&n>0)return{node:t,offset:n};if(t.nodeType==1&&n>0){if(t.contentEditable=="false")return null;t=t.childNodes[n-1],n=Fr(t)}else if(t.parentNode&&!xd(t))n=qo(t),t=t.parentNode;else return null}}function A2(i,e){for(let t=i,n=e;;){if(t.nodeType==3&&nt)return f.domBoundsAround(e,t,c);if(d>=e&&r==-1&&(r=l,s=c),c>t&&f.dom.parentNode==this.dom){o=l,a=u;break}u=d,c=d+f.breakAfter}return{from:s,to:a<0?n+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=q0){this.markDirty();for(let r=e;rthis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}};function D2(i,e,t,n,r,s,o,a,l){let{children:c}=i,u=c.length?c[e]:null,f=s.length?s[s.length-1]:null,d=f?f.breakAfter:o;if(!(e==n&&u&&!o&&!d&&s.length<2&&u.merge(t,r,s.length?f:null,t==0,a,l))){if(n0&&(!o&&s.length&&u.merge(t,u.length,s[0],!1,a,0)?u.breakAfter=s.shift().breakAfter:(tU8||n.flags&8)?!1:(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new i(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new Hi(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return Y8(this.dom,e,t)}},Xs=class i extends Qt{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let r of t)r.setParent(this)}setAttrs(e){if(C2(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,r,s,o){return n&&(!(n instanceof i&&n.mark.eq(this.mark))||e&&s<=0||te&&t.push(n=e&&(r=s),n=l,s++}let o=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new i(this.mark,t,o)}domAtPos(e){return R2(this,e)}coordsAt(e,t){return I2(this,e,t)}};function Y8(i,e,t){let n=i.nodeValue.length;e>n&&(e=n);let r=e,s=e,o=0;e==0&&t<0||e==n&&t>=0?xe.chrome||xe.gecko||(e?(r--,o=1):s=0)?0:a.length-1];return xe.safari&&!o&&l.width==0&&(l=Array.prototype.find.call(a,c=>c.width)||l),o?Ld(l,o<0):l||null}var Cc=class i extends Qt{static create(e,t,n){return new i(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=i.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,n,r,s,o){return n&&(!(n instanceof i)||!this.widget.compare(n.widget)||e>0&&s<=0||t0)?Hi.before(this.dom):Hi.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let r=this.dom.getClientRects(),s=null;if(!r.length)return null;let o=this.side?this.side<0:e>0;for(let a=o?r.length-1:0;s=r[a],!(e>0?a==0:a==r.length-1||s.top0?Hi.before(this.dom):Hi.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return rt.empty}get isHidden(){return!0}};Br.prototype.children=Cc.prototype.children=Ec.prototype.children=q0;function R2(i,e){let t=i.dom,{children:n}=i,r=0;for(let s=0;rs&&e0;s--){let o=n[s-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let s=r;s0&&e instanceof Xs&&r.length&&(n=r[r.length-1])instanceof Xs&&n.mark.eq(e.mark)?M2(n,e.children[0],t-1):(r.push(e),e.setParent(i)),i.length+=e.length}function I2(i,e,t){let n=null,r=-1,s=null,o=-1;function a(c,u){for(let f=0,d=0;f=u&&(h.children.length?a(h,u-d):(!s||s.isHidden&&(t>0||G8(s,h)))&&(p>u||d==p&&h.getSide()>0)?(s=h,o=u-d):(d-1?1:0)!=r.length-(t&&r.indexOf(t)>-1?1:0))return!1;for(let s of n)if(s!=t&&(r.indexOf(s)==-1||i[s]!==e[s]))return!1;return!0}function c0(i,e,t){let n=!1;if(e)for(let r in e)t&&r in t||(n=!0,r=="style"?i.style.cssText="":i.removeAttribute(r));if(t)for(let r in t)e&&e[r]==t[r]||(n=!0,r=="style"?i.style.cssText=t[r]:i.setAttribute(r,t[r]));return n}function K8(i){let e=Object.create(null);for(let t=0;t0?3e8:-4e8:t>0?1e8:-1e8,new Us(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:s,end:o}=N2(e,t);n=(s?t?-3e8:-1:5e8)-1,r=(o?t?2e8:1:-6e8)+1}return new Us(e,n,r,t,e.widget||null,!0)}static line(e){return new Ac(e)}static set(e,t=!1){return St.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};Ne.none=St.empty;var Tc=class i extends Ne{constructor(e){let{start:t,end:n}=N2(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof i&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((n=e.attrs)===null||n===void 0?void 0:n.class))&&Cd(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}};Tc.prototype.point=!1;var Ac=class i extends Ne{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof i&&this.spec.class==e.spec.class&&Cd(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}};Ac.prototype.mapMode=Ci.TrackBefore;Ac.prototype.point=!0;var Us=class i extends Ne{constructor(e,t,n,r,s,o){super(t,n,s,e),this.block=r,this.isReplace=o,this.mapMode=r?t<=0?Ci.TrackBefore:Ci.TrackAfter:Ci.TrackDel}get type(){return this.startSide!=this.endSide?Gi.WidgetRange:this.startSide<=0?Gi.WidgetBefore:Gi.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof i&&J8(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}};Us.prototype.point=!0;function N2(i,e=!1){let{inclusiveStart:t,inclusiveEnd:n}=i;return t==null&&(t=i.inclusive),n==null&&(n=i.inclusive),{start:t??e,end:n??e}}function J8(i,e){return i==e||!!(i&&e&&i.compare(e))}function _d(i,e,t,n=0){let r=t.length-1;r>=0&&t[r]+n>=i?t[r]=Math.max(t[r],e):t.push(i,e)}var Ei=class i extends Qt{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,r,s,o){if(n){if(!(n instanceof i))return!1;this.dom||n.transferDOM(this)}return r&&this.setDeco(n?n.attrs:null),Q2(this,e,t,n?n.children.slice():[],s,o),!0}split(e){let t=new i;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:n,off:r}=this.childPos(e);r&&(t.append(this.children[n].split(r),0),this.children[n].merge(r,this.children[n].length,null,!1,0,0),n++);for(let s=n;s0&&this.children[n-1].length==0;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Cd(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){M2(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=l0(t,this.attrs||{})),n&&(this.attrs=l0({class:n},this.attrs||{}))}domAtPos(e){return R2(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?this.flags&4&&(C2(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(c0(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let r=this.dom.lastChild;for(;r&&Qt.get(r)instanceof Xs;)r=r.lastChild;if(!r||!this.length||r.nodeName!="BR"&&((n=Qt.get(r))===null||n===void 0?void 0:n.isEditable)==!1&&(!xe.ios||!this.children.some(s=>s instanceof Br))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let n of this.children){if(!(n instanceof Br)||/[^ -~]/.test(n.text))return null;let r=Pc(n.dom);if(r.length!=1)return null;e+=r[0].width,t=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let n=I2(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:r}=this.parent.view.viewState,s=n.bottom-n.top;if(Math.abs(s-r.lineHeight)<2&&r.textHeight=t){if(s instanceof i)return s;if(o>t)break}r=o+s.breakAfter}return null}},zo=class i extends Qt{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,r,s,o){return n&&(!(n instanceof i)||!this.widget.compare(n.widget)||e>0&&s<=0||t0}},Dc=class extends pr{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}},bc=class i{constructor(e,t,n,r){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof zo&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Ei),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(fd(new Ec(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof zo)&&this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:a,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(a){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e),s=Math.min(r,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(fd(new Br(this.text.slice(this.textOff,this.textOff+s)),t),n),this.atCursorPos=!0,this.textOff+=s,e-=s,n=r<=s?0:t.length}}span(e,t,n,r){this.buildText(t-e,n,r),this.pos=t,this.openStart<0&&(this.openStart=r)}point(e,t,n,r,s,o){if(this.disallowBlockEffectsFor[o]&&n instanceof Us){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=t-e;if(n instanceof Us)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new zo(n.widget||Ys.block,a,n));else{let l=Cc.create(n.widget||Ys.inline,a,a?0:n.startSide),c=this.atCursorPos&&!l.isEditable&&s<=r.length&&(e0),u=!l.isEditable&&(er.length||n.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!c&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(r),c&&(f.append(fd(new Ec(1),r),s),s=r.length+Math.max(0,s-r.length)),f.append(fd(l,r),s),this.atCursorPos=u,this.pendingBuffer=u?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=s)}static build(e,t,n,r,s){let o=new i(e,t,n,s);return o.openEnd=St.spans(r,t,n,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}};function fd(i,e){for(let t of e)i=new Xs(t,[i],i.length);return i}var Ys=class extends pr{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};Ys.inline=new Ys("span");Ys.block=new Ys("div");var Ct=function(i){return i[i.LTR=0]="LTR",i[i.RTL=1]="RTL",i}(Ct||(Ct={})),$o=Ct.LTR,L0=Ct.RTL;function j2(i){let e=[];for(let t=0;t=t){if(a.level==n)return o;(s<0||(r!=0?r<0?a.fromt:e[s].level>a.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}};function z2(i,e){if(i.length!=e.length)return!1;for(let t=0;t=0;m-=3)if(zr[m+1]==-h){let g=zr[m+2],O=g&2?r:g&4?g&1?s:r:0;O&&(Dt[f]=Dt[zr[m]]=O),a=m;break}}else{if(zr.length==189)break;zr[a++]=f,zr[a++]=d,zr[a++]=l}else if((p=Dt[f])==2||p==1){let m=p==r;l=m?0:1;for(let g=a-3;g>=0;g-=3){let O=zr[g+2];if(O&2)break;if(m)zr[g+2]|=2;else{if(O&4)break;zr[g+2]|=4}}}}}function sQ(i,e,t,n){for(let r=0,s=n;r<=t.length;r++){let o=r?t[r-1].to:i,a=rl;)p==g&&(p=t[--m].from,g=m?t[m-1].to:i),Dt[--p]=h;l=u}else s=c,l++}}}function f0(i,e,t,n,r,s,o){let a=n%2?2:1;if(n%2==r%2)for(let l=e,c=0;ll&&o.push(new Lr(l,m.from,h));let g=m.direction==$o!=!(h%2);d0(i,g?n+1:n,r,m.inner,m.from,m.to,o),l=m.to}p=m.to}else{if(p==t||(u?Dt[p]!=a:Dt[p]==a))break;p++}d?f0(i,l,p,n+1,r,d,o):le;){let u=!0,f=!1;if(!c||l>s[c-1].to){let m=Dt[l-1];m!=a&&(u=!1,f=m==16)}let d=!u&&a==1?[]:null,h=u?n:n+1,p=l;e:for(;;)if(c&&p==s[c-1].to){if(f)break e;let m=s[--c];if(!u)for(let g=m.from,O=c;;){if(g==e)break e;if(O&&s[O-1].to==g)g=s[--O].from;else{if(Dt[g-1]==a)break e;break}}if(d)d.push(m);else{m.toDt.length;)Dt[Dt.length]=256;let n=[],r=e==$o?0:1;return d0(i,r,r,t,0,i.length,n),n}function q2(i){return[new Lr(0,i,0)]}var L2="";function aQ(i,e,t,n,r){var s;let o=n.head-i.from,a=Lr.find(e,o,(s=n.bidiLevel)!==null&&s!==void 0?s:-1,n.assoc),l=e[a],c=l.side(r,t);if(o==c){let d=a+=r?1:-1;if(d<0||d>=e.length)return null;l=e[a=d],o=l.side(!r,t),c=l.side(r,t)}let u=ui(i.text,o,l.forward(r,t));(ul.to)&&(u=c),L2=i.text.slice(Math.min(o,u),Math.max(o,u));let f=a==(r?e.length-1:0)?null:e[a+(r?1:-1)];return f&&u==c&&f.level+(r?0:1)i.some(e=>e)}),Y2=Ee.define({combine:i=>i.some(e=>e)}),H2=Ee.define(),_c=class i{constructor(e,t="nearest",n="nearest",r=5,s=5,o=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new i(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new i(le.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},dd=Ze.define({map:(i,e)=>i.map(e)}),G2=Ze.define();function Ti(i,e,t){let n=i.facet(V2);n.length?n[0](e):window.onerror&&window.onerror(String(e),t,void 0,void 0,e)||(t?console.error(t+":",e):console.error(e))}var vs=Ee.define({combine:i=>i.length?i[0]:!0}),cQ=0,Ba=Ee.define({combine(i){return i.filter((e,t)=>{for(let n=0;n{let l=[];return o&&l.push(Qc.of(c=>{let u=c.plugin(a);return u?o(u):Ne.none})),s&&l.push(s(a)),l})}static fromClass(e,t){return i.define((n,r)=>new e(n,r),t)}},wc=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(n){if(Ti(t.state,n,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){Ti(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(n){Ti(e.state,n,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}},K2=Ee.define(),B0=Ee.define(),Qc=Ee.define(),J2=Ee.define(),Ic=Ee.define(),eS=Ee.define();function Wk(i,e){let t=i.state.facet(eS);if(!t.length)return t;let n=t.map(s=>s instanceof Function?s(i):s),r=[];return St.spans(n,e.from,e.to,{point(){},span(s,o,a,l){let c=s-e.from,u=o-e.from,f=r;for(let d=a.length-1;d>=0;d--,l--){let h=a[d].spec.bidiIsolate,p;if(h==null&&(h=lQ(e.text,c,u)),l>0&&f.length&&(p=f[f.length-1]).to==c&&p.direction==h)p.to=u,f=p.inner;else{let m={from:c,to:u,direction:h,inner:[]};f.push(m),f=m.inner}}}}),r}var tS=Ee.define();function V0(i){let e=0,t=0,n=0,r=0;for(let s of i.state.facet(tS)){let o=s(i);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(n=Math.max(n,o.top)),o.bottom!=null&&(r=Math.max(r,o.bottom)))}return{left:e,right:t,top:n,bottom:r}}var mc=Ee.define(),$r=class i{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(e){return new i(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toAu)break;s+=2}if(!l)return n;new i(l.fromA,l.toA,l.fromB,l.toB).addToSet(n),o=l.toA,a=l.toB}}},Ed=class i{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=Ui.empty(this.startState.doc.length);for(let s of n)this.changes=this.changes.compose(s.changes);let r=[];this.changes.iterChangedRanges((s,o,a,l)=>r.push(new $r(s,o,a,l))),this.changedRanges=r}static create(e,t,n){return new i(e,t,n)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},Td=class extends Qt{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Ne.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Ei],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new $r(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:c,toA:u})=>uthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?r=this.domChanged.newSel.head:!gQ(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let s=r>-1?fQ(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:u}=this.hasComposition;n=new $r(c,u,e.changes.mapPos(c,-1),e.changes.mapPos(u,1)).addToSet(n.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(xe.ie||xe.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,a=this.updateDeco(),l=pQ(o,a,e.changes);return n=$r.extendWithRanges(n,l),!(this.flags&7)&&n.length==0?!1:(this.updateInner(n,e.startState.doc.length,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=xe.chrome||xe.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||r.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let s=[];if(this.view.viewport.from||this.view.viewport.to=0?r[o]:null;if(!a)break;let{fromA:l,toA:c,fromB:u,toB:f}=a,d,h,p,m;if(n&&n.range.fromBu){let C=bc.build(this.view.state.doc,u,n.range.fromB,this.decorations,this.dynamicDecorationMap),k=bc.build(this.view.state.doc,n.range.toB,f,this.decorations,this.dynamicDecorationMap);h=C.breakAtStart,p=C.openStart,m=k.openEnd;let _=this.compositionView(n);k.breakAtStart?_.breakAfter=1:k.content.length&&_.merge(_.length,_.length,k.content[0],!1,k.openStart,0)&&(_.breakAfter=k.content[0].breakAfter,k.content.shift()),C.content.length&&_.merge(0,0,C.content[C.content.length-1],!0,0,C.openEnd)&&C.content.pop(),d=C.content.concat(_).concat(k.content)}else({content:d,breakAtStart:h,openStart:p,openEnd:m}=bc.build(this.view.state.doc,u,f,this.decorations,this.dynamicDecorationMap));let{i:g,off:O}=s.findPos(c,1),{i:w,off:S}=s.findPos(l,-1);D2(this,w,S,g,O,d,h,p,m)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let n of t.effects)n.is(G2)&&(this.editContextFormatting=n.value)}compositionView(e){let t=new Br(e.text.nodeValue);t.flags|=8;for(let{deco:r}of e.marks)t=new Xs(r,[t],t.length);let n=new Ei;return n.append(t,0),n}fixCompositionDOM(e){let t=(s,o)=>{o.flags|=8|(o.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(o);let a=Qt.get(s);a&&a!=o&&(a.dom=null),o.setDOM(s)},n=this.childPos(e.range.fromB,1),r=this.children[n.i];t(e.line,r);for(let s=e.marks.length-1;s>=-1;s--)n=r.childPos(n.off,1),r=r.children[n.i],t(s>=0?e.marks[s].node:e.text,r)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let n=this.view.root.activeElement,r=n==this.dom,s=!r&&!(this.view.state.facet(vs)||this.dom.tabIndex>-1)&&bd(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(r||t||s))return;let o=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(a.anchor)),c=a.empty?l:this.moveToLine(this.domAtPos(a.head));if(xe.gecko&&a.empty&&!this.hasComposition&&uQ(l)){let f=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(f,l.node.childNodes[l.offset]||null)),l=c=new Hi(f,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!yc(l.node,l.offset,u.anchorNode,u.anchorOffset)||!yc(c.node,c.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,a))&&(this.view.observer.ignore(()=>{xe.android&&xe.chrome&&this.dom.contains(u.focusNode)&&mQ(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=xc(this.view.root);if(f)if(a.empty){if(xe.gecko){let d=dQ(l.node,l.offset);if(d&&d!=3){let h=(d==1?T2:A2)(l.node,l.offset);h&&(l=new Hi(h.node,h.offset))}}f.collapse(l.node,l.offset),a.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=a.bidiLevel)}else if(f.extend){f.collapse(l.node,l.offset);try{f.extend(c.node,c.offset)}catch{}}else{let d=document.createRange();a.anchor>a.head&&([l,c]=[c,l]),d.setEnd(c.node,c.offset),d.setStart(l.node,l.offset),f.removeAllRanges(),f.addRange(d)}s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new Hi(u.anchorNode,u.anchorOffset),this.impreciseHead=c.precise?null:new Hi(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&yc(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=xc(e.root),{anchorNode:r,anchorOffset:s}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let o=Ei.find(this,t.head);if(!o)return;let a=o.posAtStart;if(t.head==a||t.head==a+o.length)return;let l=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(t.head+t.assoc);n.collapse(u.node,u.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&n.collapse(r,s)}moveToLine(e){let t=this.dom,n;if(e.node!=t)return e;for(let r=e.offset;!n&&r=0;r--){let s=Qt.get(t.childNodes[r]);s instanceof Ei&&(n=s.domAtPos(s.length))}return n?new Hi(n.node,n.offset,!0):e}nearest(e){for(let t=e;t;){let n=Qt.get(t);if(n&&n.rootView==this)return n;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t=0;o--){let a=this.children[o],l=s-a.breakAfter,c=l-a.length;if(le||a.covers(1))&&(!n||a instanceof Ei&&!(n instanceof Ei&&t>=0)))n=a,r=c;else if(n&&c==e&&l==e&&a instanceof zo&&Math.abs(t)<2){if(a.deco.startSide<0)break;o&&(n=null)}s=c}return n?n.coordsAt(e-r,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),r=this.children[t];if(!(r instanceof Ei))return null;for(;r.children.length;){let{i:a,off:l}=r.childPos(n,1);for(;;a++){if(a==r.children.length)return null;if((r=r.children[a]).length)break}n=l}if(!(r instanceof Br))return null;let s=ui(r.text,n);if(s==n)return null;let o=Lo(r.dom,n,s).getClientRects();for(let a=0;aMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==Ct.LTR;for(let c=0,u=0;ur)break;if(c>=n){let h=f.dom.getBoundingClientRect();if(t.push(h.height),o){let p=f.dom.lastChild,m=p?Pc(p):[];if(m.length){let g=m[m.length-1],O=l?g.right-h.left:h.right-g.left;O>a&&(a=O,this.minWidth=s,this.minWidthFrom=c,this.minWidthTo=d)}}}c=d+f.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?Ct.RTL:Ct.LTR}measureTextSize(){for(let s of this.children)if(s instanceof Ei){let o=s.measureTextSize();if(o)return o}let e=document.createElement("div"),t,n,r;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=Pc(e.firstChild)[0];t=e.getBoundingClientRect().height,n=s?s.width/27:7,r=s?s.height:t,e.remove()}),{lineHeight:t,charWidth:n,textHeight:r}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Pd(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let s=r==t.viewports.length?null:t.viewports[r],o=s?s.from-1:this.length;if(o>n){let a=(t.lineBlockAt(o).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(Ne.replace({widget:new Dc(a),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!s)break;n=s.to+1}return Ne.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Qc).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),n=!1,r=this.view.state.facet(J2).map((s,o)=>{let a=typeof s=="function";return a&&(n=!0),a?s(this.view):s});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(St.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),r;if(!n)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,r.left),top:Math.min(n.top,r.top),right:Math.max(n.right,r.right),bottom:Math.max(n.bottom,r.bottom)});let s=V0(this.view),o={left:n.left-s.left,top:n.top-s.top,right:n.right+s.right,bottom:n.bottom+s.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;B8(this.view.scrollDOM,o,t.head{ne.from&&(t=!0)}),t}function OQ(i,e,t=1){let n=i.charCategorizer(e),r=i.doc.lineAt(e),s=e-r.from;if(r.length==0)return le.cursor(e);s==0?t=1:s==r.length&&(t=-1);let o=s,a=s;t<0?o=ui(r.text,s,!1):a=ui(r.text,s);let l=n(r.text.slice(o,a));for(;o>0;){let c=ui(r.text,o,!1);if(n(r.text.slice(c,o))!=l)break;o=c}for(;ai?e.left-i:Math.max(0,i-e.right)}function yQ(i,e){return e.top>i?e.top-i:Math.max(0,i-e.bottom)}function Gg(i,e){return i.tope.top+1}function Xk(i,e){return ei.bottom?{top:i.top,left:i.left,right:i.right,bottom:e}:i}function p0(i,e,t){let n,r,s,o,a=!1,l,c,u,f;for(let p=i.firstChild;p;p=p.nextSibling){let m=Pc(p);for(let g=0;gS||o==S&&s>w)&&(n=p,r=O,s=w,o=S,a=w?e0:gO.bottom&&(!u||u.bottomO.top)&&(c=p,f=O):u&&Gg(u,O)?u=Uk(u,O.bottom):f&&Gg(f,O)&&(f=Xk(f,O.top))}}if(u&&u.bottom>=t?(n=l,r=u):f&&f.top<=t&&(n=c,r=f),!n)return{node:i,offset:0};let d=Math.max(r.left,Math.min(r.right,e));if(n.nodeType==3)return Yk(n,d,t);if(a&&n.contentEditable!="false")return p0(n,d,t);let h=Array.prototype.indexOf.call(i.childNodes,n)+(e>=(r.left+r.right)/2?1:0);return{node:i,offset:h}}function Yk(i,e,t){let n=i.nodeValue.length,r=-1,s=1e9,o=0;for(let a=0;at?u.top-t:t-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&f=(u.left+u.right)/2,h=d;if((xe.chrome||xe.gecko)&&Lo(i,a).getBoundingClientRect().left==u.right&&(h=!d),f<=0)return{node:i,offset:a+(h?1:0)};r=a+(h?1:0),s=f}}}return{node:i,offset:r>-1?r:o>0?i.nodeValue.length:0}}function nS(i,e,t,n=-1){var r,s;let o=i.contentDOM.getBoundingClientRect(),a=o.top+i.viewState.paddingTop,l,{docHeight:c}=i.viewState,{x:u,y:f}=e,d=f-a;if(d<0)return 0;if(d>c)return i.state.doc.length;for(let C=i.viewState.heightOracle.textHeight/2,k=!1;l=i.elementAtHeight(d),l.type!=Gi.Text;)for(;d=n>0?l.bottom+C:l.top-C,!(d>=0&&d<=c);){if(k)return t?null:0;k=!0,n=-n}f=a+d;let h=l.from;if(hi.viewport.to)return i.viewport.to==i.state.doc.length?i.state.doc.length:t?null:Hk(i,o,l,u,f);let p=i.dom.ownerDocument,m=i.root.elementFromPoint?i.root:p,g=m.elementFromPoint(u,f);g&&!i.contentDOM.contains(g)&&(g=null),g||(u=Math.max(o.left+1,Math.min(o.right-1,u)),g=m.elementFromPoint(u,f),g&&!i.contentDOM.contains(g)&&(g=null));let O,w=-1;if(g&&((r=i.docView.nearest(g))===null||r===void 0?void 0:r.isEditable)!=!1){if(p.caretPositionFromPoint){let C=p.caretPositionFromPoint(u,f);C&&({offsetNode:O,offset:w}=C)}else if(p.caretRangeFromPoint){let C=p.caretRangeFromPoint(u,f);C&&({startContainer:O,startOffset:w}=C)}O&&(!i.contentDOM.contains(O)||xe.safari&&bQ(O,w,u)||xe.chrome&&_Q(O,w,u))&&(O=void 0),O&&(w=Math.min(Fr(O),w))}if(!O||!i.docView.dom.contains(O)){let C=Ei.find(i.docView,h);if(!C)return d>l.top+l.height/2?l.to:l.from;({node:O,offset:w}=p0(C.dom,u,f))}let S=i.docView.nearest(O);if(!S)return null;if(S.isWidget&&((s=S.dom)===null||s===void 0?void 0:s.nodeType)==1){let C=S.dom.getBoundingClientRect();return e.yi.defaultLineHeight*1.5){let a=i.viewState.heightOracle.textHeight,l=Math.floor((r-t.top-(i.defaultLineHeight-a)*.5)/a);s+=l*i.viewState.heightOracle.lineLength}let o=i.state.sliceDoc(t.from,t.to);return t.from+cd(o,s,i.state.tabSize)}function rS(i,e,t){let n,r=i;if(i.nodeType!=3||e!=(n=i.nodeValue.length))return!1;for(;;){let s=r.nextSibling;if(s){if(s.nodeName=="BR")break;return!1}else{let o=r.parentNode;if(!o||o.nodeName=="DIV")break;r=o}}return Lo(i,n-1,n).getBoundingClientRect().right>t}function bQ(i,e,t){return rS(i,e,t)}function _Q(i,e,t){if(e!=0)return rS(i,e,t);for(let r=i;;){let s=r.parentNode;if(!s||s.nodeType!=1||s.firstChild!=r)return!1;if(s.classList.contains("cm-line"))break;r=s}let n=i.nodeType==1?i.getBoundingClientRect():Lo(i,0,Math.max(i.nodeValue.length,1)).getBoundingClientRect();return t-n.left>5}function m0(i,e,t){let n=i.lineBlockAt(e);if(Array.isArray(n.type)){let r;for(let s of n.type){if(s.from>e)break;if(!(s.toe)return s;(!r||s.type==Gi.Text&&(r.type!=s.type||(t<0?s.frome)))&&(r=s)}}return r||n}return n}function wQ(i,e,t,n){let r=m0(i,e.head,e.assoc||-1),s=!n||r.type!=Gi.Text||!(i.lineWrapping||r.widgetLineBreaks)?null:i.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(s){let o=i.dom.getBoundingClientRect(),a=i.textDirectionAt(r.from),l=i.posAtCoords({x:t==(a==Ct.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(l!=null)return le.cursor(l,t?-1:1)}return le.cursor(t?r.to:r.from,t?-1:1)}function Gk(i,e,t,n){let r=i.state.doc.lineAt(e.head),s=i.bidiSpans(r),o=i.textDirectionAt(r.from);for(let a=e,l=null;;){let c=aQ(r,s,o,a,t),u=L2;if(!c){if(r.number==(t?i.state.doc.lines:1))return a;u=` +`,r=i.state.doc.line(r.number+(t?1:-1)),s=i.bidiSpans(r),c=i.visualLineSide(r,!t)}if(l){if(!l(u))return a}else{if(!n)return c;l=n(u)}a=c}}function kQ(i,e,t){let n=i.state.charCategorizer(e),r=n(t);return s=>{let o=n(s);return r==Pt.Space&&(r=o),r==o}}function SQ(i,e,t,n){let r=e.head,s=t?1:-1;if(r==(t?i.state.doc.length:0))return le.cursor(r,e.assoc);let o=e.goalColumn,a,l=i.contentDOM.getBoundingClientRect(),c=i.coordsAtPos(r,e.assoc||-1),u=i.documentTop;if(c)o==null&&(o=c.left-l.left),a=s<0?c.top:c.bottom;else{let h=i.viewState.lineBlockAt(r);o==null&&(o=Math.min(l.right-l.left,i.defaultCharacterWidth*(r-h.from))),a=(s<0?h.top:h.bottom)+u}let f=l.left+o,d=n??i.viewState.heightOracle.textHeight>>1;for(let h=0;;h+=10){let p=a+(d+h)*s,m=nS(i,{x:f,y:p},!1,s);if(pl.bottom||(s<0?mr)){let g=i.docView.coordsForChar(m),O=!g||p{if(e>s&&er(i)),t.from,e.head>t.from?-1:1);return n==t.from?t:le.cursor(n,ns)&&!PQ(o,t)&&this.lineBreak(),r=o}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,a;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,n),o=this.lineSeparator.length):(a=r.exec(t))&&(s=a.index,o=a[0].length),this.append(t.slice(n,s<0?t.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=o-1);n=s+o}}readNode(e){if(e.cmIgnore)return;let t=Qt.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let r=n.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(xQ(e,n.node,n.offset)?t:0))}};function xQ(i,e,t){for(;;){if(!e||t-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let a=s||o?[]:EQ(e),l=new g0(a,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=TQ(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=s&&s.node==a.focusNode&&s.offset==a.focusOffset||!o0(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),c=o&&o.node==a.anchorNode&&o.offset==a.anchorOffset||!o0(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),u=e.viewport;if((xe.ios||xe.chrome)&&e.state.selection.main.empty&&l!=c&&(u.from>0||u.toDate.now()-100?i.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:a}=e.bounds,l=r.from,c=null;(s===8||xe.android&&e.text.length=r.from&&t.to<=r.to&&(t.from!=r.from||t.to!=r.to)&&r.to-r.from-(t.to-t.from)<=4?t={from:r.from,to:r.to,insert:i.state.doc.slice(r.from,t.from).append(t.insert).append(i.state.doc.slice(t.to,r.to))}:xe.chrome&&t&&t.from==t.to&&t.from==r.head&&t.insert.toString()==` + `&&i.lineWrapping&&(n&&(n=le.single(n.main.anchor-1,n.main.head-1)),t={from:r.from,to:r.to,insert:rt.of([" "])}),t)return W0(i,t,n,s);if(n&&!n.main.eq(r)){let o=!1,a="select";return i.inputState.lastSelectionTime>Date.now()-50&&(i.inputState.lastSelectionOrigin=="select"&&(o=!0),a=i.inputState.lastSelectionOrigin,a=="select.pointer"&&(n=sS(i.state.facet(Ic).map(l=>l(i)),n))),i.dispatch({selection:n,scrollIntoView:o,userEvent:a}),!0}else return!1}function W0(i,e,t,n=-1){if(xe.ios&&i.inputState.flushIOSKey(e))return!0;let r=i.state.selection.main;if(xe.android&&(e.to==r.to&&(e.from==r.from||e.from==r.from-1&&i.state.sliceDoc(e.from,r.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Xa(i.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||n==8&&e.insert.lengthr.head)&&Xa(i.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&e.insert.length==0&&Xa(i.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();i.inputState.composing>=0&&i.inputState.composing++;let o,a=()=>o||(o=CQ(i,e,t));return i.state.facet(W2).some(l=>l(i,e.from,e.to,s,a))||i.dispatch(a()),!0}function CQ(i,e,t){let n,r=i.state,s=r.selection.main,o=-1;if(e.from==e.to&&e.froms.to){let l=e.fromf(i)),c,l);e.from==u&&(o=u)}if(o>-1)n={changes:e,selection:le.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&i.inputState.composing<0){let l=s.frome.to?r.sliceDoc(e.to,s.to):"";n=r.replaceSelection(i.state.toText(l+e.insert.sliceString(0,void 0,i.state.lineBreak)+c))}else{let l=r.changes(e),c=t&&t.main.to<=l.newLength?t.main:void 0;if(r.selection.ranges.length>1&&i.inputState.composing>=0&&e.to<=s.to&&e.to>=s.to-10){let u=i.state.sliceDoc(e.from,e.to),f,d=t&&iS(i,t.main.head);if(d){let m=e.insert.length-(e.to-e.from);f={from:d.from,to:d.to-m}}else f=i.state.doc.lineAt(s.head);let h=s.to-e.to,p=s.to-s.from;n=r.changeByRange(m=>{if(m.from==s.from&&m.to==s.to)return{changes:l,range:c||m.map(l)};let g=m.to-h,O=g-u.length;if(m.to-m.from!=p||i.state.sliceDoc(O,g)!=u||m.to>=f.from&&m.from<=f.to)return{range:m};let w=r.changes({from:O,to:g,insert:e.insert}),S=m.to-s.to;return{changes:w,range:c?le.range(Math.max(0,c.anchor+S),Math.max(0,c.head+S)):m.map(w)}})}else n={changes:l,selection:c&&r.selection.replaceRange(c)}}let a="input.type";return(i.composing||i.inputState.compositionPendingChange&&i.inputState.compositionEndedAt>Date.now()-50)&&(i.inputState.compositionPendingChange=!1,a+=".compose",i.inputState.compositionFirstChange&&(a+=".start",i.inputState.compositionFirstChange=!1)),r.update(n,{userEvent:a,scrollIntoView:!0})}function aS(i,e,t,n){let r=Math.min(i.length,e.length),s=0;for(;s0&&a>0&&i.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if(n=="end"){let l=Math.max(0,s-Math.min(o,a));t-=o+l-s}if(o=o?s-t:0;s-=l,a=s+(a-o),o=s}else if(a=a?s-t:0;s-=l,o=s+(o-a),a=s}return{from:s,toA:o,toB:a}}function EQ(i){let e=[];if(i.root.activeElement!=i.contentDOM)return e;let{anchorNode:t,anchorOffset:n,focusNode:r,focusOffset:s}=i.observer.selectionRange;return t&&(e.push(new Ad(t,n)),(r!=t||s!=n)&&e.push(new Ad(r,s))),e}function TQ(i,e){if(i.length==0)return null;let t=i[0].pos,n=i.length==2?i[1].pos:t;return t>-1&&n>-1?le.single(t+e,n+e):null}var v0=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,xe.safari&&e.contentDOM.addEventListener("input",()=>null),xe.gecko&&BQ(e.contentDOM.ownerDocument)}handleEvent(e){!NQ(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let r of n.observers)r(this.view,t);for(let r of n.handlers){if(t.defaultPrevented)break;if(r(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=AQ(e),n=this.handlers,r=this.view.contentDOM;for(let s in t)if(s!="scroll"){let o=!t[s].handlers.length,a=n[s];a&&o!=!a.handlers.length&&(r.removeEventListener(s,this.handleEvent),a=null),a||r.addEventListener(s,this.handleEvent,{passive:o})}for(let s in n)s!="scroll"&&!t[s]&&r.removeEventListener(s,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&cS.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),xe.android&&xe.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return xe.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=lS.find(n=>n.keyCode==e.keyCode))&&!e.ctrlKey||DQ.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from0?!0:xe.safari&&!xe.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function Kk(i,e){return(t,n)=>{try{return e.call(i,n,t)}catch(r){Ti(t.state,r)}}}function AQ(i){let e=Object.create(null);function t(n){return e[n]||(e[n]={observers:[],handlers:[]})}for(let n of i){let r=n.spec,s=r&&r.plugin.domEventHandlers,o=r&&r.plugin.domEventObservers;if(s)for(let a in s){let l=s[a];l&&t(a).handlers.push(Kk(n.value,l))}if(o)for(let a in o){let l=o[a];l&&t(a).observers.push(Kk(n.value,l))}}for(let n in mr)t(n).handlers.push(mr[n]);for(let n in Ln)t(n).observers.push(Ln[n]);return e}var lS=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],DQ="dthko",cS=[16,17,18,20,91,92,224,225],hd=6;function pd(i){return Math.max(0,i)*.7+8}function QQ(i,e){return Math.max(Math.abs(i.clientX-e.clientX),Math.abs(i.clientY-e.clientY))}var y0=class{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=V8(e.contentDOM),this.atoms=e.state.facet(Ic).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(At.allowMultipleSelections)&&RQ(e,t),this.dragging=IQ(e,t)&&dS(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&QQ(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,s=0,o=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:a}=this.scrollParents.y.getBoundingClientRect());let l=V0(this.view);e.clientX-l.left<=r+hd?t=-pd(r-e.clientX):e.clientX+l.right>=o-hd&&(t=pd(e.clientX-o)),e.clientY-l.top<=s+hd?n=-pd(s-e.clientY):e.clientY+l.bottom>=a-hd&&(n=pd(e.clientY-a)),this.setScrollSpeed(t,n)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=sS(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};function RQ(i,e){let t=i.state.facet($2);return t.length?t[0](e):xe.mac?e.metaKey:e.ctrlKey}function MQ(i,e){let t=i.state.facet(F2);return t.length?t[0](e):xe.mac?!e.altKey:!e.ctrlKey}function IQ(i,e){let{main:t}=i.state.selection;if(t.empty)return!1;let n=xc(i.root);if(!n||n.rangeCount==0)return!0;let r=n.getRangeAt(0).getClientRects();for(let s=0;s=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function NQ(i,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,n;t!=i.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(n=Qt.get(t))&&n.ignoreEvent(e))return!1;return!0}var mr=Object.create(null),Ln=Object.create(null),uS=xe.ie&&xe.ie_version<15||xe.ios&&xe.webkit_version<604;function jQ(i){let e=i.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{i.focus(),t.remove(),fS(i,t.value)},50)}function $d(i,e,t){for(let n of i.facet(e))t=n(t,i);return t}function fS(i,e){e=$d(i.state,$0,e);let{state:t}=i,n,r=1,s=t.toText(e),o=s.lines==t.selection.ranges.length;if(b0!=null&&t.selection.ranges.every(l=>l.empty)&&b0==s.toString()){let l=-1;n=t.changeByRange(c=>{let u=t.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;let f=t.toText((o?s.line(r++).text:e)+t.lineBreak);return{changes:{from:u.from,insert:f},range:le.cursor(c.from+f.length)}})}else o?n=t.changeByRange(l=>{let c=s.line(r++);return{changes:{from:l.from,to:l.to,insert:c.text},range:le.cursor(l.from+c.length)}}):n=t.replaceSelection(s);i.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}Ln.scroll=i=>{i.inputState.lastScrollTop=i.scrollDOM.scrollTop,i.inputState.lastScrollLeft=i.scrollDOM.scrollLeft};mr.keydown=(i,e)=>(i.inputState.setSelectionOrigin("select"),e.keyCode==27&&i.inputState.tabFocusMode!=0&&(i.inputState.tabFocusMode=Date.now()+2e3),!1);Ln.touchstart=(i,e)=>{i.inputState.lastTouchTime=Date.now(),i.inputState.setSelectionOrigin("select.pointer")};Ln.touchmove=i=>{i.inputState.setSelectionOrigin("select.pointer")};mr.mousedown=(i,e)=>{if(i.observer.flush(),i.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let n of i.state.facet(B2))if(t=n(i,e),t)break;if(!t&&e.button==0&&(t=qQ(i,e)),t){let n=!i.hasFocus;i.inputState.startMouseSelection(new y0(i,e,t,n)),n&&i.observer.ignore(()=>{P2(i.contentDOM);let s=i.root.activeElement;s&&!s.contains(i.contentDOM)&&s.blur()});let r=i.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}else i.inputState.setSelectionOrigin("select.pointer");return!1};function Jk(i,e,t,n){if(n==1)return le.cursor(e,t);if(n==2)return OQ(i.state,e,t);{let r=Ei.find(i.docView,e),s=i.state.doc.lineAt(r?r.posAtEnd:e),o=r?r.posAtStart:s.from,a=r?r.posAtEnd:s.to;return ae>=t.top&&e<=t.bottom&&i>=t.left&&i<=t.right;function ZQ(i,e,t,n){let r=Ei.find(i.docView,e);if(!r)return 1;let s=e-r.posAtStart;if(s==0)return 1;if(s==r.length)return-1;let o=r.coordsAt(s,-1);if(o&&e2(t,n,o))return-1;let a=r.coordsAt(s,1);return a&&e2(t,n,a)?1:o&&o.bottom>=n?-1:1}function t2(i,e){let t=i.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:ZQ(i,t,e.clientX,e.clientY)}}var zQ=xe.ie&&xe.ie_version<=11,i2=null,n2=0,r2=0;function dS(i){if(!zQ)return i.detail;let e=i2,t=r2;return i2=i,r2=Date.now(),n2=!e||t>Date.now()-400&&Math.abs(e.clientX-i.clientX)<2&&Math.abs(e.clientY-i.clientY)<2?(n2+1)%3:1}function qQ(i,e){let t=t2(i,e),n=dS(e),r=i.state.selection;return{update(s){s.docChanged&&(t.pos=s.changes.mapPos(t.pos),r=r.map(s.changes))},get(s,o,a){let l=t2(i,s),c,u=Jk(i,l.pos,l.bias,n);if(t.pos!=l.pos&&!o){let f=Jk(i,t.pos,t.bias,n),d=Math.min(f.from,u.from),h=Math.max(f.to,u.to);u=d1&&(c=LQ(r,l.pos))?c:a?r.addRange(u):le.create([u])}}}function LQ(i,e){for(let t=0;t=e)return le.create(i.ranges.slice(0,t).concat(i.ranges.slice(t+1)),i.mainIndex==t?0:i.mainIndex-(i.mainIndex>t?1:0))}return null}mr.dragstart=(i,e)=>{let{selection:{main:t}}=i.state;if(e.target.draggable){let r=i.docView.nearest(e.target);if(r&&r.isWidget){let s=r.posAtStart,o=s+r.length;(s>=t.to||o<=t.from)&&(t=le.range(s,o))}}let{inputState:n}=i;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",$d(i.state,F0,i.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};mr.dragend=i=>(i.inputState.draggedContent=null,!1);function s2(i,e,t,n){if(t=$d(i.state,$0,t),!t)return;let r=i.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=i.inputState,o=n&&s&&MQ(i,e)?{from:s.from,to:s.to}:null,a={from:r,insert:t},l=i.state.changes(o?[o,a]:a);i.focus(),i.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:o?"move.drop":"input.drop"}),i.inputState.draggedContent=null}mr.drop=(i,e)=>{if(!e.dataTransfer)return!1;if(i.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let n=Array(t.length),r=0,s=()=>{++r==t.length&&s2(i,e,n.filter(o=>o!=null).join(i.state.lineBreak),!1)};for(let o=0;o{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(n[o]=a.result),s()},a.readAsText(t[o])}return!0}else{let n=e.dataTransfer.getData("Text");if(n)return s2(i,e,n,!0),!0}return!1};mr.paste=(i,e)=>{if(i.state.readOnly)return!0;i.observer.flush();let t=uS?null:e.clipboardData;return t?(fS(i,t.getData("text/plain")||t.getData("text/uri-list")),!0):(jQ(i),!1)};function $Q(i,e){let t=i.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout(()=>{n.remove(),i.focus()},50)}function FQ(i){let e=[],t=[],n=!1;for(let r of i.selection.ranges)r.empty||(e.push(i.sliceDoc(r.from,r.to)),t.push(r));if(!e.length){let r=-1;for(let{from:s}of i.selection.ranges){let o=i.doc.lineAt(s);o.number>r&&(e.push(o.text),t.push({from:o.from,to:Math.min(i.doc.length,o.to+1)})),r=o.number}n=!0}return{text:$d(i,F0,e.join(i.lineBreak)),ranges:t,linewise:n}}var b0=null;mr.copy=mr.cut=(i,e)=>{let{text:t,ranges:n,linewise:r}=FQ(i.state);if(!t&&!r)return!1;b0=r?t:null,e.type=="cut"&&!i.state.readOnly&&i.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let s=uS?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",t),!0):($Q(i,t),!1)};var hS=pn.define();function pS(i,e){let t=[];for(let n of i.facet(X2)){let r=n(i,e);r&&t.push(r)}return t.length?i.update({effects:t,annotations:hS.of(!0)}):null}function mS(i){setTimeout(()=>{let e=i.hasFocus;if(e!=i.inputState.notifiedFocused){let t=pS(i.state,e);t?i.dispatch(t):i.update([])}},10)}Ln.focus=i=>{i.inputState.lastFocusTime=Date.now(),!i.scrollDOM.scrollTop&&(i.inputState.lastScrollTop||i.inputState.lastScrollLeft)&&(i.scrollDOM.scrollTop=i.inputState.lastScrollTop,i.scrollDOM.scrollLeft=i.inputState.lastScrollLeft),mS(i)};Ln.blur=i=>{i.observer.clearSelectionRange(),mS(i)};Ln.compositionstart=Ln.compositionupdate=i=>{i.observer.editContext||(i.inputState.compositionFirstChange==null&&(i.inputState.compositionFirstChange=!0),i.inputState.composing<0&&(i.inputState.composing=0))};Ln.compositionend=i=>{i.observer.editContext||(i.inputState.composing=-1,i.inputState.compositionEndedAt=Date.now(),i.inputState.compositionPendingKey=!0,i.inputState.compositionPendingChange=i.observer.pendingRecords().length>0,i.inputState.compositionFirstChange=null,xe.chrome&&xe.android?i.observer.flushSoon():i.inputState.compositionPendingChange?Promise.resolve().then(()=>i.observer.flush()):setTimeout(()=>{i.inputState.composing<0&&i.docView.hasComposition&&i.update([])},50))};Ln.contextmenu=i=>{i.inputState.lastContextMenu=Date.now()};mr.beforeinput=(i,e)=>{var t,n;if(e.inputType=="insertReplacementText"&&i.observer.editContext){let s=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let a=o[0],l=i.posAtDOM(a.startContainer,a.startOffset),c=i.posAtDOM(a.endContainer,a.endOffset);return W0(i,{from:l,to:c,insert:i.state.toText(s)},null),!0}}let r;if(xe.chrome&&xe.android&&(r=lS.find(s=>s.inputType==e.inputType))&&(i.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let s=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&i.hasFocus&&(i.contentDOM.blur(),i.focus())},100)}return xe.ios&&e.inputType=="deleteContentForward"&&i.observer.flushSoon(),xe.safari&&e.inputType=="insertText"&&i.inputState.composing>=0&&setTimeout(()=>Ln.compositionend(i,e),20),!1};var o2=new Set;function BQ(i){o2.has(i)||(o2.add(i),i.addEventListener("copy",()=>{}),i.addEventListener("cut",()=>{}))}var a2=["pre-wrap","normal","pre-line","break-spaces"],Ua=!1;function l2(){Ua=!1}var _0=class{constructor(e){this.lineWrapping=e,this.doc=rt.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return a2.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n-1,l=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=s,l){this.heightSamples={};for(let c=0;c0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>wd&&(Ua=!0),this.height=e)}replace(e,t,n){return i.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let s=this,o=n.doc;for(let a=r.length-1;a>=0;a--){let{fromA:l,toA:c,fromB:u,toB:f}=r[a],d=s.lineAt(l,qt.ByPosNoHeight,n.setDoc(t),0,0),h=d.to>=c?d:s.lineAt(c,qt.ByPosNoHeight,n,0,0);for(f+=h.to-c,c=h.to;a>0&&d.from<=r[a-1].toA;)l=r[a-1].fromA,u=r[a-1].fromB,a--,ls*2){let a=e[t-1];a.break?e.splice(--t,1,a.left,null,a.right):e.splice(--t,1,a.left,a.right),n+=1+a.break,r-=a.size}else if(s>r*2){let a=e[n];a.break?e.splice(n,1,a.left,null,a.right):e.splice(n,1,a.left,a.right),n+=2+a.break,s-=a.size}else break;else if(r=s&&o(this.blockAt(0,n,r,s))}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setHeight(r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}},qn=class i extends Qd{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,r){return new qr(r,this.length,n,this.height,this.breaks)}replace(e,t,n){let r=n[0];return n.length==1&&(r instanceof i||r instanceof Ws&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof Ws?r=new i(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):Pn.of(n)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setHeight(r.heights[r.index++]):(n||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}},Ws=class i extends Pn{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,s=r-n+1,o,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*s);o=l/s,this.length>s+1&&(a=(this.height-l)/(this.length-s-1))}else o=this.height/s;return{firstLine:n,lastLine:r,perLine:o,perChar:a}}blockAt(e,t,n,r){let{firstLine:s,lastLine:o,perLine:a,perChar:l}=this.heightMetrics(t,r);if(t.lineWrapping){let c=r+(e0){let s=n[n.length-1];s instanceof i?n[n.length-1]=new i(s.length+r):n.push(null,new i(r-1))}if(e>0){let s=n[0];s instanceof i?n[0]=new i(e+s.length):n.unshift(new i(e-1),null)}return Pn.of(n)}decomposeLeft(e,t){t.push(new i(e-1),null)}decomposeRight(e,t){t.push(null,new i(this.length-e-1))}updateHeight(e,t=0,n=!1,r){let s=t+this.length;if(r&&r.from<=t+this.length&&r.more){let o=[],a=Math.max(t,r.from),l=-1;for(r.from>t&&o.push(new i(r.from-t-1).updateHeight(e,t));a<=s&&r.more;){let u=e.doc.lineAt(a).length;o.length&&o.push(null);let f=r.heights[r.index++];l==-1?l=f:Math.abs(f-l)>=wd&&(l=-2);let d=new qn(u,f);d.outdated=!1,o.push(d),a+=u+1}a<=s&&o.push(null,new i(s-a).updateHeight(e,a));let c=Pn.of(o);return(l<0||Math.abs(c.height-this.height)>=wd||Math.abs(l-this.heightMetrics(e,t).perLine)>=wd)&&(Ua=!0),Dd(this,c)}else(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}},k0=class extends Pn{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,r){let s=n+this.left.height;return ea))return c;let u=t==qt.ByPosNoHeight?qt.ByPosNoHeight:qt.ByPos;return l?c.join(this.right.lineAt(a,u,n,o,a)):this.left.lineAt(a,u,n,r,s).join(c)}forEachLine(e,t,n,r,s,o){let a=r+this.left.height,l=s+this.left.length+this.break;if(this.break)e=l&&this.right.forEachLine(e,t,n,a,l,o);else{let c=this.lineAt(l,qt.ByPos,n,r,s);e=e&&c.from<=t&&o(c),t>c.to&&this.right.forEachLine(c.to+1,t,n,a,l,o)}}replace(e,t,n){let r=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let a of n)s.push(a);if(e>0&&c2(s,o-1),t=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e2*t.size||t.size>2*e.size?Pn.of(this.break?[e,null,t]:[e,t]):(this.left=Dd(this.left,e),this.right=Dd(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:s,right:o}=this,a=t+s.length+this.break,l=null;return r&&r.from<=t+s.length&&r.more?l=s=s.updateHeight(e,t,n,r):s.updateHeight(e,t,n),r&&r.from<=a+o.length&&r.more?l=o=o.updateHeight(e,a,n,r):o.updateHeight(e,a,n),l?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}};function c2(i,e){let t,n;i[e]==null&&(t=i[e-1])instanceof Ws&&(n=i[e+1])instanceof Ws&&i.splice(e-1,3,new Ws(t.length+1+n.length))}var VQ=5,S0=class i{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let n=Math.min(t,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof qn?r.length+=n-this.pos:(n>this.pos||!this.isCovered)&&this.nodes.push(new qn(n-this.pos,-1)),this.writtenTo=n,t>n&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e=VQ)&&this.addLineDeco(r,s,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new qn(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new Ws(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof qn)return e;let t=new qn(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof qn)&&!this.isCovered?this.nodes.push(new qn(0,-1)):(this.writtenTou.clientHeight||u.scrollWidth>u.clientWidth)&&f.overflow!="visible"){let d=u.getBoundingClientRect();s=Math.max(s,d.left),o=Math.min(o,d.right),a=Math.max(a,d.top),l=Math.min(c==i.parentNode?r.innerHeight:l,d.bottom)}c=f.position=="absolute"||f.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:s-t.left,right:Math.max(s,o)-t.left,top:a-(t.top+e),bottom:Math.max(a,l)-(t.top+e)}}function UQ(i){let e=i.getBoundingClientRect(),t=i.ownerDocument.defaultView||window;return e.left0&&e.top0}function YQ(i,e){let t=i.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}var Sc=class{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;ntypeof n!="function"&&n.class=="cm-lineWrapping");this.heightOracle=new _0(t),this.stateDeco=e.facet(Qc).filter(n=>typeof n!="function"),this.heightMap=Pn.empty().applyChanges(this.stateDeco,rt.empty,this.heightOracle.setDoc(e.doc),[new $r(0,0,0,e.doc.length)]);for(let n=0;n<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());n++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ne.set(this.lineGaps.map(n=>n.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:s,to:o})=>r>=s&&r<=o)){let{from:s,to:o}=this.lineBlockAt(r);e.push(new Va(s,o))}}return this.viewports=e.sort((n,r)=>n.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?u2:new C0(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Oc(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(Qc).filter(u=>typeof u!="function");let r=e.changedRanges,s=$r.extendWithRanges(r,WQ(n,this.stateDeco,e?e.changes:Ui.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);l2(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||Ua)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let l=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,t));let c=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Y2)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,s=n.whiteSpace;this.defaultTextDirection=n.direction=="rtl"?Ct.RTL:Ct.LTR;let o=this.heightOracle.mustRefreshForWrapping(s),a=t.getBoundingClientRect(),l=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let c=0,u=0;if(a.width&&a.height){let{scaleX:C,scaleY:k}=x2(t,a);(C>.005&&Math.abs(this.scaleX-C)>.005||k>.005&&Math.abs(this.scaleY-k)>.005)&&(this.scaleX=C,this.scaleY=k,c|=16,o=l=!0)}let f=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=d)&&(this.paddingTop=f,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=E2(e.scrollDOM);let p=(this.printing?YQ:XQ)(t,this.paddingTop),m=p.top-this.pixelViewport.top,g=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let O=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(O!=this.inView&&(this.inView=O,O&&(l=!0)),!this.inView&&!this.scrollTarget&&!UQ(e.dom))return 0;let w=a.width;if((this.contentDOMWidth!=w||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),l){let C=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(C)&&(o=!0),o||r.lineWrapping&&Math.abs(w-this.contentDOMWidth)>r.charWidth){let{lineHeight:k,charWidth:_,textHeight:P}=e.docView.measureTextSize();o=k>0&&r.refresh(s,k,_,P,Math.max(5,w/_),C),o&&(e.docView.minWidth=0,c|=16)}m>0&&g>0?u=Math.max(m,g):m<0&&g<0&&(u=Math.min(m,g)),l2();for(let k of this.viewports){let _=k.from==this.viewport.from?C:e.docView.measureVisibleLineHeights(k);this.heightMap=(o?Pn.empty().applyChanges(this.stateDeco,rt.empty,this.heightOracle,[new $r(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,o,new w0(k.from,_))}Ua&&(c|=2)}let S=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return S&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||S)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,l=new Va(r.lineAt(o-n*1e3,qt.ByHeight,s,0,0).from,r.lineAt(a+(1-n)*1e3,qt.ByHeight,s,0,0).to);if(t){let{head:c}=t.range;if(cl.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=r.lineAt(c,qt.ByPos,s,0,0),d;t.y=="center"?d=(f.top+f.bottom)/2-u/2:t.y=="start"||t.y=="nearest"&&c=a+Math.max(10,Math.min(n,250)))&&r>o-2*1e3&&s>1,o=r<<1;if(this.defaultTextDirection!=Ct.LTR&&!n)return[];let a=[],l=(u,f,d,h)=>{if(f-uu&&OO.from>=d.from&&O.to<=d.to&&Math.abs(O.from-u)O.fromw));if(!g){if(fS.from<=f&&S.to>=f)){let S=t.moveToLineBoundary(le.cursor(f),!1,!0).head;S>u&&(f=S)}let O=this.gapSize(d,u,f,h),w=n||O<2e6?O:2e6;g=new Sc(u,f,O,w)}a.push(g)},c=u=>{if(u.length2e6)for(let _ of e)_.from>=u.from&&_.fromu.from&&l(u.from,h,u,f),pt.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];St.spans(t,this.viewport.from,this.viewport.to,{span(s,o){n.push({from:s,to:o})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let s=0;s=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Oc(this.heightMap.lineAt(e,qt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||Oc(this.heightMap.lineAt(this.scaler.fromDOM(e),qt.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Oc(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},Va=class{constructor(e,t){this.from=e,this.to=t}};function HQ(i,e,t){let n=[],r=i,s=0;return St.spans(t,i,e,{span(){},point(o,a){o>r&&(n.push({from:r,to:o}),s+=o-r),r=a}},20),r=1)return e[e.length-1].to;let n=Math.floor(i*t);for(let r=0;;r++){let{from:s,to:o}=e[r],a=o-s;if(n<=a)return s+n;n-=a}}function gd(i,e){let t=0;for(let{from:n,to:r}of i.ranges){if(e<=r){t+=e-n;break}t+=r-n}return t/i.total}function GQ(i,e){for(let t of i)if(e(t))return t}var u2={toDOM(i){return i},fromDOM(i){return i},scale:1,eq(i){return i==this}},C0=class i{constructor(e,t,n){let r=0,s=0,o=0;this.viewports=n.map(({from:a,to:l})=>{let c=t.lineAt(a,qt.ByPos,e,0,0).top,u=t.lineAt(l,qt.ByPos,e,0,0).bottom;return r+=u-c,{from:a,to:l,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let a of this.viewports)a.domTop=o+(a.top-s)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),s=a.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let s=tt.from==e.viewports[n].from&&t.to==e.viewports[n].to):!1}};function Oc(i,e){if(e.scale==1)return i;let t=e.toDOM(i.top),n=e.toDOM(i.bottom);return new qr(i.from,i.length,t,n-t,Array.isArray(i._content)?i._content.map(r=>Oc(r,e)):i._content)}var Od=Ee.define({combine:i=>i.join(" ")}),E0=Ee.define({combine:i=>i.indexOf(!0)>-1}),T0=zn.newName(),gS=zn.newName(),OS=zn.newName(),vS={"&light":"."+gS,"&dark":"."+OS};function A0(i,e,t){return new zn(e,{finish(n){return/&/.test(n)?n.replace(/&\w*/,r=>{if(r=="&")return i;if(!t||!t[r])throw new RangeError(`Unsupported selector: ${r}`);return t[r]}):i+" "+n}})}var KQ=A0("."+T0,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},vS),JQ={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Jg=xe.ie&&xe.ie_version<=11,D0=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new a0,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let n of t)this.queue.push(n);(xe.ie&&xe.ie_version<=11||xe.ios&&e.composing)&&t.some(n=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&xe.android&&e.constructor.EDIT_CONTEXT!==!1&&!(xe.chrome&&xe.chrome_version<126)&&(this.editContext=new Q0(e),e.state.facet(vs)&&(e.contentDOM.editContext=this.editContext.editContext)),Jg&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(vs)?n.root.activeElement!=this.dom:!bd(this.dom,r))return;let s=r.anchorNode&&n.docView.nearest(r.anchorNode);if(s&&s.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(xe.ie&&xe.ie_version<=11||xe.android&&xe.chrome)&&!n.state.selection.main.empty&&r.focusNode&&yc(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=xc(e.root);if(!t)return!1;let n=xe.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&eR(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=bd(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&Xa(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(r=!0),t==-1?{from:t,to:n}=o:(t=Math.min(o.from,t),n=Math.max(o.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&bd(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new O0(this.view,e,t,n);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=oS(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let n=f2(t,e.previousSibling||e.target.previousSibling,-1),r=f2(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(vs)!=e.state.facet(vs)&&(e.view.contentDOM.editContext=e.state.facet(vs)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(n=this.resizeScroll)===null||n===void 0||n.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function f2(i,e,t){for(;e;){let n=Qt.get(e);if(n&&n.parent==i)return n;let r=e.parentNode;e=r!=i.dom?r:t>0?e.nextSibling:e.previousSibling}return null}function d2(i,e){let t=e.startContainer,n=e.startOffset,r=e.endContainer,s=e.endOffset,o=i.docView.domAtPos(i.state.selection.main.anchor);return yc(o.node,o.offset,r,s)&&([t,n,r,s]=[r,s,t,n]),{anchorNode:t,anchorOffset:n,focusNode:r,focusOffset:s}}function eR(i,e){if(e.getComposedRanges){let r=e.getComposedRanges(i.root)[0];if(r)return d2(i,r)}let t=null;function n(r){r.preventDefault(),r.stopImmediatePropagation(),t=r.getTargetRanges()[0]}return i.contentDOM.addEventListener("beforeinput",n,!0),i.dom.ownerDocument.execCommand("indent"),i.contentDOM.removeEventListener("beforeinput",n,!0),t?d2(i,t):null}var Q0=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:s,head:o}=r,a=this.toEditorPos(n.updateRangeStart),l=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:a,drifted:!1});let c=l-a>n.text.length;a==this.from&&sthis.to&&(l=s);let u=aS(e.state.sliceDoc(a,l),n.text,(c?r.from:r.to)-a,c?"end":null);if(!u){let d=le.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));d.main.eq(r)||e.dispatch({selection:d,userEvent:"select"});return}let f={from:u.from+a,to:u.toA+a,insert:rt.of(n.text.slice(u.from,u.toB).split(` +`))};if((xe.mac||xe.android)&&f.from==o-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(f={from:a,to:l,insert:rt.of([n.text.replace("."," ")])}),this.pendingContextChange=f,!e.state.readOnly){let d=this.to-this.from+(f.to-f.from+f.insert.length);W0(e,f,le.single(this.toEditorPos(n.selectionStart,d),this.toEditorPos(n.selectionEnd,d)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),f.from=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],s=null;for(let o=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);o{let r=[];for(let s of n.getTextFormats()){let o=s.underlineStyle,a=s.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(a)){let l=this.toEditorPos(s.rangeStart),c=this.toEditorPos(s.rangeEnd);if(l{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:n}=this.composing;this.composing=null,n&&this.reset(e.state)}};for(let n in this.handlers)t.addEventListener(n,this.handlers[n]);this.measureReq={read:n=>{this.editContext.updateControlBounds(n.contentDOM.getBoundingClientRect());let r=xc(n.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((s,o,a,l,c)=>{if(n)return;let u=c.length-(o-s);if(r&&o>=r.to)if(r.from==s&&r.to==o&&r.insert.eq(c)){r=this.pendingContextChange=null,t+=u,this.to+=u;return}else r=null,this.revertPending(e.state);if(s+=t,o+=t,o<=this.from)this.from+=u,this.to+=u;else if(sthis.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),c.toString()),this.to+=u}t+=u}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},_e=class i{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(r=>r.forEach(s=>n(s,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||W8(e.parent)||document,this.viewState=new Rd(e.state||At.create(e)),e.scrollTo&&e.scrollTo.is(dd)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Ba).map(r=>new wc(r));for(let r of this.plugins)r.update(this);this.observer=new D0(this),this.inputState=new v0(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Td(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof gi?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,n=!1,r,s=this.state;for(let d of e){if(d.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=d.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,a=0,l=null;e.some(d=>d.annotation(hS))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,l=pS(s,o),l||(a=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(u=null)):this.observer.clear(),s.facet(At.phrases)!=this.state.facet(At.phrases))return this.setState(s);r=Ed.create(this,s,e),r.flags|=a;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let d of e){if(f&&(f=f.map(d.changes)),d.scrollIntoView){let{main:h}=d.state.selection;f=new _c(h.empty?h:le.cursor(h.head,h.head>h.anchor?-1:1))}for(let h of d.effects)h.is(dd)&&(f=h.value.clip(this.state))}this.viewState.update(r,f),this.bidiCache=Md.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),t=this.docView.update(r),this.state.facet(mc)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(d=>d.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(Od)!=r.state.facet(Od)&&(this.viewState.mustMeasureContent=!0),(t||n||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!r.empty)for(let d of this.state.facet(h0))try{d(r)}catch(h){Ti(this.state,h,"update listener")}(l||u)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!oS(this,u)&&c.force&&Xa(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let n of this.plugins)n.destroy(this);this.viewState=new Rd(e),this.plugins=e.facet(Ba).map(n=>new wc(n)),this.pluginMap.clear();for(let n of this.plugins)n.update(this);this.docView.destroy(),this.docView=new Td(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Ba),n=e.state.facet(Ba);if(t!=n){let r=[];for(let s of n){let o=t.indexOf(s);if(o<0)r.push(new wc(s));else{let a=this.plugins[o];a.mustUpdate=e,r.push(a)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,r=n.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(o<0)if(E2(n))s=-1,o=this.viewState.heightMap.height;else{let h=this.viewState.scrollAnchorAt(r);s=h.from,o=h.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];l&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(h=>{try{return h.read(this)}catch(p){return Ti(this.state,p),h2}}),f=Ed.create(this,this.state,[]),d=!1;f.flags|=l,t?t.flags|=l:t=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),d=this.docView.update(f),d&&this.docViewUpdate());for(let h=0;h1||p<-1){r=r+p,n.scrollTop=r/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let a of this.state.facet(h0))a(t)}get themeClasses(){return T0+" "+(this.state.facet(E0)?OS:gS)+" "+this.state.facet(Od)}updateAttrs(){let e=p2(this,K2,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(vs)?"true":"false",class:"cm-content",style:`${xe.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),p2(this,B0,t);let n=this.observer.ignore(()=>{let r=c0(this.contentDOM,this.contentAttrs,t),s=c0(this.dom,this.editorAttrs,e);return r||s});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let r of n.effects)if(r.is(i.announce)){t&&(this.announceDOM.textContent=""),t=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(mc);let e=this.state.facet(i.cspNonce);zn.mount(this.root,this.styleModules.concat(KQ).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;tn.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return Kg(this,e,Gk(this,e,t,n))}moveByGroup(e,t){return Kg(this,e,Gk(this,e,t,n=>kQ(this,e.head,n)))}visualLineSide(e,t){let n=this.bidiSpans(e),r=this.textDirectionAt(e.from),s=n[t?n.length-1:0];return le.cursor(s.side(t,r)+e.from,s.forward(!t,r)?1:-1)}moveToLineBoundary(e,t,n=!0){return wQ(this,e,t,n)}moveVertically(e,t,n){return Kg(this,e,SQ(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),nS(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let r=this.state.doc.lineAt(e),s=this.bidiSpans(r),o=s[Lr.find(s,e-r.from,-1,t)];return Ld(n,o.dir==Ct.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(U2)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>tR)return q2(e.length);let t=this.textDirectionAt(e.from),n;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t&&(s.fresh||z2(s.isolates,n=Wk(this,e))))return s.order;n||(n=Wk(this,e));let r=oQ(e.text,t,n);return this.bidiCache.push(new Md(e.from,e.to,t,n,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||xe.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{P2(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return dd.of(new _c(typeof e=="number"?le.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return dd.of(new _c(le.cursor(n.from),"start","start",n.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return di.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return di.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=zn.newName(),r=[Od.of(n),mc.of(A0(`.${n}`,e))];return t&&t.dark&&r.push(E0.of(!0)),r}static baseTheme(e){return hr.lowest(mc.of(A0("."+T0,e,vS)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),r=n&&Qt.get(n)||Qt.get(e);return((t=r?.rootView)===null||t===void 0?void 0:t.view)||null}};_e.styleModule=mc;_e.inputHandler=W2;_e.clipboardInputFilter=$0;_e.clipboardOutputFilter=F0;_e.scrollHandler=H2;_e.focusChangeEffect=X2;_e.perLineTextDirection=U2;_e.exceptionSink=V2;_e.updateListener=h0;_e.editable=vs;_e.mouseSelectionStyle=B2;_e.dragMovesSelection=F2;_e.clickAddsSelectionRange=$2;_e.decorations=Qc;_e.outerDecorations=J2;_e.atomicRanges=Ic;_e.bidiIsolatedRanges=eS;_e.scrollMargins=tS;_e.darkTheme=E0;_e.cspNonce=Ee.define({combine:i=>i.length?i[0]:""});_e.contentAttributes=B0;_e.editorAttributes=K2;_e.lineWrapping=_e.contentAttributes.of({class:"cm-lineWrapping"});_e.announce=Ze.define();var tR=4096,h2={},Md=class i{constructor(e,t,n,r,s,o){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=s,this.order=o}static update(e,t){if(t.empty&&!e.some(s=>s.fresh))return e;let n=[],r=e.length?e[e.length-1].dir:Ct.LTR;for(let s=Math.max(0,e.length-10);s=0;r--){let s=n[r],o=typeof s=="function"?s(i):s;o&&l0(o,t)}return t}var iR=xe.mac?"mac":xe.windows?"win":xe.linux?"linux":"key";function nR(i,e){let t=i.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,s,o,a;for(let l=0;ln.concat(r),[]))),t}function bS(i,e,t){return _S(yS(i.state),e,i,t)}var Vs=null,sR=4e3;function oR(i,e=iR){let t=Object.create(null),n=Object.create(null),r=(o,a)=>{let l=n[o];if(l==null)n[o]=a;else if(l!=a)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,a,l,c,u)=>{var f,d;let h=t[o]||(t[o]=Object.create(null)),p=a.split(/ (?!$)/).map(O=>nR(O,e));for(let O=1;O{let C=Vs={view:S,prefix:w,scope:o};return setTimeout(()=>{Vs==C&&(Vs=null)},sR),!0}]})}let m=p.join(" ");r(m,!1);let g=h[m]||(h[m]={preventDefault:!1,stopPropagation:!1,run:((d=(f=h._any)===null||f===void 0?void 0:f.run)===null||d===void 0?void 0:d.slice())||[]});l&&g.run.push(l),c&&(g.preventDefault=!0),u&&(g.stopPropagation=!0)};for(let o of i){let a=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let c of a){let u=t[c]||(t[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=o;for(let d in u)u[d].run.push(h=>f(h,R0))}let l=o[e]||o.key;if(l)for(let c of a)s(c,l,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(c,"Shift-"+l,o.shift,o.preventDefault,o.stopPropagation)}return t}var R0=null;function _S(i,e,t,n){R0=e;let r=jk(e),s=Zi(r,0),o=xn(s)==r.length&&r!=" ",a="",l=!1,c=!1,u=!1;Vs&&Vs.view==t&&Vs.scope==n&&(a=Vs.prefix+" ",cS.indexOf(e.keyCode)<0&&(c=!0,Vs=null));let f=new Set,d=g=>{if(g){for(let O of g.run)if(!f.has(O)&&(f.add(O),O(t)))return g.stopPropagation&&(u=!0),!0;g.preventDefault&&(g.stopPropagation&&(u=!0),c=!0)}return!1},h=i[n],p,m;return h&&(d(h[a+vd(r,e,!o)])?l=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(xe.windows&&e.ctrlKey&&e.altKey)&&!(xe.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(p=Os[e.keyCode])&&p!=r?(d(h[a+vd(p,e,!0)])||e.shiftKey&&(m=Fa[e.keyCode])!=r&&m!=p&&d(h[a+vd(m,e,!1)]))&&(l=!0):o&&e.shiftKey&&d(h[a+vd(r,e,!0)])&&(l=!0),!l&&d(h._any)&&(l=!0)),c&&(l=!0),l&&u&&e.stopPropagation(),R0=null,l}var Rc=class i{constructor(e,t,n,r,s){this.className=e,this.left=t,this.top=n,this.width=r,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(n.empty){let r=e.coordsAtPos(n.head,n.assoc||1);if(!r)return[];let s=wS(e);return[new i(t,r.left-s.left,r.top-s.top,null,r.bottom-r.top)]}else return aR(e,t,n)}};function wS(i){let e=i.scrollDOM.getBoundingClientRect();return{left:(i.textDirection==Ct.LTR?e.left:e.right-i.scrollDOM.clientWidth*i.scaleX)-i.scrollDOM.scrollLeft*i.scaleX,top:e.top-i.scrollDOM.scrollTop*i.scaleY}}function g2(i,e,t,n){let r=i.coordsAtPos(e,t*2);if(!r)return n;let s=i.dom.getBoundingClientRect(),o=(r.top+r.bottom)/2,a=i.posAtCoords({x:s.left+1,y:o}),l=i.posAtCoords({x:s.right-1,y:o});return a==null||l==null?n:{from:Math.max(n.from,Math.min(a,l)),to:Math.min(n.to,Math.max(a,l))}}function aR(i,e,t){if(t.to<=i.viewport.from||t.from>=i.viewport.to)return[];let n=Math.max(t.from,i.viewport.from),r=Math.min(t.to,i.viewport.to),s=i.textDirection==Ct.LTR,o=i.contentDOM,a=o.getBoundingClientRect(),l=wS(i),c=o.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),f=a.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),d=a.right-(u?parseInt(u.paddingRight):0),h=m0(i,n,1),p=m0(i,r,-1),m=h.type==Gi.Text?h:null,g=p.type==Gi.Text?p:null;if(m&&(i.lineWrapping||h.widgetLineBreaks)&&(m=g2(i,n,1,m)),g&&(i.lineWrapping||p.widgetLineBreaks)&&(g=g2(i,r,-1,g)),m&&g&&m.from==g.from&&m.to==g.to)return w(S(t.from,t.to,m));{let k=m?S(t.from,null,m):C(h,!1),_=g?S(null,t.to,g):C(p,!0),P=[];return(m||h).to<(g||p).from-(m&&g?1:0)||h.widgetLineBreaks>1&&k.bottom+i.defaultLineHeight/2<_.top?P.push(O(f,k.bottom,d,_.top)):k.bottom<_.top&&i.elementAtHeight((k.bottom+_.top)/2).type==Gi.Text&&(k.bottom=_.top=(k.bottom+_.top)/2),w(k).concat(P).concat(w(_))}function O(k,_,P,x){return new Rc(e,k-l.left,_-l.top,P-k,x-_)}function w({top:k,bottom:_,horizontal:P}){let x=[];for(let R=0;RD&&j.from=q)break;Pe>z&&Q(Math.max(ce,z),k==null&&ce<=D,Math.min(Pe,q),_==null&&Pe>=E,Y.dir)}if(z=G.to+1,z>=q)break}return Z.length==0&&Q(D,k==null,E,_==null,i.textDirection),{top:x,bottom:R,horizontal:Z}}function C(k,_){let P=a.top+(_?k.top:k.bottom);return{top:P,bottom:P,horizontal:[]}}}function lR(i,e){return i.constructor==e.constructor&&i.eq(e)}var M0=class{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(kd)!=e.state.facet(kd)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(kd);for(;t!lR(t,this.drawn[n]))){let t=this.dom.firstChild,n=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[n].constructor&&r.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(r.draw(),t);for(;t;){let r=t.nextSibling;t.remove(),t=r}this.drawn=e,xe.safari&&xe.safari_version>=26&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}},kd=Ee.define();function kS(i){return[di.define(e=>new M0(e,i)),kd.of(i)]}var Mc=Ee.define({combine(i){return mn(i,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function SS(i={}){return[Mc.of(i),cR,uR,fR,Y2.of(!0)]}function xS(i){return i.startState.facet(Mc)!=i.state.facet(Mc)}var cR=kS({above:!0,markers(i){let{state:e}=i,t=e.facet(Mc),n=[];for(let r of e.selection.ranges){let s=r==e.selection.main;if(r.empty||t.drawRangeCursor){let o=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=r.empty?r:le.cursor(r.head,r.head>r.anchor?-1:1);for(let l of Rc.forRange(i,o,a))n.push(l)}}return n},update(i,e){i.transactions.some(n=>n.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=xS(i);return t&&O2(i.state,e),i.docChanged||i.selectionSet||t},mount(i,e){O2(e.state,i)},class:"cm-cursorLayer"});function O2(i,e){e.style.animationDuration=i.facet(Mc).cursorBlinkRate+"ms"}var uR=kS({above:!1,markers(i){return i.state.selection.ranges.map(e=>e.empty?[]:Rc.forRange(i,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(i,e){return i.docChanged||i.selectionSet||i.viewportChanged||xS(i)},class:"cm-selectionLayer"}),fR=hr.highest(_e.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),PS=Ze.define({map(i,e){return i==null?null:e.mapPos(i)}}),vc=Xt.define({create(){return null},update(i,e){return i!=null&&(i=e.changes.mapPos(i)),e.effects.reduce((t,n)=>n.is(PS)?n.value:t,i)}}),dR=di.fromClass(class{constructor(i){this.view=i,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(i){var e;let t=i.state.field(vc);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(i.startState.field(vc)!=t||i.docChanged||i.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:i}=this,e=i.state.field(vc),t=e!=null&&i.coordsAtPos(e);if(!t)return null;let n=i.scrollDOM.getBoundingClientRect();return{left:t.left-n.left+i.scrollDOM.scrollLeft*i.scaleX,top:t.top-n.top+i.scrollDOM.scrollTop*i.scaleY,height:t.bottom-t.top}}drawCursor(i){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;i?(this.cursor.style.left=i.left/e+"px",this.cursor.style.top=i.top/t+"px",this.cursor.style.height=i.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(i){this.view.state.field(vc)!=i&&this.view.dispatch({effects:PS.of(i)})}},{eventObservers:{dragover(i){this.setDropPos(this.view.posAtCoords({x:i.clientX,y:i.clientY}))},dragleave(i){(i.target==this.view.contentDOM||!this.view.contentDOM.contains(i.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function CS(){return[vc,dR]}var _K=/x/.unicode!=null?"gu":"g";var I0=2e3;function hR(i,e,t){let n=Math.min(e.line,t.line),r=Math.max(e.line,t.line),s=[];if(e.off>I0||t.off>I0||e.col<0||t.col<0){let o=Math.min(e.off,t.off),a=Math.max(e.off,t.off);for(let l=n;l<=r;l++){let c=i.doc.line(l);c.length<=a&&s.push(le.range(c.from+o,c.to+a))}}else{let o=Math.min(e.col,t.col),a=Math.max(e.col,t.col);for(let l=n;l<=r;l++){let c=i.doc.line(l),u=cd(c.text,o,i.tabSize,!0);if(u<0)s.push(le.cursor(c.to));else{let f=cd(c.text,a,i.tabSize);s.push(le.range(c.from+u,c.from+f))}}}return s}function pR(i,e){let t=i.coordsAtPos(i.viewport.from);return t?Math.round(Math.abs((t.left-e)/i.defaultCharacterWidth)):-1}function v2(i,e){let t=i.posAtCoords({x:e.clientX,y:e.clientY},!1),n=i.state.doc.lineAt(t),r=t-n.from,s=r>I0?-1:r==n.length?pR(i,e.clientX):Bs(n.text,i.state.tabSize,t-n.from);return{line:n.number,col:s,off:r}}function mR(i,e){let t=v2(i,e),n=i.state.selection;return t?{update(r){if(r.docChanged){let s=r.changes.mapPos(r.startState.doc.line(t.line).from),o=r.state.doc.lineAt(s);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},n=n.map(r.changes)}},get(r,s,o){let a=v2(i,r);if(!a)return n;let l=hR(i.state,t,a);return l.length?o?le.create(l.concat(n.ranges)):le.create(l):n}}:null}function ES(i){let e=i?.eventFilter||(t=>t.altKey&&t.button==0);return _e.mouseSelectionStyle.of((t,n)=>e(n)?mR(t,n):null)}var pc="-10000px",Id=class{constructor(e,t,n,r){this.facet=t,this.createTooltipView=n,this.removeTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter(o=>o);let s=null;this.tooltipViews=this.tooltips.map(o=>s=n(o,s))}update(e,t){var n;let r=e.state.facet(this.facet),s=r.filter(l=>l);if(r===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let o=[],a=t?[]:null;for(let l=0;lt[c]=l),t.length=a.length),this.input=r,this.tooltips=s,this.tooltipViews=o,!0}};function gR(i){let e=i.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}var e0=Ee.define({combine:i=>{var e,t,n;return{position:xe.ios?"absolute":((e=i.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=i.find(r=>r.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((n=i.find(r=>r.tooltipSpace))===null||n===void 0?void 0:n.tooltipSpace)||gR}}}),y2=new WeakMap,X0=di.fromClass(class{constructor(i){this.view=i,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=i.state.facet(e0);this.position=e.position,this.parent=e.parent,this.classes=i.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new Id(i,jc,(t,n)=>this.createTooltip(t,n),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),i.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let i of this.manager.tooltipViews)this.intersectionObserver.observe(i.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(i){i.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(i,this.above);e&&this.observeIntersection();let t=e||i.geometryChanged,n=i.state.facet(e0);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;t=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(i,e){let t=i.create(this.view),n=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),i.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let r=document.createElement("div");r.className="cm-tooltip-arrow",t.dom.appendChild(r)}return t.dom.style.position=this.position,t.dom.style.top=pc,t.dom.style.left="0px",this.container.insertBefore(t.dom,n),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var i,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(i=n.destroy)===null||i===void 0||i.call(n);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let i=1,e=1,t=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(xe.gecko)t=s.offsetParent!=this.container.ownerDocument.body;else if(s.style.top==pc&&s.style.left=="0px"){let o=s.getBoundingClientRect();t=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(t||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(i=s.width/this.parent.offsetWidth,e=s.height/this.parent.offsetHeight)}else({scaleX:i,scaleY:e}=this.view.viewState);let n=this.view.scrollDOM.getBoundingClientRect(),r=V0(this.view);return{visible:{left:n.left+r.left,top:n.top+r.top,right:n.right-r.right,bottom:n.bottom-r.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((s,o)=>{let a=this.manager.tooltipViews[o];return a.getCoords?a.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(e0).tooltipSpace(this.view),scaleX:i,scaleY:e,makeAbsolute:t}}writeMeasure(i){var e;if(i.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:t,space:n,scaleX:r,scaleY:s}=i,o=[];for(let a=0;a=Math.min(t.bottom,n.bottom)||f.rightMath.min(t.right,n.right)+.1)){u.style.top=pc;continue}let h=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,p=h?7:0,m=d.right-d.left,g=(e=y2.get(c))!==null&&e!==void 0?e:d.bottom-d.top,O=c.offset||vR,w=this.view.textDirection==Ct.LTR,S=d.width>n.right-n.left?w?n.left:n.right-d.width:w?Math.max(n.left,Math.min(f.left-(h?14:0)+O.x,n.right-m)):Math.min(Math.max(n.left,f.left-m+(h?14:0)-O.x),n.right-m),C=this.above[a];!l.strictSide&&(C?f.top-g-p-O.yn.bottom)&&C==n.bottom-f.bottom>f.top-n.top&&(C=this.above[a]=!C);let k=(C?f.top-n.top:n.bottom-f.bottom)-p;if(kS&&x.top<_+g&&x.bottom>_&&(_=C?x.top-g-2-p:x.bottom+p+2);if(this.position=="absolute"?(u.style.top=(_-i.parent.top)/s+"px",b2(u,(S-i.parent.left)/r)):(u.style.top=_/s+"px",b2(u,S/r)),h){let x=f.left+(w?O.x:-O.x)-(S+14-7);h.style.left=x/r+"px"}c.overlap!==!0&&o.push({left:S,top:_,right:P,bottom:_+g}),u.classList.toggle("cm-tooltip-above",C),u.classList.toggle("cm-tooltip-below",!C),c.positioned&&c.positioned(i.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let i of this.manager.tooltipViews)i.dom.style.top=pc}},{eventObservers:{scroll(){this.maybeMeasure()}}});function b2(i,e){let t=parseInt(i.style.left,10);(isNaN(t)||Math.abs(e-t)>1)&&(i.style.left=e+"px")}var OR=_e.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),vR={x:0,y:0},jc=Ee.define({enables:[X0,OR]}),Nd=Ee.define({combine:i=>i.reduce((e,t)=>e.concat(t),[])}),jd=class i{static create(e){return new i(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Id(e,Nd,(t,n)=>this.createHostedView(t,n),t=>t.dom.remove())}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let n of this.manager.tooltipViews){let r=n[e];if(r!==void 0){if(t===void 0)t=r;else if(t!==r)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}},yR=jc.compute([Nd],i=>{let e=i.facet(Nd);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var n;return(n=t.end)!==null&&n!==void 0?n:t.pos})),create:jd.create,above:e[0].above,arrow:e.some(t=>t.arrow)}}),N0=class{constructor(e,t,n,r,s){this.view=e,this.source=t,this.field=n,this.setHover=r,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;ea.bottom||t.xa.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(r)).find(u=>u.from<=r&&u.to>=r),c=l&&l.dir==Ct.RTL?-1:1;s=t.x{this.pending==a&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>Ti(e.state,l,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(X0),t=e?e.manager.tooltips.findIndex(n=>n.create==jd.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:s}=this;if(r.length&&s&&!bR(s.dom,e)||this.pending){let{pos:o}=r[0]||this.pending,a=(n=(t=r[0])===null||t===void 0?void 0:t.end)!==null&&n!==void 0?n:o;(o==a?this.view.posAtCoords(this.lastMove)!=o:!_R(this.view,o,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:n}=this;n&&n.dom.contains(e.relatedTarget)?this.watchTooltipLeave(n.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}},yd=4;function bR(i,e){let{left:t,right:n,top:r,bottom:s}=i.getBoundingClientRect(),o;if(o=i.querySelector(".cm-tooltip-arrow")){let a=o.getBoundingClientRect();r=Math.min(a.top,r),s=Math.max(a.bottom,s)}return e.clientX>=t-yd&&e.clientX<=n+yd&&e.clientY>=r-yd&&e.clientY<=s+yd}function _R(i,e,t,n,r,s){let o=i.scrollDOM.getBoundingClientRect(),a=i.documentTop+i.documentPadding.top+i.contentHeight;if(o.left>n||o.rightr||Math.min(o.bottom,a)=e&&l<=t}function TS(i,e={}){let t=Ze.define(),n=Xt.define({create(){return[]},update(r,s){if(r.length&&(e.hideOnChange&&(s.docChanged||s.selection)?r=[]:e.hideOn&&(r=r.filter(o=>!e.hideOn(s,o))),s.docChanged)){let o=[];for(let a of r){let l=s.changes.mapPos(a.pos,-1,Ci.TrackDel);if(l!=null){let c=Object.assign(Object.create(null),a);c.pos=l,c.end!=null&&(c.end=s.changes.mapPos(c.end)),o.push(c)}}r=o}for(let o of s.effects)o.is(t)&&(r=o.value),o.is(wR)&&(r=[]);return r},provide:r=>Nd.from(r)});return{active:n,extension:[n,di.define(r=>new N0(r,i,n,t,e.hoverTime||300)),yR]}}function U0(i,e){let t=i.plugin(X0);if(!t)return null;let n=t.manager.tooltips.indexOf(e);return n<0?null:t.manager.tooltipViews[n]}var wR=Ze.define();var _2=Ee.define({combine(i){let e,t;for(let n of i)e=e||n.topContainer,t=t||n.bottomContainer;return{topContainer:e,bottomContainer:t}}});function Bo(i,e){let t=i.plugin(AS),n=t?t.specs.indexOf(e):-1;return n>-1?t.panels[n]:null}var AS=di.fromClass(class{constructor(i){this.input=i.state.facet(Fo),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(i));let e=i.state.facet(_2);this.top=new Wa(i,!0,e.topContainer),this.bottom=new Wa(i,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(i){let e=i.state.facet(_2);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Wa(i.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Wa(i.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=i.state.facet(Fo);if(t!=this.input){let n=t.filter(l=>l),r=[],s=[],o=[],a=[];for(let l of n){let c=this.specs.indexOf(l),u;c<0?(u=l(i.view),a.push(u)):(u=this.panels[c],u.update&&u.update(i)),r.push(u),(u.top?s:o).push(u)}this.specs=n,this.panels=r,this.top.sync(s),this.bottom.sync(o);for(let l of a)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let n of this.panels)n.update&&n.update(i)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:i=>_e.scrollMargins.of(e=>{let t=e.plugin(i);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})}),Wa=class{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=w2(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=w2(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}};function w2(i){let e=i.nextSibling;return i.remove(),e}var Fo=Ee.define({enables:AS});var gr=class extends dr{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};gr.prototype.elementClass="";gr.prototype.toDOM=void 0;gr.prototype.mapMode=Ci.TrackBefore;gr.prototype.startSide=gr.prototype.endSide=-1;gr.prototype.point=!0;var t0=Ee.define(),kR=Ee.define(),SR={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>St.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},Sd=Ee.define();function Y0(i){return[xR(),Sd.of({...SR,...i})]}var j0=Ee.define({combine:i=>i.some(e=>e)});function xR(i){let e=[PR];return i&&i.fixed===!1&&e.push(j0.of(!0)),e}var PR=di.fromClass(class{constructor(i){this.view=i,this.domAfter=null,this.prevViewport=i.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=i.state.facet(Sd).map(e=>new Zd(i,e)),this.fixed=!i.state.facet(j0);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),i.scrollDOM.insertBefore(this.dom,i.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(i){if(this.updateGutters(i)){let e=this.prevViewport,t=i.view.viewport,n=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(n<(t.to-t.from)*.8)}if(i.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(j0)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=i.view.viewport}syncGutters(i){let e=this.dom.nextSibling;i&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let t=St.iter(this.view.state.facet(t0),this.view.viewport.from),n=[],r=this.gutters.map(s=>new z0(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(s.type)){let o=!0;for(let a of s.type)if(a.type==Gi.Text&&o){Z0(t,n,a.from);for(let l of r)l.line(this.view,a,n);o=!1}else if(a.widget)for(let l of r)l.widget(this.view,a)}else if(s.type==Gi.Text){Z0(t,n,s.from);for(let o of r)o.line(this.view,s,n)}else if(s.widget)for(let o of r)o.widget(this.view,s);for(let s of r)s.finish();i&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(i){let e=i.startState.facet(Sd),t=i.state.facet(Sd),n=i.docChanged||i.heightChanged||i.viewportChanged||!St.eq(i.startState.facet(t0),i.state.facet(t0),i.view.viewport.from,i.view.viewport.to);if(e==t)for(let r of this.gutters)r.update(i)&&(n=!0);else{n=!0;let r=[];for(let s of t){let o=e.indexOf(s);o<0?r.push(new Zd(this.view,s)):(this.gutters[o].update(i),r.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),r.indexOf(s)<0&&s.destroy();for(let s of r)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=r}return n}destroy(){for(let i of this.gutters)i.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:i=>_e.scrollMargins.of(e=>{let t=e.plugin(i);if(!t||t.gutters.length==0||!t.fixed)return null;let n=t.dom.offsetWidth*e.scaleX,r=t.domAfter?t.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==Ct.LTR?{left:n,right:r}:{right:n,left:r}})});function k2(i){return Array.isArray(i)?i:[i]}function Z0(i,e,t){for(;i.value&&i.from<=t;)i.from==t&&e.push(i.value),i.next()}var z0=class{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=St.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,s=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==r.elements.length){let a=new zd(e,o,s,n);r.elements.push(a),r.dom.appendChild(a.dom)}else r.elements[this.i].update(e,o,s,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];Z0(this.cursor,r,t.from),n.length&&(r=r.concat(n));let s=this.gutter.config.lineMarker(e,t,r);s&&r.unshift(s);let o=this.gutter;r.length==0&&!o.config.renderEmptyElements||this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let s of e.state.facet(kR)){let o=s(e,t.widget,t);o&&(r||(r=[])).push(o)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}},Zd=class{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,r=>{let s=r.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let l=s.getBoundingClientRect();o=(l.top+l.bottom)/2}else o=r.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[n](e,a,r)&&r.preventDefault()});this.markers=k2(t.markers(e)),t.initialSpacer&&(this.spacer=new zd(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=k2(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let n=e.view.viewport;return!St.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}},zd=class{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),CR(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n="cm-gutterElement",r=this.dom.firstChild;for(let s=0,o=0;;){let a=o,l=s{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=zi.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};qe.closedBy=new qe({deserialize:i=>i.split(" ")});qe.openedBy=new qe({deserialize:i=>i.split(" ")});qe.group=new qe({deserialize:i=>i.split(" ")});qe.isolate=new qe({deserialize:i=>{if(i&&i!="rtl"&&i!="ltr"&&i!="auto")throw new RangeError("Invalid value for isolate: "+i);return i||"auto"}});qe.contextHash=new qe({perNode:!0});qe.lookAhead=new qe({perNode:!0});qe.mounted=new qe({perNode:!0});var Ya=class{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[qe.mounted.id]}},TR=Object.create(null),zi=class i{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):TR,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new i(e.name||"",t,e.id,n);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(qe.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(" "))t[r]=e[n];return n=>{for(let r=n.prop(qe.group),s=-1;s<(r?r.length:0);s++){let o=t[s<0?n.name:r[s]];if(o)return o}}}};zi.none=new zi("",Object.create(null),0,8);var zc=class i{constructor(e){this.types=e;for(let t=0;t0;for(let l=this.cursor(o|ni.IncludeAnonymous);;){let c=!1;if(l.from<=s&&l.to>=r&&(!a&&l.type.isAnonymous||t(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&n&&(a||!l.type.isAnonymous)&&n(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:i1(zi.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,r)=>new i(this.type,t,n,r,this.propValues),e.makeTree||((t,n,r)=>new i(zi.none,t,n,r)))}static build(e){return DR(e)}};ri.empty=new ri(zi.none,[],[],0);var H0=class i{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new i(this.buffer,this.index)}},Hs=class i{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return zi.none}toString(){let e=[];for(let t=0;t0));l=o[l+3]);return a}slice(e,t,n){let r=this.buffer,s=new Uint16Array(t-e),o=0;for(let a=e,l=0;a=e&&te;case 1:return t<=e&&n>e;case 2:return n>e;case 4:return!0}}function qc(i,e,t,n){for(var r;i.from==i.to||(t<1?i.from>=e:i.from>e)||(t>-1?i.to<=e:i.to0?a.length:-1;e!=c;e+=t){let u=a[e],f=l[e]+o.from;if(MS(r,n,f,f+u.length)){if(u instanceof Hs){if(s&ni.ExcludeBuffers)continue;let d=u.findChild(0,u.buffer.length,t,n-f,r);if(d>-1)return new Lc(new K0(o,u,e,f),null,d)}else if(s&ni.IncludeAnonymous||!u.type.isAnonymous||t1(u)){let d;if(!(s&ni.IgnoreMounts)&&(d=Ya.get(u))&&!d.overlay)return new i(d.tree,f,e,o);let h=new i(u,f,e,o);return s&ni.IncludeAnonymous||!h.type.isAnonymous?h:h.nextChild(t<0?u.children.length-1:0,t,n,r)}}}if(s&ni.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let r;if(!(n&ni.IgnoreOverlays)&&(r=Ya.get(this._tree))&&r.overlay){let s=e-this.from;for(let{from:o,to:a}of r.overlay)if((t>0?o<=s:o=s:a>s))return new i(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function QS(i,e,t,n){let r=i.cursor(),s=[];if(!r.firstChild())return s;if(t!=null){for(let o=!1;!o;)if(o=r.type.is(t),!r.nextSibling())return s}for(;;){if(n!=null&&r.type.is(n))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return n==null?s:[]}}function G0(i,e,t=e.length-1){for(let n=i.parent;t>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(e[t]&&e[t]!=n.name)return!1;t--}}return!0}var K0=class{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}},Lc=class i extends Vd{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,n);return s<0?null:new i(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&ni.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new i(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new i(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new i(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,s=n.buffer[this.index+3];if(s>r){let o=n.buffer[this.index+1];e.push(n.slice(r,s,o)),t.push(0)}return new ri(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function IS(i){if(!i.length)return null;let e=0,t=i[0];for(let s=1;st.from||o.to=e){let a=new Vr(o.tree,o.overlay[0].from+s.from,-1,s);(r||(r=[n])).push(qc(a,e,t,!1))}}return r?IS(r):n}var $c=class{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Vr)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return e?e instanceof Vr?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&ni.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&ni.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&ni.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let r=n<0?0:this.stack[n]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{let r=t.buffer[this.index+3];if(r<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(r)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index-1)for(let s=t+e,o=e<0?-1:n._tree.children.length;s!=o;s+=e){let a=n._tree.children[s];if(this.mode&ni.IncludeAnonymous||a instanceof Hs||!a.type.isAnonymous||t1(a))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,n=s+1;break e}r=this.stack[--s]}for(let r=n;r=0;s--){if(s<0)return G0(this.node,e,r);let o=n[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}};function t1(i){return i.children.some(e=>e instanceof Hs||!e.type.isAnonymous||t1(e))}function DR(i){var e;let{buffer:t,nodeSet:n,maxBufferLength:r=1024,reused:s=[],minRepeatType:o=n.types.length}=i,a=Array.isArray(t)?new H0(t,t.length):t,l=n.types,c=0,u=0;function f(k,_,P,x,R,Z){let{id:Q,start:D,end:E,size:j}=a,z=u;for(;j<0;)if(a.next(),j==-1){let Pe=s[Q];P.push(Pe),x.push(D-k);return}else if(j==-3){c=Q;return}else if(j==-4){u=Q;return}else throw new RangeError(`Unrecognized record size: ${j}`);let q=l[Q],G,Y,ce=D-k;if(E-D<=r&&(Y=g(a.pos-_,R))){let Pe=new Uint16Array(Y.size-Y.skip),ue=a.pos-Y.size,B=Pe.length;for(;a.pos>ue;)B=O(Y.start,Pe,B);G=new Hs(Pe,E-Y.start,n),ce=Y.start-k}else{let Pe=a.pos-j;a.next();let ue=[],B=[],ee=Q>=o?Q:-1,pe=0,Re=E;for(;a.pos>Pe;)ee>=0&&a.id==ee&&a.size>=0?(a.end<=Re-r&&(p(ue,B,D,pe,a.end,Re,ee,z),pe=ue.length,Re=a.end),a.next()):Z>2500?d(D,Pe,ue,B):f(D,Pe,ue,B,ee,Z+1);if(ee>=0&&pe>0&&pe-1&&pe>0){let oe=h(q);G=i1(q,ue,B,0,ue.length,0,E-D,oe,oe)}else G=m(q,ue,B,E-D,z-E)}P.push(G),x.push(ce)}function d(k,_,P,x){let R=[],Z=0,Q=-1;for(;a.pos>_;){let{id:D,start:E,end:j,size:z}=a;if(z>4)a.next();else{if(Q>-1&&E=0;j-=3)D[z++]=R[j],D[z++]=R[j+1]-E,D[z++]=R[j+2]-E,D[z++]=z;P.push(new Hs(D,R[2]-E,n)),x.push(E-k)}}function h(k){return(_,P,x)=>{let R=0,Z=_.length-1,Q,D;if(Z>=0&&(Q=_[Z])instanceof ri){if(!Z&&Q.type==k&&Q.length==x)return Q;(D=Q.prop(qe.lookAhead))&&(R=P[Z]+Q.length+D)}return m(k,_,P,x,R)}}function p(k,_,P,x,R,Z,Q,D){let E=[],j=[];for(;k.length>x;)E.push(k.pop()),j.push(_.pop()+P-R);k.push(m(n.types[Q],E,j,Z-R,D-Z)),_.push(R-P)}function m(k,_,P,x,R=0,Z){if(c){let Q=[qe.contextHash,c];Z=Z?[Q].concat(Z):[Q]}if(R>25){let Q=[qe.lookAhead,R];Z=Z?[Q].concat(Z):[Q]}return new ri(k,_,P,x,Z)}function g(k,_){let P=a.fork(),x=0,R=0,Z=0,Q=P.end-r,D={size:0,start:0,skip:0};e:for(let E=P.pos-k;P.pos>E;){let j=P.size;if(P.id==_&&j>=0){D.size=x,D.start=R,D.skip=Z,Z+=4,x+=4,P.next();continue}let z=P.pos-j;if(j<0||z=o?4:0,G=P.start;for(P.next();P.pos>z;){if(P.size<0)if(P.size==-3)q+=4;else break e;else P.id>=o&&(q+=4);P.next()}R=G,x+=j,Z+=q}return(_<0||x==k)&&(D.size=x,D.start=R,D.skip=Z),D.size>4?D:void 0}function O(k,_,P){let{id:x,start:R,end:Z,size:Q}=a;if(a.next(),Q>=0&&x4){let E=a.pos-(Q-4);for(;a.pos>E;)P=O(k,_,P)}_[--P]=D,_[--P]=Z-k,_[--P]=R-k,_[--P]=x}else Q==-3?c=x:Q==-4&&(u=x);return P}let w=[],S=[];for(;a.pos>0;)f(i.start||0,i.bufferStart||0,w,S,-1,0);let C=(e=i.length)!==null&&e!==void 0?e:w.length?S[0]+w[0].length:0;return new ri(l[i.topID],w.reverse(),S.reverse(),C)}var RS=new WeakMap;function Bd(i,e){if(!i.isAnonymous||e instanceof Hs||e.type!=i)return 1;let t=RS.get(e);if(t==null){t=1;for(let n of e.children){if(n.type!=i||!(n instanceof ri)){t=1;break}t+=Bd(i,n)}RS.set(e,t)}return t}function i1(i,e,t,n,r,s,o,a,l){let c=0;for(let p=n;p=u)break;_+=P}if(S==C+1){if(_>u){let P=p[C];h(P.children,P.positions,0,P.children.length,m[C]+w);continue}f.push(p[C])}else{let P=m[S-1]+p[S-1].length-k;f.push(i1(i,p,m,C,S,k,P,null,l))}d.push(k+w-s)}}return h(e,t,n,r,0),(a||l)(f,d,o)}var Vo=class i{constructor(e,t,n,r,s=!1,o=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],n=!1){let r=[new i(0,e.length,e,0,!1,n)];for(let s of t)s.to>e.length&&r.push(s);return r}static applyChanges(e,t,n=128){if(!t.length)return e;let r=[],s=1,o=e.length?e[0]:null;for(let a=0,l=0,c=0;;a++){let u=a=n)for(;o&&o.from=d.from||f<=d.to||c){let h=Math.max(d.from,l)-c,p=Math.min(d.to,f)-c;d=h>=p?null:new i(h,p,d.tree,d.offset+c,a>0,!!u)}if(d&&r.push(d),o.to>f)break;o=snew Zc(r.from,r.to)):[new Zc(0,0)]:[new Zc(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let s=r.advance();if(s)return s}}},e1=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};var CK=new qe({perNode:!0});var QR=0,Yr=class i{constructor(e,t,n){this.set=e,this.base=t,this.modified=n,this.id=QR++}static define(e){if(e?.base)throw new Error("Can not derive from a modified tag");let t=new i([],null,[]);if(t.set.push(t),e)for(let n of e.set)t.set.push(n);return t}static defineModifier(){let e=new Yd;return t=>t.modified.indexOf(e)>-1?t:Yd.get(t.base||t,t.modified.concat(e).sort((n,r)=>n.id-r.id))}},RR=0,Yd=class i{constructor(){this.instances=[],this.id=RR++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(a=>a.base==e&&MR(t,a.modified));if(n)return n;let r=[],s=new Yr(r,e,t);for(let a of t)a.instances.push(s);let o=IR(t);for(let a of e.set)if(!a.modified.length)for(let l of o)r.push(i.get(a,l));return s}};function MR(i,e){return i.length==e.length&&i.every((t,n)=>t==e[n])}function IR(i){let e=[[]];for(let t=0;tn.length-t.length)}function Hd(i){let e=Object.create(null);for(let t in i){let n=i[t];Array.isArray(n)||(n=[n]);for(let r of t.split(" "))if(r){let s=[],o=2,a=r;for(let f=0;;){if(a=="..."&&f>0&&f+3==r.length){o=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!d)throw new RangeError("Invalid path: "+r);if(s.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),f+=d[0].length,f==r.length)break;let h=r[f++];if(f==r.length&&h=="!"){o=0;break}if(h!="/")throw new RangeError("Invalid path: "+r);a=r.slice(f)}let l=s.length-1,c=s[l];if(!c)throw new RangeError("Invalid path: "+r);let u=new Ga(n,o,l>0?s.slice(0,l):null);e[c]=u.sort(e[c])}}return ZS.add(e)}var ZS=new qe,Ga=class{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=r;for(let a of s)for(let l of a.set){let c=t[l.id];if(c){o=o?o+" "+c:c;break}}return o},scope:n}}function NR(i,e){let t=null;for(let n of i){let r=n.style(e);r&&(t=t?t+" "+r:r)}return t}function zS(i,e,t,n=0,r=i.length){let s=new r1(n,Array.isArray(e)?e:[e],t);s.highlightRange(i.cursor(),n,r,"",s.highlighters),s.flush(r)}var r1=class{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,s){let{type:o,from:a,to:l}=e;if(a>=n||l<=t)return;o.isTop&&(s=this.highlighters.filter(h=>!h.scope||h.scope(o)));let c=r,u=jR(e)||Ga.empty,f=NR(s,u.tags);if(f&&(c&&(c+=" "),c+=f,u.mode==1&&(r+=(r?" ":"")+f)),this.startSpan(Math.max(t,a),c),u.opaque)return;let d=e.tree&&e.tree.prop(qe.mounted);if(d&&d.overlay){let h=e.node.enter(d.overlay[0].from+a,1),p=this.highlighters.filter(g=>!g.scope||g.scope(d.tree.type)),m=e.firstChild();for(let g=0,O=a;;g++){let w=g=S||!e.nextSibling())););if(!w||S>n)break;O=w.to+a,O>t&&(this.highlightRange(h.cursor(),Math.max(t,w.from+a),Math.min(n,O),"",p),this.startSpan(Math.min(n,O),c))}m&&e.parent()}else if(e.firstChild()){d&&(r="");do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,s),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}};function jR(i){let e=i.type.prop(ZS);for(;e&&e.context&&!i.matchContext(e.context);)e=e.next;return e||null}var we=Yr.define,Wd=we(),Gs=we(),NS=we(Gs),jS=we(Gs),Ks=we(),Xd=we(Ks),n1=we(Ks),Ur=we(),Wo=we(Ur),Wr=we(),Xr=we(),s1=we(),Fc=we(s1),Ud=we(),L={comment:Wd,lineComment:we(Wd),blockComment:we(Wd),docComment:we(Wd),name:Gs,variableName:we(Gs),typeName:NS,tagName:we(NS),propertyName:jS,attributeName:we(jS),className:we(Gs),labelName:we(Gs),namespace:we(Gs),macroName:we(Gs),literal:Ks,string:Xd,docString:we(Xd),character:we(Xd),attributeValue:we(Xd),number:n1,integer:we(n1),float:we(n1),bool:we(Ks),regexp:we(Ks),escape:we(Ks),color:we(Ks),url:we(Ks),keyword:Wr,self:we(Wr),null:we(Wr),atom:we(Wr),unit:we(Wr),modifier:we(Wr),operatorKeyword:we(Wr),controlKeyword:we(Wr),definitionKeyword:we(Wr),moduleKeyword:we(Wr),operator:Xr,derefOperator:we(Xr),arithmeticOperator:we(Xr),logicOperator:we(Xr),bitwiseOperator:we(Xr),compareOperator:we(Xr),updateOperator:we(Xr),definitionOperator:we(Xr),typeOperator:we(Xr),controlOperator:we(Xr),punctuation:s1,separator:we(s1),bracket:Fc,angleBracket:we(Fc),squareBracket:we(Fc),paren:we(Fc),brace:we(Fc),content:Ur,heading:Wo,heading1:we(Wo),heading2:we(Wo),heading3:we(Wo),heading4:we(Wo),heading5:we(Wo),heading6:we(Wo),contentSeparator:we(Ur),list:we(Ur),quote:we(Ur),emphasis:we(Ur),strong:we(Ur),link:we(Ur),monospace:we(Ur),strikethrough:we(Ur),inserted:we(),deleted:we(),changed:we(),invalid:we(),meta:Ud,documentMeta:we(Ud),annotation:we(Ud),processingInstruction:we(Ud),definition:Yr.defineModifier(),constant:Yr.defineModifier(),function:Yr.defineModifier(),standard:Yr.defineModifier(),local:Yr.defineModifier(),special:Yr.defineModifier()},AK=o1([{tag:L.link,class:"tok-link"},{tag:L.heading,class:"tok-heading"},{tag:L.emphasis,class:"tok-emphasis"},{tag:L.strong,class:"tok-strong"},{tag:L.keyword,class:"tok-keyword"},{tag:L.atom,class:"tok-atom"},{tag:L.bool,class:"tok-bool"},{tag:L.url,class:"tok-url"},{tag:L.labelName,class:"tok-labelName"},{tag:L.inserted,class:"tok-inserted"},{tag:L.deleted,class:"tok-deleted"},{tag:L.literal,class:"tok-literal"},{tag:L.string,class:"tok-string"},{tag:L.number,class:"tok-number"},{tag:[L.regexp,L.escape,L.special(L.string)],class:"tok-string2"},{tag:L.variableName,class:"tok-variableName"},{tag:L.local(L.variableName),class:"tok-variableName tok-local"},{tag:L.definition(L.variableName),class:"tok-variableName tok-definition"},{tag:L.special(L.variableName),class:"tok-variableName2"},{tag:L.definition(L.propertyName),class:"tok-propertyName tok-definition"},{tag:L.typeName,class:"tok-typeName"},{tag:L.namespace,class:"tok-namespace"},{tag:L.className,class:"tok-className"},{tag:L.macroName,class:"tok-macroName"},{tag:L.propertyName,class:"tok-propertyName"},{tag:L.operator,class:"tok-operator"},{tag:L.comment,class:"tok-comment"},{tag:L.meta,class:"tok-meta"},{tag:L.invalid,class:"tok-invalid"},{tag:L.punctuation,class:"tok-punctuation"}]);var a1,Ka=new qe;function WS(i){return Ee.define({combine:i?e=>e.concat(i):void 0})}var XS=new qe,Cn=class{constructor(e,t,n=[],r=""){this.data=e,this.name=r,At.prototype.hasOwnProperty("tree")||Object.defineProperty(At.prototype,"tree",{get(){return Oi(this)}}),this.parser=t,this.extension=[Js.of(this),At.languageData.of((s,o,a)=>{let l=qS(s,o,a),c=l.type.prop(Ka);if(!c)return[];let u=s.facet(c),f=l.type.prop(XS);if(f){let d=l.resolve(o-l.from,a);for(let h of f)if(h.test(d,s)){let p=s.facet(h.facet);return h.type=="replace"?p:p.concat(u)}}return u})].concat(n)}isActiveAt(e,t,n=-1){return qS(e,t,n).type.prop(Ka)==this.data}findRegions(e){let t=e.facet(Js);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(s,o)=>{if(s.prop(Ka)==this.data){n.push({from:o,to:o+s.length});return}let a=s.prop(qe.mounted);if(a){if(a.tree.prop(Ka)==this.data){if(a.overlay)for(let l of a.overlay)n.push({from:l.from+o,to:l.to+o});else n.push({from:o,to:o+s.length});return}else if(a.overlay){let l=n.length;if(r(a.tree,a.overlay[0].from+o),n.length>l)return}}for(let l=0;ln.isTop?t:void 0)]}),e.name)}configure(e,t){return new i(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};function Oi(i){let e=i.field(Cn.state,!1);return e?e.tree:ri.empty}var f1=class{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}},Bc=null,d1=class i{constructor(e,t,n=[],r,s,o,a,l){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=s,this.viewport=o,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new i(e,t,[],ri.empty,0,n,[],null)}startParse(){return this.parser.startParse(new f1(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=ri.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Vo.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Bc;Bc=this;try{return e()}finally{Bc=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=LS(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:r,treeLen:s,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((c,u,f,d)=>l.push({fromA:c,toA:u,fromB:f,toB:d})),n=Vo.applyChanges(n,l),r=ri.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){a=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),f=e.mapPos(c.to,-1);ue.from&&(this.fragments=LS(this.fragments,r,s),this.skipped.splice(n--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Ha{createParse(t,n,r){let s=r[0].from,o=r[r.length-1].to;return{parsedPos:s,advance(){let l=Bc;if(l){for(let c of r)l.tempSkipped.push(c);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=o,new ri(zi.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Bc}};function LS(i,e,t){return Vo.applyChanges(i,[{fromA:e,toA:t,fromB:e,toB:t}])}var Wc=class i{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new i(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=d1.create(e.facet(Js).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new i(n)}};Cn.state=Xt.define({create:Wc.init,update(i,e){for(let t of e.effects)if(t.is(Cn.setState))return t.value;return e.startState.facet(Js)!=e.state.facet(Js)?Wc.init(e.state):i.apply(e)}});var US=i=>{let e=setTimeout(()=>i(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(US=i=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(i,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});var l1=typeof navigator<"u"&&(!((a1=navigator.scheduling)===null||a1===void 0)&&a1.isInputPending)?()=>navigator.scheduling.isInputPending():null,ZR=di.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Cn.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Cn.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=US(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndr+1e3,l=s.context.work(()=>l1&&l1()||Date.now()>o,r+(a?0:1e5));this.chunkBudget-=Date.now()-t,(l||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Cn.setState.of(new Wc(s.context))})),this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Ti(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Js=Ee.define({combine(i){return i.length?i[0]:null},enables:i=>[Cn.state,ZR,_e.contentAttributes.compute([i],e=>{let t=e.facet(i);return t&&t.name?{"data-language":t.name}:{}})]});var zR=Ee.define(),Xc=Ee.define({combine:i=>{if(!i.length)return" ";let e=i[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(i[0]));return e}});function Uc(i){let e=i.facet(Xc);return e.charCodeAt(0)==9?i.tabSize*e.length:e.length}function Ja(i,e){let t="",n=i.tabSize,r=i.facet(Xc)[0];if(r==" "){for(;e>=n;)t+=" ",e-=n;r=" "}for(let s=0;s=e?qR(i,t,e):null}var Xo=class{constructor(e,t={}){this.state=e,this.options=t,this.unit=Uc(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:s}=this.options;return r!=null&&r>=n.from&&r<=n.to?s&&r==e?{text:"",from:e}:(t<0?r-1&&(s+=o-this.countColumn(n,n.search(/\S|$/))),s}countColumn(e,t=e.length){return Bs(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let o=s(r);if(o>-1)return o}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}},y1=new qe;function qR(i,e,t){let n=e.resolveStack(t),r=n.node.enterUnfinishedNodesBefore(t);if(r!=n.node){let s=[];for(let o=r;o!=n.node;o=o.parent)s.push(o);for(let o=s.length-1;o>=0;o--)n={node:s[o],next:n}}return YS(n,i,t)}function YS(i,e,t){for(let n=i;n;n=n.next){let r=$R(n.node);if(r)return r(h1.create(e,t,n))}return 0}function LR(i){return i.pos==i.options.simulateBreak&&i.options.simulateDoubleBreak}function $R(i){let e=i.type.prop(y1);if(e)return e;let t=i.firstChild,n;if(t&&(n=t.type.prop(qe.closedBy))){let r=i.lastChild,s=r&&n.indexOf(r.name)>-1;return o=>GS(o,!0,1,void 0,s&&!LR(o)?r.from:void 0)}return i.parent==null?FR:null}function FR(){return 0}var h1=class i extends Xo{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new i(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(BR(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return YS(this.context.next,this.base,this.pos)}};function BR(i,e){for(let t=e;t;t=t.parent)if(i==t)return!0;return!1}function VR(i){let e=i.node,t=e.childAfter(e.from),n=e.lastChild;if(!t)return null;let r=i.options.simulateBreak,s=i.state.doc.lineAt(t.from),o=r==null||r<=s.from?s.to:Math.min(s.to,r);for(let a=t.to;;){let l=e.childAfter(a);if(!l||l==n)return null;if(!l.type.isSkipped)return l.fromGS(n,e,t,i)}function GS(i,e,t,n,r){let s=i.textAfter,o=s.match(/^\s*/)[0].length,a=n&&s.slice(o,o+n.length)==n||r==i.pos+o,l=e?VR(i):null;return l?a?i.column(l.from):i.column(l.to):i.baseIndent+(a?0:i.unit*t)}var KS=i=>i.baseIndent;function th({except:i,units:e=1}={}){return t=>{let n=i&&i.test(t.textAfter);return t.baseIndent+(n?0:e*t.unit)}}var WR=200;function JS(){return At.transactionFilter.of(i=>{if(!i.docChanged||!i.isUserEvent("input.type")&&!i.isUserEvent("input.complete"))return i;let e=i.startState.languageDataAt("indentOnInput",i.startState.selection.main.head);if(!e.length)return i;let t=i.newDoc,{head:n}=i.newSelection.main,r=t.lineAt(n);if(n>r.from+WR)return i;let s=t.sliceString(r.from,n);if(!e.some(c=>c.test(s)))return i;let{state:o}=i,a=-1,l=[];for(let{head:c}of o.selection.ranges){let u=o.doc.lineAt(c);if(u.from==a)continue;a=u.from;let f=eh(o,u.from);if(f==null)continue;let d=/^\s*/.exec(u.text)[0],h=Ja(o,f);d!=h&&l.push({from:u.from,to:u.from+d.length,insert:h})}return l.length?[i,{changes:l,sequential:!0}]:i})}var XR=Ee.define(),b1=new qe;function ex(i){let e=i.firstChild,t=i.lastChild;return e&&e.tot)continue;if(s&&a.from=e&&c.to>t&&(s=c)}}return s}function YR(i){let e=i.lastChild;return e&&e.to==i.to&&e.type.isError}function Kd(i,e,t){for(let n of i.facet(XR)){let r=n(i,e,t);if(r)return r}return UR(i,e,t)}function tx(i,e){let t=e.mapPos(i.from,1),n=e.mapPos(i.to,-1);return t>=n?void 0:{from:t,to:n}}var ih=Ze.define({map:tx}),Yc=Ze.define({map:tx});function ix(i){let e=[];for(let{head:t}of i.state.selection.ranges)e.some(n=>n.from<=t&&n.to>=t)||e.push(i.lineBlockAt(t));return e}var Uo=Xt.define({create(){return Ne.none},update(i,e){i=i.map(e.changes);for(let t of e.effects)if(t.is(ih)&&!HR(i,t.value.from,t.value.to)){let{preparePlaceholder:n}=e.state.facet(_1),r=n?Ne.replace({widget:new p1(n(e.state,t.value))}):$S;i=i.update({add:[r.range(t.value.from,t.value.to)]})}else t.is(Yc)&&(i=i.update({filter:(n,r)=>t.value.from!=n||t.value.to!=r,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:n}=e.selection.main;i.between(n,n,(r,s)=>{rn&&(t=!0)}),t&&(i=i.update({filterFrom:n,filterTo:n,filter:(r,s)=>s<=n||r>=n}))}return i},provide:i=>_e.decorations.from(i),toJSON(i,e){let t=[];return i.between(0,e.doc.length,(n,r)=>{t.push(n,r)}),t},fromJSON(i){if(!Array.isArray(i)||i.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t{(!r||r.from>s)&&(r={from:s,to:o})}),r}function HR(i,e,t){let n=!1;return i.between(e,e,(r,s)=>{r==e&&s==t&&(n=!0)}),n}function nx(i,e){return i.field(Uo,!1)?e:e.concat(Ze.appendConfig.of(ox()))}var GR=i=>{for(let e of ix(i)){let t=Kd(i.state,e.from,e.to);if(t)return i.dispatch({effects:nx(i.state,[ih.of(t),rx(i,t)])}),!0}return!1},KR=i=>{if(!i.state.field(Uo,!1))return!1;let e=[];for(let t of ix(i)){let n=Jd(i.state,t.from,t.to);n&&e.push(Yc.of(n),rx(i,n,!1))}return e.length&&i.dispatch({effects:e}),e.length>0};function rx(i,e,t=!0){let n=i.state.doc.lineAt(e.from).number,r=i.state.doc.lineAt(e.to).number;return _e.announce.of(`${i.state.phrase(t?"Folded lines":"Unfolded lines")} ${n} ${i.state.phrase("to")} ${r}.`)}var JR=i=>{let{state:e}=i,t=[];for(let n=0;n{let e=i.state.field(Uo,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,i.state.doc.length,(n,r)=>{t.push(Yc.of({from:n,to:r}))}),i.dispatch({effects:t}),!0};var sx=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:GR},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:KR},{key:"Ctrl-Alt-[",run:JR},{key:"Ctrl-Alt-]",run:eM}],tM={placeholderDOM:null,preparePlaceholder:null,placeholderText:"\u2026"},_1=Ee.define({combine(i){return mn(i,tM)}});function ox(i){let e=[Uo,nM];return i&&e.push(_1.of(i)),e}function ax(i,e){let{state:t}=i,n=t.facet(_1),r=o=>{let a=i.lineBlockAt(i.posAtDOM(o.target)),l=Jd(i.state,a.from,a.to);l&&i.dispatch({effects:Yc.of(l)}),o.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(i,r,e);let s=document.createElement("span");return s.textContent=n.placeholderText,s.setAttribute("aria-label",t.phrase("folded code")),s.title=t.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=r,s}var $S=Ne.replace({widget:new class extends pr{toDOM(i){return ax(i,null)}}}),p1=class extends pr{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return ax(e,this.value)}},iM={openText:"\u2304",closedText:"\u203A",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1},Vc=class extends gr{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}};function lx(i={}){let e=Object.assign(Object.assign({},iM),i),t=new Vc(e,!0),n=new Vc(e,!1),r=di.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(Js)!=o.state.facet(Js)||o.startState.field(Uo,!1)!=o.state.field(Uo,!1)||Oi(o.startState)!=Oi(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let a=new Zr;for(let l of o.viewportLineBlocks){let c=Jd(o.state,l.from,l.to)?n:Kd(o.state,l.from,l.to)?t:null;c&&a.add(l.from,l.from,c)}return a.finish()}}),{domEventHandlers:s}=e;return[r,Y0({class:"cm-foldGutter",markers(o){var a;return((a=o.plugin(r))===null||a===void 0?void 0:a.markers)||St.empty},initialSpacer(){return new Vc(e,!1)},domEventHandlers:Object.assign(Object.assign({},s),{click:(o,a,l)=>{if(s.click&&s.click(o,a,l))return!0;let c=Jd(o.state,a.from,a.to);if(c)return o.dispatch({effects:Yc.of(c)}),!0;let u=Kd(o.state,a.from,a.to);return u?(o.dispatch({effects:ih.of(u)}),!0):!1}})}),ox()]}var nM=_e.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}}),eo=class i{constructor(e,t){this.specs=e;let n;function r(a){let l=zn.newName();return(n||(n=Object.create(null)))["."+l]=a,l}let s=typeof t.all=="string"?t.all:t.all?r(t.all):void 0,o=t.scope;this.scope=o instanceof Cn?a=>a.prop(Ka)==o.data:o?a=>a==o:void 0,this.style=o1(e.map(a=>({tag:a.tag,class:a.class||r(Object.assign({},a,{tag:null}))})),{all:s}).style,this.module=n?new zn(n):null,this.themeType=t.themeType}static define(e,t){return new i(e,t||{})}},m1=Ee.define(),cx=Ee.define({combine(i){return i.length?[i[0]]:null}});function c1(i){let e=i.facet(m1);return e.length?e:i.facet(cx)}function el(i,e){let t=[rM],n;return i instanceof eo&&(i.module&&t.push(_e.styleModule.of(i.module)),n=i.themeType),e?.fallback?t.push(cx.of(i)):n?t.push(m1.computeN([_e.darkTheme],r=>r.facet(_e.darkTheme)==(n=="dark")?[i]:[])):t.push(m1.of(i)),t}var g1=class{constructor(e){this.markCache=Object.create(null),this.tree=Oi(e.state),this.decorations=this.buildDeco(e,c1(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=Oi(e.state),n=c1(e.state),r=n!=c1(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return Ne.none;let n=new Zr;for(let{from:r,to:s}of e.visibleRanges)zS(this.tree,t,(o,a,l)=>{n.add(o,a,this.markCache[l]||(this.markCache[l]=Ne.mark({class:l})))},r,s);return n.finish()}},rM=hr.high(di.fromClass(g1,{decorations:i=>i.decorations})),ux=eo.define([{tag:L.meta,color:"#404740"},{tag:L.link,textDecoration:"underline"},{tag:L.heading,textDecoration:"underline",fontWeight:"bold"},{tag:L.emphasis,fontStyle:"italic"},{tag:L.strong,fontWeight:"bold"},{tag:L.strikethrough,textDecoration:"line-through"},{tag:L.keyword,color:"#708"},{tag:[L.atom,L.bool,L.url,L.contentSeparator,L.labelName],color:"#219"},{tag:[L.literal,L.inserted],color:"#164"},{tag:[L.string,L.deleted],color:"#a11"},{tag:[L.regexp,L.escape,L.special(L.string)],color:"#e40"},{tag:L.definition(L.variableName),color:"#00f"},{tag:L.local(L.variableName),color:"#30a"},{tag:[L.typeName,L.namespace],color:"#085"},{tag:L.className,color:"#167"},{tag:[L.special(L.variableName),L.macroName],color:"#256"},{tag:L.definition(L.propertyName),color:"#00c"},{tag:L.comment,color:"#940"},{tag:L.invalid,color:"#f00"}]),sM=_e.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),fx=1e4,dx="()[]{}",hx=Ee.define({combine(i){return mn(i,{afterCursor:!0,brackets:dx,maxScanDistance:fx,renderMatch:lM})}}),oM=Ne.mark({class:"cm-matchingBracket"}),aM=Ne.mark({class:"cm-nonmatchingBracket"});function lM(i){let e=[],t=i.matched?oM:aM;return e.push(t.range(i.start.from,i.start.to)),i.end&&e.push(t.range(i.end.from,i.end.to)),e}var cM=Xt.define({create(){return Ne.none},update(i,e){if(!e.docChanged&&!e.selection)return i;let t=[],n=e.state.facet(hx);for(let r of e.state.selection.ranges){if(!r.empty)continue;let s=Or(e.state,r.head,-1,n)||r.head>0&&Or(e.state,r.head-1,1,n)||n.afterCursor&&(Or(e.state,r.head,1,n)||r.head_e.decorations.from(i)}),uM=[cM,sM];function px(i={}){return[hx.of(i),uM]}var fM=new qe;function O1(i,e,t){let n=i.prop(e<0?qe.openedBy:qe.closedBy);if(n)return n;if(i.name.length==1){let r=t.indexOf(i.name);if(r>-1&&r%2==(e<0?1:0))return[t[r+e]]}return null}function v1(i){let e=i.type.prop(fM);return e?e(i.node):i}function Or(i,e,t,n={}){let r=n.maxScanDistance||fx,s=n.brackets||dx,o=Oi(i),a=o.resolveInner(e,t);for(let l=a;l;l=l.parent){let c=O1(l.type,t,s);if(c&&l.from0?e>=u.from&&eu.from&&e<=u.to))return dM(i,e,t,l,u,c,s)}}return hM(i,e,t,o,a.type,r,s)}function dM(i,e,t,n,r,s,o){let a=n.parent,l={from:r.from,to:r.to},c=0,u=a?.cursor();if(u&&(t<0?u.childBefore(n.from):u.childAfter(n.to)))do if(t<0?u.to<=n.from:u.from>=n.to){if(c==0&&s.indexOf(u.type.name)>-1&&u.from0)return null;let c={from:t<0?e-1:e,to:t>0?e+1:e},u=i.doc.iterRange(e,t>0?i.doc.length:0),f=0;for(let d=0;!u.next().done&&d<=s;){let h=u.value;t<0&&(d+=h.length);let p=e+d*t;for(let m=t>0?0:h.length-1,g=t>0?h.length:-1;m!=g;m+=t){let O=o.indexOf(h[m]);if(!(O<0||n.resolveInner(p+m,1).type!=r))if(O%2==0==t>0)f++;else{if(f==1)return{start:c,end:{from:p+m,to:p+m+1},matched:O>>1==l>>1};f--}}t>0&&(d+=h.length)}return u.done?{start:c,matched:!1}:null}var pM=Object.create(null),FS=[zi.none];var BS=[],VS=Object.create(null),mM=Object.create(null);for(let[i,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])mM[i]=gM(pM,e);function u1(i,e){BS.indexOf(i)>-1||(BS.push(i),console.warn(e))}function gM(i,e){let t=[];for(let a of e.split(" ")){let l=[];for(let c of a.split(".")){let u=i[c]||L[c];u?typeof u=="function"?l.length?l=l.map(u):u1(c,`Modifier ${c} used at start of tag`):l.length?u1(c,`Tag ${c} used as modifier`):l=Array.isArray(u)?u:[u]:u1(c,`Unknown highlighting tag ${c}`)}for(let c of l)t.push(c)}if(!t.length)return 0;let n=e.replace(/ /g,"_"),r=n+" "+t.map(a=>a.id),s=VS[r];if(s)return s.id;let o=VS[r]=zi.define({id:FS.length,name:n,props:[Hd({[n]:t})]});return FS.push(o),o.id}var ZK={rtl:Ne.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:Ct.RTL}),ltr:Ne.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:Ct.LTR}),auto:Ne.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})};var OM=i=>{let{state:e}=i,t=e.doc.lineAt(e.selection.main.from),n=C1(i.state,t.from);return n.line?vM(i):n.block?bM(i):!1};function P1(i,e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=i(e,t);return r?(n(t.update(r)),!0):!1}}var vM=P1(kM,0);var yM=P1(kx,0);var bM=P1((i,e)=>kx(i,e,wM(e)),0);function C1(i,e){let t=i.languageDataAt("commentTokens",e);return t.length?t[0]:{}}var Hc=50;function _M(i,{open:e,close:t},n,r){let s=i.sliceDoc(n-Hc,n),o=i.sliceDoc(r,r+Hc),a=/\s*$/.exec(s)[0].length,l=/^\s*/.exec(o)[0].length,c=s.length-a;if(s.slice(c-e.length,c)==e&&o.slice(l,l+t.length)==t)return{open:{pos:n-a,margin:a&&1},close:{pos:r+l,margin:l&&1}};let u,f;r-n<=2*Hc?u=f=i.sliceDoc(n,r):(u=i.sliceDoc(n,n+Hc),f=i.sliceDoc(r-Hc,r));let d=/^\s*/.exec(u)[0].length,h=/\s*$/.exec(f)[0].length,p=f.length-h-t.length;return u.slice(d,d+e.length)==e&&f.slice(p,p+t.length)==t?{open:{pos:n+d+e.length,margin:/\s/.test(u.charAt(d+e.length))?1:0},close:{pos:r-h-t.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}function wM(i){let e=[];for(let t of i.selection.ranges){let n=i.doc.lineAt(t.from),r=t.to<=n.to?n:i.doc.lineAt(t.to),s=e.length-1;s>=0&&e[s].to>n.from?e[s].to=r.to:e.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:r.to})}return e}function kx(i,e,t=e.selection.ranges){let n=t.map(s=>C1(e,s.from).block);if(!n.every(s=>s))return null;let r=t.map((s,o)=>_M(e,n[o],s.from,s.to));if(i!=2&&!r.every(s=>s))return{changes:e.changes(t.map((s,o)=>r[o]?[]:[{from:s.from,insert:n[o].open+" "},{from:s.to,insert:" "+n[o].close}]))};if(i!=1&&r.some(s=>s)){let s=[];for(let o=0,a;or&&(s==o||o>f.from)){r=f.from;let d=/^\s*/.exec(f.text)[0].length,h=d==f.length,p=f.text.slice(d,d+c.length)==c?d:-1;ds.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:a,token:l,indent:c,empty:u,single:f}of n)(f||!u)&&s.push({from:a.from+c,insert:l+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(i!=1&&n.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:a,token:l}of n)if(a>=0){let c=o.from+a,u=c+l.length;o.text[u-o.from]==" "&&u++,s.push({from:c,to:u})}return{changes:s}}return null}var k1=pn.define(),SM=pn.define(),xM=Ee.define(),PM=Ee.define({combine(i){return mn(i,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),CM=Xt.define({create(){return Yo.empty},update(i,e){let t=e.state.facet(PM),n=e.annotation(k1);if(n){let l=vr.fromTransaction(e,n.selection),c=n.side,u=c==0?i.undone:i.done;return l?u=rh(u,u.length,t.minDepth,l):u=xx(u,e.startState.selection),new Yo(c==0?n.rest:u,c==0?u:n.rest)}let r=e.annotation(SM);if((r=="full"||r=="before")&&(i=i.isolate()),e.annotation(gi.addToHistory)===!1)return e.changes.empty?i:i.addMapping(e.changes.desc);let s=vr.fromTransaction(e),o=e.annotation(gi.time),a=e.annotation(gi.userEvent);return s?i=i.addChanges(s,o,a,t,e):e.selection&&(i=i.addSelection(e.startState.selection,o,a,t.newGroupDelay)),(r=="full"||r=="after")&&(i=i.isolate()),i},toJSON(i){return{done:i.done.map(e=>e.toJSON()),undone:i.undone.map(e=>e.toJSON())}},fromJSON(i){return new Yo(i.done.map(vr.fromJSON),i.undone.map(vr.fromJSON))}});function sh(i,e){return function({state:t,dispatch:n}){if(!e&&t.readOnly)return!1;let r=t.field(CM,!1);if(!r)return!1;let s=r.pop(i,t,e);return s?(n(s),!0):!1}}var EM=sh(0,!1),mx=sh(1,!1),TM=sh(0,!0),AM=sh(1,!0);var vr=class i{constructor(e,t,n,r,s){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=s}setSelAfter(e){return new i(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(n=this.startSelection)===null||n===void 0?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new i(e.changes&&Ui.fromJSON(e.changes),[],e.mapped&&gs.fromJSON(e.mapped),e.startSelection&&le.fromJSON(e.startSelection),e.selectionsAfter.map(le.fromJSON))}static fromTransaction(e,t){let n=$n;for(let r of e.startState.facet(xM)){let s=r(e);s.length&&(n=n.concat(s))}return!n.length&&e.changes.empty?null:new i(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,$n)}static selection(e){return new i(void 0,$n,void 0,void 0,e)}};function rh(i,e,t,n){let r=e+1>t+20?e-t-1:0,s=i.slice(r,e);return s.push(n),s}function DM(i,e){let t=[],n=!1;return i.iterChangedRanges((r,s)=>t.push(r,s)),e.iterChangedRanges((r,s,o,a)=>{for(let l=0;l=c&&o<=u&&(n=!0)}}),n}function QM(i,e){return i.ranges.length==e.ranges.length&&i.ranges.filter((t,n)=>t.empty!=e.ranges[n].empty).length===0}function Sx(i,e){return i.length?e.length?i.concat(e):i:e}var $n=[],RM=200;function xx(i,e){if(i.length){let t=i[i.length-1],n=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-RM));return n.length&&n[n.length-1].eq(e)?i:(n.push(e),rh(i,i.length-1,1e9,t.setSelAfter(n)))}else return[vr.selection([e])]}function MM(i){let e=i[i.length-1],t=i.slice();return t[i.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function w1(i,e){if(!i.length)return i;let t=i.length,n=$n;for(;t;){let r=IM(i[t-1],e,n);if(r.changes&&!r.changes.empty||r.effects.length){let s=i.slice(0,t);return s[t-1]=r,s}else e=r.mapped,t--,n=r.selectionsAfter}return n.length?[vr.selection(n)]:$n}function IM(i,e,t){let n=Sx(i.selectionsAfter.length?i.selectionsAfter.map(a=>a.map(e)):$n,t);if(!i.changes)return vr.selection(n);let r=i.changes.map(e),s=e.mapDesc(i.changes,!0),o=i.mapped?i.mapped.composeDesc(s):s;return new vr(r,Ze.mapEffects(i.effects,e),o,i.startSelection.map(s),n)}var NM=/^(input\.type|delete)($|\.)/,Yo=class i{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new i(this.done,this.undone):this}addChanges(e,t,n,r,s){let o=this.done,a=o[o.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!n||NM.test(n))&&(!a.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?i.moveByChar(t,e):oh(t,e))}function qi(i){return i.textDirectionAt(i.state.selection.main.head)==Ct.LTR}var Ex=i=>Cx(i,!qi(i)),Tx=i=>Cx(i,qi(i));function Ax(i,e){return yr(i,t=>t.empty?i.moveByGroup(t,e):oh(t,e))}var jM=i=>Ax(i,!qi(i)),ZM=i=>Ax(i,qi(i));var XK=typeof Intl<"u"&&Intl.Segmenter?new Intl.Segmenter(void 0,{granularity:"word"}):null;function zM(i,e,t){if(e.type.prop(t))return!0;let n=e.to-e.from;return n&&(n>2||/[^\s,.;:]/.test(i.sliceDoc(e.from,e.to)))||e.firstChild}function ah(i,e,t){let n=Oi(i).resolveInner(e.head),r=t?qe.closedBy:qe.openedBy;for(let l=e.head;;){let c=t?n.childAfter(l):n.childBefore(l);if(!c)break;zM(i,c,r)?n=c:l=t?c.to:c.from}let s=n.type.prop(r),o,a;return s&&(o=t?Or(i,n.from,1):Or(i,n.to,-1))&&o.matched?a=t?o.end.to:o.end.from:a=t?n.to:n.from,le.cursor(a,t?-1:1)}var qM=i=>yr(i,e=>ah(i.state,e,!qi(i))),LM=i=>yr(i,e=>ah(i.state,e,qi(i)));function Dx(i,e){return yr(i,t=>{if(!t.empty)return oh(t,e);let n=i.moveVertically(t,e);return n.head!=t.head?n:i.moveToLineBoundary(t,e)})}var Qx=i=>Dx(i,!1),Rx=i=>Dx(i,!0);function Mx(i){let e=i.scrollDOM.clientHeighto.empty?i.moveVertically(o,e,t.height):oh(o,e));if(r.eq(n.selection))return!1;let s;if(t.selfScroll){let o=i.coordsAtPos(n.selection.main.head),a=i.scrollDOM.getBoundingClientRect(),l=a.top+t.marginTop,c=a.bottom-t.marginBottom;o&&o.top>l&&o.bottomIx(i,!1),S1=i=>Ix(i,!0);function to(i,e,t){let n=i.lineBlockAt(e.head),r=i.moveToLineBoundary(e,t);if(r.head==e.head&&r.head!=(t?n.to:n.from)&&(r=i.moveToLineBoundary(e,t,!1)),!t&&r.head==n.from&&n.length){let s=/^\s*/.exec(i.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;s&&e.head!=n.from+s&&(r=le.cursor(n.from+s))}return r}var $M=i=>yr(i,e=>to(i,e,!0)),FM=i=>yr(i,e=>to(i,e,!1)),BM=i=>yr(i,e=>to(i,e,!qi(i))),VM=i=>yr(i,e=>to(i,e,qi(i))),WM=i=>yr(i,e=>le.cursor(i.lineBlockAt(e.head).from,1)),XM=i=>yr(i,e=>le.cursor(i.lineBlockAt(e.head).to,-1));function UM(i,e,t){let n=!1,r=tl(i.selection,s=>{let o=Or(i,s.head,-1)||Or(i,s.head,1)||s.head>0&&Or(i,s.head-1,1)||s.headUM(i,e,!1);function Fn(i,e){let t=tl(i.state.selection,n=>{let r=e(n);return le.range(n.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return t.eq(i.state.selection)?!1:(i.dispatch(Hr(i.state,t)),!0)}function Nx(i,e){return Fn(i,t=>i.moveByChar(t,e))}var jx=i=>Nx(i,!qi(i)),Zx=i=>Nx(i,qi(i));function zx(i,e){return Fn(i,t=>i.moveByGroup(t,e))}var HM=i=>zx(i,!qi(i)),GM=i=>zx(i,qi(i));var KM=i=>Fn(i,e=>ah(i.state,e,!qi(i))),JM=i=>Fn(i,e=>ah(i.state,e,qi(i)));function qx(i,e){return Fn(i,t=>i.moveVertically(t,e))}var Lx=i=>qx(i,!1),$x=i=>qx(i,!0);function Fx(i,e){return Fn(i,t=>i.moveVertically(t,e,Mx(i).height))}var Ox=i=>Fx(i,!1),vx=i=>Fx(i,!0),eI=i=>Fn(i,e=>to(i,e,!0)),tI=i=>Fn(i,e=>to(i,e,!1)),iI=i=>Fn(i,e=>to(i,e,!qi(i))),nI=i=>Fn(i,e=>to(i,e,qi(i))),rI=i=>Fn(i,e=>le.cursor(i.lineBlockAt(e.head).from)),sI=i=>Fn(i,e=>le.cursor(i.lineBlockAt(e.head).to)),yx=({state:i,dispatch:e})=>(e(Hr(i,{anchor:0})),!0),bx=({state:i,dispatch:e})=>(e(Hr(i,{anchor:i.doc.length})),!0),_x=({state:i,dispatch:e})=>(e(Hr(i,{anchor:i.selection.main.anchor,head:0})),!0),wx=({state:i,dispatch:e})=>(e(Hr(i,{anchor:i.selection.main.anchor,head:i.doc.length})),!0),oI=({state:i,dispatch:e})=>(e(i.update({selection:{anchor:0,head:i.doc.length},userEvent:"select"})),!0),aI=({state:i,dispatch:e})=>{let t=lh(i).map(({from:n,to:r})=>le.range(n,Math.min(r+1,i.doc.length)));return e(i.update({selection:le.create(t),userEvent:"select"})),!0},lI=({state:i,dispatch:e})=>{let t=tl(i.selection,n=>{var r;let s=Oi(i).resolveStack(n.from,1);for(let o=s;o;o=o.next){let{node:a}=o;if((a.from=n.to||a.to>n.to&&a.from<=n.from)&&(!((r=a.parent)===null||r===void 0)&&r.parent))return le.range(a.to,a.from)}return n});return e(Hr(i,t)),!0},cI=({state:i,dispatch:e})=>{let t=i.selection,n=null;return t.ranges.length>1?n=le.create([t.main]):t.main.empty||(n=le.create([le.cursor(t.main.head)])),n?(e(Hr(i,n)),!0):!1};function Gc(i,e){if(i.state.readOnly)return!1;let t="delete.selection",{state:n}=i,r=n.changeByRange(s=>{let{from:o,to:a}=s;if(o==a){let l=e(s);lo&&(t="delete.forward",l=nh(i,l,!0)),o=Math.min(o,l),a=Math.max(a,l)}else o=nh(i,o,!1),a=nh(i,a,!0);return o==a?{range:s}:{changes:{from:o,to:a},range:le.cursor(o,or(i)))n.between(e,e,(r,s)=>{re&&(e=t?s:r)});return e}var Bx=(i,e,t)=>Gc(i,n=>{let r=n.from,{state:s}=i,o=s.doc.lineAt(r),a,l;if(t&&!e&&r>o.from&&rBx(i,!1,!0);var Vx=i=>Bx(i,!0,!1),Wx=(i,e)=>Gc(i,t=>{let n=t.head,{state:r}=i,s=r.doc.lineAt(n),o=r.charCategorizer(n);for(let a=null;;){if(n==(e?s.to:s.from)){n==t.head&&s.number!=(e?r.doc.lines:1)&&(n+=e?1:-1);break}let l=ui(s.text,n-s.from,e)+s.from,c=s.text.slice(Math.min(n,l)-s.from,Math.max(n,l)-s.from),u=o(c);if(a!=null&&u!=a)break;(c!=" "||n!=t.head)&&(a=u),n=l}return n}),Xx=i=>Wx(i,!1),uI=i=>Wx(i,!0),fI=i=>Gc(i,e=>{let t=i.lineBlockAt(e.head).to;return e.headGc(i,e=>{let t=i.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),hI=i=>Gc(i,e=>{let t=i.moveToLineBoundary(e,!0).head;return e.head{if(i.readOnly)return!1;let t=i.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:rt.of(["",""])},range:le.cursor(n.from)}));return e(i.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},mI=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let t=i.changeByRange(n=>{if(!n.empty||n.from==0||n.from==i.doc.length)return{range:n};let r=n.from,s=i.doc.lineAt(r),o=r==s.from?r-1:ui(s.text,r-s.from,!1)+s.from,a=r==s.to?r+1:ui(s.text,r-s.from,!0)+s.from;return{changes:{from:o,to:a,insert:i.doc.slice(r,a).append(i.doc.slice(o,r))},range:le.cursor(a)}});return t.changes.empty?!1:(e(i.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function lh(i){let e=[],t=-1;for(let n of i.selection.ranges){let r=i.doc.lineAt(n.from),s=i.doc.lineAt(n.to);if(!n.empty&&n.to==s.from&&(s=i.doc.lineAt(n.to-1)),t>=r.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(n)}else e.push({from:r.from,to:s.to,ranges:[n]});t=s.number+1}return e}function Ux(i,e,t){if(i.readOnly)return!1;let n=[],r=[];for(let s of lh(i)){if(t?s.to==i.doc.length:s.from==0)continue;let o=i.doc.lineAt(t?s.to+1:s.from-1),a=o.length+1;if(t){n.push({from:s.to,to:o.to},{from:s.from,insert:o.text+i.lineBreak});for(let l of s.ranges)r.push(le.range(Math.min(i.doc.length,l.anchor+a),Math.min(i.doc.length,l.head+a)))}else{n.push({from:o.from,to:s.from},{from:s.to,insert:i.lineBreak+o.text});for(let l of s.ranges)r.push(le.range(l.anchor-a,l.head-a))}}return n.length?(e(i.update({changes:n,scrollIntoView:!0,selection:le.create(r,i.selection.mainIndex),userEvent:"move.line"})),!0):!1}var gI=({state:i,dispatch:e})=>Ux(i,e,!1),OI=({state:i,dispatch:e})=>Ux(i,e,!0);function Yx(i,e,t){if(i.readOnly)return!1;let n=[];for(let r of lh(i))t?n.push({from:r.from,insert:i.doc.slice(r.from,r.to)+i.lineBreak}):n.push({from:r.to,insert:i.lineBreak+i.doc.slice(r.from,r.to)});return e(i.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}var vI=({state:i,dispatch:e})=>Yx(i,e,!1),yI=({state:i,dispatch:e})=>Yx(i,e,!0),bI=i=>{if(i.state.readOnly)return!1;let{state:e}=i,t=e.changes(lh(e).map(({from:r,to:s})=>(r>0?r--:s{let s;if(i.lineWrapping){let o=i.lineBlockAt(r.head),a=i.coordsAtPos(r.head,r.assoc||1);a&&(s=o.bottom+i.documentTop-a.bottom+i.defaultLineHeight/2)}return i.moveVertically(r,!0,s)}).map(t);return i.dispatch({changes:t,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0};function _I(i,e){if(/\(\)|\[\]|\{\}/.test(i.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=Oi(i).resolveInner(e),n=t.childBefore(e),r=t.childAfter(e),s;return n&&r&&n.to<=e&&r.from>=e&&(s=n.type.prop(qe.closedBy))&&s.indexOf(r.name)>-1&&i.doc.lineAt(n.to).from==i.doc.lineAt(r.from).from&&!/\S/.test(i.sliceDoc(n.to,r.from))?{from:n.to,to:r.from}:null}var wI=Hx(!1),kI=Hx(!0);function Hx(i){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(r=>{let{from:s,to:o}=r,a=e.doc.lineAt(s),l=!i&&s==o&&_I(e,s);i&&(s=o=(o<=a.to?a:e.doc.lineAt(o)).to);let c=new Xo(e,{simulateBreak:s,simulateDoubleBreak:!!l}),u=eh(c,s);for(u==null&&(u=Bs(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));oa.from&&s{let r=[];for(let o=n.from;o<=n.to;){let a=i.doc.lineAt(o);a.number>t&&(n.empty||n.to>a.from)&&(e(a,r,n),t=a.number),o=a.to+1}let s=i.changes(r);return{changes:r,range:le.range(s.mapPos(n.anchor,1),s.mapPos(n.head,1))}})}var SI=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let t=Object.create(null),n=new Xo(i,{overrideIndentation:s=>{let o=t[s];return o??-1}}),r=E1(i,(s,o,a)=>{let l=eh(n,s.from);if(l==null)return;/\S/.test(s.text)||(l=0);let c=/^\s*/.exec(s.text)[0],u=Ja(i,l);(c!=u||a.fromi.readOnly?!1:(e(i.update(E1(i,(t,n)=>{n.push({from:t.from,insert:i.facet(Xc)})}),{userEvent:"input.indent"})),!0),Kx=({state:i,dispatch:e})=>i.readOnly?!1:(e(i.update(E1(i,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let s=Bs(r,i.tabSize),o=0,a=Ja(i,Math.max(0,s-Uc(i)));for(;o({mac:i.key,run:i.run,shift:i.shift}))),Jx=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:qM,shift:KM},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:LM,shift:JM},{key:"Alt-ArrowUp",run:gI},{key:"Shift-Alt-ArrowUp",run:vI},{key:"Alt-ArrowDown",run:OI},{key:"Shift-Alt-ArrowDown",run:yI},{key:"Escape",run:cI},{key:"Mod-Enter",run:kI},{key:"Alt-l",mac:"Ctrl-l",run:aI},{key:"Mod-i",run:lI,preventDefault:!0},{key:"Mod-[",run:Kx},{key:"Mod-]",run:Gx},{key:"Mod-Alt-\\",run:SI},{key:"Shift-Mod-k",run:bI},{key:"Shift-Mod-\\",run:YM},{key:"Mod-/",run:OM},{key:"Alt-A",run:yM}].concat(PI),eP={key:"Tab",run:Gx,shift:Kx};var D1=class i{constructor(e,t,n,r,s,o,a,l,c,u=0,f){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=s,this.score=o,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let r=e.parser.context;return new i(e,[],t,n,n,0,[],0,r?new ch(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,r=e&65535,{parser:s}=this.p,o=s.dynamicPrecedence(r);if(o&&(this.score+=o),n==0){this.pushState(s.getGoto(this.state,r,!0),this.reducePos),r=2e3&&!(!((t=this.p.parser.nodeSet.types[r])===null||t===void 0)&&t.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSizea;)this.stack.pop();this.reduceContext(r,l)}storeNode(e,t,n,r=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&o.buffer[a-4]==0&&o.buffer[a-1]>-1){if(t==n)return;if(o.buffer[a-2]>=t){o.buffer[a-2]=n;return}}}if(!s||this.pos==n)this.buffer.push(e,t,n,r);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0)for(;o>0&&this.buffer[o-2]>n;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,r>4&&(r-=4);this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=n,this.buffer[o+3]=r}}shift(e,t,n,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let s=e,{parser:o}=this.p;(r>this.pos||t<=o.maxNode)&&(this.pos=r,o.stateFlag(s,1)||(this.reducePos=r)),this.pushState(s,n),this.shiftContext(t,n),t<=o.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){e&65536?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new i(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new Q1(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let r=[];for(let s=0,o;sl&1&&a==o)||r.push(t[s],o)}t=r}let n=[];for(let r=0;r>19,r=t&65535,s=this.stack.length-n*3;if(s<0||e.getGoto(this.stack[s],r,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,s)=>{if(!t.includes(r))return t.push(r),e.allActions(r,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-s;if(a>1){let l=o&65535,c=this.stack.length-a*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return a<<19|65536|l}}else{let a=n(o,s+1);if(a!=null)return a}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},ch=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},Q1=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}},R1=class i{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new i(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new i(this.stack,this.pos,this.index)}};function Kc(i,e=Uint16Array){if(typeof i!="string")return i;let t=null;for(let n=0,r=0;n=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,a=!0),s+=l,a)break;s*=46}t?t[r++]=s:t=new e(s)}return t}var il=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},tP=new il,M1=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=tP,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,s=this.pos+e;for(;sn.to:s>=n.to;){if(r==this.ranges.length-1)return null;let o=this.ranges[++r];s+=o.from-n.to,n=o}return s}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t=this.chunk2Pos&&na.to&&(this.chunk2=this.chunk2.slice(0,a.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=tP,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},io=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;oP(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};io.prototype.contextual=io.prototype.fallback=io.prototype.extend=!1;var nl=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e=="string"?Kc(e):e}token(e,t){let n=e.pos,r=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(oP(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||r++,o==null)break;e.reset(o,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};nl.prototype.contextual=io.prototype.fallback=io.prototype.extend=!1;var Ho=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function oP(i,e,t,n,r,s){let o=0,a=1<0){let p=i[h];if(l.allows(p)&&(e.token.value==-1||e.token.value==p||EI(p,e.token.value,r,s))){e.acceptToken(p);break}}let u=e.next,f=0,d=i[o+2];if(e.next<0&&d>f&&i[c+d*3-3]==65535){o=i[c+d*3-1];continue e}for(;f>1,p=c+h+(h<<1),m=i[p],g=i[p+1]||65536;if(u=g)f=h+1;else{o=i[p+2],e.advance();continue e}}break}}function iP(i,e,t){for(let n=e,r;(r=i[n])!=65535;n++)if(r==t)return n-e;return-1}function EI(i,e,t,n){let r=iP(t,n,e);return r<0||iP(t,n,i)e)&&!n.type.isError)return t<0?Math.max(0,Math.min(n.to-1,e-25)):Math.min(i.length,Math.max(n.from+1,e+25));if(t<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return t<0?0:i.length}}var I1=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?nP(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?nP(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=o,null;if(s instanceof ri){if(o==e){if(o=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+s.length}}},N1=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(n=>new il)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:s}=r,o=r.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let c=0;cf.end+25&&(l=Math.max(f.lookAhead,l)),f.value!=0)){let d=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!u.extend&&(n=f,t>d))break}}for(;this.actions.length>t;)this.actions.pop();return l&&e.setLookAhead(l),!n&&e.pos==this.stream.end&&(n=new il,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new il,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:s}=n.p;for(let o=0;o=0&&n.p.parser.dialect.allows(a>>1)){a&1?e.extended=a>>1:e.value=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let s=0;se.bufferLength*4?new I1(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;ot)n.push(a);else{if(this.advanceStack(a,n,e))continue;{r||(r=[],s=[]),r.push(a);let l=this.tokens.getMainToken(a);s.push(l.value,l.end)}}break}}if(!n.length){let o=r&&TI(r);if(o)return En&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw En&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&r){let o=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,n);if(o)return En&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(n.length>o)for(n.sort((a,l)=>l.score-a.score);n.length>o;)n.pop();n.some(a=>a.reducePos>t)&&this.recovering--}else if(n.length>1){e:for(let o=0;o500&&c.buffer.length>500)if((a.score-c.score||a.buffer.length-c.buffer.length)>0)n.splice(l--,1);else{n.splice(o--,1);continue e}}}n.length>12&&n.splice(12,n.length-12)}this.minStackPos=n[0].pos;for(let o=1;o ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let f=this.fragments.nodeAt(r);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?s.getGoto(e.state,f.type.id):-1;if(d>-1&&f.length&&(!c||(f.prop(qe.contextHash)||0)==u))return e.useNode(f,d),En&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(f.type.id)})`),!0;if(!(f instanceof ri)||f.children.length==0||f.positions[0]>0)break;let h=f.children[0];if(h instanceof ri&&f.positions[0]==0)f=h;else break}}let a=s.stateSlot(e.state,4);if(a>0)return e.reduce(a),En&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;cr?t.push(p):n.push(p)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return rP(e,t),!0}}runRecovery(e,t,n){let r=null,s=!1;for(let o=0;o ":"";if(a.deadEnd&&(s||(s=!0,a.restart(),En&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))))continue;let f=a.split(),d=u;for(let h=0;f.forceReduce()&&h<10&&(En&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,n));h++)En&&(d=this.stackID(f)+" -> ");for(let h of a.recoverByInsert(l))En&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,n);this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),En&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),rP(a,n)):(!r||r.scorei,uh=class{constructor(e){this.start=e.start,this.shift=e.shift||A1,this.reduce=e.reduce||A1,this.reuse=e.reuse||A1,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},fh=class i extends Ha{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let a=0;ae.topRules[a][1]),r=[];for(let a=0;a=0)s(u,l,a[c++]);else{let f=a[c+-u];for(let d=-u;d>0;d--)s(a[c++],l,f);c++}}}this.nodeSet=new zc(t.map((a,l)=>zi.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:r[l],top:n.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=1024;let o=Kc(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;atypeof a=="number"?new io(o,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new j1(this,e,t,n);for(let s of this.wrappers)r=s(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let s=r[t+1];;){let o=r[s++],a=o&1,l=r[s++];if(a&&n)return l;for(let c=s+(o>>1);s0}validAction(e,t){return!!this.allActions(e,n=>n==t?!0:null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let s=this.stateSlot(e,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=ys(this.data,s+2);else break;r=t(ys(this.data,s+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=ys(this.data,n+2);else break;if(!(this.data[n+2]&1)){let r=this.data[n+1];t.some((s,o)=>o&1&&s==r)||t.push(this.data[n],r)}}return t}configure(e){let t=Object.assign(Object.create(i.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(n=>{let r=e.tokenizers.find(s=>s.from==n);return r?r.to:n})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,r)=>{let s=e.specializers.find(a=>a.from==n.external);if(!s)return n;let o=Object.assign(Object.assign({},n),{external:s.to});return t.specializers[r]=sP(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let s of e.split(" ")){let o=t.indexOf(s);o>=0&&(n[o]=!0)}let r=null;for(let s=0;sn)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scorei.external(t,n)<<1|e}return i.get}var AI=310,aP=1,DI=2,QI=3,RI=311,MI=313,II=314,NI=4,jI=5,ZI=0,q1=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],lP=125,zI=59,L1=47,qI=42,LI=43,$I=45,FI=60,BI=44,VI=new uh({start:!1,shift(i,e){return e==NI||e==jI||e==MI?i:e==II},strict:!1}),WI=new Ho((i,e)=>{let{next:t}=i;(t==lP||t==-1||e.context)&&i.acceptToken(RI)},{contextual:!0,fallback:!0}),XI=new Ho((i,e)=>{let{next:t}=i,n;q1.indexOf(t)>-1||t==L1&&((n=i.peek(1))==L1||n==qI)||t!=lP&&t!=zI&&t!=-1&&!e.context&&i.acceptToken(AI)},{contextual:!0}),UI=new Ho((i,e)=>{let{next:t}=i;if((t==LI||t==$I)&&(i.advance(),t==i.next)){i.advance();let n=!e.context&&e.canShift(aP);i.acceptToken(n?aP:DI)}},{contextual:!0});function z1(i,e){return i>=65&&i<=90||i>=97&&i<=122||i==95||i>=192||!e&&i>=48&&i<=57}var YI=new Ho((i,e)=>{if(i.next!=FI||!e.dialectEnabled(ZI)||(i.advance(),i.next==L1))return;let t=0;for(;q1.indexOf(i.next)>-1;)i.advance(),t++;if(z1(i.next,!0)){for(i.advance(),t++;z1(i.next,!1);)i.advance(),t++;for(;q1.indexOf(i.next)>-1;)i.advance(),t++;if(i.next==BI)return;for(let n=0;;n++){if(n==7){if(!z1(i.next,!0))return;break}if(i.next!="extends".charCodeAt(n))break;i.advance(),t++}}i.acceptToken(QI,-t)}),HI=Hd({"get set async static":L.modifier,"for while do if else switch try catch finally return throw break continue default case":L.controlKeyword,"in of await yield void typeof delete instanceof":L.operatorKeyword,"let var const using function class extends":L.definitionKeyword,"import export from":L.moduleKeyword,"with debugger as new":L.keyword,TemplateString:L.special(L.string),super:L.atom,BooleanLiteral:L.bool,this:L.self,null:L.null,Star:L.modifier,VariableName:L.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":L.function(L.variableName),VariableDefinition:L.definition(L.variableName),Label:L.labelName,PropertyName:L.propertyName,PrivatePropertyName:L.special(L.propertyName),"CallExpression/MemberExpression/PropertyName":L.function(L.propertyName),"FunctionDeclaration/VariableDefinition":L.function(L.definition(L.variableName)),"ClassDeclaration/VariableDefinition":L.definition(L.className),PropertyDefinition:L.definition(L.propertyName),PrivatePropertyDefinition:L.definition(L.special(L.propertyName)),UpdateOp:L.updateOperator,"LineComment Hashbang":L.lineComment,BlockComment:L.blockComment,Number:L.number,String:L.string,Escape:L.escape,ArithOp:L.arithmeticOperator,LogicOp:L.logicOperator,BitOp:L.bitwiseOperator,CompareOp:L.compareOperator,RegExp:L.regexp,Equals:L.definitionOperator,Arrow:L.function(L.punctuation),": Spread":L.punctuation,"( )":L.paren,"[ ]":L.squareBracket,"{ }":L.brace,"InterpolationStart InterpolationEnd":L.special(L.brace),".":L.derefOperator,", ;":L.separator,"@":L.meta,TypeName:L.typeName,TypeDefinition:L.definition(L.typeName),"type enum interface implements namespace module declare":L.definitionKeyword,"abstract global Privacy readonly override":L.modifier,"is keyof unique infer":L.operatorKeyword,JSXAttributeValue:L.attributeValue,JSXText:L.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":L.angleBracket,"JSXIdentifier JSXNameSpacedName":L.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":L.attributeName,"JSXBuiltin/JSXIdentifier":L.standard(L.tagName)}),GI={__proto__:null,export:18,as:23,from:31,default:34,async:39,function:40,extends:52,this:56,true:64,false:64,null:76,void:80,typeof:84,super:102,new:136,delete:154,yield:163,await:167,class:172,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:288,keyof:341,unique:345,infer:351,is:387,abstract:407,implements:409,type:411,let:414,var:416,using:419,interface:425,enum:429,namespace:435,module:437,declare:441,global:445,for:464,of:473,while:476,with:480,do:484,if:488,else:490,switch:494,case:500,try:506,catch:510,finally:514,return:518,throw:522,break:526,continue:530,debugger:534},KI={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:391},JI={__proto__:null,"<":145},cP=fh.deserialize({version:14,states:"$=dO%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ?NdO'#ChO+RO!bO'#CiO+aO#tO'#CiO+oO!0LbO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[Q^O'#DzO0fQ^O'#ESOOQ?Mr'#E['#E[O1PQWO'#EXOOQO'#Em'#EmOOQO'#If'#IfO1XQWO'#GnO1dQWO'#ElO1iQWO'#ElO3kQ?NdO'#JjO6[Q?NdO'#JkO6xQWO'#F[O6}Q&jO'#FrOOQ?Mr'#Fd'#FdO7YO,YO'#FdO7hQ7[O'#FyO9UQWO'#FxOOQ?Mr'#Jk'#JkOOQ?Mp'#Jj'#JjO9ZQWO'#GrOOQU'#KW'#KWO9fQWO'#ISO9kQ?MxO'#ITOOQU'#JX'#JXOOQU'#IX'#IXQ`Q^OOO`Q^OOO9sQMnO'#DsO9zQ^O'#EOO:RQ^O'#EQO9aQWO'#GnO:YQ7[O'#CnO:hQWO'#EkO:sQWO'#EvO:xQ7[O'#FcO;gQWO'#GnOOQO'#KX'#KXO;lQWO'#KXO;zQWO'#GvO;zQWO'#GwO;zQWO'#GyO9aQWO'#G|OYQWO'#CdO>jQWO'#H]O>rQWO'#HcO>rQWO'#HeO`Q^O'#HgO>rQWO'#HiO>rQWO'#HlO>wQWO'#HrO>|Q?MyO'#HxO%[Q^O'#HzO?XQ?MyO'#H|O?dQ?MyO'#IOO9kQ?MxO'#IQO?oQ?NdO'#ChO@qQ`O'#DiQOQWOOO%[Q^O'#EQOAXQWO'#ETO:YQ7[O'#EkOAdQWO'#EkOAoQpO'#FcOOQU'#Cf'#CfOOQ?Mp'#Dn'#DnOOQ?Mp'#Jn'#JnO%[Q^O'#JnOOQO'#Jr'#JrOOQO'#Ic'#IcOBoQ`O'#EdOOQ?Mp'#Ec'#EcOOQ?Mp'#Ju'#JuOCkQ?NQO'#EdOCuQ`O'#EWOOQO'#Jq'#JqODZQ`O'#JrOEhQ`O'#EWOCuQ`O'#EdPEuO#@ItO'#CaPOOO)CDv)CDvOOOO'#IY'#IYOFQO!bO,59TOOQ?Mr,59T,59TOOOO'#IZ'#IZOF`O#tO,59TO%[Q^O'#D`OOOO'#I]'#I]OFnO!0LbO,59xOOQ?Mr,59x,59xOF|Q^O'#I^OGaQWO'#JlOIcQrO'#JlO+}Q^O'#JlOIjQWO,5:OOJQQWO'#EmOJ_QWO'#J{OJjQWO'#JzOJjQWO'#JzOJrQWO,5;ZOJwQWO'#JyOOQ?Mv,5:Z,5:ZOKOQ^O,5:ZOMPQ?NdO,5:fOMpQWO,5:nONZQ?MxO'#JxONbQWO'#JwO9ZQWO'#JwONvQWO'#JwO! OQWO,5;YO! TQWO'#JwO!#]QrO'#JkOOQ?Mr'#Ch'#ChO%[Q^O'#ESO!#{QpO,5:sOOQO'#Js'#JsOOQO-EnOOQU'#Ja'#JaOOQU,5>o,5>oOOQU-EfQ?NdO,5:jO%[Q^O,5:jO!APQ?NdO,5:lOOQO,5@s,5@sO!ApQ7[O,5=YO!BOQ?MxO'#JbO9UQWO'#JbO!BaQ?MxO,59YO!BlQ`O,59YO!BtQ7[O,59YO:YQ7[O,59YO!CPQWO,5;WO!CXQWO'#H[O!CmQWO'#K]O%[Q^O,5;{O!9jQ`O,5;}O!CuQWO,5=uO!CzQWO,5=uO!DPQWO,5=uO9kQ?MxO,5=uO;zQWO,5=eOOQO'#Cu'#CuO!D_Q`O,5=bO!DgQ7[O,5=cO!DrQWO,5=eO!DwQpO,5=hO!EPQWO'#KXO>wQWO'#HRO9aQWO'#HTO!EUQWO'#HTO:YQ7[O'#HVO!EZQWO'#HVOOQU,5=k,5=kO!E`QWO'#HWO!EqQWO'#CnO!EvQWO,59OO!FQQWO,59OO!HVQ^O,59OOOQU,59O,59OO!HgQ?MxO,59OO%[Q^O,59OO!JrQ^O'#H_OOQU'#H`'#H`OOQU'#Ha'#HaO`Q^O,5=wO!KYQWO,5=wO`Q^O,5=}O`Q^O,5>PO!K_QWO,5>RO`Q^O,5>TO!KdQWO,5>WO!KiQ^O,5>^OOQU,5>d,5>dO%[Q^O,5>dO9kQ?MxO,5>fOOQU,5>h,5>hO# sQWO,5>hOOQU,5>j,5>jO# sQWO,5>jOOQU,5>l,5>lO#!aQ`O'#D[O%[Q^O'#JnO#!kQ`O'#JnO##YQ`O'#DjO##kQ`O'#DjO#%|Q^O'#DjO#&TQWO'#JmO#&]QWO,5:TO#&bQWO'#EqO#&pQWO'#J|O#&xQWO,5;[O#&}Q`O'#DjO#'[Q`O'#EVOOQ?Mr,5:o,5:oO%[Q^O,5:oO#'cQWO,5:oO>wQWO,5;VO!BlQ`O,5;VO!BtQ7[O,5;VO:YQ7[O,5;VO#'kQWO,5@YO#'pQ(CWO,5:sOOQO-ExO+}Q^O,5>xOOQO,5?O,5?OO#*xQ^O'#I^OOQO-E<[-E<[O#+VQWO,5@WO#+_QrO,5@WO#+fQWO,5@fOOQ?Mr1G/j1G/jO%[Q^O,5@gO#+nQWO'#IdOOQO-ErQWO1G3mO$5xQ^O1G3oO$9|Q^O'#HnOOQU1G3r1G3rO$:ZQWO'#HtO>wQWO'#HvOOQU1G3x1G3xO$:cQ^O1G3xO9kQ?MxO1G4OOOQU1G4Q1G4QOOQ?Mp'#GZ'#GZO9kQ?MxO1G4SO9kQ?MxO1G4UO$>jQWO,5@YO!*mQ^O,5;]O9ZQWO,5;]O>wQWO,5:UO!*mQ^O,5:UO!BlQ`O,5:UO$>oQ07bO,5:UOOQO,5;],5;]O$>yQ`O'#I_O$?aQWO,5@XOOQ?Mr1G/o1G/oO$?iQ`O'#IeO$?sQWO,5@hOOQ?Mp1G0v1G0vO##kQ`O,5:UOOQO'#Ib'#IbO$?{Q`O,5:qOOQ?Mv,5:q,5:qO#'fQWO1G0ZOOQ?Mr1G0Z1G0ZO%[Q^O1G0ZOOQ?Mr1G0q1G0qO>wQWO1G0qO!BlQ`O1G0qO!BtQ7[O1G0qOOQ?Mp1G5t1G5tO!BaQ?MxO1G0^OOQO1G0j1G0jO%[Q^O1G0jO$@SQ?MxO1G0jO$@_Q?MxO1G0jO!BlQ`O1G0^OCuQ`O1G0^O$@mQ?MxO1G0jOOQO1G0^1G0^O$ARQ?NdO1G0jPOOO-ExO$AoQWO1G5rO$AwQWO1G6QO$BPQrO1G6RO9ZQWO,5?OO$BZQ?NdO1G6OO%[Q^O1G6OO$BkQ?MxO1G6OO$B|QWO1G5}O$B|QWO1G5}O9ZQWO1G5}O$CUQWO,5?RO9ZQWO,5?ROOQO,5?R,5?RO$CjQWO,5?RO$*oQWO,5?ROOQO-EYOOQU,5>Y,5>YO%[Q^O'#HoO%;tQWO'#HqOOQU,5>`,5>`O9ZQWO,5>`OOQU,5>b,5>bOOQU7+)d7+)dOOQU7+)j7+)jOOQU7+)n7+)nOOQU7+)p7+)pO%;yQ`O1G5tO%<_Q07bO1G0wO%wQWO1G/pO!*mQ^O'#DjOOQO,5>y,5>yOOQO-E<]-E<]OOQO,5?P,5?POOQO-EwQWO7+&]O!BlQ`O7+&]OOQO7+%x7+%xO$ARQ?NdO7+&UOOQO7+&U7+&UO%[Q^O7+&UO%=OQ?MxO7+&UO!BaQ?MxO7+%xO!BlQ`O7+%xO%=ZQ?MxO7+&UO%=iQ?NdO7++jO%[Q^O7++jO%=yQWO7++iO%=yQWO7++iOOQO1G4m1G4mO9ZQWO1G4mO%>RQWO1G4mOOQO7+%}7+%}O#'fQWO<aQWO<iQWO<tQ?NdO,5?ZO%APQ?NdO,5?]O%C[Q?NdO1G2[O%EmQ?NdO1G2nO%GxQ?NdO1G2pO%JTQ7[O,5>zOOQO-E<^-E<^O%J_QrO,5>{O%[Q^O,5>{OOQO-E<_-E<_O%JiQWO1G5vOOQ?Mr<ZOOQU,5>],5>]O&wQWO7+%[OOQ?Mr<wQWO<wQWO7+)fO'*yQWO<PO#w$WO(q#}O(r$OO~P#>POP$^OZ$eOn$RO|#zO}#{O!P#|O!i$TO!j#xO!l#yO!p$^O#k$PO#l$QO#m$QO#n$QO#o$SO#p$TO#q$TO#r$dO#s$TO#u$UO#w$WO#y$YO(YVO(q#}O(r$OO~O`#ji!Y#ji#z#ji's#ji(j#ji'q#ji!V#ji!k#jir#ji![#ji%d#ji!d#ji~P#@wOP[XZ[Xn[X|[X}[X!P[X!i[X!j[X!l[X!p[X#][X#heX#k[X#l[X#m[X#n[X#o[X#p[X#q[X#r[X#s[X#u[X#w[X#y[X#z[X$P[X(Y[X(j[X(q[X(r[X!Y[X!Z[X~O#}[X~P#CbOP$^OZ;SOn:vO|#zO}#{O!P#|O!i:xO!j#xO!l#yO!p$^O#k:tO#l:uO#m:uO#n:uO#o:wO#p:xO#q:xO#r;RO#s:xO#u:yO#w:{O#y:}O#z;OO(YVO(j$[O(q#}O(r$OO~O#}.xO~P#EoO#];TO$P;TO#}(_X!Z(_X~P! cO`'^a!Y'^a's'^a'q'^a!k'^a!V'^ar'^a!['^a%d'^a!d'^a~P!:ROP#jiZ#ji`#jin#ji}#ji!Y#ji!i#ji!j#ji!l#ji!p#ji#k#ji#l#ji#m#ji#n#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji's#ji(Y#ji(j#ji'q#ji!V#ji!k#jir#ji![#ji%d#ji!d#ji~P#/OO`$Oi!Y$Oi's$Oi'q$Oi!V$Oi!k$Oir$Oi![$Oi%d$Oi!d$Oi~P!:RO$Z.}O$].}O~O$Z/OO$]/OO~O!d)eO#]/PO![$aX$X$aX$Z$aX$]$aX$d$aX~O!X/QO~O![)hO$X/SO$Z)gO$])gO$d/TO~O!Y;PO!Z(^X~P#EoO!Z/UO~O!d)eO$d(sX~O$d/WO~Ot)wO(Z)xO([/ZO~O!V/_O~P!&kO(q%OOj%[a|%[a!P%[a(r%[a!Y%[a#]%[a~Of%[a#}%[a~P#NPO(r%QOj%^a|%^a!P%^a(q%^a!Y%^a#]%^a~Of%^a#}%^a~P#NrO!YeX!deX!keX!k$vX(jeX~P!/{O!X/hO!Y(YO'|/gO!V(nP!V(xP~P!1sOn*pO!_*nO!`*gO!a*gO!l*_O#X*oO%Z*jO'}!lO~Oo'XO!P/iO!X+VO!Z*mO(OTO(RUO(];cO!Z(pP~P$!]O!k/jO~P#/OO!Y/kO!d#vO(j'mO!k(wX~O!k/pO~O!P%fO!X*[O![%gO'|%eO!k(wP~O#h/rO~O!V$vX!Y$vX!d$}X~P!/{O!Y/sO!V(xX~P#/OO!d/uO~O!V/wO~Og%WOn/{O!d#vO!l%cO(j'mO~O'|/}O~O!d+eO~O`%lO!Y0RO's%lO~O!Z0TO~P!5gO!`0UO!a0UO'}!lO(]!mO~O!P0WO(]!mO~O#X0XO~Of%[a!Y%[a#]%[a#}%[a~P!1UOf%^a!Y%^a#]%^a#}%^a~P!1UO'|&WOf'gX!Y'gX~O!Y*vOf(Va~Of0bO~O|0cO}0cO!P0dOjya(qya(rya!Yya#]ya~Ofya#}ya~P$(OO|)|O!P)}Oj$oa(q$oa(r$oa!Y$oa#]$oa~Of$oa#}$oa~P$(tO|)|O!P)}Oj$qa(q$qa(r$qa!Y$qa#]$qa~Of$qa#}$qa~P$)gO#h0fO~Of%Pa!Y%Pa#]%Pa#}%Pa~P!1UO!d#vO~O#h0iO~O!Y+XO`(|a's(|a~O|#zO}#{O!P#|O!j#xO!l#yO(YVOP!riZ!rin!ri!Y!ri!i!ri!p!ri#k!ri#l!ri#m!ri#n!ri#o!ri#p!ri#q!ri#r!ri#s!ri#u!ri#w!ri#y!ri#z!ri(j!ri(q!ri(r!ri~O`!ri's!ri'q!ri!V!ri!k!rir!ri![!ri%d!ri!d!ri~P$+UOg%WOn$uOo$tOp$tOv%YOx%ZOz;YO!P$|O![$}O!fX#>_#>e#>s#?Y#@w#AV#A^#Br#CQ#Dl#Dz#EQ#EW#E^#Eh#En#Et#FO#Fb#FhPPPPPPPPPP#FnPPPPPPP#Gc#Jj#Ky#LQ#LYPPPP$#`$&W$,p$,s$,v$-c$-f$-i$-p$-xP$.OP$.l$.p$/h$0v$0{$1cPP$1h$1n$1rP$1u$1y$1}$2s$3[$3s$3w$3z$3}$4T$4W$4[$4`R!|RoqOXst!Z#d%k&o&q&r&t,m,r2P2SY!vQ']-_1d5fQ%rvQ%zyQ&R|Q&g!VS'T!e-VQ'c!iS'i!r!yU*g$}*X*lQ+k%{Q+x&TQ,^&aQ-]'[Q-g'dQ-o'jQ0U*nQ1n,_R;b:o%QdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#y#|$P$Q$R$S$T$U$V$W$X$Y$Z$b$f%k%r&P&h&k&o&q&r&t&x'Q'_'o(P(R(X(`(t(x(|){+S+W,j,m,r-c-k-y.P.q.x/i0d0i0y1g1w1x1z1|2P2S2U2u2{3c5c5m5}6O6R6f8P8U8e8oS#q]:l!r)^$]$n'U)p-O-R/Q2e3x5a6]9`9q:k:n:o:r:s:t:u:v:w:x:y:z:{:|:};O;P;T;b;d;e;g;o;p;y;z < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:373,context:VI,nodeProps:[["isolate",-8,4,5,13,33,35,48,50,52,""],["group",-26,8,16,18,65,202,206,210,211,213,216,219,229,231,237,239,241,243,246,252,258,260,262,264,266,268,269,"Statement",-33,12,13,28,31,32,38,48,51,52,54,59,67,69,76,80,82,84,85,107,108,117,118,135,138,140,141,142,143,145,146,165,166,168,"Expression",-23,27,29,33,37,39,41,169,171,173,174,176,177,178,180,181,182,184,185,186,196,198,200,201,"Type",-3,88,100,106,"ClassItem"],["openedBy",22,"<",34,"InterpolationStart",53,"[",57,"{",73,"(",158,"JSXStartCloseTag"],["closedBy",23,">",36,"InterpolationEnd",47,"]",58,"}",74,")",163,"JSXEndTag"]],propSources:[HI],skippedNodes:[0,4,5,272],repeatNodeCount:37,tokenData:"$HR07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$.S!c!}Er!}#O$/^#O#P$0h#P#Q$6P#Q#R$7Z#R#SEr#S#T$8h#T#o$9r#o#p$>S#p#q$>x#q#r$@Y#r#s$Af#s$f%Z$f$g+g$g#BYEr#BY#BZ$Bp#BZ$ISEr$IS$I_$Bp$I_$I|Er$I|$I}$E{$I}$JO$E{$JO$JTEr$JT$JU$Bp$JU$KVEr$KV$KW$Bp$KW&FUEr&FU&FV$Bp&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$Bp?HUOEr(n%d_$g&j(Pp(S!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$g&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$g&j(S!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(S!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$g&j(PpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(PpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Pp(S!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$g&j(Pp(S!b'u0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(Q#S$g&j'v0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$g&j(Pp(S!b'v0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$g&j!p),Q(Pp(S!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$g&j(Pp(S!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$g&j(Pp(S!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(O':f$g&j(S!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$g&j(S!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$g&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$b`$g&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$b``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$b`$g&j(S!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(S!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$b`(S!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$g&j(Pp(S!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXVS$g&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSVSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWVS(S!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]VS$g&j(PpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWVS(PpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYVS(Pp(S!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$g&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$g&j(S!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(S!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(S!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(S!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$g&j(S!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$g&j(Pp(S!bo'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$g&j(Pp(S!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$g&j(Pp(S!bo'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$g&j(Pp(S!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$g&j(Pp(S!bo'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$g&j(Pp(S!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$g&j(Pp(S!bo'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$g&j#})Lv(Pp(S!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_`l$g&j(Pp(S!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^g#)`!i-PP;=`<%l$9r#Jf$>]X![#Hb(Pp(S!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g,#x$?Ta(q+JY$g&j(Pp(S!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p#q$,u#q;'S%Z;'S;=`+a<%lO%Z(Kd$@g_!Z(Cdr`$g&j(Pp(S!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$Aq_!q7`$g&j(Pp(S!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$CR|$g&j(Pp(S!b'u0/l$Z#t'|,2j(]$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$Bp#BZ$ISEr$IS$I_$Bp$I_$JTEr$JT$JU$Bp$JU$KVEr$KV$KW$Bp$KW&FUEr&FU&FV$Bp&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$Bp?HUOEr07[$F^k$g&j(Pp(S!b'v0/l$Z#t'|,2j(]$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[XI,UI,YI,2,3,4,5,6,7,8,9,10,11,12,13,14,WI,new nl("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOt~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO([~~",141,333),new nl("j~RQYZXz{^~^O'y~~aP!P!Qd~iO'z~~",25,316)],topRules:{Script:[0,6],SingleExpression:[1,270],SingleClassItem:[2,271]},dialects:{jsx:0,ts:14840},dynamicPrecedences:{70:1,80:1,82:1,166:1,194:1},specialized:[{term:320,get:i=>GI[i]||-1},{term:335,get:i=>KI[i]||-1},{term:71,get:i=>JI[i]||-1}],tokenPrec:14864});var hh=class{constructor(e,t,n){this.state=e,this.pos=t,this.explicit=n,this.abortListeners=[]}tokenBefore(e){let t=Oi(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),s=r.search(OP(e,!1));return s<0?null:{from:n+s,to:this.pos,text:r.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,t){e=="abort"&&this.abortListeners&&this.abortListeners.push(t)}};function uP(i){let e=Object.keys(i).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function eN(i){let e=Object.create(null),t=Object.create(null);for(let{label:r}of i){e[r[0]]=!0;for(let s=1;stypeof r=="string"?{label:r}:r),[t,n]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:eN(e);return r=>{let s=r.matchBefore(n);return s||r.explicit?{from:s?s.from:r.pos,options:e,validFor:t}:null}}var ph=class{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}};function no(i){return i.selection.main.from}function OP(i,e){var t;let{source:n}=i,r=e&&n[0]!="^",s=n[n.length-1]!="$";return!r&&!s?i:new RegExp(`${r?"^":""}(?:${n})${s?"$":""}`,(t=i.flags)!==null&&t!==void 0?t:i.ignoreCase?"i":"")}var vP=pn.define();function iN(i,e,t,n){let{main:r}=i.selection,s=t-r.from,o=n-r.from;return Object.assign(Object.assign({},i.changeByRange(a=>a!=r&&t!=n&&i.sliceDoc(a.from+s,a.from+o)!=i.sliceDoc(t,n)?{range:a}:{changes:{from:a.from+s,to:n==r.from?a.to:a.from+o,insert:e},range:le.cursor(a.from+s+e.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}var fP=new WeakMap;function nN(i){if(!Array.isArray(i))return i;let e=fP.get(i);return e||fP.set(i,e=tN(i)),e}var mh=Ze.define(),Jc=Ze.define(),B1=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&k<=57||k>=97&&k<=122?2:k>=65&&k<=90?1:0:(_=hc(k))!=_.toLowerCase()?1:_!=_.toUpperCase()?2:0;(!w||P==1&&g||C==0&&P!=0)&&(t[f]==k||n[f]==k&&(d=!0)?o[f++]=w:o.length&&(O=!1)),C=P,w+=xn(k)}return f==l&&o[0]==0&&O?this.result(-100+(d?-200:0),o,e):h==l&&p==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):h==l?this.ret(-900-e.length,[p,m]):f==l?this.result(-100+(d?-200:0)+-700+(O?0:-1100),o,e):t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,n){let r=[],s=0;for(let o of t){let a=o+(this.astral?xn(Zi(n,o)):1);s&&r[s-1]==o?r[s-1]=a:(r[s++]=o,r[s++]=a)}return this.ret(e-n.length,r)}},V1=class{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:rN,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>dP(e(n),t(n)),optionClass:(e,t)=>n=>dP(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function dP(i,e){return i?e?i+" "+e:i:e}function rN(i,e,t,n,r,s){let o=i.textDirection==Ct.RTL,a=o,l=!1,c="top",u,f,d=e.left-r.left,h=r.right-e.right,p=n.right-n.left,m=n.bottom-n.top;if(a&&d=m||w>e.top?u=t.bottom-e.top:(c="bottom",u=e.bottom-t.top)}let g=(e.bottom-e.top)/s.offsetHeight,O=(e.right-e.left)/s.offsetWidth;return{style:`${c}: ${u/g}px; max-width: ${f/O}px`,class:"cm-completionInfo-"+(l?o?"left-narrow":"right-narrow":a?"left":"right")}}function sN(i){let e=i.addToOptions.slice();return i.icons&&e.push({render(t){let n=document.createElement("div");return n.classList.add("cm-completionIcon"),t.type&&n.classList.add(...t.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),n.setAttribute("aria-hidden","true"),n},position:20}),e.push({render(t,n,r,s){let o=document.createElement("span");o.className="cm-completionLabel";let a=t.displayLabel||t.label,l=0;for(let c=0;cl&&o.appendChild(document.createTextNode(a.slice(l,u)));let d=o.appendChild(document.createElement("span"));d.appendChild(document.createTextNode(a.slice(u,f))),d.className="cm-completionMatchedText",l=f}return lt.position-n.position).map(t=>t.render)}function $1(i,e,t){if(i<=t)return{from:0,to:i};if(e<0&&(e=0),e<=i>>1){let r=Math.floor(e/t);return{from:r*t,to:(r+1)*t}}let n=Math.floor((i-e)/t);return{from:i-(n+1)*t,to:i-n*t}}var W1=class{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let r=e.state.field(t),{options:s,selected:o}=r.open,a=e.state.facet(Ai);this.optionContent=sN(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=$1(s.length,o,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:c}=e.state.field(t).open;for(let u=l.target,f;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(f=/-(\d+)$/.exec(u.id))&&+f[1]{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(Ai).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:Jc.of(null)})}),this.showOptions(s,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=r){let{options:s,selected:o,disabled:a}=n.open;(!r.open||r.open.options!=s)&&(this.range=$1(s.length,o,e.state.facet(Ai).maxRenderedOptions),this.showOptions(s,n.id)),this.updateSel(),a!=((t=r.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let n of t.split(" "))n&&this.dom.classList.add(n);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=$1(t.options.length,t.selected,this.view.state.facet(Ai).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:n}=t.options[t.selected],{info:r}=n;if(!r)return;let s=typeof r=="string"?document.createTextNode(r):r(n);if(!s)return;"then"in s?s.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,n)}).catch(o=>Ti(this.view.state,o,"completion info")):this.addInfoPane(s,n)}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:s}=e;n.appendChild(r),this.infoDestroy=s||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)n.nodeName!="LI"||!n.id?r--:r==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected");return t&&aN(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),s=this.space;if(!s){let o=this.dom.ownerDocument.defaultView||window;s={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}return r.top>Math.min(s.bottom,t.bottom)-10||r.bottomn.from||n.from==0))if(s=d,typeof c!="string"&&c.header)r.appendChild(c.header(c));else{let h=r.appendChild(document.createElement("completion-section"));h.textContent=d}}let u=r.appendChild(document.createElement("li"));u.id=t+"-"+o,u.setAttribute("role","option");let f=this.optionClass(a);f&&(u.className=f);for(let d of this.optionContent){let h=d(a,this.view.state,this.view,l);h&&u.appendChild(h)}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.tonew W1(t,i,e)}function aN(i,e){let t=i.getBoundingClientRect(),n=e.getBoundingClientRect(),r=t.height/i.offsetHeight;n.topt.bottom&&(i.scrollTop+=(n.bottom-t.bottom)/r)}function hP(i){return(i.boost||0)*100+(i.apply?10:0)+(i.info?5:0)+(i.type?1:0)}function lN(i,e){let t=[],n=null,r=c=>{t.push(c);let{section:u}=c.completion;if(u){n||(n=[]);let f=typeof u=="string"?u:u.name;n.some(d=>d.name==f)||n.push(typeof u=="string"?{name:f}:u)}},s=e.facet(Ai);for(let c of i)if(c.hasResult()){let u=c.result.getMatch;if(c.result.filter===!1)for(let f of c.result.options)r(new ph(f,c.source,u?u(f):[],1e9-t.length));else{let f=e.sliceDoc(c.from,c.to),d,h=s.filterStrict?new V1(f):new B1(f);for(let p of c.result.options)if(d=h.match(p.label)){let m=p.displayLabel?u?u(p,d.matched):[]:d.matched;r(new ph(p,c.source,m,d.score+(p.boost||0)))}}}if(n){let c=Object.create(null),u=0,f=(d,h)=>{var p,m;return((p=d.rank)!==null&&p!==void 0?p:1e9)-((m=h.rank)!==null&&m!==void 0?m:1e9)||(d.namef.score-u.score||l(u.completion,f.completion))){let u=c.completion;!a||a.label!=u.label||a.detail!=u.detail||a.type!=null&&u.type!=null&&a.type!=u.type||a.apply!=u.apply||a.boost!=u.boost?o.push(c):hP(c.completion)>hP(a)&&(o[o.length-1]=c),a=c.completion}return o}var X1=class i{constructor(e,t,n,r,s,o){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=s,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new i(this.options,pP(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,r,s){let o=lN(e,t);if(!o.length)return r&&e.some(l=>l.state==1)?new i(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let a=t.facet(Ai).selectOnOpen?0:-1;if(r&&r.selected!=a&&r.selected!=-1){let l=r.options[r.selected].completion;for(let c=0;cc.hasResult()?Math.min(l,c.from):l,1e8),create:hN,above:s.aboveCursor},r?r.timestamp:Date.now(),a,!1)}map(e){return new i(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}},U1=class i{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new i(fN,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,n=t.facet(Ai),s=(n.override||t.languageDataAt("autocomplete",no(t)).map(nN)).map(a=>(this.active.find(c=>c.source==a)||new Gr(a,this.active.some(c=>c.state!=0)?1:0)).update(e,n));s.length==this.active.length&&s.every((a,l)=>a==this.active[l])&&(s=this.active);let o=this.open;o&&e.docChanged&&(o=o.map(e.changes)),e.selection||s.some(a=>a.hasResult()&&e.changes.touchesRange(a.from,a.to))||!cN(s,this.active)?o=X1.build(s,t,this.id,o,n):o&&o.disabled&&!s.some(a=>a.state==1)&&(o=null),!o&&s.every(a=>a.state!=1)&&s.some(a=>a.hasResult())&&(s=s.map(a=>a.hasResult()?new Gr(a.source,0):a));for(let a of e.effects)a.is(bP)&&(o=o&&o.setSelected(a.value,this.id));return s==this.active&&o==this.open?this:new i(s,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:uN}};function cN(i,e){if(i==e)return!0;for(let t=0,n=0;;){for(;t-1&&(t["aria-activedescendant"]=i+"-"+e),t}var fN=[];function Y1(i,e){if(i.isUserEvent("input.complete")){let t=i.annotation(vP);if(t&&e.activateOnCompletion(t))return"input"}return i.isUserEvent("input.type")?"input":i.isUserEvent("delete.backward")?"delete":null}var Gr=class i{constructor(e,t,n=-1){this.source=e,this.state=t,this.explicitPos=n}hasResult(){return!1}update(e,t){let n=Y1(e,t),r=this;n?r=r.handleUserEvent(e,n,t):e.docChanged?r=r.handleChange(e):e.selection&&r.state!=0&&(r=new i(r.source,0));for(let s of e.effects)if(s.is(mh))r=new i(r.source,1,s.value?no(e.state):-1);else if(s.is(Jc))r=new i(r.source,0);else if(s.is(yP))for(let o of s.value)o.source==r.source&&(r=o);return r}handleUserEvent(e,t,n){return t=="delete"||!n.activateOnTyping?this.map(e.changes):new i(this.source,1)}handleChange(e){return e.changes.touchesRange(no(e.startState))?new i(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new i(this.source,this.state,e.mapPos(this.explicitPos))}},gh=class i extends Gr{constructor(e,t,n,r,s){super(e,2,t),this.result=n,this.from=r,this.to=s}hasResult(){return!0}handleUserEvent(e,t,n){var r;let s=this.result;s.map&&!e.changes.empty&&(s=s.map(s,e.changes));let o=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),l=no(e.state);if((this.explicitPos<0?l<=o:la||!s||t=="delete"&&no(e.startState)==this.from)return new Gr(this.source,t=="input"&&n.activateOnTyping?1:0);let c=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return dN(s.validFor,e.state,o,a)?new i(this.source,c,s,o,a):s.update&&(s=s.update(s,o,a,new hh(e.state,l,c>=0)))?new i(this.source,c,s,s.from,(r=s.to)!==null&&r!==void 0?r:no(e.state)):new Gr(this.source,1,c)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new Gr(this.source,0):this.map(e.changes)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new i(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Gr(this.source,0)}};function dN(i,e,t,n){if(!i)return!1;let r=e.sliceDoc(t,n);return typeof i=="function"?i(r,t,n,e):OP(i,!0).test(r)}var yP=Ze.define({map(i,e){return i.map(t=>t.map(e))}}),bP=Ze.define(),gn=Xt.define({create(){return U1.start()},update(i,e){return i.update(e)},provide:i=>[jc.from(i,e=>e.tooltip),_e.contentAttributes.from(i,e=>e.attrs)]});function G1(i,e){let t=e.completion.apply||e.completion.label,n=i.state.field(gn).active.find(r=>r.source==e.source);return n instanceof gh?(typeof t=="string"?i.dispatch(Object.assign(Object.assign({},iN(i.state,t,n.from,n.to)),{annotations:vP.of(e.completion)})):t(i,e.completion,n.from,n.to),!0):!1}var hN=oN(gn,G1);function dh(i,e="option"){return t=>{let n=t.state.field(gn,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp-1?n.open.selected+r*(i?1:-1):i?0:o-1;return a<0?a=e=="page"?0:o-1:a>=o&&(a=e=="page"?o-1:0),t.dispatch({effects:bP.of(a)}),!0}}var pN=i=>{let e=i.state.field(gn,!1);return i.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampi.state.field(gn,!1)?(i.dispatch({effects:mh.of(!0)}),!0):!1,gN=i=>{let e=i.state.field(gn,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(i.dispatch({effects:Jc.of(null)}),!0)},H1=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},ON=50,vN=1e3,yN=di.fromClass(class{constructor(i){this.view=i,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of i.state.field(gn).active)e.state==1&&this.startQuery(e)}update(i){let e=i.state.field(gn),t=i.state.facet(Ai);if(!i.selectionSet&&!i.docChanged&&i.startState.field(gn)==e)return;let n=i.transactions.some(s=>(s.selection||s.docChanged)&&!Y1(s,t));for(let s=0;sON&&Date.now()-o.time>vN){for(let a of o.context.abortListeners)try{a()}catch(l){Ti(this.view.state,l)}o.context.abortListeners=null,this.running.splice(s--,1)}else o.updates.push(...i.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),i.transactions.some(s=>s.effects.some(o=>o.is(mh)))&&(this.pendingStart=!0);let r=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.state==1&&!this.running.some(o=>o.active.source==s.source))?setTimeout(()=>this.startUpdate(),r):-1,this.composing!=0)for(let s of i.transactions)Y1(s,t)=="input"?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:i}=this.view,e=i.field(gn);for(let t of e.active)t.state==1&&!this.running.some(n=>n.active.source==t.source)&&this.startQuery(t)}startQuery(i){let{state:e}=this.view,t=no(e),n=new hh(e,t,i.explicitPos==t),r=new H1(i,n);this.running.push(r),Promise.resolve(i.source(n)).then(s=>{r.context.aborted||(r.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:Jc.of(null)}),Ti(this.view.state,s)})}scheduleAccept(){this.running.every(i=>i.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Ai).updateSyncTime))}accept(){var i;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(Ai);for(let n=0;no.source==r.active.source);if(s&&s.state==1)if(r.done==null){let o=new Gr(r.active.source,0);for(let a of r.updates)o=o.update(a,t);o.state!=1&&e.push(o)}else this.startQuery(s)}e.length&&this.view.dispatch({effects:yP.of(e)})}},{eventHandlers:{blur(i){let e=this.view.state.field(gn,!1);if(e&&e.tooltip&&this.view.state.facet(Ai).closeOnBlur){let t=e.open&&U0(this.view,e.open.tooltip);(!t||!t.dom.contains(i.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Jc.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:mh.of(!1)}),20),this.composing=0}}}),bN=typeof navigator=="object"&&/Win/.test(navigator.platform),_N=hr.highest(_e.domEventHandlers({keydown(i,e){let t=e.state.field(gn,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||i.key.length>1||i.ctrlKey&&!(bN&&i.altKey)||i.metaKey)return!1;let n=t.open.options[t.open.selected],r=t.active.find(o=>o.source==n.source),s=n.completion.commitCharacters||r.result.commitCharacters;return s&&s.indexOf(i.key)>-1&&G1(e,n),!1}})),wN=_e.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xB7\xB7\xB7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25CB'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25CC'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1D465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1D436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1D461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222A'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25A1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1F511}\uFE0E'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25A2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});var eu={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Go=Ze.define({map(i,e){let t=e.mapPos(i,-1,Ci.TrackAfter);return t??void 0}}),K1=new class extends dr{};K1.startSide=1;K1.endSide=-1;var _P=Xt.define({create(){return St.empty},update(i,e){if(i=i.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);i=i.update({filter:n=>n>=t.from&&n<=t.to})}for(let t of e.effects)t.is(Go)&&(i=i.update({add:[K1.range(t.value,t.value+1)]}));return i}});function wP(){return[SN,_P]}var F1="()[]{}<>";function kP(i){for(let e=0;e{if((kN?i.composing:i.compositionStarted)||i.state.readOnly)return!1;let r=i.state.selection.main;if(n.length>2||n.length==2&&xn(Zi(n,0))==1||e!=r.from||t!=r.to)return!1;let s=PN(i.state,n);return s?(i.dispatch(s),!0):!1}),xN=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let n=SP(i,i.selection.main.head).brackets||eu.brackets,r=null,s=i.changeByRange(o=>{if(o.empty){let a=CN(i.doc,o.head);for(let l of n)if(l==a&&Oh(i.doc,o.head)==kP(Zi(l,0)))return{changes:{from:o.head-l.length,to:o.head+l.length},range:le.cursor(o.head-l.length)}}return{range:r=o}});return r||e(i.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},xP=[{key:"Backspace",run:xN}];function PN(i,e){let t=SP(i,i.selection.main.head),n=t.brackets||eu.brackets;for(let r of n){let s=kP(Zi(r,0));if(e==r)return s==r?AN(i,r,n.indexOf(r+r+r)>-1,t):EN(i,r,s,t.before||eu.before);if(e==s&&PP(i,i.selection.main.from))return TN(i,r,s)}return null}function PP(i,e){let t=!1;return i.field(_P).between(0,i.doc.length,n=>{n==e&&(t=!0)}),t}function Oh(i,e){let t=i.sliceString(e,e+2);return t.slice(0,xn(Zi(t,0)))}function CN(i,e){let t=i.sliceString(e-2,e);return xn(Zi(t,0))==t.length?t:t.slice(1)}function EN(i,e,t,n){let r=null,s=i.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:Go.of(o.to+e.length),range:le.range(o.anchor+e.length,o.head+e.length)};let a=Oh(i.doc,o.head);return!a||/\s/.test(a)||n.indexOf(a)>-1?{changes:{insert:e+t,from:o.head},effects:Go.of(o.head+e.length),range:le.cursor(o.head+e.length)}:{range:r=o}});return r?null:i.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function TN(i,e,t){let n=null,r=i.changeByRange(s=>s.empty&&Oh(i.doc,s.head)==t?{changes:{from:s.head,to:s.head+t.length,insert:t},range:le.cursor(s.head+t.length)}:n={range:s});return n?null:i.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function AN(i,e,t,n){let r=n.stringPrefixes||eu.stringPrefixes,s=null,o=i.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:Go.of(a.to+e.length),range:le.range(a.anchor+e.length,a.head+e.length)};let l=a.head,c=Oh(i.doc,l),u;if(c==e){if(mP(i,l))return{changes:{insert:e+e,from:l},effects:Go.of(l+e.length),range:le.cursor(l+e.length)};if(PP(i,l)){let d=t&&i.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+d.length,insert:d},range:le.cursor(l+d.length)}}}else{if(t&&i.sliceDoc(l-2*e.length,l)==e+e&&(u=gP(i,l-2*e.length,r))>-1&&mP(i,u))return{changes:{insert:e+e+e+e,from:l},effects:Go.of(l+e.length),range:le.cursor(l+e.length)};if(i.charCategorizer(l)(c)!=Pt.Word&&gP(i,l,r)>-1&&!DN(i,l,e,r))return{changes:{insert:e+e,from:l},effects:Go.of(l+e.length),range:le.cursor(l+e.length)}}return{range:s=a}});return s?null:i.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function mP(i,e){let t=Oi(i).resolveInner(e+1);return t.parent&&t.from==e}function DN(i,e,t,n){let r=Oi(i).resolveInner(e,-1),s=n.reduce((o,a)=>Math.max(o,a.length),0);for(let o=0;o<5;o++){let a=i.sliceDoc(r.from,Math.min(r.to,r.from+t.length+s)),l=a.indexOf(t);if(!l||l>-1&&n.indexOf(a.slice(0,l))>-1){let u=r.firstChild;for(;u&&u.from==r.from&&u.to-u.from>t.length+l;){if(i.sliceDoc(u.to-t.length,u.to)==t)return!1;u=u.firstChild}return!0}let c=r.to==e&&r.parent;if(!c)break;r=c}return!1}function gP(i,e,t){let n=i.charCategorizer(e);if(n(i.sliceDoc(e-1,e))!=Pt.Word)return e;for(let r of t){let s=e-r.length;if(i.sliceDoc(s,e)==r&&n(i.sliceDoc(s-1,s))!=Pt.Word)return s}return-1}function CP(i={}){return[_N,gn,Ai.of(i),yN,QN,wN]}var J1=[{key:"Ctrl-Space",run:mN},{key:"Escape",run:gN},{key:"ArrowDown",run:dh(!0)},{key:"ArrowUp",run:dh(!1)},{key:"PageDown",run:dh(!0,"page")},{key:"PageUp",run:dh(!1,"page")},{key:"Enter",run:pN}],QN=hr.highest(Nc.computeN([Ai],i=>i.facet(Ai).defaultKeymap?[J1]:[]));var EP=Gd.define({name:"javascript",parser:cP.configure({props:[y1.add({IfStatement:th({except:/^\s*({|else\b)/}),TryStatement:th({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:KS,SwitchBody:i=>{let e=i.textAfter,t=/^\s*\}/.test(e),n=/^\s*(case|default)\b/.test(e);return i.baseIndent+(t?0:n?1:2)*i.unit},Block:HS({closing:"}"}),ArrowFunction:i=>i.baseIndent+i.unit,"TemplateString BlockComment":()=>null,"Statement Property":th({except:/^{/}),JSXElement(i){let e=/^\s*<\//.test(i.textAfter);return i.lineIndent(i.node.from)+(e?0:i.unit)},JSXEscape(i){let e=/\s*\}/.test(i.textAfter);return i.lineIndent(i.node.from)+(e?0:i.unit)},"JSXOpenTag JSXSelfClosingTag"(i){return i.column(i.node.from)+i.unit}}),b1.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":ex,BlockComment(i){return{from:i.from+2,to:i.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}});var fJ=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent);var TP=typeof String.prototype.normalize=="function"?i=>i.normalize("NFKD"):i=>i,so=class{constructor(e,t,n=0,r=e.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=s?a=>s(TP(a)):TP,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Zi(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=hc(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=xn(e);let r=this.normalize(t);for(let s=0,o=n;;s++){let a=r.charCodeAt(s),l=this.match(a,o,this.bufferPos+this.bufferStart);if(s==r.length-1){if(l)return this.value=l,this;break}o==n&&sthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=kh(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=n||r.to<=t){let a=new i(t,e.sliceString(t,n));return eO.set(e,a),a}if(r.from==t&&r.to==n)return r;let{text:s,from:o}=r;return o>t&&(s=e.sliceString(t,o)+s,o=t),r.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let n=this.flat.from+t.index,r=n+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this.matchPos=kh(this.text,r+(n==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=_h.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<"u"&&(bh.prototype[Symbol.iterator]=wh.prototype[Symbol.iterator]=function(){return this});function RN(i){try{return new RegExp(i,oO),!0}catch{return!1}}function kh(i,e){if(e>=i.length)return e;let t=i.lineAt(e),n;for(;e=56320&&n<57344;)e++;return e}function tO(i){let e=String(i.state.doc.lineAt(i.state.selection.main.head).number),t=wt("input",{class:"cm-textfield",name:"line",value:e}),n=wt("form",{class:"cm-gotoLine",onkeydown:s=>{s.keyCode==27?(s.preventDefault(),i.dispatch({effects:Sh.of(!1)}),i.focus()):s.keyCode==13&&(s.preventDefault(),r())},onsubmit:s=>{s.preventDefault(),r()}},wt("label",i.state.phrase("Go to line"),": ",t)," ",wt("button",{class:"cm-button",type:"submit"},i.state.phrase("go")));function r(){let s=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!s)return;let{state:o}=i,a=o.doc.lineAt(o.selection.main.head),[,l,c,u,f]=s,d=u?+u.slice(1):0,h=c?+c:a.number;if(c&&f){let g=h/100;l&&(g=g*(l=="-"?-1:1)+a.number/o.doc.lines),h=Math.round(o.doc.lines*g)}else c&&l&&(h=h*(l=="-"?-1:1)+a.number);let p=o.doc.line(Math.max(1,Math.min(o.doc.lines,h))),m=le.cursor(p.from+Math.max(0,Math.min(d,p.length)));i.dispatch({effects:[Sh.of(!1),_e.scrollIntoView(m.from,{y:"center"})],selection:m}),i.focus()}return{dom:n}}var Sh=Ze.define(),AP=Xt.define({create(){return!0},update(i,e){for(let t of e.effects)t.is(Sh)&&(i=t.value);return i},provide:i=>Fo.from(i,e=>e?tO:null)}),MN=i=>{let e=Bo(i,tO);if(!e){let t=[Sh.of(!0)];i.state.field(AP,!1)==null&&t.push(Ze.appendConfig.of([AP,IN])),i.dispatch({effects:t}),e=Bo(i,tO)}return e&&e.dom.querySelector("input").select(),!0},IN=_e.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),NN={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},MP=Ee.define({combine(i){return mn(i,NN,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function IP(i){let e=[LN,qN];return i&&e.push(MP.of(i)),e}var jN=Ne.mark({class:"cm-selectionMatch"}),ZN=Ne.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function DP(i,e,t,n){return(t==0||i(e.sliceDoc(t-1,t))!=Pt.Word)&&(n==e.doc.length||i(e.sliceDoc(n,n+1))!=Pt.Word)}function zN(i,e,t,n){return i(e.sliceDoc(t,t+1))==Pt.Word&&i(e.sliceDoc(n-1,n))==Pt.Word}var qN=di.fromClass(class{constructor(i){this.decorations=this.getDeco(i)}update(i){(i.selectionSet||i.docChanged||i.viewportChanged)&&(this.decorations=this.getDeco(i.view))}getDeco(i){let e=i.state.facet(MP),{state:t}=i,n=t.selection;if(n.ranges.length>1)return Ne.none;let r=n.main,s,o=null;if(r.empty){if(!e.highlightWordAroundCursor)return Ne.none;let l=t.wordAt(r.head);if(!l)return Ne.none;o=t.charCategorizer(r.head),s=t.sliceDoc(l.from,l.to)}else{let l=r.to-r.from;if(l200)return Ne.none;if(e.wholeWords){if(s=t.sliceDoc(r.from,r.to),o=t.charCategorizer(r.head),!(DP(o,t,r.from,r.to)&&zN(o,t,r.from,r.to)))return Ne.none}else if(s=t.sliceDoc(r.from,r.to),!s)return Ne.none}let a=[];for(let l of i.visibleRanges){let c=new so(t.doc,s,l.from,l.to);for(;!c.next().done;){let{from:u,to:f}=c.value;if((!o||DP(o,t,u,f))&&(r.empty&&u<=r.from&&f>=r.to?a.push(ZN.range(u,f)):(u>=r.to||f<=r.from)&&a.push(jN.range(u,f)),a.length>e.maxMatches))return Ne.none}}return Ne.set(a)}},{decorations:i=>i.decorations}),LN=_e.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),$N=({state:i,dispatch:e})=>{let{selection:t}=i,n=le.create(t.ranges.map(r=>i.wordAt(r.head)||le.cursor(r.head)),t.mainIndex);return n.eq(t)?!1:(e(i.update({selection:n})),!0)};function FN(i,e){let{main:t,ranges:n}=i.selection,r=i.wordAt(t.head),s=r&&r.from==t.from&&r.to==t.to;for(let o=!1,a=new so(i.doc,e,n[n.length-1].to);;)if(a.next(),a.done){if(o)return null;a=new so(i.doc,e,0,Math.max(0,n[n.length-1].from-1)),o=!0}else{if(o&&n.some(l=>l.from==a.value.from))continue;if(s){let l=i.wordAt(a.value.from);if(!l||l.from!=a.value.from||l.to!=a.value.to)continue}return a.value}}var BN=({state:i,dispatch:e})=>{let{ranges:t}=i.selection;if(t.some(s=>s.from===s.to))return $N({state:i,dispatch:e});let n=i.sliceDoc(t[0].from,t[0].to);if(i.selection.ranges.some(s=>i.sliceDoc(s.from,s.to)!=n))return!1;let r=FN(i,n);return r?(e(i.update({selection:i.selection.addRange(le.range(r.from,r.to),!1),effects:_e.scrollIntoView(r.to)})),!0):!1},ol=Ee.define({combine(i){return mn(i,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new sO(e),scrollToMatch:e=>_e.scrollIntoView(e)})}});var xh=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||RN(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,n)=>n=="n"?` +`:n=="r"?"\r":n=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new nO(this):new iO(this)}getCursor(e,t=0,n){let r=e.doc?e:At.create({doc:e});return n==null&&(n=r.doc.length),this.regexp?sl(this,r,t,n):rl(this,r,t,n)}},Ph=class{constructor(e){this.spec=e}};function rl(i,e,t,n){return new so(e.doc,i.unquoted,t,n,i.caseSensitive?void 0:r=>r.toLowerCase(),i.wholeWord?VN(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function VN(i,e){return(t,n,r,s)=>((s>t||s+r.length=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let s=rl(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}};function sl(i,e,t,n){return new bh(e.doc,i.search,{ignoreCase:!i.caseSensitive,test:i.wholeWord?WN(e.charCategorizer(e.selection.main.head)):void 0},t,n)}function Ch(i,e){return i.slice(ui(i,e,!1),e)}function Eh(i,e){return i.slice(e,ui(i,e))}function WN(i){return(e,t,n)=>!n[0].length||(i(Ch(n.input,n.index))!=Pt.Word||i(Eh(n.input,n.index))!=Pt.Word)&&(i(Eh(n.input,n.index+n[0].length))!=Pt.Word||i(Ch(n.input,n.index+n[0].length))!=Pt.Word)}var nO=class extends Ph{nextMatch(e,t,n){let r=sl(this.spec,e,n,e.doc.length).next();return r.done&&(r=sl(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let s=Math.max(t,n-r*1e4),o=sl(this.spec,e,s,n),a=null;for(;!o.next().done;)a=o.value;if(a&&(s==t||a.from>s+10))return a;if(s==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,n)=>n=="$"?"$":n=="&"?e.match[0]:n!="0"&&+n=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let s=sl(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}},iu=Ze.define(),aO=Ze.define(),ro=Xt.define({create(i){return new tu(rO(i).create(),null)},update(i,e){for(let t of e.effects)t.is(iu)?i=new tu(t.value.create(),i.panel):t.is(aO)&&(i=new tu(i.query,t.value?lO:null));return i},provide:i=>Fo.from(i,e=>e.panel)});var tu=class{constructor(e,t){this.query=e,this.panel=t}},XN=Ne.mark({class:"cm-searchMatch"}),UN=Ne.mark({class:"cm-searchMatch cm-searchMatch-selected"}),YN=di.fromClass(class{constructor(i){this.view=i,this.decorations=this.highlight(i.state.field(ro))}update(i){let e=i.state.field(ro);(e!=i.startState.field(ro)||i.docChanged||i.selectionSet||i.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:i,panel:e}){if(!e||!i.spec.valid)return Ne.none;let{view:t}=this,n=new Zr;for(let r=0,s=t.visibleRanges,o=s.length;rs[r+1].from-2*250;)l=s[++r].to;i.highlight(t.state,a,l,(c,u)=>{let f=t.state.selection.ranges.some(d=>d.from==c&&d.to==u);n.add(c,u,f?UN:XN)})}return n.finish()}},{decorations:i=>i.decorations});function nu(i){return e=>{let t=e.state.field(ro,!1);return t&&t.query.spec.valid?i(e,t):ZP(e)}}var Th=nu((i,{query:e})=>{let{to:t}=i.state.selection.main,n=e.nextMatch(i.state,t,t);if(!n)return!1;let r=le.single(n.from,n.to),s=i.state.facet(ol);return i.dispatch({selection:r,effects:[cO(i,n),s.scrollToMatch(r.main,i)],userEvent:"select.search"}),jP(i),!0}),Ah=nu((i,{query:e})=>{let{state:t}=i,{from:n}=t.selection.main,r=e.prevMatch(t,n,n);if(!r)return!1;let s=le.single(r.from,r.to),o=i.state.facet(ol);return i.dispatch({selection:s,effects:[cO(i,r),o.scrollToMatch(s.main,i)],userEvent:"select.search"}),jP(i),!0}),HN=nu((i,{query:e})=>{let t=e.matchAll(i.state,1e3);return!t||!t.length?!1:(i.dispatch({selection:le.create(t.map(n=>le.range(n.from,n.to))),userEvent:"select.search.matches"}),!0)}),GN=({state:i,dispatch:e})=>{let t=i.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:n,to:r}=t.main,s=[],o=0;for(let a=new so(i.doc,i.sliceDoc(n,r));!a.next().done;){if(s.length>1e3)return!1;a.value.from==n&&(o=s.length),s.push(le.range(a.value.from,a.value.to))}return e(i.update({selection:le.create(s,o),userEvent:"select.search.matches"})),!0},QP=nu((i,{query:e})=>{let{state:t}=i,{from:n,to:r}=t.selection.main;if(t.readOnly)return!1;let s=e.nextMatch(t,n,n);if(!s)return!1;let o=[],a,l,c=[];if(s.from==n&&s.to==r&&(l=t.toText(e.getReplacement(s)),o.push({from:s.from,to:s.to,insert:l}),s=e.nextMatch(t,s.from,s.to),c.push(_e.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(n).number)+"."))),s){let u=o.length==0||o[0].from>=s.to?0:s.to-s.from-l.length;a=le.single(s.from-u,s.to-u),c.push(cO(i,s)),c.push(t.facet(ol).scrollToMatch(a.main,i))}return i.dispatch({changes:o,selection:a,effects:c,userEvent:"input.replace"}),!0}),KN=nu((i,{query:e})=>{if(i.state.readOnly)return!1;let t=e.matchAll(i.state,1e9).map(r=>{let{from:s,to:o}=r;return{from:s,to:o,insert:e.getReplacement(r)}});if(!t.length)return!1;let n=i.state.phrase("replaced $ matches",t.length)+".";return i.dispatch({changes:t,effects:_e.announce.of(n),userEvent:"input.replace.all"}),!0});function lO(i){return i.state.facet(ol).createPanel(i)}function rO(i,e){var t,n,r,s,o;let a=i.selection.main,l=a.empty||a.to>a.from+100?"":i.sliceDoc(a.from,a.to);if(e&&!l)return e;let c=i.facet(ol);return new xh({search:((t=e?.literal)!==null&&t!==void 0?t:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(n=e?.caseSensitive)!==null&&n!==void 0?n:c.caseSensitive,literal:(r=e?.literal)!==null&&r!==void 0?r:c.literal,regexp:(s=e?.regexp)!==null&&s!==void 0?s:c.regexp,wholeWord:(o=e?.wholeWord)!==null&&o!==void 0?o:c.wholeWord})}function NP(i){let e=Bo(i,lO);return e&&e.dom.querySelector("[main-field]")}function jP(i){let e=NP(i);e&&e==i.root.activeElement&&e.select()}var ZP=i=>{let e=i.state.field(ro,!1);if(e&&e.panel){let t=NP(i);if(t&&t!=i.root.activeElement){let n=rO(i.state,e.query.spec);n.valid&&i.dispatch({effects:iu.of(n)}),t.focus(),t.select()}}else i.dispatch({effects:[aO.of(!0),e?iu.of(rO(i.state,e.query.spec)):Ze.appendConfig.of(e9)]});return!0},zP=i=>{let e=i.state.field(ro,!1);if(!e||!e.panel)return!1;let t=Bo(i,lO);return t&&t.dom.contains(i.root.activeElement)&&i.focus(),i.dispatch({effects:aO.of(!1)}),!0},qP=[{key:"Mod-f",run:ZP,scope:"editor search-panel"},{key:"F3",run:Th,shift:Ah,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Th,shift:Ah,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:zP,scope:"editor search-panel"},{key:"Mod-Shift-l",run:GN},{key:"Mod-Alt-g",run:MN},{key:"Mod-d",run:BN,preventDefault:!0}],sO=class{constructor(e){this.view=e;let t=this.query=e.state.field(ro).query.spec;this.commit=this.commit.bind(this),this.searchField=wt("input",{value:t.search,placeholder:Tn(e,"Find"),"aria-label":Tn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=wt("input",{value:t.replace,placeholder:Tn(e,"Replace"),"aria-label":Tn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=wt("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=wt("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=wt("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function n(r,s,o){return wt("button",{class:"cm-button",name:r,onclick:s,type:"button"},o)}this.dom=wt("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,n("next",()=>Th(e),[Tn(e,"next")]),n("prev",()=>Ah(e),[Tn(e,"previous")]),n("select",()=>HN(e),[Tn(e,"all")]),wt("label",null,[this.caseField,Tn(e,"match case")]),wt("label",null,[this.reField,Tn(e,"regexp")]),wt("label",null,[this.wordField,Tn(e,"by word")]),...e.state.readOnly?[]:[wt("br"),this.replaceField,n("replace",()=>QP(e),[Tn(e,"replace")]),n("replaceAll",()=>KN(e),[Tn(e,"replace all")])],wt("button",{name:"close",onclick:()=>zP(e),"aria-label":Tn(e,"close"),type:"button"},["\xD7"])])}commit(){let e=new xh({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:iu.of(e)}))}keydown(e){bS(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Ah:Th)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),QP(this.view))}update(e){for(let t of e.transactions)for(let n of t.effects)n.is(iu)&&!n.value.eq(this.query)&&this.setQuery(n.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(ol).top}};function Tn(i,e){return i.state.phrase(e)}var vh=30,yh=/[\s\.,:;?!]/;function cO(i,{from:e,to:t}){let n=i.state.doc.lineAt(e),r=i.state.doc.lineAt(t).to,s=Math.max(n.from,e-vh),o=Math.min(r,t+vh),a=i.state.sliceDoc(s,o);if(s!=n.from){for(let l=0;la.length-vh;l--)if(!yh.test(a[l-1])&&yh.test(a[l])){a=a.slice(0,l);break}}return _e.announce.of(`${i.state.phrase("current match")}. ${a} ${i.state.phrase("on line")} ${n.number}.`)}var JN=_e.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),e9=[ro,hr.low(YN),JN];var uO=class{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}},Ko=class i{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let r=e,s=n.facet(VP).markerFilter;s&&(r=s(r,n));let o=Ne.set(r.map(a=>a.from==a.to||a.from==a.to-1&&n.doc.lineAt(a.from).to==a.from?Ne.widget({widget:new fO(a),diagnostic:a}).range(a.from):Ne.mark({attributes:{class:"cm-lintRange cm-lintRange-"+a.severity+(a.markClass?" "+a.markClass:"")},diagnostic:a,inclusive:!0}).range(a.from,a.to)),!0);return new i(o,t,al(o))}};function al(i,e=null,t=0){let n=null;return i.between(t,1e9,(r,s,{spec:o})=>{if(!(e&&o.diagnostic!=e))return n=new uO(r,s,o.diagnostic),!1}),n}function t9(i,e){let t=i.startState.doc.lineAt(e.pos);return!!(i.effects.some(n=>n.is($P))||i.changes.touchesRange(t.from,t.to))}function i9(i,e){return i.field(An,!1)?e:e.concat(Ze.appendConfig.of(u9))}var $P=Ze.define(),dO=Ze.define(),FP=Ze.define(),An=Xt.define({create(){return new Ko(Ne.none,null,null)},update(i,e){if(e.docChanged){let t=i.diagnostics.map(e.changes),n=null;if(i.selected){let r=e.changes.mapPos(i.selected.from,1);n=al(t,i.selected.diagnostic,r)||al(t,null,r)}i=new Ko(t,i.panel,n)}for(let t of e.effects)t.is($P)?i=Ko.init(t.value,i.panel,e.state):t.is(dO)?i=new Ko(i.diagnostics,t.value?Rh.open:null,i.selected):t.is(FP)&&(i=new Ko(i.diagnostics,i.panel,t.value));return i},provide:i=>[Fo.from(i,e=>e.panel),_e.decorations.from(i,e=>e.diagnostics)]});var n9=Ne.mark({class:"cm-lintRange cm-lintRange-active",inclusive:!0});function r9(i,e,t){let{diagnostics:n}=i.state.field(An),r=[],s=2e8,o=0;n.between(e-(t<0?1:0),e+(t>0?1:0),(l,c,{spec:u})=>{e>=l&&e<=c&&(l==c||(e>l||t>0)&&(eXP(i,t,!1)))}var o9=i=>{let e=i.state.field(An,!1);(!e||!e.panel)&&i.dispatch({effects:i9(i.state,[dO.of(!0)])});let t=Bo(i,Rh.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},LP=i=>{let e=i.state.field(An,!1);return!e||!e.panel?!1:(i.dispatch({effects:dO.of(!1)}),!0)},a9=i=>{let e=i.state.field(An,!1);if(!e)return!1;let t=i.state.selection.main,n=e.diagnostics.iter(t.to+1);return!n.value&&(n=e.diagnostics.iter(0),!n.value||n.from==t.from&&n.to==t.to)?!1:(i.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0}),!0)};var BP=[{key:"Mod-Shift-m",run:o9,preventDefault:!0},{key:"F8",run:a9}];var VP=Ee.define({combine(i){return Object.assign({sources:i.map(e=>e.source).filter(e=>e!=null)},mn(i.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))}});function WP(i){let e=[];if(i)e:for(let{name:t}of i){for(let n=0;ns.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function XP(i,e,t){var n;let r=t?WP(e.actions):[];return wt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},wt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),(n=e.actions)===null||n===void 0?void 0:n.map((s,o)=>{let a=!1,l=d=>{if(d.preventDefault(),a)return;a=!0;let h=al(i.state.field(An).diagnostics,e);h&&s.apply(i,h.from,h.to)},{name:c}=s,u=r[o]?c.indexOf(r[o]):-1,f=u<0?c:[c.slice(0,u),wt("u",c.slice(u,u+1)),c.slice(u+1)];return wt("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${c}${u<0?"":` (access key "${r[o]})"`}.`},f)}),e.source&&wt("div",{class:"cm-diagnosticSource"},e.source))}var fO=class extends pr{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return wt("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}},Qh=class{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=XP(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}},Rh=class i{constructor(e){this.view=e,this.items=[];let t=r=>{if(r.keyCode==27)LP(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],o=WP(s.actions);for(let a=0;a{for(let s=0;sLP(this.view)},"\xD7")),this.update()}get selectedIndex(){let e=this.view.state.field(An).selected;if(!e)return-1;for(let t=0;t{let c=-1,u;for(let f=n;fn&&(this.items.splice(n,c-n),r=!0)),t&&u.diagnostic==t.diagnostic?u.dom.hasAttribute("aria-selected")||(u.dom.setAttribute("aria-selected","true"),s=u):u.dom.hasAttribute("aria-selected")&&u.dom.removeAttribute("aria-selected"),n++});n({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:o,panel:a})=>{let l=a.height/this.list.offsetHeight;o.topa.bottom&&(this.list.scrollTop+=(o.bottom-a.bottom)/l)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let n=e;e=n.nextSibling,n.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(An),n=al(t.diagnostics,this.items[e].diagnostic);n&&this.view.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0,effects:FP.of(n)})}static open(e){return new i(e)}};function l9(i,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(i)}')`}function Dh(i){return l9(``,'width="6" height="3"')}var c9=_e.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Dh("#d11")},".cm-lintRange-warning":{backgroundImage:Dh("orange")},".cm-lintRange-info":{backgroundImage:Dh("#999")},".cm-lintRange-hint":{backgroundImage:Dh("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});var u9=[An,_e.decorations.compute([An],i=>{let{selected:e,panel:t}=i.field(An);return!e||!t||e.from==e.to?Ne.none:Ne.set([n9.range(e.from,e.to)])}),TS(r9,{hideOn:t9}),c9];var Mh=[EP,lx(),SS(),CS(),JS(),el(ux,{fallback:!0}),_e.lineWrapping,px(),wP(),CP(),ES(),IP(),Nc.of([...xP,...Jx,...qP,...Px,eP,...sx,...J1,...BP])].filter(i=>i);var f9="#abb2bf",d9="#7d8799",h9="#ffffff",p9="#21252b",hO="rgba(0, 0, 0, 0.5)",m9="#292d3e",pO="#353a42",g9="rgba(128, 203, 196, 0.2)",UP="#ffcc00",O9=_e.theme({"&":{color:"#ffffff",backgroundColor:m9},".cm-content":{caretColor:UP},"&.cm-focused .cm-cursor":{borderLeftColor:UP},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:g9},".cm-panels":{backgroundColor:p9,color:"#ffffff"},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:hO},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847",outline:"1px solid #515a6b"},".cm-gutters":{background:"#292d3e",color:"#676e95",border:"none"},".cm-activeLineGutter":{backgroundColor:hO},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:pO},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:pO,borderBottomColor:pO},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:hO,color:f9}}},{dark:!0}),v9=eo.define([{tag:L.keyword,color:"#c792ea"},{tag:L.operator,color:"#89ddff"},{tag:L.special(L.variableName),color:"#eeffff"},{tag:L.typeName,color:"#f07178"},{tag:L.atom,color:"#f78c6c"},{tag:L.number,color:"#ff5370"},{tag:L.definition(L.variableName),color:"#82aaff"},{tag:L.string,color:"#c3e88d"},{tag:L.special(L.string),color:"#f07178"},{tag:L.comment,color:d9},{tag:L.variableName,color:"#f07178"},{tag:L.tagName,color:"#ff5370"},{tag:L.bracket,color:"#a2a1a4"},{tag:L.meta,color:"#ffcb6b"},{tag:L.attributeName,color:"#c792ea"},{tag:L.propertyName,color:"#c792ea"},{tag:L.className,color:"#decb6b"},{tag:L.invalid,color:h9}]),YP=[O9,el(v9)];var HP="#2e3440",bO="#3b4252",GP="#434c5e",Ih="#4c566a";var KP="#e5e9f0",yO="#eceff4",mO="#8fbcbb",JP="#88c0d0",y9="#81a1c1",br="#5e81ac",b9="#bf616a",ll="#d08770",gO="#ebcb8b",e4="#a3be8c",_9="#b48ead",t4="#d30102",_O=yO,OO=_O,w9="#ffffff",vO=bO,k9=_O,i4=bO,wO=_e.theme({"&":{color:HP,backgroundColor:w9},".cm-content":{caretColor:i4},".cm-cursor, .cm-dropCursor":{borderLeftColor:i4},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:k9},".cm-panels":{backgroundColor:_O,color:Ih},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:`1px solid ${Ih}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:KP},".cm-activeLine":{backgroundColor:OO},".cm-selectionMatch":{backgroundColor:KP},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{outline:`1px solid ${Ih}`},"&.cm-focused .cm-matchingBracket":{backgroundColor:yO},".cm-gutters":{backgroundColor:yO,color:HP,border:"none"},".cm-activeLineGutter":{backgroundColor:OO},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:vO},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:vO,borderBottomColor:vO},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:OO,color:Ih}}},{dark:!1}),S9=eo.define([{tag:L.keyword,color:br},{tag:[L.name,L.deleted,L.character,L.propertyName,L.macroName],color:ll},{tag:[L.variableName],color:ll},{tag:[L.function(L.variableName)],color:br},{tag:[L.labelName],color:y9},{tag:[L.color,L.constant(L.name),L.standard(L.name)],color:br},{tag:[L.definition(L.name),L.separator],color:e4},{tag:[L.brace],color:mO},{tag:[L.annotation],color:t4},{tag:[L.number,L.changed,L.annotation,L.modifier,L.self,L.namespace],color:JP},{tag:[L.typeName,L.className],color:gO},{tag:[L.operator,L.operatorKeyword],color:e4},{tag:[L.tagName],color:_9},{tag:[L.squareBracket],color:b9},{tag:[L.angleBracket],color:ll},{tag:[L.attributeName],color:gO},{tag:[L.regexp],color:br},{tag:[L.quote],color:bO},{tag:[L.string],color:ll},{tag:L.link,color:mO,textDecoration:"underline",textUnderlinePosition:"under"},{tag:[L.url,L.escape,L.special(L.string)],color:ll},{tag:[L.meta],color:JP},{tag:[L.comment],color:GP,fontStyle:"italic"},{tag:L.strong,fontWeight:"bold",color:br},{tag:L.emphasis,fontStyle:"italic",color:br},{tag:L.strikethrough,textDecoration:"line-through"},{tag:L.heading,fontWeight:"bold",color:br},{tag:L.special(L.heading1),fontWeight:"bold",color:br},{tag:L.heading1,fontWeight:"bold",color:br},{tag:[L.heading2,L.heading3,L.heading4],fontWeight:"bold",color:br},{tag:[L.heading5,L.heading6],color:br},{tag:[L.atom,L.bool,L.special(L.variableName)],color:ll},{tag:[L.processingInstruction,L.inserted],color:mO},{tag:[L.contentSeparator],color:gO},{tag:L.invalid,color:GP,borderBottom:`1px dotted ${t4}`}]),zJ=[wO,el(S9)];function n4(i,e){document.body.hasClass("theme-dark")?Mh.push(YP):Mh.push(wO);let t=[...Mh];e&&t.push(e);let n=new _e({state:At.create({doc:i.value,extensions:t})});return i.parentNode.appendChild(n.dom),i.style.display="none",i.form&&i.form.addEventListener("submit",()=>{i.value=n.state.doc.toString()}),n}var Nh=class extends Kr.Modal{constructor(){super(...arguments);J(this,"header");J(this,"editing");J(this,"editor");J(this,"canceled",!1)}onOpen(){this.titleEl.setText(this.editing?"Edit Header":"Create Header"),this.display()}display(){if(this.contentEl.empty(),new Kr.Setting(this.contentEl).setName("Display Text").addText(t=>t.setValue(this.header.text).onChange(n=>{this.header.text=n})),new Kr.Setting(this.contentEl).setName("Linked Property").addText(t=>t.setValue(this.header.field).onChange(n=>this.header.field=n)),new Kr.Setting(this.contentEl).setName("Sort Type").setDesc("This determines how the field is sorted. Use the appropriate type for the data type of the field.").addDropdown(t=>{t.addOption("0","String"),t.addOption("1","Number"),t.addOption("2","Custom"),t.setValue(`${this.header.type}`).onChange(n=>{this.header.type=Number(n),this.header.type==2?this.header.func="":delete this.header.func,this.display()})}),"func"in this.header){new Kr.Setting(this.contentEl).setName("Custom Sorting Function").setDesc(createFragment(n=>{n.createSpan({text:"Specify a custom sorting JavaScript function."}),n.createEl("br"),n.createEl("br"),n.createSpan({text:"This function receives two monster objects, "}),n.createEl("code",{text:"a"}),n.createSpan({text:" and "}),n.createEl("code",{text:"b"}),n.createSpan({text:", and must return a number. The number determines sort order."})}));let t=new Kr.TextAreaComponent(this.contentEl).setValue(this.header.func);t.inputEl.addClass("initiative-tracker-textarea"),this.editor=n4(t.inputEl,_e.updateListener.of(n=>{n.docChanged&&(this.header.func=n.state.doc.toString())}))}new Kr.Setting(this.contentEl).addButton(t=>{t.setButtonText("Cancel").setCta().onClick(()=>{this.canceled=!0,this.close()})})}close(){this.editor?.destroy(),super.close()}};function x9(i){se(i,"svelte-1s0cntl",".header-container.svelte-1s0cntl{margin:0 0.5rem}.header.svelte-1s0cntl .header-desc{display:flex;align-items:center;gap:0.25rem}.header.svelte-1s0cntl .header-desc *:has(svg){display:flex;align-items:center}.cancel-button.svelte-1s0cntl{display:flex;justify-content:flex-end}")}function r4(i,e,t){let n=i.slice();return n[13]=e[t],n}function s4(i,e){let t,n,r,s,o,a=X,l,c;return{key:i,first:null,c(){t=b("div"),n=b("div"),s=M(),v(n,"class","header svelte-1s0cntl"),this.first=t},m(u,f){A(u,t,f),y(t,n),y(t,s),l||(c=H(r=e[5].call(null,n,e[13])),l=!0)},p(u,f){e=u,r&&Ge(r.update)&&f&1&&r.update.call(null,e[13])},r(){o=t.getBoundingClientRect()},f(){Qr(t),a()},a(){a(),a=Dr(t,o,jr,{duration:kO})},d(u){u&&T(t),l=!1,c()}}}function P9(i){let e,t,n,r,s,o,a,l,c,u,f,d,h,p=[],m=new Map,g,O,w,S,C,k,_,P=fe(i[0]),x=R=>R[13].id;for(let R=0;ROrganize your headers here. Headers can be drag-and-dropped!",l=M(),c=b("div"),u=b("div"),d=M(),h=b("section");for(let R=0;R{let O=new Nh(app);return O.header=g??$s.defaultState,g&&(O.editing=!0),O.open(),new Promise(w=>{O.onClose=()=>{O.canceled?w():w(O.header)}})},c=g=>{switch(g){case 0:return Np;case 1:return jp;case 2:return"function-square"}},u=g=>{new Jr.Setting(g).setName(createFragment(O=>{let w=O.createDiv("header-desc");(0,Jr.setIcon)(w.createDiv(),c(ac.type)),w.createSpan({text:ac.text})})).setDesc(createFragment(O=>{O.createEl("em",{text:ac.field})}))},f=(g,O)=>{let{header:w,id:S}=O;new Jr.Setting(g).setName(createFragment(C=>{let k=C.createDiv("header-desc");(0,Jr.setIcon)(k.createDiv(),c(w.type)),k.createSpan({text:w.text})})).setDesc(createFragment(C=>{C.createEl("em",{text:w.field})})).addExtraButton(C=>{C.setIcon("edit").onClick(async()=>{let k=await l(w);k&&k.text?.length&&k.field?.length&&(k.type!=2||k?.func?.length)&&(s.splice(s.findIndex(_=>_.id==S),1,{id:xt(),header:k}),t(0,s))})}).addExtraButton(C=>C.setIcon("trash").onClick(()=>{t(0,s=s.filter(k=>k.id!=S))}))},d=g=>{new Jr.Setting(g).setName("Add Header").addExtraButton(O=>O.setIcon("plus-circle").onClick(async()=>{let w=await l();w&&w.text?.length&&w.field?.length&&(w.type!=2||w?.func?.length)&&(s.push({id:xt(),header:w}),t(0,s))}))},h=g=>{new Jr.Setting(g).setName("Reset Headers").setDesc("Reset table headers to defaults.").addExtraButton(O=>O.setIcon("reset").onClick(()=>{n("reset")}))},p=g=>{new Jr.ButtonComponent(g).setButtonText("Cancel").setCta()},m=()=>n("cancel");return i.$$set=g=>{"headers"in g&&t(9,r=g.headers)},i.$$.update=()=>{i.$$.dirty&1&&n("update",s.reduce((g,O)=>(g.push(O.header),g),[]))},[s,n,o,a,u,f,d,h,p,r,m]}var SO=class extends ne{constructor(e){super(),re(this,e,C9,P9,ie,{headers:9},x9)}},o4=SO;var jh=class extends a4.Modal{constructor(t){super(app);this.headers=t;J(this,"canceled",!1);J(this,"reset",!1)}onOpen(){this.titleEl.setText("Edit Headers");let t=new o4({target:this.contentEl,props:{headers:ci(this.headers)}});t.$on("update",n=>{this.headers=ci(n.detail)}),t.$on("cancel",()=>{this.canceled=!0,this.close()}),t.$on("reset",()=>{this.reset=!0,this.close()})}};var QO=require("obsidian");var bs=require("obsidian");function E9(i){se(i,"svelte-n90cbf",".filter-container.svelte-n90cbf.svelte-n90cbf{flex-grow:1;flex-basis:0;display:grid;grid-template-columns:1fr auto;gap:0.5rem;align-items:center}.filter-container.svelte-n90cbf:hover .context.svelte-n90cbf{opacity:1}.name-container.svelte-n90cbf.svelte-n90cbf{display:flex;flex-flow:row nowrap;gap:0.5rem;align-items:center}.description-container.svelte-n90cbf.svelte-n90cbf{display:flex;align-items:center;gap:0.25rem;--icon-size:14px}.icon.svelte-n90cbf.svelte-n90cbf{display:flex;align-items:center}.warning-icon.svelte-n90cbf.svelte-n90cbf{color:var(--text-error)}.context.svelte-n90cbf.svelte-n90cbf{opacity:0;transition:opacity 0.25s;display:flex;align-items:center;gap:0.25rem}")}function T9(i){let e,t,n,r;return{c(){e=b("div"),v(e,"class","icon svelte-n90cbf")},m(s,o){A(s,e,o),n||(r=H(t=i[9].call(null,e)),n=!0)},d(s){s&&T(e),n=!1,r()}}}function A9(i){let e,t,n,r,s,o;return{c(){e=b("div"),n=M(),r=b("span"),r.textContent="No fields",v(e,"class","warning-icon icon svelte-n90cbf"),v(r,"class","warning-icon svelte-n90cbf")},m(a,l){A(a,e,l),A(a,n,l),A(a,r,l),s||(o=H(t=i[8].call(null,e)),s=!0)},p:X,d(a){a&&(T(e),T(n),T(r)),s=!1,o()}}}function D9(i){let e=i[3].fields.join(", ")+"",t;return{c(){t=ae(e)},m(n,r){A(n,t,r)},p:X,d(n){n&&T(t)}}}function Q9(i){let e,t,n,r,s,o,a,l,c,u,f,d,h,p,m,g,O,w,S,C,k,_,P=i[3].derive&&T9(i);function x(Q,D){return Q[3].fields.length?D9:A9}let Z=x(i,-1)(i);return{c(){e=b("div"),t=b("div"),n=b("div"),r=b("div"),o=M(),a=b("div"),l=b("span"),l.textContent=`${i[3].text}`,c=M(),u=b("div"),f=b("small"),d=b("em"),P&&P.c(),h=M(),Z.c(),p=M(),m=b("div"),g=b("div"),w=M(),S=b("div"),v(r,"class","icon svelte-n90cbf"),v(a,"class","text"),v(n,"class","name-container svelte-n90cbf"),v(d,"class","description-container svelte-n90cbf"),v(t,"class","filter"),v(g,"class","icon svelte-n90cbf"),v(S,"class","icon svelte-n90cbf"),v(m,"class","context svelte-n90cbf"),v(e,"class","filter-container svelte-n90cbf")},m(Q,D){A(Q,e,D),y(e,t),y(t,n),y(n,r),y(n,o),y(n,a),y(a,l),y(t,c),y(t,u),y(u,f),y(f,d),P&&P.m(d,null),y(d,h),Z.m(d,null),y(e,p),y(e,m),y(m,g),y(m,w),y(m,S),k||(_=[H(s=i[4].call(null,r)),H(O=i[5].call(null,g)),U(g,"click",i[10]),H(C=i[7].call(null,S)),U(S,"click",i[11])],k=!0)},p(Q,[D]){Z.p(Q,D)},i:X,o:X,d(Q){Q&&T(e),P&&P.d(),Z.d(),k=!1,de(_)}}}function R9(i,e,t){let n,r=Fe(),s=Ue("filterStore"),{filters:o}=s;Se(i,o,O=>t(12,n=O));let{id:a}=e,l=n.get(a).filter,c=O=>{switch(l.type){case 0:return(0,bs.setIcon)(O,"sliders-horizontal");case 1:return(0,bs.setIcon)(O,"search");case 2:return(0,bs.setIcon)(O,"list")}},u=O=>{new bs.ExtraButtonComponent(O).setIcon("pencil")},f=()=>{let O=new Zh(l);O.onClose=()=>{O.canceled||(s.update(l.id,O.filter),r("edit"))},O.open()},d=O=>{new bs.ExtraButtonComponent(O).setIcon("trash")},h=O=>{(0,bs.setIcon)(O,"alert-triangle")},p=O=>{(0,bs.setIcon)(O,"package-search")},m=()=>f(),g=()=>r("deleted",a);return i.$$set=O=>{"id"in O&&t(0,a=O.id)},[a,r,o,l,c,u,f,d,h,p,m,g]}var xO=class extends ne{constructor(e){super(),re(this,e,R9,Q9,ie,{id:0},E9)}},l4=xO;function M9(i){se(i,"svelte-1l1v7ik","section.svelte-1l1v7ik{padding:0.4em;overflow-y:auto;height:auto;width:100%}section.inline.svelte-1l1v7ik{display:flex;justify-content:space-between;flex-flow:row;gap:0.5rem}")}function c4(i,e,t){let n=i.slice();return n[10]=e[t],n}function I9(i){let e,t;return e=new l4({props:{id:i[1].id}}),e.$on("deleted",i[9]),{c(){ye(e.$$.fragment)},m(n,r){Oe(e,n,r),t=!0},p(n,r){let s={};r&2&&(s.id=n[1].id),e.$set(s)},i(n){t||($(e.$$.fragment,n),t=!0)},o(n){V(e.$$.fragment,n),t=!1},d(n){ve(e,n)}}}function N9(i){let e,t=[],n=new Map,r,s,o,a,l=fe(i[1].nested.filter(i[7])),c=u=>u[10].id;for(let u=0;u{o[u]=null}),De(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),$(t,1),t.m(n.parentNode,n))},i(l){r||($(t),r=!0)},o(l){V(t),r=!1},d(l){l&&T(n),o[e].d(l)}}}var PO=300;function Z9(i,e,t){let{layout:n}=e,{block:r}=e,{inline:s=!1}=e,o=Fe();function a(h){r.type=="nested"&&t(1,r.nested=h.detail.items,r)}function l(h){r.type=="nested"&&t(1,r.nested=h.detail.items,r),t(0,n=[...n]),o("update")}let c=h=>{r.type!="filter"&&(t(1,r.nested=r.nested.filter(p=>p.id!=h),r),t(0,n=[...n]),o("update"))},u=h=>h.id!==ec,f=h=>c(h.detail),d=h=>o("deleted",h.detail);return i.$$set=h=>{"layout"in h&&t(0,n=h.layout),"block"in h&&t(1,r=h.block),"inline"in h&&t(2,s=h.inline)},[n,r,s,o,a,l,c,u,f,d]}var zh=class extends ne{constructor(e){super(),re(this,e,Z9,j9,ie,{layout:0,block:1,inline:2},M9)}},f4=zh;var ru=require("obsidian");function d4(i,e,t){let n=i.slice();return n[11]=e[t],n}function h4(i){let e,t;return e=new f4({props:{layout:i[0],block:i[11],inline:!0}}),e.$on("update",i[8]),{c(){ye(e.$$.fragment)},m(n,r){Oe(e,n,r),t=!0},p(n,r){let s={};r&1&&(s.layout=n[0]),r&1&&(s.block=n[11]),e.$set(s)},i(n){t||($(e.$$.fragment,n),t=!0)},o(n){V(e.$$.fragment,n),t=!1},d(n){ve(e,n)}}}function p4(i){let e,t,n=fe(i[0]),r=[];for(let o=0;oV(r[o],1,1,()=>{r[o]=null});return{c(){for(let o=0;ot(7,r=p));let l=Fe();Vi("filterStore",s),a.subscribe(()=>{n&&t(0,n=[...n])});let c=p=>{new ru.Setting(p).setName("Restore Default Layout").addExtraButton(m=>{m.setIcon("reset").onClick(()=>{s.resetLayout(!0)})})},u=p=>{new ru.Setting(p).setName("Add New Filter").addExtraButton(m=>{m.setIcon("plus-circle").onClick(()=>{let g=xt(),O={...lg,id:g};n.push({type:"nested",id:xt(),nested:[{type:"filter",id:g}]}),s.add(O)})})},f=p=>{new ru.ButtonComponent(p).setButtonText("Cancel").setCta()},d=()=>l("update",n),h=()=>l("cancel");return i.$$set=p=>{"filterStore"in p&&t(6,s=p.filterStore)},i.$$.update=()=>{i.$$.dirty&128&&t(0,n=ci(r)),i.$$.dirty&1&&l("update",n)},[n,o,l,c,u,f,s,r,d,h]}var CO=class extends ne{constructor(e){super(),re(this,e,q9,z9,ie,{filterStore:6})}},m4=CO;var Bn=require("obsidian");var v4=require("obsidian");function L9(i){se(i,"svelte-1uki7d6",".draggable-fields.svelte-1uki7d6{margin:0 1rem}")}function g4(i,e,t){let n=i.slice();return n[8]=e[t],n}function O4(i,e){let t,n,r,s,o,a=X,l,c;return{key:i,first:null,c(){t=b("div"),n=b("div"),s=M(),v(n,"class","draggable-field"),this.first=t},m(u,f){A(u,t,f),y(t,n),y(t,s),l||(c=H(r=e[3].call(null,n,e[8])),l=!0)},p(u,f){e=u,r&&Ge(r.update)&&f&1&&r.update.call(null,e[8])},r(){o=t.getBoundingClientRect()},f(){Qr(t),a()},a(){a(),a=Dr(t,o,jr,{duration:EO})},d(u){u&&T(t),l=!1,c()}}}function $9(i){let e,t=[],n=new Map,r,s,o,a=fe(i[0].filter(i[6])),l=c=>c[8].id;for(let c=0;cd.field))}let l=(f,d)=>{let{field:h,id:p}=d;new v4.Setting(f).setName(h).addExtraButton(m=>m.setIcon("trash").onClick(()=>{t(0,s=s.filter(g=>g.id!=p)),r("update",s.map(g=>g.field))}))},c=xt(),u=({id:f})=>f!=ec;return i.$$set=f=>{"fields"in f&&t(5,n=f.fields)},[s,o,a,l,c,n,u]}var TO=class extends ne{constructor(e){super(),re(this,e,F9,$9,ie,{fields:5},L9)}},AO=TO;function y4(i){let e,t,n,r,s=[V9,B9],o=[];function a(l,c){return l[0].type==0?0:l[0].type==2?1:-1}return~(e=a(i,-1))&&(t=o[e]=s[e](i)),{c(){t&&t.c(),n=tt()},m(l,c){~e&&o[e].m(l,c),A(l,n,c),r=!0},p(l,c){let u=e;e=a(l,c),e===u?~e&&o[e].p(l,c):(t&&(Ae(),V(o[u],1,1,()=>{o[u]=null}),De()),~e?(t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),$(t,1),t.m(n.parentNode,n)):t=null)},i(l){r||($(t),r=!0)},o(l){V(t),r=!1},d(l){l&&T(n),~e&&o[e].d(l)}}}function B9(i){let e,t,n,r,s,o,a;return r=new AO({props:{fields:i[0].options}}),r.$on("update",i[17]),{c(){e=b("div"),n=M(),ye(r.$$.fragment)},m(l,c){A(l,e,c),A(l,n,c),Oe(r,l,c),s=!0,o||(a=H(t=i[9].call(null,e)),o=!0)},p(l,c){let u={};c&1&&(u.fields=l[0].options),r.$set(u)},i(l){s||($(r.$$.fragment,l),s=!0)},o(l){V(r.$$.fragment,l),s=!1},d(l){l&&(T(e),T(n)),ve(r,l),o=!1,a()}}}function V9(i){let e,t,n,r;return{c(){e=b("div")},m(s,o){A(s,e,o),n||(r=H(t=i[11].call(null,e)),n=!0)},p:X,i:X,o:X,d(s){s&&T(e),n=!1,r()}}}function b4(i){let e,t,n,r,s,o,a,l,c;e=new AO({props:{fields:i[0].fields}}),e.$on("update",i[16]);let u=!i[0].derive&&y4(i);return{c(){ye(e.$$.fragment),t=M(),n=b("div"),s=M(),u&&u.c(),o=tt()},m(f,d){Oe(e,f,d),A(f,t,d),A(f,n,d),A(f,s,d),u&&u.m(f,d),A(f,o,d),a=!0,l||(c=H(r=i[8].call(null,n)),l=!0)},p(f,d){let h={};d&1&&(h.fields=f[0].fields),e.$set(h),f[0].derive?u&&(Ae(),V(u,1,1,()=>{u=null}),De()):u?(u.p(f,d),d&1&&$(u,1)):(u=y4(f),u.c(),$(u,1),u.m(o.parentNode,o))},i(f){a||($(e.$$.fragment,f),$(u),a=!0)},o(f){V(e.$$.fragment,f),V(u),a=!1},d(f){f&&(T(t),T(n),T(s),T(o)),ve(e,f),u&&u.d(f),l=!1,c()}}}function W9(i){let e,t,n,r,s,o,a,l,c,u,f,d,h=i[0],p,m,g,O,w,S,C,k=b4(i);return{c(){e=b("div"),n=M(),r=b("div"),o=M(),a=b("div"),c=M(),u=b("div"),d=M(),k.c(),p=M(),m=b("div"),g=b("div"),v(m,"class","cancel-button")},m(_,P){A(_,e,P),A(_,n,P),A(_,r,P),A(_,o,P),A(_,a,P),A(_,c,P),A(_,u,P),A(_,d,P),k.m(_,P),A(_,p,P),A(_,m,P),y(m,g),w=!0,S||(C=[H(t=i[2].call(null,e)),H(s=i[3].call(null,r)),H(l=i[4].call(null,a)),H(f=i[6].call(null,u)),H(O=i[12].call(null,g)),U(g,"click",i[18])],S=!0)},p(_,[P]){P&1&&ie(h,h=_[0])?(Ae(),V(k,1,1,X),De(),k=b4(_),k.c(),$(k,1),k.m(p.parentNode,p)):k.p(_,P)},i(_){w||($(k),w=!0)},o(_){V(k),w=!1},d(_){_&&(T(e),T(n),T(r),T(o),T(a),T(c),T(u),T(d),T(p),T(m)),k.d(_),S=!1,de(C)}}}function X9(i,e,t){let n,{filter:r}=e,{original:s}=e,o=Fe(),a=_=>{new Bn.Setting(_).setName("Reset").addExtraButton(P=>{P.setIcon("reset").onClick(()=>{t(0,r=ci(s))})})},l=_=>{new Bn.Setting(_).setName("Filter Type").addDropdown(P=>{P.addOption("0","Range"),P.addOption("2","Options"),P.addOption("1","Search"),P.setValue(`${r.type}`).onChange(x=>{switch(t(0,r.type=Number(x),r),r.type){case 0:t(0,r.options=[0,0],r);break;case 1:t(0,r.options="",r);break;case 2:t(0,r.options=[],r);break}})})},c=_=>{new Bn.Setting(_).setName("Display Text").addText(P=>{P.setValue(r.text).onChange(x=>t(0,r.text=x,r))})},u=$e(""),f;Se(i,u,_=>t(15,n=_));let d=_=>{let P=r,x;new Bn.Setting(_).setName("Fields").addText(R=>{x=R.onChange(Z=>Ke(u,n=Z,n))}).addExtraButton(R=>t(14,f=R.setIcon("plus-circle").onClick(()=>{if(P.fields.includes(n)){new Bn.Notice(createFragment(Z=>{Z.createSpan({text:"The field "}),Z.createEl("code",{text:n}),Z.createSpan(" has already been added to the options for this filter.")}));return}P.fields=[...P.fields,n],t(0,r={...r}),Ke(u,n="",n),x.setValue(n)})))},h=_=>{t(0,r.fields=_,r)},p=_=>{r.type!=1&&new Bn.Setting(_).setName("Derive Options").addToggle(P=>{P.setValue(r.derive).onChange(x=>t(0,r.derive=x,r))})},m=_=>{new Bn.Setting(_).setName("Options").addText(P=>P).addExtraButton(P=>P.setIcon("plus-circle"))},g=_=>{t(0,r.options=_,r)},O=_=>{if(r.type!=0)return;let P=r;new Bn.Setting(_).setName("Options").addText(x=>x.setValue(`${P.options[0]}`).onChange(R=>P.options[0]=Number(R)).inputEl.type="number").addText(x=>x.setValue(`${P.options[1]}`).onChange(R=>P.options[1]=Number(R)).inputEl.type="number")},w=_=>{new Bn.ButtonComponent(_).setButtonText("Cancel").setCta()},S=_=>h(_.detail),C=_=>g(_.detail),k=()=>o("cancel");return i.$$set=_=>{"filter"in _&&t(0,r=_.filter),"original"in _&&t(13,s=_.original)},i.$$.update=()=>{i.$$.dirty&49152&&f?.setDisabled(!n?.length),i.$$.dirty&1&&o("update",r)},[r,o,a,l,c,u,d,h,p,m,g,O,w,s,f,n,S,C,k]}var DO=class extends ne{constructor(e){super(),re(this,e,X9,W9,ie,{filter:0,original:13})}},_4=DO;var qh=class extends QO.Modal{constructor(t,n){super(app);this.filterStore=n;J(this,"canceled",!1);J(this,"reset",!1);J(this,"layout");this.layout=ci(t)}onOpen(){this.titleEl.setText("Edit Filters");let t=new m4({target:this.contentEl,props:{filterStore:this.filterStore}});t.$on("update",n=>{this.layout=ci(n.detail)}),t.$on("cancel",()=>{this.canceled=!0,this.close()})}},Zh=class extends QO.Modal{constructor(t){super(app);this.original=t;J(this,"canceled",!1);J(this,"filter");this.filter=ci(t)}onOpen(){this.titleEl.setText("Edit Filter");let t=new _4({target:this.contentEl,props:{filter:this.filter,original:this.original}});t.$on("update",n=>{this.filter=n.detail}),t.$on("cancel",n=>{this.canceled=!0,this.close()})}};var X3=Dp(z3());var q3={$ref:"#/definitions/BuilderState",$schema:"http://json-schema.org/draft-07/schema#",definitions:{BuilderState:{additionalProperties:!1,properties:{filters:{additionalProperties:!1,properties:{filters:{items:{$ref:"#/definitions/Filter"},type:"array"},layout:{$ref:"#/definitions/FilterLayout"}},required:["layout","filters"],type:"object"},headers:{items:{$ref:"#/definitions/TableHeaderState"},type:"array"},showParty:{type:"boolean"},showXP:{type:"boolean"},sidebarIcon:{type:"boolean"}},required:["sidebarIcon","showXP","showParty"],type:"object"},Filter:{additionalProperties:!1,properties:{derive:{type:"boolean"},fields:{items:{type:"string"},type:"array"},id:{type:"string"},options:{type:["string","number","boolean","integer","object","array"]},text:{type:"string"},type:{type:"number"}},required:["derive","fields","id","options","text","type"],type:"object"},FilterLayout:{items:{$ref:"#/definitions/NestedFilterLayoutItem"},type:"array"},FilterLayoutItem:{additionalProperties:!1,properties:{id:{type:"string"},type:{const:"filter",type:"string"}},required:["id","type"],type:"object"},NestedFilterLayoutItem:{additionalProperties:!1,properties:{id:{type:"string"},nested:{items:{$ref:"#/definitions/FilterLayoutItem"},type:"array"},type:{const:"nested",type:"string"}},required:["id","nested","type"],type:"object"},SortFunctions:{enum:[0,1,2],type:"number"},TableHeaderState:{additionalProperties:!1,properties:{field:{type:"string"},func:{type:"string"},text:{type:"string"},type:{$ref:"#/definitions/SortFunctions"}},required:["text","field","type"],type:"object"}}};function FL(i){se(i,"svelte-rwomh",".filters.svelte-rwomh{margin:1rem 0}.table-header.svelte-rwomh{display:flex;gap:0.25rem}.has-icon.svelte-rwomh{display:flex;align-items:center}table.svelte-rwomh{width:100%}")}function L3(i,e,t){let n=i.slice();return n[26]=e[t],n}function $3(i,e,t){let n=i.slice();return n[29]=e[t],n}function F3(i){let e,t,n=[],r=new Map,s,o,a,l=fe(i[4]),c=h=>h[29].text;for(let h=0;hV(f[h],1,1,()=>{f[h]=null});return{c(){e=b("table"),t=b("thead");for(let h=0;h{a=null}),De());let u={};c[0]&1&&(u.slice=l[0]),c[0]&4&&(u.page=l[2]),c[0]&8&&(u.pages=l[3]),s.$set(u)},i(l){o||($(t.$$.fragment,l),$(a),$(s.$$.fragment,l),o=!0)},o(l){V(t.$$.fragment,l),V(a),V(s.$$.fragment,l),o=!1},d(l){l&&(T(e),T(n),T(r)),ve(t),a&&a.d(l),ve(s,l)}}}function XL(i,e,t){let n,r,s,o,a,l,c=Ue("table");Se(i,c,E=>t(21,s=E));let{sortDir:u,allHeaders:f}=c;Se(i,u,E=>t(5,l=E)),Se(i,f,E=>t(4,a=E));let d=Ue("filters"),{filtered:h,layout:p}=d;Se(i,h,E=>t(1,r=E)),Se(i,p,E=>t(22,o=E));let m=Ue("plugin"),g=50,O=E=>{(0,po.setIcon)(E,"chevron-up")},w=E=>{(0,po.setIcon)(E,"chevron-down")},S=E=>{let j=new po.Menu;j.addItem(z=>{z.setTitle("Edit Headers").onClick(()=>{k()})}).addItem(z=>{z.setTitle("Edit Filters").onClick(()=>{C()})}).addSeparator().addItem(z=>{z.setTitle("Export").onClick(()=>{let q=createEl("a"),G=new Blob([JSON.stringify(m.data.builder)],{type:"json"}),Y=URL.createObjectURL(G);q.href=Y,q.download="initiative-tracker-encounter-builder.json",q.click()})}).addItem(z=>{z.setTitle("Import").onClick(()=>{let G=new X3.default().compile(q3),Y=createEl("input",{attr:{type:"file",name:"builder_state",accept:".json"}});Y.onchange=async()=>{let{files:ce}=Y;if(!ce.length)return;let Pe=new FileReader;Pe.onload=async ue=>{if(typeof ue.target.result=="string"){let B;try{B=JSON.parse(ue.target.result)}catch{new po.Notice("There was an issue parsing the file as JSON.")}G(B)?(m.data.builder={...B},await m.saveSettings(),d.resetLayout()):(console.log(...G.errors.map(ee=>ee.message)),new po.Notice("This file does not match the builder state schema."))}},Pe.readAsText(ce[0])},Y.click()})}),j.showAtMouseEvent(E.detail)},C=()=>{let E=new qh(o,d);E.open(),E.onClose=()=>{E.canceled||Ke(p,o=E.layout,o)}},k=()=>{let E=new jh(s.map(j=>j.toState()));E.open(),E.onClose=()=>{if(!E.canceled){if(E.reset){c.resetToDefault();return}c.setHeadersFromState(E.headers)}}},_=1,P=E=>S(E),x=E=>{c.sort(E)},R=E=>t(0,g=E.detail),Z=()=>t(2,_=_-1),Q=()=>t(2,_=Math.min(_+1,n)),D=E=>t(2,_=E.detail);return i.$$.update=()=>{i.$$.dirty[0]&3&&t(3,n=Math.ceil(r.length/g))},[g,r,_,n,a,l,c,u,f,h,p,O,w,S,P,x,R,Z,Q,D]}var fy=class extends ne{constructor(e){super(),re(this,e,XL,WL,ie,{},FL,[-1,-1])}},U3=fy;var Ft=require("obsidian");var xr=require("obsidian");function UL(i){se(i,"svelte-17aw8iw",".encounter-creature-container.svelte-17aw8iw{display:grid;align-items:center;justify-content:center;grid-template-columns:min-content 1fr 10% 10% auto auto auto;gap:0.5rem}.encounter-creature.svelte-17aw8iw{display:flex;align-items:center;gap:0.5rem}.encounter-creature-context.svelte-17aw8iw{text-align:right}.encounter-creature-controls.svelte-17aw8iw{display:flex;align-items:center;gap:0.5rem}input.svelte-17aw8iw{text-align:center;width:40px}.contains-icon.svelte-17aw8iw{display:flex;align-items:center}")}function Y3(i,e,t){let n=i.slice();return n[28]=e[t],n}function H3(i){let e,t,n,r,s;return{c(){e=b("div"),v(e,"class","contains-icon svelte-17aw8iw"),v(e,"aria-label",t="This creature is hidden.")},m(o,a){A(o,e,a),r||(s=H(n=i[12].call(null,e)),r=!0)},d(o){o&&T(e),r=!1,s()}}}function G3(i){let e,t,n,r,s;return{c(){e=b("div"),v(e,"class","contains-icon svelte-17aw8iw"),v(e,"aria-label",t="This creature is an ally.")},m(o,a){A(o,e,a),r||(s=H(n=i[14].call(null,e)),r=!0)},d(o){o&&T(e),r=!1,s()}}}function K3(i){let e,t,n,r,s;return{c(){e=b("div"),v(e,"class","contains-icon svelte-17aw8iw"),v(e,"aria-label",t=`${i[1]>1?"These creatures are":"This creature is"} significantly under the average party level and might not contribute much to the fight.`)},m(o,a){A(o,e,a),r||(s=H(n=i[15].call(null,e)),r=!0)},p(o,a){a&2&&t!==(t=`${o[1]>1?"These creatures are":"This creature is"} significantly under the average party level and might not contribute much to the fight.`)&&v(e,"aria-label",t)},d(o){o&&T(e),r=!1,s()}}}function J3(i){let e,t,n,r,s;return{c(){e=b("div"),v(e,"class","contains-icon svelte-17aw8iw"),v(e,"aria-label",t=`${i[1]>1?"These creatures are":"This creature is"} significantly over the average party level and might prove a challenge.`)},m(o,a){A(o,e,a),r||(s=H(n=i[16].call(null,e)),r=!0)},p(o,a){a&2&&t!==(t=`${o[1]>1?"These creatures are":"This creature is"} significantly over the average party level and might prove a challenge.`)&&v(e,"aria-label",t)},d(o){o&&T(e),r=!1,s()}}}function e5(i){let e,t,n=i[28]+"",r;return{c(){e=b("div"),t=b("span"),r=ae(n),v(e,"class","encounter-creature-context svelte-17aw8iw")},m(s,o){A(s,e,o),y(e,t),y(t,r)},p(s,o){o&5&&n!==(n=s[28]+"")&&me(r,n)},d(s){s&&T(e)}}}function YL(i){let e,t,n,r,s,o,a,l,c,u,f,d,h,p,m=i[0].name+"",g,O,w,S,C,k,_,P,x,R,Z,Q,D,E,j,z,q,G,Y,ce,Pe,ue=i[0].hidden&&H3(i),B=i[0].friendly&&G3(i),ee=i[4]&&K3(i),pe=i[3]&&J3(i),Re=fe(i[7].getAdditionalCreatureDifficultyStats(i[0],i[2])),oe=[];for(let ke=0;ket(18,o=z));let{average:c}=l;Se(i,c,z=>t(19,a=z));let u=Ue("plugin"),f=ki(u),d=z=>{new xr.ExtraButtonComponent(z).setIcon("minus-circle")},h=z=>{new xr.ExtraButtonComponent(z).setIcon("plus-with-circle")},p=z=>{new xr.ExtraButtonComponent(z).setIcon("trash-2")},m=z=>{new xr.ExtraButtonComponent(z).setIcon(er)},g=z=>{(0,xr.setIcon)(z,er)},O=z=>{new xr.ExtraButtonComponent(z).setIcon(tr)},w=z=>{(0,xr.setIcon)(z,tr)},{count:S}=e,{creature:C}=e,k=z=>(0,xr.setIcon)(z,"baby"),_=z=>(0,xr.setIcon)(z,"skull"),P=z=>{u.openCombatant(je.from(C),z.ctrlKey||z.metaKey)},x=()=>ii.remove(C);function R(){S=pi(this.value),t(1,S)}let Z=z=>ii.set(C,Number(z.currentTarget.value)),Q=()=>ii.add(C),D=()=>t(0,C.hidden=!C.hidden,C),E=()=>{t(0,C.friendly=!C.friendly,C),ii.update(C)},j=()=>ii.delete(C);return i.$$set=z=>{"count"in z&&t(1,S=z.count),"creature"in z&&t(0,C=z.creature)},i.$$.update=()=>{i.$$.dirty&524289&&t(4,n="cr"in C&&C.cr&&hi(C.cr)a+3),i.$$.dirty&262144&&t(2,s=o.filter(z=>z.enabled).map(z=>z.level))},[C,S,s,r,n,l,c,f,d,h,p,m,g,O,w,k,_,P,o,a,x,R,Z,Q,D,E,j]}var dy=class extends ne{constructor(e){super(),re(this,e,HL,YL,ie,{count:1,creature:0},UL)}},t5=dy;function GL(i){se(i,"svelte-1s1acwo",".encounter-name.svelte-1s1acwo{display:flex;align-items:center}.encounter-header.svelte-1s1acwo{display:flex;align-items:center;justify-content:space-between}.encounter-creatures.svelte-1s1acwo{display:flex;gap:0.5rem;flex-flow:column nowrap}.encounter-header.svelte-1s1acwo .is-disabled{cursor:not-allowed}.encounter-controls.svelte-1s1acwo{display:flex;gap:0.5rem;align-items:center}")}function i5(i,e,t){let n=i.slice();return n[31]=e[t][0],n[32]=e[t][1],n}function KL(i){let e,t,n,r,s,o,a;return{c(){e=b("h5"),t=ae(i[1]),n=M(),r=b("div"),v(e,"class","built-encounter")},m(l,c){A(l,e,c),y(e,t),A(l,n,c),A(l,r,c),o||(a=[H(s=i[11].call(null,r)),U(r,"click",i[26])],o=!0)},p(l,c){c[0]&2&&me(t,l[1])},d(l){l&&(T(e),T(n),T(r)),o=!1,de(a)}}}function JL(i){let e,t,n,r,s,o,a,l,c;return{c(){e=b("input"),t=M(),n=b("div"),s=M(),o=b("div"),v(e,"type","text"),v(e,"placeholder",i[1])},m(u,f){A(u,e,f),Xe(e,i[2]),A(u,t,f),A(u,n,f),A(u,s,f),A(u,o,f),l||(c=[U(e,"input",i[25]),H(r=i[12].call(null,n)),U(n,"click",i[8]),H(a=i[14].call(null,o)),U(o,"click",i[9])],l=!0)},p(u,f){f[0]&2&&v(e,"placeholder",u[1]),f[0]&4&&e.value!==u[2]&&Xe(e,u[2])},d(u){u&&(T(e),T(t),T(n),T(s),T(o)),l=!1,de(c)}}}function e$(i){let e,t,n=fe(i[0]),r=[];for(let o=0;oV(r[o],1,1,()=>{r[o]=null});return{c(){e=b("div");for(let o=0;o{j[Y]=null}),De(),k=j[C],k?k.p(q,G):(k=j[C]=E[C](q),k.c()),$(k,1),k.m(_.parentNode,_))},i(q){P||($(k),P=!0)},o(q){V(k),P=!1},d(q){q&&(T(e),T(S),T(_)),D.d(),j[C].d(q),x=!1,de(R)}}}function n$(i,e,t){let n,r,s,o,a,l;Se(i,ii,Y=>t(24,r=Y));let{players:c}=ii;Se(i,c,Y=>t(28,s=Y));let u=Ue("plugin"),f=$e("Encounter");Se(i,f,Y=>t(1,o=Y));let d=$e("");Se(i,d,Y=>t(2,a=Y));let h=$e(!1);Se(i,h,Y=>t(3,l=Y));let p=()=>{Ke(h,l=!1,l),Ke(f,o=a.length?a:o,o),Ke(d,a="",a)},m=()=>{Ke(h,l=!1,l),Ke(d,a="",a)},g=u.data.rollHP,O,w=Y=>{t(20,O=new Ft.ExtraButtonComponent(Y).setIcon(us).onClick(async()=>{u.view||await u.addTrackerView();let ce=u.view,Pe=[],ue=[];for(let[B,ee]of n){let pe=je.from(B),Re=Math.max(isNaN(Number(ee))?1:Number(ee),1);Pe.push(...[...Array(Re).keys()].map(oe=>je.new(pe)))}for(let B of[...s.map(ee=>u.getPlayerByName(ee.name)??je.from(ee)),...Pe])ue.push(B.toJSON());he.new(u,{creatures:ue,name:o,round:1,state:!1,logFile:null,newLog:!0,roll:!0,rollHP:g}),u.app.workspace.revealLeaf(ce.leaf)}))},S=Y=>{new Ft.ExtraButtonComponent(Y).setIcon("pencil")},C,k=Y=>{t(21,C=new Ft.ExtraButtonComponent(Y).setIcon("save"))},_=()=>{let Y=new Ft.Modal(app);Y.titleEl.setText("Save Encounter");let ce=o!="Encounter"?o:`Encounter ${Object.keys(u.data.encounters).length}`;new Ft.Setting(Y.contentEl).setName("Encounter Name").addText(ue=>{ue.setPlaceholder(ce).onChange(B=>ce=B)});let Pe=()=>{try{let ue=[...[...s].map(B=>je.from(B)),...[...r.entries()].map(B=>[...Array(B[1]).keys()].map(()=>je.from(B[0]))).flat()];u.addEncounter(ce,{creatures:[...ue.map(B=>B.toJSON())],state:!1,name:ce,round:1,roll:!0,rollHP:u.data.rollHP,logFile:null,timestamp:Date.now()}),u.saveSettings(),new Ft.Notice(`Encounter "${ce}" saved.`),Y.close()}catch{new Ft.Notice("There was an issue saving the encounter.")}};new Ft.Setting(Y.contentEl).addButton(ue=>ue.setButtonText("Save").onClick(()=>{if(ce in u.data.encounters){let B=new Ft.Modal(app);B.titleEl.setText("Are you sure?"),B.contentEl.createEl("p",{text:"This will overwrite an existing encounter. Are you sure?"}),new Ft.Setting(B.contentEl).addButton(ee=>ee.setButtonText("Overwrite").onClick(()=>{B.close(),Pe()})).addExtraButton(ee=>ee.setIcon("cross").onClick(()=>{B.close()})),B.open()}else Pe()})),Y.open()},P=Y=>{new Ft.ExtraButtonComponent(Y).setIcon("cross-in-box")},x,R=Y=>{t(22,x=new Ft.ExtraButtonComponent(Y).setIcon("copy"))},Z,Q=Y=>{t(23,Z=new Ft.ExtraButtonComponent(Y).setIcon("upload").setTooltip("Load Encounter"))},D=Y=>{let ce=new Ft.Menu;for(let Pe of Object.values(u.data.encounters))ce.addItem(ue=>{ue.setTitle(Pe.name).onClick(()=>{Ke(f,o=Pe.name,o),ii.empty(),c.empty();for(let B of Pe.creatures)B.player?c.addFromState(B):ii.add(je.fromJSON(B,u))})});ce.showAtMouseEvent(Y)},E=Y=>{new Ft.ExtraButtonComponent(Y).setIcon("eraser").setTooltip("Clear Encounter")},j=async()=>{let Y={};o?.length&&(Y.name=o),s?.length&&(Y.players=s.filter(ce=>ce.enabled).map(ce=>ce.name)),r?.size&&(Y.creatures=[...r.entries()].map(([ce,Pe])=>({[Number(Pe)]:`${ce.name}${ce.friendly?", friendly":""}${ce.hidden?", hidden":""}`})));try{await navigator.clipboard.writeText(`\`\`\`encounter +${(0,Ft.stringifyYaml)(Y)}\`\`\``),new Ft.Notice("Encounter saved to clipboard")}catch(ce){console.error(ce),new Ft.Notice("Could not save encounter, please check console for errors")}};function z(){a=this.value,d.set(a)}let q=()=>Ke(h,l=!0,l),G=()=>{ii.empty(),Ke(f,o="Encounter",o)};return i.$$.update=()=>{i.$$.dirty[0]&16777216&&t(0,n=[...r.entries()]),i.$$.dirty[0]&1048577&&O&&(n.length?(O.setDisabled(!1),O.setTooltip("Start Encounter")):(O.setDisabled(!0),O.setTooltip(""))),i.$$.dirty[0]&18874368&&C?.setDisabled(r.size==0),i.$$.dirty[0]&4194305&&x&&(n.length?(x.setDisabled(!1),x.setTooltip("Copy Encounter Block")):(x.setDisabled(!0),x.setTooltip(""))),i.$$.dirty[0]&8388608&&Z?.setDisabled(Object.keys(u.data.encounters).length==0)},[n,o,a,l,c,f,d,h,p,m,w,S,k,_,P,R,Q,D,E,j,O,C,x,Z,r,z,q,G]}var hy=class extends ne{constructor(e){super(),re(this,e,n$,i$,ie,{},GL,[-1,-1])}},r5=hy;function r$(i){se(i,"svelte-r6lzam","details.svelte-r6lzam>summary.svelte-r6lzam.svelte-r6lzam{outline:none;display:flex !important;align-items:center;justify-content:space-between;gap:0.25rem;list-style:none !important;list-style-type:none !important;min-height:1rem;border-top-left-radius:0.1rem;border-top-right-radius:0.1rem;cursor:pointer;position:relative;margin-bottom:1rem}details.svelte-r6lzam>summary.svelte-r6lzam.svelte-r6lzam::-webkit-details-marker,details.svelte-r6lzam>summary.svelte-r6lzam.svelte-r6lzam::marker{display:none !important}details.svelte-r6lzam>summary.svelte-r6lzam>.collapser.svelte-r6lzam{position:relative;display:flex;align-items:center}details.svelte-r6lzam>summary .collapser.svelte-r6lzam>.handle.svelte-r6lzam{transform:rotate(0deg);transition:transform 0.25s;background-color:currentColor;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-image:var(--admonition-details-icon);mask-image:var(--admonition-details-icon);width:20px;height:20px}details[open].svelte-r6lzam>summary .collapser.svelte-r6lzam>.handle.svelte-r6lzam{transform:rotate(90deg)}details.svelte-r6lzam>summary.svelte-r6lzam.svelte-r6lzam{border-bottom:1px solid var(--background-modifier-border)}details.svelte-r6lzam>summary.svelte-r6lzam.svelte-r6lzam{border-bottom:1px solid var(--background-modifier-border)}")}var s$=i=>({}),s5=i=>({}),o$=i=>({}),o5=i=>({});function a$(i){let e,t,n,r,s,o,a,l,c=i[2].title,u=Gt(c,i,i[1],o5),f=i[2].content,d=Gt(f,i,i[1],s5);return{c(){e=b("details"),t=b("summary"),u&&u.c(),n=M(),r=b("div"),r.innerHTML='
',s=M(),d&&d.c(),v(r,"class","collapser svelte-r6lzam"),v(t,"class","svelte-r6lzam"),e.open=i[0],v(e,"class","svelte-r6lzam")},m(h,p){A(h,e,p),y(e,t),u&&u.m(t,null),y(t,n),y(t,r),y(e,s),d&&d.m(e,null),o=!0,a||(l=U(e,"toggle",i[3]),a=!0)},p(h,[p]){u&&u.p&&(!o||p&2)&&Jt(u,c,h,h[1],o?Kt(c,h[1],p,o$):ei(h[1]),o5),d&&d.p&&(!o||p&2)&&Jt(d,f,h,h[1],o?Kt(f,h[1],p,s$):ei(h[1]),s5),(!o||p&1)&&(e.open=h[0])},i(h){o||($(u,h),$(d,h),o=!0)},o(h){V(u,h),V(d,h),o=!1},d(h){h&&T(e),u&&u.d(h),d&&d.d(h),a=!1,l()}}}function l$(i,e,t){let{$$slots:n={},$$scope:r}=e,{open:s}=e;function o(a){ht.call(this,i,a)}return i.$$set=a=>{"open"in a&&t(0,s=a.open),"$$scope"in a&&t(1,r=a.$$scope)},[s,r,n,o]}var py=class extends ne{constructor(e){super(),re(this,e,l$,a$,ie,{open:0},r$)}},yp=py;function c$(i){se(i,"svelte-1x58p02",".title-container.svelte-1x58p02{display:flex;flex-flow:column nowrap;gap:0.1rem}.title.svelte-1x58p02{margin-bottom:0}.content.svelte-1x58p02{display:flex;flex-flow:column nowrap;gap:0.25rem}.filtered.svelte-1x58p02{font-size:smaller;color:var(--text-muted)}.xp-container.svelte-1x58p02{margin-left:auto}.xp.svelte-1x58p02{display:flex;gap:1rem}.thresholds.svelte-1x58p02{display:flex;flex-flow:column;gap:0.5rem}.experience-amount.svelte-1x58p02{margin-left:auto}.encounter-difficulty.svelte-1x58p02{display:flex;flex-flow:column nowrap;gap:0.5rem;margin-bottom:1rem}.container.svelte-1x58p02{display:flex;flex-flow:column nowrap}.header.svelte-1x58p02{text-transform:uppercase;font-weight:bolder}")}function a5(i,e,t){let n=i.slice();return n[10]=e[t],n}function l5(i,e,t){let n=i.slice();return n[10]=e[t],n}function c5(i,e,t){let n=i.slice();return n[15]=e[t],n}function u5(i){let e,t=i[5].displayName+"",n,r;return{c(){e=ae("("),n=ae(t),r=ae(")")},m(s,o){A(s,e,o),A(s,n,o),A(s,r,o)},p:X,d(s){s&&(T(e),T(n),T(r))}}}function f5(i){let e,t,n,r,s=i[2]>1?"s":"",o;return{c(){e=b("span"),t=ae("Filtering "),n=ae(i[2]),r=ae(" allied creature"),o=ae(s),v(e,"class","filtered svelte-1x58p02")},m(a,l){A(a,e,l),y(e,t),y(e,n),y(e,r),y(e,o)},p(a,l){l&4&&me(n,a[2]),l&4&&s!==(s=a[2]>1?"s":"")&&me(o,s)},d(a){a&&T(e)}}}function u$(i){let e,t,n,r,s,o=i[1].data.rpgSystem!="dnd5e"&&u5(i),a=i[2]>0&&f5(i);return{c(){e=b("div"),t=b("h5"),t.textContent="Experience",n=M(),r=b("span"),o&&o.c(),s=M(),a&&a.c(),v(t,"class","title svelte-1x58p02"),v(e,"class","title-container svelte-1x58p02"),v(e,"slot","title")},m(l,c){A(l,e,c),y(e,t),y(e,n),y(e,r),o&&o.m(r,null),y(e,s),a&&a.m(e,null)},p(l,c){l[1].data.rpgSystem!="dnd5e"?o?o.p(l,c):(o=u5(l),o.c(),o.m(r,null)):o&&(o.d(1),o=null),l[2]>0?a?a.p(l,c):(a=f5(l),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(l){l&&T(e),o&&o.d(),a&&a.d()}}}function d5(i){let e,t,n=i[15].label+"",r,s,o,a=i[15].value.toLocaleString()+"",l;return{c(){e=b("div"),t=b("strong"),r=ae(n),s=M(),o=b("span"),l=ae(a),v(t,"class","header svelte-1x58p02"),v(e,"class","adjusted container svelte-1x58p02")},m(c,u){A(c,e,u),y(e,t),y(t,r),y(e,s),y(e,o),y(o,l)},p(c,u){u&8&&n!==(n=c[15].label+"")&&me(r,n),u&8&&a!==(a=c[15].value.toLocaleString()+"")&&me(l,a)},d(c){c&&T(e)}}}function h5(i){let e,t,n=i[10].displayName+"",r,s,o,a=i[5].formatDifficultyValue(i[10].minValue,!0)+"",l,c,u;return{c(){e=b("div"),t=b("strong"),r=ae(n),s=M(),o=b("span"),l=ae(a),c=M(),v(t,"class","experience-name header svelte-1x58p02"),v(o,"class","experience-amount svelte-1x58p02"),v(e,"class",u="experience-threshold "+i[10].displayName.toLowerCase()+" container svelte-1x58p02")},m(f,d){A(f,e,d),y(e,t),y(t,r),y(e,s),y(e,o),y(o,l),y(e,c)},p(f,d){d&1&&n!==(n=f[10].displayName+"")&&me(r,n),d&1&&a!==(a=f[5].formatDifficultyValue(f[10].minValue,!0)+"")&&me(l,a),d&1&&u!==(u="experience-threshold "+f[10].displayName.toLowerCase()+" container svelte-1x58p02")&&v(e,"class",u)},d(f){f&&T(e)}}}function p5(i){let e,t=i[10].displayName+"",n,r,s,o=i[5].formatDifficultyValue(i[10].minValue,!0)+"",a,l;return{c(){e=b("h5"),n=ae(t),r=M(),s=b("span"),a=ae(o),l=M(),v(e,"class","experience-name"),v(s,"class","experience-amount svelte-1x58p02")},m(c,u){A(c,e,u),y(e,n),A(c,r,u),A(c,s,u),y(s,a),y(s,l)},p(c,u){u&1&&t!==(t=c[10].displayName+"")&&me(n,t),u&1&&o!==(o=c[5].formatDifficultyValue(c[10].minValue,!0)+"")&&me(a,o)},d(c){c&&(T(e),T(r),T(s))}}}function f$(i){let e,t,n,r,s,o,a,l=i[3].displayName+"",c,u,f,d,h,p=i[3].title+"",m,g,O,w=i[5].formatDifficultyValue(i[3].value)+"",S,C,k,_,P,x,R,Z=fe(i[3].intermediateValues),Q=[];for(let q=0;qt(7,o=h)),Se(i,ii,h=>t(8,a=h));let l=Ue("plugin"),c=l.data.builder.showXP,u=ki(l),f=0,d=()=>t(1,l.data.builder.showXP=!l.data.builder.showXP,l);return i.$$.update=()=>{if(i.$$.dirty&256&&t(6,n=new Map([...a.entries()].map(([h,p])=>h.friendly?[h,0]:[h,p]))),i.$$.dirty&324){t(2,f=0);for(let[h,p]of n)p===0&&t(2,f+=a.get(h)??0)}i.$$.dirty&128&&t(0,r=o.filter(h=>h.enabled).map(h=>h.level)),i.$$.dirty&65&&t(3,s=u.getEncounterDifficulty(n,r))},[r,l,f,s,c,u,n,o,a,d]}var my=class extends ne{constructor(e){super(),re(this,e,h$,d$,ie,{},c$)}},m5=my;var mo=require("obsidian");function p$(i){se(i,"svelte-wi0lrc",".players.svelte-wi0lrc.svelte-wi0lrc{display:flex;flex-flow:column;gap:0.25rem}.player.svelte-wi0lrc.svelte-wi0lrc{display:flex;justify-content:space-between;align-items:center}input.svelte-wi0lrc.svelte-wi0lrc{text-align:center;width:40px}.disabled.svelte-wi0lrc>.player-name.svelte-wi0lrc{text-decoration:line-through}.disabled.svelte-wi0lrc.svelte-wi0lrc{color:var(--text-faint)}.player-right.svelte-wi0lrc.svelte-wi0lrc{display:flex;align-items:center;gap:0.25rem}.add-player.svelte-wi0lrc.svelte-wi0lrc{display:flex;align-items:center;justify-content:flex-end}")}function g5(i,e,t){let n=i.slice();return n[21]=e[t],n[23]=t,n}function O5(i,e,t){let n=i.slice();return n[21]=e[t],n}function m$(i){let e;return{c(){e=b("h5"),e.textContent="Players",v(e,"class","player-header"),v(e,"slot","title")},m(t,n){A(t,e,n)},p:X,d(t){t&&T(e)}}}function g$(i){let e,t,n,r;return{c(){e=b("div")},m(s,o){A(s,e,o),n||(r=H(t=i[7].call(null,e)),n=!0)},d(s){s&&T(e),n=!1,r()}}}function O$(i){let e,t,n,r;return{c(){e=b("div")},m(s,o){A(s,e,o),n||(r=H(t=i[8].call(null,e)),n=!0)},d(s){s&&T(e),n=!1,r()}}}function v$(i){let e,t,n,r;return{c(){e=b("div")},m(s,o){A(s,e,o),n||(r=H(t=i[9].call(null,e)),n=!0)},d(s){s&&T(e),n=!1,r()}}}function v5(i,e){let t,n,r=e[21].name+"",s,o,a,l,c=e[21].level+"",u,f,d,h,p,m;function g(C,k){return C[21].enabled?v$:O$}let O=g(e,-1),w=O(e);function S(){return e[14](e[21])}return{key:i,first:null,c(){t=b("div"),n=b("span"),s=ae(r),o=M(),a=b("div"),l=b("span"),u=ae(c),f=M(),d=b("div"),w.c(),v(n,"class","player-name svelte-wi0lrc"),v(d,"class","clickable-icon setting-editor-extra-setting-button"),v(d,"aria-label",h=e[21].enabled?"Disable":"Enable"),v(a,"class","player-right svelte-wi0lrc"),v(t,"class","player svelte-wi0lrc"),ge(t,"disabled",!e[21].enabled),this.first=t},m(C,k){A(C,t,k),y(t,n),y(n,s),y(t,o),y(t,a),y(a,l),y(l,u),y(a,f),y(a,d),w.m(d,null),p||(m=U(d,"click",S),p=!0)},p(C,k){e=C,k&2&&r!==(r=e[21].name+"")&&me(s,r),k&2&&c!==(c=e[21].level+"")&&me(u,c),O!==(O=g(e,k))&&(w.d(1),w=O(e),w&&(w.c(),w.m(d,null))),k&2&&h!==(h=e[21].enabled?"Disable":"Enable")&&v(d,"aria-label",h),k&2&&ge(t,"disabled",!e[21].enabled)},d(C){C&&T(t),w.d(),p=!1,m()}}}function y$(i){let e,t,n,r;return{c(){e=b("div")},m(s,o){A(s,e,o),n||(r=H(t=i[8].call(null,e)),n=!0)},d(s){s&&T(e),n=!1,r()}}}function b$(i){let e,t,n,r;return{c(){e=b("div")},m(s,o){A(s,e,o),n||(r=H(t=i[9].call(null,e)),n=!0)},d(s){s&&T(e),n=!1,r()}}}function y5(i){let e,t,n,r,s,o,a,l,c,u,f,d,h,p,m,g,O,w,S,C,k,_,P;function x(...z){return i[15](i[21],...z)}function R(...z){return i[16](i[21],...z)}function Z(z,q){return z[21].enabled?b$:y$}let Q=Z(i,-1),D=Q(i);function E(){return i[17](i[21])}function j(){return i[18](i[21])}return{c(){e=b("div"),t=b("input"),r=M(),s=b("span"),s.textContent="Player(s)",o=M(),a=b("div"),c=M(),u=b("span"),u.textContent="Level",f=M(),d=b("input"),p=M(),m=b("div"),g=b("div"),D.c(),w=M(),S=b("div"),C=b("div"),v(t,"type","number"),t.value=n=i[21].count,v(t,"min","1"),v(t,"class","svelte-wi0lrc"),v(d,"type","number"),d.value=h=i[21].level,v(d,"min","1"),v(d,"class","svelte-wi0lrc"),v(g,"class","clickable-icon setting-editor-extra-setting-button"),v(g,"aria-label",O=i[21].enabled?"Disable":"Enable"),v(S,"class","clickable-icon setting-editor-extra-setting-button"),v(m,"class","player-right svelte-wi0lrc"),v(e,"class","player svelte-wi0lrc"),ge(e,"disabled",!i[21].enabled)},m(z,q){A(z,e,q),y(e,t),y(e,r),y(e,s),y(e,o),y(e,a),y(e,c),y(e,u),y(e,f),y(e,d),y(e,p),y(e,m),y(m,g),D.m(g,null),y(m,w),y(m,S),y(S,C),_||(P=[U(t,"input",x),H(l=i[12].call(null,a)),U(d,"input",R),U(g,"click",E),H(k=i[13].call(null,C)),U(S,"click",j)],_=!0)},p(z,q){i=z,q&4&&n!==(n=i[21].count)&&t.value!==n&&(t.value=n),q&4&&h!==(h=i[21].level)&&d.value!==h&&(d.value=h),Q!==(Q=Z(i,q))&&(D.d(1),D=Q(i),D&&(D.c(),D.m(g,null))),q&4&&O!==(O=i[21].enabled?"Disable":"Enable")&&v(g,"aria-label",O),q&4&&ge(e,"disabled",!i[21].enabled)},d(z){z&&T(e),D.d(),_=!1,de(P)}}}function _$(i){let e,t,n,r,s=[],o=new Map,a,l,c,u,f,d,h,p=i[6].length&&g$(i),m=fe(i[1]),g=S=>S[21].name;for(let S=0;St(1,n=x)),Se(i,o,x=>t(2,r=x));let a=Ue("plugin"),l=a.data.builder.showParty,c=a.data.defaultParty,u=a.data.parties;return a.getPlayersForParty(c).forEach(x=>{Ni.add({level:x.level,name:x.name,...x.creature,isPlayer:!0,enabled:!0,count:1})}),[a,n,r,s,o,l,u,x=>{new mo.Setting(x).setName("Select a party").addDropdown(R=>{R.addOption("none","None").addOptions(Object.fromEntries(u.map(Z=>[Z.name,Z.name]))).onChange(Z=>{Ni.switchParty(a.getPlayersForParty(Z).map(Q=>({level:Q.level,name:Q.name,...Q.creature,isPlayer:!0,enabled:!0,count:1})))}),c&&R.setValue(c)})},x=>{(0,mo.setIcon)(x,Ql)},x=>{(0,mo.setIcon)(x,Dl)},x=>{(0,mo.setIcon)(x,"plus-with-circle")},()=>{Ni.add({isPlayer:!1,level:1,count:1,enabled:!0})},x=>{(0,mo.setIcon)(x,"x")},x=>{(0,mo.setIcon)(x,"x-square")},x=>Ni.toggleEnabled(x),(x,R)=>Ni.set(x,Number(R.currentTarget.value)),(x,R)=>Ni.setLevel(x,Number(R.currentTarget.value)),x=>Ni.toggleEnabled(x),x=>Ni.remove(x),()=>t(0,a.data.builder.showParty=!a.data.builder.showParty,a)]}var gy=class extends ne{constructor(e){super(),re(this,e,k$,w$,ie,{},p$)}},b5=gy;function S$(i){se(i,"svelte-jz7gin",".players-xp.svelte-jz7gin{display:grid;grid-template-columns:1fr 1fr}")}function x$(i){let e,t,n,r,s,o;return n=new b5({}),s=new m5({}),{c(){e=b("div"),t=b("div"),ye(n.$$.fragment),r=M(),ye(s.$$.fragment),v(t,"class","players-xp svelte-jz7gin"),v(e,"class","player-component-container")},m(a,l){A(a,e,l),y(e,t),Oe(n,t,null),y(t,r),Oe(s,t,null),o=!0},p:X,i(a){o||($(n.$$.fragment,a),$(s.$$.fragment,a),o=!0)},o(a){V(n.$$.fragment,a),V(s.$$.fragment,a),o=!1},d(a){a&&T(e),ve(n),ve(s)}}}var Oy=class extends ne{constructor(e){super(),re(this,e,null,x$,ie,{},S$)}},_5=Oy;function P$(i){se(i,"svelte-95ft2e",".encounter-builder.svelte-95ft2e{margin:1rem}")}function C$(i){let e,t,n,r,s,o,a;return t=new _5({}),r=new r5({}),o=new U3({}),{c(){e=b("div"),ye(t.$$.fragment),n=M(),ye(r.$$.fragment),s=M(),ye(o.$$.fragment),v(e,"class","initiative-tracker encounter-builder markdown-rendered svelte-95ft2e")},m(l,c){A(l,e,c),Oe(t,e,null),y(e,n),Oe(r,e,null),y(e,s),Oe(o,e,null),a=!0},p:X,i(l){a||($(t.$$.fragment,l),$(r.$$.fragment,l),$(o.$$.fragment,l),a=!0)},o(l){V(t.$$.fragment,l),V(r.$$.fragment,l),V(o.$$.fragment,l),a=!1},d(l){l&&T(e),ve(t),ve(r),ve(o)}}}function E$(i,e,t){let{plugin:n}=e,r=n.bestiary,s=ck(n,[...r]);Vi("table",s);let o=yw(s.creatures,n);return Vi("filters",o),n.data.builder||(n.data.builder={sidebarIcon:!0,showParty:!0,showXP:!0}),Vi("plugin",n),ff(()=>{Ni.empty()}),i.$$set=a=>{"plugin"in a&&t(0,n=a.plugin)},[n]}var vy=class extends ne{constructor(e){super(),re(this,e,E$,C$,ie,{plugin:0},P$)}},yy=vy;var _l=class extends w5.ItemView{constructor(t,n){super(t);this.plugin=n;J(this,"ui")}getState(){return{encounter:[...ut(ii).entries()]}}async setState(t,n){let r=Array.isArray(t)?t:t?.encounter;r&&Array.isArray(r)&&ii.setMultiple(r),super.setState(t,n)}async onOpen(){if(this.plugin.canUseStatBlocks&&!window.FantasyStatblocks.isResolved()){this.contentEl.addClasses(["waiting-for-bestiary","is-loading"]);let t=this.contentEl.createEl("p",{text:"Waiting for Fantasy Statblocks Bestiary..."}),n=window.FantasyStatblocks.onResolved(()=>{this.contentEl.removeClasses(["waiting-for-bestiary","is-loading"]),t.detach(),this.ui=new yy({target:this.contentEl,props:{plugin:this.plugin}}),n()})}else this.ui=new yy({target:this.contentEl,props:{plugin:this.plugin}})}async onClose(){this.ui?.$destroy()}getDisplayText(){return"Encounter Builder"}getIcon(){return nr}getViewType(){return nr}};var T5=require("obsidian");var Ru=require("obsidian");function T$(i){se(i,"svelte-1frc5is",".full-center.svelte-1frc5is{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.initiative-tracker-table.svelte-1frc5is{padding:0.5rem;align-items:center;gap:0.25rem 0.5rem;width:100%;margin-left:0rem;table-layout:fixed;border-collapse:separate;border-spacing:0 2px;font-size:larger}.left.svelte-1frc5is{text-align:left}.name.svelte-1frc5is,.name.svelte-1frc5is>svg{display:flex;align-items:center;gap:0.5rem}.center.svelte-1frc5is{text-align:center}.healthy.svelte-1frc5is{color:var(--text-success)}.hurt.svelte-1frc5is{color:var(--text-warning)}.bloodied.svelte-1frc5is{color:var(--text-error)}.defeated.svelte-1frc5is{color:var(--text-faint)}.active.svelte-1frc5is{background-color:rgba(0, 0, 0, 0.1)}.theme-dark .active.svelte-1frc5is{background-color:rgba(255, 255, 255, 0.1)}")}function S5(i,e,t){let n=i.slice();return n[14]=e[t],n}function x5(i){let e,t,n,r,s;return{c(){e=b("div"),v(e,"class","contains-icon"),v(e,"aria-label",t="This creature is an ally.")},m(o,a){A(o,e,a),r||(s=H(n=i[11].call(null,e)),r=!0)},d(o){o&&T(e),r=!1,s()}}}function A$(i){let e,t=i[8](i[14].hp,i[14].max)+"",n;return{c(){e=b("span"),n=ae(t)},m(r,s){A(r,e,s),y(e,n)},p(r,s){s&1&&t!==(t=r[8](r[14].hp,r[14].max)+"")&&me(n,t)},d(r){r&&T(e)}}}function D$(i){let e,t=i[14].hpDisplay+"";return{c(){e=b("div"),v(e,"class","center svelte-1frc5is")},m(n,r){A(n,e,r),e.innerHTML=t},p(n,r){r&1&&t!==(t=n[14].hpDisplay+"")&&(e.innerHTML=t)},d(n){n&&T(e)}}}function P5(i,e){let t,n,r=e[14].initiative+"",s,o,a,l,c=e[10](e[14])+"",u,f,d,h,p,m,g=[...e[14].status].map(C5).join(", ")+"",O,w,S=e[14].friendly&&x5(e);function C(P,x){return P[14].player&&P[2].diplayPlayerHPValues?D$:A$}let k=C(e,-1),_=k(e);return{key:i,first:null,c(){t=b("tr"),n=b("td"),s=ae(r),o=M(),a=b("td"),S&&S.c(),l=M(),u=ae(c),f=M(),d=b("td"),_.c(),p=M(),m=b("td"),O=ae(g),w=M(),v(n,"class","center svelte-1frc5is"),v(a,"class","name svelte-1frc5is"),v(d,"class",h=un(e[8](e[14].hp,e[14].max).toLowerCase())+" svelte-1frc5is"),ge(d,"center",!0),v(m,"class","center svelte-1frc5is"),v(t,"class","svelte-1frc5is"),ge(t,"active",e[9](e[14])&&e[1]),this.first=t},m(P,x){A(P,t,x),y(t,n),y(n,s),y(t,o),y(t,a),S&&S.m(a,null),y(a,l),y(a,u),y(t,f),y(t,d),_.m(d,null),y(t,p),y(t,m),y(m,O),y(t,w)},p(P,x){e=P,x&1&&r!==(r=e[14].initiative+"")&&me(s,r),e[14].friendly?S||(S=x5(e),S.c(),S.m(a,l)):S&&(S.d(1),S=null),x&1&&c!==(c=e[10](e[14])+"")&&me(u,c),k===(k=C(e,x))&&_?_.p(e,x):(_.d(1),_=k(e),_&&(_.c(),_.m(d,null))),x&1&&h!==(h=un(e[8](e[14].hp,e[14].max).toLowerCase())+" svelte-1frc5is")&&v(d,"class",h),x&1&&ge(d,"center",!0),x&1&&g!==(g=[...e[14].status].map(C5).join(", ")+"")&&me(O,g),x&515&&ge(t,"active",e[9](e[14])&&e[1])},d(P){P&&T(t),S&&S.d(),_.d()}}}function Q$(i){let e,t,n,r,s,o,a,l,c,u,f,d,h,p,m,g=[],O=new Map,w,S,C,k,_=fe(i[0]),P=x=>x[14].id;for(let x=0;x<_.length;x+=1){let R=S5(i,_,x),Z=P(R);O.set(Z,g[x]=P5(Z,R))}return{c(){e=b("table"),t=b("thead"),n=b("th"),r=b("strong"),o=M(),a=b("th"),a.innerHTML="Name",l=M(),c=b("th"),u=b("strong"),d=M(),h=b("th"),h.innerHTML="Statuses",p=M(),m=b("tbody");for(let x=0;x{S&&(w||(w=Po(e,Bf,{},!0)),w.run(1))}),S=!0)},o(x){x&&(w||(w=Po(e,Bf,{},!1)),w.run(0)),S=!1},d(x){x&&T(e);for(let R=0;Ri.name;function R$(i,e,t){let n,r,s,o,{state:a,ordered:l,data:c}=he;Se(i,a,O=>t(1,s=O)),Se(i,l,O=>t(12,r=O)),Se(i,c,O=>t(2,o=O));let u=O=>{(0,Ru.setIcon)(O,an)},f=O=>{(0,Ru.setIcon)(O,ir)},d=O=>{(0,Ru.setIcon)(O,So)},h=(O,w)=>O?O<=0?"Defeated":O{if(O.hidden)return!1;if(O.active)return!0;let w=r.findIndex(k=>k.active),S=r.indexOf(O);return w==-1||wk.hidden)},m=O=>O.getName(),g=O=>{(0,Ru.setIcon)(O,tr)};return i.$$.update=()=>{i.$$.dirty&4096&&t(0,n=r.filter(O=>O.enabled&&!O.hidden))},[n,s,o,a,l,c,u,d,h,p,m,g,r]}var by=class extends ne{constructor(e){super(),re(this,e,R$,Q$,ie,{},T$)}},E5=by;var Mu=class extends T5.ItemView{constructor(t,n){super(t);this.leaf=t;this.plugin=n;J(this,"_app")}getDisplayText(){return"Player View"}getViewType(){return Ds}getIcon(){return"lucide-view"}async onOpen(){this._app=new E5({target:this.contentEl,props:{}})}async onClose(){this._app?.$destroy()}};var _p=require("obsidian");var bp=class extends _p.EditorSuggest{constructor(t){super(t.app);this.plugin=t;J(this,"_context",5);J(this,"_encounter",{})}getSuggestions(t){let n=[];switch(this._context){case 4:{n=[];break}case 0:n=[...this.plugin.players.keys()].filter(r=>!this._encounter.players?.includes(r));break;case 1:n=this.plugin.bestiaryNames;break;case 2:n=["false",...this.plugin.data.parties?.map(r=>r.name)];break;case 3:n=["true","false"];break;case 5:n=["players","creatures","party","rollHP","name"].filter(r=>!(r in this._encounter));break}return n.filter(r=>!t.query.length||r.toLowerCase().contains(t.query.toLowerCase()))}renderSuggestion(t,n){n.createSpan({text:t})}selectSuggestion(t,n){if(this.context){switch(this._context){case 5:{t=`${t}:`,/^(players|creatures):/.test(t)?t=`${t} + - `:t=`${t} `;break}case 1:case 0:{let r=this.context.editor.getLine(this.context.start.line).search(/\S/);t=`${t} +${" ".repeat(r)}- `;break}case 2:case 3:{t=`${/\s$/.test(this.context.editor.getLine(this.context.start.line))?"":" "}${t.trim()}`;break}case 4:break}this.context.editor.replaceRange(`${t}`,this.context.start,{...this.context.end,ch:this.context.start.ch+this.context.query.length},"initiative-tracker"),this.context.editor.setCursor(this.context.start.line,this.context.start.ch+t.length),this.close()}}onTrigger(t,n,r){this._context=5;let s=n.getRange({line:0,ch:0},t);if(s.indexOf("```encounter\n")===-1)return null;let o=s.split(` +`),a=!1,l;for(let u=o.length-1;u>=0;u--){let f=o[u];if(/^```$/.test(f))return null;if(/^```encounter/.test(f)){a=!0,l=u;break}}if(!a)return null;try{let u=n.getValue().split(` +`);u.splice(t.line,1),u=u.slice(l+1);let f=u.findIndex(d=>/^```$/.test(d));f<0&&(f=u.length),this._encounter=(0,_p.parseYaml)(u.slice(0,f).join(` +`))}catch{this._encounter={}}this._encounter||(this._encounter={});let c=n.getLine(t.line);if(/^name/.test(c))return null;if(/^rollHP:/.test(c)){this._context=3;let[u,f]=c.match(/^rollHP:\s?(.*)$/);return f==="true"||f==="false"?null:{end:t,start:{ch:c.length-f.length,line:t.line},query:f}}if(/^party:/.test(c)){this._context=2;let[u,f]=c.match(/^party:\s?(.*)$/);return this.plugin.data.parties.find(d=>d.name===f)?null:{end:t,start:{ch:c.length-f.length,line:t.line},query:f}}if(/\s+- (?:\d:)?/.test(c)){let u=!1;for(let h=o.length-1;h>=0;h--){let p=o[h];if(/^```$/.test(p)||/^```encounter/.test(p))return null;if(/^players:/.test(p)){this._context=0,u=!0;break}if(/^creatures:/.test(p)){this._context=1,u=!0;break}}if(!u)return null;let[f,d]=c.match(/^\s+- (?:\d:)?(.*)$/);return{end:t,start:{ch:c.length-d.length,line:t.line},query:d}}return{end:t,start:{ch:0,line:t.line},query:c}}};var Iu,wp=class{constructor(e){this.plugin=e;Tl(this,Iu,he);(window.InitiativeTracker=this)&&this.plugin.register(()=>delete window.InitiativeTracker)}addCreatures(e,t=this.plugin.data.rollHP){if(!e||!Array.isArray(e)||!e.length)throw new Error("Creatures must be an array.");Fu(this,Iu).add(this.plugin,t,...e.map(n=>je.from(n)))}newEncounter(e){e?.creatures&&(e.creatures=e.creatures.map(t=>je.from(t).toJSON())),Fu(this,Iu).new(this.plugin,e)}};Iu=new WeakMap;var kp=class extends tn.Plugin{constructor(){super(...arguments);J(this,"api",new wp(this));J(this,"data");J(this,"tracker",he);J(this,"playerCreatures",new Map);J(this,"lastCombatantLeaf",null);J(this,"watchers",new Map);J(this,"_builderIcon")}getRoller(t){if(!this.canUseDiceRoller)return;let n=window.DiceRoller.getRoller(t,"statblock");return n===null?null:n}get canUseDiceRoller(){if(window.DiceRoller!=null)if(!window.DiceRoller.getRoller)new tn.Notice("Please update Dice Roller to the latest version to use with Initiative Tracker.");else return!0;return!1}getInitiativeValue(t=0){let n=Math.floor(Math.random()*19+1)+[t].flat().reduce((a,l)=>a+l,0);if(!this.canUseDiceRoller)return n;let r=this.data.initiative;if(typeof t=="number")r=r.replace(/%mod\d?%/g,`${t}`);else for(let a=0;an.name===t)?.players??[]}getPlayersForParty(t){return this.data.parties?.find(n=>n.name==t)?.players.map(n=>this.getPlayerByName(n))?.filter(n=>n)??[]}get canUseStatBlocks(){return this.app.plugins.enabledPlugins.has("obsidian-5e-statblocks")?(window.FantasyStatblocks?.getVersion()?.major??0)>=4:!1}get statblockVersion(){return window.FantasyStatblocks?.getVersion()??{major:0}}get statblock_creatures(){return window.FantasyStatblocks?window.FantasyStatblocks.getBestiaryCreatures():[]}get bestiary(){return this.statblock_creatures.filter(t=>!t.player&&t.bestiary!==!1)}addEncounter(t,n){this.data.encounters[t]=n,this.registerCommand(t)}removeEncounter(t){delete this.data.encounters[t],this.unregisterCommandsFor(t)}registerCommand(t){this.addCommand({id:`start-${t}`,name:`Start ${t}`,checkCallback:n=>{if(n)return t in this.data.encounters;t in this.data.encounters&&he.new(this,this.data.encounters[t])}})}unregisterCommandsFor(t){this.app.commands.findCommand(`initiative-tracker:start-${t}`)&&delete this.app.commands.commands[`initiative-tracker:start-${t}`]}get bestiaryNames(){return window.FantasyStatblocks?window.FantasyStatblocks.getBestiaryNames():[]}get view(){let t=this.app.workspace.getLeavesOfType(Mn),n=t?.length?t[0]:null;if(n&&n.view&&n.view instanceof Na)return n.view}get combatant(){let t=this.app.workspace.getLeavesOfType(ko),n=t?.length?t[0]:null;if(n&&n.view&&n.view instanceof ja)return n.view}get defaultParty(){return this.data.parties.find(t=>t.name==this.data.defaultParty)}getBaseCreatureFromBestiary(t){try{if(this.canUseStatBlocks&&window.FantasyStatblocks.hasCreature(t))return window.FantasyStatblocks.getCreatureFromBestiary(t)}catch{}return null}getCreatureFromBestiary(t){let n=this.getBaseCreatureFromBestiary(t);if(n)return je.from(n)}getCreatureFromBestiaryByDefinition(t){return t.player&&this.playerCreatures.has(t.name)?this.playerCreatures.get(t.name):this.getCreatureFromBestiary(t.name)??je.from(t)}get statblock_players(){return this.statblock_creatures.filter(t=>t.player).map(t=>[t.name,je.from(t)])}get players(){return new Map([...this.playerCreatures.entries(),...this.statblock_players])}async onload(){Py(),await this.loadSettings(),this.setBuilderIcon(),this.addSettingTab(new Bl(this)),this.registerView(Mn,t=>new Na(t,this)),this.registerView(Ds,t=>new Mu(t,this)),this.registerView(ko,t=>new ja(t,this)),this.registerView(nr,t=>new _l(t,this)),this.registerHoverLinkSource(Mn,{display:"Initiative Tracker",defaultMod:!1}),this.addCommands(),this.addEvents(),this.registerEditorSuggest(new bp(this)),this.registerMarkdownCodeBlockProcessor("encounter",(t,n,r)=>{if(this.canUseStatBlocks&&!window.FantasyStatblocks.isResolved()){n.addClasses(["waiting-for-bestiary","is-loading"]);let s=n.createEl("p",{text:"Waiting for Fantasy Statblocks Bestiary..."}),o=window.FantasyStatblocks.onResolved(()=>{n.removeClasses(["waiting-for-bestiary","is-loading"]),s.detach();let a=new Co(this,t,n);r.addChild(a),o()})}else{let s=new Co(this,t,n);r.addChild(s)}}),this.registerMarkdownCodeBlockProcessor("encounter-table",(t,n,r)=>{if(this.canUseStatBlocks&&!window.FantasyStatblocks.isResolved()){n.addClasses(["waiting-for-bestiary","is-loading"]);let s=n.createEl("p",{text:"Waiting for Fantasy Statblocks Bestiary..."}),o=window.FantasyStatblocks.onResolved(()=>{n.removeClasses(["waiting-for-bestiary","is-loading"]),s.detach();let a=new Co(this,t,n,!0);r.addChild(a),o()})}else{let s=new Co(this,t,n,!0);r.addChild(s)}}),this.registerMarkdownPostProcessor(async(t,n)=>{if(!t||!t.firstElementChild)return;let r=t.querySelectorAll("code");if(!r||!r.length)return;let s=Array.from(r).filter(o=>/^encounter:\s/.test(o.innerText));if(s.length)for(let o of s){let a=createSpan("initiative-tracker-encounter-line");o.replaceWith(a);let l=async()=>{let c=o.innerText.replace("encounter:",""),u=(0,tn.parseYaml)("["+c.trim()+"]"),d=await new Fl(this).parse({creatures:u});if(!d||!d.creatures||!d.creatures.size){a.setText("No creatures found.");return}new Sb({target:a,props:{...d,plugin:this}})};if(this.canUseStatBlocks&&!window.FantasyStatblocks.isResolved()){let c=a.createSpan("waiting-for-bestiary inline"),u=Math.floor(200*Math.random());(0,tn.setIcon)(c.createDiv({cls:"icon",attr:{style:`animation-delay: ${u}ms`}}),"loader-2"),c.createEl("em",{text:"Loading Bestiary..."});let f=window.FantasyStatblocks.onResolved(()=>{t.removeClasses(["waiting-for-bestiary","inline"]),c.detach(),l(),f()})}else l()}}),this.playerCreatures=new Map(this.data.players.map(t=>[t.name,je.from(t)])),this.app.workspace.onLayoutReady(async()=>{this.addTrackerView();for(let t of this.data.players){if(t.path||!t.note)continue;let n=await this.app.metadataCache.getFirstLinkpathDest(t.note,"");if(!n||!this.app.metadataCache.getFileCache(n)?.frontmatter){new tn.Notice(`Initiative Tracker: There was an issue with the linked note for ${t.name}. + +Please re-link it in settings.`);continue}}this.registerEvent(this.app.metadataCache.on("changed",t=>{if(!(t instanceof tn.TFile))return;let n=this.data.players.filter(s=>s.path==t.path);if(!n.length)return;let r=this.app.metadataCache.getFileCache(t)?.frontmatter;if(r)for(let s of n){let{ac:o,hp:a,modifier:l,level:c,name:u}=r;if(s.ac=o,s.hp=a,s.modifier=l,s.level=c,s.name=u||s.name,s["statblock-link"]=r["statblock-link"],this.playerCreatures.set(s.name,je.from(s)),this.view){let f=he.getOrderedCreatures().find(d=>d.name==s.name);f&&he.updateCreatures({creature:f,change:{set_max_hp:s.hp,ac:s.ac}})}}})),this.registerEvent(this.app.vault.on("rename",(t,n)=>{if(!(t instanceof tn.TFile))return;let r=this.data.players.filter(s=>s.path==n);if(r.length)for(let s of r)s.path=t.path,s.note=t.basename})),this.registerEvent(this.app.vault.on("delete",t=>{if(!(t instanceof tn.TFile))return;let n=this.data.players.filter(r=>r.path==t.path);if(n.length)for(let r of n)r.path=null,r.note=null}))}),console.log("Initiative Tracker v"+this.manifest.version+" loaded")}addCommands(){this.addCommand({id:"open-tracker",name:"Open Initiative Tracker",checkCallback:t=>{if(!this.view)return t||this.addTrackerView(),!0}}),this.addCommand({id:"open-builder",name:"Open Encounter Builder",checkCallback:t=>{if(!this.builder)return t||this.addBuilderView(),!0}}),this.addCommand({id:"toggle-encounter",name:"Toggle Encounter",checkCallback:t=>{if(this.view)return t||he.toggleState(),!0}}),this.addCommand({id:"next-combatant",name:"Next Combatant",checkCallback:t=>{if(this.view&&he.getState())return t||he.goToNext(),!0}}),this.addCommand({id:"prev-combatant",name:"Previous Combatant",checkCallback:t=>{if(this.view&&he.getState())return t||he.goToPrevious(),!0}});for(let t in this.data.encounters)this.registerCommand(t)}addEvents(){this.registerEvent(this.app.workspace.on("initiative-tracker:should-save",async()=>await this.saveSettings())),this.registerEvent(this.app.workspace.on("initiative-tracker:save-state",async t=>{this.data.state=t,await this.saveSettings()})),this.registerEvent(this.app.workspace.on("initiative-tracker:start-encounter",async t=>{try{let n=t.map(s=>je.from(s).toJSON()),r=this.view;r||await this.addTrackerView(),r?(he?.new(this,{creatures:n,state:!1,name:null,round:1,logFile:null,roll:!0}),this.app.workspace.revealLeaf(r.leaf)):new tn.Notice("Could not find the Initiative Tracker. Try reloading the note!")}catch(n){new tn.Notice(`There was an issue launching the encounter. + +`+n.message),console.error(n);return}}))}async onunload(){await this.saveSettings(),this.app.workspace.detachLeavesOfType(Mn),this.app.workspace.detachLeavesOfType(Ds),this.app.workspace.detachLeavesOfType(ko),this.app.workspace.detachLeavesOfType(nr),this.app.workspace.trigger("initiative-tracker:unloaded"),console.log("Initiative Tracker unloaded")}async addTrackerView(){this.app.workspace.getLeavesOfType(Mn)?.length||await this.app.workspace.ensureSideLeaf(Mn,"right",{active:!1})}get builder(){let t=this.app.workspace.getLeavesOfType(nr),n=t.length?t[0]:null;if(n&&n.view&&n.view instanceof _l)return n.view}async addBuilderView(){this.app.workspace.getLeavesOfType(nr)?.length||(await this.app.workspace.getLeaf(!0).setViewState({type:nr}),this.app.workspace.revealLeaf(this.builder.leaf))}async updatePlayer(t,n){if(!this.playerCreatures.has(t.name)){await this.savePlayer(n);return}let r=this.playerCreatures.get(t.name);r.update(n),this.data.players.splice(this.data.players.indexOf(t),1,n),this.playerCreatures.delete(t.name),this.playerCreatures.set(n.name,r),this.view&&he.updateState(),await this.saveSettings()}async savePlayer(t){this.data.players.push(t),this.playerCreatures.set(t.name,je.from(t)),await this.saveSettings()}async savePlayers(...t){for(let n of t)this.data.players.push(n),this.playerCreatures.set(n.name,je.from(n));await this.saveSettings()}async deletePlayer(t){this.data.players=this.data.players.filter(n=>n!=t),this.playerCreatures.delete(t.name),await this.saveSettings()}async loadSettings(){let t=Object.assign({},{...xy},await this.loadData());if(this.data=t,this.data.statuses?.some(n=>!n.id)){for(let n of this.data.statuses)n.id=n.id??ls.find(r=>r.name==n.name)?.id??xt();await this.saveSettings()}this.data.version=this.manifest.version.split(".").map(n=>Number(n))}async saveSettings(){await this.saveData(this.data),he.setData(this.data)}getActiveCombatant(){return this.lastCombatantLeaf?.view instanceof ja?this.lastCombatantLeaf.view:this.combatant}async openCombatant(t,n=!1){if(!this.canUseStatBlocks)return;let r=this.getActiveCombatant();if(n||!r){let s=this.app.workspace.getRightLeaf(!0);await s.setViewState({type:ko}),this.lastCombatantLeaf=s,await s.view.render(t),this.app.workspace.revealLeaf(s)}else this.lastCombatantLeaf=r.leaf,await r.render(t),this.app.workspace.revealLeaf(r.leaf)}setBuilderIcon(){this.data.builder.sidebarIcon?this._builderIcon=this.addRibbonIcon(nr,"Initiative Tracker Encounter Builder",()=>{this.addBuilderView()}):this._builderIcon?.detach()}}; +/*! Bundled license information: + +uri-js/dist/es5/uri.all.js: + (** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js *) +*/ + +/* nosourcemap */ \ No newline at end of file diff --git a/.obsidian/plugins/initiative-tracker/manifest.json b/.obsidian/plugins/initiative-tracker/manifest.json new file mode 100644 index 0000000..fc3d888 --- /dev/null +++ b/.obsidian/plugins/initiative-tracker/manifest.json @@ -0,0 +1,10 @@ +{ + "id": "initiative-tracker", + "name": "Initiative Tracker", + "version": "13.0.21", + "minAppVersion": "1.7.2", + "author": "Jeremy Valentine", + "description": "TTRPG Initiative Tracker for Obsidian.md", + "authorUrl": "https://github.com/valentine195/obsidian-initiative-tracker", + "isDesktopOnly": false +} diff --git a/.obsidian/plugins/initiative-tracker/styles.css b/.obsidian/plugins/initiative-tracker/styles.css new file mode 100644 index 0000000..eebd5f3 --- /dev/null +++ b/.obsidian/plugins/initiative-tracker/styles.css @@ -0,0 +1 @@ +body{--text-warning: #eaaf00;--text-success: green}.status-metadata-container,.status-name-container{display:flex;gap:.5rem}.initiative-tracker-add-player-modal .has-error{border-color:var(--background-modifier-error-hover)}.initiative-tracker-additional-container{border-bottom:0px solid var(--background-modifier-border);padding:18px 0;background-color:inherit}.initiative-tracker-additional-container .initiative-tracker-players{display:grid;grid-template-columns:3fr 1fr 1fr 1fr 1fr auto;gap:.5rem}.initiative-tracker-settings .initiative-tracker-additional-container .initiative-tracker-players .initiative-tracker-player{display:contents}.initiative-tracker-settings .initiative-tracker-additional-container .initiative-tracker-players .initiative-tracker-player>*:not(:first-child){text-align:center}.initiative-tracker-settings .initiative-tracker-additional-container .initiative-tracker-players .initiative-tracker-player .initiative-tracker-player-icon{display:grid;grid-template-columns:auto auto;gap:.5rem}.initiative-tracker-settings .initiative-tracker-additional-container .initiative-tracker-players .initiative-tracker-player .initiative-tracker-player-icon.imported{display:flex;justify-content:center;width:auto;color:var(--text-success)}.initiative-tracker-settings .initiative-tracker-additional-container .initiative-tracker-players .initiative-tracker-player.headers{font-weight:bolder}.initiative-tracker-settings .initiative-tracker-additional-container .initiative-tracker-players .initiative-tracker-player.headers .clickable-icon,.initiative-tracker-settings .initiative-tracker-additional-container .initiative-tracker-players .initiative-tracker-player.headers .clickable-icon:hover{color:var(--text-normal)}.initiative-tracker-settings .initiative-synced{border-top:0px;margin:0 2rem;padding-top:0}.initiative-tracker-settings .initiative-synced .setting-item-name{color:var(--interactive-success);display:grid;grid-template-columns:auto 1fr;align-items:center;gap:.5rem}.initiative-tracker-settings .initiative-tracker-monster-filter{position:sticky;top:-5px;padding-top:5px;background-color:inherit;z-index:1}.initiative-tracker-settings .initiative-tracker-file-upload>input[type=file]{display:none}.initiative-tracker-additional-container>.additional{margin:6px 12px}.initiative-tracker-additional-container>.additional>.setting-item{border-top:0;padding-top:9px}.initiative-tracker-additional-container>.additional>.setting-item>.setting-item-control>*:first-child{margin:0 6px}.initiative-tracker-settings .initiative-status-item .setting-item-description{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;word-break:keep-all;overflow:hidden}.tooltip.initiative-tracker-condition-tooltip{text-align:left;word-break:keep-all}.block-language-encounter .encounter-container{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}.initiative-tracker-settings .coffee{width:60%;color:var(--text-faint);margin:1rem auto;text-align:center}.initiative-tracker-settings .coffee img{height:30px}.creature-view-container{padding:.5rem}.creature-view-container .creature-statblock-container{display:flex;justify-content:center}.creature-view-container .statblock .column{max-width:400px;width:100%}.creature-view-container .creature-view-button{display:flex;justify-content:flex-end;position:absolute;right:5px;top:5px}.initiative-tracker-encounter-line{display:inline-block}.initiative-tracker-settings details>summary{outline:none;display:block!important;list-style:none!important;list-style-type:none!important;min-height:1rem;border-top-left-radius:.1rem;border-top-right-radius:.1rem;cursor:pointer;position:relative}.initiative-tracker-settings details>summary::-webkit-details-marker,.initiative-tracker-settings details>summary::marker{display:none!important}.initiative-tracker-settings details>summary>.collapser{position:absolute;top:50%;right:8px;transform:translateY(-50%);content:""}.initiative-tracker-settings details>summary>.collapser>.handle{transform:rotate(0);transition:transform .25s;background-color:currentColor;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-image:var(--admonition-details-icon);mask-image:var(--admonition-details-icon);width:20px;height:20px}.initiative-tracker-settings details[open]>summary>.collapser>.handle{transform:rotate(90deg)}.initiative-tracker-settings details>summary{border-bottom:1px solid var(--background-modifier-border)}.initiative-tracker-warning{color:var(--text-error);display:flex;gap:.25rem;align-items:center}.initiative-tracker-settings details>summary+.setting-item,.initiative-tracker-explanation+.setting-item{border-top:0}.initiative-tracker-explanation{padding-top:16px}.initiative-tracker-cancel{display:flex;justify-content:flex-end}.initiative-tracker-textarea+.cm-editor{height:200px;margin-bottom:1rem}.initiative-tracker.suggestion-item .name,.initiative-tracker.suggestion-item>svg{display:flex;align-items:center;gap:.25rem}.waiting-for-bestiary.is-loading{display:flex;justify-content:center;font-style:italic;color:var(--text-muted)}.waiting-for-bestiary.inline{display:flex;align-items:center;gap:.25rem;font-size:var(--font-small);--icon-size: var(--icon-s)}.waiting-for-bestiary.inline .icon{display:flex;align-items:center;animation:rotation 1s ease infinite}@keyframes rotation{0%{transform:scale(1) rotate(-60deg)}20%{transform:rotate(-90deg)}50%{transform:rotate(690deg)}to{transform:rotate(660deg)}} diff --git a/.obsidian/plugins/obsidian-5e-statblocks/data.json b/.obsidian/plugins/obsidian-5e-statblocks/data.json index 0b18f31..6b4418a 100644 --- a/.obsidian/plugins/obsidian-5e-statblocks/data.json +++ b/.obsidian/plugins/obsidian-5e-statblocks/data.json @@ -1,21 +1,33326 @@ { - "monsters": [], + "monsters": [ + [ + "Aboleth", + { + "image": null, + "bestiary": true, + "name": "Aboleth", + "source": [ + "Monster Manual" + ], + "type": "aberration", + "size": "Large", + "alignment": "lawful evil", + "hp": 135, + "hit_dice": "18d10 + 36", + "ac": "17 (natural armor)", + "speed": "10 ft., swim 40 ft.", + "stats": [ + 21, + 9, + 15, + 18, + 15, + 18 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "constitution": "6" + }, + { + "intelligence": "8" + }, + { + "wisdom": "6" + } + ], + "skillsaves": [ + { + "history": "12" + }, + { + "perception": "10" + } + ], + "senses": "darkvision 120 ft., passive Perception 20", + "languages": "Deep Speech, telepathy 120 ft.", + "cr": "10", + "traits": [ + { + "name": "Amphibious", + "desc": "The aboleth can breathe air and water." + }, + { + "name": "Mucous Cloud", + "desc": "While underwater, the aboleth is surrounded by transformative mucus. A creature that touches the aboleth or that hits it with a melee attack while within 5 feet of it must make a 14 Constitution saving throw. On a failure, the creature is diseased for 1d4 hours. The diseased creature can breathe only underwater." + }, + { + "name": "Probing Telepathy", + "desc": "If a creature communicates telepathically with the aboleth, the aboleth learns the creature's greatest desires if the aboleth can see the creature." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The aboleth makes three tentacle attacks." + }, + { + "name": "Tentacle", + "desc": "Melee Weapon Attack +9 to hit, reach 10 ft., one target. 12 (2d6 + 5) bludgeoning damage. If the target is a creature, it must succeed on a 14 Constitution saving throw or become diseased. The disease has no effect for 1 minute and can be removed by any magic that cures disease. After 1 minute, the diseased creature's skin becomes translucent and slimy, the creature can't regain hit points unless it is underwater, and the disease can be removed only by heal or another disease-curing spell of 6th level or higher. When the creature is outside a body of water, it takes 6 (1d12) acid damage every 10 minutes unless moisture is applied to the skin before 10 minutes have passed." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +9 to hit, reach 10 ft., one target. 15 (3d6 + 5) bludgeoning damage." + }, + { + "name": "Enslave (3/Day)", + "desc": "The aboleth targets one creature it can see within 30 feet of it. The target must succeed on a 14 Wisdom saving throw or be magically charmed by the aboleth until the aboleth dies or until it is on a different plane of existence from the target. The charmed target is under the aboleth's control and can't take reactions, and the aboleth and the target can communicate telepathically with each other over any distance.\nWhenever the charmed target takes damage, the target can repeat the saving throw. On a success, the effect ends. No more than once every 24 hours, the target can also repeat the saving throw when it is at least 1 mile away from the aboleth." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The aboleth makes a Wisdom (Perception) check." + }, + { + "name": "Tail Swipe", + "desc": "The aboleth makes one tail attack." + }, + { + "name": "Psychic Drain (Costs 2 Actions)", + "desc": "One creature charmed by the aboleth takes 10 (3d6) psychic damage, and the aboleth regains hit points equal to the damage the creature takes." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Abominable Yeti", + { + "image": null, + "bestiary": true, + "name": "Abominable Yeti", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Huge", + "alignment": "chaotic evil", + "hp": 137, + "hit_dice": "11d12 + 66", + "ac": "15 (natural armor)", + "speed": "40 ft., climb 40 ft.", + "stats": [ + 24, + 10, + 22, + 9, + 13, + 9 + ], + "damage_immunities": "cold", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "5" + }, + { + "stealth": "4" + } + ], + "senses": "darkvision 60 ft., passive Perception 15", + "languages": "Yeti", + "cr": "9", + "traits": [ + { + "name": "Fear of Fire", + "desc": "If the yeti takes fire damage, it has disadvantage on attack rolls and ability checks until the end of its next turn." + }, + { + "name": "Keen Smell", + "desc": "The yeti has advantage on Wisdom (Perception) checks that rely on smell." + }, + { + "name": "Snow Camouflage", + "desc": "The yeti has advantage on Dexterity (Stealth) checks made to hide in snowy terrain." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The yeti can use its Chilling Gaze and makes two claw attacks." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +11 to hit, reach 5 ft., one target. 14 (2d6 + 7) slashing damage plus 7 (2d6) cold damage." + }, + { + "name": "Chilling Gaze", + "desc": "The yeti targets one creature it can see within 30 feet of it. If the target can see the yeti, the target must succeed on a 18 Constitution saving throw against this magic or take 21 (6d6) cold damage and then be paralyzed for 1 minute, unless it is immune to cold damage. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If the target's saving throw is successful, or if the effect ends on it, the target is immune to this yeti's gaze for 1 hour." + }, + { + "name": "Cold Breath (Recharge 6)", + "desc": "The yeti exhales a 30-foot cone of frigid air. Each creature in that area must make a 18 Constitution saving throw, taking 45 (10d8) cold damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Acolyte", + { + "image": null, + "bestiary": true, + "name": "Acolyte", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "any alignment", + "hp": 9, + "hit_dice": "2d8", + "ac": 10, + "speed": "30 ft.", + "stats": [ + 10, + 10, + 10, + 10, + 14, + 11 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "medicine": "4" + }, + { + "religion": "2" + } + ], + "senses": "passive Perception 12", + "languages": "any one language (usually Common)", + "cr": "1/4", + "traits": [], + "actions": [ + { + "name": "Club", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one target. 2 (1d4) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The acolyte is a 1st-level spellcaster. Its spellcasting ability is Wisdom (spell save 12, +4 to hit with spell attacks). The acolyte has the following cleric spells prepared:", + { + "Cantrips (at will)": "light, sacred flame, thaumaturgy" + }, + { + "1st level (3 slots)": "bless, cure wounds, sanctuary" + } + ], + "spellsNotes": "" + } + ], + [ + "Adult Black Dragon", + { + "image": null, + "bestiary": true, + "name": "Adult Black Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Huge", + "alignment": "chaotic evil", + "hp": 195, + "hit_dice": "17d12 + 85", + "ac": "19 (natural armor)", + "speed": "40 ft., fly 80 ft., swim 40 ft.", + "stats": [ + 23, + 14, + 21, + 14, + 13, + 17 + ], + "damage_immunities": "acid", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "7" + }, + { + "constitution": "10" + }, + { + "wisdom": "6" + }, + { + "charisma": "8" + } + ], + "skillsaves": [ + { + "perception": "11" + }, + { + "stealth": "7" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 21", + "languages": "Common, Draconic", + "cr": "14", + "traits": [ + { + "name": "Amphibious", + "desc": "The dragon can breathe air and water." + }, + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dragon fails a saving throw, it can choose to succeed instead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +11 to hit, reach 10 ft., one target. 17 (2d10 + 6) piercing damage plus 4 (1d8) acid damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +11 to hit, reach 5 ft., one target. 13 (2d6 + 6) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +11 to hit, reach 15 ft., one target. 15 (2d8 + 6) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a 16 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours." + }, + { + "name": "Acid Breath (Recharge 5-6)", + "desc": "The dragon exhales acid in a 60-foot line that is 5 feet wide. Each creature in that line must make a 18 Dexterity saving throw, taking 54 (12d8) acid damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dragon makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dragon makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dragon beats its wings. Each creature within 10 feet of the dragon must succeed on a 19 Dexterity saving throw or take 13 (2d6 + 6) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Adult Blue Dracolich", + { + "image": null, + "bestiary": true, + "name": "Adult Blue Dracolich", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Huge", + "alignment": "lawful evil", + "hp": 225, + "hit_dice": "18d12 + 108", + "ac": "19 (natural armor)", + "speed": "40 ft., burrow 30 ft., fly 80 ft.", + "stats": [ + 25, + 10, + 23, + 16, + 15, + 19 + ], + "damage_immunities": "lightning, poison", + "damage_resistances": "necrotic", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, frightened, paralyzed, poisoned", + "saves": [ + { + "dexterity": "6" + }, + { + "constitution": "12" + }, + { + "wisdom": "8" + }, + { + "charisma": "10" + } + ], + "skillsaves": [ + { + "perception": "14" + }, + { + "stealth": "6" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 24", + "languages": "Common, Draconic", + "cr": "17", + "traits": [ + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dracolich fails a saving throw, it can choose to succeed instead." + }, + { + "name": "Magic Resistance", + "desc": "The dracolich has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dracolich can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +13 to hit, reach 10 ft., one target. 18 (2d10 + 7) piercing damage plus 5 (1d10) lightning damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +13 to hit, reach 5 ft., one target. 14 (2d6 + 7) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +13 to hit, reach 15 ft., one target. 16 (2d8 + 7) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dracolich's choice that is within 120 feet of the dracolich and aware of it must succeed on a 18 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dracolich's Frightful Presence for the next 24 hours." + }, + { + "name": "Lightning Breath (Recharge 5-6)", + "desc": "The dracolich exhales lightning in a 90-foot line that is 5 feet wide. Each creature in that line must make a 20 Dexterity saving throw, taking 66 (12d10) lightning damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dracolich makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dracolich makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dracolich beats its tattered wings. Each creature within 10 feet of the dracolich must succeed on a 21 Dexterity saving throw or take 14 (2d6 + 7) bludgeoning damage and be knocked prone. After beating its wings this way, the dracolich can fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Adult Blue Dragon", + { + "image": null, + "bestiary": true, + "name": "Adult Blue Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Huge", + "alignment": "lawful evil", + "hp": 225, + "hit_dice": "18d12 + 108", + "ac": "19 (natural armor)", + "speed": "40 ft., burrow 30 ft., fly 80 ft.", + "stats": [ + 25, + 10, + 23, + 16, + 15, + 19 + ], + "damage_immunities": "lightning", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "5" + }, + { + "constitution": "11" + }, + { + "wisdom": "7" + }, + { + "charisma": "9" + } + ], + "skillsaves": [ + { + "perception": "12" + }, + { + "stealth": "5" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 22", + "languages": "Common, Draconic", + "cr": "16", + "traits": [ + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dragon fails a saving throw, it can choose to succeed instead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +12 to hit, reach 10 ft., one target. 18 (2d10 + 7) piercing damage plus 5 (1d10) lightning damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +12 to hit, reach 5 ft., one target. 14 (2d6 + 7) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +12 to hit, reach 15 ft., one target. 16 (2d8 + 7) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a 17 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours." + }, + { + "name": "Lightning Breath (Recharge 5-6)", + "desc": "The dragon exhales lightning in a 90-foot line that is 5 feet wide. Each creature in that line must make a 19 Dexterity saving throw, taking 66 (12d10) lightning damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dragon makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dragon makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dragon beats its wings. Each creature within 10 feet of the dragon must succeed on a 20 Dexterity saving throw or take 14 (2d6 + 7) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Adult Brass Dragon", + { + "image": null, + "bestiary": true, + "name": "Adult Brass Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Huge", + "alignment": "chaotic good", + "hp": 172, + "hit_dice": "15d12 + 75", + "ac": "18 (natural armor)", + "speed": "40 ft., burrow 40 ft., fly 80 ft.", + "stats": [ + 23, + 10, + 21, + 14, + 13, + 17 + ], + "damage_immunities": "fire", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "5" + }, + { + "constitution": "10" + }, + { + "wisdom": "6" + }, + { + "charisma": "8" + } + ], + "skillsaves": [ + { + "history": "7" + }, + { + "perception": "11" + }, + { + "persuasion": "8" + }, + { + "stealth": "5" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 21", + "languages": "Common, Draconic", + "cr": "13", + "traits": [ + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dragon fails a saving throw, it can choose to succeed instead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +11 to hit, reach 10 ft., one target. 17 (2d10 + 6) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +11 to hit, reach 5 ft., one target. 13 (2d6 + 6) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +11 to hit, reach 15 ft., one target. 15 (2d8 + 6) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a 16 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours." + }, + { + "name": "Breath Weapons (Recharge 5-6)", + "desc": "The dragon uses one of the following breath weapons." + }, + { + "name": "Fire Breath", + "desc": "The dragon exhales fire in a 60-foot line that is 5 feet wide. Each creature in that line must make a 18 Dexterity saving throw, taking 45 (13d6) fire damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Sleep Breath", + "desc": "The dragon exhales sleep gas in a 60-foot cone. Each creature in that area must succeed on a 18 Constitution saving throw or fall unconscious for 10 minutes. This effect ends for a creature if the creature takes damage or someone uses an action to wake it." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dragon makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dragon makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dragon beats its wings. Each creature within 10 feet of the dragon must succeed on a 19 Dexterity saving throw or take 13 (2d6 + 6) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Adult Bronze Dragon", + { + "image": null, + "bestiary": true, + "name": "Adult Bronze Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Huge", + "alignment": "lawful good", + "hp": 212, + "hit_dice": "17d12 + 102", + "ac": "19 (natural armor)", + "speed": "40 ft., fly 80 ft., swim 40 ft.", + "stats": [ + 25, + 10, + 23, + 16, + 15, + 19 + ], + "damage_immunities": "lightning", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "5" + }, + { + "constitution": "11" + }, + { + "wisdom": "7" + }, + { + "charisma": "9" + } + ], + "skillsaves": [ + { + "insight": "7" + }, + { + "perception": "12" + }, + { + "stealth": "5" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 22", + "languages": "Common, Draconic", + "cr": "15", + "traits": [ + { + "name": "Amphibious", + "desc": "The dragon can breathe air and water." + }, + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dragon fails a saving throw, it can choose to succeed instead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +12 to hit, reach 10 ft., one target. 18 (2d10 + 7) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +12 to hit, reach 5 ft., one target. 14 (2d6 + 7) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +12 to hit, reach 15 ft., one target. 16 (2d8 + 7) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a 17 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours." + }, + { + "name": "Breath Weapons (Recharge 5-6)", + "desc": "The dragon uses one of the following breath weapons." + }, + { + "name": "Lightning Breath", + "desc": "The dragon exhales lightning in a 90-foot line that is 5 feet wide. Each creature in that line must make a 19 Dexterity saving throw, taking 66 (12d10) lightning damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Repulsion Breath", + "desc": "The dragon exhales repulsion energy in a 30-foot cone. Each creature in that area must succeed on a 19 Strength saving throw. On a failed save, the creature is pushed 60 feet away from the dragon." + }, + { + "name": "Change Shape", + "desc": "The dragon magically polymorphs into a humanoid or beast that has a challenge rating no higher than its own, or back into its true form. It reverts to its true form if it dies. Any equipment it is wearing or carrying is absorbed or borne by the new form (the dragon's choice).\nIn a new form, the dragon retains its alignment, hit points, Hit Dice, ability to speak, proficiencies, Legendary Resistance, lair actions, and Intelligence, Wisdom, and Charisma scores, as well as this action. Its statistics and capabilities are otherwise replaced by those of the new form, except any class features or legendary actions of that form." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dragon makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dragon makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dragon beats its wings. Each creature within 10 feet of the dragon must succeed on a 20 Dexterity saving throw or take 14 (2d6 + 7) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Adult Copper Dragon", + { + "image": null, + "bestiary": true, + "name": "Adult Copper Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Huge", + "alignment": "chaotic good", + "hp": 184, + "hit_dice": "16d12 + 80", + "ac": "18 (natural armor)", + "speed": "40 ft., climb 40 ft., fly 80 ft.", + "stats": [ + 23, + 12, + 21, + 18, + 15, + 17 + ], + "damage_immunities": "acid", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "6" + }, + { + "constitution": "10" + }, + { + "wisdom": "7" + }, + { + "charisma": "8" + } + ], + "skillsaves": [ + { + "deception": "8" + }, + { + "perception": "12" + }, + { + "stealth": "6" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 22", + "languages": "Common, Draconic", + "cr": "14", + "traits": [ + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dragon fails a saving throw, it can choose to succeed instead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +11 to hit, reach 10 ft., one target. 17 (2d10 + 6) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +11 to hit, reach 5 ft., one target. 13 (2d6 + 6) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +11 to hit, reach 15 ft., one target. 15 (2d8 + 6) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a 16 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours." + }, + { + "name": "Breath Weapons (Recharge 5-6)", + "desc": "The dragon uses one of the following breath weapons." + }, + { + "name": "Acid Breath", + "desc": "The dragon exhales acid in a 60-foot line that is 5 feet wide. Each creature in that line must make a 18 Dexterity saving throw, taking 54 (12d8) acid damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Slowing Breath", + "desc": "The dragon exhales gas in a 60-foot cone. Each creature in that area must succeed on a 18 Constitution saving throw. On a failed save, the creature can't use reactions, its speed is halved, and it can't make more than one attack on its turn. In addition, the creature can use either an action or a bonus action on its turn, but not both. These effects last for 1 minute. The creature can repeat the saving throw at the end of each of its turns, ending the effect on itself with a successful save." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dragon makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dragon makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dragon beats its wings. Each creature within 10 feet of the dragon must succeed on a 19 Dexterity saving throw or take 13 (2d6 + 6) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Adult Gold Dragon", + { + "image": null, + "bestiary": true, + "name": "Adult Gold Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Huge", + "alignment": "lawful good", + "hp": 256, + "hit_dice": "19d12 + 133", + "ac": "19 (natural armor)", + "speed": "40 ft., fly 80 ft., swim 40 ft.", + "stats": [ + 27, + 14, + 25, + 16, + 15, + 24 + ], + "damage_immunities": "fire", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "8" + }, + { + "constitution": "13" + }, + { + "wisdom": "8" + }, + { + "charisma": "13" + } + ], + "skillsaves": [ + { + "insight": "8" + }, + { + "perception": "14" + }, + { + "persuasion": "13" + }, + { + "stealth": "8" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 24", + "languages": "Common, Draconic", + "cr": "17", + "traits": [ + { + "name": "Amphibious", + "desc": "The dragon can breathe air and water." + }, + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dragon fails a saving throw, it can choose to succeed instead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +14 to hit, reach 10 ft., one target. 19 (2d10 + 8) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +14 to hit, reach 5 ft., one target. 15 (2d6 + 8) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +14 to hit, reach 15 ft., one target. 17 (2d8 + 8) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a 21 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours." + }, + { + "name": "Breath Weapons (Recharge 5-6)", + "desc": "The dragon uses one of the following breath weapons." + }, + { + "name": "Fire Breath", + "desc": "The dragon exhales fire in a 60-foot cone. Each creature in that area must make a 21 Dexterity saving throw, taking 66 (12d10) fire damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Weakening Breath", + "desc": "The dragon exhales gas in a 60-foot cone. Each creature in that area must succeed on a 21 Strength saving throw or have disadvantage on Strength-based attack rolls, Strength checks, and Strength saving throws for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "Change Shape", + "desc": "The dragon magically polymorphs into a humanoid or beast that has a challenge rating no higher than its own, or back into its true form. It reverts to its true form if it dies. Any equipment it is wearing or carrying is absorbed or borne by the new form (the dragon's choice).\nIn a new form, the dragon retains its alignment, hit points, Hit Dice, ability to speak, proficiencies, Legendary Resistance, lair actions, and Intelligence, Wisdom, and Charisma scores, as well as this action. Its statistics and capabilities are otherwise replaced by those of the new form, except any class features or legendary actions of that form." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dragon makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dragon makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dragon beats its wings. Each creature within 10 feet of the dragon must succeed on a 22 Dexterity saving throw or take 15 (2d6 + 8) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Adult Green Dragon", + { + "image": null, + "bestiary": true, + "name": "Adult Green Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Huge", + "alignment": "lawful evil", + "hp": 207, + "hit_dice": "18d12 + 90", + "ac": "19 (natural armor)", + "speed": "40 ft., fly 80 ft., swim 40 ft.", + "stats": [ + 23, + 12, + 21, + 18, + 15, + 17 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "dexterity": "6" + }, + { + "constitution": "10" + }, + { + "wisdom": "7" + }, + { + "charisma": "8" + } + ], + "skillsaves": [ + { + "deception": "8" + }, + { + "insight": "7" + }, + { + "perception": "12" + }, + { + "persuasion": "8" + }, + { + "stealth": "6" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 22", + "languages": "Common, Draconic", + "cr": "15", + "traits": [ + { + "name": "Amphibious", + "desc": "The dragon can breathe air and water." + }, + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dragon fails a saving throw, it can choose to succeed instead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +11 to hit, reach 10 ft., one target. 17 (2d10 + 6) piercing damage plus 7 (2d6) poison damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +11 to hit, reach 5 ft., one target. 13 (2d6 + 6) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +11 to hit, reach 15 ft., one target. 15 (2d8 + 6) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a 16 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours." + }, + { + "name": "Poison Breath (Recharge 5-6)", + "desc": "The dragon exhales poisonous gas in a 60-foot cone. Each creature in that area must make a 18 Constitution saving throw, taking 56 (16d6) poison damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dragon makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dragon makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dragon beats its wings. Each creature within 10 feet of the dragon must succeed on a 19 Dexterity saving throw or take 13 (2d6 + 6) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Adult Red Dragon", + { + "image": null, + "bestiary": true, + "name": "Adult Red Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Huge", + "alignment": "chaotic evil", + "hp": 256, + "hit_dice": "19d12 + 133", + "ac": "19 (natural armor)", + "speed": "40 ft., climb 40 ft., fly 80 ft.", + "stats": [ + 27, + 10, + 25, + 16, + 13, + 21 + ], + "damage_immunities": "fire", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "6" + }, + { + "constitution": "13" + }, + { + "wisdom": "7" + }, + { + "charisma": "11" + } + ], + "skillsaves": [ + { + "perception": "13" + }, + { + "stealth": "6" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 23", + "languages": "Common, Draconic", + "cr": "17", + "traits": [ + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dragon fails a saving throw, it can choose to succeed instead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +14 to hit, reach 10 ft., one target. 19 (2d10 + 8) piercing damage plus 7 (2d6) fire damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +14 to hit, reach 5 ft., one target. 15 (2d6 + 8) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +14 to hit, reach 15 ft., one target. 17 (2d8 + 8) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a 19 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours." + }, + { + "name": "Fire Breath (Recharge 5-6)", + "desc": "The dragon exhales fire in a 60-foot cone. Each creature in that area must make a 21 Dexterity saving throw, taking 63 (18d6) fire damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dragon makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dragon makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dragon beats its wings. Each creature within 10 feet of the dragon must succeed on a 22 Dexterity saving throw or take 15 (2d6 + 8) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Adult Silver Dragon", + { + "image": null, + "bestiary": true, + "name": "Adult Silver Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Huge", + "alignment": "lawful good", + "hp": 243, + "hit_dice": "18d12 + 126", + "ac": "19 (natural armor)", + "speed": "40 ft., fly 80 ft.", + "stats": [ + 27, + 10, + 25, + 16, + 13, + 21 + ], + "damage_immunities": "cold", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "5" + }, + { + "constitution": "12" + }, + { + "wisdom": "6" + }, + { + "charisma": "10" + } + ], + "skillsaves": [ + { + "arcana": "8" + }, + { + "history": "8" + }, + { + "perception": "11" + }, + { + "stealth": "5" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 21", + "languages": "Common, Draconic", + "cr": "16", + "traits": [ + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dragon fails a saving throw, it can choose to succeed instead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +13 to hit, reach 10 ft., one target. 19 (2d10 + 8) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +13 to hit, reach 5 ft., one target. 15 (2d6 + 8) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +13 to hit, reach 15 ft., one target. 17 (2d8 + 8) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a 18 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours." + }, + { + "name": "Breath Weapons (Recharge 5-6)", + "desc": "The dragon uses one of the following breath weapons." + }, + { + "name": "Cold Breath", + "desc": "The dragon exhales an icy blast in a 60-foot cone. Each creature in that area must make a 20 Constitution saving throw, taking 58 (13d8) cold damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Paralyzing Breath", + "desc": "The dragon exhales paralyzing gas in a 60-foot cone. Each creature in that area must succeed on a 20 Constitution saving throw or be paralyzed for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "Change Shape", + "desc": "The dragon magically polymorphs into a humanoid or beast that has a challenge rating no higher than its own, or back into its true form. It reverts to its true form if it dies. Any equipment it is wearing or carrying is absorbed or borne by the new form (the dragon's choice).\nIn a new form, the dragon retains its alignment, hit points, Hit Dice, ability to speak, proficiencies, Legendary Resistance, lair actions, and Intelligence, Wisdom, and Charisma scores, as well as this action. Its statistics and capabilities are otherwise replaced by those of the new form, except any class features or legendary actions of that form." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dragon makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dragon makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dragon beats its wings. Each creature within 10 feet of the dragon must succeed on a 22 Dexterity saving throw or take 15 (2d6 + 8) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Adult White Dragon", + { + "image": null, + "bestiary": true, + "name": "Adult White Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Huge", + "alignment": "chaotic evil", + "hp": 200, + "hit_dice": "16d12 + 96", + "ac": "18 (natural armor)", + "speed": "40 ft., burrow 30 ft., fly 80 ft., swim 40 ft.", + "stats": [ + 22, + 10, + 22, + 8, + 12, + 12 + ], + "damage_immunities": "cold", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "5" + }, + { + "constitution": "11" + }, + { + "wisdom": "6" + }, + { + "charisma": "6" + } + ], + "skillsaves": [ + { + "perception": "11" + }, + { + "stealth": "5" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 21", + "languages": "Common, Draconic", + "cr": "13", + "traits": [ + { + "name": "Ice Walk", + "desc": "The dragon can move across and climb icy surfaces without needing to make an ability check. Additionally, difficult terrain composed of ice or snow doesn't cost it extra movement." + }, + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dragon fails a saving throw, it can choose to succeed instead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +11 to hit, reach 10 ft., one target. 17 (2d10 + 6) piercing damage plus 4 (1d8) cold damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +11 to hit, reach 5 ft., one target. 13 (2d6 + 6) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +11 to hit, reach 15 ft., one target. 15 (2d8 + 6) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a 14 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours." + }, + { + "name": "Cold Breath (Recharge 5-6)", + "desc": "The dragon exhales an icy blast in a 60-foot cone. Each creature in that area must make a 19 Constitution saving throw, taking 54 (12d8) cold damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dragon makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dragon makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dragon beats its wings. Each creature within 10 feet of the dragon must succeed on a 19 Dexterity saving throw or take 13 (2d6 + 6) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Air Elemental", + { + "image": null, + "bestiary": true, + "name": "Air Elemental", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Large", + "alignment": "neutral", + "hp": 90, + "hit_dice": "12d10 + 24", + "ac": 15, + "speed": "0 ft., fly 90 ft. (hover)", + "stats": [ + 14, + 20, + 14, + 6, + 10, + 6 + ], + "damage_immunities": "poison", + "damage_resistances": "lightning, thunder, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "exhaustion, grappled, paralyzed, petrified, poisoned, prone, restrained, unconscious", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Auran", + "cr": "5", + "traits": [ + { + "name": "Air Form", + "desc": "The elemental can enter a hostile creature's space and stop there. It can move through a space as narrow as 1 inch wide without squeezing." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The elemental makes two slam attacks." + }, + { + "name": "Slam", + "desc": "Melee Weapon Attack +8 to hit, reach 5 ft., one target. 14 (2d8 + 5) bludgeoning damage." + }, + { + "name": "Whirlwind (Recharge 4-6)", + "desc": "Each creature in the elemental's space must make a 13 Strength saving throw. On a failure, a target takes 15 (3d8 + 2) bludgeoning damage and is flung up 20 feet away from the elemental in a random direction and knocked prone. If a thrown target strikes an object, such as a wall or floor, the target takes 3 (1d6) bludgeoning damage for every 10 feet it was thrown. If the target is thrown at another creature, that creature must succeed on a 13 Dexterity saving throw or take the same damage and be knocked prone.\nIf the saving throw is successful, the target takes half the bludgeoning damage and isn't flung away or knocked prone." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Allosaurus", + { + "image": null, + "bestiary": true, + "name": "Allosaurus", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 51, + "hit_dice": "6d10 + 18", + "ac": "13 (natural armor)", + "speed": "60 ft.", + "stats": [ + 19, + 13, + 17, + 2, + 12, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "5" + } + ], + "senses": "passive Perception 15", + "languages": "", + "cr": "2", + "traits": [ + { + "name": "Pounce", + "desc": "If the allosaurus moves at least 30 feet straight toward a creature and then hits it with a claw attack on the same turn, that target must succeed on a 13 Strength saving throw or be knocked prone. If the target is prone, the allosaurus can make one bite attack against it as a bonus action." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 15 (2d10 + 4) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 8 (1d8 + 4) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ancient Black Dragon", + { + "image": null, + "bestiary": true, + "name": "Ancient Black Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Gargantuan", + "alignment": "chaotic evil", + "hp": 367, + "hit_dice": "21d20 + 147", + "ac": "22 (natural armor)", + "speed": "40 ft., fly 80 ft., swim 40 ft.", + "stats": [ + 27, + 14, + 25, + 16, + 15, + 19 + ], + "damage_immunities": "acid", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "9" + }, + { + "constitution": "14" + }, + { + "wisdom": "9" + }, + { + "charisma": "11" + } + ], + "skillsaves": [ + { + "perception": "16" + }, + { + "stealth": "9" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 26", + "languages": "Common, Draconic", + "cr": "21", + "traits": [ + { + "name": "Amphibious", + "desc": "The dragon can breathe air and water." + }, + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dragon fails a saving throw, it can choose to succeed instead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +15 to hit, reach 15 ft., one target. 19 (2d10 + 8) piercing damage plus 9 (2d8) acid damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +15 to hit, reach 10 ft., one target. 15 (2d6 + 8) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +15 to hit, reach 20 ft., one target. 17 (2d8 + 8) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a 19 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours." + }, + { + "name": "Acid Breath (Recharge 5-6)", + "desc": "The dragon exhales acid in a 90-foot line that is 10 feet wide. Each creature in that line must make a 22 Dexterity saving throw, taking 67 (15d8) acid damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dragon makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dragon makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dragon beats its wings. Each creature within 15 feet of the dragon must succeed on a 23 Dexterity saving throw or take 15 (2d6 + 8) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ancient Blue Dragon", + { + "image": null, + "bestiary": true, + "name": "Ancient Blue Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Gargantuan", + "alignment": "lawful evil", + "hp": 481, + "hit_dice": "26d20 + 208", + "ac": "22 (natural armor)", + "speed": "40 ft., burrow 40 ft., fly 80 ft.", + "stats": [ + 29, + 10, + 27, + 18, + 17, + 21 + ], + "damage_immunities": "lightning", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "7" + }, + { + "constitution": "15" + }, + { + "wisdom": "10" + }, + { + "charisma": "12" + } + ], + "skillsaves": [ + { + "perception": "17" + }, + { + "stealth": "7" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 27", + "languages": "Common, Draconic", + "cr": "23", + "traits": [ + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dragon fails a saving throw, it can choose to succeed instead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +16 to hit, reach 15 ft., one target. 20 (2d10 + 9) piercing damage plus 11 (2d10) lightning damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +16 to hit, reach 10 ft., one target. 16 (2d6 + 9) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +16 to hit, reach 20 ft., one target. 18 (2d8 + 9) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a 20 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours." + }, + { + "name": "Lightning Breath (Recharge 5-6)", + "desc": "The dragon exhales lightning in a 120-foot line that is 10 feet wide. Each creature in that line must make a 23 Dexterity saving throw, taking 88 (16d10) lightning damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dragon makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dragon makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dragon beats its wings. Each creature within 15 feet of the dragon must succeed on a 24 Dexterity saving throw or take 16 (2d6 + 9) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ancient Brass Dragon", + { + "image": null, + "bestiary": true, + "name": "Ancient Brass Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Gargantuan", + "alignment": "chaotic good", + "hp": 297, + "hit_dice": "17d20 + 119", + "ac": "20 (natural armor)", + "speed": "40 ft., burrow 40 ft., fly 80 ft.", + "stats": [ + 27, + 10, + 25, + 16, + 15, + 19 + ], + "damage_immunities": "fire", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "6" + }, + { + "constitution": "13" + }, + { + "wisdom": "8" + }, + { + "charisma": "10" + } + ], + "skillsaves": [ + { + "history": "9" + }, + { + "perception": "14" + }, + { + "persuasion": "10" + }, + { + "stealth": "6" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 24", + "languages": "Common, Draconic", + "cr": "20", + "traits": [ + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dragon fails a saving throw, it can choose to succeed instead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +14 to hit, reach 15 ft., one target. 19 (2d10 + 8) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +14 to hit, reach 10 ft., one target. 15 (2d6 + 8) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +14 to hit, reach 20 ft., one target. 17 (2d8 + 8) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a 18 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours." + }, + { + "name": "Breath Weapons (Recharge 5-6)", + "desc": "The dragon uses one of the following breath weapons:" + }, + { + "name": "Fire Breath", + "desc": "The dragon exhales fire in a 90-foot line that is 10 feet wide. Each creature in that line must make a 21 Dexterity saving throw, taking 56 (16d6) fire damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Sleep Breath", + "desc": "The dragon exhales sleep gas in a 90-foot cone. Each creature in that area must succeed on a 21 Constitution saving throw or fall unconscious for 10 minutes. This effect ends for a creature if the creature takes damage or someone uses an action to wake it." + }, + { + "name": "Change Shape", + "desc": "The dragon magically polymorphs into a humanoid or beast that has a challenge rating no higher than its own, or back into its true form. It reverts to its true form if it dies. Any equipment it is wearing or carrying is absorbed or borne by the new form (the dragon's choice).\nIn a new form, the dragon retains its alignment, hit points, Hit Dice, ability to speak, proficiencies, Legendary Resistance, lair actions, and Intelligence, Wisdom, and Charisma scores, as well as this action. Its statistics and capabilities are otherwise replaced by those of the new form, except any class features or legendary actions of that form." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dragon makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dragon makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dragon beats its wings. Each creature within 15 feet of the dragon must succeed on a 22 Dexterity saving throw or take 15 (2d6 + 8) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ancient Bronze Dragon", + { + "image": null, + "bestiary": true, + "name": "Ancient Bronze Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Gargantuan", + "alignment": "lawful good", + "hp": 444, + "hit_dice": "24d20 + 192", + "ac": "22 (natural armor)", + "speed": "40 ft., fly 80 ft., swim 40 ft.", + "stats": [ + 29, + 10, + 27, + 18, + 17, + 21 + ], + "damage_immunities": "lightning", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "7" + }, + { + "constitution": "15" + }, + { + "wisdom": "10" + }, + { + "charisma": "12" + } + ], + "skillsaves": [ + { + "insight": "10" + }, + { + "perception": "17" + }, + { + "stealth": "7" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 27", + "languages": "Common, Draconic", + "cr": "22", + "traits": [ + { + "name": "Amphibious", + "desc": "The dragon can breathe air and water." + }, + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dragon fails a saving throw, it can choose to succeed instead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +16 to hit, reach 15 ft., one target. 20 (2d10 + 9) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +16 to hit, reach 10 ft., one target. 16 (2d6 + 9) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +16 to hit, reach 20 ft., one target. 18 (2d8 + 9) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a 20 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours." + }, + { + "name": "Breath Weapons (Recharge 5-6)", + "desc": "The dragon uses one of the following breath weapons." + }, + { + "name": "Lightning Breath", + "desc": "The dragon exhales lightning in a 120-foot line that is 10 feet wide. Each creature in that line must make a 23 Dexterity saving throw, taking 88 (16d10) lightning damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Repulsion Breath", + "desc": "The dragon exhales repulsion energy in a 30-foot cone. Each creature in that area must succeed on a 23 Strength saving throw. On a failed save, the creature is pushed 60 feet away from the dragon." + }, + { + "name": "Change Shape", + "desc": "The dragon magically polymorphs into a humanoid or beast that has a challenge rating no higher than its own, or back into its true form. It reverts to its true form if it dies. Any equipment it is wearing or carrying is absorbed or borne by the new form (the dragon's choice).\nIn a new form, the dragon retains its alignment, hit points, Hit Dice, ability to speak, proficiencies, Legendary Resistance, lair actions, and Intelligence, Wisdom, and Charisma scores, as well as this action. Its statistics and capabilities are otherwise replaced by those of the new form, except any class features or legendary actions of that form." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dragon makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dragon makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dragon beats its wings. Each creature within 15 feet of the dragon must succeed on a 24 Dexterity saving throw or take 16 (2d6 + 9) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ancient Copper Dragon", + { + "image": null, + "bestiary": true, + "name": "Ancient Copper Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Gargantuan", + "alignment": "chaotic good", + "hp": 350, + "hit_dice": "20d20 + 140", + "ac": "21 (natural armor)", + "speed": "40 ft., climb 40 ft., fly 80 ft.", + "stats": [ + 27, + 12, + 25, + 20, + 17, + 19 + ], + "damage_immunities": "acid", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "8" + }, + { + "constitution": "14" + }, + { + "wisdom": "10" + }, + { + "charisma": "11" + } + ], + "skillsaves": [ + { + "deception": "11" + }, + { + "perception": "17" + }, + { + "stealth": "8" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 27", + "languages": "Common, Draconic", + "cr": "21", + "traits": [ + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dragon fails a saving throw, it can choose to succeed instead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +15 to hit, reach 15 ft., one target. 19 (2d10 + 8) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +15 to hit, reach 10 ft., one target. 15 (2d6 + 8) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +15 to hit, reach 20 ft., one target. 17 (2d8 + 8) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a 19 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours." + }, + { + "name": "Breath Weapons (Recharge 5-6)", + "desc": "The dragon uses one of the following breath weapons." + }, + { + "name": "Acid Breath", + "desc": "The dragon exhales acid in a 90-foot line that is 10 feet wide. Each creature in that line must make a 22 Dexterity saving throw, taking 63 (14d8) acid damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Slowing Breath", + "desc": "The dragon exhales gas in a 90-foot cone. Each creature in that area must succeed on a 22 Constitution saving throw. On a failed save, the creature can't use reactions, its speed is halved, and it can't make more than one attack on its turn. In addition, the creature can use either an action or a bonus action on its turn, but not both. These effects last for 1 minute. The creature can repeat the saving throw at the end of each of its turns, ending the effect on itself with a successful save." + }, + { + "name": "Change Shape", + "desc": "The dragon magically polymorphs into a humanoid or beast that has a challenge rating no higher than its own, or back into its true form. It reverts to its true form if it dies. Any equipment it is wearing or carrying is absorbed or borne by the new form (the dragon's choice).\nIn a new form, the dragon retains its alignment, hit points, Hit Dice, ability to speak, proficiencies, Legendary Resistance, lair actions, and Intelligence, Wisdom, and Charisma scores, as well as this action. Its statistics and capabilities are otherwise replaced by those of the new form, except any class features or legendary actions of that form." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dragon makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dragon makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dragon beats its wings. Each creature within 15 feet of the dragon must succeed on a 23 Dexterity saving throw or take 15 (2d6 + 8) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ancient Gold Dragon", + { + "image": null, + "bestiary": true, + "name": "Ancient Gold Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Gargantuan", + "alignment": "lawful good", + "hp": 546, + "hit_dice": "28d20 + 252", + "ac": "22 (natural armor)", + "speed": "40 ft., fly 80 ft., swim 40 ft.", + "stats": [ + 30, + 14, + 29, + 18, + 17, + 28 + ], + "damage_immunities": "fire", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "9" + }, + { + "constitution": "16" + }, + { + "wisdom": "10" + }, + { + "charisma": "16" + } + ], + "skillsaves": [ + { + "insight": "10" + }, + { + "perception": "17" + }, + { + "persuasion": "16" + }, + { + "stealth": "9" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 27", + "languages": "Common, Draconic", + "cr": "24", + "traits": [ + { + "name": "Amphibious", + "desc": "The dragon can breathe air and water." + }, + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dragon fails a saving throw, it can choose to succeed instead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +17 to hit, reach 15 ft., one target. 21 (2d10 + 10) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +17 to hit, reach 10 ft., one target. 17 (2d6 + 10) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +17 to hit, reach 20 ft., one target. 19 (2d8 + 10) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a 24 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours." + }, + { + "name": "Breath Weapons (Recharge 5-6)", + "desc": "The dragon uses one of the following breath weapons." + }, + { + "name": "Fire Breath", + "desc": "The dragon exhales fire in a 90-foot cone. Each creature in that area must make a 24 Dexterity saving throw, taking 71 (13d10) fire damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Weakening Breath", + "desc": "The dragon exhales gas in a 90-foot cone. Each creature in that area must succeed on a 24 Strength saving throw or have disadvantage on Strength-based attack rolls, Strength checks, and Strength saving throws for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "Change Shape", + "desc": "The dragon magically polymorphs into a humanoid or beast that has a challenge rating no higher than its own, or back into its true form. It reverts to its true form if it dies. Any equipment it is wearing or carrying is absorbed or borne by the new form (the dragon's choice).\nIn a new form, the dragon retains its alignment, hit points, Hit Dice, ability to speak, proficiencies, Legendary Resistance, lair actions, and Intelligence, Wisdom, and Charisma scores, as well as this action. Its statistics and capabilities are otherwise replaced by those of the new form, except any class features or legendary actions of that form." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dragon makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dragon makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dragon beats its wings. Each creature within 15 feet of the dragon must succeed on a 25 Dexterity saving throw or take 17 (2d6 + 10) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ancient Green Dragon", + { + "image": null, + "bestiary": true, + "name": "Ancient Green Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Gargantuan", + "alignment": "lawful evil", + "hp": 385, + "hit_dice": "22d20 + 154", + "ac": "21 (natural armor)", + "speed": "40 ft., fly 80 ft., swim 40 ft.", + "stats": [ + 27, + 12, + 25, + 20, + 17, + 19 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "dexterity": "8" + }, + { + "constitution": "14" + }, + { + "wisdom": "10" + }, + { + "charisma": "11" + } + ], + "skillsaves": [ + { + "deception": "11" + }, + { + "insight": "10" + }, + { + "perception": "17" + }, + { + "persuasion": "11" + }, + { + "stealth": "8" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 27", + "languages": "Common, Draconic", + "cr": "22", + "traits": [ + { + "name": "Amphibious", + "desc": "The dragon can breathe air and water." + }, + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dragon fails a saving throw, it can choose to succeed instead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +15 to hit, reach 15 ft., one target. 19 (2d10 + 8) piercing damage plus 10 (3d6) poison damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +15 to hit, reach 10 ft., one target. 22 (4d6 + 8) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +15 to hit, reach 20 ft., one target. 17 (2d8 + 8) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a 19 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours." + }, + { + "name": "Poison Breath (Recharge 5-6)", + "desc": "The dragon exhales poisonous gas in a 90-foot cone. Each creature in that area must make a 22 Constitution saving throw, taking 77 (22d6) poison damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dragon makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dragon makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dragon beats its wings. Each creature within 15 feet of the dragon must succeed on a 23 Dexterity saving throw or take 15 (2d6 + 8) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ancient Red Dragon", + { + "image": null, + "bestiary": true, + "name": "Ancient Red Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Gargantuan", + "alignment": "chaotic evil", + "hp": 546, + "hit_dice": "28d20 + 252", + "ac": "22 (natural armor)", + "speed": "40 ft., climb 40 ft., fly 80 ft.", + "stats": [ + 30, + 10, + 29, + 18, + 15, + 23 + ], + "damage_immunities": "fire", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "7" + }, + { + "constitution": "16" + }, + { + "wisdom": "9" + }, + { + "charisma": "13" + } + ], + "skillsaves": [ + { + "perception": "16" + }, + { + "stealth": "7" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 26", + "languages": "Common, Draconic", + "cr": "24", + "traits": [ + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dragon fails a saving throw, it can choose to succeed instead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +17 to hit, reach 15 ft., one target. 21 (2d10 + 10) piercing damage plus 14 (4d6) fire damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +17 to hit, reach 10 ft., one target. 17 (2d6 + 10) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +17 to hit, reach 20 ft., one target. 19 (2d8 + 10) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a 21 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours." + }, + { + "name": "Fire Breath (Recharge 5-6)", + "desc": "The dragon exhales fire in a 90-foot cone. Each creature in that area must make a 24 Dexterity saving throw, taking 91 (26d6) fire damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dragon makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dragon makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dragon beats its wings. Each creature within 15 feet of the dragon must succeed on a 25 Dexterity saving throw or take 17 (2d6 + 10) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ancient Silver Dragon", + { + "image": null, + "bestiary": true, + "name": "Ancient Silver Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Gargantuan", + "alignment": "lawful good", + "hp": 487, + "hit_dice": "25d20 + 225", + "ac": "22 (natural armor)", + "speed": "40 ft., fly 80 ft.", + "stats": [ + 30, + 10, + 29, + 18, + 15, + 23 + ], + "damage_immunities": "cold", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "7" + }, + { + "constitution": "16" + }, + { + "wisdom": "9" + }, + { + "charisma": "13" + } + ], + "skillsaves": [ + { + "arcana": "11" + }, + { + "history": "11" + }, + { + "perception": "16" + }, + { + "stealth": "7" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 26", + "languages": "Common, Draconic", + "cr": "23", + "traits": [ + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dragon fails a saving throw, it can choose to succeed instead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +17 to hit, reach 15 ft., one target. 21 (2d10 + 10) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +17 to hit, reach 10 ft., one target. 17 (2d6 + 10) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +17 to hit, reach 20 ft., one target. 19 (2d8 + 10) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a 21 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours." + }, + { + "name": "Breath Weapons (Recharge 5-6)", + "desc": "The dragon uses one of the following breath weapons." + }, + { + "name": "Cold Breath", + "desc": "The dragon exhales an icy blast in a 90-foot cone. Each creature in that area must make a 24 Constitution saving throw, taking 67 (15d8) cold damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Paralyzing Breath", + "desc": "The dragon exhales paralyzing gas in a 90-foot cone. Each creature in that area must succeed on a 24 Constitution saving throw or be paralyzed for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "Change Shape", + "desc": "The dragon magically polymorphs into a humanoid or beast that has a challenge rating no higher than its own, or back into its true form. It reverts to its true form if it dies. Any equipment it is wearing or carrying is absorbed or borne by the new form (the dragon's choice).\nIn a new form, the dragon retains its alignment, hit points, Hit Dice, ability to speak, proficiencies, Legendary Resistance, lair actions, and Intelligence, Wisdom, and Charisma scores, as well as this action. Its statistics and capabilities are otherwise replaced by those of the new form, except any class features or legendary actions of that form." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dragon makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dragon makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dragon beats its wings. Each creature within 15 feet of the dragon must succeed on a 25 Dexterity saving throw or take 17 (2d6 + 10) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ancient White Dragon", + { + "image": null, + "bestiary": true, + "name": "Ancient White Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Gargantuan", + "alignment": "chaotic evil", + "hp": 333, + "hit_dice": "18d20 + 144", + "ac": "20 (natural armor)", + "speed": "40 ft., burrow 40 ft., fly 80 ft., swim 40 ft.", + "stats": [ + 26, + 10, + 26, + 10, + 13, + 14 + ], + "damage_immunities": "cold", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "6" + }, + { + "constitution": "14" + }, + { + "wisdom": "7" + }, + { + "charisma": "8" + } + ], + "skillsaves": [ + { + "perception": "13" + }, + { + "stealth": "6" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 23", + "languages": "Common, Draconic", + "cr": "20", + "traits": [ + { + "name": "Ice Walk", + "desc": "The dragon can move across and climb icy surfaces without needing to make an ability check. Additionally, difficult terrain composed of ice or snow doesn't cost it extra movement." + }, + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the dragon fails a saving throw, it can choose to succeed instead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +14 to hit, reach 15 ft., one target. 19 (2d10 + 8) piercing damage plus 9 (2d8) cold damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +14 to hit, reach 10 ft., one target. 15 (2d6 + 8) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +14 to hit, reach 20 ft., one target. 17 (2d8 + 8) bludgeoning damage." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a 16 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours." + }, + { + "name": "Cold Breath (Recharge 5-6)", + "desc": "The dragon exhales an icy blast in a 90-foot cone. Each creature in that area must make a 22 Constitution saving throw, taking 72 (16d8) cold damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Detect", + "desc": "The dragon makes a Wisdom (Perception) check." + }, + { + "name": "Tail Attack", + "desc": "The dragon makes a tail attack." + }, + { + "name": "Wing Attack (Costs 2 Actions)", + "desc": "The dragon beats its wings. Each creature within 15 feet of the dragon must succeed on a 22 Dexterity saving throw or take 15 (2d6 + 8) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Androsphinx", + { + "image": null, + "bestiary": true, + "name": "Androsphinx", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "lawful neutral", + "hp": 199, + "hit_dice": "19d10 + 95", + "ac": "17 (natural armor)", + "speed": "40 ft., fly 60 ft.", + "stats": [ + 22, + 10, + 20, + 16, + 18, + 23 + ], + "damage_immunities": "psychic, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, frightened", + "saves": [ + { + "dexterity": "6" + }, + { + "constitution": "11" + }, + { + "intelligence": "9" + }, + { + "wisdom": "10" + } + ], + "skillsaves": [ + { + "arcana": "9" + }, + { + "perception": "10" + }, + { + "religion": "15" + } + ], + "senses": "truesight 120 ft., passive Perception 20", + "languages": "Common, Sphinx", + "cr": "17", + "traits": [ + { + "name": "Inscrutable", + "desc": "The sphinx is immune to any effect that would sense its emotions or read its thoughts, as well as any divination spell that it refuses. Wisdom (Insight) checks made to ascertain the sphinx's intentions or sincerity have disadvantage." + }, + { + "name": "Magic Weapons", + "desc": "The sphinx's weapon attacks are magical." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The sphinx makes two claw attacks." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +12 to hit, reach 5 ft., one target. 17 (2d10 + 6) slashing damage." + }, + { + "name": "Roar (3/Day)", + "desc": "The sphinx emits a magical roar. Each time it roars before finishing a long rest, the roar is louder and the effect is different, as detailed below. Each creature within 500 feet of the sphinx and able to hear the roar must make a saving throw." + }, + { + "name": "First Roar", + "desc": "Each creature that fails a 18 Wisdom saving throw is frightened for 1 minute. A frightened creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "Second Roar", + "desc": "Each creature that fails a 18 Wisdom saving throw is deafened and frightened for 1 minute. A frightened creature is paralyzed and can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "Third Roar", + "desc": "Each creature makes a 18 Constitution saving throw. On a failed save, a creature takes 44 (8d10) thunder damage and is knocked prone. On a successful save, the creature takes half as much damage and isn't knocked prone." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Claw Attack", + "desc": "The sphinx makes one claw attack." + }, + { + "name": "Teleport (Costs 2 Actions)", + "desc": "The sphinx magically teleports, along with any equipment it is wearing or carrying, up to 120 feet to an unoccupied space it can see." + }, + { + "name": "Cast a Spell (Costs 3 Actions)", + "desc": "The sphinx casts a spell from its list of prepared spells, using a spell slot as normal." + } + ], + "mythic_actions": [], + "spells": [ + "The sphinx is a 12th-level spellcaster. Its spellcasting ability is Wisdom (spell save 18, +10 to hit with spell attacks). It requires no material components to cast its spells. The sphinx has the following cleric spells prepared:", + { + "Cantrips (at will)": "sacred flame, spare the dying, thaumaturgy" + }, + { + "1st level (4 slots)": "command, detect evil and good, detect magic" + }, + { + "2nd level (3 slots)": "lesser restoration, zone of truth" + }, + { + "3rd level (3 slots)": "dispel magic, tongues" + }, + { + "4th level (3 slots)": "banishment, freedom of movement" + }, + { + "5th level (2 slots)": "flame strike, greater restoration" + }, + { + "6th level (1 slots)": "heroes' feast" + } + ], + "spellsNotes": "" + } + ], + [ + "Animated Armor", + { + "image": null, + "bestiary": true, + "name": "Animated Armor", + "source": [ + "Monster Manual" + ], + "type": "construct", + "size": "Medium", + "alignment": "unaligned", + "hp": 33, + "hit_dice": "6d8 + 6", + "ac": "18 (natural armor)", + "speed": "25 ft.", + "stats": [ + 14, + 11, + 13, + 1, + 3, + 1 + ], + "damage_immunities": "poison, psychic", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "blinded, charmed, deafened, exhaustion, frightened, paralyzed, petrified, poisoned", + "saves": [], + "skillsaves": [], + "senses": "blindsight 60 ft. (blind beyond this radius), passive Perception 6", + "languages": "", + "cr": "1", + "traits": [ + { + "name": "Antimagic Susceptibility", + "desc": "The armor is incapacitated while in the area of an antimagic field. If targeted by dispel magic, the armor must succeed on a Constitution saving throw against the caster's spell save DC or fall unconscious for 1 minute." + }, + { + "name": "False Appearance", + "desc": "While the armor remains motionless, it is indistinguishable from a normal suit of armor." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The armor makes two melee attacks." + }, + { + "name": "Slam", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d6 + 2) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ankheg", + { + "image": null, + "bestiary": true, + "name": "Ankheg", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "unaligned", + "hp": 39, + "hit_dice": "6d10 + 6", + "ac": "14 (natural armor)", + "speed": "30 ft., burrow 10 ft.", + "stats": [ + 17, + 11, + 13, + 1, + 13, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., tremorsense 60 ft., passive Perception 11", + "languages": "", + "cr": "2", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 10 (2d6 + 3) slashing damage plus 3 (1d6) acid damage. If the target is a Large or smaller creature, it is grappled (escape 13). Until this grapple ends, the ankheg can bite only the grappled creature and has advantage on attack rolls to do so." + }, + { + "name": "Acid Spray (Recharge 6)", + "desc": "The ankheg spits acid in a line that is 30 feet long and 5 feet wide, provided that it has no creature grappled. Each creature in that line must make a 13 Dexterity saving throw, taking 10 (3d6) acid damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ankylosaurus", + { + "image": null, + "bestiary": true, + "name": "Ankylosaurus", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Huge", + "alignment": "unaligned", + "hp": 68, + "hit_dice": "8d12 + 16", + "ac": "15 (natural armor)", + "speed": "30 ft.", + "stats": [ + 19, + 11, + 15, + 2, + 12, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 11", + "languages": "", + "cr": "3", + "traits": [], + "actions": [ + { + "name": "Tail", + "desc": "Melee Weapon Attack +7 to hit, reach 10 ft., one target. 18 (4d6 + 4) bludgeoning damage. If the target is a creature, it must succeed on a 14 Strength saving throw or be knocked prone." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ape", + { + "image": null, + "bestiary": true, + "name": "Ape", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 19, + "hit_dice": "3d8 + 6", + "ac": 12, + "speed": "30 ft., climb 30 ft.", + "stats": [ + 16, + 14, + 14, + 6, + 12, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "athletics": "5" + }, + { + "perception": "3" + } + ], + "senses": "passive Perception 13", + "languages": "", + "cr": "1/2", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The ape makes two fist attacks." + }, + { + "name": "Fist", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) bludgeoning damage." + }, + { + "name": "Rock", + "desc": "Ranged Weapon Attack +5 to hit, range 25/50 ft., one target. 6 (1d6 + 3) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Arcanaloth", + { + "image": null, + "bestiary": true, + "name": "Arcanaloth", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "yugoloth", + "size": "Medium", + "alignment": "neutral evil", + "hp": 104, + "hit_dice": "16d8 + 32", + "ac": "17 (natural armor)", + "speed": "30 ft., fly 30 ft.", + "stats": [ + 17, + 12, + 14, + 20, + 16, + 17 + ], + "damage_immunities": "acid, poison", + "damage_resistances": "cold, fire, lightning, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, poisoned", + "saves": [ + { + "dexterity": "5" + }, + { + "intelligence": "9" + }, + { + "wisdom": "7" + }, + { + "charisma": "7" + } + ], + "skillsaves": [ + { + "arcana": "13" + }, + { + "deception": "11" + }, + { + "insight": "11" + }, + { + "perception": "7" + } + ], + "senses": "truesight 120 ft., passive Perception 17", + "languages": "all, telepathy 120 ft.", + "cr": "12", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The arcanaloth has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Magic Weapons", + "desc": "The arcanaloth's weapon attacks are magical." + } + ], + "actions": [ + { + "name": "Claws", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 8 (2d4 + 3) slashing damage. The target must make a 14 Constitution saving throw, taking 10 (3d6) poison damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Teleport", + "desc": "The arcanaloth magically teleports, along with any equipment it is wearing or carrying, up to 60 feet to an unoccupied space it can see." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The arcanaloth's innate spellcasting ability is Charisma (spell save 15). The arcanaloth can innately cast the following spells, requiring no material components:", + { + "At will": "alter self, darkness, heat metal, invisibility (self only), magic missile" + }, + "The arcanaloth is a 16th-level spellcaster. Its spellcasting ability is Intelligence (spell save 17, +9 to hit with spell attacks). The arcanaloth has the following wizard spells prepared:", + { + "Cantrips (at will)": "fire bolt, mage hand, minor illusion, prestidigitation" + }, + { + "1st level (4 slots)": "detect magic, identify, shield, Tenser's floating disk" + }, + { + "2nd level (3 slots)": "detect thoughts, mirror image, phantasmal force, suggestion" + }, + { + "3rd level (3 slots)": "counterspell, fear, fireball" + }, + { + "4th level (3 slots)": "banishment, dimension door" + }, + { + "5th level (2 slots)": "contact other plane, hold monster" + }, + { + "6th level (1 slots)": "chain lightning" + }, + { + "7th level (1 slots)": "finger of death" + }, + { + "8th level (1 slots)": "mind blank" + } + ], + "spellsNotes": " " + } + ], + [ + "Archmage", + { + "image": null, + "bestiary": true, + "name": "Archmage", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "any alignment", + "hp": 99, + "hit_dice": "18d8 + 18", + "ac": 12, + "speed": "30 ft.", + "stats": [ + 10, + 14, + 12, + 20, + 15, + 16 + ], + "damage_immunities": "", + "damage_resistances": "damage from spells, bludgeoning, piercing, slashing (from stoneskin)", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "intelligence": "9" + }, + { + "wisdom": "6" + } + ], + "skillsaves": [ + { + "arcana": "13" + }, + { + "history": "13" + } + ], + "senses": "passive Perception 12", + "languages": "any six languages", + "cr": "12", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The archmage has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Dagger", + "desc": "Melee / Ranged Weapon Attack +6 to hit, reach 5 ft. or range 20/60 ft., one target. 4 (1d4 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The archmage is an 18th-level spellcaster. Its spellcasting ability is Intelligence (spell save 17, +9 to hit with spell attacks). The archmage can cast disguise self and invisibility at will and has the following wizard spells prepared:", + { + "Cantrips (at will)": "fire bolt, light, mage hand, prestidigitation, shocking grasp" + }, + { + "1st level (4 slots)": "detect magic, identify, mage armor*, magic missile" + }, + { + "2nd level (3 slots)": "detect thoughts, mirror image, misty step" + }, + { + "3rd level (3 slots)": "counterspell, fly, lightning bolt" + }, + { + "4th level (3 slots)": "banishment, fire shield, stoneskin*" + }, + { + "5th level (3 slots)": "cone of cold, scrying, wall of force" + }, + { + "6th level (1 slots)": "globe of invulnerability" + }, + { + "7th level (1 slots)": "teleport" + }, + { + "8th level (1 slots)": "mind blank*" + }, + { + "9th level (1 slots)": "time stop" + }, + { + "At will": "disguise self, invisibility" + } + ], + "spellsNotes": "*The archmage casts these spells on itself before combat." + } + ], + [ + "Assassin", + { + "image": null, + "bestiary": true, + "name": "Assassin", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "lawful neutral (law/chaos axis) chaotic neutral (good/evil axis) evil", + "hp": 78, + "hit_dice": "12d8 + 24", + "ac": "15 (studded leather armor)", + "speed": "30 ft.", + "stats": [ + 11, + 16, + 14, + 13, + 11, + 10 + ], + "damage_immunities": "", + "damage_resistances": "poison", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "6" + }, + { + "intelligence": "4" + } + ], + "skillsaves": [ + { + "acrobatics": "6" + }, + { + "deception": "3" + }, + { + "perception": "3" + }, + { + "stealth": "9" + } + ], + "senses": "passive Perception 13", + "languages": "Thieves' cant plus any two languages", + "cr": "8", + "traits": [ + { + "name": "Assassinate", + "desc": "During its first turn, the assassin has advantage on attack rolls against any creature that hasn't taken a turn. Any hit the assassin scores against a {@status surprised} creature is a critical hit." + }, + { + "name": "Evasion", + "desc": "If the assassin is subjected to an effect that allows it to make a Dexterity saving throw to take only half damage, the assassin instead takes no damage if it succeeds on the saving throw, and only half damage if it fails." + }, + { + "name": "Sneak Attack (1/Turn)", + "desc": "The assassin deals an extra 14 (4d6) damage when it hits a target with a weapon attack and has advantage on the attack roll, or when the target is within 5 feet of an ally of the assassin that isn't incapacitated and the assassin doesn't have disadvantage on the attack roll." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The assassin makes two shortsword attacks." + }, + { + "name": "Shortsword", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 6 (1d6 + 3) piercing damage, and the target must make a 15 Constitution saving throw, taking 24 (7d6) poison damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Light Crossbow", + "desc": "Ranged Weapon Attack +6 to hit, range 80/320 ft., one target. 7 (1d8 + 3) piercing damage, and the target must make a 15 Constitution saving throw, taking 24 (7d6) poison damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Awakened Shrub", + { + "image": null, + "bestiary": true, + "name": "Awakened Shrub", + "source": [ + "Monster Manual" + ], + "type": "plant", + "size": "Small", + "alignment": "unaligned", + "hp": 10, + "hit_dice": "3d6", + "ac": 9, + "speed": "20 ft.", + "stats": [ + 3, + 8, + 11, + 10, + 10, + 6 + ], + "damage_immunities": "", + "damage_resistances": "piercing", + "damage_vulnerabilities": "fire", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 10", + "languages": "one language known by its creator", + "cr": "0", + "traits": [ + { + "name": "False Appearance", + "desc": "While the shrub remains motionless, it is indistinguishable from a normal shrub." + } + ], + "actions": [ + { + "name": "Rake", + "desc": "Melee Weapon Attack +1 to hit, reach 5 ft., one target. 1 (1d4 - 1) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Awakened Tree", + { + "image": null, + "bestiary": true, + "name": "Awakened Tree", + "source": [ + "Monster Manual" + ], + "type": "plant", + "size": "Huge", + "alignment": "unaligned", + "hp": 59, + "hit_dice": "7d12 + 14", + "ac": "13 (natural armor)", + "speed": "20 ft.", + "stats": [ + 19, + 6, + 15, + 10, + 10, + 7 + ], + "damage_immunities": "", + "damage_resistances": "bludgeoning, piercing", + "damage_vulnerabilities": "fire", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 10", + "languages": "one language known by its creator", + "cr": "2", + "traits": [ + { + "name": "False Appearance", + "desc": "While the tree remains motionless, it is indistinguishable from a normal tree." + } + ], + "actions": [ + { + "name": "Slam", + "desc": "Melee Weapon Attack +6 to hit, reach 10 ft., one target. 14 (3d6 + 4) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Axe Beak", + { + "image": null, + "bestiary": true, + "name": "Axe Beak", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 19, + "hit_dice": "3d10 + 3", + "ac": 11, + "speed": "50 ft.", + "stats": [ + 14, + 12, + 12, + 2, + 10, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 10", + "languages": "", + "cr": "1/4", + "traits": [], + "actions": [ + { + "name": "Beak", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 6 (1d8 + 2) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Azer", + { + "image": null, + "bestiary": true, + "name": "Azer", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Medium", + "alignment": "lawful neutral", + "hp": 39, + "hit_dice": "6d8 + 12", + "ac": "17 (natural armor, shield)", + "speed": "30 ft.", + "stats": [ + 17, + 12, + 15, + 12, + 13, + 10 + ], + "damage_immunities": "fire, poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "constitution": "4" + } + ], + "skillsaves": [], + "senses": "passive Perception 11", + "languages": "Ignan", + "cr": "2", + "traits": [ + { + "name": "Heated Body", + "desc": "A creature that touches the azer or hits it with a melee attack while within 5 feet of it takes 5 (1d10) fire damage." + }, + { + "name": "Heated Weapons", + "desc": "When the azer hits with a metal melee weapon, it deals an extra 3 (1d6) fire damage (included in the attack)." + }, + { + "name": "Illumination", + "desc": "The azer sheds bright light in a 10-foot radius and dim light for an additional 10 feet." + } + ], + "actions": [ + { + "name": "Warhammer", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 7 (1d8 + 3) bludgeoning damage, or 8 (1d10 + 3) bludgeoning damage if used with two hands to make a melee attack, plus 3 (1d6) fire damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Baboon", + { + "image": null, + "bestiary": true, + "name": "Baboon", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Small", + "alignment": "unaligned", + "hp": 3, + "hit_dice": "1d6", + "ac": 12, + "speed": "30 ft., climb 30 ft.", + "stats": [ + 8, + 14, + 11, + 4, + 12, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 11", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Pack Tactics", + "desc": "The baboon has advantage on an attack roll against a creature if at least one of the baboon's allies is within 5 feet of the creature and the ally isn't incapacitated." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +1 to hit, reach 5 ft., one target. 1 (1d4 - 1) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Badger", + { + "image": null, + "bestiary": true, + "name": "Badger", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Tiny", + "alignment": "unaligned", + "hp": 3, + "hit_dice": "1d4 + 1", + "ac": 10, + "speed": "20 ft., burrow 5 ft.", + "stats": [ + 4, + 11, + 12, + 2, + 12, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 30 ft., passive Perception 11", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Keen Smell", + "desc": "The badger has advantage on Wisdom (Perception) checks that rely on smell." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one target. 1 piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Balor", + { + "image": null, + "bestiary": true, + "name": "Balor", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "demon", + "size": "Huge", + "alignment": "chaotic evil", + "hp": 262, + "hit_dice": "21d12 + 126", + "ac": "19 (natural armor)", + "speed": "40 ft., fly 80 ft.", + "stats": [ + 26, + 15, + 22, + 20, + 16, + 22 + ], + "damage_immunities": "fire, poison", + "damage_resistances": "cold, lightning, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "strength": "14" + }, + { + "constitution": "12" + }, + { + "wisdom": "9" + }, + { + "charisma": "12" + } + ], + "skillsaves": [], + "senses": "truesight 120 ft., passive Perception 13", + "languages": "Abyssal, telepathy 120 ft.", + "cr": "19", + "traits": [ + { + "name": "Death Throes", + "desc": "When the balor dies, it explodes, and each creature within 30 feet of it must make a 20 Dexterity saving throw, taking 70 (20d6) fire damage on a failed save, or half as much damage on a successful one. The explosion ignites flammable objects in that area that aren't being worn or carried, and it destroys the balor's weapons." + }, + { + "name": "Fire Aura", + "desc": "At the start of each of the balor's turns, each creature within 5 feet of it takes 10 (3d6) fire damage, and flammable objects in the aura that aren't being worn or carried ignite. A creature that touches the balor or hits it with a melee attack while within 5 feet of it takes 10 (3d6) fire damage." + }, + { + "name": "Magic Resistance", + "desc": "The balor has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Magic Weapons", + "desc": "The balor's weapon attacks are magical." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The balor makes two attacks: one with its longsword and one with its whip." + }, + { + "name": "Longsword", + "desc": "Melee Weapon Attack +14 to hit, reach 10 ft., one target. 21 (3d8 + 8) slashing damage plus 13 (3d8) lightning damage. If the balor scores a critical hit, it rolls damage dice three times, instead of twice." + }, + { + "name": "Whip", + "desc": "Melee Weapon Attack +14 to hit, reach 30 ft., one target. 15 (2d6 + 8) slashing damage plus 10 (3d6) fire damage, and the target must succeed on a 20 Strength saving throw or be pulled up to 25 feet toward the balor." + }, + { + "name": "Teleport", + "desc": "The balor magically teleports, along with any equipment it is wearing or carrying, up to 120 feet to an unoccupied space it can see." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Bandit", + { + "image": null, + "bestiary": true, + "name": "Bandit", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "neutral (law/chaos axis) chaotic good neutral (good/evil axis) evil", + "hp": 11, + "hit_dice": "2d8 + 2", + "ac": "12 (leather armor)", + "speed": "30 ft.", + "stats": [ + 11, + 12, + 12, + 10, + 10, + 10 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 10", + "languages": "any one language (usually Common)", + "cr": "1/8", + "traits": [], + "actions": [ + { + "name": "Scimitar", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 4 (1d6 + 1) slashing damage." + }, + { + "name": "Light Crossbow", + "desc": "Ranged Weapon Attack +3 to hit, range 80/320 ft., one target. 5 (1d8 + 1) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Bandit Captain", + { + "image": null, + "bestiary": true, + "name": "Bandit Captain", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "neutral (law/chaos axis) chaotic good neutral (good/evil axis) evil", + "hp": 65, + "hit_dice": "10d8 + 20", + "ac": "15 (studded leather armor)", + "speed": "30 ft.", + "stats": [ + 15, + 16, + 14, + 14, + 11, + 14 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "strength": "4" + }, + { + "dexterity": "5" + }, + { + "wisdom": "2" + } + ], + "skillsaves": [ + { + "athletics": "4" + }, + { + "deception": "4" + } + ], + "senses": "passive Perception 10", + "languages": "any two languages", + "cr": "2", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The captain makes three melee attacks: two with its scimitar and one with its dagger. Or the captain makes two ranged attacks with its daggers." + }, + { + "name": "Scimitar", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) slashing damage." + }, + { + "name": "Dagger", + "desc": "Melee / Ranged Weapon Attack +5 to hit, reach 5 ft. or range 20/60 ft., one target. 5 (1d4 + 3) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [ + { + "name": "Parry", + "desc": "The captain adds 2 to its AC against one melee attack that would hit it. To do so, the captain must see the attacker and be wielding a melee weapon." + } + ], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Banshee", + { + "image": null, + "bestiary": true, + "name": "Banshee", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 58, + "hit_dice": "13d8", + "ac": 12, + "speed": "0 ft., fly 40 ft. (hover)", + "stats": [ + 1, + 14, + 10, + 12, + 11, + 17 + ], + "damage_immunities": "cold, necrotic, poison", + "damage_resistances": "acid, fire, lightning, thunder, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, frightened, grappled, paralyzed, petrified, poisoned, prone, restrained", + "saves": [ + { + "wisdom": "2" + }, + { + "charisma": "5" + } + ], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Common, Elvish", + "cr": "4", + "traits": [ + { + "name": "Detect Life", + "desc": "The banshee can magically sense the presence of living creatures up to 5 miles away that aren't undead or constructs. She knows the general direction they're in but not their exact locations." + }, + { + "name": "Incorporeal Movement", + "desc": "The banshee can move through other creatures and objects as if they were difficult terrain. She takes 5 (1d10) force damage if she ends her turn inside an object." + } + ], + "actions": [ + { + "name": "Corrupting Touch", + "desc": "Melee Spell Attack +4 to hit, reach 5 ft., one target. 12 (3d6 + 2) necrotic damage." + }, + { + "name": "Horrifying Visage", + "desc": "Each non-undead creature within 60 feet of the banshee that can see her must succeed on a 13 Wisdom saving throw or be frightened for 1 minute. A frightened target can repeat the saving throw at the end of each of its turns, with disadvantage if the banshee is within line of sight, ending the effect on itself on a success. If a target's saving throw is successful or the effect ends for it, the target is immune to the banshee's Horrifying Visage for the next 24 hours." + }, + { + "name": "Wail (1/Day)", + "desc": "The banshee releases a mournful wail, provided that she isn't in sunlight. This wail has no effect on constructs and undead. All other creatures within 30 feet of her that can hear her must make a 13 Constitution saving throw. On a failure, a creature drops to 0 hit points. On a success, a creature takes 10 (3d6) psychic damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Barbed Devil", + { + "image": null, + "bestiary": true, + "name": "Barbed Devil", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "devil", + "size": "Medium", + "alignment": "lawful evil", + "hp": 110, + "hit_dice": "13d8 + 52", + "ac": "15 (natural armor)", + "speed": "30 ft.", + "stats": [ + 16, + 17, + 18, + 12, + 14, + 14 + ], + "damage_immunities": "fire, poison", + "damage_resistances": "cold, bludgeoning, piercing, slashing from nonmagical attacks that aren't silvered", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "strength": "6" + }, + { + "constitution": "7" + }, + { + "wisdom": "5" + }, + { + "charisma": "5" + } + ], + "skillsaves": [ + { + "deception": "5" + }, + { + "insight": "5" + }, + { + "perception": "8" + } + ], + "senses": "darkvision 120 ft., passive Perception 18", + "languages": "Infernal, telepathy 120 ft.", + "cr": "5", + "traits": [ + { + "name": "Barbed Hide", + "desc": "At the start of each of its turns, the barbed devil deals 5 (1d10) piercing damage to any creature grappling it." + }, + { + "name": "Devil's Sight", + "desc": "Magical darkness doesn't impede the devil's darkvision." + }, + { + "name": "Magic Resistance", + "desc": "The devil has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The devil makes three melee attacks: one with its tail and two with its claws. Alternatively, it can use Hurl Flame twice." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 6 (1d6 + 3) piercing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 10 (2d6 + 3) piercing damage." + }, + { + "name": "Hurl Flame", + "desc": "Ranged Spell Attack +5 to hit, range 150 ft., one target. 10 (3d6) fire damage. If the target is a flammable object that isn't being worn or carried, it also catches fire." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Barlgura", + { + "image": null, + "bestiary": true, + "name": "Barlgura", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "demon", + "size": "Large", + "alignment": "chaotic evil", + "hp": 68, + "hit_dice": "8d10 + 24", + "ac": "15 (natural armor)", + "speed": "40 ft., climb 40 ft.", + "stats": [ + 18, + 15, + 16, + 7, + 14, + 9 + ], + "damage_immunities": "poison", + "damage_resistances": "cold, fire, lightning", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "dexterity": "5" + }, + { + "constitution": "6" + } + ], + "skillsaves": [ + { + "perception": "5" + }, + { + "stealth": "5" + } + ], + "senses": "blindsight 30 ft., darkvision 120 ft., passive Perception 15", + "languages": "Abyssal, telepathy 120 ft.", + "cr": "5", + "traits": [ + { + "name": "Reckless", + "desc": "At the start of its turn, the barlgura can gain advantage on all melee weapon attack rolls it makes during that turn, but attack rolls against it have advantage until the start of its next turn." + }, + { + "name": "Running Leap", + "desc": "The barlgura's long jump is up to 40 feet and its high jump is up to 20 feet when it has a running start." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The barlgura makes three attacks: one with its bite and two with its fists." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 11 (2d6 + 4) piercing damage." + }, + { + "name": "Fist", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 9 (1d10 + 4) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The barlgura's spellcasting ability is Wisdom (spell save 13). The barlgura can innately cast the following spells, requiring no material components:", + { + "2/day each": "disguise self, invisibility (self only)" + }, + { + "1/day each": "entangle, phantasmal force" + } + ], + "spellsNotes": "" + } + ], + [ + "Basilisk", + { + "image": null, + "bestiary": true, + "name": "Basilisk", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Medium", + "alignment": "unaligned", + "hp": 52, + "hit_dice": "8d8 + 16", + "ac": "15 (natural armor)", + "speed": "20 ft.", + "stats": [ + 16, + 8, + 15, + 2, + 8, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 9", + "languages": "", + "cr": "3", + "traits": [ + { + "name": "Petrifying Gaze", + "desc": "If a creature starts its turn within 30 feet of the basilisk and the two of them can see each other, the basilisk can force the creature to make a 12 Constitution saving throw if the basilisk isn't incapacitated. On a failed save, the creature magically begins to turn to stone and is restrained. It must repeat the saving throw at the end of its next turn. On a success, the effect ends. On a failure, the creature is petrified until freed by the greater restoration spell or other magic.\nA creature that isn't {@status surprised} can avert its eyes to avoid the saving throw at the start of its turn. If it does so, it can't see the basilisk until the start of its next turn, when it can avert its eyes again. If it looks at the basilisk in the meantime, it must immediately make the save.\nIf the basilisk sees its reflection within 30 feet of it in bright light, it mistakes itself for a rival and targets itself with its gaze." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 10 (2d6 + 3) piercing damage plus 7 (2d6) poison damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Bat", + { + "image": null, + "bestiary": true, + "name": "Bat", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Tiny", + "alignment": "unaligned", + "hp": 1, + "hit_dice": "1d4 - 1", + "ac": 12, + "speed": "5 ft., fly 30 ft.", + "stats": [ + 2, + 15, + 8, + 2, + 12, + 4 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "blindsight 60 ft., passive Perception 11", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Echolocation", + "desc": "The bat can't use its blindsight while deafened." + }, + { + "name": "Keen Hearing", + "desc": "The bat has advantage on Wisdom (Perception) checks that rely on hearing." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +0 to hit, reach 5 ft., one creature. 1 piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Bearded Devil", + { + "image": null, + "bestiary": true, + "name": "Bearded Devil", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "devil", + "size": "Medium", + "alignment": "lawful evil", + "hp": 52, + "hit_dice": "8d8 + 16", + "ac": "13 (natural armor)", + "speed": "30 ft.", + "stats": [ + 16, + 15, + 15, + 9, + 11, + 11 + ], + "damage_immunities": "fire, poison", + "damage_resistances": "cold, bludgeoning, piercing, slashing from nonmagical attacks that aren't silvered", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "strength": "5" + }, + { + "constitution": "4" + }, + { + "wisdom": "2" + } + ], + "skillsaves": [], + "senses": "darkvision 120 ft., passive Perception 10", + "languages": "Infernal, telepathy 120 ft.", + "cr": "3", + "traits": [ + { + "name": "Devil's Sight", + "desc": "Magical darkness doesn't impede the devil's darkvision." + }, + { + "name": "Magic Resistance", + "desc": "The devil has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Steadfast", + "desc": "The devil can't be frightened while it can see an allied creature within 30 feet of it." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The devil makes two attacks: one with its beard and one with its glaive." + }, + { + "name": "Beard", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one creature. 6 (1d8 + 2) piercing damage, and the target must succeed on a 12 Constitution saving throw or be poisoned for 1 minute. While poisoned in this way, the target can't regain hit points. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "Glaive", + "desc": "Melee Weapon Attack +5 to hit, reach 10 ft., one target. 8 (1d10 + 3) slashing damage. If the target is a creature other than an undead or a construct, it must succeed on a 12 Constitution saving throw or lose 5 (1d10) hit points at the start of each of its turns due to an infernal wound. Each time the devil hits the wounded target with this attack, the damage dealt by the wound increases by 5 (1d10). Any creature can take an action to stanch the wound with a successful 12 Wisdom (Medicine) check. The wound also closes if the target receives magical healing." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Behir", + { + "image": null, + "bestiary": true, + "name": "Behir", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Huge", + "alignment": "neutral evil", + "hp": 168, + "hit_dice": "16d12 + 64", + "ac": "17 (natural armor)", + "speed": "50 ft., climb 40 ft.", + "stats": [ + 23, + 16, + 18, + 7, + 14, + 12 + ], + "damage_immunities": "lightning", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "6" + }, + { + "stealth": "7" + } + ], + "senses": "darkvision 90 ft., passive Perception 16", + "languages": "Draconic", + "cr": "11", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The behir makes two attacks: one with its bite and one to constrict." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +10 to hit, reach 10 ft., one target. 22 (3d10 + 6) piercing damage." + }, + { + "name": "Constrict", + "desc": "Melee Weapon Attack +10 to hit, reach 5 ft., one Large or smaller creature. 17 (2d10 + 6) bludgeoning damage plus 17 (2d10 + 6) slashing damage. The target is grappled (escape 16) if the behir isn't already constricting a creature, and the target is restrained until this grapple ends." + }, + { + "name": "Lightning Breath (Recharge 5-6)", + "desc": "The behir exhales a line of lightning that is 20 feet long and 5 feet wide. Each creature in that line must make a 16 Dexterity saving throw, taking 66 (12d10) lightning damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Swallow", + "desc": "The behir makes one bite attack against a Medium or smaller target it is grappling. If the attack hits, the target is also swallowed, and the grapple ends. While swallowed, the target is blinded and restrained, it has Cover against attacks and other effects outside the behir, and it takes 21 (6d6) acid damage at the start of each of the behir's turns. A behir can have only one creature swallowed at a time.\nIf the behir takes 30 damage or more on a single turn from the swallowed creature, the behir must succeed on a 14 Constitution saving throw at the end of that turn or regurgitate the creature, which falls prone in a space within 10 feet of the behir. If the behir dies, a swallowed creature is no longer restrained by it and can escape from the corpse by using 15 feet of movement, exiting prone." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Beholder", + { + "image": null, + "bestiary": true, + "name": "Beholder", + "source": [ + "Monster Manual" + ], + "type": "aberration", + "size": "Large", + "alignment": "lawful evil", + "hp": 180, + "hit_dice": "19d10 + 76", + "ac": "18 (natural armor)", + "speed": "0 ft., fly 20 ft. (hover)", + "stats": [ + 10, + 14, + 18, + 17, + 15, + 17 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "prone", + "saves": [ + { + "intelligence": "8" + }, + { + "wisdom": "7" + }, + { + "charisma": "8" + } + ], + "skillsaves": [ + { + "perception": "12" + } + ], + "senses": "darkvision 120 ft., passive Perception 22", + "languages": "Deep Speech, Undercommon", + "cr": "13", + "traits": [ + { + "name": "Antimagic Cone", + "desc": "The beholder's central eye creates an area of antimagic, as in the antimagic field spell, in a 150-foot cone. At the start of each of its turns, the beholder decides which way the cone faces and whether the cone is active. The area works against the beholder's own eye rays." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 14 (4d6) piercing damage." + }, + { + "name": "Eye Rays", + "desc": "The beholder shoots three of the following magical eye rays at random (reroll duplicates), choosing one to three targets it can see within 120 feet of it:" + }, + { + "name": "1. Charm Ray", + "desc": "The targeted creature must succeed on a 16 Wisdom saving throw or be charmed by the beholder for 1 hour, or until the beholder harms the creature." + }, + { + "name": "2. Paralyzing Ray", + "desc": "The targeted creature must succeed on a 16 Constitution saving throw or be paralyzed for 1 minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "3. Fear Ray", + "desc": "The targeted creature must succeed on a 16 Wisdom saving throw or be frightened for 1 minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "4. Slowing Ray", + "desc": "The targeted creature must succeed on a 16 Dexterity saving throw. On a failed save, the target's speed is halved for 1 minute. In addition, the creature can't take reactions, and it can take either an action or a bonus action on its turn, not both. The creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "5. Enervation Ray", + "desc": "The targeted creature must make a 16 Constitution saving throw, taking 36 (8d8) necrotic damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "6. Telekinetic Ray", + "desc": "If the target is a creature, it must succeed on a 16 Strength saving throw or the beholder moves it up to 30 feet in any direction. It is restrained by the ray's telekinetic grip until the start of the beholder's next turn or until the beholder is incapacitated.\nIf the target is an object weighing 300 pounds or less that isn't being worn or carried, it is moved up to 30 feet in any direction. The beholder can also exert fine control on objects with this ray, such as manipulating a simple tool or opening a door or a container." + }, + { + "name": "7. Sleep Ray", + "desc": "The targeted creature must succeed on a 16 Wisdom saving throw or fall asleep and remain unconscious for 1 minute. The target awakens if it takes damage or another creature takes an action to wake it. This ray has no effect on constructs and undead." + }, + { + "name": "8. Petrification Ray", + "desc": "The targeted creature must make a 16 Dexterity saving throw. On a failed save, the creature begins to turn to stone and is restrained. It must repeat the saving throw at the end of its next turn. On a success, the effect ends. On a failure, the creature is petrified until freed by the greater restoration spell or other magic." + }, + { + "name": "9. Disintegration Ray", + "desc": "If the target is a creature, it must succeed on a 16 Dexterity saving throw or take 45 (10d8) force damage. If this damage reduces the creature to 0 hit points, its body becomes a pile of fine gray dust.\nIf the target is a Large or smaller nonmagical object or creation of magical force, it is disintegrated without a saving throw. If the target is a Huge or larger object or creation of magical force, this ray disintegrates a 10-foot cube of it." + }, + { + "name": "10. Death Ray", + "desc": "The targeted creature must succeed on a 16 Dexterity saving throw or take 55 (10d10) necrotic damage. The target dies if the ray reduces it to 0 hit points." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Eye Ray", + "desc": "The beholder uses one random eye ray." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Beholder Zombie", + { + "image": null, + "bestiary": true, + "name": "Beholder Zombie", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Large", + "alignment": "neutral evil", + "hp": 93, + "hit_dice": "11d10 + 33", + "ac": "15 (natural armor)", + "speed": "0 ft., fly 20 ft. (hover)", + "stats": [ + 10, + 8, + 16, + 3, + 8, + 5 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned, prone", + "saves": [ + { + "wisdom": "2" + } + ], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 9", + "languages": "understands Deep Speech and Undercommon but can't speak", + "cr": "5", + "traits": [ + { + "name": "Undead Fortitude", + "desc": "If damage reduces the zombie to 0 hit points, it must make a Constitution saving throw with a DC of 5 + the damage taken, unless the damage is radiant or from a critical hit. On a success, the zombie drops to 1 hit point instead." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 14 (4d6) piercing damage." + }, + { + "name": "Eye Ray", + "desc": "The zombie uses a random magical eye ray, choosing a target that it can see within 60 feet of it." + }, + { + "name": "1. Paralyzing Ray", + "desc": "The targeted creature must succeed on a 14 Constitution saving throw or be paralyzed for 1 minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "2. Fear Ray", + "desc": "The targeted creature must succeed on a 14 Wisdom saving throw or be frightened for 1 minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "3. Enervation Ray", + "desc": "The targeted creature must make a 14 Constitution saving throw, taking 36 (8d8) necrotic damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "4. Disintegration Ray", + "desc": "If the target is a creature, it must succeed on a 14 Dexterity saving throw or take 45 (10d8) force damage. If this damage reduces the creature to 0 hit points, its body becomes a pile of fine gray dust.\nIf the target is a Large or smaller nonmagical object or creation of magical force, it is disintegrated without a saving throw. If the target is a Huge or larger nonmagical object or creation of magical force, this ray disintegrates a 10-foot cube of it." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Berserker", + { + "image": null, + "bestiary": true, + "name": "Berserker", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "chaotic good neutral (good/evil axis) evil", + "hp": 67, + "hit_dice": "9d8 + 27", + "ac": "13 (hide armor)", + "speed": "30 ft.", + "stats": [ + 16, + 12, + 17, + 9, + 11, + 9 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 10", + "languages": "any one language (usually Common)", + "cr": "2", + "traits": [ + { + "name": "Reckless", + "desc": "At the start of its turn, the berserker can gain advantage on all melee weapon attack rolls during that turn, but attack rolls against it have advantage until the start of its next turn." + } + ], + "actions": [ + { + "name": "Greataxe", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 9 (1d12 + 3) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Black Bear", + { + "image": null, + "bestiary": true, + "name": "Black Bear", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 19, + "hit_dice": "3d8 + 6", + "ac": "11 (natural armor)", + "speed": "40 ft., climb 30 ft.", + "stats": [ + 15, + 10, + 14, + 2, + 12, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + } + ], + "senses": "passive Perception 13", + "languages": "", + "cr": "1/2", + "traits": [ + { + "name": "Keen Smell", + "desc": "The bear has advantage on Wisdom (Perception) checks that rely on smell." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The bear makes two attacks: one with its bite and one with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d6 + 2) piercing damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 7 (2d4 + 2) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Black Dragon Wyrmling", + { + "image": null, + "bestiary": true, + "name": "Black Dragon Wyrmling", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 33, + "hit_dice": "6d8 + 6", + "ac": "17 (natural armor)", + "speed": "30 ft., fly 60 ft., swim 30 ft.", + "stats": [ + 15, + 14, + 13, + 10, + 11, + 13 + ], + "damage_immunities": "acid", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "4" + }, + { + "constitution": "3" + }, + { + "wisdom": "2" + }, + { + "charisma": "3" + } + ], + "skillsaves": [ + { + "perception": "4" + }, + { + "stealth": "4" + } + ], + "senses": "blindsight 10 ft., darkvision 60 ft., passive Perception 14", + "languages": "Draconic", + "cr": "2", + "traits": [ + { + "name": "Amphibious", + "desc": "The dragon can breathe air and water." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 7 (1d10 + 2) piercing damage plus 2 (1d4) acid damage." + }, + { + "name": "Acid Breath (Recharge 5-6)", + "desc": "The dragon exhales acid in a 15-foot line that is 5 feet wide. Each creature in that line must make a 11 Dexterity saving throw, taking 22 (5d8) acid damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Black Pudding", + { + "image": null, + "bestiary": true, + "name": "Black Pudding", + "source": [ + "Monster Manual" + ], + "type": "ooze", + "size": "Large", + "alignment": "unaligned", + "hp": 85, + "hit_dice": "10d10 + 30", + "ac": 7, + "speed": "20 ft., climb 20 ft.", + "stats": [ + 16, + 5, + 16, + 1, + 6, + 1 + ], + "damage_immunities": "acid, cold, lightning, slashing", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "blinded, charmed, deafened, exhaustion, frightened, prone", + "saves": [], + "skillsaves": [], + "senses": "blindsight 60 ft. (blind beyond this radius), passive Perception 8", + "languages": "", + "cr": "4", + "traits": [ + { + "name": "Amorphous", + "desc": "The pudding can move through a space as narrow as 1 inch wide without squeezing." + }, + { + "name": "Corrosive Form", + "desc": "A creature that touches the pudding or hits it with a melee attack while within 5 feet of it takes 4 (1d8) acid damage. Any nonmagical weapon made of metal or wood that hits the pudding corrodes. After dealing damage, the weapon takes a permanent and cumulative −1 penalty to damage rolls. If its penalty drops to −5, the weapon is destroyed. Nonmagical ammunition made of metal or wood that hits the pudding is destroyed after dealing damage. The pudding can eat through 2-inch-thick, nonmagical wood or metal in 1 round." + }, + { + "name": "Spider Climb", + "desc": "The pudding can climb difficult surfaces, including upside down on ceilings, without needing to make an ability check." + } + ], + "actions": [ + { + "name": "Pseudopod", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) bludgeoning damage plus 18 (4d8) acid damage. In addition, nonmagical armor worn by the target is partly dissolved and takes a permanent and cumulative −1 penalty to the AC it offers. The armor is destroyed if the penalty reduces its AC to 10." + } + ], + "bonus_actions": [], + "reactions": [ + { + "name": "Split", + "desc": "When a pudding that is Medium or larger is subjected to lightning or slashing damage, it splits into two new puddings if it has at least 10 hit points. Each new pudding has hit points equal to half the original pudding's, rounded down. New puddings are one size smaller than the original pudding." + } + ], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Blink Dog", + { + "image": null, + "bestiary": true, + "name": "Blink Dog", + "source": [ + "Monster Manual" + ], + "type": "fey", + "size": "Medium", + "alignment": "lawful good", + "hp": 22, + "hit_dice": "4d8 + 4", + "ac": 13, + "speed": "40 ft.", + "stats": [ + 12, + 17, + 12, + 10, + 13, + 11 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + }, + { + "stealth": "5" + } + ], + "senses": "passive Perception 13", + "languages": "Blink Dog, understands Sylvan but can't speak it", + "cr": "1/4", + "traits": [ + { + "name": "Keen Hearing and Smell", + "desc": "The dog has advantage on Wisdom (Perception) checks that rely on hearing or smell." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 4 (1d6 + 1) piercing damage." + }, + { + "name": "Teleport (Recharge 4-6)", + "desc": "The dog magically teleports, along with any equipment it is wearing or carrying, up to 40 feet to an unoccupied space it can see. Before or after teleporting, the dog can make one bite attack." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Blood Hawk", + { + "image": null, + "bestiary": true, + "name": "Blood Hawk", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Small", + "alignment": "unaligned", + "hp": 7, + "hit_dice": "2d6", + "ac": 12, + "speed": "10 ft., fly 60 ft.", + "stats": [ + 6, + 14, + 10, + 3, + 14, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "4" + } + ], + "senses": "passive Perception 14", + "languages": "", + "cr": "1/8", + "traits": [ + { + "name": "Keen Sight", + "desc": "The hawk has advantage on Wisdom (Perception) checks that rely on sight." + }, + { + "name": "Pack Tactics", + "desc": "The hawk has advantage on an attack roll against a creature if at least one of the hawk's allies is within 5 feet of the creature and the ally isn't incapacitated." + } + ], + "actions": [ + { + "name": "Beak", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 4 (1d4 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Blue Dragon Wyrmling", + { + "image": null, + "bestiary": true, + "name": "Blue Dragon Wyrmling", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Medium", + "alignment": "lawful evil", + "hp": 52, + "hit_dice": "8d8 + 16", + "ac": "17 (natural armor)", + "speed": "30 ft., burrow 15 ft., fly 60 ft.", + "stats": [ + 17, + 10, + 15, + 12, + 11, + 15 + ], + "damage_immunities": "lightning", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "2" + }, + { + "constitution": "4" + }, + { + "wisdom": "2" + }, + { + "charisma": "4" + } + ], + "skillsaves": [ + { + "perception": "4" + }, + { + "stealth": "2" + } + ], + "senses": "blindsight 10 ft., darkvision 60 ft., passive Perception 14", + "languages": "Draconic", + "cr": "3", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 8 (1d10 + 3) piercing damage plus 3 (1d6) lightning damage." + }, + { + "name": "Lightning Breath (Recharge 5-6)", + "desc": "The dragon exhales lightning in a 30-foot line that is 5 feet wide. Each creature in that line must make a 12 Dexterity saving throw, taking 22 (4d10) lightning damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Blue Slaad", + { + "image": null, + "bestiary": true, + "name": "Blue Slaad", + "source": [ + "Monster Manual" + ], + "type": "aberration", + "size": "Large", + "alignment": "chaotic neutral", + "hp": 123, + "hit_dice": "13d10 + 52", + "ac": "15 (natural armor)", + "speed": "30 ft.", + "stats": [ + 20, + 15, + 18, + 7, + 7, + 9 + ], + "damage_immunities": "", + "damage_resistances": "acid, cold, fire, lightning, thunder", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "1" + } + ], + "senses": "darkvision 60 ft., passive Perception 11", + "languages": "Slaad, telepathy 60 ft.", + "cr": "7", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The slaad has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Regeneration", + "desc": "The slaad regains 10 hit points at the start of its turn if it has at least 1 hit point." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The slaad makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +8 to hit, reach 5 ft., one target. 12 (2d6 + 5) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +8 to hit, reach 5 ft., one target. 12 (2d6 + 5) slashing damage. If the target is a humanoid, it must succeed on a 15 Constitution saving throw or be infected with a disease called chaos phage. While infected, the target can't regain hit points, and its hit point maximum is reduced by 10 (3d6) every 24 hours. If the disease reduces the target's hit point maximum to 0, the target instantly transforms into a red slaad or, if it has the ability to cast spells of 3rd level or higher, a green slaad. Only a wish spell can reverse the transformation." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Boar", + { + "image": null, + "bestiary": true, + "name": "Boar", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 11, + "hit_dice": "2d8 + 2", + "ac": "11 (natural armor)", + "speed": "40 ft.", + "stats": [ + 13, + 11, + 12, + 2, + 9, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 9", + "languages": "", + "cr": "1/4", + "traits": [ + { + "name": "Charge", + "desc": "If the boar moves at least 20 feet straight toward a target and then hits it with a tusk attack on the same turn, the target takes an extra 3 (1d6) slashing damage. If the target is a creature, it must succeed on a 11 Strength saving throw or be knocked prone." + }, + { + "name": "Relentless (Recharges after a Short or Long Rest)", + "desc": "If the boar takes 7 damage or less that would reduce it to 0 hit points, it is reduced to 1 hit point instead." + } + ], + "actions": [ + { + "name": "Tusk", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 4 (1d6 + 1) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Bone Devil", + { + "image": null, + "bestiary": true, + "name": "Bone Devil", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "devil", + "size": "Large", + "alignment": "lawful evil", + "hp": 142, + "hit_dice": "15d10 + 60", + "ac": "19 (natural armor)", + "speed": "40 ft., fly 40 ft.", + "stats": [ + 18, + 16, + 18, + 13, + 14, + 16 + ], + "damage_immunities": "fire, poison", + "damage_resistances": "cold, bludgeoning, piercing, slashing from nonmagical attacks that aren't silvered", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "intelligence": "5" + }, + { + "wisdom": "6" + }, + { + "charisma": "7" + } + ], + "skillsaves": [ + { + "deception": "7" + }, + { + "insight": "6" + } + ], + "senses": "darkvision 120 ft., passive Perception 12", + "languages": "Infernal, telepathy 120 ft.", + "cr": "9", + "traits": [ + { + "name": "Devil's Sight", + "desc": "Magical darkness doesn't impede the devil's darkvision." + }, + { + "name": "Magic Resistance", + "desc": "The devil has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The devil makes three attacks: two with its claws and one with its sting." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +8 to hit, reach 10 ft., one target. 8 (1d8 + 4) slashing damage." + }, + { + "name": "Sting", + "desc": "Melee Weapon Attack +8 to hit, reach 10 ft., one target. 13 (2d8 + 4) piercing damage plus 17 (5d6) poison damage, and the target must succeed on a 14 Constitution saving throw or become poisoned for 1 minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Bone Naga (Guardian)", + { + "image": null, + "bestiary": true, + "name": "Bone Naga (Guardian)", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Large", + "alignment": "lawful evil", + "hp": 58, + "hit_dice": "9d10 + 9", + "ac": "15 (natural armor)", + "speed": "30 ft.", + "stats": [ + 15, + 16, + 12, + 15, + 15, + 16 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, paralyzed, poisoned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 12", + "languages": "Common plus one other language", + "cr": "4", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 10 ft., one creature. 10 (2d6 + 3) piercing damage plus 10 (3d6) poison damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The naga is a 5th-level spellcaster (spell save 12, +4 to hit with spell attacks) that needs only verbal components to cast its spells. Its spellcasting ability is Wisdom, and it has the following cleric spells prepared:", + { + "Cantrips (at will)": "mending, sacred flame, thaumaturgy" + }, + { + "1st level (4 slots)": "command, shield of faith" + }, + { + "2nd level (3 slots)": "calm emotions, hold person" + }, + { + "3rd level (2 slots)": "bestow curse" + } + ], + "spellsNotes": "" + } + ], + [ + "Bone Naga (Spirit)", + { + "image": null, + "bestiary": true, + "name": "Bone Naga (Spirit)", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Large", + "alignment": "lawful evil", + "hp": 58, + "hit_dice": "9d10 + 9", + "ac": "15 (natural armor)", + "speed": "30 ft.", + "stats": [ + 15, + 16, + 12, + 15, + 15, + 16 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, paralyzed, poisoned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 12", + "languages": "Common plus one other language", + "cr": "4", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 10 ft., one creature. 10 (2d6 + 3) piercing damage plus 10 (3d6) poison damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The naga is a 5th-level spellcaster (spell save 12, +4 to hit with spell attacks) that needs only verbal components to cast its spells. Its spellcasting ability is Intelligence, and it has the following wizard spells prepared:", + { + "Cantrips (at will)": "mage hand, minor illusion, ray of frost" + }, + { + "1st level (4 slots)": "charm person, sleep" + }, + { + "2nd level (3 slots)": "detect thoughts, hold person" + }, + { + "3rd level (2 slots)": "lightning bolt" + } + ], + "spellsNotes": "" + } + ], + [ + "Brass Dragon Wyrmling", + { + "image": null, + "bestiary": true, + "name": "Brass Dragon Wyrmling", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Medium", + "alignment": "chaotic good", + "hp": 16, + "hit_dice": "3d8 + 3", + "ac": "16 (natural armor)", + "speed": "30 ft., burrow 15 ft., fly 60 ft.", + "stats": [ + 15, + 10, + 13, + 10, + 11, + 13 + ], + "damage_immunities": "fire", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "2" + }, + { + "constitution": "3" + }, + { + "wisdom": "2" + }, + { + "charisma": "3" + } + ], + "skillsaves": [ + { + "perception": "4" + }, + { + "stealth": "2" + } + ], + "senses": "blindsight 10 ft., darkvision 60 ft., passive Perception 14", + "languages": "Draconic", + "cr": "1", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 7 (1d10 + 2) piercing damage." + }, + { + "name": "Breath Weapons (Recharge 5-6)", + "desc": "The dragon uses one of the following breath weapons." + }, + { + "name": "Fire Breath", + "desc": "The dragon exhales fire in a 20-foot line that is 5 feet wide. Each creature in that line must make a 11 Dexterity saving throw, taking 14 (4d6) fire damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Sleep Breath", + "desc": "The dragon exhales sleep gas in a 15-foot cone. Each creature in that area must succeed on a 11 Constitution saving throw or fall unconscious for 1 minute. This effect ends for a creature if the creature takes damage or someone uses an action to wake it." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Bronze Dragon Wyrmling", + { + "image": null, + "bestiary": true, + "name": "Bronze Dragon Wyrmling", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Medium", + "alignment": "lawful good", + "hp": 32, + "hit_dice": "5d8 + 10", + "ac": "17 (natural armor)", + "speed": "30 ft., fly 60 ft., swim 30 ft.", + "stats": [ + 17, + 10, + 15, + 12, + 11, + 15 + ], + "damage_immunities": "lightning", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "2" + }, + { + "constitution": "4" + }, + { + "wisdom": "2" + }, + { + "charisma": "4" + } + ], + "skillsaves": [ + { + "perception": "4" + }, + { + "stealth": "2" + } + ], + "senses": "blindsight 10 ft., darkvision 60 ft., passive Perception 14", + "languages": "Draconic", + "cr": "2", + "traits": [ + { + "name": "Amphibious", + "desc": "The dragon can breathe air and water." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 8 (1d10 + 3) piercing damage." + }, + { + "name": "Breath Weapons (Recharge 5-6)", + "desc": "The dragon uses one of the following breath weapons." + }, + { + "name": "Lightning Breath", + "desc": "The dragon exhales lightning in a 40-foot line that is 5 feet wide. Each creature in that line must make a 12 Dexterity saving throw, taking 16 (3d10) lightning damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Repulsion Breath", + "desc": "The dragon exhales repulsion energy in a 30-foot cone. Each creature in that area must succeed on a 12 Strength saving throw. On a failed save, the creature is pushed 30 feet away from the dragon." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Brown Bear", + { + "image": null, + "bestiary": true, + "name": "Brown Bear", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 34, + "hit_dice": "4d10 + 12", + "ac": "11 (natural armor)", + "speed": "40 ft., climb 30 ft.", + "stats": [ + 19, + 10, + 16, + 2, + 13, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + } + ], + "senses": "passive Perception 13", + "languages": "", + "cr": "1", + "traits": [ + { + "name": "Keen Smell", + "desc": "The bear has advantage on Wisdom (Perception) checks that rely on smell." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The bear makes two attacks: one with its bite and one with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 8 (1d8 + 4) piercing damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 11 (2d6 + 4) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Bugbear", + { + "image": null, + "bestiary": true, + "name": "Bugbear", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "goblinoid", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 27, + "hit_dice": "5d8 + 5", + "ac": "16 (hide armor)", + "speed": "30 ft.", + "stats": [ + 15, + 14, + 13, + 8, + 11, + 9 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "stealth": "6" + }, + { + "survival": "2" + } + ], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Common, Goblin", + "cr": "1", + "traits": [ + { + "name": "Brute", + "desc": "A melee weapon deals one extra die of its damage when the bugbear hits with it (included in the attack)." + }, + { + "name": "Surprise Attack", + "desc": "If the bugbear surprises a creature and hits it with an attack during the first round of combat, the target takes an extra 7 (2d6) damage from the attack." + } + ], + "actions": [ + { + "name": "Morningstar", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 11 (2d8 + 2) piercing damage." + }, + { + "name": "Javelin", + "desc": "Melee / Ranged Weapon Attack +4 to hit, reach 5 ft. or range 30/120 ft., one target. 9 (2d6 + 2) piercing damage in melee or 5 (1d6 + 2) piercing damage at range." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Bugbear Chief", + { + "image": null, + "bestiary": true, + "name": "Bugbear Chief", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "goblinoid", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 65, + "hit_dice": "10d8 + 20", + "ac": "17 (chain shirt)", + "speed": "30 ft.", + "stats": [ + 17, + 14, + 14, + 11, + 12, + 11 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "intimidation": "2" + }, + { + "stealth": "6" + }, + { + "survival": "3" + } + ], + "senses": "darkvision 60 ft., passive Perception 11", + "languages": "Common, Goblin", + "cr": "3", + "traits": [ + { + "name": "Brute", + "desc": "A melee weapon deals one extra die of its damage when the bugbear hits with it (included in the attack)." + }, + { + "name": "Surprise Attack", + "desc": "If the bugbear surprises a creature and hits it with an attack during the first round of combat, the target takes an extra 7 (2d6) damage from the attack." + }, + { + "name": "Heart of Hruggek", + "desc": "The bugbear has advantage on saving throws against being charmed, frightened, paralyzed, poisoned, stunned, or put to sleep." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The bugbear makes two melee attacks." + }, + { + "name": "Morningstar", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 11 (2d8 + 3) piercing damage." + }, + { + "name": "Javelin", + "desc": "Melee / Ranged Weapon Attack +5 to hit, reach 5 ft. or range 30/120 ft., one target. 9 (2d6 + 3) piercing damage in melee or 5 (1d6 + 3) piercing damage at range." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Bulette", + { + "image": null, + "bestiary": true, + "name": "Bulette", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "unaligned", + "hp": 94, + "hit_dice": "9d10 + 45", + "ac": "17 (natural armor)", + "speed": "40 ft., burrow 40 ft.", + "stats": [ + 19, + 11, + 21, + 2, + 10, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "6" + } + ], + "senses": "darkvision 60 ft., tremorsense 60 ft., passive Perception 16", + "languages": "", + "cr": "5", + "traits": [ + { + "name": "Standing Leap", + "desc": "The bulette's long jump is up to 30 feet and its high jump is up to 15 feet, with or without a running start." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 30 (4d12 + 4) piercing damage." + }, + { + "name": "Deadly Leap", + "desc": "If the bulette jumps at least 15 feet as part of its movement, it can then use this action to land on its feet in a space that contains one or more other creatures. Each of those creatures must succeed on a 16 Strength or Dexterity saving throw (target's choice) or be knocked prone and take 14 (3d6 + 4) bludgeoning damage plus 14 (3d6 + 4) slashing damage. On a successful save, the creature takes only half the damage, isn't knocked prone, and is pushed 5 feet out of the bulette's space into an unoccupied space of the creature's choice. If no unoccupied space is within range, the creature instead falls prone in the bulette's space." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Bullywug", + { + "image": null, + "bestiary": true, + "name": "Bullywug", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "bullywug", + "size": "Medium", + "alignment": "neutral evil", + "hp": 11, + "hit_dice": "2d8 + 2", + "ac": "15 (hide armor)", + "speed": "20 ft., swim 40 ft.", + "stats": [ + 12, + 12, + 13, + 7, + 10, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "stealth": "3" + } + ], + "senses": "passive Perception 10", + "languages": "Bullywug", + "cr": "1/4", + "traits": [ + { + "name": "Amphibious", + "desc": "The bullywug can breathe air and water." + }, + { + "name": "Speak with Frogs and Toads", + "desc": "The bullywug can communicate simple concepts to frogs and toads when it speaks in Bullywug." + }, + { + "name": "Swamp Camouflage", + "desc": "The bullywug has advantage on Dexterity (Stealth) checks made to hide in swampy terrain." + }, + { + "name": "Standing Leap", + "desc": "The bullywug's long jump is up to 20 feet and its high jump is up to 10 feet, with or without a running start." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The bullywug makes two melee attacks: one with its bite and one with its spear." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 3 (1d4 + 1) bludgeoning damage." + }, + { + "name": "Spear", + "desc": "Melee / Ranged Weapon Attack +3 to hit, reach 5 ft. or range 20/60 ft., one target. 4 (1d6 + 1) piercing damage, or 5 (1d8 + 1) piercing damage if used with two hands to make a melee attack." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Cambion", + { + "image": null, + "bestiary": true, + "name": "Cambion", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "size": "Medium", + "alignment": "lawful neutral (law/chaos axis) chaotic evil", + "hp": 82, + "hit_dice": "11d8 + 33", + "ac": "19 (scale mail)", + "speed": "30 ft., fly 60 ft.", + "stats": [ + 18, + 18, + 16, + 14, + 12, + 16 + ], + "damage_immunities": "", + "damage_resistances": "cold, fire, lightning, poison, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "strength": "7" + }, + { + "constitution": "6" + }, + { + "intelligence": "5" + }, + { + "charisma": "6" + } + ], + "skillsaves": [ + { + "deception": "6" + }, + { + "intimidation": "6" + }, + { + "perception": "4" + }, + { + "stealth": "7" + } + ], + "senses": "darkvision 60 ft., passive Perception 14", + "languages": "Abyssal, Common, Infernal", + "cr": "5", + "traits": [ + { + "name": "Fiendish Blessing", + "desc": "The AC of the cambion includes its Charisma bonus." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The cambion makes two melee attacks or uses its Fire Ray twice." + }, + { + "name": "Spear", + "desc": "Melee / Ranged Weapon Attack +7 to hit, reach 5 ft. or range 20/60 ft., one target. 7 (1d6 + 4) piercing damage, or 8 (1d8 + 4) piercing damage if used with two hands to make a melee attack, plus 3 (1d6) fire damage." + }, + { + "name": "Fire Ray", + "desc": "Ranged Spell Attack +7 to hit, range 120 ft., one target. 10 (3d6) fire damage." + }, + { + "name": "Fiendish Charm", + "desc": "One humanoid the cambion can see within 30 feet of it must succeed on a 14 Wisdom saving throw or be magically charmed for 1 day. The charmed target obeys the cambion's spoken commands. If the target suffers any harm from the cambion or another creature or receives a suicidal command from the cambion, the target can repeat the saving throw, ending the effect on itself on a success. If a target's saving throw is successful, or if the effect ends for it, the creature is immune to the cambion's Fiendish Charm for the next 24 hours." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The cambion's spellcasting ability is Charisma (spell save 14). The cambion can innately cast the following spells, requiring no material components:", + { + "3/day each": "alter self, command, detect magic" + }, + { + "1/day each": "plane shift (self only)" + } + ], + "spellsNotes": "" + } + ], + [ + "Camel", + { + "image": null, + "bestiary": true, + "name": "Camel", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 15, + "hit_dice": "2d10 + 4", + "ac": 9, + "speed": "50 ft.", + "stats": [ + 16, + 8, + 14, + 2, + 8, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 9", + "languages": "", + "cr": "1/8", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 2 (1d4) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Carrion Crawler", + { + "image": null, + "bestiary": true, + "name": "Carrion Crawler", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "unaligned", + "hp": 51, + "hit_dice": "6d10 + 18", + "ac": "13 (natural armor)", + "speed": "30 ft., climb 30 ft.", + "stats": [ + 14, + 13, + 16, + 1, + 12, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + } + ], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "", + "cr": "2", + "traits": [ + { + "name": "Keen Smell", + "desc": "The carrion crawler has advantage on Wisdom (Perception) checks that rely on smell." + }, + { + "name": "Spider Climb", + "desc": "The carrion crawler can climb difficult surfaces, including upside down on ceilings, without needing to make an ability check." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The carrion crawler makes two attacks: one with its tentacles and one with its bite." + }, + { + "name": "Tentacles", + "desc": "Melee Weapon Attack +8 to hit, reach 10 ft., one creature. 4 (1d4 + 2) poison damage, and the target must succeed on a 13 Constitution saving throw or be poisoned for 1 minute. Until this poison ends, the target is paralyzed. The target can repeat the saving throw at the end of each of its turns, ending the poison on itself on a success." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 7 (2d4 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Cat", + { + "image": null, + "bestiary": true, + "name": "Cat", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Tiny", + "alignment": "unaligned", + "hp": 2, + "hit_dice": "1d4", + "ac": 12, + "speed": "40 ft., climb 30 ft.", + "stats": [ + 3, + 15, + 10, + 3, + 12, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + }, + { + "stealth": "4" + } + ], + "senses": "passive Perception 13", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Keen Smell", + "desc": "The cat has advantage on Wisdom (Perception) checks that rely on smell." + } + ], + "actions": [ + { + "name": "Claws", + "desc": "Melee Weapon Attack +0 to hit, reach 5 ft., one target. 1 slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Cave Bear", + { + "image": null, + "bestiary": true, + "name": "Cave Bear", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 42, + "hit_dice": "5d10 + 15", + "ac": "12 (natural armor)", + "speed": "40 ft., swim 30 ft.", + "stats": [ + 20, + 10, + 16, + 2, + 13, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + } + ], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "", + "cr": "2", + "traits": [ + { + "name": "Keen Smell", + "desc": "The bear has advantage on Wisdom (Perception) checks that rely on smell." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The bear makes two attacks: one with its bite and one with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 9 (1d8 + 5) piercing damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 12 (2d6 + 5) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Centaur", + { + "image": null, + "bestiary": true, + "name": "Centaur", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "neutral good", + "hp": 45, + "hit_dice": "6d10 + 12", + "ac": 12, + "speed": "50 ft.", + "stats": [ + 18, + 14, + 14, + 9, + 13, + 11 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "athletics": "6" + }, + { + "perception": "3" + }, + { + "survival": "3" + } + ], + "senses": "passive Perception 13", + "languages": "Elvish, Sylvan", + "cr": "2", + "traits": [ + { + "name": "Charge", + "desc": "If the centaur moves at least 30 feet straight toward a target and then hits it with a pike attack on the same turn, the target takes an extra 10 (3d6) piercing damage." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The centaur makes two attacks: one with its pike and one with its hooves or two with its longbow." + }, + { + "name": "Pike", + "desc": "Melee Weapon Attack +6 to hit, reach 10 ft., one target. 9 (1d10 + 4) piercing damage." + }, + { + "name": "Hooves", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 11 (2d6 + 4) bludgeoning damage." + }, + { + "name": "Longbow", + "desc": "Ranged Weapon Attack +4 to hit, range 150/600 ft., one target. 6 (1d8 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Chain Devil", + { + "image": null, + "bestiary": true, + "name": "Chain Devil", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "devil", + "size": "Medium", + "alignment": "lawful evil", + "hp": 85, + "hit_dice": "10d8 + 40", + "ac": "16 (natural armor)", + "speed": "30 ft.", + "stats": [ + 18, + 15, + 18, + 11, + 12, + 14 + ], + "damage_immunities": "fire, poison", + "damage_resistances": "cold, bludgeoning, piercing, slashing from nonmagical attacks that aren't silvered", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "constitution": "7" + }, + { + "wisdom": "4" + }, + { + "charisma": "5" + } + ], + "skillsaves": [], + "senses": "darkvision 120 ft., passive Perception 11", + "languages": "Infernal, telepathy 120 ft.", + "cr": "8", + "traits": [ + { + "name": "Devil's Sight", + "desc": "Magical darkness doesn't impede the devil's darkvision." + }, + { + "name": "Magic Resistance", + "desc": "The devil has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The devil makes two attacks with its chains." + }, + { + "name": "Chain", + "desc": "Melee Weapon Attack +8 to hit, reach 10 ft., one target. 11 (2d6 + 4) slashing damage. The target is grappled (escape 14) if the devil isn't already grappling a creature. Until this grapple ends, the target is restrained and takes 7 (2d6) piercing damage at the start of each of its turns." + }, + { + "name": "Animate Chains (Recharges after a Short or Long Rest)", + "desc": "Up to four chains the devil can see within 60 feet of it magically sprout razor-edged barbs and animate under the devil's control, provided that the chains aren't being worn or carried.\nEach animated chain is an object with AC 20, 20 hit points, resistance to piercing damage, and immunity to psychic and thunder damage. When the devil uses Multiattack on its turn, it can use each animated chain to make one additional chain attack. An animated chain can grapple one creature of its own but can't make attacks while grappling. An animated chain reverts to its inanimate state if reduced to 0 hit points or if the devil is incapacitated or dies." + } + ], + "bonus_actions": [], + "reactions": [ + { + "name": "Unnerving Mask", + "desc": "When a creature the devil can see starts its turn within 30 feet of the devil, the devil can create the illusion that it looks like one of the creature's departed loved ones or bitter enemies. If the creature can see the devil, it must succeed on a 14 Wisdom saving throw or be frightened until the end of its turn." + } + ], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Chasme", + { + "image": null, + "bestiary": true, + "name": "Chasme", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "demon", + "size": "Large", + "alignment": "chaotic evil", + "hp": 84, + "hit_dice": "13d10 + 13", + "ac": "15 (natural armor)", + "speed": "20 ft., fly 60 ft.", + "stats": [ + 15, + 15, + 12, + 11, + 14, + 10 + ], + "damage_immunities": "poison", + "damage_resistances": "cold, fire, lightning", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "dexterity": "5" + }, + { + "wisdom": "5" + } + ], + "skillsaves": [ + { + "perception": "5" + } + ], + "senses": "blindsight 10 ft., darkvision 120 ft., passive Perception 15", + "languages": "Abyssal, telepathy 120 ft.", + "cr": "6", + "traits": [ + { + "name": "Drone", + "desc": "The chasme produces a horrid droning sound to which demons are immune. Any other creature that starts its turn within 30 feet of the chasme must succeed on a 12 Constitution saving throw or fall unconscious for 10 minutes. A creature that can't hear the drone automatically succeeds on the save. The effect on the creature ends if it takes damage or if another creature takes an action to splash it with Holy Water (Flask). If a creature's saving throw is successful or the effect ends for it, it is immune to the drone for the next 24 hours." + }, + { + "name": "Magic Resistance", + "desc": "The chasme has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Spider Climb", + "desc": "The chasme can climb difficult surfaces, including upside down on ceilings, without needing to make an ability check." + } + ], + "actions": [ + { + "name": "Proboscis", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one creature. 16 (4d6 + 2) piercing damage plus 24 (7d6) necrotic damage, and the target's hit point maximum is reduced by an amount equal to the necrotic damage taken. If this effect reduces a creature's hit point maximum to 0, the creature dies. This reduction to a creature's hit point maximum lasts until the creature finishes a long rest or until it is affected by a spell like greater restoration." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Chimera", + { + "image": null, + "bestiary": true, + "name": "Chimera", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "chaotic evil", + "hp": 114, + "hit_dice": "12d10 + 48", + "ac": "14 (natural armor)", + "speed": "30 ft., fly 60 ft.", + "stats": [ + 19, + 11, + 19, + 3, + 14, + 10 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "8" + } + ], + "senses": "darkvision 60 ft., passive Perception 18", + "languages": "understands Draconic but can't speak", + "cr": "6", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The chimera makes three attacks: one with its bite, one with its horns, and one with its claws. When its fire breath is available, it can use the breath in place of its bite or horns." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 11 (2d6 + 4) piercing damage." + }, + { + "name": "Horns", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 10 (1d12 + 4) bludgeoning damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 11 (2d6 + 4) slashing damage." + }, + { + "name": "Fire Breath (Recharge 5-6)", + "desc": "The dragon head exhales fire in a 15-foot cone. Each creature in that area must make a 15 Dexterity saving throw, taking 31 (7d8) fire damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Chuul", + { + "image": null, + "bestiary": true, + "name": "Chuul", + "source": [ + "Monster Manual" + ], + "type": "aberration", + "size": "Large", + "alignment": "chaotic evil", + "hp": 93, + "hit_dice": "11d10 + 33", + "ac": "16 (natural armor)", + "speed": "30 ft., swim 30 ft.", + "stats": [ + 19, + 10, + 16, + 5, + 11, + 5 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [], + "skillsaves": [ + { + "perception": "4" + } + ], + "senses": "darkvision 60 ft., passive Perception 14", + "languages": "understands Deep Speech but can't speak", + "cr": "4", + "traits": [ + { + "name": "Amphibious", + "desc": "The chuul can breathe air and water." + }, + { + "name": "Sense Magic", + "desc": "The chuul senses magic within 120 feet of it at will. This trait otherwise works like the detect magic spell but isn't itself magical." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The chuul makes two pincer attacks. If the chuul is grappling a creature, the chuul can also use its tentacles once." + }, + { + "name": "Pincer", + "desc": "Melee Weapon Attack +6 to hit, reach 10 ft., one target. 11 (2d6 + 4) bludgeoning damage. The target is grappled (escape 14) if it is a Large or smaller creature and the chuul doesn't have two other creatures grappled." + }, + { + "name": "Tentacles", + "desc": "One creature grappled by the chuul must succeed on a 13 Constitution saving throw or be poisoned for 1 minute. Until this poison ends, the target is paralyzed. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Clay Golem", + { + "image": null, + "bestiary": true, + "name": "Clay Golem", + "source": [ + "Monster Manual" + ], + "type": "construct", + "size": "Large", + "alignment": "unaligned", + "hp": 133, + "hit_dice": "14d10 + 56", + "ac": "14 (natural armor)", + "speed": "20 ft.", + "stats": [ + 20, + 9, + 18, + 3, + 8, + 1 + ], + "damage_immunities": "acid, poison, psychic, bludgeoning, piercing, slashing from nonmagical attacks that aren't adamantine", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, frightened, paralyzed, petrified, poisoned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 9", + "languages": "understands the languages of its creator but can't speak", + "cr": "9", + "traits": [ + { + "name": "Acid Absorption", + "desc": "Whenever the golem is subjected to acid damage, it takes no damage and instead regains a number of hit points equal to the acid damage dealt." + }, + { + "name": "Berserk", + "desc": "Whenever the golem starts its turn with 60 hit points or fewer, roll a d6. On a 6, the golem goes berserk. On each of its turns while berserk, the golem attacks the nearest creature it can see. If no creature is near enough to move to and attack, the golem attacks an object, with preference for an object smaller than itself. Once the golem goes berserk, it continues to do so until it is destroyed or regains all its hit points." + }, + { + "name": "Immutable Form", + "desc": "The golem is immune to any spell or effect that would alter its form." + }, + { + "name": "Magic Resistance", + "desc": "The golem has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Magic Weapons", + "desc": "The golem's weapon attacks are magical." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The golem makes two slam attacks." + }, + { + "name": "Slam", + "desc": "Melee Weapon Attack +8 to hit, reach 5 ft., one target. 16 (2d10 + 5) bludgeoning damage. If the target is a creature, it must succeed on a 15 Constitution saving throw or have its hit point maximum reduced by an amount equal to the damage taken. The target dies if this attack reduces its hit point maximum to 0. The reduction lasts until removed by the greater restoration spell or other magic." + }, + { + "name": "Haste (Recharge 5-6)", + "desc": "Until the end of its next turn, the golem magically gains a +2 bonus to its AC, has advantage on Dexterity saving throws, and can use its slam attack as a bonus action." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Cloaker", + { + "image": null, + "bestiary": true, + "name": "Cloaker", + "source": [ + "Monster Manual" + ], + "type": "aberration", + "size": "Large", + "alignment": "chaotic neutral", + "hp": 78, + "hit_dice": "12d10 + 12", + "ac": "14 (natural armor)", + "speed": "10 ft., fly 40 ft.", + "stats": [ + 17, + 15, + 12, + 13, + 12, + 14 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "stealth": "5" + } + ], + "senses": "darkvision 60 ft., passive Perception 11", + "languages": "Deep Speech, Undercommon", + "cr": "8", + "traits": [ + { + "name": "Damage Transfer", + "desc": "While attached to a creature, the cloaker takes only half the damage dealt to it (rounded down), and that creature takes the other half." + }, + { + "name": "False Appearance", + "desc": "While the cloaker remains motionless without its underside exposed, it is indistinguishable from a dark leather cloak." + }, + { + "name": "Light Sensitivity", + "desc": "While in bright light, the cloaker has disadvantage on attack rolls and Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The cloaker makes two attacks: one with its bite and one with its tail." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one creature. 10 (2d6 + 3) piercing damage, and if the target is Large or smaller, the cloaker attaches to it. If the cloaker has advantage against the target, the cloaker attaches to the target's head, and the target is blinded and unable to breathe while the cloaker is attached. While attached, the cloaker can make this attack only against the target and has advantage on the attack roll. The cloaker can detach itself by spending 5 feet of its movement. A creature, including the target, can take its action to detach the cloaker by succeeding on a 16 Strength check." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +6 to hit, reach 10 ft., one creature. 7 (1d8 + 3) slashing damage." + }, + { + "name": "Moan", + "desc": "Each creature within 60 feet of the cloaker that can hear its moan and that isn't an aberration must succeed on a 13 Wisdom saving throw or become frightened until the end of the cloaker's next turn. If a creature's saving throw is successful, the creature is immune to the cloaker's moan for the next 24 hours." + }, + { + "name": "Phantasms (Recharges after a Short or Long Rest)", + "desc": "The cloaker magically creates three illusory duplicates of itself if it isn't in bright light. The duplicates move with it and mimic its actions, shifting position so as to make it impossible to track which cloaker is the real one. If the cloaker is ever in an area of bright light, the duplicates disappear.\nWhenever any creature targets the cloaker with an attack or a harmful spell while a duplicate remains, that creature rolls randomly to determine whether it targets the cloaker or one of the duplicates. A creature is unaffected by this magical effect if it can't see or if it relies on senses other than sight.\nA duplicate has the cloaker's AC and uses its saving throws. If an attack hits a duplicate, or if a duplicate fails a saving throw against an effect that deals damage, the duplicate disappears." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Cloud Giant", + { + "image": null, + "bestiary": true, + "name": "Cloud Giant", + "source": [ + "Monster Manual" + ], + "type": "giant", + "size": "Huge", + "alignment": "neutral good (50%) or neutral evil (50%)", + "hp": 200, + "hit_dice": "16d12 + 96", + "ac": "14 (natural armor)", + "speed": "40 ft.", + "stats": [ + 27, + 10, + 22, + 12, + 16, + 16 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "constitution": "10" + }, + { + "wisdom": "7" + }, + { + "charisma": "7" + } + ], + "skillsaves": [ + { + "insight": "7" + }, + { + "perception": "7" + } + ], + "senses": "passive Perception 17", + "languages": "Common, Giant", + "cr": "9", + "traits": [ + { + "name": "Keen Smell", + "desc": "The giant has advantage on Wisdom (Perception) checks that rely on smell." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The giant makes two morningstar attacks." + }, + { + "name": "Morningstar", + "desc": "Melee Weapon Attack +12 to hit, reach 10 ft., one target. 21 (3d8 + 8) piercing damage." + }, + { + "name": "Rock", + "desc": "Ranged Weapon Attack +12 to hit, range 60/240 ft., one target. 30 (4d10 + 8) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The giant's innate spellcasting ability is Charisma. It can innately cast the following spells, requiring no material components:", + { + "At will": "detect magic, fog cloud, light" + }, + { + "3/day each": "feather fall, fly, misty step, telekinesis" + }, + { + "1/day each": "control weather, gaseous form" + } + ], + "spellsNotes": "" + } + ], + [ + "Cockatrice", + { + "image": null, + "bestiary": true, + "name": "Cockatrice", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Small", + "alignment": "unaligned", + "hp": 27, + "hit_dice": "6d6 + 6", + "ac": 11, + "speed": "20 ft., fly 40 ft.", + "stats": [ + 6, + 12, + 12, + 2, + 13, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 11", + "languages": "", + "cr": "1/2", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one creature. 3 (1d4 + 1) piercing damage, and the target must succeed on a 11 Constitution saving throw against being magically petrified. On a failed save, the creature begins to turn to stone and is restrained. It must repeat the saving throw at the end of its next turn. On a success, the effect ends. On a failure, the creature is petrified for 24 hours." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Commoner", + { + "image": null, + "bestiary": true, + "name": "Commoner", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "any alignment", + "hp": 4, + "hit_dice": "1d8", + "ac": 10, + "speed": "30 ft.", + "stats": [ + 10, + 10, + 10, + 10, + 10, + 10 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 10", + "languages": "any one language (usually Common)", + "cr": "0", + "traits": [], + "actions": [ + { + "name": "Club", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one target. 2 (1d4) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Constrictor Snake", + { + "image": null, + "bestiary": true, + "name": "Constrictor Snake", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 13, + "hit_dice": "2d10 + 2", + "ac": 12, + "speed": "30 ft., swim 30 ft.", + "stats": [ + 15, + 14, + 12, + 1, + 10, + 3 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "blindsight 10 ft., passive Perception 10", + "languages": "", + "cr": "1/4", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 5 (1d6 + 2) piercing damage." + }, + { + "name": "Constrict", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 6 (1d8 + 2) bludgeoning damage, and the target is grappled (escape 14). Until this grapple ends, the creature is restrained, and the snake can't constrict another target." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Copper Dragon Wyrmling", + { + "image": null, + "bestiary": true, + "name": "Copper Dragon Wyrmling", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Medium", + "alignment": "chaotic good", + "hp": 22, + "hit_dice": "4d8 + 4", + "ac": "16 (natural armor)", + "speed": "30 ft., climb 30 ft., fly 60 ft.", + "stats": [ + 15, + 12, + 13, + 14, + 11, + 13 + ], + "damage_immunities": "acid", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "3" + }, + { + "constitution": "3" + }, + { + "wisdom": "2" + }, + { + "charisma": "3" + } + ], + "skillsaves": [ + { + "perception": "4" + }, + { + "stealth": "3" + } + ], + "senses": "blindsight 10 ft., darkvision 60 ft., passive Perception 14", + "languages": "Draconic", + "cr": "1", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 7 (1d10 + 2) piercing damage." + }, + { + "name": "Breath Weapons (Recharge 5-6)", + "desc": "The dragon uses one of the following breath weapons." + }, + { + "name": "Acid Breath", + "desc": "The dragon exhales acid in a 20-foot line that is 5 feet wide. Each creature in that line must make a 11 Dexterity saving throw, taking 18 (4d8) acid damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Slowing Breath", + "desc": "The dragon exhales gas in a 15-foot cone. Each creature in that area must succeed on a 11 Constitution saving throw. On a failed save, the creature can't use reactions, its speed is halved, and it can't make more than one attack on its turn. In addition, the creature can use either an action or a bonus action on its turn, but not both. These effects last for 1 minute. The creature can repeat the saving throw at the end of each of its turns, ending the effect on itself with a successful save." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Couatl", + { + "image": null, + "bestiary": true, + "name": "Couatl", + "source": [ + "Monster Manual" + ], + "type": "celestial", + "size": "Medium", + "alignment": "lawful good", + "hp": 97, + "hit_dice": "13d8 + 39", + "ac": "19 (natural armor)", + "speed": "30 ft., fly 90 ft.", + "stats": [ + 16, + 20, + 17, + 18, + 20, + 18 + ], + "damage_immunities": "psychic, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_resistances": "radiant", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "constitution": "5" + }, + { + "wisdom": "7" + }, + { + "charisma": "6" + } + ], + "skillsaves": [], + "senses": "truesight 120 ft., passive Perception 15", + "languages": "all, telepathy 120 ft.", + "cr": "4", + "traits": [ + { + "name": "Magic Weapons", + "desc": "The couatl's weapon attacks are magical." + }, + { + "name": "Shielded Mind", + "desc": "The couatl is immune to scrying and to any effect that would sense its emotions, read its thoughts, or detect its location." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +8 to hit, reach 5 ft., one creature. 8 (1d6 + 5) piercing damage, and the target must succeed on a 13 Constitution saving throw or be poisoned for 24 hours. Until this poison ends, the target is unconscious. Another creature can use an action to shake the target awake." + }, + { + "name": "Constrict", + "desc": "Melee Weapon Attack +6 to hit, reach 10 ft., one Medium or smaller creature. 10 (2d6 + 3) bludgeoning damage, and the target is grappled (escape 15). Until this grapple ends, the target is restrained, and the couatl can't constrict another target." + }, + { + "name": "Change Shape", + "desc": "The couatl magically polymorphs into a humanoid or beast that has a challenge rating equal to or less than its own, or back into its true form. It reverts to its true form if it dies. Any equipment it is wearing or carrying is absorbed or borne by the new form (the couatl's choice).\nIn a new form, the couatl retains its game statistics and ability to speak, but its AC, movement modes, Strength, Dexterity, and other actions are replaced by those of the new form, and it gains any statistics and capabilities (except class features, legendary actions, and lair actions) that the new form has but that it lacks. If the new form has a bite attack, the couatl can use its bite in that form." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The couatl's spellcasting ability is Charisma (spell save 14). It can innately cast the following spells, requiring only verbal components:", + { + "At will": "detect evil and good, detect magic, detect thoughts" + }, + { + "3/day each": "bless, create food and water, cure wounds, lesser restoration, protection from poison, sanctuary, shield" + }, + { + "1/day each": "dream, greater restoration, scrying" + } + ], + "spellsNotes": "" + } + ], + [ + "Crab", + { + "image": null, + "bestiary": true, + "name": "Crab", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Tiny", + "alignment": "unaligned", + "hp": 2, + "hit_dice": "1d4", + "ac": "11 (natural armor)", + "speed": "20 ft., swim 20 ft.", + "stats": [ + 2, + 11, + 10, + 1, + 8, + 2 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "stealth": "2" + } + ], + "senses": "blindsight 30 ft., passive Perception 9", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Amphibious", + "desc": "The crab can breathe air and water." + } + ], + "actions": [ + { + "name": "Claw", + "desc": "Melee Weapon Attack +0 to hit, reach 5 ft., one target. 1 bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Crawling Claw", + { + "image": null, + "bestiary": true, + "name": "Crawling Claw", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Tiny", + "alignment": "neutral evil", + "hp": 2, + "hit_dice": "1d4", + "ac": 12, + "speed": "20 ft., climb 20 ft.", + "stats": [ + 13, + 14, + 11, + 5, + 10, + 4 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, poisoned", + "saves": [], + "skillsaves": [], + "senses": "blindsight 30 ft. (blind beyond this radius), passive Perception 10", + "languages": "understands Common but can't speak", + "cr": "0", + "traits": [ + { + "name": "Turn Immunity", + "desc": "The claw is immune to effects that turn undead." + } + ], + "actions": [ + { + "name": "Claw", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 3 (1d4 + 1) bludgeoning or slashing damage (claw's choice)." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Crocodile", + { + "image": null, + "bestiary": true, + "name": "Crocodile", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 19, + "hit_dice": "3d10 + 3", + "ac": "12 (natural armor)", + "speed": "20 ft., swim 30 ft.", + "stats": [ + 15, + 10, + 13, + 2, + 10, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "stealth": "2" + } + ], + "senses": "passive Perception 10", + "languages": "", + "cr": "1/2", + "traits": [ + { + "name": "Hold Breath", + "desc": "The crocodile can hold its breath for 15 minutes." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 7 (1d10 + 2) piercing damage, and the target is grappled (escape 12). Until this grapple ends, the target is restrained, and the crocodile can't bite another target" + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Cult Fanatic", + { + "image": null, + "bestiary": true, + "name": "Cult Fanatic", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "lawful neutral (law/chaos axis) chaotic neutral (good/evil axis) evil", + "hp": 33, + "hit_dice": "6d8 + 6", + "ac": "13 (leather armor)", + "speed": "30 ft.", + "stats": [ + 11, + 14, + 12, + 10, + 13, + 14 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "deception": "4" + }, + { + "persuasion": "4" + }, + { + "religion": "2" + } + ], + "senses": "passive Perception 11", + "languages": "any one language (usually Common)", + "cr": "2", + "traits": [ + { + "name": "Dark Devotion", + "desc": "The fanatic has advantage on saving throws against being charmed or frightened." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The fanatic makes two melee attacks." + }, + { + "name": "Dagger", + "desc": "Melee / Ranged Weapon Attack +4 to hit, reach 5 ft. or range 20/60 ft., one creature. 4 (1d4 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The fanatic is a 4th-level spellcaster. Its spellcasting ability is Wisdom (spell save 11, +3 to hit with spell attacks). The fanatic has the following cleric spells prepared:", + { + "Cantrips (at will)": "light, sacred flame, thaumaturgy" + }, + { + "1st level (4 slots)": "command, inflict wounds, shield of faith" + }, + { + "2nd level (3 slots)": "hold person, spiritual weapon" + } + ], + "spellsNotes": "" + } + ], + [ + "Cultist", + { + "image": null, + "bestiary": true, + "name": "Cultist", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "lawful neutral (law/chaos axis) chaotic neutral (good/evil axis) evil", + "hp": 9, + "hit_dice": "2d8", + "ac": "12 (leather armor)", + "speed": "30 ft.", + "stats": [ + 11, + 12, + 10, + 10, + 11, + 10 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "deception": "2" + }, + { + "religion": "2" + } + ], + "senses": "passive Perception 10", + "languages": "any one language (usually Common)", + "cr": "1/8", + "traits": [ + { + "name": "Dark Devotion", + "desc": "The cultist has advantage on saving throws against being charmed or frightened." + } + ], + "actions": [ + { + "name": "Scimitar", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one creature. 4 (1d6 + 1) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Cyclops", + { + "image": null, + "bestiary": true, + "name": "Cyclops", + "source": [ + "Monster Manual" + ], + "type": "giant", + "size": "Huge", + "alignment": "chaotic neutral", + "hp": 138, + "hit_dice": "12d12 + 60", + "ac": "14 (natural armor)", + "speed": "30 ft.", + "stats": [ + 22, + 11, + 20, + 8, + 6, + 10 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 8", + "languages": "Giant", + "cr": "6", + "traits": [ + { + "name": "Poor Depth Perception", + "desc": "The cyclops has disadvantage on any attack roll against a target more than 30 feet away." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The cyclops makes two greatclub attacks." + }, + { + "name": "Greatclub", + "desc": "Melee Weapon Attack +9 to hit, reach 10 ft., one target. 19 (3d8 + 6) bludgeoning damage." + }, + { + "name": "Rock", + "desc": "Ranged Weapon Attack +9 to hit, range 30/120 ft., one target. 28 (4d10 + 6) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Dao", + { + "image": null, + "bestiary": true, + "name": "Dao", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Large", + "alignment": "neutral evil", + "hp": 187, + "hit_dice": "15d10 + 105", + "ac": "18 (natural armor)", + "speed": "30 ft., burrow 30 ft., fly 30 ft.", + "stats": [ + 23, + 12, + 24, + 12, + 13, + 14 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "petrified", + "saves": [ + { + "intelligence": "5" + }, + { + "wisdom": "5" + }, + { + "charisma": "6" + } + ], + "skillsaves": [], + "senses": "darkvision 120 ft., passive Perception 11", + "languages": "Terran", + "cr": "11", + "traits": [ + { + "name": "Earth Glide", + "desc": "The dao can burrow through nonmagical, unworked earth and stone. While doing so, the dao doesn't disturb the material it moves through." + }, + { + "name": "Elemental Demise", + "desc": "If the dao dies, its body disintegrates into crystalline powder, leaving behind only equipment the dao was wearing or carrying." + }, + { + "name": "Sure-Footed", + "desc": "The dao has advantage on Strength and Dexterity saving throws made against effects that would knock it prone." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The Dao makes two fist attacks or two maul attacks." + }, + { + "name": "Fist", + "desc": "Melee Weapon Attack +10 to hit, reach 5 ft., one target. 15 (2d8 + 6) bludgeoning damage." + }, + { + "name": "Maul", + "desc": "Melee Weapon Attack +10 to hit, reach 5 ft., one target. 20 (4d6 + 6) bludgeoning damage. If the target is a Huge or smaller creature, it must succeed on a 18 Strength check or be knocked prone." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The dao's innate spellcasting ability is Charisma (spell save 14, +6 to hit with spell attacks). It can innately cast the following spells, requiring no material components:", + { + "At will": "detect evil and good, detect magic, stone shape" + }, + { + "3/day each": "passwall, move earth, tongues" + }, + { + "1/day each": "conjure elemental (earth elemental only), gaseous form, invisibility, phantasmal killer, plane shift, wall of stone" + } + ], + "spellsNotes": "" + } + ], + [ + "Darkmantle", + { + "image": null, + "bestiary": true, + "name": "Darkmantle", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Small", + "alignment": "unaligned", + "hp": 22, + "hit_dice": "5d6 + 5", + "ac": 11, + "speed": "10 ft., fly 30 ft.", + "stats": [ + 16, + 12, + 13, + 2, + 10, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "stealth": "3" + } + ], + "senses": "blindsight 60 ft., passive Perception 10", + "languages": "", + "cr": "1/2", + "traits": [ + { + "name": "Echolocation", + "desc": "The darkmantle can't use its blindsight while deafened." + }, + { + "name": "False Appearance", + "desc": "While the darkmantle remains motionless, it is indistinguishable from a cave formation such as a stalactite or stalagmite." + } + ], + "actions": [ + { + "name": "Crush", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one creature. 6 (1d6 + 3) bludgeoning damage, and the darkmantle attaches to the target. If the target is Medium or smaller and the darkmantle has advantage on the attack roll, it attaches by engulfing the target's head, and the target is also blinded and unable to breathe while the darkmantle is attached in this way.\nWhile attached to the target, the darkmantle can attack no other creature except the target but has advantage on its attack rolls. The darkmantle's speed also becomes 0, it can't benefit from any bonus to its speed, and it moves with the target.\nA creature can detach the darkmantle by making a successful 13 Strength check as an action. On its turn, the darkmantle can detach itself from the target by using 5 feet of movement." + }, + { + "name": "Darkness Aura (1/Day)", + "desc": "A 15-foot radius of magical darkness extends out from the darkmantle, moves with it, and spreads around corners. The darkness lasts as long as the darkmantle maintains {@status concentration}, up to 10 minutes (as if {@status concentration||concentrating} on a spell). Darkvision can't penetrate this darkness, and no natural light can illuminate it. If any of the darkness overlaps with an area of light created by a spell of 2nd level or lower, the spell creating the light is dispelled." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Death Dog", + { + "image": null, + "bestiary": true, + "name": "Death Dog", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Medium", + "alignment": "neutral evil", + "hp": 39, + "hit_dice": "6d8 + 12", + "ac": 12, + "speed": "40 ft.", + "stats": [ + 15, + 14, + 14, + 3, + 13, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "5" + }, + { + "stealth": "4" + } + ], + "senses": "darkvision 120 ft., passive Perception 15", + "languages": "", + "cr": "1", + "traits": [ + { + "name": "Two-Headed", + "desc": "The dog has advantage on Wisdom (Perception) checks and on saving throws against being blinded, charmed, deafened, frightened, stunned, or knocked unconscious." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dog makes two bite attacks." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d6 + 2) piercing damage. If the target is a creature, it must succeed on a 12 Constitution saving throw against disease or become poisoned until the disease is cured. Every 24 hours that elapse, the creature must repeat the saving throw, reducing its hit point maximum by 5 (1d10) on a failure. This reduction lasts until the disease is cured. The creature dies if the disease reduces its hit point maximum to 0." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Death Knight", + { + "image": null, + "bestiary": true, + "name": "Death Knight", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 180, + "hit_dice": "19d8 + 95", + "ac": "20 (plate armor)", + "speed": "30 ft.", + "stats": [ + 20, + 11, + 20, + 12, + 16, + 18 + ], + "damage_immunities": "necrotic, poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "exhaustion, frightened, poisoned", + "saves": [ + { + "dexterity": "6" + }, + { + "wisdom": "9" + }, + { + "charisma": "10" + } + ], + "skillsaves": [], + "senses": "darkvision 120 ft., passive Perception 13", + "languages": "Abyssal, Common", + "cr": "17", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The death knight has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Marshal Undead", + "desc": "Unless the death knight is incapacitated, it and undead creatures of its choice within 60 feet of it have advantage on saving throws against features that turn undead." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The death knight makes three longsword attacks." + }, + { + "name": "Longsword", + "desc": "Melee Weapon Attack +11 to hit, reach 5 ft., one target. 9 (1d8 + 5) slashing damage, or 10 (1d10 + 5) slashing damage if used with two hands, plus 18 (4d8) necrotic damage." + }, + { + "name": "Hellfire Orb (1/Day)", + "desc": "The death knight hurls a magical ball of fire that explodes at a point it can see within 120 feet of it. Each creature in a 20-foot-radius sphere centered on that point must make a 18 Dexterity saving throw. The sphere spreads around corners. A creature takes 35 (10d6) fire damage and 35 (10d6) necrotic damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [ + { + "name": "Parry", + "desc": "The death knight adds 6 to its AC against one melee attack that would hit it. To do so, the death knight must see the attacker and be wielding a melee weapon." + } + ], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The death knight is a 19th-level spellcaster. Its spellcasting ability is Charisma (spell save 18, +10 to hit with spell attacks). It has the following paladin spells prepared:", + { + "1st level (4 slots)": "command, compelled duel, searing smite" + }, + { + "2nd level (3 slots)": "hold person, magic weapon" + }, + { + "3rd level (3 slots)": "dispel magic, elemental weapon" + }, + { + "4th level (3 slots)": "banishment, staggering smite" + }, + { + "5th level (2 slots)": "destructive wave (necrotic)" + } + ], + "spellsNotes": "" + } + ], + [ + "Death Slaad", + { + "image": null, + "bestiary": true, + "name": "Death Slaad", + "source": [ + "Monster Manual" + ], + "type": "aberration", + "subtype": "shapechanger", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 170, + "hit_dice": "20d8 + 80", + "ac": "18 (natural armor)", + "speed": "30 ft.", + "stats": [ + 20, + 15, + 19, + 15, + 10, + 16 + ], + "damage_immunities": "", + "damage_resistances": "acid, cold, fire, lightning, thunder", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "arcana": "6" + }, + { + "perception": "8" + } + ], + "senses": "blindsight 60 ft., darkvision 60 ft., passive Perception 18", + "languages": "Slaad, telepathy 60 ft.", + "cr": "10", + "traits": [ + { + "name": "Shapechanger", + "desc": "The slaad can use its action to polymorph into a Small or Medium humanoid, or back into its true form. Its statistics, other than its size, are the same in each form. Any equipment it is wearing or carrying isn't transformed. It reverts to its true form if it dies." + }, + { + "name": "Magic Resistance", + "desc": "The slaad has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Magic Weapons", + "desc": "The slaad's weapon attacks are magical." + }, + { + "name": "Regeneration", + "desc": "The slaad regains 10 hit points at the start of its turn if it has at least 1 hit point." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The slaad makes three attacks: one with its bite and two with its claws or greatsword." + }, + { + "name": "Bite (Slaad Form Only)", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one target. 9 (1d8 + 5) piercing damage plus 7 (2d6) necrotic damage." + }, + { + "name": "Claws (Slaad Form Only)", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one target. 10 (1d10 + 5) slashing damage plus 7 (2d6) necrotic damage." + }, + { + "name": "Greatsword", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one target. 12 (2d6 + 5) slashing damage plus 7 (2d6) necrotic damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The slaad's innate spellcasting ability is Charisma (spell save 15, +7 to hit with spell attacks). The slaad can innately cast the following spells, requiring no material components:", + { + "At will": "detect magic, detect thoughts, invisibility (self only), mage hand, major image" + }, + { + "2/day each": "fear, fireball, fly, tongues" + }, + { + "1/day each": "cloudkill, plane shift" + } + ], + "spellsNotes": "" + } + ], + [ + "Death Tyrant", + { + "image": null, + "bestiary": true, + "name": "Death Tyrant", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Large", + "alignment": "lawful evil", + "hp": 187, + "hit_dice": "25d10 + 50", + "ac": "19 (natural armor)", + "speed": "0 ft., fly 20 ft. (hover)", + "stats": [ + 10, + 14, + 14, + 19, + 15, + 19 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, paralyzed, petrified, poisoned, prone", + "saves": [ + { + "strength": "5" + }, + { + "constitution": "7" + }, + { + "intelligence": "9" + }, + { + "wisdom": "7" + }, + { + "charisma": "9" + } + ], + "skillsaves": [ + { + "perception": "12" + } + ], + "senses": "darkvision 120 ft., passive Perception 22", + "languages": "Deep Speech, Undercommon", + "cr": "14", + "traits": [ + { + "name": "Negative Energy Cone", + "desc": "The death tyrant's central eye emits an invisible, magical 150-foot cone of negative energy. At the start of each of its turns, the tyrant decides which way the cone faces and whether the cone is active.\nAny creature in that area can't regain hit points. Any humanoid that dies there becomes a zombie under the tyrant's command. The dead humanoid retains its place in the initiative order and animates at the start of its next turn, provided that its body hasn't been completely destroyed." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 14 (4d6) piercing damage." + }, + { + "name": "Eye Rays", + "desc": "The death tyrant shoots three of the following magical eye rays at random (reroll duplicates), choosing one to three targets it can see within 120 feet of it:" + }, + { + "name": "1. Charm Ray", + "desc": "The targeted creature must succeed on a 17 Wisdom saving throw or be charmed by the death tyrant for 1 hour, or until the death tyrant harms the creature." + }, + { + "name": "2. Paralyzing Ray", + "desc": "The targeted creature must succeed on a 17 Constitution saving throw or be paralyzed for 1 minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "3. Fear Ray", + "desc": "The targeted creature must succeed on a 17 Wisdom saving throw or be frightened for 1 minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "4. Slowing Ray", + "desc": "The targeted creature must succeed on a 17 Dexterity saving throw. On a failed save, the target's speed is halved for 1 minute. In addition, the creature can't take reactions, and it can take either an action or a bonus action on its turn, not both. The creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "5. Enervation Ray", + "desc": "The targeted creature must make a 17 Constitution saving throw, taking 36 (8d8) necrotic damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "6. Telekinetic Ray", + "desc": "If the target is a creature, it must succeed on a 17 Strength saving throw or the death tyrant moves it up to 30 feet in any direction. It is restrained by the ray's telekinetic grip until the start of the death tyrant's next turn or until the death tyrant is incapacitated.\nIf the target is an object weighing 300 pounds or less that isn't being worn or carried, it is moved up to 30 feet in any direction. The death tyrant can also exert fine control on objects with this ray, such as manipulating a simple tool or opening a door or a container." + }, + { + "name": "7. Sleep Ray", + "desc": "The targeted creature must succeed on a 17 Wisdom saving throw or fall asleep and remain unconscious for 1 minute. The target awakens if it takes damage or another creature takes an action to wake it. This ray has no effect on constructs and undead." + }, + { + "name": "8. Petrification Ray", + "desc": "The targeted creature must make a 17 Dexterity saving throw. On a failed save, the creature begins to turn to stone and is restrained. It must repeat the saving throw at the end of its next turn. On a success, the effect ends. On a failure, the creature is petrified until freed by the greater restoration spell or other magic." + }, + { + "name": "9. Disintegration Ray", + "desc": "If the target is a creature, it must succeed on a 17 Dexterity saving throw or take 45 (10d8) force damage. If this damage reduces the creature to 0 hit points, its body becomes a pile of fine gray dust.\nIf the target is a Large or smaller nonmagical object or creation of magical force, it is disintegrated without a saving throw. If the target is a Huge or larger object or creation of magical force, this ray disintegrates a 10-foot cube of it." + }, + { + "name": "10. Death Ray", + "desc": "The targeted creature must succeed on a 17 Dexterity saving throw or take 55 (10d10) necrotic damage. The target dies if the ray reduces it to 0 hit points." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Eye Ray", + "desc": "The death tyrant uses one random eye ray." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Deep Gnome (Svirfneblin)", + { + "image": null, + "bestiary": true, + "name": "Deep Gnome (Svirfneblin)", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "gnome", + "size": "Small", + "alignment": "neutral good", + "hp": 16, + "hit_dice": "3d6 + 6", + "ac": "15 (chain shirt)", + "speed": "20 ft.", + "stats": [ + 15, + 14, + 14, + 12, + 10, + 9 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "investigation": "3" + }, + { + "perception": "2" + }, + { + "stealth": "4" + } + ], + "senses": "darkvision 120 ft., passive Perception 12", + "languages": "Gnomish, Terran, Undercommon", + "cr": "1/2", + "traits": [ + { + "name": "Stone Camouflage", + "desc": "The gnome has advantage on Dexterity (Stealth) checks made to hide in rocky terrain." + }, + { + "name": "Gnome Cunning", + "desc": "The gnome has advantage on Intelligence, Wisdom, and Charisma saving throws against magic." + } + ], + "actions": [ + { + "name": "War Pick", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 6 (1d8 + 2) piercing damage." + }, + { + "name": "Poisoned Dart", + "desc": "Ranged Weapon Attack +4 to hit, range 30/120 ft., one creature. 4 (1d4 + 2) piercing damage, and the target must succeed on a 12 Constitution saving throw or be poisoned for 1 minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success" + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The gnome's innate spellcasting ability is Intelligence (spell save 11). It can innately cast the following spells, requiring no material components:", + { + "At will": "nondetection (self only)" + }, + { + "1/day each": "blindness/deafness, blur, disguise self" + } + ], + "spellsNotes": "" + } + ], + [ + "Deer", + { + "image": null, + "bestiary": true, + "name": "Deer", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 4, + "hit_dice": "1d8", + "ac": 13, + "speed": "50 ft.", + "stats": [ + 11, + 16, + 11, + 2, + 14, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 12", + "languages": "", + "cr": "0", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one target. 2 (1d4) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Demilich", + { + "image": null, + "bestiary": true, + "name": "Demilich", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Tiny", + "alignment": "neutral evil", + "hp": 80, + "hit_dice": "32d4", + "ac": "20 (natural armor)", + "speed": "0 ft., fly 30 ft. (hover)", + "stats": [ + 1, + 20, + 10, + 20, + 17, + 20 + ], + "damage_immunities": "necrotic, poison, psychic, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_resistances": "bludgeoning, piercing, slashing from magic weapons", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, deafened, exhaustion, frightened, paralyzed, petrified, poisoned, prone, stunned", + "saves": [ + { + "constitution": "6" + }, + { + "intelligence": "11" + }, + { + "wisdom": "9" + }, + { + "charisma": "11" + } + ], + "skillsaves": [], + "senses": "truesight 120 ft., passive Perception 13", + "languages": "", + "cr": "18", + "traits": [ + { + "name": "Avoidance", + "desc": "If the demilich is subjected to an effect that allows it to make a saving throw to take only half damage, it instead takes no damage if it succeeds on the saving throw, and only half damage if it fails." + }, + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the demilich fails a saving throw, it can choose to succeed instead." + }, + { + "name": "Turn Immunity", + "desc": "The demilich is immune to effects that turn undead." + } + ], + "actions": [ + { + "name": "Howl (Recharge 5-6)", + "desc": "The demilich emits a bloodcurdling howl. Each creature within 30 feet of the demilich that can hear the howl must succeed on a 15 Constitution saving throw or drop to 0 hit points. On a successful save, the creature is frightened until the end of its next turn." + }, + { + "name": "Life Drain", + "desc": "The demilich targets up to three creatures that it can see within 10 feet of it. Each target must succeed on a 19 Constitution saving throw or take 21 (6d6) necrotic damage, and the demilich regains hit points equal to the total damage dealt to all targets." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Flight", + "desc": "The demilich flies up to half its flying speed." + }, + { + "name": "Cloud of Dust", + "desc": "The demilich magically swirls its dusty remains. Each creature within 10 feet of the demilich, including around a corner, must succeed on a 15 Constitution saving throw or be blinded until the end of the demilich's next turn. A creature that succeeds on the saving throw is immune to this effect until the end of the demilich's next turn." + }, + { + "name": "Energy Drain (Costs 2 Actions)", + "desc": "Each creature within 30 feet of the demilich must make a 15 Constitution saving throw. On a failed save, the creature's hit point maximum is magically reduced by 10 (3d6). If a creature's hit point maximum is reduced to 0 by this effect, the creature dies. A creature's hit point maximum can be restored with the greater restoration spell or similar magic." + }, + { + "name": "Vile Curse (Costs 3 Actions)", + "desc": "The demilich targets one creature it can see within 30 feet of it. The target must succeed on a 15 Wisdom saving throw or be magically cursed. Until the curse ends, the target has disadvantage on attack rolls and saving throws. The target can repeat the saving throw at the end of each of its turns, ending the curse on a success." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Deva", + { + "image": null, + "bestiary": true, + "name": "Deva", + "source": [ + "Monster Manual" + ], + "type": "celestial", + "size": "Medium", + "alignment": "lawful good", + "hp": 136, + "hit_dice": "16d8 + 64", + "ac": "17 (natural armor)", + "speed": "30 ft., fly 90 ft.", + "stats": [ + 18, + 18, + 18, + 17, + 20, + 20 + ], + "damage_immunities": "", + "damage_resistances": "radiant, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, frightened", + "saves": [ + { + "wisdom": "9" + }, + { + "charisma": "9" + } + ], + "skillsaves": [ + { + "insight": "9" + }, + { + "perception": "9" + } + ], + "senses": "darkvision 120 ft., passive Perception 19", + "languages": "all, telepathy 120 ft.", + "cr": "10", + "traits": [ + { + "name": "Angelic Weapons", + "desc": "The deva's weapon attacks are magical. When the deva hits with any weapon, the weapon deals an extra 4d8 radiant damage (included in the attack)." + }, + { + "name": "Magic Resistance", + "desc": "The deva has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The deva makes two melee attacks." + }, + { + "name": "Mace", + "desc": "Melee Weapon Attack +8 to hit, reach 5 ft., one target. 7 (1d6 + 4) bludgeoning damage plus 18 (4d8) radiant damage." + }, + { + "name": "Healing Touch (3/Day)", + "desc": "The deva touches another creature. The target magically regains 20 (4d8 + 2) hit points and is freed from any curse, disease, poison, blindness, or deafness." + }, + { + "name": "Change Shape", + "desc": "The deva magically polymorphs into a humanoid or beast that has a challenge rating equal to or less than its own, or back into its true form. It reverts to its true form if it dies. Any equipment it is wearing or carrying is absorbed or borne by the new form (the deva's choice).\nIn a new form, the deva retains its game statistics and ability to speak, but its AC, movement modes, Strength, Dexterity, and special senses are replaced by those of the new form, and it gains any statistics and capabilities (except class features, legendary actions, and lair actions) that the new form has but that it lacks." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The deva's spellcasting ability is Charisma (spell save 17). The deva can innately cast the following spells, requiring only verbal components:", + { + "At will": "detect evil and good" + }, + { + "1/day each": "commune, raise dead" + } + ], + "spellsNotes": "" + } + ], + [ + "Dire Wolf", + { + "image": null, + "bestiary": true, + "name": "Dire Wolf", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 37, + "hit_dice": "5d10 + 10", + "ac": "14 (natural armor)", + "speed": "50 ft.", + "stats": [ + 17, + 15, + 15, + 3, + 12, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + }, + { + "stealth": "4" + } + ], + "senses": "passive Perception 13", + "languages": "", + "cr": "1", + "traits": [ + { + "name": "Keen Hearing and Smell", + "desc": "The wolf has advantage on Wisdom (Perception) checks that rely on hearing or smell." + }, + { + "name": "Pack Tactics", + "desc": "The wolf has advantage on an attack roll against a creature if at least one of the wolf's allies is within 5 feet of the creature and the ally isn't incapacitated." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 10 (2d6 + 3) piercing damage. If the target is a creature, it must succeed on a 13 Strength saving throw or be knocked prone." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Displacer Beast", + { + "image": null, + "bestiary": true, + "name": "Displacer Beast", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "lawful evil", + "hp": 85, + "hit_dice": "10d10 + 30", + "ac": "13 (natural armor)", + "speed": "40 ft.", + "stats": [ + 18, + 15, + 16, + 6, + 12, + 8 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 11", + "languages": "", + "cr": "3", + "traits": [ + { + "name": "Avoidance", + "desc": "If the displacer beast is subjected to an effect that allows it to make a saving throw to take only half damage, it instead takes no damage if it succeeds on the saving throw, and only half damage if it fails." + }, + { + "name": "Displacement", + "desc": "The displacer beast projects a magical illusion that makes it appear to be standing near its actual location, causing attack rolls against it to have disadvantage. If it is hit by an attack, this trait is disrupted until the end of its next turn. This trait is also disrupted while the displacer beast is incapacitated or has a speed of 0." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The displacer beast makes two attacks with its tentacles." + }, + { + "name": "Tentacle", + "desc": "Melee Weapon Attack +6 to hit, reach 10 ft., one target. 7 (1d6 + 4) bludgeoning damage plus 3 (1d6) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Djinni", + { + "image": null, + "bestiary": true, + "name": "Djinni", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Large", + "alignment": "chaotic good", + "hp": 161, + "hit_dice": "14d10 + 84", + "ac": "17 (natural armor)", + "speed": "30 ft., fly 90 ft.", + "stats": [ + 21, + 15, + 22, + 15, + 16, + 20 + ], + "damage_immunities": "lightning, thunder", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "6" + }, + { + "wisdom": "7" + }, + { + "charisma": "9" + } + ], + "skillsaves": [], + "senses": "darkvision 120 ft., passive Perception 13", + "languages": "Auran", + "cr": "11", + "traits": [ + { + "name": "Elemental Demise", + "desc": "If the djinni dies, its body disintegrates into a warm breeze, leaving behind only equipment the djinni was wearing or carrying." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The djinni makes three scimitar attacks." + }, + { + "name": "Scimitar", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one target. 12 (2d6 + 5) slashing damage plus 3 (1d6) lightning or thunder damage (djinni's choice)." + }, + { + "name": "Create Whirlwind", + "desc": "A 5-foot-radius, 30-foot-tall cylinder of swirling air magically forms on a point the djinni can see within 120 feet of it. The whirlwind lasts as long as the djinni maintains {@status concentration} (as if {@status concentration||concentrating} on a spell). Any creature but the djinni that enters the whirlwind must succeed on a 18 Strength saving throw or be restrained by it. The djinni can move the whirlwind up to 60 feet as an action, and creatures restrained by the whirlwind move with it. The whirlwind ends if the djinni loses sight of it.\nA creature can use its action to free a creature restrained by the whirlwind, including itself, by succeeding on a 18 Strength check. If the check succeeds, the creature is no longer restrained and moves to the nearest space outside the whirlwind." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The djinni's innate spellcasting ability is Charisma (spell save 17, +9 to hit with spell attacks). It can innately cast the following spells, requiring no material components:", + { + "At will": "detect evil and good, detect magic, thunderwave" + }, + { + "3/day each": "create food and water (can create wine instead of water), tongues, wind walk" + }, + { + "1/day each": "conjure elemental (air elemental only), creation, gaseous form, invisibility, major image, plane shift" + } + ], + "spellsNotes": "" + } + ], + [ + "Doppelganger", + { + "image": null, + "bestiary": true, + "name": "Doppelganger", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "subtype": "shapechanger", + "size": "Medium", + "alignment": "neutral", + "hp": 52, + "hit_dice": "8d8 + 16", + "ac": 14, + "speed": "30 ft.", + "stats": [ + 11, + 18, + 14, + 11, + 12, + 14 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "charmed", + "saves": [], + "skillsaves": [ + { + "deception": "6" + }, + { + "insight": "3" + } + ], + "senses": "darkvision 60 ft., passive Perception 11", + "languages": "Common", + "cr": "3", + "traits": [ + { + "name": "Shapechanger", + "desc": "The doppelganger can use its action to polymorph into a Small or Medium humanoid it has seen, or back into its true form. Its statistics, other than its size, are the same in each form. Any equipment it is wearing or carrying isn't transformed. It reverts to its true form if it dies." + }, + { + "name": "Ambusher", + "desc": "In the first round of a combat, the doppelganger has advantage on attack rolls against any creature it {@status surprised}." + }, + { + "name": "Surprise Attack", + "desc": "If the doppelganger surprises a creature and hits it with an attack during the first round of combat, the target takes an extra 10 (3d6) damage from the attack." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The doppelganger makes two melee attacks." + }, + { + "name": "Slam", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 7 (1d6 + 4) bludgeoning damage." + }, + { + "name": "Read Thoughts", + "desc": "The doppelganger magically reads the surface thoughts of one creature within 60 feet of it. The effect can penetrate barriers, but 3 feet of wood or dirt, 2 feet of stone, 2 inches of metal, or a thin sheet of lead blocks it. While the target is in range, the doppelganger can continue reading its thoughts, as long as the doppelganger's {@status concentration} isn't broken (as if {@status concentration||concentrating} on a spell). While reading the target's mind, the doppelganger has advantage on Wisdom (Insight) and Charisma (Deception, Intimidation, and Persuasion) checks against the target." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Draft Horse", + { + "image": null, + "bestiary": true, + "name": "Draft Horse", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 19, + "hit_dice": "3d10 + 3", + "ac": 10, + "speed": "40 ft.", + "stats": [ + 18, + 10, + 12, + 2, + 11, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 10", + "languages": "", + "cr": "1/4", + "traits": [], + "actions": [ + { + "name": "Hooves", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 9 (2d4 + 4) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Dragon Turtle", + { + "image": null, + "bestiary": true, + "name": "Dragon Turtle", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Gargantuan", + "alignment": "neutral", + "hp": 341, + "hit_dice": "22d20 + 110", + "ac": "20 (natural armor)", + "speed": "20 ft., swim 40 ft.", + "stats": [ + 25, + 10, + 20, + 10, + 12, + 12 + ], + "damage_immunities": "", + "damage_resistances": "fire", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "6" + }, + { + "constitution": "11" + }, + { + "wisdom": "7" + } + ], + "skillsaves": [], + "senses": "darkvision 120 ft., passive Perception 11", + "languages": "Aquan, Draconic", + "cr": "17", + "traits": [ + { + "name": "Amphibious", + "desc": "The dragon turtle can breathe air and water." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon turtle makes three attacks: one with its bite and two with its claws. It can make one tail attack in place of its two claw attacks." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +13 to hit, reach 15 ft., one target. 26 (3d12 + 7) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +13 to hit, reach 10 ft., one target. 16 (2d8 + 7) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +13 to hit, reach 15 ft., one target. 26 (3d12 + 7) bludgeoning damage. If the target is a creature, it must succeed on a 20 Strength saving throw or be pushed up to 10 feet away from the dragon turtle and knocked prone." + }, + { + "name": "Steam Breath (Recharge 5-6)", + "desc": "The dragon turtle exhales scalding steam in a 60-foot cone. Each creature in that area must make a 18 Constitution saving throw, taking 52 (15d6) fire damage on a failed save, or half as much damage on a successful one. Being underwater doesn't grant resistance against this damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Dretch", + { + "image": null, + "bestiary": true, + "name": "Dretch", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "demon", + "size": "Small", + "alignment": "chaotic evil", + "hp": 18, + "hit_dice": "4d6 + 4", + "ac": "11 (natural armor)", + "speed": "20 ft.", + "stats": [ + 11, + 11, + 12, + 5, + 8, + 3 + ], + "damage_immunities": "poison", + "damage_resistances": "cold, fire, lightning", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 9", + "languages": "Abyssal, telepathy 60 ft. (works only with creatures that understand Abyssal)", + "cr": "1/4", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The dretch makes two attacks: one with its bite and one with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one target. 3 (1d6) piercing damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one target. 5 (2d4) slashing damage." + }, + { + "name": "Fetid Cloud (1/Day)", + "desc": "A 10-foot radius of disgusting green gas extends out from the dretch. The gas spreads around corners, and its area is lightly obscured. It lasts for 1 minute or until a strong wind disperses it. Any creature that starts its turn in that area must succeed on a 11 Constitution saving throw or be poisoned until the start of its next turn. While poisoned in this way, the target can take either an action or a bonus action on its turn, not both, and can't take reactions." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Drider", + { + "image": null, + "bestiary": true, + "name": "Drider", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "chaotic evil", + "hp": 123, + "hit_dice": "13d10 + 52", + "ac": "19 (natural armor)", + "speed": "30 ft., climb 30 ft.", + "stats": [ + 16, + 16, + 18, + 13, + 14, + 12 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "5" + }, + { + "stealth": "9" + } + ], + "senses": "darkvision 120 ft., passive Perception 15", + "languages": "Elvish, Undercommon", + "cr": "6", + "traits": [ + { + "name": "Fey Ancestry", + "desc": "The drider has advantage on saving throws against being charmed, and magic can't put the drider to sleep." + }, + { + "name": "Spider Climb", + "desc": "The drider can climb difficult surfaces, including upside down on ceilings, without needing to make an ability check." + }, + { + "name": "Sunlight Sensitivity", + "desc": "While in sunlight, the drider has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight." + }, + { + "name": "Web Walker", + "desc": "The drider ignores movement restrictions caused by webbing." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The drider makes three attacks, either with its longsword or its longbow. It can replace one of those attacks with a bite attack." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one creature. 2 (1d4) piercing damage plus 9 (2d8) poison damage." + }, + { + "name": "Longsword", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 7 (1d8 + 3) slashing damage, or 8 (1d10 + 3) slashing damage if used with two hands." + }, + { + "name": "Longbow", + "desc": "Ranged Weapon Attack +6 to hit, range 150/600 ft., one target. 7 (1d8 + 3) piercing damage plus 4 (1d8) poison damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The drider's innate spellcasting ability is Wisdom (spell save 13). The drider can innately cast the following spells, requiring no material components:", + { + "At will": "dancing lights" + }, + { + "1/day each": "darkness, faerie fire" + } + ], + "spellsNotes": "" + } + ], + [ + "Drow", + { + "image": null, + "bestiary": true, + "name": "Drow", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "elf", + "size": "Medium", + "alignment": "neutral evil", + "hp": 13, + "hit_dice": "3d8", + "ac": "15 (chain shirt)", + "speed": "30 ft.", + "stats": [ + 10, + 14, + 10, + 11, + 11, + 12 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "2" + }, + { + "stealth": "4" + } + ], + "senses": "darkvision 120 ft., passive Perception 12", + "languages": "Elvish, Undercommon", + "cr": "1/4", + "traits": [ + { + "name": "Fey Ancestry", + "desc": "The drow has advantage on saving throws against being charmed, and magic can't put the drow to sleep." + }, + { + "name": "Sunlight Sensitivity", + "desc": "While in sunlight, the drow has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Shortsword", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d6 + 2) piercing damage." + }, + { + "name": "Hand Crossbow", + "desc": "Ranged Weapon Attack +4 to hit, range 30/120 ft., one target. 5 (1d6 + 2) piercing damage, and the target must succeed on a 13 Constitution saving throw or be poisoned for 1 hour. If the saving throw fails by 5 or more, the target is also unconscious while poisoned in this way. The target wakes up if it takes damage or if another creature takes an action to shake it awake." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The drow's spellcasting ability is Charisma (spell save 11). It can innately cast the following spells, requiring no material components:", + { + "At will": "dancing lights" + }, + { + "1/day each": "darkness, faerie fire" + } + ], + "spellsNotes": "" + } + ], + [ + "Drow Elite Warrior", + { + "image": null, + "bestiary": true, + "name": "Drow Elite Warrior", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "elf", + "size": "Medium", + "alignment": "neutral evil", + "hp": 71, + "hit_dice": "11d8 + 22", + "ac": "18 (studded leather armor)", + "speed": "30 ft.", + "stats": [ + 13, + 18, + 14, + 11, + 13, + 12 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "7" + }, + { + "constitution": "5" + }, + { + "wisdom": "4" + } + ], + "skillsaves": [ + { + "perception": "4" + }, + { + "stealth": "10" + } + ], + "senses": "darkvision 120 ft., passive Perception 14", + "languages": "Elvish, Undercommon", + "cr": "5", + "traits": [ + { + "name": "Fey Ancestry", + "desc": "The drow has advantage on saving throws against being charmed, and magic can't put the drow to sleep." + }, + { + "name": "Sunlight Sensitivity", + "desc": "While in sunlight, the drow has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The drow makes two shortsword attacks." + }, + { + "name": "Shortsword", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 7 (1d6 + 4) piercing damage plus 10 (3d6) poison damage." + }, + { + "name": "Hand Crossbow", + "desc": "Ranged Weapon Attack +7 to hit, range 30/120 ft., one target. 7 (1d6 + 4) piercing damage, and the target must succeed on a 13 Constitution saving throw or be poisoned for 1 hour. If the saving throw fails by 5 or more, the target is also unconscious while poisoned in this way. The target wakes up if it takes damage or if another creature takes an action to shake it awake." + } + ], + "bonus_actions": [], + "reactions": [ + { + "name": "Parry", + "desc": "The drow adds 3 to its AC against one melee attack that would hit it. To do so, the drow must see the attacker and be wielding a melee weapon." + } + ], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The drow's spellcasting ability is Charisma (spell save 12). It can innately cast the following spells, requiring no material components:", + { + "At will": "dancing lights" + }, + { + "1/day each": "darkness, faerie fire, levitate (self only)" + } + ], + "spellsNotes": "" + } + ], + [ + "Drow Mage", + { + "image": null, + "bestiary": true, + "name": "Drow Mage", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "elf", + "size": "Medium", + "alignment": "neutral evil", + "hp": 45, + "hit_dice": "10d8", + "ac": 12, + "speed": "30 ft.", + "stats": [ + 9, + 14, + 10, + 17, + 13, + 12 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "arcana": "6" + }, + { + "deception": "4" + }, + { + "perception": "4" + }, + { + "stealth": "5" + } + ], + "senses": "darkvision 120 ft., passive Perception 14", + "languages": "Elvish, Undercommon", + "cr": "7", + "traits": [ + { + "name": "Fey Ancestry", + "desc": "The drow has advantage on saving throws against being charmed, and magic can't put the drow to sleep." + }, + { + "name": "Sunlight Sensitivity", + "desc": "While in sunlight, the drow has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Staff", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one target. 2 (1d6 - 1) bludgeoning damage, or 3 (1d8 - 1) bludgeoning damage if used with two hands, plus 3 (1d6) poison damage." + }, + { + "name": "Summon Demon (1/Day)", + "desc": "The drow magically summons a quasit, or attempts to summon a shadow demon with a {@chance 50|50 percent|50% summoning chance} chance of success. The summoned demon appears in an unoccupied space within 60 feet of its summoner, acts as an ally of its summoner, and can't summon other demons. It remains for 10 minutes, until it or its summoner dies, or until its summoner dismisses it as an action." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The drow's spellcasting ability is Charisma (spell save 12). It can innately cast the following spells, requiring no material components:", + { + "At will": "dancing lights" + }, + { + "1/day each": "darkness, faerie fire, levitate (self only)" + }, + "The drow is a 10th-level spellcaster. Its spellcasting ability is Intelligence (spell save 14, +6 to hit with spell attacks). The drow has the following wizard spells prepared:", + { + "Cantrips (at will)": "mage hand, minor illusion, poison spray, ray of frost" + }, + { + "1st level (4 slots)": "mage armor, magic missile, shield, witch bolt" + }, + { + "2nd level (3 slots)": "alter self, misty step, web" + }, + { + "3rd level (3 slots)": "fly, lightning bolt" + }, + { + "4th level (3 slots)": "Evard's black tentacles, greater invisibility" + }, + { + "5th level (2 slots)": "cloudkill" + } + ], + "spellsNotes": " " + } + ], + [ + "Drow Priestess of Lolth", + { + "image": null, + "bestiary": true, + "name": "Drow Priestess of Lolth", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "elf", + "size": "Medium", + "alignment": "neutral evil", + "hp": 71, + "hit_dice": "13d8 + 13", + "ac": "16 (scale mail)", + "speed": "30 ft.", + "stats": [ + 10, + 14, + 12, + 13, + 17, + 18 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "constitution": "4" + }, + { + "wisdom": "6" + }, + { + "charisma": "7" + } + ], + "skillsaves": [ + { + "insight": "6" + }, + { + "perception": "6" + }, + { + "religion": "4" + }, + { + "stealth": "5" + } + ], + "senses": "darkvision 120 ft., passive Perception 16", + "languages": "Elvish, Undercommon", + "cr": "8", + "traits": [ + { + "name": "Fey Ancestry", + "desc": "The drow has advantage on saving throws against being charmed, and magic can't put the drow to sleep." + }, + { + "name": "Sunlight Sensitivity", + "desc": "While in sunlight, the drow has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The drow makes two scourge attacks." + }, + { + "name": "Scourge", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 5 (1d6 + 2) piercing damage plus 17 (5d6) poison damage." + }, + { + "name": "Summon Demon (1/Day)", + "desc": "The drow attempts to magically summon a yochlol with a {@chance 30|30 percent|30% summoning chance} chance of success. If the attempt fails, the drow takes 5 (1d10) psychic damage. Otherwise, the summoned demon appears in an unoccupied space within 60 feet of its summoner, acts as an ally of its summoner, and can't summon other demons. It remains for 10 minutes, until it or its summoner dies, or until its summoner dismisses it as an action." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The drow's spellcasting ability is Charisma (spell save 15). She can innately cast the following spells, requiring no material components:", + { + "At will": "dancing lights" + }, + { + "1/day each": "darkness, faerie fire, levitate (self only)" + }, + "The drow is a 10th-level spellcaster. Her spellcasting ability is Wisdom (save 14, +6 to hit with spell attacks). The drow has the following cleric spells prepared:", + { + "Cantrips (at will)": "guidance, poison spray, resistance, spare the dying, thaumaturgy" + }, + { + "1st level (4 slots)": "animal friendship, cure wounds, detect poison and disease, ray of sickness" + }, + { + "2nd level (3 slots)": "lesser restoration, protection from poison, web" + }, + { + "3rd level (3 slots)": "conjure animals (2 giant spider), dispel magic" + }, + { + "4th level (3 slots)": "divination, freedom of movement" + }, + { + "5th level (2 slots)": "insect plague, mass cure wounds" + } + ], + "spellsNotes": " " + } + ], + [ + "Druid", + { + "image": null, + "bestiary": true, + "name": "Druid", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "any alignment", + "hp": 27, + "hit_dice": "5d8 + 5", + "ac": 11, + "speed": "30 ft.", + "stats": [ + 10, + 12, + 13, + 12, + 15, + 11 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "medicine": "4" + }, + { + "nature": "3" + }, + { + "perception": "4" + } + ], + "senses": "passive Perception 14", + "languages": "Druidic plus any two languages", + "cr": "2", + "traits": [], + "actions": [ + { + "name": "Quarterstaff", + "desc": "Melee Weapon Attack +2 to hit (+4 to hit with shillelagh), reach 5 ft., one target. 3 (1d6) bludgeoning damage, 4 (1d8) bludgeoning damage if wielded with two hands, or 6 (1d8 + 2) bludgeoning damage with shillelagh." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The druid is a 4th-level spellcaster. Its spellcasting ability is Wisdom (spell save 12, +4 to hit with spell attacks). It has the following druid spells prepared:", + { + "Cantrips (at will)": "druidcraft, produce flame, shillelagh" + }, + { + "1st level (4 slots)": "entangle, longstrider, speak with animals, thunderwave" + }, + { + "2nd level (3 slots)": "animal messenger, barkskin" + } + ], + "spellsNotes": "" + } + ], + [ + "Dryad", + { + "image": null, + "bestiary": true, + "name": "Dryad", + "source": [ + "Monster Manual" + ], + "type": "fey", + "size": "Medium", + "alignment": "neutral", + "hp": 22, + "hit_dice": "5d8", + "ac": 11, + "speed": "30 ft.", + "stats": [ + 10, + 12, + 11, + 14, + 15, + 18 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "4" + }, + { + "stealth": "5" + } + ], + "senses": "darkvision 60 ft., passive Perception 14", + "languages": "Elvish, Sylvan", + "cr": "1", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The dryad has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Speak with Beasts and Plants", + "desc": "The dryad can communicate with beasts and plants as if they shared a language." + }, + { + "name": "Tree Stride", + "desc": "Once on her turn, the dryad can use 10 feet of her movement to step magically into one living tree within her reach and emerge from a second living tree within 60 feet of the first tree, appearing in an unoccupied space within 5 feet of the second tree. Both trees must be large or bigger." + } + ], + "actions": [ + { + "name": "Club", + "desc": "Melee Weapon Attack +2 to hit (+6 to hit with shillelagh), reach 5 ft., one target. 2 (1d4) bludgeoning damage, or 8 (1d8 + 4) bludgeoning damage with shillelagh." + }, + { + "name": "Fey Charm", + "desc": "The dryad targets one humanoid or beast that she can see within 30 feet of her. If the target can see the dryad, it must succeed on a 14 Wisdom saving throw or be magically charmed. The charmed creature regards the dryad as a trusted friend to be heeded and protected. Although the target isn't under the dryad's control, it takes the dryad's requests or actions in the most favorable way it can.\nEach time the dryad or its allies do anything harmful to the target, it can repeat the saving throw, ending the effect on itself on a success. Otherwise, the effect lasts 24 hours or until the dryad dies, is on a different plane of existence from the target, or ends the effect as a bonus action. If a target's saving throw is successful, the target is immune to the dryad's Fey Charm for the next 24 hours.\nThe dryad can have no more than one humanoid and up to three beasts charmed at a time." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The dryad's innate spellcasting ability is Charisma (spell save 14). The dryad can innately cast the following spells, requiring no material components:", + { + "At will": "druidcraft" + }, + { + "3/day each": "entangle, goodberry" + }, + { + "1/day each": "barkskin, pass without trace, shillelagh" + } + ], + "spellsNotes": "" + } + ], + [ + "Duergar", + { + "image": null, + "bestiary": true, + "name": "Duergar", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "dwarf", + "size": "Medium", + "alignment": "lawful evil", + "hp": 26, + "hit_dice": "4d8 + 4", + "ac": "16 (scale mail)", + "speed": "25 ft.", + "stats": [ + 14, + 11, + 14, + 11, + 10, + 9 + ], + "damage_immunities": "", + "damage_resistances": "poison", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 120 ft., passive Perception 10", + "languages": "Dwarvish, Undercommon", + "cr": "1", + "traits": [ + { + "name": "Duergar Resilience", + "desc": "The duergar has advantage on saving throws against poison, spells, and illusions, as well as to resist being charmed or paralyzed." + }, + { + "name": "Sunlight Sensitivity", + "desc": "While in sunlight, the duergar has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Enlarge (Recharges after a Short or Long Rest)", + "desc": "For 1 minute, the duergar magically increases in size, along with anything it is wearing or carrying. While enlarged, the duergar is Large, doubles its damage dice on Strength-based weapon attacks (included in the attacks), and makes Strength checks and Strength saving throws with advantage. If the duergar lacks the room to become Large, it attains the maximum size possible in the space available." + }, + { + "name": "War Pick", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 6 (1d8 + 2) piercing damage, or 11 (2d8 + 2) piercing damage while enlarged." + }, + { + "name": "Javelin", + "desc": "Melee / Ranged Weapon Attack +4 to hit, reach 5 ft. or range 30/120 ft., one target. 5 (1d6 + 2) piercing damage, or 9 (2d6 + 2) piercing damage while enlarged." + }, + { + "name": "Invisibility (Recharges after a Short or Long Rest)", + "desc": "The duergar magically turns invisible until it attacks, casts a spell, or uses its Enlarge, or until its {@status concentration} is broken, up to 1 hour (as if {@status concentration||concentrating} on a spell). Any equipment the duergar wears or carries is invisible with it." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Duodrone", + { + "image": null, + "bestiary": true, + "name": "Duodrone", + "source": [ + "Monster Manual" + ], + "type": "construct", + "size": "Medium", + "alignment": "lawful neutral", + "hp": 11, + "hit_dice": "2d8 + 2", + "ac": "15 (natural armor)", + "speed": "30 ft.", + "stats": [ + 11, + 13, + 12, + 6, + 10, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "truesight 120 ft., passive Perception 10", + "languages": "Modron", + "cr": "1/4", + "traits": [ + { + "name": "Axiomatic Mind", + "desc": "The duodrone can't be compelled to act in a manner contrary to its nature or its instructions." + }, + { + "name": "Disintegration", + "desc": "If the duodrone dies, its body disintegrates into dust, leaving behind its weapons and anything else it was carrying." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The duodrone makes two fist attacks or two javelin attacks." + }, + { + "name": "Fist", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one target. 2 (1d4) bludgeoning damage." + }, + { + "name": "Javelin", + "desc": "Melee / Ranged Weapon Attack +3 to hit, reach 5 ft. or range 30/120 ft., one target. 4 (1d6 + 1) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Dust Mephit", + { + "image": null, + "bestiary": true, + "name": "Dust Mephit", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Small", + "alignment": "neutral evil", + "hp": 17, + "hit_dice": "5d6", + "ac": 12, + "speed": "30 ft., fly 30 ft.", + "stats": [ + 5, + 14, + 10, + 9, + 11, + 10 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "fire", + "condition_immunities": "poisoned", + "saves": [], + "skillsaves": [ + { + "perception": "2" + }, + { + "stealth": "4" + } + ], + "senses": "darkvision 60 ft., passive Perception 12", + "languages": "Auran, Terran", + "cr": "1/2", + "traits": [ + { + "name": "Death Burst", + "desc": "When the mephit dies, it explodes in a burst of dust. Each creature within 5 feet of it must then succeed on a 10 Constitution saving throw or be blinded for 1 minute. A blinded creature can repeat the saving throw on each of its turns, ending the effect on itself on a success." + } + ], + "actions": [ + { + "name": "Claws", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 4 (1d4 + 2) slashing damage." + }, + { + "name": "Blinding Breath (Recharge 6)", + "desc": "The mephit exhales a 15-foot cone of blinding dust. Each creature in that area must succeed on a 10 Dexterity saving throw or be blinded for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The mephit can innately cast sleep, requiring no material components. Its innate spellcasting ability is Charisma.", + { + "At will": "sleep" + } + ], + "spellsNotes": "" + } + ], + [ + "Eagle", + { + "image": null, + "bestiary": true, + "name": "Eagle", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Small", + "alignment": "unaligned", + "hp": 3, + "hit_dice": "1d6", + "ac": 12, + "speed": "10 ft., fly 60 ft.", + "stats": [ + 6, + 15, + 10, + 2, + 14, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "4" + } + ], + "senses": "passive Perception 14", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Keen Sight", + "desc": "The eagle has advantage on Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Talons", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 4 (1d4 + 2) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Earth Elemental", + { + "image": null, + "bestiary": true, + "name": "Earth Elemental", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Large", + "alignment": "neutral", + "hp": 126, + "hit_dice": "12d10 + 60", + "ac": "17 (natural armor)", + "speed": "30 ft., burrow 30 ft.", + "stats": [ + 20, + 8, + 20, + 5, + 10, + 5 + ], + "damage_immunities": "poison", + "damage_resistances": "bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "thunder", + "condition_immunities": "exhaustion, paralyzed, petrified, poisoned, unconscious", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., tremorsense 60 ft., passive Perception 10", + "languages": "Terran", + "cr": "5", + "traits": [ + { + "name": "Earth Glide", + "desc": "The elemental can burrow through nonmagical, unworked earth and stone. While doing so, the elemental doesn't disturb the material it moves through." + }, + { + "name": "Siege Monster", + "desc": "The elemental deals double damage to objects and structures." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The elemental makes two slam attacks." + }, + { + "name": "Slam", + "desc": "Melee Weapon Attack +8 to hit, reach 10 ft., one target. 14 (2d8 + 5) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Efreeti", + { + "image": null, + "bestiary": true, + "name": "Efreeti", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Large", + "alignment": "lawful evil", + "hp": 200, + "hit_dice": "16d10 + 112", + "ac": "17 (natural armor)", + "speed": "40 ft., fly 60 ft.", + "stats": [ + 22, + 12, + 24, + 16, + 15, + 16 + ], + "damage_immunities": "fire", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "intelligence": "7" + }, + { + "wisdom": "6" + }, + { + "charisma": "7" + } + ], + "skillsaves": [], + "senses": "darkvision 120 ft., passive Perception 12", + "languages": "Ignan", + "cr": "11", + "traits": [ + { + "name": "Elemental Demise", + "desc": "If the efreeti dies, its body disintegrates in a flash of fire and puff of smoke, leaving behind only equipment the efreeti was wearing or carrying." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The efreeti makes two scimitar attacks or uses its Hurl Flame twice." + }, + { + "name": "Scimitar", + "desc": "Melee Weapon Attack +10 to hit, reach 5 ft., one target. 13 (2d6 + 6) slashing damage plus 7 (2d6) fire damage." + }, + { + "name": "Hurl Flame", + "desc": "Ranged Spell Attack +7 to hit, range 120 ft., one target. 17 (5d6) fire damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The efreeti's innate spellcasting ability is Charisma (spell save 15, +7 to hit with spell attacks). It can innately cast the following spells, requiring no material components:", + { + "At will": "detect magic" + }, + { + "3/day each": "enlarge/reduce, tongues" + }, + { + "1/day each": "conjure elemental (fire elemental only), gaseous form, invisibility, major image, plane shift, wall of fire" + } + ], + "spellsNotes": "" + } + ], + [ + "Elephant", + { + "image": null, + "bestiary": true, + "name": "Elephant", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Huge", + "alignment": "unaligned", + "hp": 76, + "hit_dice": "8d12 + 24", + "ac": "12 (natural armor)", + "speed": "40 ft.", + "stats": [ + 22, + 9, + 17, + 3, + 11, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 10", + "languages": "", + "cr": "4", + "traits": [ + { + "name": "Trampling Charge", + "desc": "If the elephant moves at least 20 feet straight toward a creature and then hits it with a gore attack on the same turn, that target must succeed on a 12 Strength saving throw or be knocked prone. If the target is prone, the elephant can make one stomp attack against it as a bonus action." + } + ], + "actions": [ + { + "name": "Gore", + "desc": "Melee Weapon Attack +8 to hit, reach 5 ft., one target. 19 (3d8 + 6) piercing damage." + }, + { + "name": "Stomp", + "desc": "Melee Weapon Attack +8 to hit, reach 5 ft., one prone creature. 22 (3d10 + 6) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Elk", + { + "image": null, + "bestiary": true, + "name": "Elk", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 13, + "hit_dice": "2d10 + 2", + "ac": 10, + "speed": "50 ft.", + "stats": [ + 16, + 10, + 12, + 2, + 10, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 10", + "languages": "", + "cr": "1/4", + "traits": [ + { + "name": "Charge", + "desc": "If the elk moves at least 20 feet straight toward a target and then hits it with a ram attack on the same turn, the target takes an extra 7 (2d6) damage. If the target is a creature, it must succeed on a 13 Strength saving throw or be knocked prone." + } + ], + "actions": [ + { + "name": "Ram", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) bludgeoning damage." + }, + { + "name": "Hooves", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one prone creature. 8 (2d4 + 3) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Empyrean", + { + "image": null, + "bestiary": true, + "name": "Empyrean", + "source": [ + "Monster Manual" + ], + "type": "celestial", + "subtype": "titan", + "size": "Huge", + "alignment": "chaotic good (75%) or neutral evil (25%)", + "hp": 313, + "hit_dice": "19d12 + 190", + "ac": "22 (natural armor)", + "speed": "50 ft., fly 50 ft., swim 50 ft.", + "stats": [ + 30, + 21, + 30, + 21, + 22, + 27 + ], + "damage_immunities": "bludgeoning, piercing, slashing from nonmagical attacks", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "strength": "17" + }, + { + "intelligence": "12" + }, + { + "wisdom": "13" + }, + { + "charisma": "15" + } + ], + "skillsaves": [ + { + "insight": "13" + }, + { + "persuasion": "15" + } + ], + "senses": "truesight 120 ft., passive Perception 16", + "languages": "all", + "cr": "23", + "traits": [ + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the empyrean fails a saving throw, it can choose to succeed instead." + }, + { + "name": "Magic Resistance", + "desc": "The empyrean has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Magic Weapons", + "desc": "The empyrean's weapon attacks are magical." + } + ], + "actions": [ + { + "name": "Maul", + "desc": "Melee Weapon Attack +17 to hit, reach 10 ft., one target. 31 (6d6 + 10) bludgeoning damage. If the target is a creature, it must succeed on a 15 Constitution saving throw or be stunned until the end of the empyrean's next turn." + }, + { + "name": "Bolt", + "desc": "Ranged Spell Attack +15 to hit, range 600 ft., one target. 24 (7d6) damage of one of the following types (empyrean's choice): acid, cold, fire, force, lightning, radiant, or thunder." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Attack", + "desc": "The empyrean makes one attack." + }, + { + "name": "Bolster", + "desc": "The empyrean bolsters all nonhostile creatures within 120 feet of it until the end of its next turn. Bolstered creatures can't be charmed or frightened, and they gain advantage on ability checks and saving throws until the end of the empyrean's next turn." + }, + { + "name": "Trembling Strike (Costs 2 Actions)", + "desc": "The empyrean strikes the ground with its maul, triggering an earth tremor. All other creatures on the ground within 60 feet of the empyrean must succeed on a 25 Strength saving throw or be knocked prone." + } + ], + "mythic_actions": [], + "spells": [ + "The empyrean's innate spellcasting ability is Charisma (spell save 23, +15 to hit with spell attacks). It can innately cast the following spells, requiring no material components:", + { + "At will": "greater restoration, pass without trace, water breathing, water walk" + }, + { + "1/day each": "commune, dispel evil and good, earthquake, fire storm, plane shift (self only)" + } + ], + "spellsNotes": "" + } + ], + [ + "Erinyes", + { + "image": null, + "bestiary": true, + "name": "Erinyes", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "devil", + "size": "Medium", + "alignment": "lawful evil", + "hp": 153, + "hit_dice": "18d8 + 72", + "ac": "18 (plate armor)", + "speed": "30 ft., fly 60 ft.", + "stats": [ + 18, + 16, + 18, + 14, + 14, + 18 + ], + "damage_immunities": "fire, poison", + "damage_resistances": "cold, bludgeoning, piercing, slashing from nonmagical attacks that aren't silvered", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "dexterity": "7" + }, + { + "constitution": "8" + }, + { + "wisdom": "6" + }, + { + "charisma": "8" + } + ], + "skillsaves": [], + "senses": "truesight 120 ft., passive Perception 12", + "languages": "Infernal, telepathy 120 ft.", + "cr": "12", + "traits": [ + { + "name": "Hellish Weapons", + "desc": "The erinyes's weapon attacks are magical and deal an extra 13 (3d8) poison damage on a hit (included in the attacks)." + }, + { + "name": "Magic Resistance", + "desc": "The erinyes has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The erinyes makes three attacks." + }, + { + "name": "Longsword", + "desc": "Melee Weapon Attack +8 to hit, reach 5 ft., one target. 8 (1d8 + 4) slashing damage, or 9 (1d10 + 4) slashing damage if used with two hands, plus 13 (3d8) poison damage." + }, + { + "name": "Longbow", + "desc": "Ranged Weapon Attack +7 to hit, range 150/600 ft., one target. 7 (1d8 + 3) piercing damage plus 13 (3d8) poison damage, and the target must succeed on a 14 Constitution saving throw or be poisoned. The poison lasts until it is removed by the lesser restoration spell or similar magic." + } + ], + "bonus_actions": [], + "reactions": [ + { + "name": "Parry", + "desc": "The erinyes adds 4 to its AC against one melee attack that would hit it. To do so, the erinyes must see the attacker and be wielding a melee weapon." + } + ], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ettercap", + { + "image": null, + "bestiary": true, + "name": "Ettercap", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Medium", + "alignment": "neutral evil", + "hp": 44, + "hit_dice": "8d8 + 8", + "ac": "13 (natural armor)", + "speed": "30 ft., climb 30 ft.", + "stats": [ + 14, + 15, + 13, + 7, + 12, + 8 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + }, + { + "stealth": "4" + }, + { + "survival": "3" + } + ], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "", + "cr": "2", + "traits": [ + { + "name": "Spider Climb", + "desc": "The ettercap can climb difficult surfaces, including upside down on ceilings, without needing to make an ability check." + }, + { + "name": "Web Sense", + "desc": "While in contact with a web, the ettercap knows the exact location of any other creature in contact with the same web." + }, + { + "name": "Web Walker", + "desc": "The ettercap ignores movement restrictions caused by webbing." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The ettercap makes two attacks: one with its bite and one with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 6 (1d8 + 2) piercing damage plus 4 (1d8) poison damage. The target must succeed on a 11 Constitution saving throw or be poisoned for 1 minute. The creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 7 (2d4 + 2) slashing damage." + }, + { + "name": "Web (Recharge 5-6)", + "desc": "Ranged Weapon Attack +4 to hit, range 30/60 ft., one Large or smaller creature. The creature is restrained by webbing. As an action, the restrained creature can make a 11 Strength check, escaping from the webbing on a success. The effect ends if the webbing is destroyed. The webbing has AC 10, 5 hit points, is vulnerable to fire damage and immune to bludgeoning, poison and psychic damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ettin", + { + "image": null, + "bestiary": true, + "name": "Ettin", + "source": [ + "Monster Manual" + ], + "type": "giant", + "size": "Large", + "alignment": "chaotic evil", + "hp": 85, + "hit_dice": "10d10 + 30", + "ac": "12 (natural armor)", + "speed": "40 ft.", + "stats": [ + 21, + 8, + 17, + 6, + 10, + 8 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "4" + } + ], + "senses": "darkvision 60 ft., passive Perception 14", + "languages": "Giant, Orc", + "cr": "4", + "traits": [ + { + "name": "Two Heads", + "desc": "The ettin has advantage on Wisdom (Perception) checks and on saving throws against being blinded, charmed, deafened, frightened, stunned, and knocked unconscious." + }, + { + "name": "Wakeful", + "desc": "When one of the ettin's heads is asleep, its other head is awake." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The ettin makes two attacks: one with its battleaxe and one with its morningstar." + }, + { + "name": "Battleaxe", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 14 (2d8 + 5) slashing damage." + }, + { + "name": "Morningstar", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 14 (2d8 + 5) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Faerie Dragon (Blue)", + { + "image": null, + "bestiary": true, + "name": "Faerie Dragon (Blue)", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Tiny", + "alignment": "chaotic good", + "hp": 14, + "hit_dice": "4d4 + 4", + "ac": 15, + "speed": "10 ft., fly 60 ft.", + "stats": [ + 3, + 20, + 13, + 14, + 12, + 16 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "arcana": "4" + }, + { + "perception": "3" + }, + { + "stealth": "7" + } + ], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "Draconic, Sylvan", + "cr": "2", + "traits": [ + { + "name": "The Colors of Age", + "desc": "A faerie dragon's scales change hue as it ages, moving through all the colors of the rainbow. All faerie dragons have innate spellcasting ability, gaining new spells as they mature.\nRed—5 years or less\nOrange—6–10 years\nYellow—11–20 years\nGreen—21–30 years\nBlue—31–40 years\nIndigo—41–50 years\nViolet—51 years or more\nA green or older faerie dragon's CR increases to 2." + }, + { + "name": "Superior Invisibility", + "desc": "As a bonus action, the dragon can magically turn invisible until its {@status concentration} ends (as if {@status concentration||concentrating} on a spell). Any equipment the dragon wears or carries is invisible with it." + }, + { + "name": "Limited Telepathy", + "desc": "Using telepathy, the dragon can magically communicate with any other faerie dragon within 60 feet of it." + }, + { + "name": "Magic Resistance", + "desc": "The faerie dragon has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one creature. 1 piercing damage." + }, + { + "name": "Euphoria Breath (Recharge 5-6)", + "desc": "The dragon exhales a puff of euphoria gas at one creature within 5 feet of it. The target must succeed on a 11 Wisdom saving throw, or for 1 minute, the target can't take reactions and must roll a d6 at the start of each of its turns to determine its behavior during the turn:\n1–4. The target takes no action or bonus action and uses all of its movement to move in a random direction.\n5–6. The target doesn't move, and the only thing it can do on its turn is make a 11 Wisdom saving throw, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The dragon's innate spellcasting ability is Charisma (spell save 13). It can innately cast a number of spells, requiring no material components:", + { + "1/day each": "color spray, dancing lights, mage hand, major image, minor illusion, mirror image, suggestion" + } + ], + "spellsNotes": "" + } + ], + [ + "Faerie Dragon (Green)", + { + "image": null, + "bestiary": true, + "name": "Faerie Dragon (Green)", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Tiny", + "alignment": "chaotic good", + "hp": 14, + "hit_dice": "4d4 + 4", + "ac": 15, + "speed": "10 ft., fly 60 ft.", + "stats": [ + 3, + 20, + 13, + 14, + 12, + 16 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "arcana": "4" + }, + { + "perception": "3" + }, + { + "stealth": "7" + } + ], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "Draconic, Sylvan", + "cr": "2", + "traits": [ + { + "name": "The Colors of Age", + "desc": "A faerie dragon's scales change hue as it ages, moving through all the colors of the rainbow. All faerie dragons have innate spellcasting ability, gaining new spells as they mature.\nRed—5 years or less\nOrange—6–10 years\nYellow—11–20 years\nGreen—21–30 years\nBlue—31–40 years\nIndigo—41–50 years\nViolet—51 years or more\nA green or older faerie dragon's CR increases to 2." + }, + { + "name": "Superior Invisibility", + "desc": "As a bonus action, the dragon can magically turn invisible until its {@status concentration} ends (as if {@status concentration||concentrating} on a spell). Any equipment the dragon wears or carries is invisible with it." + }, + { + "name": "Limited Telepathy", + "desc": "Using telepathy, the dragon can magically communicate with any other faerie dragon within 60 feet of it." + }, + { + "name": "Magic Resistance", + "desc": "The faerie dragon has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one creature. 1 piercing damage." + }, + { + "name": "Euphoria Breath (Recharge 5-6)", + "desc": "The dragon exhales a puff of euphoria gas at one creature within 5 feet of it. The target must succeed on a 11 Wisdom saving throw, or for 1 minute, the target can't take reactions and must roll a d6 at the start of each of its turns to determine its behavior during the turn:\n1–4. The target takes no action or bonus action and uses all of its movement to move in a random direction.\n5–6. The target doesn't move, and the only thing it can do on its turn is make a 11 Wisdom saving throw, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The dragon's innate spellcasting ability is Charisma (spell save 13). It can innately cast a number of spells, requiring no material components:", + { + "1/day each": "color spray, dancing lights, mage hand, minor illusion, mirror image, suggestion" + } + ], + "spellsNotes": "" + } + ], + [ + "Faerie Dragon (Indigo)", + { + "image": null, + "bestiary": true, + "name": "Faerie Dragon (Indigo)", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Tiny", + "alignment": "chaotic good", + "hp": 14, + "hit_dice": "4d4 + 4", + "ac": 15, + "speed": "10 ft., fly 60 ft.", + "stats": [ + 3, + 20, + 13, + 14, + 12, + 16 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "arcana": "4" + }, + { + "perception": "3" + }, + { + "stealth": "7" + } + ], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "Draconic, Sylvan", + "cr": "2", + "traits": [ + { + "name": "The Colors of Age", + "desc": "A faerie dragon's scales change hue as it ages, moving through all the colors of the rainbow. All faerie dragons have innate spellcasting ability, gaining new spells as they mature.\nRed—5 years or less\nOrange—6–10 years\nYellow—11–20 years\nGreen—21–30 years\nBlue—31–40 years\nIndigo—41–50 years\nViolet—51 years or more\nA green or older faerie dragon's CR increases to 2." + }, + { + "name": "Superior Invisibility", + "desc": "As a bonus action, the dragon can magically turn invisible until its {@status concentration} ends (as if {@status concentration||concentrating} on a spell). Any equipment the dragon wears or carries is invisible with it." + }, + { + "name": "Limited Telepathy", + "desc": "Using telepathy, the dragon can magically communicate with any other faerie dragon within 60 feet of it." + }, + { + "name": "Magic Resistance", + "desc": "The faerie dragon has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one creature. 1 piercing damage." + }, + { + "name": "Euphoria Breath (Recharge 5-6)", + "desc": "The dragon exhales a puff of euphoria gas at one creature within 5 feet of it. The target must succeed on a 11 Wisdom saving throw, or for 1 minute, the target can't take reactions and must roll a d6 at the start of each of its turns to determine its behavior during the turn:\n1–4. The target takes no action or bonus action and uses all of its movement to move in a random direction.\n5–6. The target doesn't move, and the only thing it can do on its turn is make a 11 Wisdom saving throw, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The dragon's innate spellcasting ability is Charisma (spell save 13). It can innately cast a number of spells, requiring no material components:", + { + "1/day each": "color spray, dancing lights, hallucinatory terrain, mage hand, major image, minor illusion, mirror image, suggestion" + } + ], + "spellsNotes": "" + } + ], + [ + "Faerie Dragon (Orange)", + { + "image": null, + "bestiary": true, + "name": "Faerie Dragon (Orange)", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Tiny", + "alignment": "chaotic good", + "hp": 14, + "hit_dice": "4d4 + 4", + "ac": 15, + "speed": "10 ft., fly 60 ft.", + "stats": [ + 3, + 20, + 13, + 14, + 12, + 16 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "arcana": "4" + }, + { + "perception": "3" + }, + { + "stealth": "7" + } + ], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "Draconic, Sylvan", + "cr": "1", + "traits": [ + { + "name": "The Colors of Age", + "desc": "A faerie dragon's scales change hue as it ages, moving through all the colors of the rainbow. All faerie dragons have innate spellcasting ability, gaining new spells as they mature.\nRed—5 years or less\nOrange—6–10 years\nYellow—11–20 years\nGreen—21–30 years\nBlue—31–40 years\nIndigo—41–50 years\nViolet—51 years or more\nA green or older faerie dragon's CR increases to 2." + }, + { + "name": "Superior Invisibility", + "desc": "As a bonus action, the dragon can magically turn invisible until its {@status concentration} ends (as if {@status concentration||concentrating} on a spell). Any equipment the dragon wears or carries is invisible with it." + }, + { + "name": "Limited Telepathy", + "desc": "Using telepathy, the dragon can magically communicate with any other faerie dragon within 60 feet of it." + }, + { + "name": "Magic Resistance", + "desc": "The faerie dragon has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one creature. 1 piercing damage." + }, + { + "name": "Euphoria Breath (Recharge 5-6)", + "desc": "The dragon exhales a puff of euphoria gas at one creature within 5 feet of it. The target must succeed on a 11 Wisdom saving throw, or for 1 minute, the target can't take reactions and must roll a d6 at the start of each of its turns to determine its behavior during the turn:\n1–4. The target takes no action or bonus action and uses all of its movement to move in a random direction.\n5–6. The target doesn't move, and the only thing it can do on its turn is make a 11 Wisdom saving throw, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The dragon's innate spellcasting ability is Charisma (spell save 13). It can innately cast a number of spells, requiring no material components:", + { + "1/day each": "color spray, dancing lights, mage hand, minor illusion" + } + ], + "spellsNotes": "" + } + ], + [ + "Faerie Dragon (Red)", + { + "image": null, + "bestiary": true, + "name": "Faerie Dragon (Red)", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Tiny", + "alignment": "chaotic good", + "hp": 14, + "hit_dice": "4d4 + 4", + "ac": 15, + "speed": "10 ft., fly 60 ft.", + "stats": [ + 3, + 20, + 13, + 14, + 12, + 16 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "arcana": "4" + }, + { + "perception": "3" + }, + { + "stealth": "7" + } + ], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "Draconic, Sylvan", + "cr": "1", + "traits": [ + { + "name": "The Colors of Age", + "desc": "A faerie dragon's scales change hue as it ages, moving through all the colors of the rainbow. All faerie dragons have innate spellcasting ability, gaining new spells as they mature.\nRed—5 years or less\nOrange—6–10 years\nYellow—11–20 years\nGreen—21–30 years\nBlue—31–40 years\nIndigo—41–50 years\nViolet—51 years or more\nA green or older faerie dragon's CR increases to 2." + }, + { + "name": "Superior Invisibility", + "desc": "As a bonus action, the dragon can magically turn invisible until its {@status concentration} ends (as if {@status concentration||concentrating} on a spell). Any equipment the dragon wears or carries is invisible with it." + }, + { + "name": "Limited Telepathy", + "desc": "Using telepathy, the dragon can magically communicate with any other faerie dragon within 60 feet of it." + }, + { + "name": "Magic Resistance", + "desc": "The faerie dragon has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one creature. 1 piercing damage." + }, + { + "name": "Euphoria Breath (Recharge 5-6)", + "desc": "The dragon exhales a puff of euphoria gas at one creature within 5 feet of it. The target must succeed on a 11 Wisdom saving throw, or for 1 minute, the target can't take reactions and must roll a d6 at the start of each of its turns to determine its behavior during the turn:\n1–4. The target takes no action or bonus action and uses all of its movement to move in a random direction.\n5–6. The target doesn't move, and the only thing it can do on its turn is make a 11 Wisdom saving throw, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The dragon's innate spellcasting ability is Charisma (spell save 13). It can innately cast a number of spells, requiring no material components:", + { + "1/day each": "dancing lights, mage hand, minor illusion" + } + ], + "spellsNotes": "" + } + ], + [ + "Faerie Dragon (Violet)", + { + "image": null, + "bestiary": true, + "name": "Faerie Dragon (Violet)", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Tiny", + "alignment": "chaotic good", + "hp": 14, + "hit_dice": "4d4 + 4", + "ac": 15, + "speed": "10 ft., fly 60 ft.", + "stats": [ + 3, + 20, + 13, + 14, + 12, + 16 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "arcana": "4" + }, + { + "perception": "3" + }, + { + "stealth": "7" + } + ], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "Draconic, Sylvan", + "cr": "2", + "traits": [ + { + "name": "The Colors of Age", + "desc": "A faerie dragon's scales change hue as it ages, moving through all the colors of the rainbow. All faerie dragons have innate spellcasting ability, gaining new spells as they mature.\nRed—5 years or less\nOrange—6–10 years\nYellow—11–20 years\nGreen—21–30 years\nBlue—31–40 years\nIndigo—41–50 years\nViolet—51 years or more\nA green or older faerie dragon's CR increases to 2." + }, + { + "name": "Superior Invisibility", + "desc": "As a bonus action, the dragon can magically turn invisible until its {@status concentration} ends (as if {@status concentration||concentrating} on a spell). Any equipment the dragon wears or carries is invisible with it." + }, + { + "name": "Limited Telepathy", + "desc": "Using telepathy, the dragon can magically communicate with any other faerie dragon within 60 feet of it." + }, + { + "name": "Magic Resistance", + "desc": "The faerie dragon has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one creature. 1 piercing damage." + }, + { + "name": "Euphoria Breath (Recharge 5-6)", + "desc": "The dragon exhales a puff of euphoria gas at one creature within 5 feet of it. The target must succeed on a 11 Wisdom saving throw, or for 1 minute, the target can't take reactions and must roll a d6 at the start of each of its turns to determine its behavior during the turn:\n1–4. The target takes no action or bonus action and uses all of its movement to move in a random direction.\n5–6. The target doesn't move, and the only thing it can do on its turn is make a 11 Wisdom saving throw, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The dragon's innate spellcasting ability is Charisma (spell save 13). It can innately cast a number of spells, requiring no material components:", + { + "1/day each": "color spray, dancing lights, hallucinatory terrain, mage hand, major image, minor illusion, mirror image, polymorph, suggestion" + } + ], + "spellsNotes": "" + } + ], + [ + "Faerie Dragon (Yellow)", + { + "image": null, + "bestiary": true, + "name": "Faerie Dragon (Yellow)", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Tiny", + "alignment": "chaotic good", + "hp": 14, + "hit_dice": "4d4 + 4", + "ac": 15, + "speed": "10 ft., fly 60 ft.", + "stats": [ + 3, + 20, + 13, + 14, + 12, + 16 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "arcana": "4" + }, + { + "perception": "3" + }, + { + "stealth": "7" + } + ], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "Draconic, Sylvan", + "cr": "1", + "traits": [ + { + "name": "The Colors of Age", + "desc": "A faerie dragon's scales change hue as it ages, moving through all the colors of the rainbow. All faerie dragons have innate spellcasting ability, gaining new spells as they mature.\nRed—5 years or less\nOrange—6–10 years\nYellow—11–20 years\nGreen—21–30 years\nBlue—31–40 years\nIndigo—41–50 years\nViolet—51 years or more\nA green or older faerie dragon's CR increases to 2." + }, + { + "name": "Superior Invisibility", + "desc": "As a bonus action, the dragon can magically turn invisible until its {@status concentration} ends (as if {@status concentration||concentrating} on a spell). Any equipment the dragon wears or carries is invisible with it." + }, + { + "name": "Limited Telepathy", + "desc": "Using telepathy, the dragon can magically communicate with any other faerie dragon within 60 feet of it." + }, + { + "name": "Magic Resistance", + "desc": "The faerie dragon has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one creature. 1 piercing damage." + }, + { + "name": "Euphoria Breath (Recharge 5-6)", + "desc": "The dragon exhales a puff of euphoria gas at one creature within 5 feet of it. The target must succeed on a 11 Wisdom saving throw, or for 1 minute, the target can't take reactions and must roll a d6 at the start of each of its turns to determine its behavior during the turn:\n1–4. The target takes no action or bonus action and uses all of its movement to move in a random direction.\n5–6. The target doesn't move, and the only thing it can do on its turn is make a 11 Wisdom saving throw, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The dragon's innate spellcasting ability is Charisma (spell save 13). It can innately cast a number of spells, requiring no material components:", + { + "1/day each": "color spray, dancing lights, mage hand, minor illusion, mirror image" + } + ], + "spellsNotes": "" + } + ], + [ + "Fire Elemental", + { + "image": null, + "bestiary": true, + "name": "Fire Elemental", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Large", + "alignment": "neutral", + "hp": 102, + "hit_dice": "12d10 + 36", + "ac": 13, + "speed": "50 ft.", + "stats": [ + 10, + 17, + 16, + 6, + 10, + 7 + ], + "damage_immunities": "fire, poison", + "damage_resistances": "bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "exhaustion, grappled, paralyzed, petrified, poisoned, prone, restrained, unconscious", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Ignan", + "cr": "5", + "traits": [ + { + "name": "Fire Form", + "desc": "The elemental can move through a space as narrow as 1 inch wide without squeezing. A creature that touches the elemental or hits it with a melee attack while within 5 feet of it takes 5 (1d10) fire damage. In addition, the elemental can enter a hostile creature's space and stop there. The first time it enters a creature's space on a turn, that creature takes 5 (1d10) fire damage and catches fire; until someone takes an action to douse the fire, the creature takes 5 (1d10) fire damage at the start of each of its turns." + }, + { + "name": "Illumination", + "desc": "The elemental sheds bright light in a 30-foot radius and dim light in an additional 30 feet." + }, + { + "name": "Water Susceptibility", + "desc": "For every 5 feet the elemental moves in water, or for every gallon of water splashed on it, it takes 1 cold damage." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The elemental makes two touch attacks." + }, + { + "name": "Touch", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 10 (2d6 + 3) fire damage. If the target is a creature or a flammable object, it ignites. Until a creature takes an action to douse the fire, the target takes 5 (1d10) fire damage at the start of each of its turns." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Fire Giant", + { + "image": null, + "bestiary": true, + "name": "Fire Giant", + "source": [ + "Monster Manual" + ], + "type": "giant", + "size": "Huge", + "alignment": "lawful evil", + "hp": 162, + "hit_dice": "13d12 + 78", + "ac": "18 (plate armor)", + "speed": "30 ft.", + "stats": [ + 25, + 9, + 23, + 10, + 14, + 13 + ], + "damage_immunities": "fire", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "3" + }, + { + "constitution": "10" + }, + { + "charisma": "5" + } + ], + "skillsaves": [ + { + "athletics": "11" + }, + { + "perception": "6" + } + ], + "senses": "passive Perception 16", + "languages": "Giant", + "cr": "9", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The giant makes two greatsword attacks." + }, + { + "name": "Greatsword", + "desc": "Melee Weapon Attack +11 to hit, reach 10 ft., one target. 28 (6d6 + 7) slashing damage." + }, + { + "name": "Rock", + "desc": "Ranged Weapon Attack +11 to hit, range 60/240 ft., one target. 29 (4d10 + 7) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Fire Snake", + { + "image": null, + "bestiary": true, + "name": "Fire Snake", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Medium", + "alignment": "neutral evil", + "hp": 22, + "hit_dice": "5d8", + "ac": "14 (natural armor)", + "speed": "30 ft.", + "stats": [ + 12, + 14, + 11, + 7, + 10, + 8 + ], + "damage_immunities": "fire", + "damage_resistances": "bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "cold", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "understands Ignan but can't speak", + "cr": "1", + "traits": [ + { + "name": "Heated Body", + "desc": "A creature that touches the snake or hits it with a melee attack while within 5 feet of it takes 3 (1d6) fire damage." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The snake makes two attacks: one with its bite and one with its tail." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 3 (1d4 + 1) piercing damage plus 3 (1d6) fire damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 3 (1d4 + 1) bludgeoning damage plus 3 (1d6) fire damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Flameskull", + { + "image": null, + "bestiary": true, + "name": "Flameskull", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Tiny", + "alignment": "neutral evil", + "hp": 40, + "hit_dice": "9d4 + 18", + "ac": 13, + "speed": "0 ft., fly 40 ft. (hover)", + "stats": [ + 1, + 17, + 14, + 16, + 10, + 11 + ], + "damage_immunities": "cold, fire, poison", + "damage_resistances": "lightning, necrotic, piercing", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, frightened, paralyzed, poisoned, prone", + "saves": [], + "skillsaves": [ + { + "arcana": "5" + }, + { + "perception": "2" + } + ], + "senses": "darkvision 60 ft., passive Perception 12", + "languages": "Common", + "cr": "4", + "traits": [ + { + "name": "Illumination", + "desc": "The flameskull sheds either dim light in a 15-foot radius, or bright light in a 15-foot radius and dim light for an additional 15 feet. It can switch between the options as an action." + }, + { + "name": "Magic Resistance", + "desc": "The flameskull has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Rejuvenation", + "desc": "If the flameskull is destroyed, it regains all its hit points in 1 hour unless Holy Water (Flask) spell is cast on them." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The flameskull uses Fire Ray twice." + }, + { + "name": "Fire Ray", + "desc": "Ranged Spell Attack +5 to hit, range 30 ft., one target. 10 (3d6) fire damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The flameskull is a 5th-level spellcaster. Its spellcasting ability is Intelligence (spell save 13, +5 to hit with spell attacks). It requires no somatic or material components to cast its spells. The flameskull has the following wizard spells prepared:", + { + "Cantrips (at will)": "mage hand" + }, + { + "1st level (3 slots)": "magic missile, shield" + }, + { + "2nd level (2 slots)": "blur, flaming sphere" + }, + { + "3rd level (1 slots)": "fireball" + } + ], + "spellsNotes": "" + } + ], + [ + "Flesh Golem", + { + "image": null, + "bestiary": true, + "name": "Flesh Golem", + "source": [ + "Monster Manual" + ], + "type": "construct", + "size": "Medium", + "alignment": "neutral", + "hp": 93, + "hit_dice": "11d8 + 44", + "ac": 9, + "speed": "30 ft.", + "stats": [ + 19, + 9, + 18, + 6, + 10, + 5 + ], + "damage_immunities": "lightning, poison, bludgeoning, piercing, slashing from nonmagical attacks that aren't adamantine", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, frightened, paralyzed, petrified, poisoned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "understands the languages of its creator but can't speak", + "cr": "5", + "traits": [ + { + "name": "Berserk", + "desc": "Whenever the golem starts its turn with 40 hit points or fewer, roll a d6. On a 6, the golem goes berserk. On each of its turns while berserk, the golem attacks the nearest creature it can see. If no creature is near enough to move to and attack, the golem attacks an object, with preference for an object smaller than itself. Once the golem goes berserk, it continues to do so until it is destroyed or regains all its hit points.\nThe golem's creator, if within 60 feet of the berserk golem, can try to calm it by speaking firmly and persuasively. The golem must be able to hear its creator, who must take an action to make a 15 Charisma (Persuasion) check. If the check succeeds, the golem ceases being berserk. If it takes damage while still at 40 hit points or fewer, the golem might go berserk again." + }, + { + "name": "Aversion of Fire", + "desc": "If the golem takes fire damage, it has disadvantage on attack rolls and ability checks until the end of its next turn." + }, + { + "name": "Immutable Form", + "desc": "The golem is immune to any spell or effect that would alter its form." + }, + { + "name": "Lightning Absorption", + "desc": "Whenever the golem is subjected to lightning damage, it takes no damage and instead regains a number of hit points equal to the lightning damage dealt." + }, + { + "name": "Magic Resistance", + "desc": "The golem has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Magic Weapons", + "desc": "The golem's weapon attacks are magical." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The golem makes two slam attacks." + }, + { + "name": "Slam", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 13 (2d8 + 4) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Flumph", + { + "image": null, + "bestiary": true, + "name": "Flumph", + "source": [ + "Monster Manual" + ], + "type": "aberration", + "size": "Small", + "alignment": "lawful good", + "hp": 7, + "hit_dice": "2d6", + "ac": 12, + "speed": "5 ft., fly 30 ft.", + "stats": [ + 6, + 15, + 10, + 14, + 14, + 11 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "psychic", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "arcana": "4" + }, + { + "history": "4" + }, + { + "religion": "4" + } + ], + "senses": "darkvision 60 ft., passive Perception 12", + "languages": "understands Undercommon but can't speak, telepathy 60 ft.", + "cr": "1/8", + "traits": [ + { + "name": "Advanced Telepathy", + "desc": "The flumph can perceive the content of any telepathic communication used within 60 feet of it, and it can't be {@status surprised} by creatures with any form of telepathy." + }, + { + "name": "Prone Deficiency", + "desc": "If the flumph is knocked prone, roll a die. On an odd result, the flumph lands upside-down and is incapacitated. At the end of each of its turns, the flumph can make a 10 Dexterity saving throw, righting itself and ending the incapacitated condition if it succeeds." + }, + { + "name": "Telepathic Shroud", + "desc": "The flumph is immune to any effect that would sense its emotions or read its thoughts, as well as all divination spells." + } + ], + "actions": [ + { + "name": "Tendrils", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 4 (1d4 + 2) piercing damage plus 2 (1d4) acid damage. At the end of each of its turns, the target must make a 10 Constitution saving throw, taking 2 (1d4) acid damage on a failure or ending the recurring acid damage on a success. A lesser restoration spell cast on the target also ends the recurring acid damage." + }, + { + "name": "Stench Spray (1/Day)", + "desc": "Each creature in a 15-foot cone originating from the flumph must succeed on a 10 Dexterity saving throw or be coated in a foul-smelling liquid. A coated creature exudes a horrible stench for 1d4 hours. The coated creature is poisoned as long as the stench lasts, and other creatures are poisoned while with in 5 feet of the coated creature. A creature can remove the stench on itself by using a short rest to bathe in water, alcohol, or vinegar." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Flying Snake", + { + "image": null, + "bestiary": true, + "name": "Flying Snake", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Tiny", + "alignment": "unaligned", + "hp": 5, + "hit_dice": "2d4", + "ac": 14, + "speed": "30 ft., fly 60 ft., swim 30 ft.", + "stats": [ + 4, + 18, + 11, + 2, + 12, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "blindsight 10 ft., passive Perception 11", + "languages": "", + "cr": "1/8", + "traits": [ + { + "name": "Flyby", + "desc": "The snake doesn't provoke opportunity attacks when it flies out of an enemy's reach." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 1 piercing damage plus 7 (3d4) poison damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Flying Sword", + { + "image": null, + "bestiary": true, + "name": "Flying Sword", + "source": [ + "Monster Manual" + ], + "type": "construct", + "size": "Small", + "alignment": "unaligned", + "hp": 17, + "hit_dice": "5d6", + "ac": "17 (natural armor)", + "speed": "0 ft., fly 50 ft. (hover)", + "stats": [ + 12, + 15, + 11, + 1, + 5, + 1 + ], + "damage_immunities": "poison, psychic", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "blinded, charmed, deafened, frightened, paralyzed, petrified, poisoned", + "saves": [ + { + "dexterity": "4" + } + ], + "skillsaves": [], + "senses": "blindsight 60 ft. (blind beyond this radius), passive Perception 7", + "languages": "", + "cr": "1/4", + "traits": [ + { + "name": "Antimagic Susceptibility", + "desc": "The sword is incapacitated while in the area of an antimagic field. If targeted by dispel magic, the sword must succeed on a Constitution saving throw against the caster's spell save DC or fall unconscious for 1 minute." + }, + { + "name": "False Appearance", + "desc": "While the sword remains motionless and isn't flying, it is indistinguishable from a normal sword." + } + ], + "actions": [ + { + "name": "Longsword", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 5 (1d8 + 1) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Fomorian", + { + "image": null, + "bestiary": true, + "name": "Fomorian", + "source": [ + "Monster Manual" + ], + "type": "giant", + "size": "Huge", + "alignment": "chaotic evil", + "hp": 149, + "hit_dice": "13d12 + 65", + "ac": "14 (natural armor)", + "speed": "30 ft.", + "stats": [ + 23, + 10, + 20, + 9, + 14, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "8" + }, + { + "stealth": "3" + } + ], + "senses": "darkvision 120 ft., passive Perception 18", + "languages": "Giant, Undercommon", + "cr": "8", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The fomorian attacks twice with its greatclub or makes one greatclub attack and uses Evil Eye once." + }, + { + "name": "Greatclub", + "desc": "Melee Weapon Attack +9 to hit, reach 15 ft., one target. 19 (3d8 + 6) bludgeoning damage." + }, + { + "name": "Evil Eye", + "desc": "The fomorian magically forces a creature it can see within 60 feet of it to make a 14 Charisma saving throw. The creature takes 27 (6d8) psychic damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Curse of the Evil Eye (Recharges after a Short or Long Rest)", + "desc": "With a stare, the fomorian uses Evil Eye, but on a failed save, the creature is also cursed with magical deformities. While deformed, the creature has its speed halved and has disadvantage on ability checks, saving throws, and attacks based on Strength or Dexterity.\nThe transformed creature can repeat the saving throw whenever it finishes a long rest, ending the effect on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Frog", + { + "image": null, + "bestiary": true, + "name": "Frog", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Tiny", + "alignment": "unaligned", + "hp": 1, + "hit_dice": "1d4 - 1", + "ac": 11, + "speed": "20 ft., swim 20 ft.", + "stats": [ + 1, + 13, + 8, + 1, + 8, + 3 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "1" + }, + { + "stealth": "3" + } + ], + "senses": "darkvision 30 ft., passive Perception 11", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Amphibious", + "desc": "The frog can breathe air and water." + }, + { + "name": "Standing Leap", + "desc": "The frog's long jump is up to 10 feet and its high jump is up to 5 feet, with or without a running start." + } + ], + "actions": [], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Frost Giant", + { + "image": null, + "bestiary": true, + "name": "Frost Giant", + "source": [ + "Monster Manual" + ], + "type": "giant", + "size": "Huge", + "alignment": "neutral evil", + "hp": 138, + "hit_dice": "12d12 + 60", + "ac": "15 (patchwork armor)", + "speed": "40 ft.", + "stats": [ + 23, + 9, + 21, + 9, + 10, + 12 + ], + "damage_immunities": "cold", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "constitution": "8" + }, + { + "wisdom": "3" + }, + { + "charisma": "4" + } + ], + "skillsaves": [ + { + "athletics": "9" + }, + { + "perception": "3" + } + ], + "senses": "passive Perception 13", + "languages": "Giant", + "cr": "8", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The giant makes two greataxe attacks." + }, + { + "name": "Greataxe", + "desc": "Melee Weapon Attack +9 to hit, reach 10 ft., one target. 25 (3d12 + 6) slashing damage." + }, + { + "name": "Rock", + "desc": "Ranged Weapon Attack +9 to hit, range 60/240 ft., one target. 28 (4d10 + 6) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Galeb Duhr", + { + "image": null, + "bestiary": true, + "name": "Galeb Duhr", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Medium", + "alignment": "neutral", + "hp": 85, + "hit_dice": "9d8 + 45", + "ac": "16 (natural armor)", + "speed": "15 ft. (30 ft. when rolling, 60 ft. rolling downhill)", + "stats": [ + 20, + 14, + 20, + 11, + 12, + 11 + ], + "damage_immunities": "poison", + "damage_resistances": "bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "exhaustion, paralyzed, petrified, poisoned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., tremorsense 60 ft., passive Perception 11", + "languages": "Terran", + "cr": "6", + "traits": [ + { + "name": "False Appearance", + "desc": "While the galeb duhr remains motionless, it is indistinguishable from a normal boulder." + }, + { + "name": "Rolling Charge", + "desc": "If the galeb duhr rolls at least 20 feet straight toward a target and then hits it with a slam attack on the same turn, the target takes an extra 7 (2d6) bludgeoning damage. If the target is a creature, it must succeed on a 16 Strength saving throw or be knocked prone." + } + ], + "actions": [ + { + "name": "Slam", + "desc": "Melee Weapon Attack +8 to hit, reach 5 ft., one target. 12 (2d6 + 5) bludgeoning damage." + }, + { + "name": "Animate Boulders (1/Day)", + "desc": "The galeb duhr magically animates up to two boulders it can see within 60 feet of it. A boulder has statistics like those of a galeb duhr, except it has Intelligence 1 and Charisma 1, it can't be charmed or frightened, and it lacks this action option. A boulder remains animated as long as the galeb duhr maintains {@status concentration}, up to 1 minute (as if {@status concentration||concentrating} on a spell)." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Gargoyle", + { + "image": null, + "bestiary": true, + "name": "Gargoyle", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 52, + "hit_dice": "7d8 + 21", + "ac": "15 (natural armor)", + "speed": "30 ft., fly 60 ft.", + "stats": [ + 15, + 11, + 16, + 6, + 11, + 7 + ], + "damage_immunities": "poison", + "damage_resistances": "bludgeoning, piercing, slashing from nonmagical attacks that aren't adamantine", + "damage_vulnerabilities": "", + "condition_immunities": "exhaustion, petrified, poisoned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Terran", + "cr": "2", + "traits": [ + { + "name": "False Appearance", + "desc": "While the gargoyle remains motionless, it is indistinguishable from an inanimate statue." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The gargoyle makes two attacks: one with its bite and one with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d6 + 2) piercing damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d6 + 2) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Gas Spore", + { + "image": null, + "bestiary": true, + "name": "Gas Spore", + "source": [ + "Monster Manual" + ], + "type": "plant", + "size": "Large", + "alignment": "unaligned", + "hp": 1, + "hit_dice": "1d10 - 4", + "ac": 5, + "speed": "0 ft., fly 10 ft. (hover)", + "stats": [ + 5, + 1, + 3, + 1, + 1, + 1 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "blinded, deafened, frightened, paralyzed, poisoned, prone", + "saves": [], + "skillsaves": [], + "senses": "blindsight 30 ft. (blind beyond this radius), passive Perception 5", + "languages": "", + "cr": "1/2", + "traits": [ + { + "name": "Death Burst", + "desc": "The gas spore explodes when it drops to 0 hit points. Each creature within 20 feet of it must succeed on a 15 Constitution saving throw or take 10 (3d6) poison damage and become infected with a disease on a failed save. Creatures immune to the poisoned condition are immune to this disease.\nSpores invade an infected creature's system, killing the creature in a number of hours equal to 1d12 + the creature's Constitution score, unless the disease is removed. In half that time, the creature becomes poisoned for the rest of the duration. After the creature dies, it sprouts 2d4 Tiny gas spores that grow to full size in 7 days." + }, + { + "name": "Eerie Resemblance", + "desc": "The gas spore resembles a beholder. A creature that can see the gas spore can discern its true nature with a successful 15 Intelligence (Nature) check." + } + ], + "actions": [ + { + "name": "Touch", + "desc": "Melee Weapon Attack +0 to hit, reach 5 ft., one creature. 1 poison damage, and the creature must succeed on a 10 Constitution saving throw or become infected with the disease described in the Death Burst trait." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Gelatinous Cube", + { + "image": null, + "bestiary": true, + "name": "Gelatinous Cube", + "source": [ + "Monster Manual" + ], + "type": "ooze", + "size": "Large", + "alignment": "unaligned", + "hp": 84, + "hit_dice": "8d10 + 40", + "ac": 6, + "speed": "15 ft.", + "stats": [ + 14, + 3, + 20, + 1, + 6, + 1 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "blinded, charmed, deafened, exhaustion, frightened, prone", + "saves": [], + "skillsaves": [], + "senses": "blindsight 60 ft. (blind beyond this radius), passive Perception 8", + "languages": "", + "cr": "2", + "traits": [ + { + "name": "Ooze Cube", + "desc": "The cube takes up its entire space. Other creatures can enter the space, but a creature that does so is subjected to the cube's Engulf and has disadvantage on the saving throw.\nCreatures inside the cube can be seen but have Cover.\nA creature within 5 feet of the cube can take an action to pull a creature or object out of the cube. Doing so requires a successful 12 Strength check, and the creature making the attempt takes 10 (3d6) acid damage.\nThe cube can hold only one Large creature or up to four Medium or smaller creatures inside it at a time." + }, + { + "name": "Transparent", + "desc": "Even when the cube is in plain sight, it takes a successful 15 Wisdom (Perception) check to spot a cube that has neither moved nor attacked. A creature that tries to enter the cube's space while unaware of the cube is {@status surprised} by the cube." + } + ], + "actions": [ + { + "name": "Pseudopod", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 10 (3d6) acid damage." + }, + { + "name": "Engulf", + "desc": "The cube moves up to its speed. While doing so, it can enter Large or smaller creatures' spaces. Whenever the cube enters a creature's space, the creature must make a 12 Dexterity saving throw.\nOn a successful save, the creature can choose to be pushed 5 feet back or to the side of the cube. A creature that chooses not to be pushed suffers the consequences of a failed saving throw.\nOn a failed save, the cube enters the creature's space, and the creature takes 10 (3d6) acid damage and is engulfed. The engulfed creature can't breathe, is restrained, and takes 21 (6d6) acid damage at the start of each of the cube's turns. When the cube moves, the engulfed creature moves with it.\nAn engulfed creature can try to escape by taking an action to make a 12 Strength check. On a success, the creature escapes and enters a space of its choice within 5 feet of the cube." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ghast", + { + "image": null, + "bestiary": true, + "name": "Ghast", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 36, + "hit_dice": "8d8", + "ac": 13, + "speed": "30 ft.", + "stats": [ + 16, + 17, + 10, + 11, + 10, + 8 + ], + "damage_immunities": "poison", + "damage_resistances": "necrotic", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, poisoned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Common", + "cr": "2", + "traits": [ + { + "name": "Stench", + "desc": "Any creature that starts its turn within 5 feet of the ghast must succeed on a 10 Constitution saving throw or be poisoned until the start of its next turn. On a successful saving throw, the creature is immune to the ghast's Stench for 24 hours." + }, + { + "name": "Turn Defiance", + "desc": "The ghast and any ghouls within 30 feet of it have advantage on saving throws against effects that turn undead." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one creature. 12 (2d8 + 3) piercing damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 10 (2d6 + 3) slashing damage. If the target is a creature other than an undead, it must succeed on a 10 Constitution saving throw or be paralyzed for 1 minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ghost", + { + "image": null, + "bestiary": true, + "name": "Ghost", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Medium", + "alignment": "any alignment", + "hp": 45, + "hit_dice": "10d8", + "ac": 11, + "speed": "0 ft., fly 40 ft. (hover)", + "stats": [ + 7, + 13, + 10, + 10, + 12, + 17 + ], + "damage_immunities": "cold, necrotic, poison", + "damage_resistances": "acid, fire, lightning, thunder, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, frightened, grappled, paralyzed, petrified, poisoned, prone, restrained", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 11", + "languages": "any languages it knew in life", + "cr": "4", + "traits": [ + { + "name": "Ethereal Sight", + "desc": "The ghost can see 60 feet into the Ethereal Plane when it is on the Material Plane, and vice versa." + }, + { + "name": "Incorporeal Movement", + "desc": "The ghost can move through other creatures and objects as if they were difficult terrain. It takes 5 (1d10) force damage if it ends its turn inside an object." + } + ], + "actions": [ + { + "name": "Withering Touch", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 17 (4d6 + 3) necrotic damage." + }, + { + "name": "Etherealness", + "desc": "The ghost enters the Ethereal Plane from the Material Plane, or vice versa. It is visible on the Material Plane while it is in the Border Ethereal, and vice versa, yet it can't affect or be affected by anything on the other plane." + }, + { + "name": "Horrifying Visage", + "desc": "Each non-undead creature within 60 feet of the ghost that can see it must succeed on a 13 Wisdom saving throw or be frightened for 1 minute. If the save fails by 5 or more, the target also ages 1d4 × 10 years. A frightened target can repeat the saving throw at the end of each of its turns, ending the frightened condition on itself on a success. If a target's saving throw is successful or the effect ends for it, the target is immune to this ghost's Horrifying Visage for the next 24 hours. The aging effect can be reversed with a greater restoration spell, but only within 24 hours of it occurring." + }, + { + "name": "Possession (Recharge 6)", + "desc": "One humanoid that the ghost can see within 5 feet of it must succeed on a 13 Charisma saving throw or be possessed by the ghost; the ghost then disappears, and the target is incapacitated and loses control of its body. The ghost now controls the body but doesn't deprive the target of awareness. The ghost can't be targeted by any attack, spell, or other effect, except ones that turn undead, and it retains its alignment, Intelligence, Wisdom, Charisma, and immunity to being charmed and frightened. It otherwise uses the possessed target's statistics, but doesn't gain access to the target's knowledge, class features, or proficiencies.\nThe possession lasts until the body drops to 0 hit points, the ghost ends it as a bonus action, or the ghost is turned or forced out by an effect like the dispel evil and good spell. When the possession ends, the ghost reappears in an unoccupied space within 5 feet of the body. The target is immune to this ghost's Possession for 24 hours after succeeding on the saving throw or after the possession ends." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ghoul", + { + "image": null, + "bestiary": true, + "name": "Ghoul", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 22, + "hit_dice": "5d8", + "ac": 12, + "speed": "30 ft.", + "stats": [ + 13, + 15, + 10, + 7, + 10, + 6 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, poisoned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Common", + "cr": "1", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one creature. 9 (2d6 + 2) piercing damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 7 (2d4 + 2) slashing damage. If the target is a creature other than an elf or undead, it must succeed on a 10 Constitution saving throw or be paralyzed for 1 minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Ape", + { + "image": null, + "bestiary": true, + "name": "Giant Ape", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Huge", + "alignment": "unaligned", + "hp": 157, + "hit_dice": "15d12 + 60", + "ac": 12, + "speed": "40 ft., climb 40 ft.", + "stats": [ + 23, + 14, + 18, + 7, + 12, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "athletics": "9" + }, + { + "perception": "4" + } + ], + "senses": "passive Perception 14", + "languages": "", + "cr": "7", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The ape makes two fist attacks." + }, + { + "name": "Fist", + "desc": "Melee Weapon Attack +9 to hit, reach 10 ft., one target. 22 (3d10 + 6) bludgeoning damage." + }, + { + "name": "Rock", + "desc": "Ranged Weapon Attack +9 to hit, range 50/100 ft., one target. 30 (7d6 + 6) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Badger", + { + "image": null, + "bestiary": true, + "name": "Giant Badger", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 13, + "hit_dice": "2d8 + 4", + "ac": 10, + "speed": "30 ft., burrow 10 ft.", + "stats": [ + 13, + 10, + 15, + 2, + 12, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 30 ft., passive Perception 11", + "languages": "", + "cr": "1/4", + "traits": [ + { + "name": "Keen Smell", + "desc": "The badger has advantage on Wisdom (Perception) checks that rely on smell." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The badger makes two attacks: one with its bite and one with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 4 (1d6 + 1) piercing damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 6 (2d4 + 1) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Bat", + { + "image": null, + "bestiary": true, + "name": "Giant Bat", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 22, + "hit_dice": "4d10", + "ac": 13, + "speed": "10 ft., fly 60 ft.", + "stats": [ + 15, + 16, + 11, + 2, + 12, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "blindsight 60 ft., passive Perception 11", + "languages": "", + "cr": "1/4", + "traits": [ + { + "name": "Echolocation", + "desc": "The bat can't use its blindsight while deafened." + }, + { + "name": "Keen Hearing", + "desc": "The bat has advantage on Wisdom (Perception) checks that rely on hearing." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 5 (1d6 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Boar", + { + "image": null, + "bestiary": true, + "name": "Giant Boar", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 42, + "hit_dice": "5d10 + 15", + "ac": "12 (natural armor)", + "speed": "40 ft.", + "stats": [ + 17, + 10, + 16, + 2, + 7, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 8", + "languages": "", + "cr": "2", + "traits": [ + { + "name": "Charge", + "desc": "If the boar moves at least 20 feet straight toward a target and then hits it with a tusk attack on the same turn, the target takes an extra 7 (2d6) slashing damage. If the target is a creature, it must succeed on a 13 Strength saving throw or be knocked prone." + }, + { + "name": "Relentless (Recharges after a Short or Long Rest)", + "desc": "If the boar takes 10 damage or less that would reduce it to 0 hit points, it is reduced to 1 hit point instead." + } + ], + "actions": [ + { + "name": "Tusk", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 10 (2d6 + 3) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Centipede", + { + "image": null, + "bestiary": true, + "name": "Giant Centipede", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Small", + "alignment": "unaligned", + "hp": 4, + "hit_dice": "1d6 + 1", + "ac": "13 (natural armor)", + "speed": "30 ft., climb 30 ft.", + "stats": [ + 5, + 14, + 12, + 1, + 7, + 3 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "blindsight 30 ft., passive Perception 8", + "languages": "", + "cr": "1/4", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 4 (1d4 + 2) piercing damage, and the target must succeed on a 11 Constitution saving throw or take 10 (3d6) poison damage. If the poison damage reduces the target to 0 hit points, the target is stable but poisoned for 1 hour, even after regaining hit points, and is paralyzed while poisoned in this way." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Constrictor Snake", + { + "image": null, + "bestiary": true, + "name": "Giant Constrictor Snake", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Huge", + "alignment": "unaligned", + "hp": 60, + "hit_dice": "8d12 + 8", + "ac": 12, + "speed": "30 ft., swim 30 ft.", + "stats": [ + 19, + 14, + 12, + 1, + 10, + 3 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "2" + } + ], + "senses": "blindsight 10 ft., passive Perception 12", + "languages": "", + "cr": "2", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 10 ft., one creature. 11 (2d6 + 4) piercing damage." + }, + { + "name": "Constrict", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one creature. 13 (2d8 + 4) bludgeoning damage, and the target is grappled (escape 16). Until this grapple ends, the creature is restrained, and the snake can't constrict another target." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Crab", + { + "image": null, + "bestiary": true, + "name": "Giant Crab", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 13, + "hit_dice": "3d8", + "ac": "15 (natural armor)", + "speed": "30 ft., swim 30 ft.", + "stats": [ + 13, + 15, + 11, + 1, + 9, + 3 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "stealth": "4" + } + ], + "senses": "blindsight 30 ft., passive Perception 9", + "languages": "", + "cr": "1/8", + "traits": [ + { + "name": "Amphibious", + "desc": "The crab can breathe air and water." + } + ], + "actions": [ + { + "name": "Claw", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 4 (1d6 + 1) bludgeoning damage, and the target is grappled (escape 11). The crab has two claws, each of which can grapple only one target." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Crocodile", + { + "image": null, + "bestiary": true, + "name": "Giant Crocodile", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Huge", + "alignment": "unaligned", + "hp": 85, + "hit_dice": "9d12 + 27", + "ac": "14 (natural armor)", + "speed": "30 ft., swim 50 ft.", + "stats": [ + 21, + 9, + 17, + 2, + 10, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "stealth": "5" + } + ], + "senses": "passive Perception 10", + "languages": "", + "cr": "5", + "traits": [ + { + "name": "Hold Breath", + "desc": "The crocodile can hold its breath for 30 minutes." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The crocodile makes two attacks: one with its bite and one with its tail." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +8 to hit, reach 5 ft., one target. 21 (3d10 + 5) piercing damage, and the target is grappled (escape 16). Until this grapple ends, the target is restrained, and the crocodile can't bite another target." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +8 to hit, reach 10 ft., one target not grappled by the crocodile. 14 (2d8 + 5) bludgeoning damage. If the target is a creature, it must succeed on a 16 Strength saving throw or be knocked prone." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Eagle", + { + "image": null, + "bestiary": true, + "name": "Giant Eagle", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "neutral good", + "hp": 26, + "hit_dice": "4d10 + 4", + "ac": 13, + "speed": "10 ft., fly 80 ft.", + "stats": [ + 16, + 17, + 13, + 8, + 14, + 10 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "4" + } + ], + "senses": "passive Perception 14", + "languages": "Giant Eagle, understands Common and Auran but can't speak them", + "cr": "1", + "traits": [ + { + "name": "Keen Sight", + "desc": "The eagle has advantage on Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The eagle makes two attacks: one with its beak and one with its talons." + }, + { + "name": "Beak", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) piercing damage." + }, + { + "name": "Talons", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 10 (2d6 + 3) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Elk", + { + "image": null, + "bestiary": true, + "name": "Giant Elk", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Huge", + "alignment": "unaligned", + "hp": 42, + "hit_dice": "5d12 + 10", + "ac": "14 (natural armor)", + "speed": "60 ft.", + "stats": [ + 19, + 16, + 14, + 7, + 14, + 10 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "4" + } + ], + "senses": "passive Perception 14", + "languages": "Giant Elk, understands Common, Elvish, Sylvan but can't speak them", + "cr": "2", + "traits": [ + { + "name": "Charge", + "desc": "If the elk moves at least 20 feet straight toward a target and then hits it with a ram attack on the same turn, the target takes an extra 7 (2d6) damage. If the target is a creature, it must succeed on a 14 Strength saving throw or be knocked prone." + } + ], + "actions": [ + { + "name": "Ram", + "desc": "Melee Weapon Attack +6 to hit, reach 10 ft., one target. 11 (2d6 + 4) bludgeoning damage." + }, + { + "name": "Hooves", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one prone creature. 22 (4d8 + 4) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Fire Beetle", + { + "image": null, + "bestiary": true, + "name": "Giant Fire Beetle", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Small", + "alignment": "unaligned", + "hp": 4, + "hit_dice": "1d6 + 1", + "ac": "13 (natural armor)", + "speed": "30 ft.", + "stats": [ + 8, + 10, + 12, + 1, + 7, + 3 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "blindsight 30 ft., passive Perception 8", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Illumination", + "desc": "The beetle sheds bright light in a 10-foot radius and dim light for an additional 10 ft.." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +1 to hit, reach 5 ft., one target. 2 (1d6 - 1) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Frog", + { + "image": null, + "bestiary": true, + "name": "Giant Frog", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 18, + "hit_dice": "4d8", + "ac": 11, + "speed": "30 ft., swim 30 ft.", + "stats": [ + 12, + 13, + 11, + 2, + 10, + 3 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "2" + }, + { + "stealth": "3" + } + ], + "senses": "darkvision 30 ft., passive Perception 12", + "languages": "", + "cr": "1/4", + "traits": [ + { + "name": "Amphibious", + "desc": "The frog can breathe air and water." + }, + { + "name": "Standing Leap", + "desc": "The frog's long jump is up to 20 feet and its high jump is up to 10 feet, with or without a running start." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 4 (1d6 + 1) piercing damage, and the target is grappled (escape 11). Until this grapple ends, the target is restrained, and the frog can't bite another target." + }, + { + "name": "Swallow", + "desc": "The frog makes one bite attack against a Small or smaller target it is grappling. If the attack hits, the target is swallowed, and the grapple ends. The swallowed target is blinded and restrained, it has Cover against attacks and other effects outside the frog, and it takes 5 (2d4) acid damage at the start of each of the frog's turns. The frog can have only one target swallowed at a time. If the frog dies, a swallowed creature is no longer restrained by it and can escape from the corpse using 5 feet of movement, exiting prone." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Goat", + { + "image": null, + "bestiary": true, + "name": "Giant Goat", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 19, + "hit_dice": "3d10 + 3", + "ac": "11 (natural armor)", + "speed": "40 ft.", + "stats": [ + 17, + 11, + 12, + 3, + 12, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 11", + "languages": "", + "cr": "1/2", + "traits": [ + { + "name": "Charge", + "desc": "If the goat moves at least 20 feet straight toward a target and then hits it with a ram attack on the same turn, the target takes an extra 5 (2d4) bludgeoning damage. If the target is a creature, it must succeed on a 13 Strength saving throw or be knocked prone." + }, + { + "name": "Sure-Footed", + "desc": "The goat has advantage on Strength and Dexterity saving throws made against effects that would knock it prone." + } + ], + "actions": [ + { + "name": "Ram", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 8 (2d4 + 3) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Hyena", + { + "image": null, + "bestiary": true, + "name": "Giant Hyena", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 45, + "hit_dice": "6d10 + 12", + "ac": 12, + "speed": "50 ft.", + "stats": [ + 16, + 14, + 14, + 2, + 12, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + } + ], + "senses": "passive Perception 13", + "languages": "", + "cr": "1", + "traits": [ + { + "name": "Rampage", + "desc": "When the hyena reduces a creature to 0 hit points with a melee attack on its turn, the hyena can take a bonus action to move up to half its speed and make a bite attack." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 10 (2d6 + 3) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Lizard", + { + "image": null, + "bestiary": true, + "name": "Giant Lizard", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 19, + "hit_dice": "3d10 + 3", + "ac": "12 (natural armor)", + "speed": "30 ft., climb 30 ft.", + "stats": [ + 15, + 12, + 13, + 2, + 10, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 30 ft., passive Perception 10", + "languages": "", + "cr": "1/4", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 6 (1d8 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Octopus", + { + "image": null, + "bestiary": true, + "name": "Giant Octopus", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 52, + "hit_dice": "8d10 + 8", + "ac": 11, + "speed": "10 ft., swim 60 ft.", + "stats": [ + 17, + 13, + 13, + 4, + 10, + 4 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "4" + }, + { + "stealth": "5" + } + ], + "senses": "darkvision 60 ft., passive Perception 14", + "languages": "", + "cr": "1", + "traits": [ + { + "name": "Hold Breath", + "desc": "While out of water, the octopus can hold its breath for 1 hour." + }, + { + "name": "Underwater Camouflage", + "desc": "The octopus has advantage on Dexterity (Stealth) checks made while underwater." + }, + { + "name": "Water Breathing", + "desc": "The octopus can breathe only underwater." + } + ], + "actions": [ + { + "name": "Tentacles", + "desc": "Melee Weapon Attack +5 to hit, reach 15 ft., one target. 10 (2d6 + 3) bludgeoning damage. If the target is a creature, it is grappled (escape 16). Until this grapple ends, the target is restrained, and the octopus can't use its tentacles on another target." + }, + { + "name": "Ink Cloud (Recharges after a Short or Long Rest)", + "desc": "A 20-foot-radius cloud of ink extends all around the octopus if it is underwater. The area is Vision and Light for 1 minute, although a significant current can disperse the ink. After releasing the ink, the octopus can use the {@action Dash} action as a bonus action." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Owl", + { + "image": null, + "bestiary": true, + "name": "Giant Owl", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "neutral", + "hp": 19, + "hit_dice": "3d10 + 3", + "ac": 12, + "speed": "5 ft., fly 60 ft.", + "stats": [ + 13, + 15, + 12, + 8, + 13, + 10 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "5" + }, + { + "stealth": "4" + } + ], + "senses": "darkvision 120 ft., passive Perception 15", + "languages": "Giant Owl, understands Common, Elvish, and Sylvan but can't speak them", + "cr": "1/4", + "traits": [ + { + "name": "Flyby", + "desc": "The owl doesn't provoke opportunity attacks when it flies out of an enemy's reach." + }, + { + "name": "Keen Hearing and Sight", + "desc": "The owl has advantage on Wisdom (Perception) checks that rely on hearing or sight." + } + ], + "actions": [ + { + "name": "Talons", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 8 (2d6 + 1) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Poisonous Snake", + { + "image": null, + "bestiary": true, + "name": "Giant Poisonous Snake", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 11, + "hit_dice": "2d8 + 2", + "ac": 14, + "speed": "30 ft., swim 30 ft.", + "stats": [ + 10, + 18, + 13, + 2, + 10, + 3 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "2" + } + ], + "senses": "blindsight 10 ft., passive Perception 12", + "languages": "", + "cr": "1/4", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 10 ft., one target. 6 (1d4 + 4) piercing damage, and the target must make a 11 Constitution saving throw, taking 10 (3d6) poison damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Rat", + { + "image": null, + "bestiary": true, + "name": "Giant Rat", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Small", + "alignment": "unaligned", + "hp": 7, + "hit_dice": "2d6", + "ac": 12, + "speed": "30 ft.", + "stats": [ + 7, + 15, + 11, + 2, + 10, + 4 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "", + "cr": "1/8", + "traits": [ + { + "name": "Keen Smell", + "desc": "The rat has advantage on Wisdom (Perception) checks that rely on smell." + }, + { + "name": "Pack Tactics", + "desc": "The rat has advantage on an attack roll against a creature if at least one of the rat's allies is within 5 feet of the creature and the ally isn't incapacitated." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 4 (1d4 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Scorpion", + { + "image": null, + "bestiary": true, + "name": "Giant Scorpion", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 52, + "hit_dice": "7d10 + 14", + "ac": "15 (natural armor)", + "speed": "40 ft.", + "stats": [ + 15, + 13, + 15, + 1, + 9, + 3 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "blindsight 60 ft., passive Perception 9", + "languages": "", + "cr": "3", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The scorpion makes three attacks: two with its claws and one with its sting." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 6 (1d8 + 2) bludgeoning damage, and the target is grappled (escape 12). The scorpion has two claws, each of which can grapple only one target." + }, + { + "name": "Sting", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 7 (1d10 + 2) piercing damage, and the target must make a 12 Constitution saving throw, taking 22 (4d10) poison damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Sea Horse", + { + "image": null, + "bestiary": true, + "name": "Giant Sea Horse", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 16, + "hit_dice": "3d10", + "ac": "13 (natural armor)", + "speed": "0 ft., swim 40 ft.", + "stats": [ + 12, + 15, + 11, + 2, + 12, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 11", + "languages": "", + "cr": "1/2", + "traits": [ + { + "name": "Charge", + "desc": "If the sea horse moves at least 20 feet straight toward a target and then hits it with a ram attack on the same turn, the target takes an extra 7 (2d6) bludgeoning damage. If the target is a creature, it must succeed on a 11 Strength saving throw or be knocked prone." + }, + { + "name": "Water Breathing", + "desc": "The sea horse can breathe only underwater." + } + ], + "actions": [ + { + "name": "Ram", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 4 (1d6 + 1) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Shark", + { + "image": null, + "bestiary": true, + "name": "Giant Shark", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Huge", + "alignment": "unaligned", + "hp": 126, + "hit_dice": "11d12 + 55", + "ac": "13 (natural armor)", + "speed": "0 ft., swim 50 ft.", + "stats": [ + 23, + 11, + 21, + 1, + 10, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + } + ], + "senses": "blindsight 60 ft., passive Perception 13", + "languages": "", + "cr": "5", + "traits": [ + { + "name": "Blood Frenzy", + "desc": "The shark has advantage on melee attack rolls against any creature that doesn't have all its hit points." + }, + { + "name": "Water Breathing", + "desc": "The shark can breathe only underwater." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one target. 22 (3d10 + 6) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Spider", + { + "image": null, + "bestiary": true, + "name": "Giant Spider", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 26, + "hit_dice": "4d10 + 4", + "ac": "14 (natural armor)", + "speed": "30 ft., climb 30 ft.", + "stats": [ + 14, + 16, + 12, + 2, + 11, + 4 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "stealth": "7" + } + ], + "senses": "blindsight 10 ft., darkvision 60 ft., passive Perception 10", + "languages": "", + "cr": "1", + "traits": [ + { + "name": "Spider Climb", + "desc": "The spider can climb difficult surfaces, including upside down on ceilings, without needing to make an ability check." + }, + { + "name": "Web Sense", + "desc": "While in contact with a web, the spider knows the exact location of any other creature in contact with the same web." + }, + { + "name": "Web Walker", + "desc": "The spider ignores movement restrictions caused by webbing." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one creature. 7 (1d8 + 3) piercing damage, and the target must make a 11 Constitution saving throw, taking 9 (2d8) poison damage on a failed save, or half as much damage on a successful one. If the poison damage reduces the target to 0 hit points, the target is stable but poisoned for 1 hour, even after regaining hit points, and is paralyzed while poisoned in this way." + }, + { + "name": "Web (Recharge 5-6)", + "desc": "Ranged Weapon Attack +5 to hit, range 30/60 ft., one creature. The target is restrained by webbing. As an action, the restrained target can make a 12 Strength check, bursting the webbing on a success. The webbing can also be attacked and destroyed (AC 10; hp 5; vulnerability to fire damage; immunity to bludgeoning, poison, and psychic damage)." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Toad", + { + "image": null, + "bestiary": true, + "name": "Giant Toad", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 39, + "hit_dice": "6d10 + 6", + "ac": 11, + "speed": "20 ft., swim 40 ft.", + "stats": [ + 15, + 13, + 13, + 2, + 10, + 3 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 30 ft., passive Perception 10", + "languages": "", + "cr": "1", + "traits": [ + { + "name": "Amphibious", + "desc": "The toad can breathe air and water." + }, + { + "name": "Standing Leap", + "desc": "The toad's long jump is up to 20 feet and its high jump is up to 10 feet, with or without a running start." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 7 (1d10 + 2) piercing damage plus 5 (1d10) poison damage, and the target is grappled (escape 13). Until this grapple ends, the target is restrained, and the toad can't bite another target." + }, + { + "name": "Swallow", + "desc": "The toad makes one bite attack against a Medium or smaller target it is grappling. If the attack hits, the target is swallowed, and the grapple ends. The swallowed target is blinded and restrained, it has Cover against attacks and other effects outside the toad, and it takes 10 (3d6) acid damage at the start of each of the toad's turns. The toad can have only one target swallowed at a time.\nIf the toad dies, a swallowed creature is no longer restrained by it and can escape from the corpse using 5 feet of movement, exiting prone." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Vulture", + { + "image": null, + "bestiary": true, + "name": "Giant Vulture", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "neutral evil", + "hp": 22, + "hit_dice": "3d10 + 6", + "ac": 10, + "speed": "10 ft., fly 60 ft.", + "stats": [ + 15, + 10, + 15, + 6, + 12, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + } + ], + "senses": "passive Perception 13", + "languages": "understands Common but can't speak", + "cr": "1", + "traits": [ + { + "name": "Keen Sight and Smell", + "desc": "The vulture has advantage on Wisdom (Perception) checks that rely on sight or smell." + }, + { + "name": "Pack Tactics", + "desc": "The vulture has advantage on an attack roll against a creature if at least one of the vulture's allies is within 5 feet of the creature and the ally isn't incapacitated." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The vulture makes two attacks: one with its beak and one with its talons." + }, + { + "name": "Beak", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 7 (2d4 + 2) piercing damage." + }, + { + "name": "Talons", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 9 (2d6 + 2) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Wasp", + { + "image": null, + "bestiary": true, + "name": "Giant Wasp", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 13, + "hit_dice": "3d8", + "ac": 12, + "speed": "10 ft., fly 50 ft.", + "stats": [ + 10, + 14, + 10, + 1, + 10, + 3 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 10", + "languages": "", + "cr": "1/2", + "traits": [], + "actions": [ + { + "name": "Sting", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 5 (1d6 + 2) piercing damage, and the target must make a 11 Constitution saving throw, taking 10 (3d6) poison damage on a failed save, or half as much damage on a successful one. If the poison damage reduces the target to 0 hit points, the target is stable but poisoned for 1 hour, even after regaining hit points, and is paralyzed while poisoned in this way." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Weasel", + { + "image": null, + "bestiary": true, + "name": "Giant Weasel", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 9, + "hit_dice": "2d8", + "ac": 13, + "speed": "40 ft.", + "stats": [ + 11, + 16, + 10, + 4, + 12, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + }, + { + "stealth": "5" + } + ], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "", + "cr": "1/8", + "traits": [ + { + "name": "Keen Hearing and Smell", + "desc": "The weasel has advantage on Wisdom (Perception) checks that rely on hearing or smell." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 5 (1d4 + 3) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Giant Wolf Spider", + { + "image": null, + "bestiary": true, + "name": "Giant Wolf Spider", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 11, + "hit_dice": "2d8 + 2", + "ac": 13, + "speed": "40 ft., climb 40 ft.", + "stats": [ + 12, + 16, + 13, + 3, + 12, + 4 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + }, + { + "stealth": "7" + } + ], + "senses": "blindsight 10 ft., darkvision 60 ft., passive Perception 13", + "languages": "", + "cr": "1/4", + "traits": [ + { + "name": "Spider Climb", + "desc": "The spider can climb difficult surfaces, including upside down on ceilings, without needing to make an ability check." + }, + { + "name": "Web Sense", + "desc": "While in contact with a web, the spider knows the exact location of any other creature in contact with the same web." + }, + { + "name": "Web Walker", + "desc": "The spider ignores movement restrictions caused by webbing." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one creature. 4 (1d6 + 1) piercing damage, and the target must make a 11 Constitution saving throw, taking 7 (2d6) poison damage on a failed save, or half as much damage on a successful one. If the poison damage reduces the target to 0 hit points, the target is stable but poisoned for 1 hour, even after regaining hit points, and is paralyzed while poisoned in this way." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Gibbering Mouther", + { + "image": null, + "bestiary": true, + "name": "Gibbering Mouther", + "source": [ + "Monster Manual" + ], + "type": "aberration", + "size": "Medium", + "alignment": "neutral", + "hp": 67, + "hit_dice": "9d8 + 27", + "ac": 9, + "speed": "10 ft., swim 10 ft.", + "stats": [ + 10, + 8, + 16, + 3, + 10, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "prone", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "", + "cr": "2", + "traits": [ + { + "name": "Aberrant Ground", + "desc": "The ground in a 10-foot radius around the mouther is doughlike difficult terrain. Each creature that starts its turn in that area must succeed on a 10 Strength saving throw or have its speed reduced to 0 until the start of its next turn." + }, + { + "name": "Gibbering", + "desc": "The mouther babbles incoherently while it can see any creature and isn't incapacitated. Each creature that starts its turn within 20 feet of the mouther and can hear the gibbering must succeed on a 10 Wisdom saving throw. On a failure, the creature can't take reactions until the start of its next turn and rolls a d8 to determine what it does during its turn. On a 1 to 4, the creature does nothing. On a 5 or 6, the creature takes no action or bonus action and uses all its movement to move in a randomly determined direction. On a 7 or 8, the creature makes a melee attack against a randomly determined creature within its reach or does nothing if it can't make such an attack." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The gibbering mouther makes one bite attack and, if it can, uses its Blinding Spittle." + }, + { + "name": "Bites", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one creature. 17 (5d6) piercing damage. If the target is Medium or smaller, it must succeed on a 10 Strength saving throw or be knocked prone. If the target is killed by this damage, it is absorbed into the mouther." + }, + { + "name": "Blinding Spittle (Recharge 5-6)", + "desc": "The mouther spits a chemical glob at a point it can see within 15 feet of it. The glob explodes in a blinding flash of light on impact. Each creature within 5 feet of the flash must succeed on a 13 Dexterity saving throw or be blinded until the end of the mouther's next turn." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Githyanki Knight", + { + "image": null, + "bestiary": true, + "name": "Githyanki Knight", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "gith", + "size": "Medium", + "alignment": "lawful evil", + "hp": 91, + "hit_dice": "14d8 + 28", + "ac": "18 (plate armor)", + "speed": "30 ft.", + "stats": [ + 16, + 14, + 15, + 14, + 14, + 15 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "constitution": "5" + }, + { + "intelligence": "5" + }, + { + "wisdom": "5" + } + ], + "skillsaves": [], + "senses": "passive Perception 12", + "languages": "Gith", + "cr": "8", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The githyanki makes two silver greatsword attacks." + }, + { + "name": "Silver Greatsword", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one target. 13 (2d6 + 6) slashing damage plus 10 (3d6) psychic damage. This is a magic weapon attack. On a critical hit against a target in an astral body (as with the astral projection spell), the githyanki can cut the silvery cord that tethers the target to its material body, instead of dealing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The githyanki's innate spellcasting ability is Intelligence (spell save 13, +5 to hit with spell attacks). It can innately cast the following spells, requiring no components:", + { + "At will": "mage hand (the hand is invisible)" + }, + { + "3/day each": "jump, misty step, nondetection (self only), tongues" + }, + { + "1/day each": "plane shift, telekinesis" + } + ], + "spellsNotes": "" + } + ], + [ + "Githyanki Warrior", + { + "image": null, + "bestiary": true, + "name": "Githyanki Warrior", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "gith", + "size": "Medium", + "alignment": "lawful evil", + "hp": 49, + "hit_dice": "9d8 + 9", + "ac": "17 (half plate armor)", + "speed": "30 ft.", + "stats": [ + 15, + 14, + 12, + 13, + 13, + 10 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "constitution": "3" + }, + { + "intelligence": "3" + }, + { + "wisdom": "3" + } + ], + "skillsaves": [], + "senses": "passive Perception 11", + "languages": "Gith", + "cr": "3", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The githyanki makes two greatsword attacks." + }, + { + "name": "Greatsword", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 9 (2d6 + 2) slashing damage plus 7 (2d6) psychic damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The githyanki's innate spellcasting ability is Intelligence. It can innately cast the following spells, requiring no components:", + { + "At will": "mage hand (the hand is invisible)" + }, + { + "3/day each": "jump, misty step, nondetection (self only)" + } + ], + "spellsNotes": "" + } + ], + [ + "Githzerai Monk", + { + "image": null, + "bestiary": true, + "name": "Githzerai Monk", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "gith", + "size": "Medium", + "alignment": "lawful neutral", + "hp": 38, + "hit_dice": "7d8 + 7", + "ac": 14, + "speed": "30 ft.", + "stats": [ + 12, + 15, + 12, + 13, + 14, + 10 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "strength": "3" + }, + { + "dexterity": "4" + }, + { + "intelligence": "3" + }, + { + "wisdom": "4" + } + ], + "skillsaves": [ + { + "insight": "4" + }, + { + "perception": "4" + } + ], + "senses": "passive Perception 14", + "languages": "Gith", + "cr": "2", + "traits": [ + { + "name": "Psychic Defense", + "desc": "While the githzerai is wearing no armor and wielding no shield, its AC includes its Wisdom modifier." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The githzerai makes two unarmed strikes." + }, + { + "name": "Unarmed Strike", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 6 (1d8 + 2) bludgeoning damage plus 9 (2d8) psychic damage. This is a magic weapon attack." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The githzerai's innate spellcasting ability is Wisdom. It can innately cast the following spells, requiring no components:", + { + "At will": "mage hand (the hand is invisible)" + }, + { + "3/day each": "feather fall, jump, see invisibility, shield" + } + ], + "spellsNotes": "" + } + ], + [ + "Githzerai Zerth", + { + "image": null, + "bestiary": true, + "name": "Githzerai Zerth", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "gith", + "size": "Medium", + "alignment": "lawful neutral", + "hp": 84, + "hit_dice": "13d8 + 26", + "ac": 17, + "speed": "30 ft.", + "stats": [ + 13, + 18, + 15, + 16, + 17, + 12 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "strength": "4" + }, + { + "dexterity": "7" + }, + { + "intelligence": "6" + }, + { + "wisdom": "6" + } + ], + "skillsaves": [ + { + "arcana": "6" + }, + { + "insight": "6" + }, + { + "perception": "6" + } + ], + "senses": "passive Perception 16", + "languages": "Gith", + "cr": "6", + "traits": [ + { + "name": "Psychic Defense", + "desc": "While the githzerai is wearing no armor and wielding no shield, its AC includes its Wisdom modifier." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The githzerai makes two unarmed strikes." + }, + { + "name": "Unarmed Strike", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 11 (2d6 + 4) bludgeoning damage plus 13 (3d8) psychic damage. This is a magic weapon attack." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The githzerai's innate spellcasting ability is Wisdom. It can innately cast the following spells, requiring no components:", + { + "At will": "mage hand (the hand is invisible)" + }, + { + "3/day each": "feather fall, jump, see invisibility, shield" + }, + { + "1/day each": "phantasmal killer, plane shift" + } + ], + "spellsNotes": "" + } + ], + [ + "Glabrezu", + { + "image": null, + "bestiary": true, + "name": "Glabrezu", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "demon", + "size": "Large", + "alignment": "chaotic evil", + "hp": 157, + "hit_dice": "15d10 + 75", + "ac": "17 (natural armor)", + "speed": "40 ft.", + "stats": [ + 20, + 15, + 21, + 19, + 17, + 16 + ], + "damage_immunities": "poison", + "damage_resistances": "cold, fire, lightning, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "strength": "9" + }, + { + "constitution": "9" + }, + { + "wisdom": "7" + }, + { + "charisma": "7" + } + ], + "skillsaves": [], + "senses": "truesight 120 ft., passive Perception 13", + "languages": "Abyssal, telepathy 120 ft.", + "cr": "9", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The glabrezu has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The glabrezu makes four attacks: two with its pincers and two with its fists. Alternatively, it makes two attacks with its pincers and casts one spell." + }, + { + "name": "Pincer", + "desc": "Melee Weapon Attack +9 to hit, reach 10 ft., one target. 16 (2d10 + 5) bludgeoning damage. If the target is a Medium or smaller creature, it is grappled (escape 15). The glabrezu has two pincers, each of which can grapple only one target." + }, + { + "name": "Fist", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one target. 7 (2d4 + 2) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The glabrezu's spellcasting ability is Intelligence (spell save 16). The glabrezu can innately cast the following spells, requiring no material components:", + { + "At will": "darkness, detect magic, dispel magic" + }, + { + "1/day each": "confusion, fly, power word stun" + } + ], + "spellsNotes": "" + } + ], + [ + "Gladiator", + { + "image": null, + "bestiary": true, + "name": "Gladiator", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "any alignment", + "hp": 112, + "hit_dice": "15d8 + 45", + "ac": "16 (studded leather armor)", + "speed": "30 ft.", + "stats": [ + 18, + 15, + 16, + 10, + 12, + 15 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "strength": "7" + }, + { + "dexterity": "5" + }, + { + "constitution": "6" + } + ], + "skillsaves": [ + { + "athletics": "10" + }, + { + "intimidation": "5" + } + ], + "senses": "passive Perception 11", + "languages": "any one language (usually Common)", + "cr": "5", + "traits": [ + { + "name": "Brave", + "desc": "The gladiator has advantage on saving throws against being frightened." + }, + { + "name": "Brute", + "desc": "A melee weapon deals one extra die of its damage when the gladiator hits with it (included in the attack)." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The gladiator makes three melee attacks or two ranged attacks." + }, + { + "name": "Spear", + "desc": "Melee / Ranged Weapon Attack +7 to hit, reach 5 ft. and range 20/60 ft., one target. 11 (2d6 + 4) piercing damage, or 13 (2d8 + 4) piercing damage if used with two hands to make a melee attack." + }, + { + "name": "Shield Bash", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one creature. 9 (2d4 + 4) bludgeoning damage. If the target is a Medium or smaller creature, it must succeed on a 15 Strength saving throw or be knocked prone." + } + ], + "bonus_actions": [], + "reactions": [ + { + "name": "Parry", + "desc": "The gladiator adds 3 to its AC against one melee attack that would hit it. To do so, the gladiator must see the attacker and be wielding a melee weapon." + } + ], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Gnoll", + { + "image": null, + "bestiary": true, + "name": "Gnoll", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "gnoll", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 22, + "hit_dice": "5d8", + "ac": "15 (hide armor)", + "speed": "30 ft.", + "stats": [ + 14, + 12, + 11, + 6, + 10, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Gnoll", + "cr": "1/2", + "traits": [ + { + "name": "Rampage", + "desc": "When the gnoll reduces a creature to 0 hit points with a melee attack on its turn, the gnoll can take a bonus action to move up to half its speed and make a bite attack." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 4 (1d4 + 2) piercing damage." + }, + { + "name": "Spear", + "desc": "Melee / Ranged Weapon Attack +4 to hit, reach 5 ft. or range 20/60 ft., one target. 5 (1d6 + 2) piercing damage, or 6 (1d8 + 2) piercing damage if used with two hands to make a melee attack." + }, + { + "name": "Longbow", + "desc": "Ranged Weapon Attack +3 to hit, range 150/600 ft., one target. 5 (1d8 + 1) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Gnoll Fang of Yeenoghu", + { + "image": null, + "bestiary": true, + "name": "Gnoll Fang of Yeenoghu", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "gnoll", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 65, + "hit_dice": "10d8 + 20", + "ac": "14 (hide armor)", + "speed": "30 ft.", + "stats": [ + 17, + 15, + 15, + 10, + 11, + 13 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "constitution": "4" + }, + { + "wisdom": "2" + }, + { + "charisma": "3" + } + ], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Abyssal, Gnoll", + "cr": "4", + "traits": [ + { + "name": "Rampage", + "desc": "When the gnoll reduces a creature to 0 hit points with a melee attack on its turn, the gnoll can take a bonus action to move up to half its speed and make a bite attack." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The gnoll makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one creature. 6 (1d6 + 3) piercing damage, and the target must succeed on a 12 Constitution saving throw or take 7 (2d6) poison damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 7 (1d8 + 3) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Gnoll Pack Lord", + { + "image": null, + "bestiary": true, + "name": "Gnoll Pack Lord", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "gnoll", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 49, + "hit_dice": "9d8 + 9", + "ac": "15 (chain shirt)", + "speed": "30 ft.", + "stats": [ + 16, + 14, + 13, + 8, + 11, + 9 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Gnoll", + "cr": "2", + "traits": [ + { + "name": "Rampage", + "desc": "When the gnoll reduces a creature to 0 hit points with a melee attack on its turn, the gnoll can take a bonus action to move up to half its speed and make a bite attack." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The gnoll makes two attacks, either with its glaive or its longbow, and uses its Incite Rampage if it can." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one creature. 5 (1d4 + 3) piercing damage." + }, + { + "name": "Glaive", + "desc": "Melee Weapon Attack +5 to hit, reach 10 ft., one target. 8 (1d10 + 3) slashing damage." + }, + { + "name": "Longbow", + "desc": "Ranged Weapon Attack +4 to hit, range 150/600 ft., one target. 6 (1d8 + 2) piercing damage." + }, + { + "name": "Incite Rampage (Recharge 5-6)", + "desc": "One creature the gnoll can see within 30 feet of it can use its reaction to make a melee attack if it can hear the gnoll and has the Rampage trait." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Goat", + { + "image": null, + "bestiary": true, + "name": "Goat", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 4, + "hit_dice": "1d8", + "ac": 10, + "speed": "40 ft.", + "stats": [ + 12, + 10, + 11, + 2, + 10, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 10", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Charge", + "desc": "If the goat moves at least 20 feet straight toward a target and then hits it with a ram attack on the same turn, the target takes an extra 2 (1d4) bludgeoning damage. If the target is a creature, it must succeed on a 10 Strength saving throw or be knocked prone." + }, + { + "name": "Sure-Footed", + "desc": "The goat has advantage on Strength and Dexterity saving throws made against effects that would knock it prone." + } + ], + "actions": [ + { + "name": "Ram", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 3 (1d4 + 1) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Goblin", + { + "image": null, + "bestiary": true, + "name": "Goblin", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "goblinoid", + "size": "Small", + "alignment": "neutral evil", + "hp": 7, + "hit_dice": "2d6", + "ac": "15 (leather armor)", + "speed": "30 ft.", + "stats": [ + 8, + 14, + 10, + 10, + 8, + 8 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "stealth": "6" + } + ], + "senses": "darkvision 60 ft., passive Perception 9", + "languages": "Common, Goblin", + "cr": "1/4", + "traits": [ + { + "name": "Nimble Escape", + "desc": "The goblin can take the {@action Disengage} or {@action Hide} action as a bonus action on each of its turns." + } + ], + "actions": [ + { + "name": "Scimitar", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d6 + 2) slashing damage." + }, + { + "name": "Shortbow", + "desc": "Ranged Weapon Attack +4 to hit, range 80/320 ft., one target. 5 (1d6 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Goblin Boss", + { + "image": null, + "bestiary": true, + "name": "Goblin Boss", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "goblinoid", + "size": "Small", + "alignment": "neutral evil", + "hp": 21, + "hit_dice": "6d6", + "ac": "17 (chain shirt)", + "speed": "30 ft.", + "stats": [ + 10, + 14, + 10, + 10, + 8, + 10 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "stealth": "6" + } + ], + "senses": "darkvision 60 ft., passive Perception 9", + "languages": "Common, Goblin", + "cr": "1", + "traits": [ + { + "name": "Nimble Escape", + "desc": "The goblin can take the {@action Disengage} or {@action Hide} action as a bonus action on each of its turns." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The goblin makes two attacks with its scimitar. The second attack has disadvantage." + }, + { + "name": "Scimitar", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d6 + 2) slashing damage." + }, + { + "name": "Javelin", + "desc": "Melee / Ranged Weapon Attack +2 to hit, reach 5 ft. or range 30/120 ft., one target. 3 (1d6) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [ + { + "name": "Redirect Attack", + "desc": "When a creature the goblin can see targets it with an attack, the goblin chooses another goblin within 5 feet of it. The two goblins swap places, and the chosen goblin becomes the target instead." + } + ], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Gold Dragon Wyrmling", + { + "image": null, + "bestiary": true, + "name": "Gold Dragon Wyrmling", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Medium", + "alignment": "lawful good", + "hp": 60, + "hit_dice": "8d8 + 24", + "ac": "17 (natural armor)", + "speed": "30 ft., fly 60 ft., swim 30 ft.", + "stats": [ + 19, + 14, + 17, + 14, + 11, + 16 + ], + "damage_immunities": "fire", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "4" + }, + { + "constitution": "5" + }, + { + "wisdom": "2" + }, + { + "charisma": "5" + } + ], + "skillsaves": [ + { + "perception": "4" + }, + { + "stealth": "4" + } + ], + "senses": "blindsight 10 ft., darkvision 60 ft., passive Perception 14", + "languages": "Draconic", + "cr": "3", + "traits": [ + { + "name": "Amphibious", + "desc": "The dragon can breathe air and water." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 9 (1d10 + 4) piercing damage." + }, + { + "name": "Breath Weapons (Recharge 5-6)", + "desc": "The dragon uses one of the following breath weapons." + }, + { + "name": "Fire Breath", + "desc": "The dragon exhales fire in a 15-foot cone. Each creature in that area must make a 13 Dexterity saving throw, taking 22 (4d10) fire damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Weakening Breath", + "desc": "The dragon exhales gas in a 15-foot cone. Each creature in that area must succeed on a 13 Strength saving throw or have disadvantage on Strength-based attack rolls, Strength checks, and Strength saving throws for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Gorgon", + { + "image": null, + "bestiary": true, + "name": "Gorgon", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "unaligned", + "hp": 114, + "hit_dice": "12d10 + 48", + "ac": "19 (natural armor)", + "speed": "40 ft.", + "stats": [ + 20, + 11, + 18, + 2, + 12, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "petrified", + "saves": [], + "skillsaves": [ + { + "perception": "4" + } + ], + "senses": "darkvision 60 ft., passive Perception 14", + "languages": "", + "cr": "5", + "traits": [ + { + "name": "Trampling Charge", + "desc": "If the gorgon moves at least 20 feet straight toward a creature and then hits it with a gore attack on the same turn, that target must succeed on a 16 Strength saving throw or be knocked prone. If the target is prone, the gorgon can make one attack with its hooves against it as a bonus action." + } + ], + "actions": [ + { + "name": "Gore", + "desc": "Melee Weapon Attack +8 to hit, reach 5 ft., one target. 18 (2d12 + 5) piercing damage." + }, + { + "name": "Hooves", + "desc": "Melee Weapon Attack +8 to hit, reach 5 ft., one target. 16 (2d10 + 5) bludgeoning damage." + }, + { + "name": "Petrifying Breath (Recharge 5-6)", + "desc": "The gorgon exhales petrifying gas in a 30-foot cone. Each creature in that area must succeed on a 13 Constitution saving throw. On a failed save, a target begins to turn to stone and is restrained. The restrained target must repeat the saving throw at the end of its next turn. On a success, the effect ends on the target. On a failure, the target is petrified until freed by the greater restoration spell or other magic." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Goristro", + { + "image": null, + "bestiary": true, + "name": "Goristro", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "demon", + "size": "Huge", + "alignment": "chaotic evil", + "hp": 310, + "hit_dice": "23d12 + 161", + "ac": "19 (natural armor)", + "speed": "40 ft.", + "stats": [ + 25, + 11, + 25, + 6, + 13, + 14 + ], + "damage_immunities": "poison", + "damage_resistances": "cold, fire, lightning, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "strength": "13" + }, + { + "dexterity": "6" + }, + { + "constitution": "13" + }, + { + "wisdom": "7" + } + ], + "skillsaves": [ + { + "perception": "7" + } + ], + "senses": "darkvision 120 ft., passive Perception 17", + "languages": "Abyssal", + "cr": "17", + "traits": [ + { + "name": "Charge", + "desc": "If the goristro moves at least 15 feet straight toward a target and then hits it with a gore attack on the same turn, the target takes an extra 38 (7d10) piercing damage. If the target is a creature, it must succeed on a 21 Strength saving throw or be pushed up to 20 feet away and knocked prone." + }, + { + "name": "Labyrinthine Recall", + "desc": "The goristro can perfectly recall any path it has traveled." + }, + { + "name": "Magic Resistance", + "desc": "The goristro has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Siege Monster", + "desc": "The goristro deals double damage to objects and structures." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The goristro makes three attacks: two with its fists and one with its hoof." + }, + { + "name": "Fist", + "desc": "Melee Weapon Attack +13 to hit, reach 10 ft., one target. 20 (3d8 + 7) bludgeoning damage." + }, + { + "name": "Hoof", + "desc": "Melee Weapon Attack +13 to hit, reach 5 ft., one target. 23 (3d10 + 7) bludgeoning damage. If the target is a creature, it must succeed on a 21 Strength saving throw or be knocked prone." + }, + { + "name": "Gore", + "desc": "Melee Weapon Attack +13 to hit, reach 10 ft., one target. 45 (7d10 + 7) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Gray Ooze", + { + "image": null, + "bestiary": true, + "name": "Gray Ooze", + "source": [ + "Monster Manual" + ], + "type": "ooze", + "size": "Medium", + "alignment": "unaligned", + "hp": 22, + "hit_dice": "3d8 + 9", + "ac": 8, + "speed": "10 ft., climb 10 ft.", + "stats": [ + 12, + 6, + 16, + 1, + 6, + 2 + ], + "damage_immunities": "", + "damage_resistances": "acid, cold, fire", + "damage_vulnerabilities": "", + "condition_immunities": "blinded, charmed, deafened, exhaustion, frightened, prone", + "saves": [], + "skillsaves": [ + { + "stealth": "2" + } + ], + "senses": "blindsight 60 ft. (blind beyond this radius), passive Perception 8", + "languages": "", + "cr": "1/2", + "traits": [ + { + "name": "Amorphous", + "desc": "The ooze can move through a space as narrow as 1 inch wide without squeezing." + }, + { + "name": "Corrode Metal", + "desc": "Any nonmagical weapon made of metal that hits the ooze corrodes. After dealing damage, the weapon takes a permanent and cumulative −1 penalty to damage rolls. If its penalty drops to −5, the weapon is destroyed. Nonmagical ammunition made of metal that hits the ooze is destroyed after dealing damage.\nThe ooze can eat through 2-inch-thick, nonmagical metal in 1 round." + }, + { + "name": "False Appearance", + "desc": "While the ooze remains motionless, it is indistinguishable from an oily pool or wet rock." + } + ], + "actions": [ + { + "name": "Pseudopod", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 4 (1d6 + 1) bludgeoning damage plus 7 (2d6) acid damage, and if the target is wearing nonmagical metal armor, its armor is partly corroded and takes a permanent and cumulative −1 penalty to the AC it offers. The armor is destroyed if the penalty reduces its AC to 10." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Gray Slaad", + { + "image": null, + "bestiary": true, + "name": "Gray Slaad", + "source": [ + "Monster Manual" + ], + "type": "aberration", + "subtype": "shapechanger", + "size": "Medium", + "alignment": "chaotic neutral", + "hp": 127, + "hit_dice": "17d8 + 51", + "ac": "18 (natural armor)", + "speed": "30 ft.", + "stats": [ + 17, + 17, + 16, + 13, + 8, + 14 + ], + "damage_immunities": "", + "damage_resistances": "acid, cold, fire, lightning, thunder", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "arcana": "5" + }, + { + "perception": "7" + } + ], + "senses": "blindsight 60 ft., darkvision 60 ft., passive Perception 17", + "languages": "Slaad, telepathy 60 ft.", + "cr": "9", + "traits": [ + { + "name": "Shapechanger", + "desc": "The slaad can use its action to polymorph into a Small or Medium humanoid, or back into its true form. Its statistics, other than its size, are the same in each form. Any equipment it is wearing or carrying isn't transformed. It reverts to its true form if it dies." + }, + { + "name": "Magic Resistance", + "desc": "The slaad has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Magic Weapons", + "desc": "The slaad's weapon attacks are magical." + }, + { + "name": "Regeneration", + "desc": "The slaad regains 10 hit points at the start of its turn if it has at least 1 hit point." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The slaad makes three attacks: one with its bite and two with its claws or greatsword." + }, + { + "name": "Bite (Slaad Form Only)", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 6 (1d6 + 3) piercing damage." + }, + { + "name": "Claws (Slaad Form Only)", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 8 (1d10 + 3) slashing damage." + }, + { + "name": "Greatsword", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 10 (2d6 + 3) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The slaad's innate spellcasting ability is Charisma (spell save 14). The slaad can innately cast the following spells, requiring no material components:", + { + "At will": "detect magic, detect thoughts, invisibility (self only), mage hand, major image" + }, + { + "2/day each": "fear, fly, fireball, tongues" + }, + { + "1/day each": "plane shift (self only)" + } + ], + "spellsNotes": "" + } + ], + [ + "Green Dragon Wyrmling", + { + "image": null, + "bestiary": true, + "name": "Green Dragon Wyrmling", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Medium", + "alignment": "lawful evil", + "hp": 38, + "hit_dice": "7d8 + 7", + "ac": "17 (natural armor)", + "speed": "30 ft., fly 60 ft., swim 30 ft.", + "stats": [ + 15, + 12, + 13, + 14, + 11, + 13 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "dexterity": "3" + }, + { + "constitution": "3" + }, + { + "wisdom": "2" + }, + { + "charisma": "3" + } + ], + "skillsaves": [ + { + "perception": "4" + }, + { + "stealth": "3" + } + ], + "senses": "blindsight 10 ft., darkvision 60 ft., passive Perception 14", + "languages": "Draconic", + "cr": "2", + "traits": [ + { + "name": "Amphibious", + "desc": "The dragon can breathe air and water." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 7 (1d10 + 2) piercing damage plus 3 (1d6) poison damage." + }, + { + "name": "Poison Breath (Recharge 5-6)", + "desc": "The dragon exhales poisonous gas in a 15-foot cone. Each creature in that area must make a 11 Constitution saving throw, taking 21 (6d6) poison damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Green Hag", + { + "image": null, + "bestiary": true, + "name": "Green Hag", + "source": [ + "Monster Manual" + ], + "type": "fey", + "size": "Medium", + "alignment": "neutral evil", + "hp": 82, + "hit_dice": "11d8 + 33", + "ac": "17 (natural armor)", + "speed": "30 ft.", + "stats": [ + 18, + 12, + 16, + 13, + 14, + 14 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "arcana": "3" + }, + { + "deception": "4" + }, + { + "perception": "4" + }, + { + "stealth": "3" + } + ], + "senses": "darkvision 60 ft., passive Perception 14", + "languages": "Common, Draconic, Sylvan", + "cr": "3", + "traits": [ + { + "name": "Amphibious", + "desc": "The hag can breathe air and water." + }, + { + "name": "Mimicry", + "desc": "The hag can mimic animal sounds and humanoid voices. A creature that hears the sounds can tell they are imitations with a successful 14 Wisdom (Insight) check." + } + ], + "actions": [ + { + "name": "Claws", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 13 (2d8 + 4) slashing damage." + }, + { + "name": "Illusory Appearance", + "desc": "The hag covers herself and anything she is wearing or carrying with a magical illusion that makes her look like another creature of her general size and humanoid shape. The illusion ends if the hag takes a bonus action to end it or if she dies.\nThe changes wrought by this effect fail to hold up to physical inspection. For example, the hag could appear to have smooth skin, but someone touching her would feel her rough flesh. Otherwise, a creature must take an action to visually inspect the illusion and succeed on a 20 Intelligence (Investigation) check to discern that the hag is disguised." + }, + { + "name": "Invisible Passage", + "desc": "The hag magically turns invisible until she attacks or casts a spell, or until her {@status concentration} ends (as if {@status concentration||concentrating} on a spell). While invisible, she leaves no physical evidence of her passage, so she can be tracked only by magic. Any equipment she wears or carries is invisible with her." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The hag's innate spellcasting ability is Charisma (spell save 12). She can innately cast the following spells, requiring no material components:", + { + "At will": "dancing lights, minor illusion, vicious mockery" + } + ], + "spellsNotes": "" + } + ], + [ + "Green Slaad", + { + "image": null, + "bestiary": true, + "name": "Green Slaad", + "source": [ + "Monster Manual" + ], + "type": "aberration", + "subtype": "shapechanger", + "size": "Large", + "alignment": "chaotic neutral", + "hp": 127, + "hit_dice": "15d10 + 45", + "ac": "16 (natural armor)", + "speed": "30 ft.", + "stats": [ + 18, + 15, + 16, + 11, + 8, + 12 + ], + "damage_immunities": "", + "damage_resistances": "acid, cold, fire, lightning, thunder", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "arcana": "3" + }, + { + "perception": "2" + } + ], + "senses": "blindsight 30 ft., darkvision 60 ft., passive Perception 12", + "languages": "Slaad, telepathy 60 ft.", + "cr": "8", + "traits": [ + { + "name": "Shapechanger", + "desc": "The slaad can use its action to polymorph into a Small or Medium humanoid, or back into its true form. Its statistics, other than its size, are the same in each form. Any equipment it is wearing or carrying isn't transformed. It reverts to its true form if it dies." + }, + { + "name": "Magic Resistance", + "desc": "The slaad has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Regeneration", + "desc": "The slaad regains 10 hit points at the start of its turn if it has at least 1 hit point." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The slaad makes three attacks: one with its bite and two with its claws or staff. Alternatively, it uses its Hurl Flame twice." + }, + { + "name": "Bite (Slaad Form Only)", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 11 (2d6 + 4) piercing damage." + }, + { + "name": "Claw (Slaad Form Only)", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 7 (1d6 + 4) slashing damage." + }, + { + "name": "Staff", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 11 (2d6 + 4) bludgeoning damage." + }, + { + "name": "Hurl Flame", + "desc": "Ranged Spell Attack +4 to hit, range 60 ft., one target. 10 (3d6) fire damage. The fire ignites flammable objects that aren't being worn or carried." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The slaad's innate spellcasting ability is Charisma (spell save 12). The slaad can innately cast the following spells, requiring no material components:", + { + "At will": "detect magic, detect thoughts, mage hand" + }, + { + "2/day each": "fear, invisibility (self only)" + }, + { + "1/day each": "fireball" + } + ], + "spellsNotes": "" + } + ], + [ + "Grell", + { + "image": null, + "bestiary": true, + "name": "Grell", + "source": [ + "Monster Manual" + ], + "type": "aberration", + "size": "Medium", + "alignment": "neutral evil", + "hp": 55, + "hit_dice": "10d8 + 10", + "ac": 12, + "speed": "10 ft., fly 30 ft. (hover)", + "stats": [ + 15, + 14, + 13, + 12, + 11, + 9 + ], + "damage_immunities": "lightning", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "blinded, prone", + "saves": [], + "skillsaves": [ + { + "perception": "4" + }, + { + "stealth": "6" + } + ], + "senses": "blindsight 60 ft. (blind beyond this radius), passive Perception 14", + "languages": "Grell", + "cr": "3", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The grell makes two attacks: one with its tentacles and one with its beak." + }, + { + "name": "Tentacles", + "desc": "Melee Weapon Attack +4 to hit, reach 10 ft., one creature. 7 (1d10 + 2) piercing damage, and the target must succeed on a 11 Constitution saving throw or be poisoned for 1 minute. The poisoned target is paralyzed, and it can repeat the saving throw at the end of each of its turns, ending the effect on a success.\nThe target is also grappled (escape 15). If the target is Medium or smaller, it is also restrained until this grapple ends. While grappling the target, the grell has advantage on attack rolls against it and can't use this attack against other targets. When the grell moves, any Medium or smaller target it is grappling moves with it." + }, + { + "name": "Beak", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 7 (2d4 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Grick", + { + "image": null, + "bestiary": true, + "name": "Grick", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Medium", + "alignment": "neutral", + "hp": 27, + "hit_dice": "6d8", + "ac": "14 (natural armor)", + "speed": "30 ft., climb 30 ft.", + "stats": [ + 14, + 14, + 11, + 3, + 14, + 5 + ], + "damage_immunities": "", + "damage_resistances": "bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 12", + "languages": "", + "cr": "2", + "traits": [ + { + "name": "Stone Camouflage", + "desc": "The grick has advantage on Dexterity (Stealth) checks made to hide in rocky terrain." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The grick makes one attack with its tentacles. If that attack hits, the grick can make one beak attack against the same target." + }, + { + "name": "Tentacles", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 9 (2d6 + 2) slashing damage." + }, + { + "name": "Beak", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d6 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Grick Alpha", + { + "image": null, + "bestiary": true, + "name": "Grick Alpha", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "neutral", + "hp": 75, + "hit_dice": "10d10 + 20", + "ac": "18 (natural armor)", + "speed": "30 ft., climb 30 ft.", + "stats": [ + 18, + 16, + 15, + 4, + 14, + 9 + ], + "damage_immunities": "", + "damage_resistances": "bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 12", + "languages": "", + "cr": "7", + "traits": [ + { + "name": "Stone Camouflage", + "desc": "The grick has advantage on Dexterity (Stealth) checks made to hide in rocky terrain." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The grick makes two attacks: one with its tail and one with its tentacles. If it hits with its tentacles, the grick can make one beak attack against the same target." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +7 to hit, reach 10 ft., one target. 11 (2d6 + 4) bludgeoning damage." + }, + { + "name": "Tentacles", + "desc": "Melee Weapon Attack +7 to hit, reach 10 ft., one target. 22 (4d8 + 4) slashing damage." + }, + { + "name": "Beak", + "desc": "Melee Weapon Attack +7 to hit, reach 10 ft., one target. 13 (2d8 + 4) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Griffon", + { + "image": null, + "bestiary": true, + "name": "Griffon", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "unaligned", + "hp": 59, + "hit_dice": "7d10 + 21", + "ac": 12, + "speed": "30 ft., fly 80 ft.", + "stats": [ + 18, + 15, + 16, + 2, + 13, + 8 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "5" + } + ], + "senses": "darkvision 60 ft., passive Perception 15", + "languages": "", + "cr": "2", + "traits": [ + { + "name": "Keen Sight", + "desc": "The griffon has advantage on Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The griffon makes two attacks: one with its beak and one with its claws." + }, + { + "name": "Beak", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 8 (1d8 + 4) piercing damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 11 (2d6 + 4) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Grimlock", + { + "image": null, + "bestiary": true, + "name": "Grimlock", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "grimlock", + "size": "Medium", + "alignment": "neutral evil", + "hp": 11, + "hit_dice": "2d8 + 2", + "ac": 11, + "speed": "30 ft.", + "stats": [ + 16, + 12, + 12, + 9, + 8, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "blinded", + "saves": [], + "skillsaves": [ + { + "athletics": "5" + }, + { + "perception": "3" + }, + { + "stealth": "3" + } + ], + "senses": "blindsight 30 ft. or 10 ft. while deafened (blind beyond this radius), passive Perception 13", + "languages": "Undercommon", + "cr": "1/4", + "traits": [ + { + "name": "Blind Senses", + "desc": "The grimlock can't use its blindsight while deafened and unable to smell." + }, + { + "name": "Keen Hearing and Smell", + "desc": "The grimlock has advantage on Wisdom (Perception) checks that rely on hearing or smell." + }, + { + "name": "Stone Camouflage", + "desc": "The grimlock has advantage on Dexterity (Stealth) checks made to hide in rocky terrain." + } + ], + "actions": [ + { + "name": "Spiked Bone Club", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 5 (1d4 + 3) bludgeoning damage plus 2 (1d4) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Guard", + { + "image": null, + "bestiary": true, + "name": "Guard", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "any alignment", + "hp": 11, + "hit_dice": "2d8 + 2", + "ac": "16 (chain shirt)", + "speed": "30 ft.", + "stats": [ + 13, + 12, + 12, + 10, + 11, + 10 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "2" + } + ], + "senses": "passive Perception 12", + "languages": "any one language (usually Common)", + "cr": "1/8", + "traits": [], + "actions": [ + { + "name": "Spear", + "desc": "Melee / Ranged Weapon Attack +3 to hit, reach 5 ft. or range 20/60 ft., one target. 4 (1d6 + 1) piercing damage, or 5 (1d8 + 1) piercing damage if used with two hands to make a melee attack." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Guardian Naga", + { + "image": null, + "bestiary": true, + "name": "Guardian Naga", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "lawful good", + "hp": 127, + "hit_dice": "15d10 + 45", + "ac": "18 (natural armor)", + "speed": "40 ft.", + "stats": [ + 19, + 18, + 16, + 16, + 19, + 18 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, poisoned", + "saves": [ + { + "dexterity": "8" + }, + { + "constitution": "7" + }, + { + "intelligence": "7" + }, + { + "wisdom": "8" + }, + { + "charisma": "8" + } + ], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 14", + "languages": "Celestial, Common", + "cr": "10", + "traits": [ + { + "name": "Rejuvenation", + "desc": "If it dies, the naga returns to life in 1d6 days and regains all its hit points. Only a wish spell can prevent this trait from functioning." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +8 to hit, reach 10 ft., one creature. 8 (1d8 + 4) piercing damage, and the target must make a 15 Constitution saving throw, taking 45 (10d8) poison damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Spit Poison", + "desc": "Ranged Weapon Attack +8 to hit, range 15/30 ft., one creature. The target must make a 15 Constitution saving throw, taking 45 (10d8) poison damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The naga is an 11th-level spellcaster. Its spellcasting ability is Wisdom (spell save 16, +8 to hit with spell attacks), and it needs only verbal components to cast its spells. It has the following cleric spells prepared:", + { + "Cantrips (at will)": "mending, sacred flame, thaumaturgy" + }, + { + "1st level (4 slots)": "command, cure wounds, shield of faith" + }, + { + "2nd level (3 slots)": "calm emotions, hold person" + }, + { + "3rd level (3 slots)": "bestow curse, clairvoyance" + }, + { + "4th level (3 slots)": "banishment, freedom of movement" + }, + { + "5th level (2 slots)": "flame strike, geas" + }, + { + "6th level (1 slots)": "true seeing" + } + ], + "spellsNotes": "" + } + ], + [ + "Gynosphinx", + { + "image": null, + "bestiary": true, + "name": "Gynosphinx", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "lawful neutral", + "hp": 136, + "hit_dice": "16d10 + 48", + "ac": "17 (natural armor)", + "speed": "40 ft., fly 60 ft.", + "stats": [ + 18, + 15, + 16, + 18, + 18, + 18 + ], + "damage_immunities": "psychic", + "damage_resistances": "bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, frightened", + "saves": [], + "skillsaves": [ + { + "arcana": "12" + }, + { + "history": "12" + }, + { + "perception": "8" + }, + { + "religion": "8" + } + ], + "senses": "truesight 120 ft., passive Perception 18", + "languages": "Common, Sphinx", + "cr": "11", + "traits": [ + { + "name": "Inscrutable", + "desc": "The sphinx is immune to any effect that would sense its emotions or read its thoughts, as well as any divination spell that it refuses. Wisdom (Insight) checks made to ascertain the sphinx's intentions or sincerity have disadvantage." + }, + { + "name": "Magic Weapons", + "desc": "The sphinx's weapon attacks are magical." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The sphinx makes two claw attacks." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +8 to hit, reach 5 ft., one target. 13 (2d8 + 4) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Claw Attack", + "desc": "The sphinx makes one claw attack." + }, + { + "name": "Teleport (Costs 2 Actions)", + "desc": "The sphinx magically teleports, along with any equipment it is wearing or carrying, up to 120 feet to an unoccupied space it can see." + }, + { + "name": "Cast a Spell (Costs 3 Actions)", + "desc": "The sphinx casts a spell from its list of prepared spells, using a spell slot as normal." + } + ], + "mythic_actions": [], + "spells": [ + "The sphinx is a 9th-level spellcaster. Its spellcasting ability is Intelligence (spell save 16, +8 to hit with spell attacks). It requires no material components to cast its spells. The sphinx has the following wizard spells prepared:", + { + "Cantrips (at will)": "mage hand, minor illusion, prestidigitation" + }, + { + "1st level (4 slots)": "detect magic, identify, shield" + }, + { + "2nd level (3 slots)": "darkness, locate object, suggestion" + }, + { + "3rd level (3 slots)": "dispel magic, remove curse, tongues" + }, + { + "4th level (3 slots)": "banishment, greater invisibility" + }, + { + "5th level (1 slots)": "legend lore" + } + ], + "spellsNotes": "" + } + ], + [ + "Half-Ogre (Ogrillon)", + { + "image": null, + "bestiary": true, + "name": "Half-Ogre (Ogrillon)", + "source": [ + "Monster Manual" + ], + "type": "giant", + "size": "Large", + "alignment": "chaotic good neutral (good/evil axis) evil", + "hp": 30, + "hit_dice": "4d10 + 8", + "ac": "12 (hide armor)", + "speed": "30 ft.", + "stats": [ + 17, + 10, + 14, + 7, + 9, + 10 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 9", + "languages": "Common, Giant", + "cr": "1", + "traits": [], + "actions": [ + { + "name": "Battleaxe", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 12 (2d8 + 3) slashing damage, or 14 (2d10 + 3) slashing damage if used with two hands." + }, + { + "name": "Javelin", + "desc": "Melee / Ranged Weapon Attack +5 to hit, reach 5 ft. or range 30/120 ft., one target. 10 (2d6 + 3) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Half-Red Dragon Veteran", + { + "image": null, + "bestiary": true, + "name": "Half-Red Dragon Veteran", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "human", + "size": "Medium", + "alignment": "any alignment", + "hp": 65, + "hit_dice": "10d8 + 20", + "ac": "18 (plate armor)", + "speed": "30 ft.", + "stats": [ + 16, + 13, + 14, + 10, + 11, + 10 + ], + "damage_immunities": "", + "damage_resistances": "fire", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "athletics": "6" + }, + { + "perception": "3" + } + ], + "senses": "blindsight 10 ft., darkvision 60 ft., passive Perception 12", + "languages": "Common, Draconic", + "cr": "5", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The veteran makes two longsword attacks. If it has a shortsword drawn, it can also make a shortsword attack." + }, + { + "name": "Longsword", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 7 (1d8 + 3) slashing damage, or 8 (1d10 + 3) slashing damage if used with two hands." + }, + { + "name": "Shortsword", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) piercing damage." + }, + { + "name": "Heavy Crossbow", + "desc": "Ranged Weapon Attack +3 to hit, range 100/400 ft., one target. 6 (1d10 + 1) piercing damage." + }, + { + "name": "Fire Breath (Recharge 5-6)", + "desc": "The veteran exhales fire in a 15-foot cone. Each creature in that area must make a 15 Dexterity saving throw, taking 24 (7d6) fire damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Harpy", + { + "image": null, + "bestiary": true, + "name": "Harpy", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 38, + "hit_dice": "7d8 + 7", + "ac": 11, + "speed": "20 ft., fly 40 ft.", + "stats": [ + 12, + 13, + 12, + 7, + 10, + 13 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 10", + "languages": "Common", + "cr": "1", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The harpy makes two attacks: one with its claws and one with its club." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 6 (2d4 + 1) slashing damage." + }, + { + "name": "Club", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 3 (1d4 + 1) bludgeoning damage." + }, + { + "name": "Luring Song", + "desc": "The harpy sings a magical melody. Every humanoid and giant within 300 feet of the harpy that can hear the song must succeed on a 11 Wisdom saving throw or be charmed until the song ends. The harpy must take a bonus action on its subsequent turns to continue singing. It can stop singing at any time. The song ends if the harpy is incapacitated.\nWhile charmed by the harpy, a target is incapacitated and ignores the songs of other harpies. If the charmed target is more than 5 feet away from the harpy, the target must move on its turn toward the harpy by the most direct route. It doesn't avoid opportunity attacks, but before moving into damaging terrain, such as lava or a pit, and whenever it takes damage from a source other than the harpy, a target can repeat the saving throw. A creature can also repeat the saving throw at the end of each of its turns. If a creature's saving throw is successful, the effect ends on it.\nA target that successfully saves is immune to this harpy's song for the next 24 hours." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Hawk", + { + "image": null, + "bestiary": true, + "name": "Hawk", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Tiny", + "alignment": "unaligned", + "hp": 1, + "hit_dice": "1d4 - 1", + "ac": 13, + "speed": "10 ft., fly 60 ft.", + "stats": [ + 5, + 16, + 8, + 2, + 14, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "4" + } + ], + "senses": "passive Perception 14", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Keen Sight", + "desc": "The hawk has advantage on Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Talons", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 1 slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Hell Hound", + { + "image": null, + "bestiary": true, + "name": "Hell Hound", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "size": "Medium", + "alignment": "lawful evil", + "hp": 45, + "hit_dice": "7d8 + 14", + "ac": "15 (natural armor)", + "speed": "50 ft.", + "stats": [ + 17, + 12, + 14, + 6, + 13, + 6 + ], + "damage_immunities": "fire", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "5" + } + ], + "senses": "darkvision 60 ft., passive Perception 15", + "languages": "understands Infernal but can't speak it", + "cr": "3", + "traits": [ + { + "name": "Keen Hearing and Smell", + "desc": "The hound has advantage on Wisdom (Perception) checks that rely on hearing or smell." + }, + { + "name": "Pack Tactics", + "desc": "The hound has advantage on an attack roll against a creature if at least one of the hound's allies is within 5 feet of the creature and the ally isn't incapacitated." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 7 (1d8 + 3) piercing damage plus 7 (2d6) fire damage." + }, + { + "name": "Fire Breath (Recharge 5-6)", + "desc": "The hound exhales fire in a 15-foot cone. Each creature in that area must make a 12 Dexterity saving throw, taking 21 (6d6) fire damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Helmed Horror", + { + "image": null, + "bestiary": true, + "name": "Helmed Horror", + "source": [ + "Monster Manual" + ], + "type": "construct", + "size": "Medium", + "alignment": "unaligned", + "hp": 60, + "hit_dice": "8d8 + 24", + "ac": "20 (plate armor)", + "speed": "30 ft., fly 30 ft.", + "stats": [ + 18, + 13, + 16, + 10, + 10, + 10 + ], + "damage_immunities": "force, necrotic, poison", + "damage_resistances": "bludgeoning, piercing, slashing from nonmagical attacks that aren't adamantine", + "damage_vulnerabilities": "", + "condition_immunities": "blinded, charmed, deafened, frightened, paralyzed, petrified, poisoned, stunned", + "saves": [], + "skillsaves": [ + { + "perception": "4" + } + ], + "senses": "blindsight 60 ft. (blind beyond this radius), passive Perception 14", + "languages": "understands the languages of its creator but can't speak", + "cr": "4", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The helmed horror has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Spell Immunity", + "desc": "The helmed horror is immune to three spells chosen by its creator. Typical immunities include fireball, heat metal, and lightning bolt." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The helmed horror makes two longsword attacks." + }, + { + "name": "Longsword", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 8 (1d8 + 4) slashing damage, or 9 (1d10 + 4) slashing damage if used with two hands." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Hezrou", + { + "image": null, + "bestiary": true, + "name": "Hezrou", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "demon", + "size": "Large", + "alignment": "chaotic evil", + "hp": 136, + "hit_dice": "13d10 + 65", + "ac": "16 (natural armor)", + "speed": "30 ft.", + "stats": [ + 19, + 17, + 20, + 5, + 12, + 13 + ], + "damage_immunities": "poison", + "damage_resistances": "cold, fire, lightning, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "strength": "7" + }, + { + "constitution": "8" + }, + { + "wisdom": "4" + } + ], + "skillsaves": [], + "senses": "darkvision 120 ft., passive Perception 11", + "languages": "Abyssal, telepathy 120 ft.", + "cr": "8", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The hezrou has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Stench", + "desc": "Any creature that starts its turn within 10 feet of the hezrou must succeed on a 14 Constitution saving throw or be poisoned until the start of its next turn. On a successful saving throw, the creature is immune to the hezrou's stench for 24 hours." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The hezrou makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 15 (2d10 + 4) piercing damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 11 (2d6 + 4) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Hill Giant", + { + "image": null, + "bestiary": true, + "name": "Hill Giant", + "source": [ + "Monster Manual" + ], + "type": "giant", + "size": "Huge", + "alignment": "chaotic evil", + "hp": 105, + "hit_dice": "10d12 + 40", + "ac": "13 (natural armor)", + "speed": "40 ft.", + "stats": [ + 21, + 8, + 19, + 5, + 9, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "2" + } + ], + "senses": "passive Perception 12", + "languages": "Giant", + "cr": "5", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The giant makes two greatclub attacks." + }, + { + "name": "Greatclub", + "desc": "Melee Weapon Attack +8 to hit, reach 10 ft., one target. 18 (3d8 + 5) bludgeoning damage." + }, + { + "name": "Rock", + "desc": "Ranged Weapon Attack +8 to hit, range 60/240 ft., one target. 21 (3d10 + 5) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Hippogriff", + { + "image": null, + "bestiary": true, + "name": "Hippogriff", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "unaligned", + "hp": 19, + "hit_dice": "3d10 + 3", + "ac": 11, + "speed": "40 ft., fly 60 ft.", + "stats": [ + 17, + 13, + 13, + 2, + 12, + 8 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "5" + } + ], + "senses": "passive Perception 15", + "languages": "", + "cr": "1", + "traits": [ + { + "name": "Keen Sight", + "desc": "The hippogriff has advantage on Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The hippogriff makes two attacks: one with its beak and one with its claws." + }, + { + "name": "Beak", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 8 (1d10 + 3) piercing damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 10 (2d6 + 3) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Hobgoblin", + { + "image": null, + "bestiary": true, + "name": "Hobgoblin", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "goblinoid", + "size": "Medium", + "alignment": "lawful evil", + "hp": 11, + "hit_dice": "2d8 + 2", + "ac": "18 (chain mail)", + "speed": "30 ft.", + "stats": [ + 13, + 12, + 12, + 10, + 10, + 9 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Common, Goblin", + "cr": "1/2", + "traits": [ + { + "name": "Martial Advantage", + "desc": "Once per turn, the hobgoblin can deal an extra 7 (2d6) damage to a creature it hits with a weapon attack if that creature is within 5 feet of an ally of the hobgoblin that isn't incapacitated." + } + ], + "actions": [ + { + "name": "Longsword", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 5 (1d8 + 1) slashing damage, or 6 (1d10 + 1) slashing damage if used with two hands." + }, + { + "name": "Longbow", + "desc": "Ranged Weapon Attack +3 to hit, range 150/600 ft., one target. 5 (1d8 + 1) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Hobgoblin Captain", + { + "image": null, + "bestiary": true, + "name": "Hobgoblin Captain", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "goblinoid", + "size": "Medium", + "alignment": "lawful evil", + "hp": 39, + "hit_dice": "6d8 + 12", + "ac": "17 (half plate armor)", + "speed": "30 ft.", + "stats": [ + 15, + 14, + 14, + 12, + 10, + 13 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Common, Goblin", + "cr": "3", + "traits": [ + { + "name": "Martial Advantage", + "desc": "Once per turn, the hobgoblin can deal an extra 10 (3d6) damage to a creature it hits with a weapon attack if that creature is within 5 feet of an ally of the hobgoblin that isn't incapacitated." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The hobgoblin makes two greatsword attacks." + }, + { + "name": "Greatsword", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 9 (2d6 + 2) slashing damage." + }, + { + "name": "Javelin", + "desc": "Melee / Ranged Weapon Attack +4 to hit, reach 5 ft. or range 30/120 ft., one target. 5 (1d6 + 2) piercing damage." + }, + { + "name": "Leadership (Recharges after a Short or Long Rest)", + "desc": "For 1 minute, the hobgoblin can utter a special command or warning whenever a nonhostile creature that it can see within 30 feet of it makes an attack roll or a saving throw. The creature can add a d4 to its roll provided it can hear and understand the hobgoblin. A creature can benefit from only one Leadership die at a time. This effect ends if the hobgoblin is incapacitated." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Hobgoblin Warlord", + { + "image": null, + "bestiary": true, + "name": "Hobgoblin Warlord", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "goblinoid", + "size": "Medium", + "alignment": "lawful evil", + "hp": 97, + "hit_dice": "13d8 + 39", + "ac": "20 (plate armor)", + "speed": "30 ft.", + "stats": [ + 16, + 14, + 16, + 14, + 11, + 15 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "intelligence": "5" + }, + { + "wisdom": "3" + }, + { + "charisma": "5" + } + ], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Common, Goblin", + "cr": "6", + "traits": [ + { + "name": "Martial Advantage", + "desc": "Once per turn, the hobgoblin can deal an extra 14 (4d6) damage to a creature it hits with a weapon attack if that creature is within 5 feet of an ally of the hobgoblin that isn't incapacitated." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The hobgoblin makes three melee attacks. Alternatively, it can make two ranged attacks with its javelins." + }, + { + "name": "Longsword", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one target. 7 (1d8 + 3) slashing damage, or 8 (1d10 + 3) slashing damage if used with two hands." + }, + { + "name": "Shield Bash", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one creature. 5 (1d4 + 3) bludgeoning damage. If the target is Large or smaller, it must succeed on a 14 Strength saving throw or be knocked prone." + }, + { + "name": "Javelin", + "desc": "Melee / Ranged Weapon Attack +9 to hit, reach 5 ft. or range 30/120 ft., one target. 6 (1d6 + 3) piercing damage." + }, + { + "name": "Leadership (Recharges after a Short or Long Rest)", + "desc": "For 1 minute, the hobgoblin can utter a special command or warning whenever a nonhostile creature that it can see within 30 feet of it makes an attack roll or a saving throw. The creature can add a d4 to its roll provided it can hear and understand the hobgoblin. A creature can benefit from only one Leadership die at a time. This effect ends if the hobgoblin is incapacitated." + } + ], + "bonus_actions": [], + "reactions": [ + { + "name": "Parry", + "desc": "The hobgoblin adds 3 to its AC against one melee attack that would hit it. To do so, the hobgoblin must see the attacker and be wielding a melee weapon." + } + ], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Homunculus", + { + "image": null, + "bestiary": true, + "name": "Homunculus", + "source": [ + "Monster Manual" + ], + "type": "construct", + "size": "Tiny", + "alignment": "neutral", + "hp": 5, + "hit_dice": "2d4", + "ac": "13 (natural armor)", + "speed": "20 ft., fly 40 ft.", + "stats": [ + 4, + 15, + 11, + 10, + 10, + 7 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, poisoned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "understands the languages of its creator but can't speak", + "cr": "0", + "traits": [ + { + "name": "Telepathic Bond", + "desc": "While the homunculus is on the same plane of existence as its master, it can magically convey what it senses to its master, and the two can communicate telepathically." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 1 piercing damage, and the target must succeed on a 10 Constitution saving throw or be poisoned for 1 minute. If the saving throw fails by 5 or more, the target is instead poisoned for 5 (1d10) minutes and unconscious while poisoned in this way." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Hook Horror", + { + "image": null, + "bestiary": true, + "name": "Hook Horror", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "neutral", + "hp": 75, + "hit_dice": "10d10 + 20", + "ac": "15 (natural armor)", + "speed": "30 ft., climb 30 ft.", + "stats": [ + 18, + 10, + 15, + 6, + 12, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + } + ], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 13", + "languages": "Hook Horror", + "cr": "3", + "traits": [ + { + "name": "Echolocation", + "desc": "The hook horror can't use its blindsight while deafened." + }, + { + "name": "Keen Hearing", + "desc": "The hook horror has advantage on Wisdom (Perception) checks that rely on hearing." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The hook horror makes two hook attacks." + }, + { + "name": "Hook", + "desc": "Melee Weapon Attack +6 to hit, reach 10 ft., one target. 11 (2d6 + 4) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Horned Devil", + { + "image": null, + "bestiary": true, + "name": "Horned Devil", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "devil", + "size": "Large", + "alignment": "lawful evil", + "hp": 178, + "hit_dice": "17d10 + 85", + "ac": "18 (natural armor)", + "speed": "20 ft., fly 60 ft.", + "stats": [ + 22, + 17, + 21, + 12, + 16, + 17 + ], + "damage_immunities": "fire, poison", + "damage_resistances": "cold, bludgeoning, piercing, slashing from nonmagical attacks that aren't silvered", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "strength": "10" + }, + { + "dexterity": "7" + }, + { + "wisdom": "7" + }, + { + "charisma": "7" + } + ], + "skillsaves": [], + "senses": "darkvision 120 ft., passive Perception 13", + "languages": "Infernal, telepathy 120 ft.", + "cr": "11", + "traits": [ + { + "name": "Devil's Sight", + "desc": "Magical darkness doesn't impede the devil's darkvision." + }, + { + "name": "Magic Resistance", + "desc": "The devil has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The devil makes three melee attacks: two with its fork and one with its tail. It can use Hurl Flame in place of any melee attack." + }, + { + "name": "Fork", + "desc": "Melee Weapon Attack +10 to hit, reach 10 ft., one target. 15 (2d8 + 6) piercing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +10 to hit, reach 10 ft., one target. 10 (1d8 + 6) piercing damage. If the target is a creature other than an undead or a construct, it must succeed on a 17 Constitution saving throw or lose 10 (3d6) hit points at the start of each of its turns due to an infernal wound. Each time the devil hits the wounded target with this attack, the damage dealt by the wound increases by 10 (3d6). Any creature can take an action to stanch the wound with a successful 12 Wisdom (Medicine) check. The wound also closes if the target receives magical healing." + }, + { + "name": "Hurl Flame", + "desc": "Ranged Spell Attack +7 to hit, range 150 ft., one target. 14 (4d6) fire damage. If the target is a flammable object that isn't being worn or carried, it also catches fire." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Hunter Shark", + { + "image": null, + "bestiary": true, + "name": "Hunter Shark", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 45, + "hit_dice": "6d10 + 12", + "ac": "12 (natural armor)", + "speed": "0 ft., swim 40 ft.", + "stats": [ + 18, + 13, + 15, + 1, + 10, + 4 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "2" + } + ], + "senses": "blindsight 30 ft., passive Perception 12", + "languages": "", + "cr": "2", + "traits": [ + { + "name": "Blood Frenzy", + "desc": "The shark has advantage on melee attack rolls against any creature that doesn't have all its hit points." + }, + { + "name": "Water Breathing", + "desc": "The shark can breathe only underwater." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 13 (2d8 + 4) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Hydra", + { + "image": null, + "bestiary": true, + "name": "Hydra", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Huge", + "alignment": "unaligned", + "hp": 172, + "hit_dice": "15d12 + 75", + "ac": "15 (natural armor)", + "speed": "30 ft., swim 30 ft.", + "stats": [ + 20, + 12, + 20, + 2, + 10, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "6" + } + ], + "senses": "darkvision 60 ft., passive Perception 16", + "languages": "", + "cr": "8", + "traits": [ + { + "name": "Hold Breath", + "desc": "The hydra can hold its breath for 1 hour." + }, + { + "name": "Multiple Heads", + "desc": "The hydra has five heads. While it has more than one head, the hydra has advantage on saving throws against being blinded, charmed, deafened, frightened, stunned, and knocked unconscious.\nWhenever the hydra takes 25 or more damage in a single turn, one of its heads dies. If all its heads die, the hydra dies.\nAt the end of its turn, it grows two heads for each of its heads that died since its last turn, unless it has taken fire damage since its last turn. The hydra regains 10 hit points for each head regrown in this way." + }, + { + "name": "Reactive Heads", + "desc": "For each head the hydra has beyond one, it gets an extra reaction that can be used only for opportunity attacks." + }, + { + "name": "Wakeful", + "desc": "While the hydra sleeps, at least one of its heads is awake." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The hydra makes as many bite attacks as it has heads." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +8 to hit, reach 10 ft., one target. 10 (1d10 + 5) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Hyena", + { + "image": null, + "bestiary": true, + "name": "Hyena", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 5, + "hit_dice": "1d8 + 1", + "ac": 11, + "speed": "50 ft.", + "stats": [ + 11, + 13, + 12, + 2, + 12, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + } + ], + "senses": "passive Perception 13", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Pack Tactics", + "desc": "The hyena has advantage on an attack roll against a creature if at least one of the hyena's allies is within 5 feet of the creature and the ally isn't incapacitated." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one target. 3 (1d6) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ice Devil", + { + "image": null, + "bestiary": true, + "name": "Ice Devil", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "devil", + "size": "Large", + "alignment": "lawful evil", + "hp": 180, + "hit_dice": "19d10 + 76", + "ac": "18 (natural armor)", + "speed": "40 ft.", + "stats": [ + 21, + 14, + 18, + 18, + 15, + 18 + ], + "damage_immunities": "fire, poison, cold", + "damage_resistances": "bludgeoning, piercing, slashing from nonmagical attacks that aren't silvered", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "dexterity": "7" + }, + { + "constitution": "9" + }, + { + "wisdom": "7" + }, + { + "charisma": "9" + } + ], + "skillsaves": [], + "senses": "blindsight 60 ft., darkvision 120 ft., passive Perception 12", + "languages": "Infernal, telepathy 120 ft.", + "cr": "14", + "traits": [ + { + "name": "Devil's Sight", + "desc": "Magical darkness doesn't impede the devil's darkvision." + }, + { + "name": "Magic Resistance", + "desc": "The devil has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The devil makes three attacks: one with its bite, one with its claws, and one with its tail." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +10 to hit, reach 5 ft., one target. 12 (2d6 + 5) piercing damage plus 10 (3d6) cold damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +10 to hit, reach 5 ft., one target. 10 (2d4 + 5) slashing damage plus 10 (3d6) cold damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +10 to hit, reach 10 ft., one target. 12 (2d6 + 5) bludgeoning damage plus 10 (3d6) cold damage." + }, + { + "name": "Wall of Ice (Recharge 6)", + "desc": "The devil magically forms an opaque wall of ice on a solid surface it can see within 60 feet of it. The wall is 1 foot thick and up to 30 feet long and 10 feet high, or it's a hemispherical dome up to 20 feet in diameter.\nWhen the wall appears, each creature in its space is pushed out of it by the shortest route. The creature chooses which side of the wall to end up on, unless the creature is incapacitated. The creature then makes a 17 Dexterity saving throw, taking 35 (10d6) cold damage on a failed save, or half as much damage on a successful one.\nThe wall lasts for 1 minute or until the devil is incapacitated or dies. The wall can be damaged and breached; each 10-foot section has AC 5, 30 hit points, vulnerability to fire damage, and immunity to acid, cold, necrotic, poison, and psychic damage. If a section is destroyed, it leaves behind a sheet of frigid air in the space the wall occupied. Whenever a creature finishes moving through the frigid air on a turn, willingly or otherwise, the creature must make a 17 Constitution saving throw, taking 17 (5d6) cold damage on a failed save, or half as much damage on a successful one. The frigid air dissipates when the rest of the wall vanishes." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ice Mephit", + { + "image": null, + "bestiary": true, + "name": "Ice Mephit", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Small", + "alignment": "neutral evil", + "hp": 21, + "hit_dice": "6d6", + "ac": 11, + "speed": "30 ft., fly 30 ft.", + "stats": [ + 7, + 13, + 10, + 9, + 11, + 12 + ], + "damage_immunities": "cold, poison", + "damage_resistances": "", + "damage_vulnerabilities": "bludgeoning, fire", + "condition_immunities": "poisoned", + "saves": [], + "skillsaves": [ + { + "perception": "2" + }, + { + "stealth": "3" + } + ], + "senses": "darkvision 60 ft., passive Perception 12", + "languages": "Aquan, Auran", + "cr": "1/2", + "traits": [ + { + "name": "Death Burst", + "desc": "When the mephit dies, it explodes in a burst of jagged ice. Each creature within 5 feet of it must make a 10 Dexterity saving throw, taking 4 (1d8) slashing damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "False Appearance", + "desc": "While the mephit remains motionless, it is indistinguishable from an ordinary shard of ice." + } + ], + "actions": [ + { + "name": "Claws", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one creature. 3 (1d4 + 1) slashing damage plus 2 (1d4) cold damage." + }, + { + "name": "Frost Breath (Recharge 6)", + "desc": "The mephit exhales a 15-foot cone of cold air. Each creature in that area must succeed on a 10 Dexterity saving throw, taking 5 (2d4) cold damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The mephit can innately cast fog cloud, requiring no material components. Its innate spellcasting ability is Charisma.", + { + "At will": "fog cloud" + } + ], + "spellsNotes": "" + } + ], + [ + "Imp", + { + "image": null, + "bestiary": true, + "name": "Imp", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "devil", + "size": "Tiny", + "alignment": "lawful evil", + "hp": 10, + "hit_dice": "3d4 + 3", + "ac": 13, + "speed": "20 ft., fly 40 ft.", + "stats": [ + 6, + 17, + 13, + 11, + 12, + 14 + ], + "damage_immunities": "fire, poison", + "damage_resistances": "cold, bludgeoning, piercing, slashing from nonmagical attacks not made with silvered weapons", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [], + "skillsaves": [ + { + "deception": "4" + }, + { + "insight": "3" + }, + { + "persuasion": "4" + }, + { + "stealth": "5" + } + ], + "senses": "darkvision 120 ft., passive Perception 11", + "languages": "Infernal, Common", + "cr": "1", + "traits": [ + { + "name": "Shapechanger", + "desc": "The imp can use its action to polymorph into a beast form that resembles a rat (speed 20 ft.), a raven (20 ft., fly 60 ft.), or a spider (20 ft., climb 20 ft.), or back into its true form. Its statistics are the same in each form, except for the speed changes noted. Any equipment it is wearing or carrying isn't transformed. It reverts to its true form if it dies." + }, + { + "name": "Devil's Sight", + "desc": "Magical darkness doesn't impede the imp's darkvision." + }, + { + "name": "Magic Resistance", + "desc": "The imp has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Sting (Bite in Beast Form)", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 5 (1d4 + 3) piercing damage, and the target must make a 11 Constitution saving throw, taking 10 (3d6) poison damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Invisibility", + "desc": "The imp magically turns invisible until it attacks, or until its {@status concentration} ends (as if {@status concentration||concentrating} on a spell). Any equipment the imp wears or carries is invisible with it." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Incubus", + { + "image": null, + "bestiary": true, + "name": "Incubus", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "shapechanger", + "size": "Medium", + "alignment": "neutral evil", + "hp": 66, + "hit_dice": "12d8 + 12", + "ac": "15 (natural armor)", + "speed": "30 ft., fly 60 ft.", + "stats": [ + 8, + 17, + 13, + 15, + 12, + 20 + ], + "damage_immunities": "", + "damage_resistances": "cold, fire, lightning, poison, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "deception": "9" + }, + { + "insight": "5" + }, + { + "perception": "5" + }, + { + "persuasion": "9" + }, + { + "stealth": "7" + } + ], + "senses": "darkvision 60 ft., passive Perception 15", + "languages": "Abyssal, Common, Infernal, telepathy 60 ft.", + "cr": "4", + "traits": [ + { + "name": "Telepathic Bond", + "desc": "The fiend ignores the range restriction on its telepathy when communicating with a creature it has charmed. The two don't even need to be on the same plane of existence." + }, + { + "name": "Shapechanger", + "desc": "The fiend can use its action to polymorph into a Small or Medium humanoid, or back into its true form. Without wings, the fiend loses its flying speed. Other than its size and speed, its statistics are the same in each form. Any equipment it is wearing or carrying isn't transformed. It reverts to its true form if it dies." + } + ], + "actions": [ + { + "name": "Claw (Fiend Form Only)", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) slashing damage." + }, + { + "name": "Charm", + "desc": "One humanoid the fiend can see within 30 feet of it must succeed on a 15 Wisdom saving throw or be magically charmed for 1 day. The charmed target obeys the fiend's verbal or telepathic commands. If the target suffers any harm or receives a suicidal command, it can repeat the saving throw, ending the effect on a success. If the target successfully saves against the effect, or if the effect on it ends, the target is immune to this fiend's Charm for the next 24 hours.\nThe fiend can have only one target charmed at a time. If it charms another, the effect on the previous target ends." + }, + { + "name": "Draining Kiss", + "desc": "The fiend kisses a creature charmed by it or a willing creature. The target must make a 15 Constitution saving throw against this magic, taking 32 (5d10 + 5) psychic damage on a failed save, or half as much damage on a successful one. The target's hit point maximum is reduced by an amount equal to the damage taken. This reduction lasts until the target finishes a long rest. The target dies if this effect reduces its hit point maximum to 0." + }, + { + "name": "Etherealness", + "desc": "The fiend magically enters the Ethereal Plane from the Material Plane, or vice versa." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Intellect Devourer", + { + "image": null, + "bestiary": true, + "name": "Intellect Devourer", + "source": [ + "Monster Manual" + ], + "type": "aberration", + "size": "Tiny", + "alignment": "lawful evil", + "hp": 21, + "hit_dice": "6d4 + 6", + "ac": 12, + "speed": "40 ft.", + "stats": [ + 6, + 14, + 13, + 12, + 11, + 10 + ], + "damage_immunities": "", + "damage_resistances": "bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "blinded", + "saves": [], + "skillsaves": [ + { + "perception": "2" + }, + { + "stealth": "4" + } + ], + "senses": "blindsight 60 ft. (blind beyond this radius), passive Perception 12", + "languages": "understands Deep Speech but can't speak, telepathy 60 ft.", + "cr": "2", + "traits": [ + { + "name": "Detect Sentience", + "desc": "The intellect devourer can sense the presence and location of any creature within 300 feet of it that has an Intelligence of 3 or higher, regardless of interposing barriers, unless the creature is protected by a mind blank spell." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The intellect devourer makes one attack with its claws and uses Devour Intellect." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 7 (2d4 + 2) slashing damage." + }, + { + "name": "Devour Intellect", + "desc": "The intellect devourer targets one creature it can see within 10 feet of it that has a brain. The target must succeed on a 12 Intelligence saving throw against this magic or take 11 (2d10) psychic damage. Also on a failure, roll 3d6: If the total equals or exceeds the target's Intelligence score, that score is reduced to 0. The target is stunned until it regains at least one point of Intelligence." + }, + { + "name": "Body Thief", + "desc": "The intellect devourer initiates an Intelligence contest with an incapacitated humanoid within 5 feet of it that isn't protected by protection from evil and good. If it wins the contest, the intellect devourer magically consumes the target's brain, teleports into the target's skull, and takes control of the target's body. While inside a creature, the intellect devourer has Cover against attacks and other effects originating outside its host. The intellect devourer retains its Intelligence, Wisdom, and Charisma scores, as well as its understanding of Deep Speech, its telepathy, and its traits. It otherwise adopts the target's statistics. It knows everything the creature knew, including spells and languages.\nIf the host body dies, the intellect devourer must leave it. A protection from evil and good spell cast on the body drives the intellect devourer out. The intellect devourer is also forced out if the target regains its devoured brain by means of a wish. By spending 5 feet of its movement, the intellect devourer can voluntarily leave the body, teleporting to the nearest unoccupied space within 5 feet of it. The body then dies, unless its brain is restored within 1 round." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Invisible Stalker", + { + "image": null, + "bestiary": true, + "name": "Invisible Stalker", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Medium", + "alignment": "neutral", + "hp": 104, + "hit_dice": "16d8 + 32", + "ac": 14, + "speed": "50 ft., fly 50 ft. (hover)", + "stats": [ + 16, + 19, + 14, + 10, + 15, + 11 + ], + "damage_immunities": "poison", + "damage_resistances": "bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "exhaustion, grappled, paralyzed, petrified, poisoned, prone, restrained, unconscious", + "saves": [], + "skillsaves": [ + { + "perception": "8" + }, + { + "stealth": "10" + } + ], + "senses": "darkvision 60 ft., passive Perception 18", + "languages": "Auran, understands Common but doesn't speak it", + "cr": "6", + "traits": [ + { + "name": "Invisibility", + "desc": "The stalker is invisible." + }, + { + "name": "Faultless Tracker", + "desc": "The stalker is given a quarry by its summoner. The stalker knows the direction and distance to its quarry as long as the two of them are on the same plane of existence. The stalker also knows the location of its summoner." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The stalker makes two slam attacks." + }, + { + "name": "Slam", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 10 (2d6 + 3) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Iron Golem", + { + "image": null, + "bestiary": true, + "name": "Iron Golem", + "source": [ + "Monster Manual" + ], + "type": "construct", + "size": "Large", + "alignment": "unaligned", + "hp": 210, + "hit_dice": "20d10 + 100", + "ac": "20 (natural armor)", + "speed": "30 ft.", + "stats": [ + 24, + 9, + 20, + 3, + 11, + 1 + ], + "damage_immunities": "fire, poison, psychic, bludgeoning, piercing, slashing from nonmagical attacks that aren't adamantine", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, frightened, paralyzed, petrified, poisoned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 120 ft., passive Perception 10", + "languages": "understands the languages of its creator but can't speak", + "cr": "16", + "traits": [ + { + "name": "Fire Absorption", + "desc": "Whenever the golem is subjected to fire damage, it takes no damage and instead regains a number of hit points equal to the fire damage dealt." + }, + { + "name": "Immutable Form", + "desc": "The golem is immune to any spell or effect that would alter its form." + }, + { + "name": "Magic Resistance", + "desc": "The golem has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Magic Weapons", + "desc": "The golem's weapon attacks are magical." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The golem makes two melee attacks." + }, + { + "name": "Slam", + "desc": "Melee Weapon Attack +13 to hit, reach 5 ft., one target. 20 (3d8 + 7) bludgeoning damage." + }, + { + "name": "Sword", + "desc": "Melee Weapon Attack +13 to hit, reach 10 ft., one target. 23 (3d10 + 7) slashing damage." + }, + { + "name": "Poison Breath (Recharge 5-6)", + "desc": "The golem exhales poisonous gas in a 15-foot cone. Each creature in that area must make a 19 Constitution saving throw, taking 45 (10d8) poison damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Jackal", + { + "image": null, + "bestiary": true, + "name": "Jackal", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Small", + "alignment": "unaligned", + "hp": 3, + "hit_dice": "1d6", + "ac": 12, + "speed": "40 ft.", + "stats": [ + 8, + 15, + 11, + 3, + 12, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + } + ], + "senses": "passive Perception 13", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Keen Hearing and Smell", + "desc": "The jackal has advantage on Wisdom (Perception) checks that rely on hearing or smell." + }, + { + "name": "Pack Tactics", + "desc": "The jackal has advantage on an attack roll against a creature if at least one of the jackal's allies is within 5 feet of the creature and the ally isn't incapacitated." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +1 to hit, reach 5 ft., one target. 1 (1d4 - 1) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Jackalwere", + { + "image": null, + "bestiary": true, + "name": "Jackalwere", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "shapechanger", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 18, + "hit_dice": "4d8", + "ac": 12, + "speed": "40 ft.", + "stats": [ + 11, + 15, + 11, + 13, + 11, + 10 + ], + "damage_immunities": "bludgeoning, piercing, slashing from nonmagical attacks that aren't silvered", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "deception": "4" + }, + { + "perception": "2" + }, + { + "stealth": "4" + } + ], + "senses": "passive Perception 12", + "languages": "Common (can't speak in jackal form)", + "cr": "1/2", + "traits": [ + { + "name": "Shapechanger", + "desc": "The jackalwere can use its action to polymorph into a specific Medium human or a jackal-humanoid hybrid, or back into its true form (that of a Small jackal). Other than its size, its statistics are the same in each form. Any equipment it is wearing or carrying isn't transformed. It reverts to its true form if it dies." + }, + { + "name": "Keen Hearing and Smell", + "desc": "The jackalwere has advantage on Wisdom (Perception) checks that rely on hearing or smell." + }, + { + "name": "Pack Tactics", + "desc": "The jackalwere has advantage on an attack roll against a creature if at least one of the jackalwere's allies is within 5 feet of the creature and the ally isn't incapacitated." + } + ], + "actions": [ + { + "name": "Bite (Jackal or Hybrid Form Only)", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 4 (1d4 + 2) piercing damage." + }, + { + "name": "Scimitar (Human or Hybrid Form Only)", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d6 + 2) slashing damage." + }, + { + "name": "Sleep Gaze", + "desc": "The jackalwere gazes at one creature it can see within 30 feet of it. The target must make a 10 Wisdom saving throw. On a failed save, the target succumbs to a magical slumber, falling unconscious for 10 minutes or until someone uses an action to shake the target awake. A creature that successfully saves against the effect is immune to this jackalwere's gaze for the next 24 hours. Undead and creatures immune to being charmed aren't affected by it." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Kenku", + { + "image": null, + "bestiary": true, + "name": "Kenku", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "kenku", + "size": "Medium", + "alignment": "chaotic neutral", + "hp": 13, + "hit_dice": "3d8", + "ac": 13, + "speed": "30 ft.", + "stats": [ + 10, + 16, + 10, + 11, + 10, + 10 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "deception": "4" + }, + { + "perception": "2" + }, + { + "stealth": "5" + } + ], + "senses": "passive Perception 12", + "languages": "understands Auran and Common but speaks only through the use of its Mimicry trait", + "cr": "1/4", + "traits": [ + { + "name": "Ambusher", + "desc": "In the first round of a combat, the kenku has advantage on attack rolls against any creature it {@status surprised}." + }, + { + "name": "Mimicry", + "desc": "The kenku can mimic any sounds it has heard, including voices. A creature that hears the sounds can tell they are imitations with a successful 14 Wisdom (Insight) check." + } + ], + "actions": [ + { + "name": "Shortsword", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) piercing damage." + }, + { + "name": "Shortbow", + "desc": "Ranged Weapon Attack +5 to hit, range 80/320 ft., one target. 6 (1d6 + 3) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Killer Whale", + { + "image": null, + "bestiary": true, + "name": "Killer Whale", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Huge", + "alignment": "unaligned", + "hp": 90, + "hit_dice": "12d12 + 12", + "ac": "12 (natural armor)", + "speed": "0 ft., swim 60 ft.", + "stats": [ + 19, + 10, + 13, + 3, + 12, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + } + ], + "senses": "blindsight 120 ft., passive Perception 13", + "languages": "", + "cr": "3", + "traits": [ + { + "name": "Echolocation", + "desc": "The whale can't use its blindsight while deafened." + }, + { + "name": "Hold Breath", + "desc": "The whale can hold its breath for 30 minutes." + }, + { + "name": "Keen Hearing", + "desc": "The whale has advantage on Wisdom (Perception) checks that rely on hearing." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 21 (5d6 + 4) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Knight", + { + "image": null, + "bestiary": true, + "name": "Knight", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "any alignment", + "hp": 52, + "hit_dice": "8d8 + 16", + "ac": "18 (plate armor)", + "speed": "30 ft.", + "stats": [ + 16, + 11, + 14, + 11, + 11, + 15 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "constitution": "4" + }, + { + "wisdom": "2" + } + ], + "skillsaves": [], + "senses": "passive Perception 10", + "languages": "any one language (usually Common)", + "cr": "3", + "traits": [ + { + "name": "Brave", + "desc": "The knight has advantage on saving throws against being frightened." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The knight makes two melee attacks." + }, + { + "name": "Greatsword", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 10 (2d6 + 3) slashing damage." + }, + { + "name": "Heavy Crossbow", + "desc": "Ranged Weapon Attack +2 to hit, range 100/400 ft., one target. 5 (1d10) piercing damage." + }, + { + "name": "Leadership (Recharges after a Short or Long Rest)", + "desc": "For 1 minute, the knight can utter a special command or warning whenever a nonhostile creature that it can see within 30 feet of it makes an attack roll or a saving throw. The creature can add a d4 to its roll provided it can hear and understand the knight. A creature can benefit from only one Leadership die at a time. This effect ends if the knight is incapacitated." + } + ], + "bonus_actions": [], + "reactions": [ + { + "name": "Parry", + "desc": "The knight adds 2 to its AC against one melee attack that would hit it. To do so, the knight must see the attacker and be wielding a melee weapon." + } + ], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Kobold", + { + "image": null, + "bestiary": true, + "name": "Kobold", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "kobold", + "size": "Small", + "alignment": "lawful evil", + "hp": 5, + "hit_dice": "2d6 - 2", + "ac": 12, + "speed": "30 ft.", + "stats": [ + 7, + 15, + 9, + 8, + 7, + 8 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 8", + "languages": "Common, Draconic", + "cr": "1/8", + "traits": [ + { + "name": "Sunlight Sensitivity", + "desc": "While in sunlight, the kobold has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight." + }, + { + "name": "Pack Tactics", + "desc": "The kobold has advantage on an attack roll against a creature if at least one of the kobold's allies is within 5 feet of the creature and the ally isn't incapacitated." + } + ], + "actions": [ + { + "name": "Dagger", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 4 (1d4 + 2) piercing damage." + }, + { + "name": "Sling", + "desc": "Ranged Weapon Attack +4 to hit, range 30/120 ft., one target. 4 (1d4 + 2) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Kraken", + { + "image": null, + "bestiary": true, + "name": "Kraken", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "subtype": "titan", + "size": "Gargantuan", + "alignment": "chaotic evil", + "hp": 472, + "hit_dice": "27d20 + 189", + "ac": "18 (natural armor)", + "speed": "20 ft., swim 60 ft.", + "stats": [ + 30, + 11, + 25, + 22, + 18, + 20 + ], + "damage_immunities": "lightning, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "frightened, paralyzed", + "saves": [ + { + "strength": "17" + }, + { + "dexterity": "7" + }, + { + "constitution": "14" + }, + { + "intelligence": "13" + }, + { + "wisdom": "11" + } + ], + "skillsaves": [], + "senses": "truesight 120 ft., passive Perception 14", + "languages": "Abyssal, Celestial, Infernal, Primordial, telepathy 120 ft. but can't speak", + "cr": "23", + "traits": [ + { + "name": "Amphibious", + "desc": "The kraken can breathe air and water." + }, + { + "name": "Freedom of Movement", + "desc": "The kraken ignores difficult terrain, and magical effects can't reduce its speed or cause it to be restrained. It can spend 5 feet of movement to escape from nonmagical restraints or being grappled." + }, + { + "name": "Siege Monster", + "desc": "The kraken deals double damage to objects and structures." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The kraken makes three tentacle attacks, each of which it can replace with one use of Fling." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +17 to hit, reach 5 ft., one target. 23 (3d8 + 10) piercing damage. If the target is a Large or smaller creature grappled by the kraken, that creature is swallowed, and the grapple ends. While swallowed, the creature is blinded and restrained, it has Cover against attacks and other effects outside the kraken, and it takes 42 (12d6) acid damage at the start of each of the kraken's turns. If the kraken takes 50 damage or more on a single turn from a creature inside it, the kraken must succeed on a 25 Constitution saving throw at the end of that turn or regurgitate all swallowed creatures, which fall prone in a space within 10 feet of the kraken. If the kraken dies, a swallowed creature is no longer restrained by it and can escape from the corpse using 15 feet of movement, exiting prone." + }, + { + "name": "Tentacle", + "desc": "Melee Weapon Attack +17 to hit, reach 30 ft., one target. 20 (3d6 + 10) bludgeoning damage, and the target is grappled (escape 18). Until this grapple ends, the target is restrained. The kraken has ten tentacles, each of which can grapple one target." + }, + { + "name": "Fling", + "desc": "One Large or smaller object held or creature grappled by the kraken is thrown up to 60 feet in a random direction and knocked prone. If a thrown target strikes a solid surface, the target takes 3 (1d6) bludgeoning damage for every 10 feet it was thrown. If the target is thrown at another creature, that creature must succeed on a 18 Dexterity saving throw or take the same damage and be knocked prone." + }, + { + "name": "Lightning Storm", + "desc": "The kraken magically creates three bolts of lightning, each of which can strike a target the kraken can see within 120 feet of it. A target must make a 23 Dexterity saving throw, taking 22 (4d10) lightning damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Tentacle Attack or Fling", + "desc": "The kraken makes one tentacle attack or uses its Fling." + }, + { + "name": "Lightning Storm (Costs 2 Actions)", + "desc": "The kraken uses Lightning Storm." + }, + { + "name": "Ink Cloud (Costs 3 Actions)", + "desc": "While underwater, the kraken expels an ink cloud in a 60-foot radius. The cloud spreads around corners, and that area is Vision and Light to creatures other than the kraken. Each creature other than the kraken that ends its turn there must succeed on a 23 Constitution saving throw, taking 16 (3d10) poison damage on a failed save, or half as much damage on a successful one. A strong current disperses the cloud, which otherwise disappears at the end of the kraken's next turn." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Kuo-toa", + { + "image": null, + "bestiary": true, + "name": "Kuo-toa", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "kuo-toa", + "size": "Medium", + "alignment": "neutral evil", + "hp": 18, + "hit_dice": "4d8", + "ac": "13 (natural armor, shield)", + "speed": "30 ft., swim 30 ft.", + "stats": [ + 13, + 10, + 11, + 11, + 10, + 8 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "4" + } + ], + "senses": "darkvision 120 ft., passive Perception 14", + "languages": "Undercommon", + "cr": "1/4", + "traits": [ + { + "name": "Amphibious", + "desc": "The kuo-toa can breathe air and water." + }, + { + "name": "Otherworldly Perception", + "desc": "The kuo-toa can sense the presence of any creature within 30 feet of it that is invisible or on the Ethereal Plane. It can pinpoint such a creature that is moving." + }, + { + "name": "Slippery", + "desc": "The kuo-toa has advantage on ability checks and saving throws made to escape a grapple." + }, + { + "name": "Sunlight Sensitivity", + "desc": "While in sunlight, the kuo-toa has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 3 (1d4 + 1) piercing damage." + }, + { + "name": "Spear", + "desc": "Melee / Ranged Weapon Attack +3 to hit, reach 5 ft. or range 20/60 ft., one target. 4 (1d6 + 1) piercing damage, or 5 (1d8 + 1) piercing damage if used with two hands to make a melee attack." + }, + { + "name": "Net", + "desc": "Ranged Weapon Attack +3 to hit, range 5/15 ft., one Large or smaller creature. The target is restrained. A creature can use its action to make a 10 Strength check to free itself or another creature in a net, ending the effect on a success. Dealing 5 slashing damage to the net (AC 10) frees the target without harming it and destroys the net." + } + ], + "bonus_actions": [], + "reactions": [ + { + "name": "Sticky Shield", + "desc": "When a creature misses the kuo-toa with a melee weapon attack, the kuo-toa uses its sticky shield to catch the weapon. The attacker must succeed on a 11 Strength saving throw, or the weapon becomes stuck to the kuo-toa's shield. If the weapon's wielder can't or won't let go of the weapon, the wielder is grappled while the weapon is stuck. While stuck, the weapon can't be used. A creature can pull the weapon free by taking an action to make a 11 Strength check and succeeding." + } + ], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Kuo-toa Archpriest", + { + "image": null, + "bestiary": true, + "name": "Kuo-toa Archpriest", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "kuo-toa", + "size": "Medium", + "alignment": "neutral evil", + "hp": 97, + "hit_dice": "13d8 + 39", + "ac": "13 (natural armor)", + "speed": "30 ft., swim 30 ft.", + "stats": [ + 16, + 14, + 16, + 13, + 16, + 14 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "9" + }, + { + "religion": "7" + } + ], + "senses": "darkvision 120 ft., passive Perception 19", + "languages": "Undercommon", + "cr": "6", + "traits": [ + { + "name": "Amphibious", + "desc": "The kuo-toa can breathe air and water." + }, + { + "name": "Otherworldly Perception", + "desc": "The kuo-toa can sense the presence of any creature within 30 feet of it that is invisible or on the Ethereal Plane. It can pinpoint such a creature that is moving." + }, + { + "name": "Slippery", + "desc": "The kuo-toa has advantage on ability checks and saving throws made to escape a grapple." + }, + { + "name": "Sunlight Sensitivity", + "desc": "While in sunlight, the kuo-toa has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The kuo-toa makes two melee attacks." + }, + { + "name": "Scepter", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 6 (1d6 + 3) bludgeoning damage plus 14 (4d6) lightning damage." + }, + { + "name": "Unarmed Strike", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 5 (1d4 + 3) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The kuo-toa is a 10th-level spellcaster. Its spellcasting ability is Wisdom (spell save 14, +6 to hit with spell attacks). The kuo-toa has the following cleric spells prepared:", + { + "Cantrips (at will)": "guidance, sacred flame, thaumaturgy" + }, + { + "1st level (4 slots)": "detect magic, sanctuary, shield of faith" + }, + { + "2nd level (3 slots)": "hold person, spiritual weapon" + }, + { + "3rd level (3 slots)": "spirit guardians, tongues" + }, + { + "4th level (3 slots)": "control water, divination" + }, + { + "5th level (2 slots)": "mass cure wounds, scrying" + } + ], + "spellsNotes": "" + } + ], + [ + "Kuo-toa Monitor", + { + "image": null, + "bestiary": true, + "name": "Kuo-toa Monitor", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "kuo-toa", + "size": "Medium", + "alignment": "neutral evil", + "hp": 65, + "hit_dice": "10d8 + 20", + "ac": "13 (natural armor, Unarmored Defense)", + "speed": "30 ft., swim 30 ft.", + "stats": [ + 14, + 10, + 14, + 12, + 14, + 11 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "6" + }, + { + "religion": "5" + } + ], + "senses": "darkvision 120 ft., passive Perception 16", + "languages": "Undercommon", + "cr": "3", + "traits": [ + { + "name": "Amphibious", + "desc": "The kuo-toa can breathe air and water." + }, + { + "name": "Otherworldly Perception", + "desc": "The kuo-toa can sense the presence of any creature within 30 feet of it that is invisible or on the Ethereal Plane. It can pinpoint such a creature that is moving." + }, + { + "name": "Slippery", + "desc": "The kuo-toa has advantage on ability checks and saving throws made to escape a grapple." + }, + { + "name": "Sunlight Sensitivity", + "desc": "While in sunlight, the kuo-toa has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight." + }, + { + "name": "Unarmored Defense", + "desc": "The kuo-toa adds its Wisdom modifier to its armor class." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The kuo-toa makes one bite attack and two unarmed strikes." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 4 (1d4 + 2) piercing damage." + }, + { + "name": "Unarmed Strike", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 5 (1d6 + 2) bludgeoning damage plus 3 (1d6) lightning damage, and the target can't take reactions until the end of the kuo-toa's next turn." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Kuo-toa Whip", + { + "image": null, + "bestiary": true, + "name": "Kuo-toa Whip", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "kuo-toa", + "size": "Medium", + "alignment": "neutral evil", + "hp": 65, + "hit_dice": "10d8 + 20", + "ac": "11 (natural armor)", + "speed": "30 ft., swim 30 ft.", + "stats": [ + 14, + 10, + 14, + 12, + 14, + 11 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "6" + }, + { + "religion": "5" + } + ], + "senses": "darkvision 120 ft., passive Perception 16", + "languages": "Undercommon", + "cr": "1", + "traits": [ + { + "name": "Amphibious", + "desc": "The kuo-toa can breathe air and water." + }, + { + "name": "Otherworldly Perception", + "desc": "The kuo-toa can sense the presence of any creature within 30 feet of it that is invisible or on the Ethereal Plane. It can pinpoint such a creature that is moving." + }, + { + "name": "Slippery", + "desc": "The kuo-toa has advantage on ability checks and saving throws made to escape a grapple." + }, + { + "name": "Sunlight Sensitivity", + "desc": "While in sunlight, the kuo-toa has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The kuo-toa makes two attacks: one with its bite and one with its pincer staff." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 4 (1d4 + 2) piercing damage." + }, + { + "name": "Pincer Staff", + "desc": "Melee Weapon Attack +4 to hit, reach 10 ft., one target. 5 (1d6 + 2) piercing damage. If the target is a Medium or smaller creature, it is grappled (escape 14). Until this grapple ends, the kuo-toa can't use its pincer staff on another target." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The kuo-toa is a 2nd-level spellcaster. Its spellcasting ability is Wisdom (spell save 12, +4 to hit with spell attacks). The kuo-toa has the following cleric spells prepared:", + { + "Cantrips (at will)": "sacred flame, thaumaturgy" + }, + { + "1st level (3 slots)": "bane, shield of faith" + } + ], + "spellsNotes": "" + } + ], + [ + "Lamia", + { + "image": null, + "bestiary": true, + "name": "Lamia", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "chaotic evil", + "hp": 97, + "hit_dice": "13d10 + 26", + "ac": "13 (natural armor)", + "speed": "30 ft.", + "stats": [ + 16, + 13, + 15, + 14, + 15, + 16 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "deception": "7" + }, + { + "insight": "4" + }, + { + "stealth": "3" + } + ], + "senses": "darkvision 60 ft., passive Perception 12", + "languages": "Abyssal, Common", + "cr": "4", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The lamia makes two attacks: one with its claws and one with its dagger or Intoxicating Touch." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 14 (2d10 + 3) slashing damage." + }, + { + "name": "Dagger", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 5 (1d4 + 3) piercing damage." + }, + { + "name": "Intoxicating Touch", + "desc": "Melee Spell Attack +5 to hit, reach 5 ft., one creature. The target is magically cursed for 1 hour. Until the curse ends, the target has disadvantage on Wisdom saving throws and all ability checks." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The lamia's innate spellcasting ability is Charisma (spell save 13). It can innately cast the following spells, requiring no material components.", + { + "At will": "disguise self (any humanoid form), major image" + }, + { + "3/day each": "charm person, mirror image, scrying, suggestion" + }, + { + "1/day each": "geas" + } + ], + "spellsNotes": "" + } + ], + [ + "Lemure", + { + "image": null, + "bestiary": true, + "name": "Lemure", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "devil", + "size": "Medium", + "alignment": "lawful evil", + "hp": 13, + "hit_dice": "3d8", + "ac": 7, + "speed": "15 ft.", + "stats": [ + 10, + 5, + 11, + 1, + 11, + 3 + ], + "damage_immunities": "fire, poison", + "damage_resistances": "cold", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, frightened, poisoned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 120 ft., passive Perception 10", + "languages": "understands Infernal but can't speak", + "cr": "0", + "traits": [ + { + "name": "Devil's Sight", + "desc": "Magical darkness doesn't impede the lemure's darkvision." + }, + { + "name": "Hellish Rejuvenation", + "desc": "A lemure that dies in the Nine Hells comes back to life with all its hit points in 1d10 days unless it is killed by a good-aligned creature with a bless spell cast on that creature or its remains are sprinkled with Holy Water (Flask)." + } + ], + "actions": [ + { + "name": "Fist", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 2 (1d4) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Lich", + { + "image": null, + "bestiary": true, + "name": "Lich", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Medium", + "alignment": "lawful neutral (law/chaos axis) chaotic evil", + "hp": 135, + "hit_dice": "18d8 + 54", + "ac": "17 (natural armor)", + "speed": "30 ft.", + "stats": [ + 11, + 16, + 16, + 20, + 14, + 16 + ], + "damage_immunities": "poison, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_resistances": "cold, lightning, necrotic", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, frightened, paralyzed, poisoned", + "saves": [ + { + "constitution": "10" + }, + { + "intelligence": "12" + }, + { + "wisdom": "9" + } + ], + "skillsaves": [ + { + "arcana": "19" + }, + { + "history": "12" + }, + { + "insight": "9" + }, + { + "perception": "9" + } + ], + "senses": "truesight 120 ft., passive Perception 19", + "languages": "Common plus up to five other languages", + "cr": "21", + "traits": [ + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the lich fails a saving throw, it can choose to succeed instead." + }, + { + "name": "Rejuvenation", + "desc": "If it has a phylactery, a destroyed lich gains a new body in 1d10 days, regaining all its hit points and becoming active again. The new body appears within 5 feet of the phylactery." + }, + { + "name": "Turn Resistance", + "desc": "The lich has advantage on saving throws against any effect that turns undead." + } + ], + "actions": [ + { + "name": "Paralyzing Touch", + "desc": "Melee Spell Attack +12 to hit, reach 5 ft., one creature. 10 (3d6) cold damage. The target must succeed on a 18 Constitution saving throw or be paralyzed for 1 minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Cantrip", + "desc": "The lich casts a cantrip." + }, + { + "name": "Paralyzing Touch (Costs 2 Actions)", + "desc": "The lich uses its Paralyzing Touch." + }, + { + "name": "Frightening Gaze (Costs 2 Actions)", + "desc": "The lich fixes its gaze on one creature it can see within 10 feet of it. The target must succeed on a 18 Wisdom saving throw against this magic or become frightened for 1 minute. The frightened target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a target's saving throw is successful or the effect ends for it, the target is immune to the lich's gaze for the next 24 hours." + }, + { + "name": "Disrupt Life (Costs 3 Actions)", + "desc": "Each non-undead creature within 20 feet of the lich must make a 18 Constitution saving throw against this magic, taking 21 (6d6) necrotic damage on a failed save, or half as much damage on a successful one." + } + ], + "mythic_actions": [], + "spells": [ + "The lich is an 18th-level spellcaster. Its spellcasting ability is Intelligence (spell save 20, +12 to hit with spell attacks). The lich has the following wizard spells prepared:", + { + "Cantrips (at will)": "mage hand, prestidigitation, ray of frost" + }, + { + "1st level (4 slots)": "detect magic, magic missile, shield, thunderwave" + }, + { + "2nd level (3 slots)": "detect thoughts, invisibility, Melf's acid arrow, mirror image" + }, + { + "3rd level (3 slots)": "animate dead, counterspell, dispel magic, fireball" + }, + { + "4th level (3 slots)": "blight, dimension door" + }, + { + "5th level (3 slots)": "cloudkill, scrying" + }, + { + "6th level (1 slots)": "disintegrate, globe of invulnerability" + }, + { + "7th level (1 slots)": "finger of death, plane shift" + }, + { + "8th level (1 slots)": "dominate monster, power word stun" + }, + { + "9th level (1 slots)": "power word kill" + } + ], + "spellsNotes": "" + } + ], + [ + "Lion", + { + "image": null, + "bestiary": true, + "name": "Lion", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 26, + "hit_dice": "4d10 + 4", + "ac": 12, + "speed": "50 ft.", + "stats": [ + 17, + 15, + 13, + 3, + 12, + 8 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + }, + { + "stealth": "6" + } + ], + "senses": "passive Perception 13", + "languages": "", + "cr": "1", + "traits": [ + { + "name": "Keen Smell", + "desc": "The lion has advantage on Wisdom (Perception) checks that rely on smell." + }, + { + "name": "Pack Tactics", + "desc": "The lion has advantage on an attack roll against a creature if at least one of the lion's allies is within 5 feet of the creature and the ally isn't incapacitated." + }, + { + "name": "Pounce", + "desc": "If the lion moves at least 20 feet straight toward a creature and then hits it with a claw attack on the same turn, that target must succeed on a 13 Strength saving throw or be knocked prone. If the target is prone, the lion can make one bite attack against it as a bonus action." + }, + { + "name": "Running Leap", + "desc": "With a 10-foot running start, the lion can long jump up to 25 feet." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 7 (1d8 + 3) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Lizard", + { + "image": null, + "bestiary": true, + "name": "Lizard", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Tiny", + "alignment": "unaligned", + "hp": 2, + "hit_dice": "1d4", + "ac": 10, + "speed": "20 ft., climb 20 ft.", + "stats": [ + 2, + 11, + 10, + 1, + 8, + 3 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 30 ft., passive Perception 9", + "languages": "", + "cr": "0", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +0 to hit, reach 5 ft., one target. 1 piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Lizard King", + { + "image": null, + "bestiary": true, + "name": "Lizard King", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "lizardfolk", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 78, + "hit_dice": "12d8 + 24", + "ac": "15 (natural armor)", + "speed": "30 ft., swim 30 ft.", + "stats": [ + 17, + 12, + 15, + 11, + 11, + 15 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "frightened", + "saves": [ + { + "constitution": "4" + }, + { + "wisdom": "2" + } + ], + "skillsaves": [ + { + "perception": "4" + }, + { + "stealth": "5" + }, + { + "survival": "4" + } + ], + "senses": "darkvision 60 ft., passive Perception 14", + "languages": "Abyssal, Draconic", + "cr": "4", + "traits": [ + { + "name": "Hold Breath", + "desc": "The lizardfolk can hold its breath for 15 minutes." + }, + { + "name": "Skewer", + "desc": "Once per turn, when the lizardfolk makes a melee attack with its trident and hits, the target takes an extra 10 (3d6) damage, and the lizardfolk gains temporary hit points equal to the extra damage dealt." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The lizardfolk makes two attacks: one with its bite and one with its claws or trident or two melee attacks with its trident." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) piercing damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 5 (1d4 + 3) slashing damage." + }, + { + "name": "Trident", + "desc": "Melee / Ranged Weapon Attack +5 to hit, reach 5 ft. or range 20/60 ft., one target. 6 (1d6 + 3) piercing damage, or 7 (1d8 + 3) piercing damage if used with two hands to make a melee attack." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Lizard Queen", + { + "image": null, + "bestiary": true, + "name": "Lizard Queen", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "lizardfolk", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 78, + "hit_dice": "12d8 + 24", + "ac": "15 (natural armor)", + "speed": "30 ft., swim 30 ft.", + "stats": [ + 17, + 12, + 15, + 11, + 11, + 15 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "frightened", + "saves": [ + { + "constitution": "4" + }, + { + "wisdom": "2" + } + ], + "skillsaves": [ + { + "perception": "4" + }, + { + "stealth": "5" + }, + { + "survival": "4" + } + ], + "senses": "darkvision 60 ft., passive Perception 14", + "languages": "Abyssal, Draconic", + "cr": "4", + "traits": [ + { + "name": "Hold Breath", + "desc": "The lizardfolk can hold its breath for 15 minutes." + }, + { + "name": "Skewer", + "desc": "Once per turn, when the lizardfolk makes a melee attack with its trident and hits, the target takes an extra 10 (3d6) damage, and the lizardfolk gains temporary hit points equal to the extra damage dealt." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The lizardfolk makes two attacks: one with its bite and one with its claws or trident or two melee attacks with its trident." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) piercing damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 5 (1d4 + 3) slashing damage." + }, + { + "name": "Trident", + "desc": "Melee / Ranged Weapon Attack +5 to hit, reach 5 ft. or range 20/60 ft., one target. 6 (1d6 + 3) piercing damage, or 7 (1d8 + 3) piercing damage if used with two hands to make a melee attack." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Lizardfolk", + { + "image": null, + "bestiary": true, + "name": "Lizardfolk", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "lizardfolk", + "size": "Medium", + "alignment": "neutral", + "hp": 22, + "hit_dice": "4d8 + 4", + "ac": "15 (natural armor, shield)", + "speed": "30 ft., swim 30 ft.", + "stats": [ + 15, + 10, + 13, + 7, + 12, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + }, + { + "stealth": "4" + }, + { + "survival": "5" + } + ], + "senses": "passive Perception 13", + "languages": "Draconic", + "cr": "1/2", + "traits": [ + { + "name": "Hold Breath", + "desc": "The lizardfolk can hold its breath for 15 minutes." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The lizardfolk makes two melee attacks, each one with a different weapon." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d6 + 2) piercing damage." + }, + { + "name": "Heavy Club", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d6 + 2) bludgeoning damage." + }, + { + "name": "Javelin", + "desc": "Melee / Ranged Weapon Attack +4 to hit, reach 5 ft. or range 30/120 ft., one target. 5 (1d6 + 2) piercing damage." + }, + { + "name": "Spiked Shield", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d6 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Lizardfolk Shaman", + { + "image": null, + "bestiary": true, + "name": "Lizardfolk Shaman", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "lizardfolk", + "size": "Medium", + "alignment": "neutral", + "hp": 27, + "hit_dice": "5d8 + 5", + "ac": "13 (natural armor)", + "speed": "30 ft., swim 30 ft.", + "stats": [ + 15, + 10, + 13, + 10, + 15, + 8 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "4" + }, + { + "stealth": "4" + }, + { + "survival": "6" + } + ], + "senses": "passive Perception 14", + "languages": "Draconic", + "cr": "2", + "traits": [ + { + "name": "Hold Breath", + "desc": "The lizardfolk can hold its breath for 15 minutes." + } + ], + "actions": [ + { + "name": "Multiattack (Lizardfolk Form Only)", + "desc": "The lizardfolk makes two attacks: one with its bite and one with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d6 + 2) piercing damage, or 7 (1d10 + 2) piercing damage in crocodile form. If the lizardfolk is in crocodile form and the target is a Large or smaller creature, the target is grappled (escape 12). Until this grapple ends, the target is restrained, and the lizardfolk can't bite another target. If the lizardfolk reverts to its true form, the grapple ends." + }, + { + "name": "Claws (Lizardfolk Form Only)", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 4 (1d4 + 2) slashing damage." + }, + { + "name": "Change Shape (Recharges after a Short or Long Rest)", + "desc": "The lizardfolk magically polymorphs into a crocodile, remaining in that form for up to 1 hour. It can revert to its true form as a bonus action. Its statistics, other than its size, are the same in each form. Any equipment it is wearing or carrying isn't transformed. It reverts to its true form if it dies." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The lizardfolk is a 5th-level spellcaster. Its spellcasting ability is Wisdom (spell save 12, +4 to hit with spell attacks). The lizardfolk has the following druid spells prepared:", + { + "Cantrips (at will)": "druidcraft, produce flame, thorn whip" + }, + { + "1st level (4 slots)": "entangle, fog cloud" + }, + { + "2nd level (3 slots)": "heat metal, spike growth" + }, + { + "3rd level (2 slots)": "conjure animals (reptiles only), plant growth" + } + ], + "spellsNotes": "" + } + ], + [ + "Mage", + { + "image": null, + "bestiary": true, + "name": "Mage", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "any alignment", + "hp": 40, + "hit_dice": "9d8", + "ac": 12, + "speed": "30 ft.", + "stats": [ + 9, + 14, + 11, + 17, + 12, + 11 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "intelligence": "6" + }, + { + "wisdom": "4" + } + ], + "skillsaves": [ + { + "arcana": "6" + }, + { + "history": "6" + } + ], + "senses": "passive Perception 11", + "languages": "any four languages", + "cr": "6", + "traits": [], + "actions": [ + { + "name": "Dagger", + "desc": "Melee / Ranged Weapon Attack +5 to hit, reach 5 ft. or range 20/60 ft., one target. 4 (1d4 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The mage is a 9th-level spellcaster. Its spellcasting ability is Intelligence (spell save 14, +6 to hit with spell attacks). The mage has the following wizard spells prepared:", + { + "Cantrips (at will)": "fire bolt, light, mage hand, prestidigitation" + }, + { + "1st level (4 slots)": "detect magic, mage armor, magic missile, shield" + }, + { + "2nd level (3 slots)": "misty step, suggestion" + }, + { + "3rd level (3 slots)": "counterspell, fireball, fly" + }, + { + "4th level (3 slots)": "greater invisibility, ice storm" + }, + { + "5th level (1 slots)": "cone of cold" + } + ], + "spellsNotes": "" + } + ], + [ + "Magma Mephit", + { + "image": null, + "bestiary": true, + "name": "Magma Mephit", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Small", + "alignment": "neutral evil", + "hp": 22, + "hit_dice": "5d6 + 5", + "ac": 11, + "speed": "30 ft., fly 30 ft.", + "stats": [ + 8, + 12, + 12, + 7, + 10, + 10 + ], + "damage_immunities": "fire, poison", + "damage_resistances": "", + "damage_vulnerabilities": "cold", + "condition_immunities": "poisoned", + "saves": [], + "skillsaves": [ + { + "stealth": "3" + } + ], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Ignan, Terran", + "cr": "1/2", + "traits": [ + { + "name": "Death Burst", + "desc": "When the mephit dies, it explodes in a burst of lava. Each creature within 5 feet of it must make a 11 Dexterity saving throw, taking 7 (2d6) fire damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "False Appearance", + "desc": "While the mephit remains motionless, it is indistinguishable from an ordinary mound of magma." + } + ], + "actions": [ + { + "name": "Claws", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one creature. 3 (1d4 + 1) slashing damage plus 2 (1d4) fire damage." + }, + { + "name": "Fire Breath (Recharge 6)", + "desc": "The mephit exhales a 15-foot cone of fire. Each creature in that area must make a 11 Dexterity saving throw, taking 7 (2d6) fire damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The mephit can innately cast heat metal (spell save 10), requiring no material components. Its innate spellcasting ability is Charisma.", + { + "At will": "heat metal" + } + ], + "spellsNotes": "" + } + ], + [ + "Magmin", + { + "image": null, + "bestiary": true, + "name": "Magmin", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Small", + "alignment": "chaotic neutral", + "hp": 9, + "hit_dice": "2d6 + 2", + "ac": "14 (natural armor)", + "speed": "30 ft.", + "stats": [ + 7, + 15, + 12, + 8, + 11, + 10 + ], + "damage_immunities": "fire", + "damage_resistances": "bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Ignan", + "cr": "1/2", + "traits": [ + { + "name": "Death Burst", + "desc": "When the magmin dies, it explodes in a burst of fire and magma. Each creature within 10 feet of it must make a 11 Dexterity saving throw, taking 7 (2d6) fire damage on a failed save, or half as much damage on a successful one. Flammable objects that aren't being worn or carried in that area are ignited." + }, + { + "name": "Ignited Illumination", + "desc": "As a bonus action, the magmin can set itself ablaze or extinguish its flames. While ablaze, the magmin sheds bright light in a 10-foot radius and dim light for an additional 10 feet." + } + ], + "actions": [ + { + "name": "Touch", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 7 (2d6) fire damage. If the target is a creature or a flammable object, it ignites. Until a creature takes an action to douse the fire, the target takes 3 (1d6) fire damage at the end of each of its turns." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Mammoth", + { + "image": null, + "bestiary": true, + "name": "Mammoth", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Huge", + "alignment": "unaligned", + "hp": 126, + "hit_dice": "11d12 + 55", + "ac": "13 (natural armor)", + "speed": "40 ft.", + "stats": [ + 24, + 9, + 21, + 3, + 11, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 10", + "languages": "", + "cr": "6", + "traits": [ + { + "name": "Trampling Charge", + "desc": "If the mammoth moves at least 20 feet straight toward a creature and then hits it with a gore attack on the same turn, that target must succeed on a 18 Strength saving throw or be knocked prone. If the target is prone, the mammoth can make one stomp attack against it as a bonus action." + } + ], + "actions": [ + { + "name": "Gore", + "desc": "Melee Weapon Attack +10 to hit, reach 10 ft., one target. 25 (4d8 + 7) piercing damage." + }, + { + "name": "Stomp", + "desc": "Melee Weapon Attack +10 to hit, reach 5 ft., one prone creature. 29 (4d10 + 7) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Manes", + { + "image": null, + "bestiary": true, + "name": "Manes", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "demon", + "size": "Small", + "alignment": "chaotic evil", + "hp": 9, + "hit_dice": "2d6 + 2", + "ac": "9 (natural armor)", + "speed": "20 ft.", + "stats": [ + 10, + 9, + 13, + 3, + 8, + 4 + ], + "damage_immunities": "poison", + "damage_resistances": "cold, fire, lightning", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, frightened, poisoned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 9", + "languages": "understands Abyssal but can't speak", + "cr": "1/8", + "traits": [], + "actions": [ + { + "name": "Claws", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one target. 5 (2d4) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Manticore", + { + "image": null, + "bestiary": true, + "name": "Manticore", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "lawful evil", + "hp": 68, + "hit_dice": "8d10 + 24", + "ac": "14 (natural armor)", + "speed": "30 ft., fly 50 ft.", + "stats": [ + 17, + 16, + 17, + 7, + 12, + 8 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 11", + "languages": "Common", + "cr": "3", + "traits": [ + { + "name": "Tail Spike Regrowth", + "desc": "The manticore has twenty-four tail spikes. Used spikes regrow when the manticore finishes a long rest." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The manticore makes three attacks: one with its bite and two with its claws or three with its tail spikes." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 7 (1d8 + 3) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) slashing damage." + }, + { + "name": "Tail Spike", + "desc": "Ranged Weapon Attack +5 to hit, range 100/200 ft., one target. 7 (1d8 + 3) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Marid", + { + "image": null, + "bestiary": true, + "name": "Marid", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Large", + "alignment": "chaotic neutral", + "hp": 229, + "hit_dice": "17d10 + 136", + "ac": "17 (natural armor)", + "speed": "30 ft., fly 60 ft., swim 90 ft.", + "stats": [ + 22, + 12, + 26, + 18, + 17, + 18 + ], + "damage_immunities": "", + "damage_resistances": "acid, cold, lightning", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "5" + }, + { + "wisdom": "7" + }, + { + "charisma": "8" + } + ], + "skillsaves": [], + "senses": "blindsight 30 ft., darkvision 120 ft., passive Perception 13", + "languages": "Aquan", + "cr": "11", + "traits": [ + { + "name": "Amphibious", + "desc": "The marid can breathe air and water." + }, + { + "name": "Elemental Demise", + "desc": "If the marid dies, its body disintegrates into a burst of water and foam, leaving behind only equipment the marid was wearing or carrying." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The marid makes two trident attacks." + }, + { + "name": "Trident", + "desc": "Melee / Ranged Weapon Attack +10 to hit, reach 5 ft. or range 20/60 ft., one target. 13 (2d6 + 6) piercing damage, or 15 (2d8 + 6) piercing damage if used with two hands to make a melee attack." + }, + { + "name": "Water Jet", + "desc": "The marid magically shoots water in a 60-foot line that is 5 feet wide. Each creature in that line must make a 16 Dexterity saving throw. On a failure, a target takes 21 (6d6) bludgeoning damage and, if it is Huge or smaller, is pushed up to 20 feet away from the marid and knocked prone. On a success, a target takes half the bludgeoning damage, but is neither pushed nor knocked prone." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The marid's innate spellcasting ability is Charisma (spell save 16, +8 to hit with spell attacks). It can innately cast the following spells, requiring no material components:", + { + "At will": "create or destroy water, detect evil and good, detect magic, fog cloud, purify food and drink" + }, + { + "3/day each": "tongues, water breathing, water walk" + }, + { + "1/day each": "conjure elemental (water elemental only), control water, gaseous form, invisibility, plane shift" + } + ], + "spellsNotes": "" + } + ], + [ + "Marilith", + { + "image": null, + "bestiary": true, + "name": "Marilith", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "demon", + "size": "Large", + "alignment": "chaotic evil", + "hp": 189, + "hit_dice": "18d10 + 90", + "ac": "18 (natural armor)", + "speed": "40 ft.", + "stats": [ + 18, + 20, + 20, + 18, + 16, + 20 + ], + "damage_immunities": "poison", + "damage_resistances": "cold, fire, lightning, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "strength": "9" + }, + { + "constitution": "10" + }, + { + "wisdom": "8" + }, + { + "charisma": "10" + } + ], + "skillsaves": [], + "senses": "truesight 120 ft., passive Perception 13", + "languages": "Abyssal, telepathy 120 ft.", + "cr": "16", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The marilith has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Magic Weapons", + "desc": "The marilith's weapon attacks are magical." + }, + { + "name": "Reactive", + "desc": "The marilith can take one reaction on every turn in combat." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The marilith can make seven attacks: six with its longswords and one with its tail." + }, + { + "name": "Longsword", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one target. 13 (2d8 + 4) slashing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +9 to hit, reach 10 ft., one creature. 15 (2d10 + 4) bludgeoning damage. If the target is Medium or smaller, it is grappled (escape 19). Until this grapple ends, the target is restrained, the marilith can automatically hit the target with its tail, and the marilith can't make tail attacks against other targets." + }, + { + "name": "Teleport", + "desc": "The marilith magically teleports, along with any equipment it is wearing or carrying, up to 120 feet to an unoccupied space it can see." + } + ], + "bonus_actions": [], + "reactions": [ + { + "name": "Parry", + "desc": "The marilith adds 5 to its AC against one melee attack that would hit it. To do so, the marilith must see the attacker and be wielding a melee weapon." + } + ], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Mastiff", + { + "image": null, + "bestiary": true, + "name": "Mastiff", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 5, + "hit_dice": "1d8 + 1", + "ac": 12, + "speed": "40 ft.", + "stats": [ + 13, + 14, + 12, + 3, + 12, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + } + ], + "senses": "passive Perception 13", + "languages": "", + "cr": "1/8", + "traits": [ + { + "name": "Keen Hearing and Smell", + "desc": "The mastiff has advantage on Wisdom (Perception) checks that rely on hearing or smell." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 4 (1d6 + 1) piercing damage. If the target is a creature, it must succeed on a 11 Strength saving throw or be knocked prone." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Medusa", + { + "image": null, + "bestiary": true, + "name": "Medusa", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Medium", + "alignment": "lawful evil", + "hp": 127, + "hit_dice": "17d8 + 51", + "ac": "15 (natural armor)", + "speed": "30 ft.", + "stats": [ + 10, + 15, + 16, + 12, + 13, + 15 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "deception": "5" + }, + { + "insight": "4" + }, + { + "perception": "4" + }, + { + "stealth": "5" + } + ], + "senses": "darkvision 60 ft., passive Perception 14", + "languages": "Common", + "cr": "6", + "traits": [ + { + "name": "Petrifying Gaze", + "desc": "When a creature that can see the medusa's eyes starts its turn within 30 feet of the medusa, the medusa can force it to make a 14 Constitution saving throw if the medusa isn't incapacitated and can see the creature. If the saving throw fails by 5 or more, the creature is instantly petrified. Otherwise, a creature that fails the save begins to turn to stone and is restrained. The restrained creature must repeat the saving throw at the end of its next turn, becoming petrified on a failure or ending the effect on a success. The petrification lasts until the creature is freed by the greater restoration spell or other magic.\nUnless {@status surprised}, a creature can avert its eyes to avoid the saving throw at the start of its turn. If the creature does so, it can't see the medusa until the start of its next turn, when it can avert its eyes again. If the creature looks at the medusa in the meantime, it must immediately make the save.\nIf the medusa sees itself reflected on a polished surface within 30 feet of it and in an area of bright light, the medusa is, due to its curse, affected by its own gaze." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The medusa makes either three melee attacks—one with its snake hair and two with its shortsword—or two ranged attacks with its longbow." + }, + { + "name": "Snake Hair", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one creature. 4 (1d4 + 2) piercing damage plus 14 (4d6) poison damage." + }, + { + "name": "Shortsword", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 5 (1d6 + 2) piercing damage." + }, + { + "name": "Longbow", + "desc": "Ranged Weapon Attack +5 to hit, range 150/600 ft., one target. 6 (1d8 + 2) piercing damage plus 7 (2d6) poison damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Merfolk", + { + "image": null, + "bestiary": true, + "name": "Merfolk", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "merfolk", + "size": "Medium", + "alignment": "neutral", + "hp": 11, + "hit_dice": "2d8 + 2", + "ac": 11, + "speed": "10 ft., swim 40 ft.", + "stats": [ + 10, + 13, + 12, + 11, + 11, + 12 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "2" + } + ], + "senses": "passive Perception 12", + "languages": "Aquan, Common", + "cr": "1/8", + "traits": [ + { + "name": "Amphibious", + "desc": "The merfolk can breathe air and water." + } + ], + "actions": [ + { + "name": "Spear", + "desc": "Melee / Ranged Weapon Attack +2 to hit, reach 5 ft. or range 20/60 ft., one target. 3 (1d6) piercing damage, or 4 (1d8) piercing damage if used with two hands to make a melee attack." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Merrow", + { + "image": null, + "bestiary": true, + "name": "Merrow", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "chaotic evil", + "hp": 45, + "hit_dice": "6d10 + 12", + "ac": "13 (natural armor)", + "speed": "10 ft., swim 40 ft.", + "stats": [ + 18, + 10, + 15, + 8, + 10, + 9 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Abyssal, Aquan", + "cr": "2", + "traits": [ + { + "name": "Amphibious", + "desc": "The merrow can breathe air and water." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The merrow makes two attacks: one with its bite and one with its claws or harpoon." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 8 (1d8 + 4) piercing damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 9 (2d4 + 4) slashing damage." + }, + { + "name": "Harpoon", + "desc": "Melee / Ranged Weapon Attack +6 to hit, reach 5 ft. or range 20/60 ft., one target. 11 (2d6 + 4) piercing damage. If the target is a Huge or smaller creature, it must succeed on a Strength contest against the merrow or be pulled up to 20 feet toward the merrow." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Mezzoloth", + { + "image": null, + "bestiary": true, + "name": "Mezzoloth", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "yugoloth", + "size": "Medium", + "alignment": "neutral evil", + "hp": 75, + "hit_dice": "10d8 + 30", + "ac": "18 (natural armor)", + "speed": "40 ft.", + "stats": [ + 18, + 11, + 16, + 7, + 10, + 11 + ], + "damage_immunities": "acid, poison", + "damage_resistances": "cold, fire, lightning, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [], + "skillsaves": [ + { + "perception": "3" + } + ], + "senses": "blindsight 60 ft., darkvision 60 ft., passive Perception 13", + "languages": "Abyssal, Infernal, telepathy 60 ft.", + "cr": "5", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The mezzoloth has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Magic Weapons", + "desc": "The mezzoloth's weapon attacks are magical." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The mezzoloth makes two attacks: one with its claws and one with its trident." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 9 (2d4 + 4) slashing damage." + }, + { + "name": "Trident", + "desc": "Melee / Ranged Weapon Attack +7 to hit, reach 5 ft. or range 20/60 ft., one target. 7 (1d6 + 4) piercing damage, or 8 (1d8 + 4) piercing damage when held with two claws and used to make a melee attack." + }, + { + "name": "Teleport", + "desc": "The mezzoloth magically teleports, along with any equipment it is wearing or carrying, up to 60 feet to an unoccupied space it can see." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The mezzoloth's innate spellcasting ability is Charisma (spell save 11). The mezzoloth can innately cast the following spells, requiring no material components:", + { + "2/day each": "darkness, dispel magic" + }, + { + "1/day each": "cloudkill" + } + ], + "spellsNotes": "" + } + ], + [ + "Mimic", + { + "image": null, + "bestiary": true, + "name": "Mimic", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "subtype": "shapechanger", + "size": "Medium", + "alignment": "neutral", + "hp": 58, + "hit_dice": "9d8 + 18", + "ac": "12 (natural armor)", + "speed": "15 ft.", + "stats": [ + 17, + 12, + 15, + 5, + 13, + 8 + ], + "damage_immunities": "acid", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "prone", + "saves": [], + "skillsaves": [ + { + "stealth": "5" + } + ], + "senses": "darkvision 60 ft., passive Perception 11", + "languages": "", + "cr": "2", + "traits": [ + { + "name": "Shapechanger", + "desc": "The mimic can use its action to polymorph into an object or back into its true, amorphous form. Its statistics are the same in each form. Any equipment it is wearing or carrying isn't transformed. It reverts to its true form if it dies." + }, + { + "name": "Adhesive (Object Form Only)", + "desc": "The mimic adheres to anything that touches it. A Huge or smaller creature adhered to the mimic is also grappled by it (escape 13). Ability checks made to escape this grapple have disadvantage." + }, + { + "name": "False Appearance (Object Form Only)", + "desc": "While the mimic remains motionless, it is indistinguishable from an ordinary object." + }, + { + "name": "Grappler", + "desc": "The mimic has advantage on attack rolls against any creature grappled by it." + } + ], + "actions": [ + { + "name": "Pseudopod", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 7 (1d8 + 3) bludgeoning damage. If the mimic is in object form, the target is subjected to its Adhesive trait." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 7 (1d8 + 3) piercing damage plus 4 (1d8) acid damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Mind Flayer", + { + "image": null, + "bestiary": true, + "name": "Mind Flayer", + "source": [ + "Monster Manual" + ], + "type": "aberration", + "size": "Medium", + "alignment": "lawful evil", + "hp": 71, + "hit_dice": "13d8 + 13", + "ac": "15 (breastplate)", + "speed": "30 ft.", + "stats": [ + 11, + 12, + 12, + 19, + 17, + 17 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "intelligence": "7" + }, + { + "wisdom": "6" + }, + { + "charisma": "6" + } + ], + "skillsaves": [ + { + "arcana": "7" + }, + { + "deception": "6" + }, + { + "insight": "6" + }, + { + "perception": "6" + }, + { + "persuasion": "6" + }, + { + "stealth": "4" + } + ], + "senses": "darkvision 120 ft., passive Perception 16", + "languages": "Deep Speech, Undercommon, telepathy 120 ft.", + "cr": "7", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The mind flayer has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Tentacles", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one creature. 15 (2d10 + 4) psychic damage. If the target is Medium or smaller, it is grappled (escape 15) and must succeed on a 15 Intelligence saving throw or be stunned until this grapple ends." + }, + { + "name": "Extract Brain", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one incapacitated humanoid grappled by the mind flayer. The target takes 55 (10d10) piercing damage. If this damage reduces the target to 0 hit points, the mind flayer kills the target by extracting and devouring its brain." + }, + { + "name": "Mind Blast (Recharge 5-6)", + "desc": "The mind flayer magically emits psychic energy in a 60-foot cone. Each creature in that area must succeed on a 15 Intelligence saving throw or take 22 (4d8 + 4) psychic damage and be stunned for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The mind flayer's innate spellcasting ability is Intelligence (spell save 15). It can innately cast the following spells, requiring no components:", + { + "At will": "detect thoughts, levitate" + }, + { + "1/day each": "dominate monster, plane shift (self only)" + } + ], + "spellsNotes": "" + } + ], + [ + "Mind Flayer Arcanist", + { + "image": null, + "bestiary": true, + "name": "Mind Flayer Arcanist", + "source": [ + "Monster Manual" + ], + "type": "aberration", + "size": "Medium", + "alignment": "lawful evil", + "hp": 71, + "hit_dice": "13d8 + 13", + "ac": "15 (breastplate)", + "speed": "30 ft.", + "stats": [ + 11, + 12, + 12, + 19, + 17, + 17 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "intelligence": "7" + }, + { + "wisdom": "6" + }, + { + "charisma": "6" + } + ], + "skillsaves": [ + { + "arcana": "7" + }, + { + "deception": "6" + }, + { + "insight": "6" + }, + { + "perception": "6" + }, + { + "persuasion": "6" + }, + { + "stealth": "4" + } + ], + "senses": "darkvision 120 ft., passive Perception 16", + "languages": "Deep Speech, Undercommon, telepathy 120 ft.", + "cr": "8", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The mind flayer has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Tentacles", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one creature. 15 (2d10 + 4) psychic damage. If the target is Medium or smaller, it is grappled (escape 15) and must succeed on a 15 Intelligence saving throw or be stunned until this grapple ends." + }, + { + "name": "Extract Brain", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one incapacitated humanoid grappled by the mind flayer. The target takes 55 (10d10) piercing damage. If this damage reduces the target to 0 hit points, the mind flayer kills the target by extracting and devouring its brain." + }, + { + "name": "Mind Blast (Recharge 5-6)", + "desc": "The mind flayer magically emits psychic energy in a 60-foot cone. Each creature in that area must succeed on a 15 Intelligence saving throw or take 22 (4d8 + 4) psychic damage and be stunned for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The mind flayer's innate spellcasting ability is Intelligence (spell save 15). It can innately cast the following spells, requiring no components:", + { + "At will": "detect thoughts, levitate" + }, + { + "1/day each": "dominate monster, plane shift (self only)" + }, + "The mind flayer is a 10th-level spellcaster. Its spellcasting ability is Intelligence (save 15, +7 to hit with spell attacks). The mind flayer has the following wizard spells prepared:", + { + "Cantrips (at will)": "blade ward, dancing lights, mage hand, shocking grasp" + }, + { + "1st level (4 slots)": "detect magic, disguise self, shield, sleep" + }, + { + "2nd level (3 slots)": "blur, invisibility, ray of enfeeblement" + }, + { + "3rd level (3 slots)": "clairvoyance, lightning bolt, sending" + }, + { + "4th level (3 slots)": "confusion, hallucinatory terrain" + }, + { + "5th level (2 slots)": "telekinesis, wall of force" + } + ], + "spellsNotes": " " + } + ], + [ + "Minotaur", + { + "image": null, + "bestiary": true, + "name": "Minotaur", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "chaotic evil", + "hp": 76, + "hit_dice": "9d10 + 27", + "ac": "14 (natural armor)", + "speed": "40 ft.", + "stats": [ + 18, + 11, + 16, + 6, + 16, + 9 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "7" + } + ], + "senses": "darkvision 60 ft., passive Perception 17", + "languages": "Abyssal", + "cr": "3", + "traits": [ + { + "name": "Charge", + "desc": "If the minotaur moves at least 10 feet straight toward a target and then hits it with a gore attack on the same turn, the target takes an extra 9 (2d8) piercing damage. If the target is a creature, it must succeed on a 14 Strength saving throw or be pushed up to 10 feet away and knocked prone." + }, + { + "name": "Labyrinthine Recall", + "desc": "The minotaur can perfectly recall any path it has traveled." + }, + { + "name": "Reckless", + "desc": "At the start of its turn, the minotaur can gain advantage on all melee weapon attack rolls it makes during that turn, but attack rolls against it have advantage until the start of its next turn." + } + ], + "actions": [ + { + "name": "Greataxe", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 17 (2d12 + 4) slashing damage." + }, + { + "name": "Gore", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 13 (2d8 + 4) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Minotaur Skeleton", + { + "image": null, + "bestiary": true, + "name": "Minotaur Skeleton", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Large", + "alignment": "lawful evil", + "hp": 67, + "hit_dice": "9d10 + 18", + "ac": "12 (natural armor)", + "speed": "40 ft.", + "stats": [ + 18, + 11, + 15, + 6, + 8, + 5 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "bludgeoning", + "condition_immunities": "exhaustion, poisoned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 9", + "languages": "understands Abyssal but can't speak", + "cr": "2", + "traits": [ + { + "name": "Charge", + "desc": "If the skeleton moves at least 10 feet straight toward a target and then hits it with a gore attack on the same turn, the target takes an extra 9 (2d8) piercing damage. If the target is a creature, it must succeed on a 14 Strength saving throw or be pushed up to 10 feet away and knocked prone." + } + ], + "actions": [ + { + "name": "Greataxe", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 17 (2d12 + 4) slashing damage." + }, + { + "name": "Gore", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 13 (2d8 + 4) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Monodrone", + { + "image": null, + "bestiary": true, + "name": "Monodrone", + "source": [ + "Monster Manual" + ], + "type": "construct", + "size": "Medium", + "alignment": "lawful neutral", + "hp": 5, + "hit_dice": "1d8 + 1", + "ac": "15 (natural armor)", + "speed": "30 ft., fly 30 ft.", + "stats": [ + 10, + 13, + 12, + 4, + 10, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "truesight 120 ft., passive Perception 10", + "languages": "Modron", + "cr": "1/8", + "traits": [ + { + "name": "Axiomatic Mind", + "desc": "The monodrone can't be compelled to act in a manner contrary to its nature or its instructions." + }, + { + "name": "Disintegration", + "desc": "If the monodrone dies, its body disintegrates into dust, leaving behind its weapons and anything else it was carrying." + } + ], + "actions": [ + { + "name": "Dagger", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 3 (1d4 + 1) piercing damage." + }, + { + "name": "Javelin", + "desc": "Melee / Ranged Weapon Attack +2 to hit, reach 5 ft. or range 30/120 ft., one target. 3 (1d6) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Mud Mephit", + { + "image": null, + "bestiary": true, + "name": "Mud Mephit", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Small", + "alignment": "neutral evil", + "hp": 27, + "hit_dice": "6d6 + 6", + "ac": 11, + "speed": "20 ft., fly 20 ft., swim 20 ft.", + "stats": [ + 8, + 12, + 12, + 9, + 11, + 7 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [], + "skillsaves": [ + { + "stealth": "3" + } + ], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Aquan, Terran", + "cr": "1/4", + "traits": [ + { + "name": "Death Burst", + "desc": "When the mephit dies, it explodes in a burst of sticky mud. Each Medium or smaller creature within 5 feet of it must succeed on a 11 Dexterity saving throw or be restrained until the end of the creature's next turn." + }, + { + "name": "False Appearance", + "desc": "While the mephit remains motionless, it is indistinguishable from an ordinary mound of mud." + } + ], + "actions": [ + { + "name": "Fists", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one creature. 4 (1d6 + 1) bludgeoning damage." + }, + { + "name": "Mud Breath (Recharge 6)", + "desc": "The mephit belches viscid mud onto one creature within 5 feet of it. If the target is Medium or smaller, it must succeed on a 11 Dexterity saving throw or be restrained for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Mule", + { + "image": null, + "bestiary": true, + "name": "Mule", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 11, + "hit_dice": "2d8 + 2", + "ac": 10, + "speed": "40 ft.", + "stats": [ + 14, + 10, + 13, + 2, + 10, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 10", + "languages": "", + "cr": "1/8", + "traits": [ + { + "name": "Beast of Burden", + "desc": "The mule is considered to be a Large animal for the purpose of determining its carrying capacity." + }, + { + "name": "Sure-Footed", + "desc": "The mule has advantage on Strength and Dexterity saving throws made against effects that would knock it prone." + } + ], + "actions": [ + { + "name": "Hooves", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one target. 4 (1d4 + 2) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Mummy", + { + "image": null, + "bestiary": true, + "name": "Mummy", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Medium", + "alignment": "lawful evil", + "hp": 58, + "hit_dice": "9d8 + 18", + "ac": "11 (natural armor)", + "speed": "20 ft.", + "stats": [ + 16, + 8, + 15, + 6, + 10, + 12 + ], + "damage_immunities": "necrotic, poison", + "damage_resistances": "bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "fire", + "condition_immunities": "charmed, exhaustion, frightened, paralyzed, poisoned", + "saves": [ + { + "wisdom": "2" + } + ], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "the languages it knew in life", + "cr": "3", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The mummy can use its Dreadful Glare and makes one attack with its rotting fist." + }, + { + "name": "Rotting Fist", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 10 (2d6 + 3) bludgeoning damage plus 10 (3d6) necrotic damage. If the target is a creature, it must succeed on a 12 Constitution saving throw or be cursed with mummy rot. The cursed target can't regain hit points, and its hit point maximum decreases by 10 (3d6) for every 24 hours that elapse. If the curse reduces the target's hit point maximum to 0, the target dies, and its body turns to dust. The curse lasts until removed by the remove curse spell or other magic." + }, + { + "name": "Dreadful Glare", + "desc": "The mummy targets one creature it can see within 60 feet of it. If the target can see the mummy, it must succeed on a 11 Wisdom saving throw against this magic or become frightened until the end of the mummy's next turn. If the target fails the saving throw by 5 or more, it is also paralyzed for the same duration. A target that succeeds on the saving throw is immune to the Dreadful Glare of all mummies (but not mummy lords) for the next 24 hours." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Mummy Lord", + { + "image": null, + "bestiary": true, + "name": "Mummy Lord", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Medium", + "alignment": "lawful evil", + "hp": 97, + "hit_dice": "13d8 + 39", + "ac": "17 (natural armor)", + "speed": "20 ft.", + "stats": [ + 18, + 10, + 17, + 11, + 18, + 16 + ], + "damage_immunities": "necrotic, poison, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_resistances": "", + "damage_vulnerabilities": "fire", + "condition_immunities": "charmed, exhaustion, frightened, paralyzed, poisoned", + "saves": [ + { + "constitution": "8" + }, + { + "intelligence": "5" + }, + { + "wisdom": "9" + }, + { + "charisma": "8" + } + ], + "skillsaves": [ + { + "history": "5" + }, + { + "religion": "5" + } + ], + "senses": "darkvision 60 ft., passive Perception 14", + "languages": "the languages it knew in life", + "cr": "15", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The mummy lord has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Rejuvenation", + "desc": "A destroyed mummy lord gains a new body in 24 hours if its heart is intact, regaining all its hit points and becoming active again. The new body appears within 5 feet of the mummy lord's heart." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The mummy can use its Dreadful Glare and makes one attack with its rotting fist." + }, + { + "name": "Rotting Fist", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one target. 14 (3d6 + 4) bludgeoning damage plus 21 (6d6) necrotic damage. If the target is a creature, it must succeed on a 16 Constitution saving throw or be cursed with mummy rot. The cursed target can't regain hit points, and its hit point maximum decreases by 10 (3d6) for every 24 hours that elapse. If the curse reduces the target's hit point maximum to 0, the target dies, and its body turns to dust. The curse lasts until removed by the remove curse spell or other magic." + }, + { + "name": "Dreadful Glare", + "desc": "The mummy lord targets one creature it can see within 60 feet of it. If the target can see the mummy lord, it must succeed on a 16 Wisdom saving throw against this magic or become frightened until the end of the mummy's next turn. If the target fails the saving throw by 5 or more, it is also paralyzed for the same duration. A target that succeeds on the saving throw is immune to the Dreadful Glare of all mummies and mummy lords for the next 24 hours." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Attack", + "desc": "The mummy lord makes one attack with its rotting fist or uses its Dreadful Glare." + }, + { + "name": "Blinding Dust", + "desc": "Blinding dust and sand swirls magically around the mummy lord. Each creature within 5 feet of the mummy lord must succeed on a 16 Constitution saving throw or be blinded until the end of the creature's next turn." + }, + { + "name": "Blasphemous Word (Costs 2 Actions)", + "desc": "The mummy lord utters a blasphemous word. Each non-undead creature within 10 feet of the mummy lord that can hear the magical utterance must succeed on a 16 Constitution saving throw or be stunned until the end of the mummy lord's next turn." + }, + { + "name": "Channel Negative Energy (Costs 2 Actions)", + "desc": "The mummy lord magically unleashes negative energy. Creatures within 60 feet of the mummy lord, including ones behind barriers and around corners, can't regain hit points until the end of the mummy lord's next turn." + }, + { + "name": "Whirlwind of Sand (Costs 2 Actions)", + "desc": "The mummy lord magically transforms into a whirlwind of sand, moves up to 60 feet, and reverts to its normal form. While in whirlwind form, the mummy lord is immune to all damage, and it can't be grappled, petrified, knocked prone, restrained, or stunned. Equipment worn or carried by the mummy lord remain in its possession." + } + ], + "mythic_actions": [], + "spells": [ + "The mummy lord is a 10th-level spellcaster. Its spellcasting ability is Wisdom (spell save 17, +9 to hit with spell attacks). The mummy lord has the following cleric spells prepared:", + { + "Cantrips (at will)": "sacred flame, thaumaturgy" + }, + { + "1st level (4 slots)": "command, guiding bolt, shield of faith" + }, + { + "2nd level (3 slots)": "hold person, silence, spiritual weapon" + }, + { + "3rd level (3 slots)": "animate dead, dispel magic" + }, + { + "4th level (3 slots)": "divination, guardian of faith" + }, + { + "5th level (2 slots)": "contagion, insect plague" + }, + { + "6th level (1 slots)": "harm" + } + ], + "spellsNotes": "" + } + ], + [ + "Myconid Adult", + { + "image": null, + "bestiary": true, + "name": "Myconid Adult", + "source": [ + "Monster Manual" + ], + "type": "plant", + "size": "Medium", + "alignment": "lawful neutral", + "hp": 22, + "hit_dice": "4d8 + 4", + "ac": "12 (natural armor)", + "speed": "20 ft.", + "stats": [ + 10, + 10, + 12, + 10, + 13, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 120 ft., passive Perception 11", + "languages": "", + "cr": "1/2", + "traits": [ + { + "name": "Distress Spores", + "desc": "When the myconid takes damage, all other myconids within 240 feet of it can sense its pain." + }, + { + "name": "Sun Sickness", + "desc": "While in sunlight, the myconid has disadvantage on ability checks, attack rolls, and saving throws. The myconid dies if it spends more than 1 hour in direct sunlight." + } + ], + "actions": [ + { + "name": "Fist", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one target. 5 (2d4) bludgeoning damage plus 5 (2d4) poison damage." + }, + { + "name": "Pacifying Spores (3/Day)", + "desc": "The myconid ejects spores at one creature it can see within 5 feet of it. The target must succeed on a 11 Constitution saving throw or be stunned for 1 minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "Rapport Spores", + "desc": "A 20-foot radius of spores extends from the myconid. These spores can go around corners and affect only creatures with an Intelligence of 2 or higher that aren't undead, constructs, or elementals. Affected creatures can communicate telepathically with one another while they are within 30 feet of each other. The effect lasts for 1 hour." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Myconid Sovereign", + { + "image": null, + "bestiary": true, + "name": "Myconid Sovereign", + "source": [ + "Monster Manual" + ], + "type": "plant", + "size": "Large", + "alignment": "lawful neutral", + "hp": 60, + "hit_dice": "8d10 + 16", + "ac": "13 (natural armor)", + "speed": "30 ft.", + "stats": [ + 12, + 10, + 14, + 13, + 15, + 10 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 120 ft., passive Perception 12", + "languages": "", + "cr": "2", + "traits": [ + { + "name": "Distress Spores", + "desc": "When the myconid takes damage, all other myconids within 240 feet of it can sense its pain." + }, + { + "name": "Sun Sickness", + "desc": "While in sunlight, the myconid has disadvantage on ability checks, attack rolls, and saving throws. The myconid dies if it spends more than 1 hour in direct sunlight." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The myconid uses either its Hallucination Spores or its Pacifying Spores, then makes a fist attack." + }, + { + "name": "Fist", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 8 (3d4 + 1) bludgeoning damage plus 7 (3d4) poison damage." + }, + { + "name": "Animating Spores (3/Day)", + "desc": "The myconid targets one corpse of a humanoid or a Large or smaller beast within 5 feet of it and releases spores at the corpse. In 24 hours, the corpse rises as a spore servant. The corpse stays animated for 1d4 + 1 weeks or until destroyed, and it can't be animated again in this way." + }, + { + "name": "Hallucination Spores", + "desc": "The myconid ejects spores at one creature it can see within 5 feet of it. The target must succeed on a 12 Constitution saving throw or be poisoned for 1 minute. The poisoned target is incapacitated while it hallucinates. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "Pacifying Spores", + "desc": "The myconid ejects spores at one creature it can see within 5 feet of it. The target must succeed on a 12 Constitution saving throw or be stunned for 1 minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "Rapport Spores", + "desc": "A 30-foot radius of spores extends from the myconid. These spores can go around corners and affect only creatures with an Intelligence of 2 or higher that aren't undead, constructs, or elementals. Affected creatures can communicate telepathically with one another while they are within 30 feet of each other. The effect lasts for 1 hour." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Myconid Sprout", + { + "image": null, + "bestiary": true, + "name": "Myconid Sprout", + "source": [ + "Monster Manual" + ], + "type": "plant", + "size": "Small", + "alignment": "lawful neutral", + "hp": 7, + "hit_dice": "2d6", + "ac": 10, + "speed": "10 ft.", + "stats": [ + 8, + 10, + 10, + 8, + 11, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 120 ft., passive Perception 10", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Distress Spores", + "desc": "When the myconid takes damage, all other myconids within 240 feet of it can sense its pain." + }, + { + "name": "Sun Sickness", + "desc": "While in sunlight, the myconid has disadvantage on ability checks, attack rolls, and saving throws. The myconid dies if it spends more than 1 hour in direct sunlight." + } + ], + "actions": [ + { + "name": "Fist", + "desc": "Melee Weapon Attack +1 to hit, reach 5 ft., one target. 1 (1d4 - 1) bludgeoning damage plus 2 (1d4) poison damage." + }, + { + "name": "Rapport Spores (3/Day)", + "desc": "A 10-foot radius of spores extends from the myconid. These spores can go around corners and affect only creatures with an Intelligence of 2 or higher that aren't undead, constructs, or elementals. Affected creatures can communicate telepathically with one another while they are within 30 feet of each other. The effect lasts for 1 hour." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Nalfeshnee", + { + "image": null, + "bestiary": true, + "name": "Nalfeshnee", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "demon", + "size": "Large", + "alignment": "chaotic evil", + "hp": 184, + "hit_dice": "16d10 + 96", + "ac": "18 (natural armor)", + "speed": "20 ft., fly 30 ft.", + "stats": [ + 21, + 10, + 22, + 19, + 12, + 15 + ], + "damage_immunities": "poison", + "damage_resistances": "cold, fire, lightning, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "constitution": "11" + }, + { + "intelligence": "9" + }, + { + "wisdom": "6" + }, + { + "charisma": "7" + } + ], + "skillsaves": [], + "senses": "truesight 120 ft., passive Perception 11", + "languages": "Abyssal, telepathy 120 ft.", + "cr": "13", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The nalfeshnee has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The nalfeshnee uses Horror Nimbus if it can. It then makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +10 to hit, reach 5 ft., one target. 32 (5d10 + 5) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +10 to hit, reach 10 ft., one target. 15 (3d6 + 5) slashing damage." + }, + { + "name": "Horror Nimbus (Recharge 5-6)", + "desc": "The nalfeshnee magically emits scintillating, multicolored light. Each creature within 15 feet of the nalfeshnee that can see the light must succeed on a 15 Wisdom saving throw or be frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the nalfeshnee's Horror Nimbus for the next 24 hours." + }, + { + "name": "Teleport", + "desc": "The nalfeshnee magically teleports, along with any equipment it is wearing or carrying, up to 120 feet to an unoccupied space it can see." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Needle Blight", + { + "image": null, + "bestiary": true, + "name": "Needle Blight", + "source": [ + "Monster Manual" + ], + "type": "plant", + "size": "Medium", + "alignment": "neutral evil", + "hp": 11, + "hit_dice": "2d8 + 2", + "ac": "12 (natural armor)", + "speed": "30 ft.", + "stats": [ + 12, + 12, + 13, + 4, + 8, + 3 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "blinded, deafened", + "saves": [], + "skillsaves": [], + "senses": "blindsight 60 ft. (blind beyond this radius), passive Perception 9", + "languages": "understands Common but can't speak", + "cr": "1/4", + "traits": [], + "actions": [ + { + "name": "Claws", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 6 (2d4 + 1) piercing damage." + }, + { + "name": "Needles", + "desc": "Ranged Weapon Attack +3 to hit, range 30/60 ft., one target. 8 (2d6 + 1) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Night Hag", + { + "image": null, + "bestiary": true, + "name": "Night Hag", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "size": "Medium", + "alignment": "neutral evil", + "hp": 112, + "hit_dice": "15d8 + 45", + "ac": "17 (natural armor)", + "speed": "30 ft.", + "stats": [ + 18, + 15, + 16, + 16, + 14, + 16 + ], + "damage_immunities": "", + "damage_resistances": "cold, fire, bludgeoning, piercing, slashing from nonmagical attacks that aren't silvered", + "damage_vulnerabilities": "", + "condition_immunities": "charmed", + "saves": [], + "skillsaves": [ + { + "deception": "6" + }, + { + "insight": "5" + }, + { + "perception": "5" + }, + { + "stealth": "5" + } + ], + "senses": "darkvision 120 ft., passive Perception 16", + "languages": "Abyssal, Common, Infernal, Primordial", + "cr": "5", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The hag has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Night Hag Items", + "desc": "A night hag carries two very rare magic items that she must craft for herself. If either object is lost, the night hag will go to great lengths to retrieve it, as creating a new tool takes time and effort." + } + ], + "actions": [ + { + "name": "Claws (Hag Form Only)", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 13 (2d8 + 4) slashing damage." + }, + { + "name": "Change Shape", + "desc": "The hag magically polymorphs into a Small or Medium female humanoid, or back into her true form. Her statistics are the same in each form. Any equipment she is wearing or carrying isn't transformed. She reverts to her true form if she dies." + }, + { + "name": "Etherealness", + "desc": "The hag magically enters the Ethereal Plane from the Material Plane, or vice versa. To do so, the hag must have a heartstone in her possession." + }, + { + "name": "Nightmare Haunting (1/Day)", + "desc": "While on the Ethereal Plane, the hag magically touches a sleeping humanoid on the Material Plane. A protection from evil and good spell cast on the target prevents this contact, as does a magic circle. As long as the contact persists, the target has dreadful visions. If these visions last for at least 1 hour, the target gains no benefit from its rest, and its hit point maximum is reduced by 5 (1d10). If this effect reduces the target's hit point maximum to 0, the target dies, and if the target was evil, its soul is trapped in the hag's soul bag. The reduction to the target's hit point maximum lasts until removed by the greater restoration spell or similar magic." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The hag's innate spellcasting ability is Charisma (spell save 14, +6 to hit with spell attacks). She can innately cast the following spells, requiring no material components:", + { + "At will": "detect magic, magic missile" + }, + { + "2/day each": "plane shift (self only), ray of enfeeblement, sleep" + } + ], + "spellsNotes": "" + } + ], + [ + "Nightmare", + { + "image": null, + "bestiary": true, + "name": "Nightmare", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "size": "Large", + "alignment": "neutral evil", + "hp": 68, + "hit_dice": "8d10 + 24", + "ac": "13 (natural armor)", + "speed": "60 ft., fly 90 ft.", + "stats": [ + 18, + 15, + 16, + 10, + 13, + 15 + ], + "damage_immunities": "fire", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 11", + "languages": "understands Abyssal, Common, and Infernal but can't speak ", + "cr": "3", + "traits": [ + { + "name": "Confer Fire Resistance", + "desc": "The nightmare can grant resistance to fire damage to anyone riding it." + }, + { + "name": "Illumination", + "desc": "The nightmare sheds bright light in a 10-foot radius and dim light for an additional 10 feet." + } + ], + "actions": [ + { + "name": "Hooves", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 13 (2d8 + 4) bludgeoning damage plus 7 (2d6) fire damage." + }, + { + "name": "Ethereal Stride", + "desc": "The nightmare and up to three willing creatures within 5 feet of it magically enter the Ethereal Plane from the Material Plane, or vice versa." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Noble", + { + "image": null, + "bestiary": true, + "name": "Noble", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "any alignment", + "hp": 9, + "hit_dice": "2d8", + "ac": "15 (breastplate)", + "speed": "30 ft.", + "stats": [ + 11, + 12, + 11, + 12, + 14, + 16 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "deception": "5" + }, + { + "insight": "4" + }, + { + "persuasion": "5" + } + ], + "senses": "passive Perception 12", + "languages": "any two languages", + "cr": "1/8", + "traits": [], + "actions": [ + { + "name": "Rapier", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 5 (1d8 + 1) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [ + { + "name": "Parry", + "desc": "The noble adds 2 to its AC against one melee attack that would hit it. To do so, the noble must see the attacker and be wielding a melee weapon." + } + ], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Nothic", + { + "image": null, + "bestiary": true, + "name": "Nothic", + "source": [ + "Monster Manual" + ], + "type": "aberration", + "size": "Medium", + "alignment": "neutral evil", + "hp": 45, + "hit_dice": "6d8 + 18", + "ac": "15 (natural armor)", + "speed": "30 ft.", + "stats": [ + 14, + 16, + 16, + 13, + 10, + 8 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "arcana": "3" + }, + { + "insight": "4" + }, + { + "perception": "2" + }, + { + "stealth": "5" + } + ], + "senses": "truesight 120 ft., passive Perception 12", + "languages": "Undercommon", + "cr": "2", + "traits": [ + { + "name": "Keen Sight", + "desc": "The nothic has advantage on Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The nothic makes two claw attacks." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 6 (1d6 + 3) slashing damage." + }, + { + "name": "Rotting Gaze", + "desc": "The nothic targets one creature it can see within 30 feet of it. The target must succeed on a 12 Constitution saving throw against this magic or take 10 (3d6) necrotic damage." + }, + { + "name": "Weird Insight", + "desc": "The nothic targets one creature it can see within 30 feet of it. The target must contest its Charisma (Deception) check against the nothic's Wisdom (Insight) check. If the nothic wins, it magically learns one fact or secret about the target. The target automatically wins if it is immune to being charmed." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Nycaloth", + { + "image": null, + "bestiary": true, + "name": "Nycaloth", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "yugoloth", + "size": "Large", + "alignment": "neutral evil", + "hp": 123, + "hit_dice": "13d10 + 52", + "ac": "18 (natural armor)", + "speed": "40 ft., fly 60 ft.", + "stats": [ + 20, + 11, + 19, + 12, + 10, + 15 + ], + "damage_immunities": "acid, poison", + "damage_resistances": "cold, fire, lightning, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [], + "skillsaves": [ + { + "intimidation": "6" + }, + { + "perception": "4" + }, + { + "stealth": "4" + } + ], + "senses": "blindsight 60 ft., darkvision 60 ft., passive Perception 14", + "languages": "Abyssal, Infernal, telepathy 60 ft.", + "cr": "9", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The nycaloth has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Magic Weapons", + "desc": "The nycaloth's weapon attacks are magical." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The nycaloth makes two melee attacks, or it makes one melee attack and teleports before or after the attack." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one target. 12 (2d6 + 5) slashing damage. If the target is a creature, it must succeed on a 16 Constitution saving throw or take 5 (2d4) slashing damage at the start of each of its turns due to a fiendish wound. Each time the nycaloth hits the wounded target with this attack, the damage dealt by the wound increases by 5 (2d4). Any creature can take an action to stanch the wound with a successful 13 Wisdom (Medicine) check. The wound also closes if the target receives magical healing." + }, + { + "name": "Greataxe", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one target. 18 (2d12 + 5) slashing damage." + }, + { + "name": "Teleport", + "desc": "The nycaloth magically teleports, along with any equipment it is wearing or carrying, up to 60 feet to an unoccupied space it can see." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The nycaloth's innate spellcasting ability is Charisma. The nycaloth can innately cast the following spells, requiring no material components:", + { + "At will": "darkness, detect magic, dispel magic, invisibility (self only), mirror image" + } + ], + "spellsNotes": "" + } + ], + [ + "Ochre Jelly", + { + "image": null, + "bestiary": true, + "name": "Ochre Jelly", + "source": [ + "Monster Manual" + ], + "type": "ooze", + "size": "Large", + "alignment": "unaligned", + "hp": 45, + "hit_dice": "6d10 + 12", + "ac": 8, + "speed": "10 ft., climb 10 ft.", + "stats": [ + 15, + 6, + 14, + 2, + 6, + 1 + ], + "damage_immunities": "lightning, slashing", + "damage_resistances": "acid", + "damage_vulnerabilities": "", + "condition_immunities": "blinded, charmed, deafened, exhaustion, frightened, prone", + "saves": [], + "skillsaves": [], + "senses": "blindsight 60 ft. (blind beyond this radius), passive Perception 8", + "languages": "", + "cr": "2", + "traits": [ + { + "name": "Amorphous", + "desc": "The jelly can move through a space as narrow as 1 inch wide without squeezing." + }, + { + "name": "Spider Climb", + "desc": "The jelly can climb difficult surfaces, including upside down on ceilings, without needing to make an ability check." + } + ], + "actions": [ + { + "name": "Pseudopod", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 9 (2d6 + 2) bludgeoning damage plus 3 (1d6) acid damage." + } + ], + "bonus_actions": [], + "reactions": [ + { + "name": "Split", + "desc": "When a jelly that is Medium or larger is subjected to lightning or slashing damage, it splits into two new jellies if it has at least 10 hit points. Each new jelly has hit points equal to half the original jelly's, rounded down. New jellies are one size smaller than the original jelly." + } + ], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Octopus", + { + "image": null, + "bestiary": true, + "name": "Octopus", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Small", + "alignment": "unaligned", + "hp": 3, + "hit_dice": "1d6", + "ac": 12, + "speed": "5 ft., swim 30 ft.", + "stats": [ + 4, + 15, + 11, + 3, + 10, + 4 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "2" + }, + { + "stealth": "4" + } + ], + "senses": "darkvision 30 ft., passive Perception 12", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Hold Breath", + "desc": "While out of water, the octopus can hold its breath for 30 minutes." + }, + { + "name": "Underwater Camouflage", + "desc": "The octopus has advantage on Dexterity (Stealth) checks made while underwater." + }, + { + "name": "Water Breathing", + "desc": "The octopus can breathe only underwater." + } + ], + "actions": [ + { + "name": "Tentacles", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 1 bludgeoning damage, and the target is grappled (escape 10). Until this grapple ends, the octopus can't use its tentacles on another target." + }, + { + "name": "Ink Cloud (Recharges after a Short or Long Rest)", + "desc": "A 5-foot-radius cloud of ink extends all around the octopus if it is underwater. The area is Vision and Light for 1 minute, although a significant current can disperse the ink. After releasing the ink, the octopus can use the {@action Dash} action as a bonus action." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ogre", + { + "image": null, + "bestiary": true, + "name": "Ogre", + "source": [ + "Monster Manual" + ], + "type": "giant", + "size": "Large", + "alignment": "chaotic evil", + "hp": 59, + "hit_dice": "7d10 + 21", + "ac": "11 (hide armor)", + "speed": "40 ft.", + "stats": [ + 19, + 8, + 16, + 5, + 7, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 8", + "languages": "Common, Giant", + "cr": "2", + "traits": [], + "actions": [ + { + "name": "Greatclub", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 13 (2d8 + 4) bludgeoning damage." + }, + { + "name": "Javelin", + "desc": "Melee / Ranged Weapon Attack +6 to hit, reach 5 ft. or range 30/120 ft., one target. 11 (2d6 + 4) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ogre Zombie", + { + "image": null, + "bestiary": true, + "name": "Ogre Zombie", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Large", + "alignment": "neutral evil", + "hp": 85, + "hit_dice": "9d10 + 36", + "ac": 8, + "speed": "30 ft.", + "stats": [ + 19, + 6, + 18, + 3, + 6, + 5 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "wisdom": "0" + } + ], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 8", + "languages": "understands Common and Giant but can't speak", + "cr": "2", + "traits": [ + { + "name": "Undead Fortitude", + "desc": "If damage reduces the zombie to 0 hit points, it must make a Constitution saving throw with a DC of 5 + the damage taken, unless the damage is radiant or from a critical hit. On a success, the zombie drops to 1 hit point instead." + } + ], + "actions": [ + { + "name": "Morningstar", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 13 (2d8 + 4) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Oni", + { + "image": null, + "bestiary": true, + "name": "Oni", + "source": [ + "Monster Manual" + ], + "type": "giant", + "size": "Large", + "alignment": "lawful evil", + "hp": 110, + "hit_dice": "13d10 + 39", + "ac": "16 (chain mail)", + "speed": "30 ft., fly 30 ft.", + "stats": [ + 19, + 11, + 16, + 14, + 12, + 15 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "3" + }, + { + "constitution": "6" + }, + { + "wisdom": "4" + }, + { + "charisma": "5" + } + ], + "skillsaves": [ + { + "arcana": "5" + }, + { + "deception": "8" + }, + { + "perception": "4" + } + ], + "senses": "darkvision 60 ft., passive Perception 14", + "languages": "Common, Giant", + "cr": "7", + "traits": [ + { + "name": "Magic Weapons", + "desc": "The oni's weapon attacks are magical." + }, + { + "name": "Regeneration", + "desc": "The oni regains 10 hit points at the start of its turn if it has at least 1 hit point." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The oni makes two attacks, either with its claws or its glaive." + }, + { + "name": "Claw (Oni Form Only)", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 8 (1d8 + 4) slashing damage." + }, + { + "name": "Glaive", + "desc": "Melee Weapon Attack +7 to hit, reach 10 ft., one target. 15 (2d10 + 4) slashing damage, or 9 (1d10 + 4) slashing damage in Small or Medium form." + }, + { + "name": "Change Shape", + "desc": "The oni magically polymorphs into a Small or Medium humanoid, into a Large giant, or back into its true form. Other than its size, its statistics are the same in each form. The only equipment that is transformed is its glaive, which shrinks so that it can be wielded in humanoid form. If the oni dies, it reverts to its true form, and its glaive reverts to its normal size." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The oni's innate spellcasting ability is Charisma (spell save 13). The oni can innately cast the following spells, requiring no material components:", + { + "At will": "darkness, invisibility" + }, + { + "1/day each": "charm person, cone of cold, gaseous form, sleep" + } + ], + "spellsNotes": "" + } + ], + [ + "Orc", + { + "image": null, + "bestiary": true, + "name": "Orc", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "orc", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 15, + "hit_dice": "2d8 + 6", + "ac": "13 (hide armor)", + "speed": "30 ft.", + "stats": [ + 16, + 12, + 16, + 7, + 11, + 10 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "intimidation": "2" + } + ], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Common, Orc", + "cr": "1/2", + "traits": [ + { + "name": "Aggressive", + "desc": "As a bonus action, the orc can move up to its speed toward a hostile creature that it can see." + } + ], + "actions": [ + { + "name": "Greataxe", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 9 (1d12 + 3) slashing damage." + }, + { + "name": "Javelin", + "desc": "Melee / Ranged Weapon Attack +5 to hit, reach 5 ft. or range 30/120 ft., one target. 6 (1d6 + 3) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Orc Eye of Gruumsh", + { + "image": null, + "bestiary": true, + "name": "Orc Eye of Gruumsh", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "orc", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 45, + "hit_dice": "6d8 + 18", + "ac": "16 (ring mail)", + "speed": "30 ft.", + "stats": [ + 16, + 12, + 17, + 9, + 13, + 12 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "intimidation": "3" + }, + { + "religion": "1" + } + ], + "senses": "darkvision 60 ft., passive Perception 11", + "languages": "Common, Orc", + "cr": "2", + "traits": [ + { + "name": "Aggressive", + "desc": "As a bonus action, the orc can move up to its speed toward a hostile creature that it can see." + }, + { + "name": "Gruumsh's Fury", + "desc": "The orc deals an extra 4 (1d8) damage when it hits with a weapon attack (included in the attacks)." + } + ], + "actions": [ + { + "name": "Spear", + "desc": "Melee / Ranged Weapon Attack +5 to hit, reach 5 ft. or range 20/60 ft., one target. 11 (1d6 + 3 plus 1d8) piercing damage, or 12 (2d8 + 3) piercing damage if used with two hands to make a melee attack." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The orc is a 3rd-level spellcaster. Its spellcasting ability is Wisdom (spell save 11, +3 to hit with spell attacks). The orc has the following cleric spells prepared:", + { + "Cantrips (at will)": "guidance, resistance, thaumaturgy" + }, + { + "1st level (4 slots)": "bless, command" + }, + { + "2nd level (2 slots)": "augury, spiritual weapon (spear)" + } + ], + "spellsNotes": "" + } + ], + [ + "Orc War Chief", + { + "image": null, + "bestiary": true, + "name": "Orc War Chief", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "orc", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 93, + "hit_dice": "11d8 + 44", + "ac": "16 (chain mail)", + "speed": "30 ft.", + "stats": [ + 18, + 12, + 18, + 11, + 11, + 16 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "strength": "6" + }, + { + "constitution": "6" + }, + { + "wisdom": "2" + } + ], + "skillsaves": [ + { + "intimidation": "5" + } + ], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Common, Orc", + "cr": "4", + "traits": [ + { + "name": "Aggressive", + "desc": "As a bonus action, the orc can move up to its speed toward a hostile creature that it can see." + }, + { + "name": "Gruumsh's Fury", + "desc": "The orc deals an extra 4 (1d8) damage when it hits with a weapon attack (included in the attacks)." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The orc makes two attacks with its greataxe or its spear." + }, + { + "name": "Greataxe", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 15 (1d12 + 4 plus 1d8) slashing damage." + }, + { + "name": "Spear", + "desc": "Melee / Ranged Weapon Attack +6 to hit, reach 5 ft. or range 20/60 ft., one target. 12 (1d6 + 4 plus 1d8) piercing damage, or 13 (2d8 + 4) piercing damage if used with two hands to make a melee attack." + }, + { + "name": "Battle Cry (1/Day)", + "desc": "Each creature of the war chief's choice that is within 30 feet of it, can hear it, and not already affected by Battle Cry gains advantage on attack rolls until the start of the war chief's next turn. The war chief can then make one attack as a bonus action." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Orog", + { + "image": null, + "bestiary": true, + "name": "Orog", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "orc", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 42, + "hit_dice": "5d8 + 20", + "ac": "18 (plate armor)", + "speed": "30 ft.", + "stats": [ + 18, + 12, + 18, + 12, + 11, + 12 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "intimidation": "5" + }, + { + "survival": "2" + } + ], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Common, Orc", + "cr": "2", + "traits": [ + { + "name": "Aggressive", + "desc": "As a bonus action, the orog can move up to its speed toward a hostile creature that it can see." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The orog makes two greataxe attacks." + }, + { + "name": "Greataxe", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 10 (1d12 + 4) slashing damage." + }, + { + "name": "Javelin", + "desc": "Melee / Ranged Weapon Attack +6 to hit, reach 5 ft. or range 30/120 ft., one target. 7 (1d6 + 4) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Otyugh", + { + "image": null, + "bestiary": true, + "name": "Otyugh", + "source": [ + "Monster Manual" + ], + "type": "aberration", + "size": "Large", + "alignment": "neutral", + "hp": 114, + "hit_dice": "12d10 + 48", + "ac": "14 (natural armor)", + "speed": "30 ft.", + "stats": [ + 16, + 11, + 19, + 6, + 13, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "constitution": "7" + } + ], + "skillsaves": [], + "senses": "darkvision 120 ft., passive Perception 11", + "languages": "Otyugh", + "cr": "5", + "traits": [ + { + "name": "Limited Telepathy", + "desc": "The otyugh can magically transmit simple messages and images to any creature within 120 feet of it that can understand a language. This form of telepathy doesn't allow the receiving creature to telepathically respond." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The otyugh makes three attacks: one with its bite and two with its tentacles." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 12 (2d8 + 3) piercing damage. If the target is a creature, it must succeed on a 15 Constitution saving throw against disease or become poisoned until the disease is cured. Every 24 hours that elapse, the target must repeat the saving throw, reducing its hit point maximum by 5 (1d10) on a failure. The disease is cured on a success. The target dies if the disease reduces its hit point maximum to 0. This reduction to the target's hit point maximum lasts until the disease is cured." + }, + { + "name": "Tentacle", + "desc": "Melee Weapon Attack +6 to hit, reach 10 ft., one target. 7 (1d8 + 3) bludgeoning damage plus 4 (1d8) piercing damage. If the target is Medium or smaller, it is grappled (escape 13) and restrained until the grapple ends. The otyugh has two tentacles, each of which can grapple one target." + }, + { + "name": "Tentacle Slam", + "desc": "The otyugh slams creatures grappled by it into each other or a solid surface. Each creature must succeed on a 14 Constitution saving throw or take 10 (2d6 + 3) bludgeoning damage and be stunned until the end of the otyugh's next turn. On a successful save, the target takes half the bludgeoning damage and isn't stunned." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Owl", + { + "image": null, + "bestiary": true, + "name": "Owl", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Tiny", + "alignment": "unaligned", + "hp": 1, + "hit_dice": "1d4 - 1", + "ac": 11, + "speed": "5 ft., fly 60 ft.", + "stats": [ + 3, + 13, + 8, + 2, + 12, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + }, + { + "stealth": "3" + } + ], + "senses": "darkvision 120 ft., passive Perception 13", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Flyby", + "desc": "The owl doesn't provoke opportunity attacks when it flies out of an enemy's reach." + }, + { + "name": "Keen Hearing and Sight", + "desc": "The owl has advantage on Wisdom (Perception) checks that rely on hearing or sight." + } + ], + "actions": [ + { + "name": "Talons", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 1 slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Owlbear", + { + "image": null, + "bestiary": true, + "name": "Owlbear", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "unaligned", + "hp": 59, + "hit_dice": "7d10 + 21", + "ac": "13 (natural armor)", + "speed": "40 ft.", + "stats": [ + 20, + 12, + 17, + 3, + 12, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + } + ], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "", + "cr": "3", + "traits": [ + { + "name": "Keen Sight and Smell", + "desc": "The owlbear has advantage on Wisdom (Perception) checks that rely on sight or smell." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The owlbear makes two attacks: one with its beak and one with its claws." + }, + { + "name": "Beak", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one creature. 10 (1d10 + 5) piercing damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 14 (2d8 + 5) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Panther", + { + "image": null, + "bestiary": true, + "name": "Panther", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 13, + "hit_dice": "3d8", + "ac": 12, + "speed": "50 ft., climb 40 ft.", + "stats": [ + 14, + 15, + 10, + 3, + 14, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "4" + }, + { + "stealth": "6" + } + ], + "senses": "passive Perception 14", + "languages": "", + "cr": "1/4", + "traits": [ + { + "name": "Keen Smell", + "desc": "The panther has advantage on Wisdom (Perception) checks that rely on smell." + }, + { + "name": "Pounce", + "desc": "If the panther moves at least 20 feet straight toward a creature and then hits it with a claw attack on the same turn, that target must succeed on a 12 Strength saving throw or be knocked prone. If the target is prone, the panther can make one bite attack against it as a bonus action." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d6 + 2) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 4 (1d4 + 2) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Pegasus", + { + "image": null, + "bestiary": true, + "name": "Pegasus", + "source": [ + "Monster Manual" + ], + "type": "celestial", + "size": "Large", + "alignment": "chaotic good", + "hp": 59, + "hit_dice": "7d10 + 21", + "ac": 12, + "speed": "60 ft., fly 90 ft.", + "stats": [ + 18, + 15, + 16, + 10, + 15, + 13 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "4" + }, + { + "wisdom": "4" + }, + { + "charisma": "3" + } + ], + "skillsaves": [ + { + "perception": "6" + } + ], + "senses": "passive Perception 16", + "languages": "understands Celestial, Common, Elvish, and Sylvan but can't speak", + "cr": "2", + "traits": [], + "actions": [ + { + "name": "Hooves", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 11 (2d6 + 4) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Pentadrone", + { + "image": null, + "bestiary": true, + "name": "Pentadrone", + "source": [ + "Monster Manual" + ], + "type": "construct", + "size": "Large", + "alignment": "lawful neutral", + "hp": 32, + "hit_dice": "5d10 + 5", + "ac": "16 (natural armor)", + "speed": "40 ft.", + "stats": [ + 15, + 14, + 12, + 10, + 10, + 13 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "4" + } + ], + "senses": "truesight 120 ft., passive Perception 14", + "languages": "Modron", + "cr": "2", + "traits": [ + { + "name": "Axiomatic Mind", + "desc": "The pentadrone can't be compelled to act in a manner contrary to its nature or its instructions." + }, + { + "name": "Disintegration", + "desc": "If the pentadrone dies, its body disintegrates into dust, leaving behind its weapons and anything else it was carrying." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The pentadrone makes five arm attacks." + }, + { + "name": "Arm", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d6 + 2) bludgeoning damage." + }, + { + "name": "Paralysis Gas (Recharge 5-6)", + "desc": "The pentadrone exhales a 30-foot cone of gas. Each creature in that area must succeed on a 11 Constitution saving throw or be paralyzed for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Peryton", + { + "image": null, + "bestiary": true, + "name": "Peryton", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 33, + "hit_dice": "6d8 + 6", + "ac": "13 (natural armor)", + "speed": "20 ft., fly 60 ft.", + "stats": [ + 16, + 12, + 13, + 9, + 12, + 10 + ], + "damage_immunities": "", + "damage_resistances": "bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "5" + } + ], + "senses": "passive Perception 15", + "languages": "understands Common and Elvish but can't speak", + "cr": "2", + "traits": [ + { + "name": "Dive Attack", + "desc": "If the peryton is flying and dives at least 30 feet straight toward a target and then hits it with a melee weapon attack, the attack deals an extra 9 (2d8) damage to the target." + }, + { + "name": "Flyby", + "desc": "The peryton doesn't provoke an opportunity attack when it flies out of an enemy's reach." + }, + { + "name": "Keen Sight and Smell", + "desc": "The peryton has advantage on Wisdom (Perception) checks that rely on sight or smell." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The peryton makes one gore attack and one talon attack." + }, + { + "name": "Gore", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 7 (1d8 + 3) piercing damage." + }, + { + "name": "Talons", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 8 (2d4 + 3) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Phase Spider", + { + "image": null, + "bestiary": true, + "name": "Phase Spider", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "unaligned", + "hp": 32, + "hit_dice": "5d10 + 5", + "ac": "13 (natural armor)", + "speed": "30 ft., climb 30 ft.", + "stats": [ + 15, + 15, + 12, + 6, + 10, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "stealth": "6" + } + ], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "", + "cr": "3", + "traits": [ + { + "name": "Ethereal Jaunt", + "desc": "As a bonus action, the spider can magically shift from the Material Plane to the Ethereal Plane, or vice versa." + }, + { + "name": "Spider Climb", + "desc": "The spider can climb difficult surfaces, including upside down on ceilings, without needing to make an ability check." + }, + { + "name": "Web Walker", + "desc": "The spider ignores movement restrictions caused by webbing." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 7 (1d10 + 2) piercing damage, and the target must make a 11 Constitution saving throw, taking 18 (4d8) poison damage on a failed save, or half as much damage on a successful one. If the poison damage reduces the target to 0 hit points, the target is stable but poisoned for 1 hour, even after regaining hit points, and is paralyzed while poisoned in this way." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Piercer", + { + "image": null, + "bestiary": true, + "name": "Piercer", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Medium", + "alignment": "unaligned", + "hp": 22, + "hit_dice": "3d8 + 9", + "ac": "15 (natural armor)", + "speed": "5 ft., climb 5 ft.", + "stats": [ + 10, + 13, + 16, + 1, + 7, + 3 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "stealth": "5" + } + ], + "senses": "blindsight 30 ft., darkvision 60 ft., passive Perception 8", + "languages": "", + "cr": "1/2", + "traits": [ + { + "name": "False Appearance", + "desc": "While the piercer remains motionless on the ceiling, it is indistinguishable from a normal stalactite." + }, + { + "name": "Spider Climb", + "desc": "The piercer can climb difficult surfaces, including upside down on ceilings, without needing to make an ability check." + } + ], + "actions": [ + { + "name": "Drop", + "desc": "Melee Weapon Attack +3 to hit, one creature directly underneath the piercer. 3 (1d6) piercing damage per 10 feet fallen, up to 21 (6d6). Miss: The piercer takes half the normal falling damage for the distance fallen." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Pit Fiend", + { + "image": null, + "bestiary": true, + "name": "Pit Fiend", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "devil", + "size": "Large", + "alignment": "lawful evil", + "hp": 300, + "hit_dice": "24d10 + 168", + "ac": "19 (natural armor)", + "speed": "30 ft., fly 60 ft.", + "stats": [ + 26, + 14, + 24, + 22, + 18, + 24 + ], + "damage_immunities": "fire, poison", + "damage_resistances": "cold, bludgeoning, piercing, slashing from nonmagical attacks that aren't silvered", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "dexterity": "8" + }, + { + "constitution": "13" + }, + { + "wisdom": "10" + } + ], + "skillsaves": [], + "senses": "truesight 120 ft., passive Perception 14", + "languages": "Infernal, telepathy 120 ft.", + "cr": "20", + "traits": [ + { + "name": "Fear Aura", + "desc": "Any creature hostile to the pit fiend that starts its turn within 20 feet of the pit fiend must make a 21 Wisdom saving throw, unless the pit fiend is incapacitated. On a failed save, the creature is frightened until the start of its next turn. If a creature's saving throw is successful, the creature is immune to the pit fiend's Fear Aura for the next 24 hours." + }, + { + "name": "Magic Resistance", + "desc": "The pit fiend has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Magic Weapons", + "desc": "The pit fiend's weapon attacks are magical." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The pit fiend makes four attacks: one with its bite, one with its claw, one with its mace, and one with its tail." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +14 to hit, reach 5 ft., one target. 22 (4d6 + 8) piercing damage. The target must succeed on a 21 Constitution saving throw or become poisoned. While poisoned in this way, the target can't regain hit points, and it takes 21 (6d6) poison damage at the start of each of its turns. The poisoned target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +14 to hit, reach 10 ft., one target. 17 (2d8 + 8) slashing damage." + }, + { + "name": "Mace", + "desc": "Melee Weapon Attack +14 to hit, reach 10 ft., one target. 15 (2d6 + 8) bludgeoning damage plus 21 (6d6) fire damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +14 to hit, reach 10 ft., one target. 24 (3d10 + 8) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The pit fiend's spellcasting ability is Charisma (spell save 21). The pit fiend can innately cast the following spells, requiring no material components:", + { + "At will": "detect magic, fireball" + }, + { + "3/day each": "hold monster, wall of fire" + } + ], + "spellsNotes": "" + } + ], + [ + "Pixie", + { + "image": null, + "bestiary": true, + "name": "Pixie", + "source": [ + "Monster Manual" + ], + "type": "fey", + "size": "Tiny", + "alignment": "neutral good", + "hp": 1, + "hit_dice": "1d4 - 1", + "ac": 15, + "speed": "10 ft., fly 30 ft.", + "stats": [ + 2, + 20, + 8, + 10, + 14, + 15 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "4" + }, + { + "stealth": "7" + } + ], + "senses": "passive Perception 14", + "languages": "Sylvan", + "cr": "1/4", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The pixie has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Superior Invisibility", + "desc": "The pixie magically turns invisible until its {@status concentration} ends (as if {@status concentration||concentrating} on a spell). Any equipment the pixie wears or carries is invisible with it." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The pixie's innate spellcasting ability is Charisma (spell save 12). It can innately cast the following spells, requiring only its pixie dust as a component:", + { + "At will": "druidcraft" + }, + { + "1/day each": "confusion, dancing lights, detect evil and good, detect thoughts, dispel magic, entangle, fly, phantasmal force, polymorph, sleep" + } + ], + "spellsNotes": "" + } + ], + [ + "Planetar", + { + "image": null, + "bestiary": true, + "name": "Planetar", + "source": [ + "Monster Manual" + ], + "type": "celestial", + "size": "Large", + "alignment": "lawful good", + "hp": 200, + "hit_dice": "16d10 + 112", + "ac": "19 (natural armor)", + "speed": "40 ft., fly 120 ft.", + "stats": [ + 24, + 20, + 24, + 19, + 22, + 25 + ], + "damage_immunities": "", + "damage_resistances": "radiant, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, frightened", + "saves": [ + { + "constitution": "12" + }, + { + "wisdom": "11" + }, + { + "charisma": "12" + } + ], + "skillsaves": [ + { + "perception": "11" + } + ], + "senses": "truesight 120 ft., passive Perception 21", + "languages": "all, telepathy 120 ft.", + "cr": "16", + "traits": [ + { + "name": "Angelic Weapons", + "desc": "The planetar's weapon attacks are magical. When the planetar hits with any weapon, the weapon deals an extra 5d8 radiant damage (included in the attack)." + }, + { + "name": "Divine Awareness", + "desc": "The planetar knows if it hears a lie." + }, + { + "name": "Magic Resistance", + "desc": "The planetar has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The planetar makes two melee attacks." + }, + { + "name": "Greatsword", + "desc": "Melee Weapon Attack +12 to hit, reach 5 ft., one target. 21 (4d6 + 7) slashing damage plus 22 (5d8) radiant damage." + }, + { + "name": "Healing Touch (4/Day)", + "desc": "The planetar touches another creature. The target magically regains 30 (6d8 + 3) hit points and is freed from any curse, disease, poison, blindness, or deafness." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The planetar's spellcasting ability is Charisma (spell save 20). The planetar can innately cast the following spells, requiring no material components:", + { + "At will": "detect evil and good, invisibility (self only)" + }, + { + "3/day each": "blade barrier, dispel evil and good, flame strike, raise dead" + }, + { + "1/day each": "commune, control weather, insect plague" + } + ], + "spellsNotes": "" + } + ], + [ + "Plesiosaurus", + { + "image": null, + "bestiary": true, + "name": "Plesiosaurus", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 68, + "hit_dice": "8d10 + 24", + "ac": "13 (natural armor)", + "speed": "20 ft., swim 40 ft.", + "stats": [ + 18, + 15, + 16, + 2, + 12, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + }, + { + "stealth": "4" + } + ], + "senses": "passive Perception 13", + "languages": "", + "cr": "2", + "traits": [ + { + "name": "Hold Breath", + "desc": "The plesiosaurus can hold its breath for 1 hour." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 10 ft., one target. 14 (3d6 + 4) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Poisonous Snake", + { + "image": null, + "bestiary": true, + "name": "Poisonous Snake", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Tiny", + "alignment": "unaligned", + "hp": 2, + "hit_dice": "1d4", + "ac": 13, + "speed": "30 ft., swim 30 ft.", + "stats": [ + 2, + 16, + 11, + 1, + 10, + 3 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "blindsight 10 ft., passive Perception 10", + "languages": "", + "cr": "1/8", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 1 piercing damage, and the target must make a 10 Constitution saving throw, taking 5 (2d4) poison damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Polar Bear", + { + "image": null, + "bestiary": true, + "name": "Polar Bear", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 42, + "hit_dice": "5d10 + 15", + "ac": "12 (natural armor)", + "speed": "40 ft., swim 30 ft.", + "stats": [ + 20, + 10, + 16, + 2, + 13, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + } + ], + "senses": "passive Perception 13", + "languages": "", + "cr": "2", + "traits": [ + { + "name": "Keen Smell", + "desc": "The bear has advantage on Wisdom (Perception) checks that rely on smell." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The bear makes two attacks: one with its bite and one with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 9 (1d8 + 5) piercing damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 12 (2d6 + 5) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Poltergeist", + { + "image": null, + "bestiary": true, + "name": "Poltergeist", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 22, + "hit_dice": "5d8", + "ac": 12, + "speed": "0 ft., fly 50 ft. (hover)", + "stats": [ + 1, + 14, + 11, + 10, + 10, + 11 + ], + "damage_immunities": "necrotic, poison", + "damage_resistances": "acid, cold, fire, lightning, thunder, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, grappled, paralyzed, petrified, poisoned, prone, restrained, unconscious", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "understands all languages it knew in life but can't speak", + "cr": "2", + "traits": [ + { + "name": "Incorporeal Movement", + "desc": "The poltergeist can move through other creatures and objects as if they were difficult terrain. It takes 5 (1d10) force damage if it ends its turn inside an object." + }, + { + "name": "Sunlight Sensitivity", + "desc": "While in sunlight, the poltergeist has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight." + }, + { + "name": "Invisibility", + "desc": "The poltergeist is invisible." + } + ], + "actions": [ + { + "name": "Forceful Slam", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 10 (3d6) force damage." + }, + { + "name": "Telekinetic Thrust", + "desc": "The poltergeist targets a creature or unattended object within 30 feet of it. A creature must be Medium or smaller to be affected by this magic, and an object can weigh up to 150 pounds.\nIf the target is a creature, the poltergeist makes a Charisma check contested by the target's Strength check. If the poltergeist wins the contest, the poltergeist hurls the target up to 30 feet in any direction, including upward. If the target then comes into contact with a hard surface or heavy object, the target takes 1d6 damage per 10 feet moved.\nIf the target is an object that isn't being worn or carried, the poltergeist hurls it up to 30 feet in any direction. The poltergeist can use the object as a ranged weapon, attacking one creature along the object's path (+4 to hit) and dealing 5 (2d4) bludgeoning damage on a hit." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Pony", + { + "image": null, + "bestiary": true, + "name": "Pony", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 11, + "hit_dice": "2d8 + 2", + "ac": 10, + "speed": "40 ft.", + "stats": [ + 15, + 10, + 13, + 2, + 11, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 10", + "languages": "", + "cr": "1/8", + "traits": [], + "actions": [ + { + "name": "Hooves", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 7 (2d4 + 2) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Priest", + { + "image": null, + "bestiary": true, + "name": "Priest", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "any alignment", + "hp": 27, + "hit_dice": "5d8 + 5", + "ac": "13 (chain shirt)", + "speed": "30 ft.", + "stats": [ + 10, + 10, + 12, + 13, + 16, + 13 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "medicine": "7" + }, + { + "persuasion": "3" + }, + { + "religion": "5" + } + ], + "senses": "passive Perception 13", + "languages": "any two languages", + "cr": "2", + "traits": [ + { + "name": "Divine Eminence", + "desc": "As a bonus action, the priest can expend a spell slot to cause its melee weapon attacks to magically deal an extra 10 (3d6) radiant damage to a target on a hit. This benefit lasts until the end of the turn. If the priest expends a spell slot of 2nd level or higher, the extra damage increases by 1d6 for each level above 1st." + } + ], + "actions": [ + { + "name": "Mace", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one target. 3 (1d6) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The priest is a 5th-level spellcaster. Its spellcasting ability is Wisdom (spell save 13, +5 to hit with spell attacks). The priest has the following cleric spells prepared:", + { + "Cantrips (at will)": "light, sacred flame, thaumaturgy" + }, + { + "1st level (4 slots)": "cure wounds, guiding bolt, sanctuary" + }, + { + "2nd level (3 slots)": "lesser restoration, spiritual weapon" + }, + { + "3rd level (2 slots)": "dispel magic, spirit guardians" + } + ], + "spellsNotes": "" + } + ], + [ + "Pseudodragon", + { + "image": null, + "bestiary": true, + "name": "Pseudodragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Tiny", + "alignment": "neutral good", + "hp": 7, + "hit_dice": "2d4 + 2", + "ac": 13, + "speed": "15 ft., fly 60 ft.", + "stats": [ + 6, + 15, + 13, + 10, + 12, + 10 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + }, + { + "stealth": "4" + } + ], + "senses": "blindsight 10 ft., darkvision 60 ft., passive Perception 13", + "languages": "understands Common and Draconic but can't speak", + "cr": "1/4", + "traits": [ + { + "name": "Keen Senses", + "desc": "The pseudodragon has advantage on Wisdom (Perception) checks that rely on sight, hearing, or smell." + }, + { + "name": "Magic Resistance", + "desc": "The pseudodragon has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Limited Telepathy", + "desc": "The pseudodragon can magically communicate simple ideas, emotions, and images telepathically with any creature within 100 feet of it that can understand a language." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 4 (1d4 + 2) piercing damage." + }, + { + "name": "Sting", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 4 (1d4 + 2) piercing damage, and the target must succeed on a 11 Constitution saving throw or become poisoned for 1 hour. If the saving throw fails by 5 or more, the target falls unconscious for the same duration, or until it takes damage or another creature uses an action to shake it awake." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Pteranodon", + { + "image": null, + "bestiary": true, + "name": "Pteranodon", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 13, + "hit_dice": "3d8", + "ac": "13 (natural armor)", + "speed": "10 ft., fly 60 ft.", + "stats": [ + 12, + 15, + 10, + 2, + 9, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "1" + } + ], + "senses": "passive Perception 11", + "languages": "", + "cr": "1/4", + "traits": [ + { + "name": "Flyby", + "desc": "The pteranodon doesn't provoke opportunity attacks when it flies out of an enemy's reach." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 6 (2d4 + 1) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Purple Worm", + { + "image": null, + "bestiary": true, + "name": "Purple Worm", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Gargantuan", + "alignment": "unaligned", + "hp": 247, + "hit_dice": "15d20 + 90", + "ac": "18 (natural armor)", + "speed": "50 ft., burrow 30 ft.", + "stats": [ + 28, + 7, + 22, + 1, + 8, + 4 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "constitution": "11" + }, + { + "wisdom": "4" + } + ], + "skillsaves": [], + "senses": "blindsight 30 ft., tremorsense 60 ft., passive Perception 9", + "languages": "", + "cr": "15", + "traits": [ + { + "name": "Tunneler", + "desc": "The worm can burrow through solid rock at half its burrow speed and leaves a 10-foot-diameter tunnel in its wake." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The worm makes two attacks: one with its bite and one with its stinger." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +14 to hit, reach 10 ft., one target. 22 (3d8 + 9) piercing damage. If the target is a Large or smaller creature, it must succeed on a 19 Dexterity saving throw or be swallowed by the worm. A swallowed creature is blinded and restrained, it has Cover against attacks and other effects outside the worm, and it takes 21 (6d6) acid damage at the start of each of the worm's turns.\nIf the worm takes 30 damage or more on a single turn from a creature inside it, the worm must succeed on a 21 Constitution saving throw at the end of that turn or regurgitate all swallowed creatures, which fall prone in a space within 10 feet of the worm. If the worm dies, a swallowed creature is no longer restrained by it and can escape from the corpse by using 20 feet of movement, exiting prone." + }, + { + "name": "Tail Stinger", + "desc": "Melee Weapon Attack +14 to hit, reach 10 ft., one creature. 19 (3d6 + 9) piercing damage, and the target must make a 19 Constitution saving throw, taking 42 (12d6) poison damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Quadrone", + { + "image": null, + "bestiary": true, + "name": "Quadrone", + "source": [ + "Monster Manual" + ], + "type": "construct", + "size": "Medium", + "alignment": "lawful neutral", + "hp": 22, + "hit_dice": "4d8 + 4", + "ac": "16 (natural armor)", + "speed": "30 ft., fly 30 ft.", + "stats": [ + 12, + 14, + 12, + 10, + 10, + 11 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "2" + } + ], + "senses": "truesight 120 ft., passive Perception 12", + "languages": "Modron", + "cr": "1", + "traits": [ + { + "name": "Axiomatic Mind", + "desc": "The quadrone can't be compelled to act in a manner contrary to its nature or its instructions." + }, + { + "name": "Disintegration", + "desc": "If the quadrone dies, its body disintegrates into dust, leaving behind its weapons and anything else it was carrying." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The quadrone makes two fist attacks or four shortbow attacks." + }, + { + "name": "Fist", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 3 (1d4 + 1) bludgeoning damage." + }, + { + "name": "Shortbow", + "desc": "Ranged Weapon Attack +4 to hit, range 80/320 ft., one target. 5 (1d6 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Quaggoth", + { + "image": null, + "bestiary": true, + "name": "Quaggoth", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "quaggoth", + "size": "Medium", + "alignment": "chaotic neutral", + "hp": 45, + "hit_dice": "6d8 + 18", + "ac": "13 (natural armor)", + "speed": "30 ft., climb 30 ft.", + "stats": [ + 17, + 12, + 16, + 6, + 12, + 7 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [], + "skillsaves": [ + { + "athletics": "5" + } + ], + "senses": "darkvision 120 ft., passive Perception 11", + "languages": "Undercommon", + "cr": "2", + "traits": [ + { + "name": "Wounded Fury", + "desc": "While it has 10 hit points or fewer, the quaggoth has advantage on attack rolls. In addition, it deals an extra 7 (2d6) damage to any target it hits with a melee attack." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The quaggoth makes two claw attacks." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Quaggoth Spore Servant", + { + "image": null, + "bestiary": true, + "name": "Quaggoth Spore Servant", + "source": [ + "Monster Manual" + ], + "type": "plant", + "size": "Medium", + "alignment": "unaligned", + "hp": 45, + "hit_dice": "6d8 + 18", + "ac": "13 (natural armor)", + "speed": "20 ft., climb 20 ft.", + "stats": [ + 17, + 12, + 16, + 2, + 6, + 1 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "blinded, charmed, frightened, paralyzed, poisoned", + "saves": [], + "skillsaves": [], + "senses": "blindsight 30 ft. (blind beyond this radius), passive Perception 8", + "languages": "", + "cr": "1", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The spore servant makes two claw attacks." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Quaggoth Thonot", + { + "image": null, + "bestiary": true, + "name": "Quaggoth Thonot", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "quaggoth", + "size": "Medium", + "alignment": "chaotic neutral", + "hp": 45, + "hit_dice": "6d8 + 18", + "ac": "13 (natural armor)", + "speed": "30 ft., climb 30 ft.", + "stats": [ + 17, + 12, + 16, + 6, + 12, + 7 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [], + "skillsaves": [ + { + "athletics": "5" + } + ], + "senses": "darkvision 120 ft., passive Perception 10", + "languages": "Undercommon", + "cr": "3", + "traits": [ + { + "name": "Wounded Fury", + "desc": "While it has 10 hit points or fewer, the quaggoth has advantage on attack rolls. In addition, it deals an extra 7 (2d6) damage to any target it hits with a melee attack." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The quaggoth makes two claw attacks." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The quaggoth's innate spellcasting ability is Wisdom (spell save 11). The quaggoth can innately cast the following spells, requiring no components:", + { + "At will": "feather fall, mage hand (the hand is invisible)" + }, + { + "1/day each": "cure wounds, enlarge/reduce, heat metal, mirror image" + } + ], + "spellsNotes": "" + } + ], + [ + "Quasit", + { + "image": null, + "bestiary": true, + "name": "Quasit", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "demon", + "size": "Tiny", + "alignment": "chaotic evil", + "hp": 7, + "hit_dice": "3d4", + "ac": 13, + "speed": "40 ft.", + "stats": [ + 5, + 17, + 10, + 7, + 10, + 10 + ], + "damage_immunities": "poison", + "damage_resistances": "cold, fire, lightning, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [], + "skillsaves": [ + { + "stealth": "5" + } + ], + "senses": "darkvision 120 ft., passive Perception 10", + "languages": "Abyssal, Common", + "cr": "1", + "traits": [ + { + "name": "Shapechanger", + "desc": "The quasit can use its action to polymorph into a beast form that resembles a bat (speed 10 ft. fly 40 ft.), a centipede (40 ft., climb 40 ft.), or a toad (40 ft., swim 40 ft.), or back into its true form. Its statistics are the same in each form, except for the speed changes noted. Any equipment it is wearing or carrying isn't transformed. It reverts to its true form if it dies." + }, + { + "name": "Magic Resistance", + "desc": "The quasit has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Claw (Bite in Beast Form)", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d4 + 3) piercing damage, and the target must succeed on a 10 Constitution saving throw or take 5 (2d4) poison damage and become poisoned for 1 minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "Scare (1/Day)", + "desc": "One creature of the quasit's choice within 20 feet of it must succeed on a 10 Wisdom saving throw or be frightened for 1 minute. The target can repeat the saving throw at the end of each of its turns, with disadvantage if the quasit is within line of sight, ending the effect on itself on a success." + }, + { + "name": "Invisibility", + "desc": "The quasit magically turns invisible until it attacks or uses Scare, or until its {@status concentration} ends (as if {@status concentration||concentrating} on a spell). Any equipment the quasit wears or carries is invisible with it." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Quipper", + { + "image": null, + "bestiary": true, + "name": "Quipper", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Tiny", + "alignment": "unaligned", + "hp": 1, + "hit_dice": "1d4 - 1", + "ac": 13, + "speed": "0 ft., swim 40 ft.", + "stats": [ + 2, + 16, + 9, + 1, + 7, + 2 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 8", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Blood Frenzy", + "desc": "The quipper has advantage on melee attack rolls against any creature that doesn't have all its hit points." + }, + { + "name": "Water Breathing", + "desc": "The quipper can breathe only underwater." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 1 piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Rakshasa", + { + "image": null, + "bestiary": true, + "name": "Rakshasa", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "size": "Medium", + "alignment": "lawful evil", + "hp": 110, + "hit_dice": "13d8 + 52", + "ac": "16 (natural armor)", + "speed": "40 ft.", + "stats": [ + 14, + 17, + 18, + 13, + 16, + 20 + ], + "damage_immunities": "bludgeoning, piercing, slashing from nonmagical attacks", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "deception": "10" + }, + { + "insight": "8" + } + ], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "Common, Infernal", + "cr": "13", + "traits": [ + { + "name": "Limited Magic Immunity", + "desc": "The rakshasa can't be affected or detected by spells of 6th level or lower unless it wishes to be. It has advantage on saving throws against all other spells and magical effects." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The rakshasa makes two claw attacks." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 9 (2d6 + 2) slashing damage, and the target is cursed if it is a creature. The magical curse takes effect whenever the target takes a short or long rest, filling the target's thoughts with horrible images and dreams. The cursed target gains no benefit from finishing a short or long rest. The curse lasts until it is lifted by a remove curse spell or similar magic." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The rakshasa's innate spellcasting ability is Charisma (spell save 18, +10 to hit with spell attacks). The rakshasa can innately cast the following spells, requiring no material components:", + { + "At will": "detect thoughts, disguise self, mage hand, minor illusion" + }, + { + "3/day each": "charm person, detect magic, invisibility, major image, suggestion" + }, + { + "1/day each": "dominate person, fly, plane shift, true seeing" + } + ], + "spellsNotes": "" + } + ], + [ + "Rat", + { + "image": null, + "bestiary": true, + "name": "Rat", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Tiny", + "alignment": "unaligned", + "hp": 1, + "hit_dice": "1d4 - 1", + "ac": 10, + "speed": "20 ft.", + "stats": [ + 2, + 11, + 9, + 2, + 10, + 4 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 30 ft., passive Perception 10", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Keen Smell", + "desc": "The rat has advantage on Wisdom (Perception) checks that rely on smell." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +0 to hit, reach 5 ft., one target. 1 piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Raven", + { + "image": null, + "bestiary": true, + "name": "Raven", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Tiny", + "alignment": "unaligned", + "hp": 1, + "hit_dice": "1d4 - 1", + "ac": 12, + "speed": "10 ft., fly 50 ft.", + "stats": [ + 2, + 14, + 8, + 2, + 12, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + } + ], + "senses": "passive Perception 13", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Mimicry", + "desc": "The raven can mimic simple sounds it has heard, such as a person whispering, a baby crying, or an animal chittering. A creature that hears the sounds can tell they are imitations with a successful 10 Wisdom (Insight) check." + } + ], + "actions": [ + { + "name": "Beak", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 1 piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Red Dragon Wyrmling", + { + "image": null, + "bestiary": true, + "name": "Red Dragon Wyrmling", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 75, + "hit_dice": "10d8 + 30", + "ac": "17 (natural armor)", + "speed": "30 ft., climb 30 ft., fly 60 ft.", + "stats": [ + 19, + 10, + 17, + 12, + 11, + 15 + ], + "damage_immunities": "fire", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "2" + }, + { + "constitution": "5" + }, + { + "wisdom": "2" + }, + { + "charisma": "4" + } + ], + "skillsaves": [ + { + "perception": "4" + }, + { + "stealth": "2" + } + ], + "senses": "blindsight 10 ft., darkvision 60 ft., passive Perception 14", + "languages": "Draconic", + "cr": "4", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 9 (1d10 + 4) piercing damage plus 3 (1d6) fire damage." + }, + { + "name": "Fire Breath (Recharge 5-6)", + "desc": "The dragon exhales fire in a 15-foot cone. Each creature in that area must make a 13 Dexterity saving throw, taking 24 (7d6) fire damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Red Slaad", + { + "image": null, + "bestiary": true, + "name": "Red Slaad", + "source": [ + "Monster Manual" + ], + "type": "aberration", + "size": "Large", + "alignment": "chaotic neutral", + "hp": 93, + "hit_dice": "11d10 + 33", + "ac": "14 (natural armor)", + "speed": "30 ft.", + "stats": [ + 16, + 12, + 16, + 6, + 6, + 7 + ], + "damage_immunities": "", + "damage_resistances": "acid, cold, fire, lightning, thunder", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "1" + } + ], + "senses": "darkvision 60 ft., passive Perception 11", + "languages": "Slaad, telepathy 60 ft.", + "cr": "5", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The slaad has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Regeneration", + "desc": "The slaad regains 10 hit points at the start of its turn if it has at least 1 hit point." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The slaad makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 8 (2d4 + 3) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 7 (1d8 + 3) piercing damage. If the target is a humanoid, it must succeed on a 14 Constitution saving throw or be infected with a disease—a minuscule slaad egg.\nA humanoid host can carry only one slaad egg to term at a time. Over three months, the egg moves to the chest cavity, gestates, and forms a slaad tadpole. In the 24-hour period before giving birth, the host starts to feel unwell, its speed is halved, and it has disadvantage on attack rolls, ability checks, and saving throws. At birth, the tadpole chews its way through vital organs and out of the host's chest in 1 round, killing the host in the process.\nIf the disease is cured before the tadpole's emergence, the unborn slaad is disintegrated." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Reef Shark", + { + "image": null, + "bestiary": true, + "name": "Reef Shark", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 22, + "hit_dice": "4d8 + 4", + "ac": "12 (natural armor)", + "speed": "0 ft., swim 40 ft.", + "stats": [ + 14, + 13, + 13, + 1, + 10, + 4 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "2" + } + ], + "senses": "blindsight 30 ft., passive Perception 12", + "languages": "", + "cr": "1/2", + "traits": [ + { + "name": "Pack Tactics", + "desc": "The shark has advantage on an attack roll against a creature if at least one of the shark's allies is within 5 feet of the creature and the ally isn't incapacitated." + }, + { + "name": "Water Breathing", + "desc": "The shark can breathe only underwater." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 6 (1d8 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Remorhaz", + { + "image": null, + "bestiary": true, + "name": "Remorhaz", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Huge", + "alignment": "unaligned", + "hp": 195, + "hit_dice": "17d12 + 85", + "ac": "17 (natural armor)", + "speed": "30 ft., burrow 20 ft.", + "stats": [ + 24, + 13, + 21, + 4, + 10, + 5 + ], + "damage_immunities": "cold, fire", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., tremorsense 60 ft., passive Perception 10", + "languages": "", + "cr": "11", + "traits": [ + { + "name": "Heated Body", + "desc": "A creature that touches the remorhaz or hits it with a melee attack while within 5 feet of it takes 10 (3d6) fire damage." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +11 to hit, reach 10 ft., one target. 40 (6d10 + 7) piercing damage plus 10 (3d6) fire damage. If the target is a creature, it is grappled (escape 17). Until this grapple ends, the target is restrained, and the remorhaz can't bite another target." + }, + { + "name": "Swallow", + "desc": "The remorhaz makes one bite attack against a Medium or smaller creature it is grappling. If the attack hits, that creature takes the bite's damage and is swallowed, and the grapple ends. While swallowed, the creature is blinded and restrained, it has Cover against attacks and other effects outside the remorhaz, and it takes 21 (6d6) acid damage at the start of each of the remorhaz's turns.\nIf the remorhaz takes 30 damage or more on a single turn from a creature inside it, the remorhaz must succeed on a 15 Constitution saving throw at the end of that turn or regurgitate all swallowed creatures, which fall prone in a space within 10 feet of the remorhaz. If the remorhaz dies, a swallowed creature is no longer restrained by it and can escape from the corpse using 15 feet of movement, exiting prone." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Revenant", + { + "image": null, + "bestiary": true, + "name": "Revenant", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Medium", + "alignment": "neutral", + "hp": 136, + "hit_dice": "16d8 + 64", + "ac": "13 (leather armor)", + "speed": "30 ft.", + "stats": [ + 18, + 14, + 18, + 13, + 16, + 18 + ], + "damage_immunities": "poison", + "damage_resistances": "necrotic, psychic", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, frightened, paralyzed, poisoned, stunned", + "saves": [ + { + "strength": "7" + }, + { + "constitution": "7" + }, + { + "wisdom": "6" + }, + { + "charisma": "7" + } + ], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "the languages it knew in life", + "cr": "5", + "traits": [ + { + "name": "Regeneration", + "desc": "The revenant regains 10 hit points at the start of its turn. If the revenant takes fire or radiant damage, this trait doesn't function at the start of the revenant's next turn. The revenant's body is destroyed only if it starts its turn with 0 hit points and doesn't regenerate." + }, + { + "name": "Rejuvenation", + "desc": "When the revenant's body is destroyed, its soul lingers. After 24 hours, the soul inhabits and animates another humanoid corpse on the same plane of existence and regains all its hit points. While the soul is bodiless, a wish spell can be used to force the soul to go to the afterlife and not return." + }, + { + "name": "Turn Immunity", + "desc": "The revenant is immune to effects that turn undead." + }, + { + "name": "Vengeful Tracker", + "desc": "The revenant knows the distance to and direction of any creature against which it seeks revenge, even if the creature and the revenant are on different planes of existence. If the creature being tracked by the revenant dies, the revenant knows." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The revenant makes two fist attacks." + }, + { + "name": "Fist", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 11 (2d6 + 4) bludgeoning damage. If the target is a creature against which the revenant has sworn vengeance, the target takes an extra 14 (4d6) bludgeoning damage. Instead of dealing damage, the revenant can grapple the target (escape 14) provided the target is Large or smaller." + }, + { + "name": "Vengeful Glare", + "desc": "The revenant targets one creature it can see within 30 feet of it and against which it has sworn vengeance. The target must make a 15 Wisdom saving throw. On a failure, the target is paralyzed until the revenant deals damage to it, or until the end of the revenant's next turn. When the paralysis ends, the target is frightened of the revenant for 1 minute. The frightened target can repeat the saving throw at the end of each of its turns, with disadvantage if it can see the revenant, ending the frightened condition on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Rhinoceros", + { + "image": null, + "bestiary": true, + "name": "Rhinoceros", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 45, + "hit_dice": "6d10 + 12", + "ac": "11 (natural armor)", + "speed": "40 ft.", + "stats": [ + 21, + 8, + 15, + 2, + 12, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 11", + "languages": "", + "cr": "2", + "traits": [ + { + "name": "Charge", + "desc": "If the rhinoceros moves at least 20 feet straight toward a target and then hits it with a gore attack on the same turn, the target takes an extra 9 (2d8) bludgeoning damage. If the target is a creature, it must succeed on a 15 Strength saving throw or be knocked prone." + } + ], + "actions": [ + { + "name": "Gore", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 14 (2d8 + 5) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Riding Horse", + { + "image": null, + "bestiary": true, + "name": "Riding Horse", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 13, + "hit_dice": "2d10 + 2", + "ac": 10, + "speed": "60 ft.", + "stats": [ + 16, + 10, + 12, + 2, + 11, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 10", + "languages": "", + "cr": "1/4", + "traits": [], + "actions": [ + { + "name": "Hooves", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 8 (2d4 + 3) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Roc", + { + "image": null, + "bestiary": true, + "name": "Roc", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Gargantuan", + "alignment": "unaligned", + "hp": 248, + "hit_dice": "16d20 + 80", + "ac": "15 (natural armor)", + "speed": "20 ft., fly 120 ft.", + "stats": [ + 28, + 10, + 20, + 3, + 10, + 9 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "4" + }, + { + "constitution": "9" + }, + { + "wisdom": "4" + }, + { + "charisma": "3" + } + ], + "skillsaves": [ + { + "perception": "4" + } + ], + "senses": "passive Perception 14", + "languages": "", + "cr": "11", + "traits": [ + { + "name": "Keen Sight", + "desc": "The roc has advantage on Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The roc makes two attacks: one with its beak and one with its talons." + }, + { + "name": "Beak", + "desc": "Melee Weapon Attack +13 to hit, reach 10 ft., one target. 27 (4d8 + 9) piercing damage." + }, + { + "name": "Talons", + "desc": "Melee Weapon Attack +13 to hit, reach 5 ft., one target. 23 (4d6 + 9) slashing damage, and the target is grappled (escape 19). Until this grapple ends, the target is restrained, and the roc can't use its talons on another target." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Roper", + { + "image": null, + "bestiary": true, + "name": "Roper", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "neutral evil", + "hp": 93, + "hit_dice": "11d10 + 33", + "ac": "20 (natural armor)", + "speed": "10 ft., climb 10 ft.", + "stats": [ + 18, + 8, + 17, + 7, + 16, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "6" + }, + { + "stealth": "5" + } + ], + "senses": "darkvision 60 ft., passive Perception 16", + "languages": "", + "cr": "5", + "traits": [ + { + "name": "False Appearance", + "desc": "While the roper remains motionless, it is indistinguishable from a normal cave formation, such as a stalagmite." + }, + { + "name": "Grasping Tendrils", + "desc": "The roper can have up to six tendrils at a time. Each tendril can be attacked (AC 20; 10 hit points; immunity to poison and psychic damage). Destroying a tendril deals no damage to the roper, which can extrude a replacement tendril on its next turn. A tendril can also be broken if a creature takes an action and succeeds on a 15 Strength check against it." + }, + { + "name": "Spider Climb", + "desc": "The roper can climb difficult surfaces, including upside down on ceilings, without needing to make an ability check." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The roper makes four attacks with its tendrils, uses Reel, and makes one attack with its bite." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 22 (4d8 + 4) piercing damage." + }, + { + "name": "Tendril", + "desc": "Melee Weapon Attack +7 to hit, reach 50 ft., one creature. The target is grappled (escape 15). Until the grapple ends, the target is restrained and has disadvantage on Strength checks and Strength saving throws, and the roper can't use the same tendril on another target." + }, + { + "name": "Reel", + "desc": "The roper pulls each creature grappled by it up to 25 feet straight toward it." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Rug of Smothering", + { + "image": null, + "bestiary": true, + "name": "Rug of Smothering", + "source": [ + "Monster Manual" + ], + "type": "construct", + "size": "Large", + "alignment": "unaligned", + "hp": 33, + "hit_dice": "6d10", + "ac": 12, + "speed": "10 ft.", + "stats": [ + 17, + 14, + 10, + 1, + 3, + 1 + ], + "damage_immunities": "poison, psychic", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "blinded, charmed, deafened, frightened, paralyzed, petrified, poisoned", + "saves": [], + "skillsaves": [], + "senses": "blindsight 60 ft. (blind beyond this radius), passive Perception 6", + "languages": "", + "cr": "2", + "traits": [ + { + "name": "Antimagic Susceptibility", + "desc": "The rug is incapacitated while in the area of an antimagic field. If targeted by dispel magic, the rug must succeed on a Constitution saving throw against the caster's spell save DC or fall unconscious for 1 minute." + }, + { + "name": "Damage Transfer", + "desc": "While it is grappling a creature, the rug takes only half the damage dealt to it, and the creature grappled by the rug takes the other half." + }, + { + "name": "False Appearance", + "desc": "While the rug remains motionless, it is indistinguishable from a normal rug." + } + ], + "actions": [ + { + "name": "Smother", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one Medium or smaller creature. The creature is grappled (escape 13). Until this grapple ends, the target is restrained, blinded, and at risk of suffocating, and the rug can't smother another target. In addition, at the start of each of the target's turns, the target takes 10 (2d6 + 3) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Rust Monster", + { + "image": null, + "bestiary": true, + "name": "Rust Monster", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Medium", + "alignment": "unaligned", + "hp": 27, + "hit_dice": "5d8 + 5", + "ac": "14 (natural armor)", + "speed": "40 ft.", + "stats": [ + 13, + 12, + 13, + 2, + 13, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 11", + "languages": "", + "cr": "1/2", + "traits": [ + { + "name": "Iron Scent", + "desc": "The rust monster can pinpoint, by scent, the location of ferrous metal within 30 feet of it." + }, + { + "name": "Rust Metal", + "desc": "Any nonmagical weapon made of metal that hits the rust monster corrodes. After dealing damage, the weapon takes a permanent and cumulative −1 penalty to damage rolls. If its penalty drops to −5, the weapon is destroyed. Non magical ammunition made of metal that hits the rust monster is destroyed after dealing damage." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 5 (1d8 + 1) piercing damage." + }, + { + "name": "Antennae", + "desc": "The rust monster corrodes a nonmagical ferrous metal object it can see within 5 feet of it. If the object isn't being worn or carried, the touch destroys a 1-foot cube of it. If the object is being worn or carried by a creature, the creature can make a 11 Dexterity saving throw to avoid the rust monster's touch.\nIf the object touched is either metal armor or a metal shield being worn or carried, it takes a permanent and cumulative −1 penalty to the AC it offers. Armor reduced to an AC of 10 or a shield that drops to a +0 bonus is destroyed. If the object touched is a held metal weapon, it rusts as described in the Rust Metal trait." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Saber-Toothed Tiger", + { + "image": null, + "bestiary": true, + "name": "Saber-Toothed Tiger", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 52, + "hit_dice": "7d10 + 14", + "ac": 12, + "speed": "40 ft.", + "stats": [ + 18, + 14, + 15, + 3, + 12, + 8 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + }, + { + "stealth": "6" + } + ], + "senses": "passive Perception 13", + "languages": "", + "cr": "2", + "traits": [ + { + "name": "Keen Smell", + "desc": "The tiger has advantage on Wisdom (Perception) checks that rely on smell." + }, + { + "name": "Pounce", + "desc": "If the tiger moves at least 20 feet straight toward a creature and then hits it with a claw attack on the same turn, that target must succeed on a 14 Strength saving throw or be knocked prone. If the target is prone, the tiger can make one bite attack against it as a bonus action." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 10 (1d10 + 5) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 12 (2d6 + 5) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Sahuagin", + { + "image": null, + "bestiary": true, + "name": "Sahuagin", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "sahuagin", + "size": "Medium", + "alignment": "lawful evil", + "hp": 22, + "hit_dice": "4d8 + 4", + "ac": "12 (natural armor)", + "speed": "30 ft., swim 40 ft.", + "stats": [ + 13, + 11, + 12, + 12, + 13, + 9 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "5" + } + ], + "senses": "darkvision 120 ft., passive Perception 15", + "languages": "Sahuagin", + "cr": "1/2", + "traits": [ + { + "name": "Blood Frenzy", + "desc": "The sahuagin has advantage on melee attack rolls against any creature that doesn't have all its hit points." + }, + { + "name": "Limited Amphibiousness", + "desc": "The sahuagin can breathe air and water, but it needs to be submerged at least once every 4 hours to avoid suffocating." + }, + { + "name": "Shark Telepathy", + "desc": "The sahuagin can magically command any shark within 120 feet of it, using a limited telepathy." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The sahuagin makes two melee attacks: one with its bite and one with its claws or spear." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 3 (1d4 + 1) piercing damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 3 (1d4 + 1) slashing damage." + }, + { + "name": "Spear", + "desc": "Melee / Ranged Weapon Attack +3 to hit, reach 5 ft. or range 20/60 ft., one target. 4 (1d6 + 1) piercing damage, or 5 (1d8 + 1) piercing damage if used with two hands to make a melee attack." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Sahuagin Baron", + { + "image": null, + "bestiary": true, + "name": "Sahuagin Baron", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "sahuagin", + "size": "Large", + "alignment": "lawful evil", + "hp": 76, + "hit_dice": "9d10 + 27", + "ac": "16 (breastplate)", + "speed": "30 ft., swim 50 ft.", + "stats": [ + 19, + 15, + 16, + 14, + 13, + 17 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "5" + }, + { + "constitution": "6" + }, + { + "intelligence": "5" + }, + { + "wisdom": "4" + } + ], + "skillsaves": [ + { + "perception": "7" + } + ], + "senses": "darkvision 120 ft., passive Perception 17", + "languages": "Sahuagin", + "cr": "5", + "traits": [ + { + "name": "Blood Frenzy", + "desc": "The sahuagin has advantage on melee attack rolls against any creature that doesn't have all its hit points." + }, + { + "name": "Limited Amphibiousness", + "desc": "The sahuagin can breathe air and water, but it needs to be submerged at least once every 4 hours to avoid suffocating." + }, + { + "name": "Shark Telepathy", + "desc": "The sahuagin can magically command any shark within 120 feet of it, using a limited telepathy." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The sahuagin makes three attacks: one with his bite and two with his claws or trident." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 9 (2d4 + 4) piercing damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 11 (2d6 + 4) slashing damage." + }, + { + "name": "Trident", + "desc": "Melee / Ranged Weapon Attack +7 to hit, reach 5 ft. or range 20/60 ft., one target. 11 (2d6 + 4) piercing damage, or 13 (2d8 + 4) piercing damage if used with two hands to make a melee attack." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Sahuagin Priestess", + { + "image": null, + "bestiary": true, + "name": "Sahuagin Priestess", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "sahuagin", + "size": "Medium", + "alignment": "lawful evil", + "hp": 33, + "hit_dice": "6d8 + 6", + "ac": "12 (natural armor)", + "speed": "30 ft., swim 40 ft.", + "stats": [ + 13, + 11, + 12, + 12, + 14, + 13 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "6" + }, + { + "religion": "3" + } + ], + "senses": "darkvision 120 ft., passive Perception 16", + "languages": "Sahuagin", + "cr": "2", + "traits": [ + { + "name": "Blood Frenzy", + "desc": "The sahuagin has advantage on melee attack rolls against any creature that doesn't have all its hit points." + }, + { + "name": "Limited Amphibiousness", + "desc": "The sahuagin can breathe air and water, but it needs to be submerged at least once every 4 hours to avoid suffocating." + }, + { + "name": "Shark Telepathy", + "desc": "The sahuagin can magically command any shark within 120 feet of it, using a limited telepathy." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The sahuagin makes two melee attacks: one with her bite and one with her claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 3 (1d4 + 1) piercing damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 3 (1d4 + 1) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The sahuagin is a 6th-level spellcaster. Her spellcasting ability is Wisdom (spell save 12, +4 to hit with spell attacks). She has the following cleric spells prepared:", + { + "Cantrips (at will)": "guidance, thaumaturgy" + }, + { + "1st level (4 slots)": "bless, detect magic, guiding bolt" + }, + { + "2nd level (3 slots)": "hold person, spiritual weapon (trident)" + }, + { + "3rd level (3 slots)": "mass healing word, tongues" + } + ], + "spellsNotes": "" + } + ], + [ + "Salamander", + { + "image": null, + "bestiary": true, + "name": "Salamander", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Large", + "alignment": "neutral evil", + "hp": 90, + "hit_dice": "12d10 + 24", + "ac": "15 (natural armor)", + "speed": "30 ft.", + "stats": [ + 18, + 14, + 15, + 11, + 10, + 12 + ], + "damage_immunities": "fire", + "damage_resistances": "bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "cold", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Ignan", + "cr": "5", + "traits": [ + { + "name": "Heated Body", + "desc": "A creature that touches the salamander or hits it with a melee attack while within 5 feet of it takes 7 (2d6) fire damage." + }, + { + "name": "Heated Weapons", + "desc": "Any metal melee weapon the salamander wields deals an extra 3 (1d6) fire damage on a hit (included in the attack)." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The salamander makes two attacks: one with its spear and one with its tail." + }, + { + "name": "Spear", + "desc": "Melee / Ranged Weapon Attack +7 to hit, reach 5 ft. or range 20/60 ft., one target. 11 (2d6 + 4) piercing damage, or 13 (2d8 + 4) piercing damage if used with two hands to make a melee attack, plus 3 (1d6) fire damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +7 to hit, reach 10 ft., one target. 11 (2d6 + 4) bludgeoning damage plus 7 (2d6) fire damage, and the target is grappled (escape 14). Until this grapple ends, the target is restrained, the salamander can automatically hit the target with its tail, and the salamander can't make tail attacks against other targets." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Satyr", + { + "image": null, + "bestiary": true, + "name": "Satyr", + "source": [ + "Monster Manual" + ], + "type": "fey", + "size": "Medium", + "alignment": "chaotic neutral", + "hp": 31, + "hit_dice": "7d8", + "ac": "14 (leather armor)", + "speed": "40 ft.", + "stats": [ + 12, + 16, + 11, + 12, + 10, + 14 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "2" + }, + { + "performance": "6" + }, + { + "stealth": "5" + } + ], + "senses": "passive Perception 12", + "languages": "Common, Elvish, Sylvan", + "cr": "1/2", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The satyr has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Ram", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 6 (2d4 + 1) bludgeoning damage." + }, + { + "name": "Shortsword", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) piercing damage." + }, + { + "name": "Shortbow", + "desc": "Ranged Weapon Attack +5 to hit, range 80/320 ft., one target. 6 (1d6 + 3) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Scarecrow", + { + "image": null, + "bestiary": true, + "name": "Scarecrow", + "source": [ + "Monster Manual" + ], + "type": "construct", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 36, + "hit_dice": "8d8", + "ac": 11, + "speed": "30 ft.", + "stats": [ + 11, + 13, + 11, + 10, + 10, + 13 + ], + "damage_immunities": "poison", + "damage_resistances": "bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "fire", + "condition_immunities": "charmed, exhaustion, frightened, paralyzed, poisoned, unconscious", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "understands the languages of its creator but can't speak", + "cr": "1", + "traits": [ + { + "name": "False Appearance", + "desc": "While the scarecrow remains motionless, it is indistinguishable from an ordinary, inanimate scarecrow." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The scarecrow makes two claw attacks." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 6 (2d4 + 1) slashing damage. If the target is a creature, it must succeed on a 11 Wisdom saving throw or be frightened until the end of the scarecrow's next turn." + }, + { + "name": "Terrifying Glare", + "desc": "The scarecrow targets one creature it can see within 30 feet of it. If the target can see the scarecrow, the target must succeed on a 11 Wisdom saving throw or be magically frightened until the end of the scarecrow's next turn. The frightened target is paralyzed." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Scorpion", + { + "image": null, + "bestiary": true, + "name": "Scorpion", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Tiny", + "alignment": "unaligned", + "hp": 1, + "hit_dice": "1d4 - 1", + "ac": "11 (natural armor)", + "speed": "10 ft.", + "stats": [ + 2, + 11, + 8, + 1, + 8, + 2 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "blindsight 10 ft., passive Perception 9", + "languages": "", + "cr": "0", + "traits": [], + "actions": [ + { + "name": "Sting", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one creature. 1 piercing damage, and the target must make a 9 Constitution saving throw, taking 4 (1d8) poison damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Scout", + { + "image": null, + "bestiary": true, + "name": "Scout", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "any alignment", + "hp": 16, + "hit_dice": "3d8 + 3", + "ac": "13 (leather armor)", + "speed": "30 ft.", + "stats": [ + 11, + 14, + 12, + 11, + 13, + 11 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "nature": "4" + }, + { + "perception": "5" + }, + { + "stealth": "6" + }, + { + "survival": "5" + } + ], + "senses": "passive Perception 15", + "languages": "any one language (usually Common)", + "cr": "1/2", + "traits": [ + { + "name": "Keen Hearing and Sight", + "desc": "The scout has advantage on Wisdom (Perception) checks that rely on hearing or sight." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The scout makes two melee attacks or two ranged attacks." + }, + { + "name": "Shortsword", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d6 + 2) piercing damage." + }, + { + "name": "Longbow", + "desc": "Ranged Weapon Attack +4 to hit, ranged 150/600 ft., one target. 6 (1d8 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Sea Hag", + { + "image": null, + "bestiary": true, + "name": "Sea Hag", + "source": [ + "Monster Manual" + ], + "type": "fey", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 52, + "hit_dice": "7d8 + 21", + "ac": "14 (natural armor)", + "speed": "30 ft., swim 40 ft.", + "stats": [ + 16, + 13, + 16, + 12, + 12, + 13 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 11", + "languages": "Aquan, Common, Giant", + "cr": "2", + "traits": [ + { + "name": "Amphibious", + "desc": "The hag can breathe air and water." + }, + { + "name": "Horrific Appearance", + "desc": "Any humanoid that starts its turn within 30 feet of the hag and can see the hag's true form must make a 11 Wisdom saving throw. On a failed save, the creature is frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, with disadvantage if the hag is within line of sight, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the hag's Horrific Appearance for the next 24 hours.\nUnless the target is {@status surprised} or the revelation of the hag's true form is sudden, the target can avert its eyes and avoid making the initial saving throw. Until the start of its next turn, a creature that averts its eyes has disadvantage on attack rolls against the hag." + } + ], + "actions": [ + { + "name": "Claws", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 10 (2d6 + 3) slashing damage." + }, + { + "name": "Death Glare", + "desc": "The hag targets one frightened creature she can see within 30 feet of her. If the target can see the hag, it must succeed on a 11 Wisdom saving throw against this magic or drop to 0 hit points." + }, + { + "name": "Illusory Appearance", + "desc": "The hag covers herself and anything she is wearing or carrying with a magical illusion that makes her look like an ugly creature of her general size and humanoid shape. The effect ends if the hag takes a bonus action to end it or if she dies.\nThe changes wrought by this effect fail to hold up to physical inspection. For example, the hag could appear to have no claws, but someone touching her hand might feel the claws. Otherwise, a creature must take an action to visually inspect the illusion and succeed on a 16 Intelligence (Investigation) check to discern that the hag is disguised." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Sea Horse", + { + "image": null, + "bestiary": true, + "name": "Sea Horse", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Tiny", + "alignment": "unaligned", + "hp": 1, + "hit_dice": "1d4 - 1", + "ac": 11, + "speed": "0 ft., swim 20 ft.", + "stats": [ + 1, + 12, + 8, + 1, + 10, + 2 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 10", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Water Breathing", + "desc": "The sea horse can breathe only underwater." + } + ], + "actions": [], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Shadow", + { + "image": null, + "bestiary": true, + "name": "Shadow", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 16, + "hit_dice": "3d8 + 3", + "ac": 12, + "speed": "40 ft.", + "stats": [ + 6, + 14, + 13, + 6, + 10, + 8 + ], + "damage_immunities": "necrotic, poison", + "damage_resistances": "acid, cold, fire, lightning, thunder, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "radiant", + "condition_immunities": "exhaustion, frightened, grappled, paralyzed, petrified, poisoned, prone, restrained", + "saves": [], + "skillsaves": [ + { + "stealth": "4" + } + ], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "", + "cr": "1/2", + "traits": [ + { + "name": "Amorphous", + "desc": "The shadow can move through a space as narrow as 1 inch wide without squeezing." + }, + { + "name": "Shadow Stealth", + "desc": "While in dim light or darkness, the shadow can take the {@action Hide} action as a bonus action. Its stealth bonus is also improved to +6." + }, + { + "name": "Sunlight Weakness", + "desc": "While in sunlight, the shadow has disadvantage on attack rolls, ability checks, and saving throws." + } + ], + "actions": [ + { + "name": "Strength Drain", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 9 (2d6 + 2) necrotic damage, and the target's Strength score is reduced by 1d4. The target dies if this reduces its Strength to 0. Otherwise, the reduction lasts until the target finishes a short or long rest.\nIf a non-evil humanoid dies from this attack, a new shadow rises from the corpse 1d4 hours later." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Shadow Demon", + { + "image": null, + "bestiary": true, + "name": "Shadow Demon", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "demon", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 66, + "hit_dice": "12d8 + 12", + "ac": 13, + "speed": "30 ft., fly 30 ft.", + "stats": [ + 1, + 17, + 12, + 14, + 13, + 14 + ], + "damage_immunities": "cold, lightning, poison", + "damage_resistances": "acid, fire, necrotic, thunder, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "radiant", + "condition_immunities": "exhaustion, grappled, paralyzed, petrified, poisoned, prone, restrained", + "saves": [ + { + "dexterity": "5" + }, + { + "charisma": "4" + } + ], + "skillsaves": [ + { + "stealth": "7" + } + ], + "senses": "darkvision 120 ft., passive Perception 11", + "languages": "Abyssal, telepathy 120 ft.", + "cr": "4", + "traits": [ + { + "name": "Incorporeal Movement", + "desc": "The demon can move through other creatures and objects as if they were difficult terrain. It takes 5 (1d10) force damage if it ends its turn inside an object." + }, + { + "name": "Light Sensitivity", + "desc": "While in bright light, the demon has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight." + }, + { + "name": "Shadow Stealth", + "desc": "While in dim light or darkness, the demon can take the {@action Hide} action as a bonus action." + } + ], + "actions": [ + { + "name": "Claws", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one creature. 10 (2d6 + 3) psychic damage or, if the demon had advantage on the attack roll, 17 (4d6 + 3) psychic damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Shambling Mound", + { + "image": null, + "bestiary": true, + "name": "Shambling Mound", + "source": [ + "Monster Manual" + ], + "type": "plant", + "size": "Large", + "alignment": "unaligned", + "hp": 136, + "hit_dice": "16d10 + 48", + "ac": "15 (natural armor)", + "speed": "20 ft., swim 20 ft.", + "stats": [ + 18, + 8, + 16, + 5, + 10, + 5 + ], + "damage_immunities": "lightning", + "damage_resistances": "cold, fire", + "damage_vulnerabilities": "", + "condition_immunities": "blinded, deafened, exhaustion", + "saves": [], + "skillsaves": [ + { + "stealth": "2" + } + ], + "senses": "blindsight 60 ft. (blind beyond this radius), passive Perception 10", + "languages": "", + "cr": "5", + "traits": [ + { + "name": "Lightning Absorption", + "desc": "Whenever the shambling mound is subjected to lightning damage, it takes no damage and regains a number of hit points equal to the lightning damage dealt." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The shambling mound makes two slam attacks. If both attacks hit a Medium or smaller target, the target is grappled (escape 14), and the shambling mound uses its Engulf on it." + }, + { + "name": "Slam", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 13 (2d8 + 4) bludgeoning damage." + }, + { + "name": "Engulf", + "desc": "The shambling mound engulfs a Medium or smaller creature grappled by it. The engulfed target is blinded, restrained, and unable to breathe, and it must succeed on a 14 Constitution saving throw at the start of each of the mound's turns or take 13 (2d8 + 4) bludgeoning damage. If the mound moves, the engulfed target moves with it. The mound can have only one creature engulfed at a time." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Shield Guardian", + { + "image": null, + "bestiary": true, + "name": "Shield Guardian", + "source": [ + "Monster Manual" + ], + "type": "construct", + "size": "Large", + "alignment": "unaligned", + "hp": 142, + "hit_dice": "15d10 + 60", + "ac": "17 (natural armor)", + "speed": "30 ft.", + "stats": [ + 18, + 8, + 18, + 7, + 10, + 3 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, frightened, paralyzed, poisoned", + "saves": [], + "skillsaves": [], + "senses": "blindsight 10 ft., darkvision 60 ft., passive Perception 10", + "languages": "understands commands given in any language but can't speak", + "cr": "7", + "traits": [ + { + "name": "Bound", + "desc": "The shield guardian is magically bound to an amulet. As long as the guardian and its amulet are on the same plane of existence, the amulet's wearer can telepathically call the guardian to travel to it, and the guardian knows the distance and direction to the amulet. If the guardian is within 60 feet of the amulet's wearer, half of any damage the wearer takes (rounded up) is transferred to the guardian." + }, + { + "name": "Regeneration", + "desc": "The shield guardian regains 10 hit points at the start of its turn if it has at least 1 hit point." + }, + { + "name": "Spell Storing", + "desc": "A spellcaster who wears the shield guardian's amulet can cause the guardian to store one spell of 4th level or lower. To do so, the wearer must cast the spell on the guardian. The spell has no effect but is stored within the guardian. When commanded to do so by the wearer or when a situation arises that was predefined by the spellcaster, the guardian casts the stored spell with any parameters set by the original caster, requiring no components. When the spell is cast or a new spell is stored, any previously stored spell is lost." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The guardian makes two fist attacks." + }, + { + "name": "Fist", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 11 (2d6 + 4) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [ + { + "name": "Shield", + "desc": "When a creature makes an attack against the wearer of the guardian's amulet, the guardian grants a +2 bonus to the wearer's AC if the guardian is within 5 feet of the wearer." + } + ], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Shrieker", + { + "image": null, + "bestiary": true, + "name": "Shrieker", + "source": [ + "Monster Manual" + ], + "type": "plant", + "size": "Medium", + "alignment": "unaligned", + "hp": 13, + "hit_dice": "3d8", + "ac": 5, + "speed": "0 ft.", + "stats": [ + 1, + 1, + 10, + 1, + 3, + 1 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "blinded, deafened, frightened", + "saves": [], + "skillsaves": [], + "senses": "blindsight 30 ft. (blind beyond this radius), passive Perception 6", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "False Appearance", + "desc": "While the shrieker remains motionless, it is indistinguishable from an ordinary fungus." + } + ], + "actions": [], + "bonus_actions": [], + "reactions": [ + { + "name": "Shriek", + "desc": "When bright light or a creature is within 30 feet of the shrieker, it emits a shriek audible within 300 feet of it. The shrieker continues to shriek until the disturbance moves out of range and for 1d4 of the shrieker's turns afterward." + } + ], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Silver Dragon Wyrmling", + { + "image": null, + "bestiary": true, + "name": "Silver Dragon Wyrmling", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Medium", + "alignment": "lawful good", + "hp": 45, + "hit_dice": "6d8 + 18", + "ac": "17 (natural armor)", + "speed": "30 ft., fly 60 ft.", + "stats": [ + 19, + 10, + 17, + 12, + 11, + 15 + ], + "damage_immunities": "cold", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "2" + }, + { + "constitution": "5" + }, + { + "wisdom": "2" + }, + { + "charisma": "4" + } + ], + "skillsaves": [ + { + "perception": "4" + }, + { + "stealth": "2" + } + ], + "senses": "blindsight 10 ft., darkvision 60 ft., passive Perception 14", + "languages": "Draconic", + "cr": "2", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 9 (1d10 + 4) piercing damage." + }, + { + "name": "Breath Weapons (Recharge 5-6)", + "desc": "The dragon uses one of the following breath weapons." + }, + { + "name": "Cold Breath", + "desc": "The dragon exhales an icy blast in a 15-foot cone. Each creature in that area must make a 13 Constitution saving throw, taking 18 (4d8) cold damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Paralyzing Breath", + "desc": "The dragon exhales paralyzing gas in a 15-foot cone. Each creature in that area must succeed on a 13 Constitution saving throw or be paralyzed for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Skeleton", + { + "image": null, + "bestiary": true, + "name": "Skeleton", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Medium", + "alignment": "lawful evil", + "hp": 13, + "hit_dice": "2d8 + 4", + "ac": "13 (armor scraps)", + "speed": "30 ft.", + "stats": [ + 10, + 14, + 15, + 6, + 8, + 5 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "bludgeoning", + "condition_immunities": "exhaustion, poisoned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 9", + "languages": "understands all languages it spoke in life but can't speak", + "cr": "1/4", + "traits": [], + "actions": [ + { + "name": "Shortsword", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d6 + 2) piercing damage." + }, + { + "name": "Shortbow", + "desc": "Ranged Weapon Attack +4 to hit, range 80/320 ft., one target. 5 (1d6 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Slaad Tadpole", + { + "image": null, + "bestiary": true, + "name": "Slaad Tadpole", + "source": [ + "Monster Manual" + ], + "type": "aberration", + "size": "Tiny", + "alignment": "chaotic neutral", + "hp": 10, + "hit_dice": "4d4", + "ac": 12, + "speed": "30 ft.", + "stats": [ + 7, + 15, + 10, + 3, + 5, + 3 + ], + "damage_immunities": "", + "damage_resistances": "acid, cold, fire, lightning, thunder", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "stealth": "4" + } + ], + "senses": "darkvision 60 ft., passive Perception 7", + "languages": "understands Slaad but can't speak", + "cr": "1/8", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The slaad has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 4 (1d4 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Smoke Mephit", + { + "image": null, + "bestiary": true, + "name": "Smoke Mephit", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Small", + "alignment": "neutral evil", + "hp": 22, + "hit_dice": "5d6 + 5", + "ac": 12, + "speed": "30 ft., fly 30 ft.", + "stats": [ + 6, + 14, + 12, + 10, + 10, + 11 + ], + "damage_immunities": "fire, poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [], + "skillsaves": [ + { + "perception": "2" + }, + { + "stealth": "4" + } + ], + "senses": "darkvision 60 ft., passive Perception 12", + "languages": "Auran, Ignan", + "cr": "1/4", + "traits": [ + { + "name": "Death Burst", + "desc": "When the mephit dies, it leaves behind a cloud of smoke that fills a 5-foot-radius sphere centered on its space. The sphere is Vision and Light. Wind disperses the cloud, which otherwise lasts for 1 minute." + } + ], + "actions": [ + { + "name": "Claws", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 4 (1d4 + 2) slashing damage." + }, + { + "name": "Cinder Breath (Recharge 6)", + "desc": "The mephit exhales a 15-foot cone of smoldering ash. Each creature in that area must succeed on a 10 Dexterity saving throw or be blinded until the end of the mephit's next turn." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The mephit can innately cast dancing lights, requiring no material components. Its innate spellcasting ability is Charisma.", + { + "At will": "dancing lights" + } + ], + "spellsNotes": "" + } + ], + [ + "Solar", + { + "image": null, + "bestiary": true, + "name": "Solar", + "source": [ + "Monster Manual" + ], + "type": "celestial", + "size": "Large", + "alignment": "lawful good", + "hp": 243, + "hit_dice": "18d10 + 144", + "ac": "21 (natural armor)", + "speed": "50 ft., fly 150 ft.", + "stats": [ + 26, + 22, + 26, + 25, + 25, + 30 + ], + "damage_immunities": "necrotic, poison", + "damage_resistances": "radiant, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, frightened, poisoned", + "saves": [ + { + "intelligence": "14" + }, + { + "wisdom": "14" + }, + { + "charisma": "17" + } + ], + "skillsaves": [ + { + "perception": "14" + } + ], + "senses": "truesight 120 ft., passive Perception 24", + "languages": "all, telepathy 120 ft.", + "cr": "21", + "traits": [ + { + "name": "Angelic Weapons", + "desc": "The solar's weapon attacks are magical. When the solar hits with any weapon, the weapon deals an extra 6d8 radiant damage (included in the attack)." + }, + { + "name": "Divine Awareness", + "desc": "The solar knows if it hears a lie." + }, + { + "name": "Magic Resistance", + "desc": "The solar has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The solar makes two greatsword attacks." + }, + { + "name": "Greatsword", + "desc": "Melee Weapon Attack +15 to hit, reach 5 ft., one target. 22 (4d6 + 8) slashing damage plus 27 (6d8) radiant damage." + }, + { + "name": "Slaying Longbow", + "desc": "Ranged Weapon Attack +13 to hit, range 150/600 ft., one target. 15 (2d8 + 6) piercing damage plus 27 (6d8) radiant damage. If the target is a creature that has 100 hit points or fewer, it must succeed on a 15 Constitution saving throw or die." + }, + { + "name": "Flying Sword", + "desc": "The solar releases its greatsword to hover magically in an unoccupied space within 5 feet of it. If the solar can see the sword, the solar can mentally command it as a bonus action to fly up to 50 feet and either make one attack against a target or return to the solar's hands. If the hovering sword is targeted by any effect, the solar is considered to be holding it. The hovering sword falls if the solar dies." + }, + { + "name": "Healing Touch (4/Day)", + "desc": "The solar touches another creature. The target magically regains 40 (8d8 + 4) hit points and is freed from any curse, disease, poison, blindness, or deafness." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Teleport", + "desc": "The solar magically teleports, along with any equipment it is wearing or carrying, up to 120 feet to an unoccupied space it can see." + }, + { + "name": "Searing Burst (Costs 2 Actions)", + "desc": "The solar emits magical, divine energy. Each creature of its choice in a 10-foot radius must make a 23 Dexterity saving throw, taking 14 (4d6) fire damage plus 14 (4d6) radiant damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Blinding Gaze (Costs 3 Actions)", + "desc": "The solar targets one creature it can see within 30 feet of it. If the target can see it, the target must succeed on a 15 Constitution saving throw or be blinded until magic such as the lesser restoration spell removes the blindness." + } + ], + "mythic_actions": [], + "spells": [ + "The solar's spellcasting ability is Charisma (spell save 25). It can innately cast the following spells, requiring no material components:", + { + "At will": "detect evil and good, invisibility (self only)" + }, + { + "3/day each": "blade barrier, dispel evil and good, resurrection" + }, + { + "1/day each": "commune, control weather" + } + ], + "spellsNotes": "" + } + ], + [ + "Spectator", + { + "image": null, + "bestiary": true, + "name": "Spectator", + "source": [ + "Monster Manual" + ], + "type": "aberration", + "size": "Medium", + "alignment": "lawful neutral", + "hp": 39, + "hit_dice": "6d8 + 12", + "ac": "14 (natural armor)", + "speed": "0 ft., fly 30 ft. (hover)", + "stats": [ + 8, + 14, + 14, + 13, + 14, + 11 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "prone", + "saves": [], + "skillsaves": [ + { + "perception": "6" + } + ], + "senses": "darkvision 120 ft., passive Perception 16", + "languages": "Deep Speech, Undercommon, telepathy 120 ft.", + "cr": "3", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +1 to hit, reach 5 ft., one target. 2 (1d6 - 1) piercing damage." + }, + { + "name": "Eye Rays", + "desc": "The spectator shoots up to two of the following magical eye rays at one or two creatures it can see within 90 feet of it. It can use each ray only once on a turn." + }, + { + "name": "1. Confusion Ray", + "desc": "The target must succeed on a 13 Wisdom saving throw, or it can't take reactions until the end of its next turn. On its turn, the target can't move, and it uses its action to make a melee or ranged attack against a randomly determined creature within range. If the target can't attack, it does nothing on its turn." + }, + { + "name": "2. Paralyzing Ray", + "desc": "The target must succeed on a 13 Constitution saving throw or be paralyzed for 1 minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "3. Fear Ray", + "desc": "The target must succeed on a 13 Wisdom saving throw or be frightened for 1 minute. The target can repeat the saving throw at the end of each of its turns, with disadvantage if the spectator is visible to the target, ending the effect on itself on a success." + }, + { + "name": "4. Wounding Ray", + "desc": "The target must make a 13 Constitution saving throw, taking 16 (3d10) necrotic damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Create Food and Water", + "desc": "The spectator magically creates enough food and water to sustain itself for 24 hours." + } + ], + "bonus_actions": [], + "reactions": [ + { + "name": "Spell Reflection", + "desc": "If the spectator makes a successful saving throw against a spell, or a spell attack misses it, the spectator can choose another creature (including the spellcaster) it can see within 30 feet of it. The spell targets the chosen creature instead of the spectator. If the spell forced a saving throw, the chosen creature makes its own save. If the spell was an attack, the attack roll is rerolled against the chosen creature." + } + ], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Specter", + { + "image": null, + "bestiary": true, + "name": "Specter", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 22, + "hit_dice": "5d8", + "ac": 12, + "speed": "0 ft., fly 50 ft. (hover)", + "stats": [ + 1, + 14, + 11, + 10, + 10, + 11 + ], + "damage_immunities": "necrotic, poison", + "damage_resistances": "acid, cold, fire, lightning, thunder, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, grappled, paralyzed, petrified, poisoned, prone, restrained, unconscious", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "understands all languages it knew in life but can't speak", + "cr": "1", + "traits": [ + { + "name": "Incorporeal Movement", + "desc": "The specter can move through other creatures and objects as if they were difficult terrain. It takes 5 (1d10) force damage if it ends its turn inside an object." + }, + { + "name": "Sunlight Sensitivity", + "desc": "While in sunlight, the specter has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Life Drain", + "desc": "Melee Spell Attack +4 to hit, reach 5 ft., one creature. 10 (3d6) necrotic damage. The target must succeed on a 10 Constitution saving throw or its hit point maximum is reduced by an amount equal to the damage taken. This reduction lasts until the creature finishes a long rest. The target dies if this effect reduces its hit point maximum to 0." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Spider", + { + "image": null, + "bestiary": true, + "name": "Spider", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Tiny", + "alignment": "unaligned", + "hp": 1, + "hit_dice": "1d4 - 1", + "ac": 12, + "speed": "20 ft., climb 20 ft.", + "stats": [ + 2, + 14, + 8, + 1, + 10, + 2 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "stealth": "4" + } + ], + "senses": "darkvision 30 ft., passive Perception 10", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Spider Climb", + "desc": "The spider can climb difficult surfaces, including upside down on ceilings, without needing to make an ability check." + }, + { + "name": "Web Sense", + "desc": "While in contact with a web, the spider knows the exact location of any other creature in contact with the same web." + }, + { + "name": "Web Walker", + "desc": "The spider ignores movement restrictions caused by webbing." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 1 piercing damage, and the target must succeed on a 9 Constitution saving throw or take 2 (1d4) poison damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Spined Devil", + { + "image": null, + "bestiary": true, + "name": "Spined Devil", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "devil", + "size": "Small", + "alignment": "lawful evil", + "hp": 22, + "hit_dice": "5d6 + 5", + "ac": "13 (natural armor)", + "speed": "20 ft., fly 40 ft.", + "stats": [ + 10, + 15, + 12, + 11, + 14, + 8 + ], + "damage_immunities": "fire, poison", + "damage_resistances": "cold, bludgeoning, piercing, slashing from nonmagical attacks that aren't silvered", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 120 ft., passive Perception 12", + "languages": "Infernal, telepathy 120 ft.", + "cr": "2", + "traits": [ + { + "name": "Devil's Sight", + "desc": "Magical darkness doesn't impede the devil's darkvision." + }, + { + "name": "Flyby", + "desc": "The devil doesn't provoke an opportunity attack when it flies out of an enemy's reach." + }, + { + "name": "Limited Spines", + "desc": "The devil has twelve tail spines. Used spines regrow by the time the devil finishes a long rest." + }, + { + "name": "Magic Resistance", + "desc": "The devil has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The devil makes two attacks: one with its bite and one with its fork or two with its tail spines." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one target. 5 (2d4) slashing damage." + }, + { + "name": "Fork", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one target. 3 (1d6) piercing damage." + }, + { + "name": "Tail Spine", + "desc": "Ranged Weapon Attack +4 to hit, range 20/80 ft., one target. 4 (1d4 + 2) piercing damage plus 3 (1d6) fire damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Spirit Naga", + { + "image": null, + "bestiary": true, + "name": "Spirit Naga", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "chaotic evil", + "hp": 75, + "hit_dice": "10d10 + 20", + "ac": "15 (natural armor)", + "speed": "40 ft.", + "stats": [ + 18, + 17, + 14, + 16, + 15, + 16 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, poisoned", + "saves": [ + { + "dexterity": "6" + }, + { + "constitution": "5" + }, + { + "wisdom": "5" + }, + { + "charisma": "6" + } + ], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 12", + "languages": "Abyssal, Common", + "cr": "8", + "traits": [ + { + "name": "Rejuvenation", + "desc": "If it dies, the naga returns to life in 1d6 days and regains all its hit points. Only a wish spell can prevent this trait from functioning." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 10 ft., one creature. 7 (1d6 + 4) piercing damage, and the target must make a 13 Constitution saving throw, taking 31 (7d8) poison damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The naga is a 10th-level spellcaster. Its spellcasting ability is Intelligence (spell save 14, +6 to hit with spell attacks), and it needs only verbal components to cast its spells. It has the following wizard spells prepared:", + { + "Cantrips (at will)": "mage hand, minor illusion, ray of frost" + }, + { + "1st level (4 slots)": "charm person, detect magic, sleep" + }, + { + "2nd level (3 slots)": "detect thoughts, hold person" + }, + { + "3rd level (3 slots)": "lightning bolt, water breathing" + }, + { + "4th level (3 slots)": "blight, dimension door" + }, + { + "5th level (2 slots)": "dominate person" + } + ], + "spellsNotes": "" + } + ], + [ + "Sprite", + { + "image": null, + "bestiary": true, + "name": "Sprite", + "source": [ + "Monster Manual" + ], + "type": "fey", + "size": "Tiny", + "alignment": "neutral good", + "hp": 2, + "hit_dice": "1d4", + "ac": "15 (leather armor)", + "speed": "10 ft., fly 40 ft.", + "stats": [ + 3, + 18, + 10, + 14, + 13, + 11 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + }, + { + "stealth": "8" + } + ], + "senses": "passive Perception 13", + "languages": "Common, Elvish, Sylvan", + "cr": "1/4", + "traits": [], + "actions": [ + { + "name": "Longsword", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one target. 1 slashing damage." + }, + { + "name": "Shortbow", + "desc": "Ranged Weapon Attack +6 to hit, range 40/160 ft., one target. 1 piercing damage, and the target must succeed on a 10 Constitution saving throw or become poisoned for 1 minute. If its saving throw result is 5 or lower, the poisoned target falls unconscious for the same duration, or until it takes damage or another creature takes an action to shake it awake." + }, + { + "name": "Heart Sight", + "desc": "The sprite touches a creature and magically knows the creature's current emotional state. If the target fails a 10 Charisma saving throw, the sprite also knows the creature's alignment. Celestials, fiends, and undead automatically fail the saving throw." + }, + { + "name": "Invisibility", + "desc": "The sprite magically turns invisible until it attacks or casts a spell, or until its {@status concentration} ends (as if {@status concentration||concentrating} on a spell). Any equipment the sprite wears or carries is invisible with it." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Spy", + { + "image": null, + "bestiary": true, + "name": "Spy", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "any alignment", + "hp": 27, + "hit_dice": "6d8", + "ac": 12, + "speed": "30 ft.", + "stats": [ + 10, + 15, + 10, + 12, + 14, + 16 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "deception": "5" + }, + { + "insight": "4" + }, + { + "investigation": "5" + }, + { + "perception": "6" + }, + { + "persuasion": "5" + }, + { + "sleight of hand": "4" + }, + { + "stealth": "4" + } + ], + "senses": "passive Perception 16", + "languages": "any two languages", + "cr": "1", + "traits": [ + { + "name": "Cunning Action", + "desc": "On each of its turns, the spy can use a bonus action to take the {@action Dash}, {@action Disengage}, or {@action Hide} action." + }, + { + "name": "Sneak Attack (1/Turn)", + "desc": "The spy deals an extra 7 (2d6) damage when it hits a target with a weapon attack and has advantage on the attack roll, or when the target is within 5 feet of an ally of the spy that isn't incapacitated and the spy doesn't have disadvantage on the attack roll." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The spy makes two melee attacks." + }, + { + "name": "Shortsword", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d6 + 2) piercing damage." + }, + { + "name": "Hand Crossbow", + "desc": "Ranged Weapon Attack +4 to hit, range 30/120 ft., one target. 5 (1d6 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Steam Mephit", + { + "image": null, + "bestiary": true, + "name": "Steam Mephit", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Small", + "alignment": "neutral evil", + "hp": 21, + "hit_dice": "6d6", + "ac": 10, + "speed": "30 ft., fly 30 ft.", + "stats": [ + 5, + 11, + 10, + 11, + 10, + 12 + ], + "damage_immunities": "fire, poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Aquan, Ignan", + "cr": "1/4", + "traits": [ + { + "name": "Death Burst", + "desc": "When the mephit dies, it explodes in a cloud of steam. Each creature within 5 feet of the mephit must succeed on a 10 Dexterity saving throw or take 4 (1d8) fire damage." + } + ], + "actions": [ + { + "name": "Claws", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one creature. 2 (1d4) slashing damage plus 2 (1d4) fire damage." + }, + { + "name": "Steam Breath (Recharge 6)", + "desc": "The mephit exhales a 15-foot cone of scalding steam. Each creature in that area must succeed on a 10 Dexterity saving throw, taking 4 (1d8) fire damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The mephit can innately cast blur, requiring no material components. Its innate spellcasting ability is Charisma.", + { + "At will": "blur" + } + ], + "spellsNotes": "" + } + ], + [ + "Stirge", + { + "image": null, + "bestiary": true, + "name": "Stirge", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Tiny", + "alignment": "unaligned", + "hp": 2, + "hit_dice": "1d4", + "ac": "14 (natural armor)", + "speed": "10 ft., fly 40 ft.", + "stats": [ + 4, + 16, + 11, + 2, + 8, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 9", + "languages": "", + "cr": "1/8", + "traits": [], + "actions": [ + { + "name": "Blood Drain", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one creature. 5 (1d4 + 3) piercing damage, and the stirge attaches to the target. While attached, the stirge doesn't attack. Instead, at the start of each of the stirge's turns, the target loses 5 (1d4 + 3) hit points due to blood loss.\nThe stirge can detach itself by spending 5 feet of its movement. It does so after it drains 10 hit points of blood from the target or the target dies. A creature, including the target, can use its action to detach the stirge." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Stone Giant", + { + "image": null, + "bestiary": true, + "name": "Stone Giant", + "source": [ + "Monster Manual" + ], + "type": "giant", + "size": "Huge", + "alignment": "neutral", + "hp": 126, + "hit_dice": "11d12 + 55", + "ac": "17 (natural armor)", + "speed": "40 ft.", + "stats": [ + 23, + 15, + 20, + 10, + 12, + 9 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "5" + }, + { + "constitution": "8" + }, + { + "wisdom": "4" + } + ], + "skillsaves": [ + { + "athletics": "12" + }, + { + "perception": "4" + } + ], + "senses": "darkvision 60 ft., passive Perception 14", + "languages": "Giant", + "cr": "7", + "traits": [ + { + "name": "Stone Camouflage", + "desc": "The giant has advantage on Dexterity (Stealth) checks made to hide in rocky terrain." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The giant makes two greatclub attacks." + }, + { + "name": "Greatclub", + "desc": "Melee Weapon Attack +9 to hit, reach 15 ft., one target. 19 (3d8 + 6) bludgeoning damage." + }, + { + "name": "Rock", + "desc": "Ranged Weapon Attack +9 to hit, range 60/240 ft., one target. 28 (4d10 + 6) bludgeoning damage. If the target is a creature, it must succeed on a 17 Strength saving throw or be knocked prone." + } + ], + "bonus_actions": [], + "reactions": [ + { + "name": "Rock Catching", + "desc": "If a rock or similar object is hurled at the giant, the giant can, with a successful 10 Dexterity saving throw, catch the missile and take no bludgeoning damage from it." + } + ], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Stone Golem", + { + "image": null, + "bestiary": true, + "name": "Stone Golem", + "source": [ + "Monster Manual" + ], + "type": "construct", + "size": "Large", + "alignment": "unaligned", + "hp": 178, + "hit_dice": "17d10 + 85", + "ac": "17 (natural armor)", + "speed": "30 ft.", + "stats": [ + 22, + 9, + 20, + 3, + 11, + 1 + ], + "damage_immunities": "poison, psychic, bludgeoning, piercing, slashing from nonmagical attacks that aren't adamantine", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, frightened, paralyzed, petrified, poisoned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 120 ft., passive Perception 10", + "languages": "understands the languages of its creator but can't speak", + "cr": "10", + "traits": [ + { + "name": "Immutable Form", + "desc": "The golem is immune to any spell or effect that would alter its form." + }, + { + "name": "Magic Resistance", + "desc": "The golem has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Magic Weapons", + "desc": "The golem's weapon attacks are magical." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The golem makes two slam attacks." + }, + { + "name": "Slam", + "desc": "Melee Weapon Attack +10 to hit, reach 5 ft., one target. 19 (3d8 + 6) bludgeoning damage." + }, + { + "name": "Slow (Recharge 5-6)", + "desc": "The golem targets one or more creatures it can see within 10 feet of it. Each target must make a 17 Wisdom saving throw against this magic. On a failed save, a target can't use reactions, its speed is halved, and it can't make more than one attack on its turn. In addition, the target can take either an action or a bonus action on its turn, not both. These effects last for 1 minute. A target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Storm Giant", + { + "image": null, + "bestiary": true, + "name": "Storm Giant", + "source": [ + "Monster Manual" + ], + "type": "giant", + "size": "Huge", + "alignment": "chaotic good", + "hp": 230, + "hit_dice": "20d12 + 100", + "ac": "16 (scale mail)", + "speed": "50 ft., swim 50 ft.", + "stats": [ + 29, + 14, + 20, + 16, + 18, + 18 + ], + "damage_immunities": "lightning, thunder", + "damage_resistances": "cold", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "strength": "14" + }, + { + "constitution": "10" + }, + { + "wisdom": "9" + }, + { + "charisma": "9" + } + ], + "skillsaves": [ + { + "arcana": "8" + }, + { + "athletics": "14" + }, + { + "history": "8" + }, + { + "perception": "9" + } + ], + "senses": "passive Perception 19", + "languages": "Common, Giant", + "cr": "13", + "traits": [ + { + "name": "Amphibious", + "desc": "The giant can breathe air and water." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The giant makes two greatsword attacks." + }, + { + "name": "Greatsword", + "desc": "Melee Weapon Attack +14 to hit, reach 10 ft., one target. 30 (6d6 + 9) slashing damage." + }, + { + "name": "Rock", + "desc": "Ranged Weapon Attack +14 to hit, range 60/240 ft., one target. 35 (4d12 + 9) bludgeoning damage." + }, + { + "name": "Lightning Strike (Recharge 5-6)", + "desc": "The giant hurls a magical lightning bolt at a point it can see within 500 feet of it. Each creature within 10 feet of that point must make a 17 Dexterity saving throw, taking 54 (12d8) lightning damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The giant's innate spellcasting ability is Charisma (spell save 17). It can innately cast the following spells, requiring no material components:", + { + "At will": "detect magic, feather fall, levitate, light" + }, + { + "3/day each": "control weather, water breathing" + } + ], + "spellsNotes": "" + } + ], + [ + "Succubus", + { + "image": null, + "bestiary": true, + "name": "Succubus", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "shapechanger", + "size": "Medium", + "alignment": "neutral evil", + "hp": 66, + "hit_dice": "12d8 + 12", + "ac": "15 (natural armor)", + "speed": "30 ft., fly 60 ft.", + "stats": [ + 8, + 17, + 13, + 15, + 12, + 20 + ], + "damage_immunities": "", + "damage_resistances": "cold, fire, lightning, poison, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "deception": "9" + }, + { + "insight": "5" + }, + { + "perception": "5" + }, + { + "persuasion": "9" + }, + { + "stealth": "7" + } + ], + "senses": "darkvision 60 ft., passive Perception 15", + "languages": "Abyssal, Common, Infernal, telepathy 60 ft.", + "cr": "4", + "traits": [ + { + "name": "Telepathic Bond", + "desc": "The fiend ignores the range restriction on its telepathy when communicating with a creature it has charmed. The two don't even need to be on the same plane of existence." + }, + { + "name": "Shapechanger", + "desc": "The fiend can use its action to polymorph into a Small or Medium humanoid, or back into its true form. Without wings, the fiend loses its flying speed. Other than its size and speed, its statistics are the same in each form. Any equipment it is wearing or carrying isn't transformed. It reverts to its true form if it dies." + } + ], + "actions": [ + { + "name": "Claw (Fiend Form Only)", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) slashing damage." + }, + { + "name": "Charm", + "desc": "One humanoid the fiend can see within 30 feet of it must succeed on a 15 Wisdom saving throw or be magically charmed for 1 day. The charmed target obeys the fiend's verbal or telepathic commands. If the target suffers any harm or receives a suicidal command, it can repeat the saving throw, ending the effect on a success. If the target successfully saves against the effect, or if the effect on it ends, the target is immune to this fiend's Charm for the next 24 hours.\nThe fiend can have only one target charmed at a time. If it charms another, the effect on the previous target ends." + }, + { + "name": "Draining Kiss", + "desc": "The fiend kisses a creature charmed by it or a willing creature. The target must make a 15 Constitution saving throw against this magic, taking 32 (5d10 + 5) psychic damage on a failed save, or half as much damage on a successful one. The target's hit point maximum is reduced by an amount equal to the damage taken. This reduction lasts until the target finishes a long rest. The target dies if this effect reduces its hit point maximum to 0." + }, + { + "name": "Etherealness", + "desc": "The fiend magically enters the Ethereal Plane from the Material Plane, or vice versa." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Swarm of Bats", + { + "image": null, + "bestiary": true, + "name": "Swarm of Bats", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 22, + "hit_dice": "5d8", + "ac": 12, + "speed": "0 ft., fly 30 ft.", + "stats": [ + 5, + 15, + 10, + 2, + 12, + 4 + ], + "damage_immunities": "", + "damage_resistances": "bludgeoning, piercing, slashing", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, frightened, grappled, paralyzed, petrified, prone, restrained, stunned", + "saves": [], + "skillsaves": [], + "senses": "blindsight 60 ft., passive Perception 11", + "languages": "", + "cr": "1/4", + "traits": [ + { + "name": "Echolocation", + "desc": "The swarm can't use its blindsight while deafened." + }, + { + "name": "Keen Hearing", + "desc": "The swarm has advantage on Wisdom (Perception) checks that rely on hearing." + }, + { + "name": "Swarm", + "desc": "The swarm can occupy another creature's space and vice versa, and the swarm can move through any opening large enough for a Tiny bat. The swarm can't regain hit points or gain temporary hit points." + } + ], + "actions": [ + { + "name": "Bites", + "desc": "Melee Weapon Attack +4 to hit, reach 0 ft., one creature in the swarm's space. 5 (2d4) piercing damage, or 2 (1d4) piercing damage if the swarm has half of its hit points or fewer." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Swarm of Beetles", + { + "image": null, + "bestiary": true, + "name": "Swarm of Beetles", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 22, + "hit_dice": "5d8", + "ac": "12 (natural armor)", + "speed": "20 ft., burrow 5 ft., climb 20 ft.", + "stats": [ + 3, + 13, + 10, + 1, + 7, + 1 + ], + "damage_immunities": "", + "damage_resistances": "bludgeoning, piercing, slashing", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, frightened, grappled, paralyzed, petrified, prone, restrained, stunned", + "saves": [], + "skillsaves": [], + "senses": "blindsight 10 ft., passive Perception 8", + "languages": "", + "cr": "1/2", + "traits": [ + { + "name": "Swarm", + "desc": "The swarm can occupy another creature's space and vice versa, and the swarm can move through any opening large enough for a Tiny insect. The swarm can't regain hit points or gain temporary hit points." + } + ], + "actions": [ + { + "name": "Bites", + "desc": "Melee Weapon Attack +3 to hit, reach 0 ft., one target in the swarm's space. 10 (4d4) piercing damage, or 5 (2d4) piercing damage if the swarm has half of its hit points or fewer." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Swarm of Centipedes", + { + "image": null, + "bestiary": true, + "name": "Swarm of Centipedes", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 22, + "hit_dice": "5d8", + "ac": "12 (natural armor)", + "speed": "20 ft., climb 20 ft.", + "stats": [ + 3, + 13, + 10, + 1, + 7, + 1 + ], + "damage_immunities": "", + "damage_resistances": "bludgeoning, piercing, slashing", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, frightened, grappled, paralyzed, petrified, prone, restrained, stunned", + "saves": [], + "skillsaves": [], + "senses": "blindsight 10 ft., passive Perception 8", + "languages": "", + "cr": "1/2", + "traits": [ + { + "name": "Swarm", + "desc": "The swarm can occupy another creature's space and vice versa, and the swarm can move through any opening large enough for a Tiny insect. The swarm can't regain hit points or gain temporary hit points." + } + ], + "actions": [ + { + "name": "Bites", + "desc": "Melee Weapon Attack +3 to hit, reach 0 ft., one target in the swarm's space. 10 (4d4) piercing damage, or 5 (2d4) piercing damage if the swarm has half of its hit points or fewer.\nA creature reduced to 0 hit points by a swarm of centipedes is stable but poisoned for 1 hour, even after regaining hit points, and paralyzed while poisoned in this way." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Swarm of Insects", + { + "image": null, + "bestiary": true, + "name": "Swarm of Insects", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 22, + "hit_dice": "5d8", + "ac": "12 (natural armor)", + "speed": "20 ft., climb 20 ft.", + "stats": [ + 3, + 13, + 10, + 1, + 7, + 1 + ], + "damage_immunities": "", + "damage_resistances": "bludgeoning, piercing, slashing", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, frightened, grappled, paralyzed, petrified, prone, restrained, stunned", + "saves": [], + "skillsaves": [], + "senses": "blindsight 10 ft., passive Perception 8", + "languages": "", + "cr": "1/2", + "traits": [ + { + "name": "Swarm", + "desc": "The swarm can occupy another creature's space and vice versa, and the swarm can move through any opening large enough for a Tiny insect. The swarm can't regain hit points or gain temporary hit points." + } + ], + "actions": [ + { + "name": "Bites", + "desc": "Melee Weapon Attack +3 to hit, reach 0 ft., one target in the swarm's space. 10 (4d4) piercing damage, or 5 (2d4) piercing damage if the swarm has half of its hit points or fewer." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Swarm of Poisonous Snakes", + { + "image": null, + "bestiary": true, + "name": "Swarm of Poisonous Snakes", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 36, + "hit_dice": "8d8", + "ac": 14, + "speed": "30 ft., swim 30 ft.", + "stats": [ + 8, + 18, + 11, + 1, + 10, + 3 + ], + "damage_immunities": "", + "damage_resistances": "bludgeoning, piercing, slashing", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, frightened, grappled, paralyzed, petrified, prone, restrained, stunned", + "saves": [], + "skillsaves": [], + "senses": "blindsight 10 ft., passive Perception 10", + "languages": "", + "cr": "2", + "traits": [ + { + "name": "Swarm", + "desc": "The swarm can occupy another creature's space and vice versa, and the swarm can move through any opening large enough for a Tiny snake. The swarm can't regain hit points or gain temporary hit points." + } + ], + "actions": [ + { + "name": "Bites", + "desc": "Melee Weapon Attack +6 to hit, reach 0 ft., one creature in the swarm's space. 7 (2d6) piercing damage, or 3 (1d6) piercing damage if the swarm has half of its hit points or fewer. The target must make a 10 Constitution saving throw, taking 14 (4d6) poison damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Swarm of Quippers", + { + "image": null, + "bestiary": true, + "name": "Swarm of Quippers", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 28, + "hit_dice": "8d8 - 8", + "ac": 13, + "speed": "0 ft., swim 40 ft.", + "stats": [ + 13, + 16, + 9, + 1, + 7, + 2 + ], + "damage_immunities": "", + "damage_resistances": "bludgeoning, piercing, slashing", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, frightened, grappled, paralyzed, petrified, prone, restrained, stunned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 8", + "languages": "", + "cr": "1", + "traits": [ + { + "name": "Blood Frenzy", + "desc": "The swarm has advantage on melee attack rolls against any creature that doesn't have all its hit points." + }, + { + "name": "Swarm", + "desc": "The swarm can occupy another creature's space and vice versa, and the swarm can move through any opening large enough for a Tiny quipper. The swarm can't regain hit points or gain temporary hit points." + }, + { + "name": "Water Breathing", + "desc": "The swarm can breathe only underwater." + } + ], + "actions": [ + { + "name": "Bites", + "desc": "Melee Weapon Attack +5 to hit, reach 0 ft., one creature in the swarm's space. 14 (4d6) piercing damage, or 7 (2d6) piercing damage if the swarm has half of its hit points or fewer." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Swarm of Rats", + { + "image": null, + "bestiary": true, + "name": "Swarm of Rats", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 24, + "hit_dice": "7d8 - 7", + "ac": 10, + "speed": "30 ft.", + "stats": [ + 9, + 11, + 9, + 2, + 10, + 3 + ], + "damage_immunities": "", + "damage_resistances": "bludgeoning, piercing, slashing", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, frightened, grappled, paralyzed, petrified, prone, restrained, stunned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 30 ft., passive Perception 10", + "languages": "", + "cr": "1/4", + "traits": [ + { + "name": "Keen Smell", + "desc": "The swarm has advantage on Wisdom (Perception) checks that rely on smell." + }, + { + "name": "Swarm", + "desc": "The swarm can occupy another creature's space and vice versa, and the swarm can move through any opening large enough for a Tiny rat. The swarm can't regain hit points or gain temporary hit points." + } + ], + "actions": [ + { + "name": "Bites", + "desc": "Melee Weapon Attack +2 to hit, reach 0 ft., one target in the swarm's space. 7 (2d6) piercing damage, or 3 (1d6) piercing damage if the swarm has half of its hit points or fewer." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Swarm of Ravens", + { + "image": null, + "bestiary": true, + "name": "Swarm of Ravens", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 24, + "hit_dice": "7d8 - 7", + "ac": 12, + "speed": "10 ft., fly 50 ft.", + "stats": [ + 6, + 14, + 8, + 3, + 12, + 6 + ], + "damage_immunities": "", + "damage_resistances": "bludgeoning, piercing, slashing", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, frightened, grappled, paralyzed, petrified, prone, restrained, stunned", + "saves": [], + "skillsaves": [ + { + "perception": "5" + } + ], + "senses": "passive Perception 15", + "languages": "", + "cr": "1/4", + "traits": [ + { + "name": "Swarm", + "desc": "The swarm can occupy another creature's space and vice versa, and the swarm can move through any opening large enough for a Tiny raven. The swarm can't regain hit points or gain temporary hit points." + } + ], + "actions": [ + { + "name": "Beaks", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target in the swarm's space. 7 (2d6) piercing damage, or 3 (1d6) piercing damage if the swarm has half of its hit points or fewer." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Swarm of Spiders", + { + "image": null, + "bestiary": true, + "name": "Swarm of Spiders", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 22, + "hit_dice": "5d8", + "ac": "12 (natural armor)", + "speed": "20 ft., climb 20 ft.", + "stats": [ + 3, + 13, + 10, + 1, + 7, + 1 + ], + "damage_immunities": "", + "damage_resistances": "bludgeoning, piercing, slashing", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, frightened, grappled, paralyzed, petrified, prone, restrained, stunned", + "saves": [], + "skillsaves": [], + "senses": "blindsight 10 ft., passive Perception 8", + "languages": "", + "cr": "1/2", + "traits": [ + { + "name": "Swarm", + "desc": "The swarm can occupy another creature's space and vice versa, and the swarm can move through any opening large enough for a Tiny insect. The swarm can't regain hit points or gain temporary hit points." + }, + { + "name": "Spider Climb", + "desc": "The swarm can climb difficult surfaces, including upside down on ceilings, without needing to make an ability check." + }, + { + "name": "Web Sense", + "desc": "While in contact with a web, the swarm knows the exact location of any other creature in contact with the same web." + }, + { + "name": "Web Walker", + "desc": "The swarm ignores movement restrictions caused by webbing." + } + ], + "actions": [ + { + "name": "Bites", + "desc": "Melee Weapon Attack +3 to hit, reach 0 ft., one target in the swarm's space. 10 (4d4) piercing damage, or 5 (2d4) piercing damage if the swarm has half of its hit points or fewer." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Swarm of Wasps", + { + "image": null, + "bestiary": true, + "name": "Swarm of Wasps", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 22, + "hit_dice": "5d8", + "ac": "12 (natural armor)", + "speed": "5 ft., fly 30 ft.", + "stats": [ + 3, + 13, + 10, + 1, + 7, + 1 + ], + "damage_immunities": "", + "damage_resistances": "bludgeoning, piercing, slashing", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, frightened, grappled, paralyzed, petrified, prone, restrained, stunned", + "saves": [], + "skillsaves": [], + "senses": "blindsight 10 ft., passive Perception 8", + "languages": "", + "cr": "1/2", + "traits": [ + { + "name": "Swarm", + "desc": "The swarm can occupy another creature's space and vice versa, and the swarm can move through any opening large enough for a Tiny insect. The swarm can't regain hit points or gain temporary hit points." + } + ], + "actions": [ + { + "name": "Bites", + "desc": "Melee Weapon Attack +3 to hit, reach 0 ft., one target in the swarm's space. 10 (4d4) piercing damage, or 5 (2d4) piercing damage if the swarm has half of its hit points or fewer." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Tarrasque", + { + "image": null, + "bestiary": true, + "name": "Tarrasque", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "subtype": "titan", + "size": "Gargantuan", + "alignment": "unaligned", + "hp": 676, + "hit_dice": "33d20 + 330", + "ac": "25 (natural armor)", + "speed": "40 ft.", + "stats": [ + 30, + 11, + 30, + 3, + 11, + 11 + ], + "damage_immunities": "fire, poison, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, frightened, paralyzed, poisoned", + "saves": [ + { + "intelligence": "5" + }, + { + "wisdom": "9" + }, + { + "charisma": "9" + } + ], + "skillsaves": [], + "senses": "blindsight 120 ft., passive Perception 10", + "languages": "", + "cr": "30", + "traits": [ + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the tarrasque fails a saving throw, it can choose to succeed instead." + }, + { + "name": "Magic Resistance", + "desc": "The tarrasque has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Reflective Carapace", + "desc": "Any time the tarrasque is targeted by a magic missile spell, a line spell, or a spell that requires a ranged attack roll, roll a d6. On a 1 to 5, the tarrasque is unaffected. On a 6, the tarrasque is unaffected, and the effect is reflected back at the caster as though it originated from the tarrasque, turning the caster into the target." + }, + { + "name": "Siege Monster", + "desc": "The tarrasque deals double damage to objects and structures." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The tarrasque can use its Frightful Presence. It then makes five attacks: one with its bite, two with its claws, one with its horns, and one with its tail. It can use its Swallow instead of its bite." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +19 to hit, reach 10 ft., one target. 36 (4d12 + 10) piercing damage. If the target is a creature, it is grappled (escape 20). Until this grapple ends, the target is restrained, and the tarrasque can't bite another target." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +19 to hit, reach 15 ft., one target. 28 (4d8 + 10) slashing damage." + }, + { + "name": "Horns", + "desc": "Melee Weapon Attack +19 to hit, reach 10 ft., one target. 32 (4d10 + 10) piercing damage." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +19 to hit, reach 20 ft., one target. 24 (4d6 + 10) bludgeoning damage. If the target is a creature, it must succeed on a 20 Strength saving throw or be knocked prone." + }, + { + "name": "Frightful Presence", + "desc": "Each creature of the tarrasque's choice within 120 feet of it and aware of it must succeed on a 17 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, with disadvantage if the tarrasque is within line of sight, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the tarrasque's Frightful Presence for the next 24 hours." + }, + { + "name": "Swallow", + "desc": "The tarrasque makes one bite attack against a Large or smaller creature it is grappling. If the attack hits, the target takes the bite's damage, the target is swallowed, and the grapple ends. While swallowed, the creature is blinded and restrained, it has Cover against attacks and other effects outside the tarrasque, and it takes 56 (16d6) acid damage at the start of each of the tarrasque's turns.\nIf the tarrasque takes 60 damage or more on a single turn from a creature inside it, the tarrasque must succeed on a 20 Constitution saving throw at the end of that turn or regurgitate all swallowed creatures, which fall prone in a space within 10 feet of the tarrasque. If the tarrasque dies, a swallowed creature is no longer restrained by it and can escape from the corpse by using 30 feet of movement, exiting prone." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Attack", + "desc": "The tarrasque makes one claw attack or tail attack." + }, + { + "name": "Move", + "desc": "The tarrasque moves up to half its speed." + }, + { + "name": "Chomp (Costs 2 Actions)", + "desc": "The tarrasque makes one bite attack or uses its Swallow." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Thri-kreen", + { + "image": null, + "bestiary": true, + "name": "Thri-kreen", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "thri-kreen", + "size": "Medium", + "alignment": "chaotic neutral", + "hp": 33, + "hit_dice": "6d8 + 6", + "ac": "15 (natural armor)", + "speed": "40 ft.", + "stats": [ + 12, + 15, + 13, + 8, + 12, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + }, + { + "stealth": "4" + }, + { + "survival": "3" + } + ], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "Thri-kreen", + "cr": "1", + "traits": [ + { + "name": "Chameleon Carapace", + "desc": "The thri-kreen can change the color of its carapace to match the color and texture of its surroundings. As a result, it has advantage on Dexterity (Stealth) checks made to hide." + }, + { + "name": "Standing Leap", + "desc": "The thri-kreen's long jump is up to 30 feet and its high jump is up to 15 feet, with or without a running start." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The thri-kreen makes two attacks: one with its bite and one with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one creature. 4 (1d6 + 1) piercing damage, and the target must succeed on a 11 Constitution saving throw or be poisoned for 1 minute. If the saving throw fails by 5 or more, the target is also paralyzed while poisoned in this way. The poisoned target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 6 (2d4 + 1) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Thug", + { + "image": null, + "bestiary": true, + "name": "Thug", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "lawful neutral (law/chaos axis) chaotic neutral (good/evil axis) evil", + "hp": 32, + "hit_dice": "5d8 + 10", + "ac": "11 (leather armor)", + "speed": "30 ft.", + "stats": [ + 15, + 11, + 14, + 10, + 10, + 11 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "intimidation": "2" + } + ], + "senses": "passive Perception 10", + "languages": "any one language (usually Common)", + "cr": "1/2", + "traits": [ + { + "name": "Pack Tactics", + "desc": "The thug has advantage on an attack roll against a creature if at least one of the thug's allies is within 5 feet of the creature and the ally isn't incapacitated." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The thug makes two melee attacks." + }, + { + "name": "Mace", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 5 (1d6 + 2) bludgeoning damage." + }, + { + "name": "Heavy Crossbow", + "desc": "Ranged Weapon Attack +2 to hit, range 100/400 ft., one target. 5 (1d10) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Tiger", + { + "image": null, + "bestiary": true, + "name": "Tiger", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 37, + "hit_dice": "5d10 + 10", + "ac": 12, + "speed": "40 ft.", + "stats": [ + 17, + 15, + 14, + 3, + 12, + 8 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + }, + { + "stealth": "6" + } + ], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "", + "cr": "1", + "traits": [ + { + "name": "Keen Smell", + "desc": "The tiger has advantage on Wisdom (Perception) checks that rely on smell." + }, + { + "name": "Pounce", + "desc": "If the tiger moves at least 20 feet straight toward a creature and then hits it with a claw attack on the same turn, that target must succeed on a 13 Strength saving throw or be knocked prone. If the target is prone, the tiger can make one bite attack against it as a bonus action." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 8 (1d10 + 3) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 7 (1d8 + 3) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Treant", + { + "image": null, + "bestiary": true, + "name": "Treant", + "source": [ + "Monster Manual" + ], + "type": "plant", + "size": "Huge", + "alignment": "chaotic good", + "hp": 138, + "hit_dice": "12d12 + 60", + "ac": "16 (natural armor)", + "speed": "30 ft.", + "stats": [ + 23, + 8, + 21, + 12, + 16, + 12 + ], + "damage_immunities": "", + "damage_resistances": "bludgeoning, piercing", + "damage_vulnerabilities": "fire", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 13", + "languages": "Common, Druidic, Elvish, Sylvan", + "cr": "9", + "traits": [ + { + "name": "False Appearance", + "desc": "While the treant remains motionless, it is indistinguishable from a normal tree." + }, + { + "name": "Siege Monster", + "desc": "The treant deals double damage to objects and structures." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The treant makes two slam attacks." + }, + { + "name": "Slam", + "desc": "Melee Weapon Attack +10 to hit, reach 5 ft., one target. 16 (3d6 + 6) bludgeoning damage." + }, + { + "name": "Rock", + "desc": "Ranged Weapon Attack +10 to hit, range 60/180 ft., one target. 28 (4d10 + 6) bludgeoning damage." + }, + { + "name": "Animate Trees (1/Day)", + "desc": "The treant magically animates one or two trees it can see within 60 feet of it. These trees have the same statistics as a treant, except they have Intelligence and Charisma scores of 1, they can't speak, and they have only the Slam action option. An animated tree acts as an ally of the treant. The tree remains animate for 1 day or until it dies; until the treant dies or is more than 120 feet from the tree; or until the treant takes a bonus action to turn it back into an inanimate tree. The tree then takes root if possible." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Tribal Warrior", + { + "image": null, + "bestiary": true, + "name": "Tribal Warrior", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "any alignment", + "hp": 11, + "hit_dice": "2d8 + 2", + "ac": "12 (hide armor)", + "speed": "30 ft.", + "stats": [ + 13, + 11, + 12, + 8, + 11, + 8 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 10", + "languages": "any one language", + "cr": "1/8", + "traits": [ + { + "name": "Pack Tactics", + "desc": "The warrior has advantage on an attack roll against a creature if at least one of the warrior's allies is within 5 feet of the creature and the ally isn't incapacitated." + } + ], + "actions": [ + { + "name": "Spear", + "desc": "Melee / Ranged Weapon Attack +3 to hit, reach 5 ft. or range 20/60 ft., one target. 4 (1d6 + 1) piercing damage, or 5 (1d8 + 1) piercing damage if used with two hands to make a melee attack." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Triceratops", + { + "image": null, + "bestiary": true, + "name": "Triceratops", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Huge", + "alignment": "unaligned", + "hp": 95, + "hit_dice": "10d12 + 30", + "ac": "13 (natural armor)", + "speed": "50 ft.", + "stats": [ + 22, + 9, + 17, + 2, + 11, + 5 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 10", + "languages": "", + "cr": "5", + "traits": [ + { + "name": "Trampling Charge", + "desc": "If the triceratops moves at least 20 feet straight toward a creature and then hits it with a gore attack on the same turn, that target must succeed on a 13 Strength saving throw or be knocked prone. If the target is prone, the triceratops can make one stomp attack against it as a bonus action." + } + ], + "actions": [ + { + "name": "Gore", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one target. 24 (4d8 + 6) piercing damage." + }, + { + "name": "Stomp", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one prone creature. 22 (3d10 + 6) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Tridrone", + { + "image": null, + "bestiary": true, + "name": "Tridrone", + "source": [ + "Monster Manual" + ], + "type": "construct", + "size": "Medium", + "alignment": "lawful neutral", + "hp": 16, + "hit_dice": "3d8 + 3", + "ac": "15 (natural armor)", + "speed": "30 ft.", + "stats": [ + 12, + 13, + 12, + 9, + 10, + 9 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "truesight 120 ft., passive Perception 10", + "languages": "Modron", + "cr": "1/2", + "traits": [ + { + "name": "Axiomatic Mind", + "desc": "The tridrone can't be compelled to act in a manner contrary to its nature or its instructions." + }, + { + "name": "Disintegration", + "desc": "If the tridrone dies, its body disintegrates into dust, leaving behind its weapons and anything else it was carrying." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The tridrone makes three fist attacks or three javelin attacks." + }, + { + "name": "Fist", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 3 (1d4 + 1) bludgeoning damage." + }, + { + "name": "Javelin", + "desc": "Melee / Ranged Weapon Attack +3 to hit, reach 5 ft. or range 30/120 ft., one target. 4 (1d6 + 1) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Troglodyte", + { + "image": null, + "bestiary": true, + "name": "Troglodyte", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "troglodyte", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 13, + "hit_dice": "2d8 + 4", + "ac": "11 (natural armor)", + "speed": "30 ft.", + "stats": [ + 14, + 10, + 14, + 6, + 10, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "stealth": "2" + } + ], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Troglodyte", + "cr": "1/4", + "traits": [ + { + "name": "Chameleon Skin", + "desc": "The troglodyte has advantage on Dexterity (Stealth) checks made to hide." + }, + { + "name": "Stench", + "desc": "Any creature other than a troglodyte that starts its turn within 5 feet of the troglodyte must succeed on a 12 Constitution saving throw or be poisoned until the start of the creature's next turn. On a successful saving throw, the creature is immune to the stench of all troglodytes for 1 hour." + }, + { + "name": "Sunlight Sensitivity", + "desc": "While in sunlight, the troglodyte has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The troglodyte makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 4 (1d4 + 2) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 4 (1d4 + 2) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Troll", + { + "image": null, + "bestiary": true, + "name": "Troll", + "source": [ + "Monster Manual" + ], + "type": "giant", + "size": "Large", + "alignment": "chaotic evil", + "hp": 84, + "hit_dice": "8d10 + 40", + "ac": "15 (natural armor)", + "speed": "30 ft.", + "stats": [ + 18, + 13, + 20, + 7, + 9, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "2" + } + ], + "senses": "darkvision 60 ft., passive Perception 12", + "languages": "Giant", + "cr": "5", + "traits": [ + { + "name": "Keen Smell", + "desc": "The troll has advantage on Wisdom (Perception) checks that rely on smell." + }, + { + "name": "Regeneration", + "desc": "The troll regains 10 hit points at the start of its turn. If the troll takes acid or fire damage, this trait doesn't function at the start of the troll's next turn. The troll dies only if it starts its turn with 0 hit points and doesn't regenerate." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The troll makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 7 (1d6 + 4) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 11 (2d6 + 4) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Twig Blight", + { + "image": null, + "bestiary": true, + "name": "Twig Blight", + "source": [ + "Monster Manual" + ], + "type": "plant", + "size": "Small", + "alignment": "neutral evil", + "hp": 4, + "hit_dice": "1d6 + 1", + "ac": "13 (natural armor)", + "speed": "20 ft.", + "stats": [ + 6, + 13, + 12, + 4, + 8, + 3 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "fire", + "condition_immunities": "blinded, deafened", + "saves": [], + "skillsaves": [ + { + "stealth": "3" + } + ], + "senses": "blindsight 60 ft. (blind beyond this radius), passive Perception 9", + "languages": "understands Common but can't speak", + "cr": "1/8", + "traits": [ + { + "name": "False Appearance", + "desc": "While the blight remains motionless, it is indistinguishable from a dead shrub." + } + ], + "actions": [ + { + "name": "Claws", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 3 (1d4 + 1) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Tyrannosaurus Rex", + { + "image": null, + "bestiary": true, + "name": "Tyrannosaurus Rex", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Huge", + "alignment": "unaligned", + "hp": 136, + "hit_dice": "13d12 + 52", + "ac": "13 (natural armor)", + "speed": "50 ft.", + "stats": [ + 25, + 10, + 19, + 2, + 12, + 9 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "4" + } + ], + "senses": "passive Perception 14", + "languages": "", + "cr": "8", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The tyrannosaurus makes two attacks: one with its bite and one with its tail. It can't make both attacks against the same target." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +10 to hit, reach 10 ft., one target. 33 (4d12 + 7) piercing damage. If the target is a Medium or smaller creature, it is grappled (escape 17). Until this grapple ends, the target is restrained, and the tyrannosaurus can't bite another target." + }, + { + "name": "Tail", + "desc": "Melee Weapon Attack +10 to hit, reach 10 ft., one target. 20 (3d8 + 7) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Ultroloth", + { + "image": null, + "bestiary": true, + "name": "Ultroloth", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "yugoloth", + "size": "Medium", + "alignment": "neutral evil", + "hp": 153, + "hit_dice": "18d8 + 72", + "ac": "19 (natural armor)", + "speed": "30 ft., fly 60 ft.", + "stats": [ + 16, + 16, + 18, + 18, + 15, + 19 + ], + "damage_immunities": "acid, poison", + "damage_resistances": "cold, fire, lightning, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, frightened, poisoned", + "saves": [], + "skillsaves": [ + { + "intimidation": "9" + }, + { + "perception": "7" + }, + { + "stealth": "8" + } + ], + "senses": "truesight 120 ft., passive Perception 17", + "languages": "Abyssal, Infernal, telepathy 120 ft.", + "cr": "13", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The ultroloth has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Magic Weapons", + "desc": "The ultroloth's weapon attacks are magical." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The ultroloth can use its Hypnotic Gaze and makes three melee attacks." + }, + { + "name": "Longsword", + "desc": "Melee Weapon Attack +8 to hit, reach 5 ft., one target. 7 (1d8 + 3) slashing damage, or 8 (1d10 + 3) slashing damage if used with two hands." + }, + { + "name": "Hypnotic Gaze", + "desc": "The ultroloth's eyes sparkle with opalescent light as it targets one creature it can see within 30 feet of it. If the target can see the ultroloth, the target must succeed on a 17 Wisdom saving throw against this magic or be charmed until the end of the ultroloth's next turn. The charmed target is stunned. If the target's saving throw is successful, the target is immune to the ultroloth's gaze for the next 24 hours." + }, + { + "name": "Teleport", + "desc": "The ultroloth magically teleports, along with any equipment it is wearing or carrying, up to 60 feet to an unoccupied space it can see." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The ultroloth's innate spellcasting ability is Charisma (spell save 17). The ultroloth can innately cast the following spells, requiring no material components:", + { + "At will": "alter self, clairvoyance, darkness, detect magic, detect thoughts, dispel magic, invisibility (self only), suggestion" + }, + { + "3/day each": "dimension door, fear, wall of fire" + }, + { + "1/day each": "fire storm, mass suggestion" + } + ], + "spellsNotes": "" + } + ], + [ + "Umber Hulk", + { + "image": null, + "bestiary": true, + "name": "Umber Hulk", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "chaotic evil", + "hp": 93, + "hit_dice": "11d10 + 33", + "ac": "18 (natural armor)", + "speed": "30 ft., burrow 20 ft.", + "stats": [ + 20, + 13, + 16, + 9, + 10, + 10 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 120 ft., tremorsense 60 ft., passive Perception 10", + "languages": "Umber Hulk", + "cr": "5", + "traits": [ + { + "name": "Confusing Gaze", + "desc": "When a creature starts its turn within 30 feet of the umber hulk and is able to see the umber hulk's eyes, the umber hulk can magically force it to make a 15 Charisma saving throw, unless the umber hulk is incapacitated.\nOn a failed saving throw, the creature can't take reactions until the start of its next turn and rolls a d8 to determine what it does during that turn. On a 1 to 4, the creature does nothing. On a 5 or 6, the creature takes no action but uses all its movement to move in a random direction. On a 7 or 8, the creature makes one melee attack against a random creature, or it does nothing if no creature is within reach.\nUnless {@status surprised}, a creature can avert its eyes to avoid the saving throw at the start of its turn. If the creature does so, it can't see the umber hulk until the start of its next turn, when it can avert its eyes again. If the creature looks at the umber hulk in the meantime, it must immediately make the save." + }, + { + "name": "Tunneler", + "desc": "The umber hulk can burrow through solid rock at half its burrowing speed and leaves a 5 foot-wide, 8-foot-high tunnel in its wake." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The umber hulk makes three attacks: two with its claws and one with its mandibles." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +8 to hit, reach 5 ft., one target. 9 (1d8 + 5) slashing damage." + }, + { + "name": "Mandibles", + "desc": "Melee Weapon Attack +8 to hit, reach 5 ft., one target. 14 (2d8 + 5) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Unicorn", + { + "image": null, + "bestiary": true, + "name": "Unicorn", + "source": [ + "Monster Manual" + ], + "type": "celestial", + "size": "Large", + "alignment": "lawful good", + "hp": 67, + "hit_dice": "9d10 + 18", + "ac": 12, + "speed": "50 ft.", + "stats": [ + 18, + 14, + 15, + 11, + 17, + 16 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, paralyzed, poisoned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "Celestial, Elvish, Sylvan, telepathy 60 ft.", + "cr": "5", + "traits": [ + { + "name": "Charge", + "desc": "If the unicorn moves at least 20 feet straight toward a target and then hits it with a horn attack on the same turn, the target takes an extra 9 (2d8) piercing damage. If the target is a creature, it must succeed on a 15 Strength saving throw or be knocked prone." + }, + { + "name": "Magic Resistance", + "desc": "The unicorn has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Magic Weapons", + "desc": "The unicorn's weapon attacks are magical." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The unicorn makes two attacks: one with its hooves and one with its horn." + }, + { + "name": "Hooves", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 11 (2d6 + 4) bludgeoning damage." + }, + { + "name": "Horn", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 8 (1d8 + 4) piercing damage." + }, + { + "name": "Healing Touch (3/Day)", + "desc": "The unicorn touches another creature with its horn. The target magically regains 11 (2d8 + 2) hit points. In addition, the touch removes all diseases and neutralizes all poisons afflicting the target." + }, + { + "name": "Teleport (1/Day)", + "desc": "The unicorn magically teleports itself and up to three willing creatures it can see within 5 feet of it, along with any equipment they are wearing or carrying, to a location the unicorn is familiar with, up to 1 mile away." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Hooves", + "desc": "The unicorn makes one attack with its hooves." + }, + { + "name": "Shimmering Shield (Costs 2 Actions)", + "desc": "The unicorn creates a shimmering, magical field around itself or another creature it can see within 60 feet of it. The target gains a +2 bonus to AC until the end of the unicorn's next turn." + }, + { + "name": "Heal Self (Costs 3 Actions)", + "desc": "The unicorn magically regains 11 (2d8 + 2) hit points." + } + ], + "mythic_actions": [], + "spells": [ + "The unicorn's innate spellcasting ability is Charisma (spell save 14). The unicorn can innately cast the following spells, requiring no components:", + { + "At will": "detect evil and good, druidcraft, pass without trace" + }, + { + "1/day each": "calm emotions, dispel evil and good, entangle" + } + ], + "spellsNotes": "" + } + ], + [ + "Vampire", + { + "image": null, + "bestiary": true, + "name": "Vampire", + "source": [ + "Monster Manual" + ], + "type": "undead", + "subtype": "shapechanger", + "size": "Medium", + "alignment": "lawful evil", + "hp": 144, + "hit_dice": "17d8 + 68", + "ac": "16 (natural armor)", + "speed": "30 ft.", + "stats": [ + 18, + 18, + 18, + 17, + 15, + 18 + ], + "damage_immunities": "", + "damage_resistances": "necrotic, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "9" + }, + { + "wisdom": "7" + }, + { + "charisma": "9" + } + ], + "skillsaves": [ + { + "perception": "7" + }, + { + "stealth": "9" + } + ], + "senses": "darkvision 120 ft., passive Perception 17", + "languages": "the languages it knew in life", + "cr": "13", + "traits": [ + { + "name": "Shapechanger", + "desc": "If the vampire isn't in sunlight or running water, it can use its action to polymorph into a Tiny bat or a Medium cloud of mist, or back into its true form.\nWhile in bat form, the vampire can't speak, its walking speed is 5 feet, and it has a flying speed of 30 feet. Its statistics, other than its size and speed, are unchanged. Anything it is wearing transforms with it, but nothing it is carrying does. It reverts to its true form if it dies.\nWhile in mist form, the vampire can't take any actions, speak, or manipulate objects. It is weightless, has a flying speed of 20 feet, can hover, and can enter a hostile creature's space and stop there. In addition, if air can pass through a space, the mist can do so without squeezing, and it can't pass through water. It has advantage on Strength, Dexterity, and Constitution saving throws, and it is immune to all nonmagical damage, except the damage it takes from sunlight." + }, + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the vampire fails a saving throw, it can choose to succeed instead." + }, + { + "name": "Misty Escape", + "desc": "When it drops to 0 hit points outside its resting place, the vampire transforms into a cloud of mist (as in the Shapechanger trait) instead of falling unconscious, provided that it isn't in sunlight or running water. If it can't transform, it is destroyed.\nWhile it has 0 hit points in mist form, it can't revert to its vampire form, and it must reach its resting place within 2 hours or be destroyed. Once in its resting place, it reverts to its vampire form. It is then paralyzed until it regains at least 1 hit point. After spending 1 hour in its resting place with 0 hit points, it regains 1 hit point." + }, + { + "name": "Regeneration", + "desc": "The vampire regains 20 hit points at the start of its turn if it has at least 1 hit point and isn't in sunlight or running water. If the vampire takes radiant damage or damage from Holy Water (Flask), this trait doesn't function at the start of the vampire's next turn." + }, + { + "name": "Spider Climb", + "desc": "The vampire can climb difficult surfaces, including upside down on ceilings, without needing to make an ability check." + }, + { + "name": "Vampire Weaknesses", + "desc": "The vampire has the following flaws:" + }, + { + "name": "Forbiddance", + "desc": "The vampire can't enter a residence without an invitation from one of the occupants." + }, + { + "name": "Harmed by Running Water", + "desc": "The vampire takes 20 acid damage if it ends its turn in running water." + }, + { + "name": "Stake to the Heart", + "desc": "If a piercing weapon made of wood is driven into the vampire's heart while the vampire is incapacitated in its resting place, the vampire is paralyzed until the stake is removed." + }, + { + "name": "Sunlight Hypersensitivity", + "desc": "The vampire takes 20 radiant damage when it starts its turn in sunlight. While in sunlight, it has disadvantage on attack rolls and ability checks." + } + ], + "actions": [ + { + "name": "Multiattack (Vampire Form Only)", + "desc": "The vampire makes two attacks, only one of which can be a bite attack." + }, + { + "name": "Unarmed Strike (Vampire Form Only)", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one creature. 8 (1d8 + 4) bludgeoning damage. Instead of dealing damage, the vampire can grapple the target (escape 18)." + }, + { + "name": "Bite (Bat or Vampire Form Only)", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one willing creature, or a creature that is grappled by the vampire, incapacitated, or restrained. 7 (1d6 + 4) piercing damage plus 10 (3d6) necrotic damage. The target's hit point maximum is reduced by an amount equal to the necrotic damage taken, and the vampire regains hit points equal to that amount. The reduction lasts until the target finishes a long rest. The target dies if this effect reduces its hit point maximum to 0. A humanoid slain in this way and then buried in the ground rises the following night as a vampire spawn under the vampire's control." + }, + { + "name": "Charm", + "desc": "The vampire targets one humanoid it can see within 30 feet of it. If the target can see the vampire, the target must succeed on a 17 Wisdom saving throw against this magic or be charmed by the vampire. The charmed target regards the vampire as a trusted friend to be heeded and protected. Although the target isn't under the vampire's control, it takes the vampire's requests or actions in the most favorable way it can, and it is a willing target for the vampire's bite attack.\nEach time the vampire or the vampire's companions do anything harmful to the target, it can repeat the saving throw, ending the effect on itself on a success. Otherwise, the effect lasts 24 hours or until the vampire is destroyed, is on a different plane of existence than the target, or takes a bonus action to end the effect." + }, + { + "name": "Children of the Night (1/Day)", + "desc": "The vampire magically calls 2d4 swarms of swarm of bats rounds, acting as allies of the vampire and obeying its spoken commands. The beasts remain for 1 hour, until the vampire dies, or until the vampire dismisses them as a bonus action." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Move", + "desc": "The vampire moves up to its speed without provoking opportunity attacks." + }, + { + "name": "Unarmed Strike", + "desc": "The vampire makes one unarmed strike." + }, + { + "name": "Bite (Costs 2 Actions)", + "desc": "The vampire makes one bite attack." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Vampire Spawn", + { + "image": null, + "bestiary": true, + "name": "Vampire Spawn", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Medium", + "alignment": "neutral evil", + "hp": 82, + "hit_dice": "11d8 + 33", + "ac": "15 (natural armor)", + "speed": "30 ft.", + "stats": [ + 16, + 16, + 16, + 11, + 10, + 12 + ], + "damage_immunities": "", + "damage_resistances": "necrotic, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "6" + }, + { + "wisdom": "3" + } + ], + "skillsaves": [ + { + "perception": "3" + }, + { + "stealth": "6" + } + ], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "the languages it knew in life", + "cr": "5", + "traits": [ + { + "name": "Regeneration", + "desc": "The vampire regains 10 hit points at the start of its turn if it has at least 1 hit point and isn't in sunlight or running water. If the vampire takes radiant damage or damage from Holy Water (Flask), this trait doesn't function at the start of the vampire's next turn." + }, + { + "name": "Spider Climb", + "desc": "The vampire can climb difficult surfaces, including upside down on ceilings, without needing to make an ability check." + }, + { + "name": "Vampire Weaknesses", + "desc": "The vampire has the following flaws:" + }, + { + "name": "Forbiddance", + "desc": "The vampire can't enter a residence without an invitation from one of the occupants." + }, + { + "name": "Harmed by Running Water", + "desc": "The vampire takes 20 acid damage when it ends its turn in running water." + }, + { + "name": "Stake to the Heart", + "desc": "The vampire is destroyed if a piercing weapon made of wood is driven into its heart while it is incapacitated in its resting place." + }, + { + "name": "Sunlight Hypersensitivity", + "desc": "The vampire takes 20 radiant damage when it starts its turn in sunlight. While in sunlight, it has disadvantage on attack rolls and ability checks" + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The vampire makes two attacks, only one of which can be a bite attack." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one willing creature, or a creature that is grappled by the vampire, incapacitated, or restrained. 6 (1d6 + 3) piercing damage plus 7 (2d6) necrotic damage. The target's hit point maximum is reduced by an amount equal to the necrotic damage taken, and the vampire regains hit points equal to that amount. The reduction lasts until the target finishes a long rest. The target dies if this effect reduces its hit point maximum to 0." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one creature. 8 (2d4 + 3) slashing damage. Instead of dealing damage, the vampire can grapple the target (escape 13)." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Vampire Spellcaster", + { + "image": null, + "bestiary": true, + "name": "Vampire Spellcaster", + "source": [ + "Monster Manual" + ], + "type": "undead", + "subtype": "shapechanger", + "size": "Medium", + "alignment": "lawful evil", + "hp": 144, + "hit_dice": "17d8 + 68", + "ac": "16 (natural armor)", + "speed": "30 ft.", + "stats": [ + 18, + 18, + 18, + 17, + 15, + 18 + ], + "damage_immunities": "", + "damage_resistances": "necrotic, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "9" + }, + { + "wisdom": "7" + }, + { + "charisma": "9" + } + ], + "skillsaves": [ + { + "perception": "7" + }, + { + "stealth": "9" + } + ], + "senses": "darkvision 120 ft., passive Perception 17", + "languages": "the languages it knew in life", + "cr": "15", + "traits": [ + { + "name": "Shapechanger", + "desc": "If the vampire isn't in sunlight or running water, it can use its action to polymorph into a Tiny bat or a Medium cloud of mist, or back into its true form.\nWhile in bat form, the vampire can't speak, its walking speed is 5 feet, and it has a flying speed of 30 feet. Its statistics, other than its size and speed, are unchanged. Anything it is wearing transforms with it, but nothing it is carrying does. It reverts to its true form if it dies.\nWhile in mist form, the vampire can't take any actions, speak, or manipulate objects. It is weightless, has a flying speed of 20 feet, can hover, and can enter a hostile creature's space and stop there. In addition, if air can pass through a space, the mist can do so without squeezing, and it can't pass through water. It has advantage on Strength, Dexterity, and Constitution saving throws, and it is immune to all nonmagical damage, except the damage it takes from sunlight." + }, + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the vampire fails a saving throw, it can choose to succeed instead." + }, + { + "name": "Misty Escape", + "desc": "When it drops to 0 hit points outside its resting place, the vampire transforms into a cloud of mist (as in the Shapechanger trait) instead of falling unconscious, provided that it isn't in sunlight or running water. If it can't transform, it is destroyed.\nWhile it has 0 hit points in mist form, it can't revert to its vampire form, and it must reach its resting place within 2 hours or be destroyed. Once in its resting place, it reverts to its vampire form. It is then paralyzed until it regains at least 1 hit point. After spending 1 hour in its resting place with 0 hit points, it regains 1 hit point." + }, + { + "name": "Regeneration", + "desc": "The vampire regains 20 hit points at the start of its turn if it has at least 1 hit point and isn't in sunlight or running water. If the vampire takes radiant damage or damage from Holy Water (Flask), this trait doesn't function at the start of the vampire's next turn." + }, + { + "name": "Spider Climb", + "desc": "The vampire can climb difficult surfaces, including upside down on ceilings, without needing to make an ability check." + }, + { + "name": "Vampire Weaknesses", + "desc": "The vampire has the following flaws:" + }, + { + "name": "Forbiddance", + "desc": "The vampire can't enter a residence without an invitation from one of the occupants." + }, + { + "name": "Harmed by Running Water", + "desc": "The vampire takes 20 acid damage if it ends its turn in running water." + }, + { + "name": "Stake to the Heart", + "desc": "If a piercing weapon made of wood is driven into the vampire's heart while the vampire is incapacitated in its resting place, the vampire is paralyzed until the stake is removed." + }, + { + "name": "Sunlight Hypersensitivity", + "desc": "The vampire takes 20 radiant damage when it starts its turn in sunlight. While in sunlight, it has disadvantage on attack rolls and ability checks" + } + ], + "actions": [ + { + "name": "Multiattack (Vampire Form Only)", + "desc": "The vampire makes two attacks, only one of which can be a bite attack." + }, + { + "name": "Unarmed Strike (Vampire Form Only)", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one creature. 8 (1d8 + 4) bludgeoning damage. Instead of dealing damage, the vampire can grapple the target (escape 18)." + }, + { + "name": "Bite (Bat or Vampire Form Only)", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one willing creature, or a creature that is grappled by the vampire, incapacitated, or restrained. 7 (1d6 + 4) piercing damage plus 10 (3d6) necrotic damage. The target's hit point maximum is reduced by an amount equal to the necrotic damage taken, and the vampire regains hit points equal to that amount. The reduction lasts until the target finishes a long rest. The target dies if this effect reduces its hit point maximum to 0. A humanoid slain in this way and then buried in the ground rises the following night as a vampire spawn under the vampire's control." + }, + { + "name": "Charm", + "desc": "The vampire targets one humanoid it can see within 30 feet of it. If the target can see the vampire, the target must succeed on a 17 Wisdom saving throw against this magic or be charmed by the vampire. The charmed target regards the vampire as a trusted friend to be heeded and protected. Although the target isn't under the vampire's control, it takes the vampire's requests or actions in the most favorable way it can, and it is a willing target for the vampire's bite attack.\nEach time the vampire or the vampire's companions do anything harmful to the target, it can repeat the saving throw, ending the effect on itself on a success. Otherwise, the effect lasts 24 hours or until the vampire is destroyed, is on a different plane of existence than the target, or takes a bonus action to end the effect." + }, + { + "name": "Children of the Night (1/Day)", + "desc": "The vampire magically calls 2d4 swarms of swarm of bats rounds, acting as allies of the vampire and obeying its spoken commands. The beasts remain for 1 hour, until the vampire dies, or until the vampire dismisses them as a bonus action." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Move", + "desc": "The vampire moves up to its speed without provoking opportunity attacks." + }, + { + "name": "Unarmed Strike", + "desc": "The vampire makes one unarmed strike." + }, + { + "name": "Bite (Costs 2 Actions)", + "desc": "The vampire makes one bite attack." + } + ], + "mythic_actions": [], + "spells": [ + "The vampire is a 9th-level spellcaster. Its spellcasting ability is Intelligence (spell save 16, +8 to hit with spell attacks). The vampire has the following wizard spells prepared:", + { + "Cantrips (at will)": "mage hand, prestidigitation, ray of frost" + }, + { + "1st level (4 slots)": "comprehend languages, fog cloud, sleep" + }, + { + "2nd level (3 slots)": "detect thoughts, gust of wind, mirror image" + }, + { + "3rd level (3 slots)": "animate dead, bestow curse, nondetection" + }, + { + "4th level (3 slots)": "blight, greater invisibility" + }, + { + "5th level (1 slots)": "dominate person" + } + ], + "spellsNotes": "" + } + ], + [ + "Vampire Warrior", + { + "image": null, + "bestiary": true, + "name": "Vampire Warrior", + "source": [ + "Monster Manual" + ], + "type": "undead", + "subtype": "shapechanger", + "size": "Medium", + "alignment": "lawful evil", + "hp": 144, + "hit_dice": "17d8 + 68", + "ac": "18 (plate armor)", + "speed": "30 ft.", + "stats": [ + 18, + 18, + 18, + 17, + 15, + 18 + ], + "damage_immunities": "", + "damage_resistances": "necrotic, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "9" + }, + { + "wisdom": "7" + }, + { + "charisma": "9" + } + ], + "skillsaves": [ + { + "perception": "7" + }, + { + "stealth": "9" + } + ], + "senses": "darkvision 120 ft., passive Perception 17", + "languages": "the languages it knew in life", + "cr": "15", + "traits": [ + { + "name": "Shapechanger", + "desc": "If the vampire isn't in sunlight or running water, it can use its action to polymorph into a Tiny bat or a Medium cloud of mist, or back into its true form.\nWhile in bat form, the vampire can't speak, its walking speed is 5 feet, and it has a flying speed of 30 feet. Its statistics, other than its size and speed, are unchanged. Anything it is wearing transforms with it, but nothing it is carrying does. It reverts to its true form if it dies.\nWhile in mist form, the vampire can't take any actions, speak, or manipulate objects. It is weightless, has a flying speed of 20 feet, can hover, and can enter a hostile creature's space and stop there. In addition, if air can pass through a space, the mist can do so without squeezing, and it can't pass through water. It has advantage on Strength, Dexterity, and Constitution saving throws, and it is immune to all nonmagical damage, except the damage it takes from sunlight." + }, + { + "name": "Legendary Resistance (3/Day)", + "desc": "If the vampire fails a saving throw, it can choose to succeed instead." + }, + { + "name": "Misty Escape", + "desc": "When it drops to 0 hit points outside its resting place, the vampire transforms into a cloud of mist (as in the Shapechanger trait) instead of falling unconscious, provided that it isn't in sunlight or running water. If it can't transform, it is destroyed.\nWhile it has 0 hit points in mist form, it can't revert to its vampire form, and it must reach its resting place within 2 hours or be destroyed. Once in its resting place, it reverts to its vampire form. It is then paralyzed until it regains at least 1 hit point. After spending 1 hour in its resting place with 0 hit points, it regains 1 hit point." + }, + { + "name": "Regeneration", + "desc": "The vampire regains 20 hit points at the start of its turn if it has at least 1 hit point and isn't in sunlight or running water. If the vampire takes radiant damage or damage from Holy Water (Flask), this trait doesn't function at the start of the vampire's next turn." + }, + { + "name": "Spider Climb", + "desc": "The vampire can climb difficult surfaces, including upside down on ceilings, without needing to make an ability check." + }, + { + "name": "Vampire Weaknesses", + "desc": "The vampire has the following flaws:" + }, + { + "name": "Forbiddance", + "desc": "The vampire can't enter a residence without an invitation from one of the occupants." + }, + { + "name": "Harmed by Running Water", + "desc": "The vampire takes 20 acid damage if it ends its turn in running water." + }, + { + "name": "Stake to the Heart", + "desc": "If a piercing weapon made of wood is driven into the vampire's heart while the vampire is incapacitated in its resting place, the vampire is paralyzed until the stake is removed." + }, + { + "name": "Sunlight Hypersensitivity", + "desc": "The vampire takes 20 radiant damage when it starts its turn in sunlight. While in sunlight, it has disadvantage on attack rolls and ability checks" + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The vampire makes two greatsword attacks." + }, + { + "name": "Multiattack (Vampire Form Only)", + "desc": "The vampire makes two attacks, only one of which can be a bite attack." + }, + { + "name": "Unarmed Strike (Vampire Form Only)", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one creature. 8 (1d8 + 4) bludgeoning damage. Instead of dealing damage, the vampire can grapple the target (escape 18)." + }, + { + "name": "Greatsword", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one creature. 11 (2d6 + 4) slashing damage." + }, + { + "name": "Bite (Bat or Vampire Form Only)", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one willing creature, or a creature that is grappled by the vampire, incapacitated, or restrained. 7 (1d6 + 4) piercing damage plus 10 (3d6) necrotic damage. The target's hit point maximum is reduced by an amount equal to the necrotic damage taken, and the vampire regains hit points equal to that amount. The reduction lasts until the target finishes a long rest. The target dies if this effect reduces its hit point maximum to 0. A humanoid slain in this way and then buried in the ground rises the following night as a vampire spawn under the vampire's control." + }, + { + "name": "Charm", + "desc": "The vampire targets one humanoid it can see within 30 feet of it. If the target can see the vampire, the target must succeed on a 17 Wisdom saving throw against this magic or be charmed by the vampire. The charmed target regards the vampire as a trusted friend to be heeded and protected. Although the target isn't under the vampire's control, it takes the vampire's requests or actions in the most favorable way it can, and it is a willing target for the vampire's bite attack.\nEach time the vampire or the vampire's companions do anything harmful to the target, it can repeat the saving throw, ending the effect on itself on a success. Otherwise, the effect lasts 24 hours or until the vampire is destroyed, is on a different plane of existence than the target, or takes a bonus action to end the effect." + }, + { + "name": "Children of the Night (1/Day)", + "desc": "The vampire magically calls 2d4 swarms of swarm of bats rounds, acting as allies of the vampire and obeying its spoken commands. The beasts remain for 1 hour, until the vampire dies, or until the vampire dismisses them as a bonus action." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [ + { + "name": "Move", + "desc": "The vampire moves up to its speed without provoking opportunity attacks." + }, + { + "name": "Unarmed Strike", + "desc": "The vampire makes one unarmed strike." + }, + { + "name": "Bite (Costs 2 Actions)", + "desc": "The vampire makes one bite attack." + } + ], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Veteran", + { + "image": null, + "bestiary": true, + "name": "Veteran", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "any race", + "size": "Medium", + "alignment": "any alignment", + "hp": 58, + "hit_dice": "9d8 + 18", + "ac": "17 (splint armor)", + "speed": "30 ft.", + "stats": [ + 16, + 13, + 14, + 10, + 11, + 10 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "athletics": "5" + }, + { + "perception": "2" + } + ], + "senses": "passive Perception 12", + "languages": "any one language (usually Common)", + "cr": "3", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The veteran makes two longsword attacks. If it has a shortsword drawn, it can also make a shortsword attack." + }, + { + "name": "Longsword", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 7 (1d8 + 3) slashing damage, or 8 (1d10 + 3) slashing damage if used with two hands." + }, + { + "name": "Shortsword", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) piercing damage." + }, + { + "name": "Heavy Crossbow", + "desc": "Ranged Weapon Attack +3 to hit, range 100/400 ft., one target. 6 (1d10 + 1) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Vine Blight", + { + "image": null, + "bestiary": true, + "name": "Vine Blight", + "source": [ + "Monster Manual" + ], + "type": "plant", + "size": "Medium", + "alignment": "neutral evil", + "hp": 26, + "hit_dice": "4d8 + 4", + "ac": "12 (natural armor)", + "speed": "10 ft.", + "stats": [ + 15, + 8, + 14, + 5, + 10, + 3 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "blinded, deafened", + "saves": [], + "skillsaves": [ + { + "stealth": "1" + } + ], + "senses": "blindsight 60 ft. (blind beyond this radius), passive Perception 10", + "languages": "Common", + "cr": "1/2", + "traits": [ + { + "name": "False Appearance", + "desc": "While the blight remains motionless, it is indistinguishable from a tangle of vines." + } + ], + "actions": [ + { + "name": "Constrict", + "desc": "Melee Weapon Attack +4 to hit, reach 10 ft., one target. 9 (2d6 + 2) bludgeoning damage, and a Large or smaller target is grappled (escape 12). Until this grapple ends, the target is restrained, and the blight can't constrict another target." + }, + { + "name": "Entangling Plants (Recharge 5-6)", + "desc": "Grasping roots and vines sprout in a 15-foot radius centered on the blight, withering away after 1 minute. For the duration, that area is difficult terrain for nonplant creatures. In addition, each creature of the blight's choice in that area when the plants appear must succeed on a 12 Strength saving throw or become restrained. A creature can use its action to make a 12 Strength check, freeing itself or another entangled creature within reach on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Violet Fungus", + { + "image": null, + "bestiary": true, + "name": "Violet Fungus", + "source": [ + "Monster Manual" + ], + "type": "plant", + "size": "Medium", + "alignment": "unaligned", + "hp": 18, + "hit_dice": "4d8", + "ac": 5, + "speed": "5 ft.", + "stats": [ + 3, + 1, + 10, + 1, + 3, + 1 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "blinded, deafened, frightened", + "saves": [], + "skillsaves": [], + "senses": "blindsight 30 ft. (blind beyond this radius), passive Perception 6", + "languages": "", + "cr": "1/4", + "traits": [ + { + "name": "False Appearance", + "desc": "While the violet fungus remains motionless, it is indistinguishable from an ordinary fungus." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The fungus makes 1d4 Rotting Touch attacks." + }, + { + "name": "Rotting Touch", + "desc": "Melee Weapon Attack +2 to hit, reach 10 ft., one creature. 4 (1d8) necrotic damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Vrock", + { + "image": null, + "bestiary": true, + "name": "Vrock", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "demon", + "size": "Large", + "alignment": "chaotic evil", + "hp": 104, + "hit_dice": "11d10 + 44", + "ac": "15 (natural armor)", + "speed": "40 ft., fly 60 ft.", + "stats": [ + 17, + 15, + 18, + 8, + 13, + 8 + ], + "damage_immunities": "poison", + "damage_resistances": "cold, fire, lightning, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "dexterity": "5" + }, + { + "wisdom": "4" + }, + { + "charisma": "2" + } + ], + "skillsaves": [], + "senses": "darkvision 120 ft., passive Perception 11", + "languages": "Abyssal, telepathy 120 ft.", + "cr": "6", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The vrock has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The vrock makes two attacks: one with its beak and one with its talons." + }, + { + "name": "Beak", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 10 (2d6 + 3) piercing damage." + }, + { + "name": "Talons", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 14 (2d10 + 3) slashing damage." + }, + { + "name": "Spores (Recharge 6)", + "desc": "A 15-foot-radius cloud of toxic spores extends out from the vrock. The spores spread around corners. Each creature in that area must succeed on a 14 Constitution saving throw or become poisoned. While poisoned in this way, a target takes 5 (1d10) poison damage at the start of each of its turns. A target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. Emptying a Holy Water (Flask) on the target also ends the effect on it." + }, + { + "name": "Stunning Screech (1/Day)", + "desc": "The vrock emits a horrific screech. Each creature within 20 feet of it that can hear it and that isn't a demon must succeed on a 14 Constitution saving throw or be stunned until the end of the vrock's next turn." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Vulture", + { + "image": null, + "bestiary": true, + "name": "Vulture", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 5, + "hit_dice": "1d8 + 1", + "ac": 10, + "speed": "10 ft., fly 50 ft.", + "stats": [ + 7, + 10, + 13, + 2, + 12, + 4 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + } + ], + "senses": "passive Perception 13", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Keen Sight and Smell", + "desc": "The vulture has advantage on Wisdom (Perception) checks that rely on sight or smell." + }, + { + "name": "Pack Tactics", + "desc": "The vulture has advantage on an attack roll against a creature if at least one of the vulture's allies is within 5 feet of the creature and the ally isn't incapacitated." + } + ], + "actions": [ + { + "name": "Beak", + "desc": "Melee Weapon Attack +2 to hit, reach 5 ft., one target. 2 (1d4) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Warhorse", + { + "image": null, + "bestiary": true, + "name": "Warhorse", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Large", + "alignment": "unaligned", + "hp": 19, + "hit_dice": "3d10 + 3", + "ac": 11, + "speed": "60 ft.", + "stats": [ + 18, + 12, + 13, + 2, + 12, + 7 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "passive Perception 11", + "languages": "", + "cr": "1/2", + "traits": [ + { + "name": "Trampling Charge", + "desc": "If the horse moves at least 20 feet straight toward a creature and then hits it with a hooves attack on the same turn, that target must succeed on a 14 Strength saving throw or be knocked prone. If the target is prone, the horse can make another attack with its hooves against it as a bonus action." + } + ], + "actions": [ + { + "name": "Hooves", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 11 (2d6 + 4) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Warhorse Skeleton", + { + "image": null, + "bestiary": true, + "name": "Warhorse Skeleton", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Large", + "alignment": "lawful evil", + "hp": 22, + "hit_dice": "3d10 + 6", + "ac": "13 (barding scraps)", + "speed": "60 ft.", + "stats": [ + 18, + 12, + 15, + 2, + 8, + 5 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "bludgeoning", + "condition_immunities": "exhaustion, poisoned", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 9", + "languages": "", + "cr": "1/2", + "traits": [], + "actions": [ + { + "name": "Hooves", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 11 (2d6 + 4) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Water Elemental", + { + "image": null, + "bestiary": true, + "name": "Water Elemental", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Large", + "alignment": "neutral", + "hp": 114, + "hit_dice": "12d10 + 48", + "ac": "14 (natural armor)", + "speed": "30 ft., swim 90 ft.", + "stats": [ + 18, + 14, + 18, + 5, + 10, + 8 + ], + "damage_immunities": "poison", + "damage_resistances": "acid, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "exhaustion, grappled, paralyzed, petrified, poisoned, prone, restrained, unconscious", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 10", + "languages": "Aquan", + "cr": "5", + "traits": [ + { + "name": "Water Form", + "desc": "The elemental can enter a hostile creature's space and stop there. It can move through a space as narrow as 1 inch wide without squeezing." + }, + { + "name": "Freeze", + "desc": "If the elemental takes cold damage, it partially freezes; its speed is reduced by 20 feet until the end of its next turn." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The elemental makes two slam attacks." + }, + { + "name": "Slam", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 13 (2d8 + 4) bludgeoning damage." + }, + { + "name": "Whelm (Recharge 4-6)", + "desc": "Each creature in the elemental's space must make a 15 Strength saving throw. On a failure, a target takes 13 (2d8 + 4) bludgeoning damage. If it is Large or smaller, it is also grappled (escape 14). Until this grapple ends, the target is restrained and unable to breathe unless it can breathe water. If the saving throw is successful, the target is pushed out of the elemental's space.\nThe elemental can grapple one Large creature or up to two Medium or smaller creatures at one time. At the start of each of the elemental's turns, each target grappled by it takes 13 (2d8 + 4) bludgeoning damage. A creature within 5 feet of the elemental can pull a creature or object out of it by taking an action to make a 14 Strength check and succeeding." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Water Weird", + { + "image": null, + "bestiary": true, + "name": "Water Weird", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Large", + "alignment": "neutral", + "hp": 58, + "hit_dice": "9d10 + 9", + "ac": 13, + "speed": "0 ft., swim 60 ft.", + "stats": [ + 17, + 16, + 13, + 11, + 10, + 10 + ], + "damage_immunities": "poison", + "damage_resistances": "fire, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "exhaustion, grappled, paralyzed, poisoned, restrained, prone, unconscious", + "saves": [], + "skillsaves": [], + "senses": "blindsight 30 ft., passive Perception 10", + "languages": "understands Aquan but doesn't speak", + "cr": "3", + "traits": [ + { + "name": "Invisible in Water", + "desc": "The water weird is invisible while fully immersed in water." + }, + { + "name": "Water Bound", + "desc": "The water weird dies if it leaves the water to which it is bound or if that water is destroyed." + } + ], + "actions": [ + { + "name": "Constrict", + "desc": "Melee Weapon Attack +5 to hit, reach 10 ft., one creature. 13 (3d6 + 3) bludgeoning damage. If the target is Medium or smaller, it is grappled (escape 13) and pulled 5 feet toward the water weird. Until this grapple ends, the target is restrained, the water weird tries to drown it, and the water weird can't constrict another target." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Weasel", + { + "image": null, + "bestiary": true, + "name": "Weasel", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Tiny", + "alignment": "unaligned", + "hp": 1, + "hit_dice": "1d4 - 1", + "ac": 13, + "speed": "30 ft.", + "stats": [ + 3, + 16, + 8, + 2, + 12, + 3 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + }, + { + "stealth": "5" + } + ], + "senses": "passive Perception 13", + "languages": "", + "cr": "0", + "traits": [ + { + "name": "Keen Hearing and Smell", + "desc": "The weasel has advantage on Wisdom (Perception) checks that rely on hearing or smell." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one creature. 1 piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Werebear", + { + "image": null, + "bestiary": true, + "name": "Werebear", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "human, shapechanger", + "size": "Medium", + "alignment": "neutral good", + "hp": 135, + "hit_dice": "18d8 + 54", + "ac": "10", + "speed": "30 ft. (40 ft., climb 30 ft. in bear or hybrid form)", + "stats": [ + 19, + 10, + 17, + 11, + 12, + 12 + ], + "damage_immunities": "bludgeoning, piercing, slashing from nonmagical attacks that aren't silvered", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "7" + } + ], + "senses": "passive Perception 17", + "languages": "Common (can't speak in bear form)", + "cr": "5", + "traits": [ + { + "name": "Shapechanger", + "desc": "The werebear can use its action to polymorph into a Large bear-humanoid hybrid or into a Large bear, or back into its true form, which is humanoid. Its statistics, other than its size and AC, are the same in each form. Any equipment it is wearing or carrying isn't transformed. It reverts to its true form if it dies." + }, + { + "name": "Keen Smell", + "desc": "The werebear has advantage on Wisdom (Perception) checks that rely on smell." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "In bear form, the werebear makes two claw attacks. In humanoid form, it makes two greataxe attacks. In hybrid form, it can attack like a bear or a humanoid." + }, + { + "name": "Bite (Bear or Hybrid Form Only)", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 15 (2d10 + 4) piercing damage. If the target is a humanoid, it must succeed on a 14 Constitution saving throw or be cursed with werebear {@variantrule Player Characters as Lycanthropes|MM|lycanthropy}." + }, + { + "name": "Claw (Bear or Hybrid Form Only)", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 13 (2d8 + 4) slashing damage." + }, + { + "name": "Greataxe (Humanoid or Hybrid Form Only)", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 10 (1d12 + 4) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Wereboar", + { + "image": null, + "bestiary": true, + "name": "Wereboar", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "human, shapechanger", + "size": "Medium", + "alignment": "neutral evil", + "hp": 78, + "hit_dice": "12d8 + 24", + "ac": "10", + "speed": "30 ft. (40 ft. in boar form)", + "stats": [ + 17, + 10, + 15, + 10, + 11, + 8 + ], + "damage_immunities": "bludgeoning, piercing, slashing from nonmagical attacks that aren't silvered", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "2" + } + ], + "senses": "passive Perception 12", + "languages": "Common (can't speak in boar form)", + "cr": "4", + "traits": [ + { + "name": "Shapechanger", + "desc": "The wereboar can use its action to polymorph into a boar-humanoid hybrid or into a boar, or back into its true form, which is humanoid. Its statistics, other than its AC, are the same in each form. Any equipment it is wearing or carrying isn't transformed. It reverts to its true form if it dies." + }, + { + "name": "Charge (Boar or Hybrid Form Only)", + "desc": "If the wereboar moves at least 15 feet straight toward a target and then hits it with its tusks on the same turn, the target takes an extra 7 (2d6) slashing damage. If the target is a creature, it must succeed on a 13 Strength saving throw or be knocked prone." + }, + { + "name": "Relentless (Recharges after a Short or Long Rest)", + "desc": "If the wereboar takes 14 damage or less that would reduce it to 0 hit points, it is reduced to 1 hit point instead." + } + ], + "actions": [ + { + "name": "Multiattack (Humanoid or Hybrid Form Only)", + "desc": "The wereboar makes two attacks, only one of which can be with its tusks." + }, + { + "name": "Maul (Humanoid or Hybrid Form Only)", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 10 (2d6 + 3) bludgeoning damage." + }, + { + "name": "Tusks (Boar or Hybrid Form Only)", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 10 (2d6 + 3) slashing damage. If the target is a humanoid, it must succeed on a 12 Constitution saving throw or be cursed with wereboar {@variantrule Player Characters as Lycanthropes|MM|lycanthropy}." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Wererat", + { + "image": null, + "bestiary": true, + "name": "Wererat", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "human, shapechanger", + "size": "Medium", + "alignment": "lawful evil", + "hp": 33, + "hit_dice": "6d8 + 6", + "ac": 12, + "speed": "30 ft.", + "stats": [ + 10, + 15, + 12, + 11, + 10, + 8 + ], + "damage_immunities": "bludgeoning, piercing, slashing from nonmagical attacks that aren't silvered", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "2" + }, + { + "stealth": "4" + } + ], + "senses": "darkvision 60 ft. (rat form only), passive Perception 12", + "languages": "Common (can't speak in rat form)", + "cr": "2", + "traits": [ + { + "name": "Shapechanger", + "desc": "The wererat can use its action to polymorph into a rat-humanoid hybrid or into a giant rat, or back into its true form, which is humanoid. Its statistics, other than its size, are the same in each form. Any equipment it is wearing or carrying isn't transformed. It reverts to its true form if it dies." + }, + { + "name": "Keen Smell", + "desc": "The wererat has advantage on Wisdom (Perception) checks that rely on smell." + } + ], + "actions": [ + { + "name": "Multiattack (Humanoid or Hybrid Form Only)", + "desc": "The wererat makes two attacks, only one of which can be a bite." + }, + { + "name": "Bite (Rat or Hybrid Form Only)", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 4 (1d4 + 2) piercing damage. If the target is a humanoid, it must succeed on a 11 Constitution saving throw or be cursed with wererat {@variantrule Player Characters as Lycanthropes|MM|lycanthropy}." + }, + { + "name": "Shortsword (Humanoid or Hybrid Form Only)", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 5 (1d6 + 2) piercing damage." + }, + { + "name": "Hand Crossbow (Humanoid or Hybrid Form Only)", + "desc": "Ranged Weapon Attack +4 to hit, range 30/120 ft., one target. 5 (1d6 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Weretiger", + { + "image": null, + "bestiary": true, + "name": "Weretiger", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "human, shapechanger", + "size": "Medium", + "alignment": "neutral", + "hp": 120, + "hit_dice": "16d8 + 48", + "ac": 12, + "speed": "30 ft. (40 ft. in tiger form)", + "stats": [ + 17, + 15, + 16, + 10, + 13, + 11 + ], + "damage_immunities": "bludgeoning, piercing, slashing from nonmagical attacks that aren't silvered", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "5" + }, + { + "stealth": "4" + } + ], + "senses": "darkvision 60 ft., passive Perception 15", + "languages": "Common (can't speak in tiger form)", + "cr": "4", + "traits": [ + { + "name": "Shapechanger", + "desc": "The weretiger can use its action to polymorph into a tiger-humanoid hybrid or into a tiger, or back into its true form, which is humanoid. Its statistics, other than its size, are the same in each form. Any equipment it is wearing or carrying isn't transformed. It reverts to its true form if it dies." + }, + { + "name": "Keen Hearing and Smell", + "desc": "The weretiger has advantage on Wisdom (Perception) checks that rely on hearing or smell." + }, + { + "name": "Pounce (Tiger or Hybrid Form Only)", + "desc": "If the weretiger moves at least 15 feet straight toward a creature and then hits it with a claw attack on the same turn, that target must succeed on a 14 Strength saving throw or be knocked prone. If the target is prone, the weretiger can make one bite attack against it as a bonus action." + } + ], + "actions": [ + { + "name": "Multiattack (Humanoid or Hybrid Form Only)", + "desc": "In humanoid form, the weretiger makes two scimitar attacks or two longbow attacks. In hybrid form, it can attack like a humanoid or make two claw attacks." + }, + { + "name": "Bite (Tiger or Hybrid Form Only)", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 8 (1d10 + 3) piercing damage. If the target is a humanoid, it must succeed on a 13 Constitution saving throw or be cursed with weretiger {@variantrule Player Characters as Lycanthropes|MM|lycanthropy}." + }, + { + "name": "Claw (Tiger or Hybrid Form Only)", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 7 (1d8 + 3) slashing damage." + }, + { + "name": "Scimitar (Humanoid or Hybrid Form Only)", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) slashing damage." + }, + { + "name": "Longbow (Humanoid or Hybrid Form Only)", + "desc": "Ranged Weapon Attack +4 to hit, range 150/600 ft., one target. 6 (1d8 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Werewolf", + { + "image": null, + "bestiary": true, + "name": "Werewolf", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "human, shapechanger", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 58, + "hit_dice": "9d8 + 18", + "ac": "11", + "speed": "30 ft. (40 ft. in wolf form)", + "stats": [ + 15, + 13, + 14, + 10, + 11, + 10 + ], + "damage_immunities": "bludgeoning, piercing, slashing from nonmagical attacks that aren't silvered", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "4" + }, + { + "stealth": "3" + } + ], + "senses": "passive Perception 14", + "languages": "Common (can't speak in wolf form)", + "cr": "3", + "traits": [ + { + "name": "Shapechanger", + "desc": "The werewolf can use its action to polymorph into a wolf-humanoid hybrid or into a wolf, or back into its true form, which is humanoid. Its statistics, other than its AC, are the same in each form. Any equipment it is wearing or carrying isn't transformed. It reverts to its true form if it dies." + }, + { + "name": "Keen Hearing and Smell", + "desc": "The werewolf has advantage on Wisdom (Perception) checks that rely on hearing or smell." + } + ], + "actions": [ + { + "name": "Multiattack (Humanoid or Hybrid Form Only)", + "desc": "The werewolf makes two attacks: two with its spear (humanoid form) or one with its bite and one with its claws (hybrid form)." + }, + { + "name": "Bite (Wolf or Hybrid Form Only)", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 6 (1d8 + 2) piercing damage. If the target is a humanoid, it must succeed on a 12 Constitution saving throw or be cursed with werewolf {@variantrule Player Characters as Lycanthropes|MM|lycanthropy}." + }, + { + "name": "Claws (Hybrid Form Only)", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 7 (2d4 + 2) slashing damage." + }, + { + "name": "Spear (Humanoid Form Only)", + "desc": "Melee / Ranged Weapon Attack +4 to hit, reach 5 ft. or range 20/60 ft., one creature. 5 (1d6 + 2) piercing damage, or 6 (1d8 + 2) piercing damage if used with two hands to make a melee attack." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "White Dragon Wyrmling", + { + "image": null, + "bestiary": true, + "name": "White Dragon Wyrmling", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 32, + "hit_dice": "5d8 + 10", + "ac": "16 (natural armor)", + "speed": "30 ft., burrow 15 ft., fly 60 ft., swim 30 ft.", + "stats": [ + 14, + 10, + 14, + 5, + 10, + 11 + ], + "damage_immunities": "cold", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "2" + }, + { + "constitution": "4" + }, + { + "wisdom": "2" + }, + { + "charisma": "2" + } + ], + "skillsaves": [ + { + "perception": "4" + }, + { + "stealth": "2" + } + ], + "senses": "blindsight 10 ft., darkvision 60 ft., passive Perception 14", + "languages": "Draconic", + "cr": "2", + "traits": [], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 7 (1d10 + 2) piercing damage plus 2 (1d4) cold damage." + }, + { + "name": "Cold Breath (Recharge 5-6)", + "desc": "The dragon exhales an icy blast of hail in a 15-foot cone. Each creature in that area must make a 12 Constitution saving throw, taking 22 (5d8) cold damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Wight", + { + "image": null, + "bestiary": true, + "name": "Wight", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Medium", + "alignment": "neutral evil", + "hp": 45, + "hit_dice": "6d8 + 18", + "ac": "14 (studded leather armor)", + "speed": "30 ft.", + "stats": [ + 15, + 14, + 16, + 10, + 13, + 15 + ], + "damage_immunities": "poison", + "damage_resistances": "necrotic, bludgeoning, piercing, slashing from nonmagical attacks that aren't silvered", + "damage_vulnerabilities": "", + "condition_immunities": "exhaustion, poisoned", + "saves": [], + "skillsaves": [ + { + "perception": "3" + }, + { + "stealth": "4" + } + ], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "the languages it knew in life", + "cr": "3", + "traits": [ + { + "name": "Sunlight Sensitivity", + "desc": "While in sunlight, the wight has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The wight makes two longsword attacks or two longbow attacks. It can use its Life Drain in place of one longsword attack." + }, + { + "name": "Life Drain", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one creature. 5 (1d6 + 2) necrotic damage. The target must succeed on a 13 Constitution saving throw or its hit point maximum is reduced by an amount equal to the damage taken. This reduction lasts until the target finishes a long rest. The target dies if this effect reduces its hit point maximum to 0.\nA humanoid slain by this attack rises 24 hours later as a zombie under the wight's control, unless the humanoid is restored to life or its body is destroyed. The wight can have no more than twelve zombies under its control at one time." + }, + { + "name": "Longsword", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 6 (1d8 + 2) slashing damage, or 7 (1d10 + 2) slashing damage if used with two hands." + }, + { + "name": "Longbow", + "desc": "Ranged Weapon Attack +4 to hit, range 150/600 ft., one target. 6 (1d8 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Will-o'-Wisp", + { + "image": null, + "bestiary": true, + "name": "Will-o'-Wisp", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Tiny", + "alignment": "chaotic evil", + "hp": 22, + "hit_dice": "9d4", + "ac": 19, + "speed": "0 ft., fly 50 ft. (hover)", + "stats": [ + 1, + 28, + 10, + 13, + 14, + 11 + ], + "damage_immunities": "lightning, poison", + "damage_resistances": "acid, cold, fire, necrotic, thunder, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "exhaustion, grappled, paralyzed, poisoned, prone, restrained, unconscious", + "saves": [], + "skillsaves": [], + "senses": "darkvision 120 ft., passive Perception 12", + "languages": "the languages it knew in life", + "cr": "2", + "traits": [ + { + "name": "Consume Life", + "desc": "As a bonus action, the will-o'-wisp can target one creature it can see within 5 feet of it that has 0 hit points and is still alive. The target must succeed on a 10 Constitution saving throw against this magic or die. If the target dies, the will-o'-wisp regains 10 (3d6) hit points." + }, + { + "name": "Ephemeral", + "desc": "The will-o'-wisp can't wear or carry anything." + }, + { + "name": "Incorporeal Movement", + "desc": "The will-o'-wisp can move through other creatures and objects as if they were difficult terrain. It takes 5 (1d10) force damage if it ends its turn inside an object." + }, + { + "name": "Variable Illumination", + "desc": "The will-o'-wisp sheds bright light in a 5 to 20-foot radius and dim light for an additional number of ft. equal to the chosen radius. The will-o'-wisp can alter the radius as a bonus action." + } + ], + "actions": [ + { + "name": "Shock", + "desc": "Melee Spell Attack +4 to hit, reach 5 ft., one creature. 9 (2d8) lightning damage." + }, + { + "name": "Invisibility", + "desc": "The will-o'-wisp and its light magically become invisible until it attacks or uses its Consume Life, or until its {@status concentration} ends (as if {@status concentration||concentrating} on a spell)." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Winged Kobold", + { + "image": null, + "bestiary": true, + "name": "Winged Kobold", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "kobold", + "size": "Small", + "alignment": "lawful evil", + "hp": 7, + "hit_dice": "3d6 - 3", + "ac": 13, + "speed": "30 ft., fly 30 ft.", + "stats": [ + 7, + 16, + 9, + 8, + 7, + 8 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 8", + "languages": "Common, Draconic", + "cr": "1/4", + "traits": [ + { + "name": "Sunlight Sensitivity", + "desc": "While in sunlight, the kobold has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight." + }, + { + "name": "Pack Tactics", + "desc": "The kobold has advantage on an attack roll against a creature if at least one of the kobold's allies is within 5 feet of the creature and the ally isn't incapacitated." + } + ], + "actions": [ + { + "name": "Dagger", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 5 (1d4 + 3) piercing damage." + }, + { + "name": "Dropped Rock", + "desc": "Ranged Weapon Attack +5 to hit, one target directly below the kobold. 6 (1d6 + 3) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Winter Wolf", + { + "image": null, + "bestiary": true, + "name": "Winter Wolf", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "neutral evil", + "hp": 75, + "hit_dice": "10d10 + 20", + "ac": "13 (natural armor)", + "speed": "50 ft.", + "stats": [ + 18, + 13, + 14, + 7, + 12, + 8 + ], + "damage_immunities": "cold", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "5" + }, + { + "stealth": "3" + } + ], + "senses": "passive Perception 15", + "languages": "Common, Giant, Winter Wolf", + "cr": "3", + "traits": [ + { + "name": "Keen Hearing and Smell", + "desc": "The wolf has advantage on Wisdom (Perception) checks that rely on hearing or smell." + }, + { + "name": "Pack Tactics", + "desc": "The wolf has advantage on an attack roll against a creature if at least one of the wolf's allies is within 5 feet of the creature and the ally isn't incapacitated." + }, + { + "name": "Snow Camouflage", + "desc": "The wolf has advantage on Dexterity (Stealth) checks made to hide in snowy terrain." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 11 (2d6 + 4) piercing damage. If the target is a creature, it must succeed on a 14 Strength saving throw or be knocked prone." + }, + { + "name": "Cold Breath (Recharge 5-6)", + "desc": "The wolf exhales a blast of freezing wind in a 15-foot cone. Each creature in that area must make a 12 Dexterity saving throw, taking 18 (4d8) cold damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Wolf", + { + "image": null, + "bestiary": true, + "name": "Wolf", + "source": [ + "Monster Manual" + ], + "type": "beast", + "size": "Medium", + "alignment": "unaligned", + "hp": 11, + "hit_dice": "2d8 + 2", + "ac": "13 (natural armor)", + "speed": "40 ft.", + "stats": [ + 12, + 15, + 12, + 3, + 12, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + }, + { + "stealth": "4" + } + ], + "senses": "passive Perception 13", + "languages": "", + "cr": "1/4", + "traits": [ + { + "name": "Keen Hearing and Smell", + "desc": "The wolf has advantage on Wisdom (Perception) checks that rely on hearing or smell." + }, + { + "name": "Pack Tactics", + "desc": "The wolf has advantage on an attack roll against a creature if at least one of the wolf's allies is within 5 feet of the creature and the ally isn't incapacitated." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 7 (2d4 + 2) piercing damage. If the target is a creature, it must succeed on a 11 Strength saving throw or be knocked prone." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Worg", + { + "image": null, + "bestiary": true, + "name": "Worg", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "neutral evil", + "hp": 26, + "hit_dice": "4d10 + 4", + "ac": "13 (natural armor)", + "speed": "50 ft.", + "stats": [ + 16, + 13, + 13, + 7, + 11, + 8 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "4" + } + ], + "senses": "darkvision 60 ft., passive Perception 14", + "languages": "Goblin, Worg", + "cr": "1/2", + "traits": [ + { + "name": "Keen Hearing and Smell", + "desc": "The worg has advantage on Wisdom (Perception) checks that rely on hearing or smell." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 10 (2d6 + 3) piercing damage. If the target is a creature, it must succeed on a 13 Strength saving throw or be knocked prone." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Wraith", + { + "image": null, + "bestiary": true, + "name": "Wraith", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Medium", + "alignment": "neutral evil", + "hp": 67, + "hit_dice": "9d8 + 27", + "ac": 13, + "speed": "0 ft., fly 60 ft. (hover)", + "stats": [ + 6, + 16, + 16, + 12, + 14, + 15 + ], + "damage_immunities": "necrotic, poison", + "damage_resistances": "acid, cold, fire, lightning, thunder, bludgeoning, piercing, slashing from nonmagical attacks that aren't silvered", + "damage_vulnerabilities": "", + "condition_immunities": "charmed, exhaustion, grappled, paralyzed, petrified, poisoned, prone, restrained", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 12", + "languages": "the languages it knew in life", + "cr": "5", + "traits": [ + { + "name": "Incorporeal Movement", + "desc": "The wraith can move through other creatures and objects as if they were difficult terrain. It takes 5 (1d10) force damage if it ends its turn inside an object." + }, + { + "name": "Sunlight Sensitivity", + "desc": "While in sunlight, the wraith has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Life Drain", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one creature. 21 (4d8 + 3) necrotic damage. The target must succeed on a 14 Constitution saving throw or its hit point maximum is reduced by an amount equal to the damage taken. This reduction lasts until the target finishes a long rest. The target dies if this effect reduces its hit point maximum to 0." + }, + { + "name": "Create Specter", + "desc": "The wraith targets a humanoid within 10 feet of it that has been dead for no longer than 1 minute and died violently. The target's spirit rises as a specter in the space of its corpse or in the nearest unoccupied space. The specter is under the wraith's control. The wraith can have no more than seven specters under its control at one time." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Wyvern", + { + "image": null, + "bestiary": true, + "name": "Wyvern", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Large", + "alignment": "unaligned", + "hp": 110, + "hit_dice": "13d10 + 39", + "ac": "13 (natural armor)", + "speed": "20 ft., fly 80 ft.", + "stats": [ + 19, + 10, + 16, + 5, + 12, + 6 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "4" + } + ], + "senses": "darkvision 60 ft., passive Perception 14", + "languages": "", + "cr": "6", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The wyvern makes two attacks: one with its bite and one with its stinger. While flying, it can use its claws in place of one other attack." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 10 ft., one creature. 11 (2d6 + 4) piercing damage." + }, + { + "name": "Claws", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 13 (2d8 + 4) slashing damage." + }, + { + "name": "Stinger", + "desc": "Melee Weapon Attack +7 to hit, reach 10 ft., one creature. 11 (2d6 + 4) piercing damage. The target must make a 15 Constitution saving throw, taking 24 (7d6) poison damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Xorn", + { + "image": null, + "bestiary": true, + "name": "Xorn", + "source": [ + "Monster Manual" + ], + "type": "elemental", + "size": "Medium", + "alignment": "neutral", + "hp": 73, + "hit_dice": "7d8 + 42", + "ac": "19 (natural armor)", + "speed": "20 ft., burrow 20 ft.", + "stats": [ + 17, + 10, + 22, + 11, + 10, + 11 + ], + "damage_immunities": "", + "damage_resistances": "piercing, slashing from nonmagical attacks that aren't adamantine", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "6" + }, + { + "stealth": "3" + } + ], + "senses": "darkvision 60 ft., tremorsense 60 ft., passive Perception 16", + "languages": "Terran", + "cr": "5", + "traits": [ + { + "name": "Earth Glide", + "desc": "The xorn can burrow through nonmagical, unworked earth and stone. While doing so, the xorn doesn't disturb the material it moves through." + }, + { + "name": "Stone Camouflage", + "desc": "The xorn has advantage on Dexterity (Stealth) checks made to hide in rocky terrain." + }, + { + "name": "Treasure Sense", + "desc": "The xorn can pinpoint, by scent, the location of precious metals and stones, such as coins and gems, within 60 feet of it." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The xorn makes three claw attacks and one bite attack." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 13 (3d6 + 3) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 6 (1d6 + 3) slashing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Yeti", + { + "image": null, + "bestiary": true, + "name": "Yeti", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "chaotic evil", + "hp": 51, + "hit_dice": "6d10 + 18", + "ac": "12 (natural armor)", + "speed": "40 ft., climb 40 ft.", + "stats": [ + 18, + 13, + 16, + 8, + 12, + 7 + ], + "damage_immunities": "cold", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "3" + }, + { + "stealth": "3" + } + ], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "Yeti", + "cr": "3", + "traits": [ + { + "name": "Fear of Fire", + "desc": "If the yeti takes fire damage, it has disadvantage on attack rolls and ability checks until the end of its next turn." + }, + { + "name": "Keen Smell", + "desc": "The yeti has advantage on Wisdom (Perception) checks that rely on smell." + }, + { + "name": "Snow Camouflage", + "desc": "The yeti has advantage on Dexterity (Stealth) checks made to hide in snowy terrain." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The yeti can use its Chilling Gaze and makes two claw attacks." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 7 (1d6 + 4) slashing damage plus 3 (1d6) cold damage." + }, + { + "name": "Chilling Gaze", + "desc": "The yeti targets one creature it can see within 30 feet of it. If the target can see the yeti, the target must succeed on a 13 Constitution saving throw against this magic or take 10 (3d6) cold damage and then be paralyzed for 1 minute, unless it is immune to cold damage. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If the target's saving throw is successful, or if the effect ends on it, the target is immune to the Chilling Gaze of all yetis (but not abominable yetis) for 1 hour." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Yochlol", + { + "image": null, + "bestiary": true, + "name": "Yochlol", + "source": [ + "Monster Manual" + ], + "type": "fiend", + "subtype": "demon, shapechanger", + "size": "Medium", + "alignment": "chaotic evil", + "hp": 136, + "hit_dice": "16d8 + 64", + "ac": "15 (natural armor)", + "speed": "30 ft., climb 30 ft.", + "stats": [ + 15, + 14, + 18, + 13, + 15, + 15 + ], + "damage_immunities": "poison", + "damage_resistances": "cold, fire, lightning, bludgeoning, piercing, slashing from nonmagical attacks", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "dexterity": "6" + }, + { + "intelligence": "5" + }, + { + "wisdom": "6" + }, + { + "charisma": "6" + } + ], + "skillsaves": [ + { + "deception": "10" + }, + { + "insight": "6" + } + ], + "senses": "darkvision 120 ft., passive Perception 12", + "languages": "Abyssal, Elvish, Undercommon", + "cr": "10", + "traits": [ + { + "name": "Shapechanger", + "desc": "The yochlol can use its action to polymorph into a form that resembles a female drow or giant spider, or back into its true form. Its statistics are the same in each form. Any equipment it is wearing or carrying isn't transformed. It reverts to its true form if it dies." + }, + { + "name": "Magic Resistance", + "desc": "The yochlol has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Spider Climb", + "desc": "The yochlol can climb difficult surfaces, including upside down on ceilings, without needing to make an ability check." + }, + { + "name": "Web Walker", + "desc": "The yochlol ignores movement restrictions caused by webbing." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The yochlol makes two melee attacks." + }, + { + "name": "Slam (Bite in Spider Form)", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft. (10 feet in demon form), one target. 5 (1d6 + 2) bludgeoning (piercing in spider form) damage plus 21 (6d6) poison damage." + }, + { + "name": "Mist Form", + "desc": "The yochlol transforms into toxic mist or reverts to its true form. Any equipment it is wearing or carrying is also transformed. It reverts to its true form if it dies.\nWhile in mist form, the yochlol is incapacitated and can't speak. It has a flying speed of 30 feet, can hover, and can pass through any space that isn't airtight. It has advantage on Strength, Dexterity, and Constitution saving throws, and it is immune to nonmagical damage.\nWhile in mist form, the yochlol can enter a creature's space and stop there. Each time that creature starts its turn with the yochlol in its space, the creature must succeed on a 14 Constitution saving throw or be poisoned until the start of its next turn. While poisoned in this way, the target is incapacitated." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The yochlol's spellcasting ability is Charisma (spell save 14). The yochlol can innately cast the following spells, requiring no material components:", + { + "At will": "detect thoughts, web" + }, + { + "1/day each": "dominate person" + } + ], + "spellsNotes": "" + } + ], + [ + "Young Black Dragon", + { + "image": null, + "bestiary": true, + "name": "Young Black Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Large", + "alignment": "chaotic evil", + "hp": 127, + "hit_dice": "15d10 + 45", + "ac": "18 (natural armor)", + "speed": "40 ft., fly 80 ft., swim 40 ft.", + "stats": [ + 19, + 14, + 17, + 12, + 11, + 15 + ], + "damage_immunities": "acid", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "5" + }, + { + "constitution": "6" + }, + { + "wisdom": "3" + }, + { + "charisma": "5" + } + ], + "skillsaves": [ + { + "perception": "6" + }, + { + "stealth": "5" + } + ], + "senses": "blindsight 30 ft., darkvision 120 ft., passive Perception 16", + "languages": "Common, Draconic", + "cr": "7", + "traits": [ + { + "name": "Amphibious", + "desc": "The dragon can breathe air and water." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 10 ft., one target. 15 (2d10 + 4) piercing damage plus 4 (1d8) acid damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 11 (2d6 + 4) slashing damage." + }, + { + "name": "Acid Breath (Recharge 5-6)", + "desc": "The dragon exhales acid in a 30-foot line that is 5 feet wide. Each creature in that line must make a 14 Dexterity saving throw, taking 49 (11d8) acid damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Young Blue Dragon", + { + "image": null, + "bestiary": true, + "name": "Young Blue Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Large", + "alignment": "lawful evil", + "hp": 152, + "hit_dice": "16d10 + 64", + "ac": "18 (natural armor)", + "speed": "40 ft., burrow 20 ft., fly 80 ft.", + "stats": [ + 21, + 10, + 19, + 14, + 13, + 17 + ], + "damage_immunities": "lightning", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "4" + }, + { + "constitution": "8" + }, + { + "wisdom": "5" + }, + { + "charisma": "7" + } + ], + "skillsaves": [ + { + "perception": "9" + }, + { + "stealth": "4" + } + ], + "senses": "blindsight 30 ft., darkvision 120 ft., passive Perception 19", + "languages": "Common, Draconic", + "cr": "9", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +9 to hit, reach 10 ft., one target. 16 (2d10 + 5) piercing damage plus 5 (1d10) lightning damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +9 to hit, reach 5 ft., one target. 12 (2d6 + 5) slashing damage." + }, + { + "name": "Lightning Breath (Recharge 5-6)", + "desc": "The dragon exhales lightning in a 60-foot line that is 5 feet wide. Each creature in that line must make a 16 Dexterity saving throw, taking 55 (10d10) lightning damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Young Brass Dragon", + { + "image": null, + "bestiary": true, + "name": "Young Brass Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Large", + "alignment": "chaotic good", + "hp": 110, + "hit_dice": "13d10 + 39", + "ac": "17 (natural armor)", + "speed": "40 ft., burrow 20 ft., fly 80 ft.", + "stats": [ + 19, + 10, + 17, + 12, + 11, + 15 + ], + "damage_immunities": "fire", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "3" + }, + { + "constitution": "6" + }, + { + "wisdom": "3" + }, + { + "charisma": "5" + } + ], + "skillsaves": [ + { + "perception": "6" + }, + { + "persuasion": "5" + }, + { + "stealth": "3" + } + ], + "senses": "blindsight 30 ft., darkvision 120 ft., passive Perception 16", + "languages": "Common, Draconic", + "cr": "6", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 10 ft., one target. 15 (2d10 + 4) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 11 (2d6 + 4) slashing damage." + }, + { + "name": "Breath Weapons (Recharge 5-6)", + "desc": "The dragon uses one of the following breath weapons." + }, + { + "name": "Fire Breath", + "desc": "The dragon exhales fire in a 40-foot line that is 5 feet wide. Each creature in that line must make a 14 Dexterity saving throw, taking 42 (12d6) fire damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Sleep Breath", + "desc": "The dragon exhales sleep gas in a 30-foot cone. Each creature in that area must succeed on a 14 Constitution saving throw or fall unconscious for 5 minutes. This effect ends for a creature if the creature takes damage or someone uses an action to wake it." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Young Bronze Dragon", + { + "image": null, + "bestiary": true, + "name": "Young Bronze Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Large", + "alignment": "lawful good", + "hp": 142, + "hit_dice": "15d10 + 60", + "ac": "18 (natural armor)", + "speed": "40 ft., fly 80 ft., swim 40 ft.", + "stats": [ + 21, + 10, + 19, + 14, + 13, + 17 + ], + "damage_immunities": "lightning", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "3" + }, + { + "constitution": "7" + }, + { + "wisdom": "4" + }, + { + "charisma": "6" + } + ], + "skillsaves": [ + { + "insight": "4" + }, + { + "perception": "7" + }, + { + "stealth": "3" + } + ], + "senses": "blindsight 30 ft., darkvision 120 ft., passive Perception 17", + "languages": "Common, Draconic", + "cr": "8", + "traits": [ + { + "name": "Amphibious", + "desc": "The dragon can breathe air and water." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +8 to hit, reach 10 ft., one target. 16 (2d10 + 5) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +8 to hit, reach 5 ft., one target. 12 (2d6 + 5) slashing damage." + }, + { + "name": "Breath Weapons (Recharge 5-6)", + "desc": "The dragon uses one of the following breath weapons." + }, + { + "name": "Lightning Breath", + "desc": "The dragon exhales lightning in a 60-foot line that is 5 feet wide. Each creature in that line must make a 15 Dexterity saving throw, taking 55 (10d10) lightning damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Repulsion Breath", + "desc": "The dragon exhales repulsion energy in a 30-foot cone. Each creature in that area must succeed on a 15 Strength saving throw. On a failed save, the creature is pushed 40 feet away from the dragon." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Young Copper Dragon", + { + "image": null, + "bestiary": true, + "name": "Young Copper Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Large", + "alignment": "chaotic good", + "hp": 119, + "hit_dice": "14d10 + 42", + "ac": "17 (natural armor)", + "speed": "40 ft., climb 40 ft., fly 80 ft.", + "stats": [ + 19, + 12, + 17, + 16, + 13, + 15 + ], + "damage_immunities": "acid", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "4" + }, + { + "constitution": "6" + }, + { + "wisdom": "4" + }, + { + "charisma": "5" + } + ], + "skillsaves": [ + { + "deception": "5" + }, + { + "perception": "7" + }, + { + "stealth": "4" + } + ], + "senses": "blindsight 30 ft., darkvision 120 ft., passive Perception 17", + "languages": "Common, Draconic", + "cr": "7", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 10 ft., one target. 15 (2d10 + 4) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 11 (2d6 + 4) slashing damage." + }, + { + "name": "Breath Weapons (Recharge 5-6)", + "desc": "The dragon uses one of the following breath weapons." + }, + { + "name": "Acid Breath", + "desc": "The dragon exhales acid in a 40-foot line that is 5 feet wide. Each creature in that line must make a 14 Dexterity saving throw, taking 40 (9d8) acid damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Slowing Breath", + "desc": "The dragon exhales gas in a 30-foot cone. Each creature in that area must succeed on a 14 Constitution saving throw. On a failed save, the creature can't use reactions, its speed is halved, and it can't make more than one attack on its turn. In addition, the creature can use either an action or a bonus action on its turn, but not both. These effects last for 1 minute. The creature can repeat the saving throw at the end of each of its turns, ending the effect on itself with a successful save." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Young Gold Dragon", + { + "image": null, + "bestiary": true, + "name": "Young Gold Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Large", + "alignment": "lawful good", + "hp": 178, + "hit_dice": "17d10 + 85", + "ac": "18 (natural armor)", + "speed": "40 ft., fly 80 ft., swim 40 ft.", + "stats": [ + 23, + 14, + 21, + 16, + 13, + 20 + ], + "damage_immunities": "fire", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "6" + }, + { + "constitution": "9" + }, + { + "wisdom": "5" + }, + { + "charisma": "9" + } + ], + "skillsaves": [ + { + "insight": "5" + }, + { + "perception": "9" + }, + { + "persuasion": "9" + }, + { + "stealth": "6" + } + ], + "senses": "blindsight 30 ft., darkvision 120 ft., passive Perception 19", + "languages": "Common, Draconic", + "cr": "10", + "traits": [ + { + "name": "Amphibious", + "desc": "The dragon can breathe air and water." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +10 to hit, reach 10 ft., one target. 17 (2d10 + 6) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +10 to hit, reach 5 ft., one target. 13 (2d6 + 6) slashing damage." + }, + { + "name": "Breath Weapons (Recharge 5-6)", + "desc": "The dragon uses one of the following breath weapons." + }, + { + "name": "Fire Breath", + "desc": "The dragon exhales fire in a 30-foot cone. Each creature in that area must make a 17 Dexterity saving throw, taking 55 (10d10) fire damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Weakening Breath", + "desc": "The dragon exhales gas in a 30-foot cone. Each creature in that area must succeed on a 17 Strength saving throw or have disadvantage on Strength-based attack rolls, Strength checks, and Strength saving throws for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Young Green Dragon", + { + "image": null, + "bestiary": true, + "name": "Young Green Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Large", + "alignment": "lawful evil", + "hp": 136, + "hit_dice": "16d10 + 48", + "ac": "18 (natural armor)", + "speed": "40 ft., fly 80 ft., swim 40 ft.", + "stats": [ + 19, + 12, + 17, + 16, + 13, + 15 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "dexterity": "4" + }, + { + "constitution": "6" + }, + { + "wisdom": "4" + }, + { + "charisma": "5" + } + ], + "skillsaves": [ + { + "deception": "5" + }, + { + "perception": "7" + }, + { + "stealth": "4" + } + ], + "senses": "blindsight 30 ft., darkvision 120 ft., passive Perception 17", + "languages": "Common, Draconic", + "cr": "8", + "traits": [ + { + "name": "Amphibious", + "desc": "The dragon can breathe air and water." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 10 ft., one target. 15 (2d10 + 4) piercing damage plus 7 (2d6) poison damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 11 (2d6 + 4) slashing damage." + }, + { + "name": "Poison Breath (Recharge 5-6)", + "desc": "The dragon exhales poisonous gas in a 30-foot cone. Each creature in that area must make a 14 Constitution saving throw, taking 42 (12d6) poison damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Young Red Dragon", + { + "image": null, + "bestiary": true, + "name": "Young Red Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Large", + "alignment": "chaotic evil", + "hp": 178, + "hit_dice": "17d10 + 85", + "ac": "18 (natural armor)", + "speed": "40 ft., climb 40 ft., fly 80 ft.", + "stats": [ + 23, + 10, + 21, + 14, + 11, + 19 + ], + "damage_immunities": "fire", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "4" + }, + { + "constitution": "9" + }, + { + "wisdom": "4" + }, + { + "charisma": "8" + } + ], + "skillsaves": [ + { + "perception": "8" + }, + { + "stealth": "4" + } + ], + "senses": "blindsight 30 ft., darkvision 120 ft., passive Perception 18", + "languages": "Common, Draconic", + "cr": "10", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +10 to hit, reach 10 ft., one target. 17 (2d10 + 6) piercing damage plus 3 (1d6) fire damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +10 to hit, reach 5 ft., one target. 13 (2d6 + 6) slashing damage." + }, + { + "name": "Fire Breath (Recharge 5-6)", + "desc": "The dragon exhales fire in a 30-foot cone. Each creature in that area must make a 17 Dexterity saving throw, taking 56 (16d6) fire damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Young Red Shadow Dragon", + { + "image": null, + "bestiary": true, + "name": "Young Red Shadow Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Large", + "alignment": "chaotic evil", + "hp": 178, + "hit_dice": "17d10 + 85", + "ac": "18 (natural armor)", + "speed": "40 ft., climb 40 ft., fly 80 ft.", + "stats": [ + 23, + 10, + 21, + 14, + 11, + 19 + ], + "damage_immunities": "fire", + "damage_resistances": "necrotic", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "5" + }, + { + "constitution": "10" + }, + { + "wisdom": "5" + }, + { + "charisma": "9" + } + ], + "skillsaves": [ + { + "perception": "10" + }, + { + "stealth": "10" + } + ], + "senses": "blindsight 30 ft., darkvision 120 ft., passive Perception 18", + "languages": "Common, Draconic", + "cr": "13", + "traits": [ + { + "name": "Living Shadow", + "desc": "While in dim light or darkness, the dragon has resistance to damage that isn't force, psychic, or radiant." + }, + { + "name": "Shadow Stealth", + "desc": "While in dim light or darkness, the dragon can take the {@action Hide} action as a bonus action." + }, + { + "name": "Sunlight Sensitivity", + "desc": "While in sunlight, the dragon has disadvantage on attack rolls, as well as on Wisdom (Perception) checks that rely on sight." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +11 to hit, reach 10 ft., one target. 17 (2d10 + 6) piercing damage plus 3 (1d6) necrotic damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +11 to hit, reach 5 ft., one target. 13 (2d6 + 6) slashing damage." + }, + { + "name": "Shadow Breath (Recharge 5-6)", + "desc": "The dragon exhales shadowy fire in a 30-foot cone. Each creature in that area must make a 18 Dexterity saving throw, taking 56 (16d6) necrotic damage on a failed save, or half as much damage on a successful one. A humanoid reduced to 0 hit points by this damage dies, and an undead shadow rises from its corpse and acts immediately after the dragon in the initiative count. The shadow is under the dragon's control." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Young Remorhaz", + { + "image": null, + "bestiary": true, + "name": "Young Remorhaz", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "size": "Large", + "alignment": "unaligned", + "hp": 93, + "hit_dice": "11d10 + 33", + "ac": "14 (natural armor)", + "speed": "30 ft., burrow 30 ft.", + "stats": [ + 18, + 13, + 17, + 3, + 10, + 4 + ], + "damage_immunities": "cold, fire", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [], + "senses": "darkvision 60 ft., tremorsense 60 ft., passive Perception 10", + "languages": "", + "cr": "5", + "traits": [ + { + "name": "Heated Body", + "desc": "A creature that touches the remorhaz or hits it with a melee attack while within 5 feet of it takes 7 (2d6) fire damage." + } + ], + "actions": [ + { + "name": "Bite", + "desc": "Melee Weapon Attack +6 to hit, reach 5 ft., one target. 20 (3d10 + 4) piercing damage plus 7 (2d6) fire damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Young Silver Dragon", + { + "image": null, + "bestiary": true, + "name": "Young Silver Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Large", + "alignment": "lawful good", + "hp": 168, + "hit_dice": "16d10 + 80", + "ac": "18 (natural armor)", + "speed": "40 ft., fly 80 ft.", + "stats": [ + 23, + 10, + 21, + 14, + 11, + 19 + ], + "damage_immunities": "cold", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "4" + }, + { + "constitution": "9" + }, + { + "wisdom": "4" + }, + { + "charisma": "8" + } + ], + "skillsaves": [ + { + "arcana": "6" + }, + { + "history": "6" + }, + { + "perception": "8" + }, + { + "stealth": "4" + } + ], + "senses": "blindsight 30 ft., darkvision 120 ft., passive Perception 18", + "languages": "Common, Draconic", + "cr": "9", + "traits": [], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +10 to hit, reach 10 ft., one target. 17 (2d10 + 6) piercing damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +10 to hit, reach 5 ft., one target. 13 (2d6 + 6) slashing damage." + }, + { + "name": "Breath Weapons (Recharge 5-6)", + "desc": "The dragon uses one of the following breath weapons." + }, + { + "name": "Cold Breath", + "desc": "The dragon exhales an icy blast in a 30-foot cone. Each creature in that area must make a 17 Constitution saving throw, taking 54 (12d8) cold damage on a failed save, or half as much damage on a successful one." + }, + { + "name": "Paralyzing Breath", + "desc": "The dragon exhales paralyzing gas in a 30-foot cone. Each creature in that area must succeed on a 17 Constitution saving throw or be paralyzed for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Young White Dragon", + { + "image": null, + "bestiary": true, + "name": "Young White Dragon", + "source": [ + "Monster Manual" + ], + "type": "dragon", + "size": "Large", + "alignment": "chaotic evil", + "hp": 133, + "hit_dice": "14d10 + 56", + "ac": "17 (natural armor)", + "speed": "40 ft., burrow 20 ft., fly 80 ft., swim 40 ft.", + "stats": [ + 18, + 10, + 18, + 6, + 11, + 12 + ], + "damage_immunities": "cold", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [ + { + "dexterity": "3" + }, + { + "constitution": "7" + }, + { + "wisdom": "3" + }, + { + "charisma": "4" + } + ], + "skillsaves": [ + { + "perception": "6" + }, + { + "stealth": "3" + } + ], + "senses": "blindsight 30 ft., darkvision 120 ft., passive Perception 16", + "languages": "Common, Draconic", + "cr": "6", + "traits": [ + { + "name": "Ice Walk", + "desc": "The dragon can move across and climb icy surfaces without needing to make an ability check. Additionally, difficult terrain composed of ice or snow doesn't cost it extra movement." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The dragon makes three attacks: one with its bite and two with its claws." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 10 ft., one target. 15 (2d10 + 4) piercing damage plus 4 (1d8) cold damage." + }, + { + "name": "Claw", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 11 (2d6 + 4) slashing damage." + }, + { + "name": "Cold Breath (Recharge 5-6)", + "desc": "The dragon exhales an icy blast in a 30-foot cone. Each creature in that area must make a 15 Constitution saving throw, taking 45 (10d8) cold damage on a failed save, or half as much damage on a successful one." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Yuan-ti Abomination", + { + "image": null, + "bestiary": true, + "name": "Yuan-ti Abomination", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "subtype": "shapechanger, yuan-ti", + "size": "Large", + "alignment": "neutral evil", + "hp": 127, + "hit_dice": "15d10 + 45", + "ac": "15 (natural armor)", + "speed": "40 ft.", + "stats": [ + 19, + 16, + 17, + 17, + 15, + 18 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [], + "skillsaves": [ + { + "perception": "5" + }, + { + "stealth": "6" + } + ], + "senses": "darkvision 60 ft., passive Perception 15", + "languages": "Abyssal, Common, Draconic", + "cr": "7", + "traits": [ + { + "name": "Shapechanger", + "desc": "The yuan-ti can use its action to polymorph into a Large snake, or back into its true form. Its statistics are the same in each form. Any equipment it is wearing or carrying isn't transformed. It doesn't change form if it dies." + }, + { + "name": "Magic Resistance", + "desc": "The yuan-ti has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Multiattack (Abomination Form Only)", + "desc": "The yuan-ti makes two ranged attacks or three melee attacks, but can use its bite and constrict attacks only once each." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one creature. 7 (1d6 + 4) piercing damage plus 10 (3d6) poison damage." + }, + { + "name": "Constrict", + "desc": "Melee Weapon Attack +7 to hit, reach 10 ft., one target. 11 (2d6 + 4) bludgeoning damage, and the target is grappled (escape 14). Until this grapple ends, the target is restrained, and the yuan-ti can't constrict another target." + }, + { + "name": "Scimitar (Abomination Form Only)", + "desc": "Melee Weapon Attack +7 to hit, reach 5 ft., one target. 11 (2d6 + 4) slashing damage." + }, + { + "name": "Longbow (Abomination Form Only)", + "desc": "Ranged Weapon Attack +6 to hit, range 150/600 ft., one target. 12 (2d8 + 3) piercing damage plus 10 (3d6) poison damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The yuan-ti's innate spellcasting ability is Charisma (spell save 15). The yuan-ti can innately cast the following spells, requiring no material components:", + { + "At will": "animal friendship (snakes only)" + }, + { + "3/day each": "suggestion" + }, + { + "1/day each": "fear" + } + ], + "spellsNotes": "" + } + ], + [ + "Yuan-ti Malison (Type 1)", + { + "image": null, + "bestiary": true, + "name": "Yuan-ti Malison (Type 1)", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "subtype": "shapechanger, yuan-ti", + "size": "Medium", + "alignment": "neutral evil", + "hp": 66, + "hit_dice": "12d8 + 12", + "ac": 12, + "speed": "30 ft.", + "stats": [ + 16, + 14, + 13, + 14, + 12, + 16 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [], + "skillsaves": [ + { + "deception": "5" + }, + { + "stealth": "4" + } + ], + "senses": "darkvision 60 ft., passive Perception 11", + "languages": "Abyssal, Common, Draconic", + "cr": "3", + "traits": [ + { + "name": "Shapechanger", + "desc": "The yuan-ti can use its action to polymorph into a Medium snake, or back into its true form. Its statistics are the same in each form. Any equipment it is wearing or carrying isn't transformed. It doesn't change form if it dies." + }, + { + "name": "Magic Resistance", + "desc": "The yuan-ti has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Malison Type", + "desc": "The yuan-ti has one of the following types:" + }, + { + "name": "Type 1:", + "desc": "Human body with snake head" + }, + { + "name": "Type 2:", + "desc": "Human head and body with snakes for arms" + }, + { + "name": "Type 3:", + "desc": "Human head and upper body with a serpentine lower body instead of legs" + } + ], + "actions": [ + { + "name": "Multiattack (Yuan-ti Form Only)", + "desc": "The yuan-ti makes two ranged attacks or two melee attacks, but can use its bite only once." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one creature. 5 (1d4 + 3) piercing damage plus 7 (2d6) poison damage." + }, + { + "name": "Scimitar (Yuan-ti Form Only)", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) slashing damage." + }, + { + "name": "Longbow (Yuan-ti Form Only)", + "desc": "Ranged Weapon Attack +4 to hit, range 150/600 ft., one target. 6 (1d8 + 2) piercing damage plus 7 (2d6) poison damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The yuan-ti's innate spellcasting ability is Charisma (spell save 13). The yuan-ti can innately cast the following spells, requiring no material components:", + { + "At will": "animal friendship (snakes only)" + }, + { + "3/day each": "suggestion" + } + ], + "spellsNotes": "" + } + ], + [ + "Yuan-ti Malison (Type 2)", + { + "image": null, + "bestiary": true, + "name": "Yuan-ti Malison (Type 2)", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "subtype": "shapechanger, yuan-ti", + "size": "Medium", + "alignment": "neutral evil", + "hp": 66, + "hit_dice": "12d8 + 12", + "ac": 12, + "speed": "30 ft.", + "stats": [ + 16, + 14, + 13, + 14, + 12, + 16 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [], + "skillsaves": [ + { + "deception": "5" + }, + { + "stealth": "4" + } + ], + "senses": "darkvision 60 ft., passive Perception 11", + "languages": "Abyssal, Common, Draconic", + "cr": "3", + "traits": [ + { + "name": "Shapechanger", + "desc": "The yuan-ti can use its action to polymorph into a Medium snake, or back into its true form. Its statistics are the same in each form. Any equipment it is wearing or carrying isn't transformed. It doesn't change form if it dies." + }, + { + "name": "Magic Resistance", + "desc": "The yuan-ti has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Malison Type", + "desc": "The yuan-ti has one of the following types:" + }, + { + "name": "Type 1:", + "desc": "Human body with snake head" + }, + { + "name": "Type 2:", + "desc": "Human head and body with snakes for arms" + }, + { + "name": "Type 3:", + "desc": "Human head and upper body with a serpentine lower body instead of legs" + } + ], + "actions": [ + { + "name": "Multiattack (Yuan-ti Form Only)", + "desc": "The yuan-ti makes two bite attacks using its snake arms." + }, + { + "name": "Bite", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one creature. 5 (1d4 + 3) piercing damage plus 7 (2d6) poison damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The yuan-ti's innate spellcasting ability is Charisma (spell save 13). The yuan-ti can innately cast the following spells, requiring no material components:", + { + "At will": "animal friendship (snakes only)" + }, + { + "3/day each": "suggestion" + } + ], + "spellsNotes": "" + } + ], + [ + "Yuan-ti Malison (Type 3)", + { + "image": null, + "bestiary": true, + "name": "Yuan-ti Malison (Type 3)", + "source": [ + "Monster Manual" + ], + "type": "monstrosity", + "subtype": "shapechanger, yuan-ti", + "size": "Medium", + "alignment": "neutral evil", + "hp": 66, + "hit_dice": "12d8 + 12", + "ac": 12, + "speed": "30 ft.", + "stats": [ + 16, + 14, + 13, + 14, + 12, + 16 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [], + "skillsaves": [ + { + "deception": "5" + }, + { + "stealth": "4" + } + ], + "senses": "darkvision 60 ft., passive Perception 11", + "languages": "Abyssal, Common, Draconic", + "cr": "3", + "traits": [ + { + "name": "Shapechanger", + "desc": "The yuan-ti can use its action to polymorph into a Medium snake, or back into its true form. Its statistics are the same in each form. Any equipment it is wearing or carrying isn't transformed. It doesn't change form if it dies." + }, + { + "name": "Magic Resistance", + "desc": "The yuan-ti has advantage on saving throws against spells and other magical effects." + }, + { + "name": "Malison Type", + "desc": "The yuan-ti has one of the following types:" + }, + { + "name": "Type 1:", + "desc": "Human body with snake head" + }, + { + "name": "Type 2:", + "desc": "Human head and body with snakes for arms" + }, + { + "name": "Type 3:", + "desc": "Human head and upper body with a serpentine lower body instead of legs" + } + ], + "actions": [ + { + "name": "Multiattack (Yuan-ti Form Only)", + "desc": "The yuan-ti makes two ranged attacks or two melee attacks, but can constrict only once." + }, + { + "name": "Bite (Snake Form Only)", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one creature. 5 (1d4 + 3) piercing damage plus 7 (2d6) poison damage." + }, + { + "name": "Constrict", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 10 (2d6 + 3) bludgeoning damage, and the target is grappled (escape 13). Until this grapple ends, the target is restrained, and the yuan-ti can't constrict another target." + }, + { + "name": "Scimitar (Yuan-ti Form Only)", + "desc": "Melee Weapon Attack +5 to hit, reach 5 ft., one target. 6 (1d6 + 3) slashing damage." + }, + { + "name": "Longbow (Yuan-ti Form Only)", + "desc": "Ranged Weapon Attack +4 to hit, range 150/600 ft., one target. 6 (1d8 + 2) piercing damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The yuan-ti's innate spellcasting ability is Charisma (spell save 13). The yuan-ti can innately cast the following spells, requiring no material components:", + { + "At will": "animal friendship (snakes only)" + }, + { + "3/day each": "suggestion" + } + ], + "spellsNotes": "" + } + ], + [ + "Yuan-ti Pureblood", + { + "image": null, + "bestiary": true, + "name": "Yuan-ti Pureblood", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "yuan-ti", + "size": "Medium", + "alignment": "neutral evil", + "hp": 40, + "hit_dice": "9d8", + "ac": 11, + "speed": "30 ft.", + "stats": [ + 11, + 12, + 11, + 13, + 12, + 14 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [], + "skillsaves": [ + { + "deception": "6" + }, + { + "perception": "3" + }, + { + "stealth": "3" + } + ], + "senses": "darkvision 60 ft., passive Perception 13", + "languages": "Abyssal, Common, Draconic", + "cr": "1", + "traits": [ + { + "name": "Magic Resistance", + "desc": "The yuan-ti has advantage on saving throws against spells and other magical effects." + } + ], + "actions": [ + { + "name": "Multiattack", + "desc": "The yuan-ti makes two melee attacks." + }, + { + "name": "Scimitar", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 4 (1d6 + 1) slashing damage." + }, + { + "name": "Shortbow", + "desc": "Ranged Weapon Attack +3 to hit, range 80/320 ft., one target. 4 (1d6 + 1) piercing damage plus 7 (2d6) poison damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [ + "The yuan-ti's spellcasting ability is Charisma (spell save 12). The yuan-ti can innately cast the following spells, requiring no material components:", + { + "At will": "animal friendship (snakes only)" + }, + { + "3/day each": "poison spray, suggestion" + } + ], + "spellsNotes": "" + } + ], + [ + "Zombie", + { + "image": null, + "bestiary": true, + "name": "Zombie", + "source": [ + "Monster Manual" + ], + "type": "undead", + "size": "Medium", + "alignment": "neutral evil", + "hp": 22, + "hit_dice": "3d8 + 9", + "ac": 8, + "speed": "20 ft.", + "stats": [ + 13, + 6, + 16, + 3, + 6, + 5 + ], + "damage_immunities": "poison", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "poisoned", + "saves": [ + { + "wisdom": "0" + } + ], + "skillsaves": [], + "senses": "darkvision 60 ft., passive Perception 8", + "languages": "understands all languages it spoke in life but can't speak", + "cr": "1/4", + "traits": [ + { + "name": "Undead Fortitude", + "desc": "If damage reduces the zombie to 0 hit points, it must make a Constitution saving throw with a DC of 5 + the damage taken, unless the damage is radiant or from a critical hit. On a success, the zombie drops to 1 hit point instead." + } + ], + "actions": [ + { + "name": "Slam", + "desc": "Melee Weapon Attack +3 to hit, reach 5 ft., one target. 4 (1d6 + 1) bludgeoning damage." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ], + [ + "Aarakocra", + { + "image": null, + "bestiary": true, + "name": "Aarakocra", + "source": [ + "Monster Manual" + ], + "type": "humanoid", + "subtype": "aarakocra", + "size": "Medium", + "alignment": "neutral good", + "hp": 13, + "hit_dice": "3d8", + "ac": 12, + "speed": "20 ft., fly 50 ft.", + "stats": [ + 10, + 14, + 10, + 11, + 12, + 11 + ], + "damage_immunities": "", + "damage_resistances": "", + "damage_vulnerabilities": "", + "condition_immunities": "", + "saves": [], + "skillsaves": [ + { + "perception": "5" + } + ], + "senses": "passive Perception 15", + "languages": "Auran, Aarakocra", + "cr": "1/4", + "traits": [ + { + "name": "Dive Attack", + "desc": "If the aarakocra is flying and dives at least 30 feet straight toward a target and then hits it with a melee weapon attack, the attack deals an extra 3 (1d6) damage to the target." + } + ], + "actions": [ + { + "name": "Talon", + "desc": "Melee Weapon Attack +4 to hit, reach 5 ft., one target. 4 (1d4 + 2) slashing damage." + }, + { + "name": "Javelin", + "desc": "Melee / Ranged Weapon Attack +4 to hit, reach 5 ft. or range 30/120 ft., one target. 5 (1d6 + 2) piercing damage." + }, + { + "name": "Summon Air Elemental", + "desc": "Five aarakocra within 30 feet of each other can magically summon an air elemental. Each of the five must use its action and movement on three consecutive turns to perform an aerial dance and must maintain {@status concentration} while doing so (as if {@status concentration||concentrating} on a spell). When all five have finished their third turn of the dance, the elemental appears in an unoccupied space within 60 feet of them. It is friendly toward them and obeys their spoken commands. It remains for 1 hour, until it or all its summoners die, or until any of its summoners dismisses it as a bonus action. A summoner can't perform the dance again until it finishes a short rest. When the elemental returns to the Elemental Plane of Air, any aarakocra within 5 feet of it can return with it." + } + ], + "bonus_actions": [], + "reactions": [], + "legendary_actions": [], + "mythic_actions": [], + "spells": [], + "spellsNotes": "" + } + ] + ], "defaultLayouts": {}, "layouts": [], "default": "basic-5e-layout", "useDice": true, - "renderDice": false, + "renderDice": true, "export": true, - "showAdvanced": false, + "showAdvanced": true, "version": { "major": 4, "minor": 8, "patch": 1 }, "paths": [ - "/" + "/", + "content/Hibolia/Monstruos" ], - "autoParse": false, + "autoParse": true, "disableSRD": false, "tryToRenderLinks": true, "debug": false, diff --git a/.obsidian/plugins/obsidian-git/obsidian_askpass.sh b/.obsidian/plugins/obsidian-git/obsidian_askpass.sh new file mode 100755 index 0000000..2e5eb5d --- /dev/null +++ b/.obsidian/plugins/obsidian-git/obsidian_askpass.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +PROMPT="$1" +TEMP_FILE="$OBSIDIAN_GIT_CREDENTIALS_INPUT" + +cleanup() { + rm -f "$TEMP_FILE" "$TEMP_FILE.response" +} +trap cleanup EXIT + +echo "$PROMPT" > "$TEMP_FILE" + +while [ ! -e "$TEMP_FILE.response" ]; do + if [ ! -e "$TEMP_FILE" ]; then + echo "Trigger file got removed: Abort" >&2 + exit 1 + fi + sleep 0.1 +done + +RESPONSE=$(cat "$TEMP_FILE.response") + +echo "$RESPONSE" diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 425a7da..54f6350 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -4,21 +4,35 @@ "type": "split", "children": [ { - "id": "532b7582a7d68ac7", + "id": "18d2a0f7554f8b0d", "type": "tabs", "children": [ { - "id": "85096e584bbc645c", + "id": "b8d71d1645763e68", "type": "leaf", "state": { "type": "markdown", "state": { - "file": "content/Hibolia/Razas/Elfos.md", - "mode": "source", + "file": "content/Hibolia/Hibolia.md", + "mode": "preview", "source": true }, "icon": "lucide-file", - "title": "Elfos" + "title": "Hibolia" + } + }, + { + "id": "78ff89264971433d", + "type": "leaf", + "state": { + "type": "markdown", + "state": { + "file": "content/Hibolia/Lugares/Imperio Morválico.md", + "mode": "preview", + "source": true + }, + "icon": "lucide-file", + "title": "Imperio Morválico" } } ], @@ -42,10 +56,12 @@ "type": "file-explorer", "state": { "sortOrder": "alphabetical", - "autoReveal": false + "autoReveal": false, + "showSearch": false, + "searchQuery": "" }, "icon": "lucide-folder-closed", - "title": "Explorador de archivos" + "title": "Files" } }, { @@ -88,6 +104,7 @@ { "id": "1ed4570dfe9ab06a", "type": "tabs", + "dimension": 26.300578034682086, "children": [ { "id": "533335637bed39e7", @@ -160,6 +177,26 @@ { "id": "9876130f05aa0c4d", "type": "leaf", + "state": { + "type": "DICE_ROLLER_VIEW", + "state": {}, + "icon": "lucide-ghost", + "title": "DICE_ROLLER_VIEW" + } + }, + { + "id": "ad1516c5cdda9771", + "type": "leaf", + "state": { + "type": "DICE_ROLLER_VIEW", + "state": {}, + "icon": "lucide-ghost", + "title": "DICE_ROLLER_VIEW" + } + }, + { + "id": "223b5527d93884c3", + "type": "leaf", "state": { "type": "DICE_ROLLER_VIEW", "state": {}, @@ -169,76 +206,93 @@ } ], "currentTab": 4 + }, + { + "id": "b0816ff72b079a44", + "type": "tabs", + "dimension": 73.69942196531791, + "children": [ + { + "id": "d86649a1830b510e", + "type": "leaf", + "state": { + "type": "fantasy-statblocks-creature-pane", + "state": {}, + "icon": "skull", + "title": "Combatant" + } + } + ] } ], "direction": "horizontal", - "width": 332.5 + "width": 291.5 }, "left-ribbon": { "hiddenItems": { - "switcher:Abrir selector rápido": false, - "graph:Abrir vista gráfica": false, - "canvas:Crear nuevo lienzo": false, - "daily-notes:Abrir la nota de hoy": false, - "templates:Insertar plantilla": false, - "command-palette:Abrir paleta de comandos": false, - "bases:Crear nueva base": false, - "obsidian-5e-statblocks:Open Creature pane": false, - "obsidian-statusbar-pomo:Start pomodoro": false, + "switcher:Open quick switcher": false, + "graph:Open graph view": false, + "canvas:Create new canvas": false, + "daily-notes:Open today's daily note": false, + "templates:Insert template": false, + "command-palette:Open command palette": false, + "bases:Create new base": false, "obsidian-excalidraw-plugin:Create new drawing": false, "obsidian-git:Open Git source control": false, "obsidian-kanban:Create new board": false, - "obsidian-leaflet-plugin:Open Leaflet Map": false + "obsidian-leaflet-plugin:Open Leaflet Map": false, + "obsidian-5e-statblocks:Open Creature pane": false, + "obsidian-statusbar-pomo:Start pomodoro": false } }, - "active": "85096e584bbc645c", + "active": "15293d872b0188b5", "lastOpenFiles": [ - "content/Hibolia/Razas/Dragones.md", + "content/Hibolia/Lugares/Imperio Morválico.md", + "content/Hibolia/Hibolia.md", "content/Hibolia/Organizaciones/Gremio de Cazadores.md", - "content/Hibolia/Lugares/Ciudades Libres/Narbora.md", - "content/Hibolia/Organizaciones", + "content/Hibolia/Monstruos/Test.md", + "Planning campana.md", + "Ideas generales importantes.md", + "content/Hibolia/Lugares/Continentes/Elysia.md", "content/Hibolia/Lugares/Ciudades Libres/Ciudades Libres.md", + "content/Hibolia/Lugares/Ciudades Libres/Limdor.md", + "content/Hibolia/Lugares/Ciudades Libres/Hirra.md", + "content/Hibolia/Lugares/Ciudades Libres/Turlium.md", + "content/Hibolia/Lugares/Continentes/Nilsia.md", "content/Hibolia/Razas/Humanos.md", + "content/Hibolia/Lugares/Ciudades Libres/Narbora.md", + "Old/Limdor.md", + "content/Hibolia/Lugares/Ciudades Libres/Sin nombre", + "content/Hibolia/Lugares/Continentes/Volsia.md", + "content/Hibolia/Lugares/Continentes", + "content/Hibolia/Razas/Elfos.md", + "content/index.md", + "Old/La gran enciclopedia de Hibolica.md", + "Old/Noth.md", + "Old/Hibolica.md", + "Ideas.md", + "content/Hibolia/Monstruos", + "content/Sin nombre", + "content/Hibolia/Razas/Dragones.md", + "content/Hibolia/Organizaciones", "content/Hibolia/Lugares/Ciudades Libres", "content/Hibolia/Razas/Enanos.md", - "content/Hibolia/Razas/Elfos.md", - "content/Hibolia/Hibolia.md", "content/Hibolia/Razas/Razas.md", "content/Hibolia/Lugares/Lugares.md", - "content/Diario/0 - Prologo.md", - "Old/Razas.md", - "content/Hibolia/Lugares/Imperio de Nozt.md", - "content/index.md", - "Old/Alkatlak.md", - "content/Hibolia/Sin título.md", "content/Hibolia/Lugares", "content/Hibolia/Razas", - "Ideas.md", "content/Diario", - "Old/Goldrach.md", - "Old/Razas mundanas.md", "Old", - "Old/Hibolica.md", - "Old/Dragones ancestrales.md", "public/14.png", "public/whitenigga.png", "public/blacknigga.png", - "content/index - copia.md", - "content/Notas - copia/Razas.md", - "content/Notas - copia/Razas mundanas.md", - "content/Notas - copia/Noth.md", - "content/Notas - copia/Los Cielos.md", - "content/Notas - copia", "public/golddragonfinalnofirma.png", - "content", "public/finarbor.png", "Assets/Drawing/Maps/aldea.png", - "public/Drawing/Maps", "public/nig-full.png", "public/valentin.png", "public/Pasted image 20260217004215.png", "public/Pasted image 20260217000919.png", - "public/Drawing", "Ideas.canvas", "Campanas/Sin Titulo/Campana Josep map.canvas" ] diff --git a/Ideas generales importantes.md b/Ideas generales importantes.md new file mode 100644 index 0000000..703d50d --- /dev/null +++ b/Ideas generales importantes.md @@ -0,0 +1,37 @@ +Imperio de Nozt -->Muchos dragones blabla quieren dominar el mundo y tal + +Para ello quieren dominar ciudades libres + +Va a haber immigración con dracónidos ok ellos no saben tal les hacen brainwashing de algun modo? + +Alguna leyenda o algo de +un heroe contra Nozt +perdió el heroe Nozt se queda allí + +Dragones llovieron del cielo desde el centro + +Dominaron el antiguo mundo sometiendolo + +Sizt era un heroe + +Que queria derrotar a los dragones + +Hizo una aventura con la ayuda de sus compañeros para derrotarlo + +Algo pasó + +Y Nozt se alzó como el último señor de los dragones + +Controlandolos y sometiendolos bajo su voluntad o algo asi + +Entonces vinieron los nuevos dioses + +De los elfos, enanos y humanos y todo eso + +Fundaron las ciudades libres + +Oprimidas y prohibidas por el imperio ya que Nozt quiere dominación total del plano + +Pero hay resistencia + + diff --git a/Old/Alyria IV.md b/Old/Alyria IV.md index 33cf404..8d73d3f 100644 --- a/Old/Alyria IV.md +++ b/Old/Alyria IV.md @@ -1 +1 @@ -Alyria IV es la reina del reinado de [[Limdor]] \ No newline at end of file +Alyria IV es la reina del reinado de [[Old/Limdor]] \ No newline at end of file diff --git a/Old/Boric Rebama.md b/Old/Boric Rebama.md index 0c51212..37f63c8 100644 --- a/Old/Boric Rebama.md +++ b/Old/Boric Rebama.md @@ -1,2 +1,2 @@ -Boric es un enviado de la reina de [[Limdor]] que acompaña a [[Gizmo]] para intentar recuperar a [[Goldrach]]. +Boric es un enviado de la reina de [[Old/Limdor]] que acompaña a [[Gizmo]] para intentar recuperar a [[Goldrach]]. diff --git a/Old/Dragones de las columnas.md b/Old/Dragones de las columnas.md index 4d901af..2915935 100644 --- a/Old/Dragones de las columnas.md +++ b/Old/Dragones de las columnas.md @@ -1,3 +1,3 @@ Los dragones de las columnas són [[Dragones]] que se originaron a partir de las [[Columnas]], es decir los remanentes de los [[Dragones ancestrales]]. Estos no contienen tanta [[Ithara]] como los dragones ancestrales y por tanto són menores que estos. -En la actualidad, hay diferentes [[Dragones de las columnas]] vivos, como por ejemplo [[Goldrach]] el protector de [[Limdor]]. \ No newline at end of file +En la actualidad, hay diferentes [[Dragones de las columnas]] vivos, como por ejemplo [[Goldrach]] el protector de [[Old/Limdor]]. \ No newline at end of file diff --git a/Old/Finarbor.md b/Old/Finarbor.md index cc70b54..ab267be 100644 --- a/Old/Finarbor.md +++ b/Old/Finarbor.md @@ -16,7 +16,7 @@ Finarbor ofrece principalmente el "atractivo" de [[El Resurgir del Dragón]] Originalmente Finarbor fue un asentamiento humano desde hace mucho tiempo. Los habitantes de Finarbor tardaron en darse cuenta que no muy lejos de ellos habitaba [[Alkatlak]]. Se dieron cuenta porque el dragón se presentó directamente en el pueblo y lo amenazó con devorarlo a no ser que le dieran de comer un 50% de la carne que generase el pueblo y de sus ganancias, de caso contrario empezaría a devorar a sus habitantes. -De esta forma, el pueblo se quedó estancado generación tras generación, generando lo justo para satisfacer las demandas del dragón y a la vez sobrevivir. Hasta que un dia llegó [[Zafiri]], un representante de [[Drundis S.A.]] proveniente desde [[Limdor]], que buscaba nuevas oportunidades para la empresa. +De esta forma, el pueblo se quedó estancado generación tras generación, generando lo justo para satisfacer las demandas del dragón y a la vez sobrevivir. Hasta que un dia llegó [[Zafiri]], un representante de [[Drundis S.A.]] proveniente desde [[Old/Limdor]], que buscaba nuevas oportunidades para la empresa. Su idea era simple: experiencias para satisfacer la demanda de aventura de jovenes aventureros provenientes de la capital. Al conocer los habitantes de el pueblo, intentó provocar a [[Alkatlak]] para poder ofrecerle un trato. diff --git a/Old/Goldrach.md b/Old/Goldrach.md index 37fde9a..db01bf3 100644 --- a/Old/Goldrach.md +++ b/Old/Goldrach.md @@ -4,5 +4,5 @@ > ## Tipo > Dragon dorado -Goldrach és un [[Dragones de las columnas|Dragon de las columnas]]. Está encargado para proteger [[Limdor]] +Goldrach és un [[Dragones de las columnas|Dragon de las columnas]]. Está encargado para proteger [[Old/Limdor]] diff --git a/Old/Hibolica.md b/Old/Hibolica.md index 0e2f410..39e67a0 100644 --- a/Old/Hibolica.md +++ b/Old/Hibolica.md @@ -32,6 +32,6 @@ El mundo quedó sumiso en la más profunda oscuridad, y sin creadores. Soló que Con el paso del tiempo. La esencia restante de las columnas se fue colapsando lentamente y formó a los [[Dragones de las columnas]], que viven hasta la actualidad. Los dragones, guiados y aconsejados de los [[Humanos]] restantes descendientes de los [[Humanos antiguos]], encontraron su propósito en el mundo dentro de las columnas. (Posar que les plantes de dalt per tal de fer que tinguin llum pobrets). Consiguieron comunicarse con [[Alth]], que les encomendó la misma tarea que dio a los [[Primordiales]]: dar la belleza en este mundo por si alguna vez regresaba al plano muerto. -Llenos de fe, tanto los [[Dragones de las columnas]] como los [[Humanos]]. Empezaron a reconstruir el mundo. Los humanos empezaron a hacer civilizaciones, entre ellas surgieron los estados [[Turlium]], [[Limdor]] y [[Finistia]]. Dio comienzo a la [[Edad de los humanos]] +Llenos de fe, tanto los [[Dragones de las columnas]] como los [[Humanos]]. Empezaron a reconstruir el mundo. Los humanos empezaron a hacer civilizaciones, entre ellas surgieron los estados [[Turlium]], [[Old/Limdor]] y [[Finistia]]. Dio comienzo a la [[Edad de los humanos]] Tanto dragones como humanos convivieron durante cientos de años. \ No newline at end of file diff --git a/Planning campana.md b/Planning campana.md new file mode 100644 index 0000000..404bee1 --- /dev/null +++ b/Planning campana.md @@ -0,0 +1,20 @@ +Según la mitología élfica, + +El plano de Hibolia se creó antes de que existiera el tiempo, apareció el plano junto a los antiguos dioses. Estos antiguos dioses dieron forma al plano y unos seres que dejaron luego muchas ruinas con cosas arcanas místicas que inventaron la magia (raza?) y entonces luego no se sabe muy bien porque empezaron a llover dragones del cielo. + +Estos dragones empezaron a arrasar con todo el plano de Hibolia, liderados por Nozt. + +Todos estos dragones arrasaron con unos cuantos dioses porque eran muy poderosos y temibles, y Nozt bebió de los ríos de sangre que todos estos dejaron, proclamandose Dios de la sangre. + +Por suerte los dioses pudieron derrotar a la gran mayoria de dragones antiguos y acabaron sellando a Nozt en el centro de el continente de Raksia. Para hacerlo le metieron tremenda abatida contra el suelo que destrozó gran parte del continente, creando la peculiar zona que tiene ahora mismo, llamado el circulo de Morvhaal. + +Con el paso del tiempo, el sello que hicieron los dioses élficos se fue debilitando hasta llegar al punto que el poder arcano de Nozt se ha podido filtrar fuera, haciendo que de repente aparecieran dragones por el mundo. + +Mucho más tarde de eso, los dioses élficos restauraron la paz al plano y crearon a los primeros elfos y también a los humanos y enanos pero esos son como bastardos de otro dios que realmente a los elfos no les importa. + +Los élfos recuerdan y beneran las historias de sus dioses contra los malvados dragones y juraron proteger el sello con su vida, creando asi una guarnicion de los mejores guerreros que existian que se llaman los [[Guardianes del Alba]] porque se aseguran de que sigan habiendo amaneceres en Hibolia. Al procurarse de que nadie liberase a Nozt + +Pero un humano un dia lo suficientemente loco consiguió esquivar a los guardianes del Alba y intentó romper el sello. Descendió hasta lo más profundo de Morvhaal y intentó liberar a Nozt. El sello siguió en pie pero parte del poder de Nozt corrompió al humano y acabó con los [[Guardianes del Alba]], fundando así el [[Imperio Morválico]] o [[Imperio Morválico|Imperio de Nozt]]. + +Este imperió se extendió y este humano ascendido a dragón está intentando buscar formas para poder liberar a Nozt y hacer que otra vez reinen los dragones provocando la extincion del resto de seres mortales en todo el plano, y muy posiblemente la destrucción de este. + diff --git a/content/Hibolia/Hibolia.md b/content/Hibolia/Hibolia.md index 6ee9bc3..5441be9 100644 --- a/content/Hibolia/Hibolia.md +++ b/content/Hibolia/Hibolia.md @@ -1,21 +1,28 @@ --- visible: true --- -Hibolia (*plano de los mortales* en [[Antiguo Hilirio]]) és lo que es considerado todo lo que engloba el mundo de los mortales, como el nombre. Hibolia es rebosante en diferentes formas de vida y diversas culturas. +Hibolia (*gran plano* en [[Antiguo Arquiano]]) és lo que es considerado todo el mundo que se conoce dónde habitan los mortales. Hibolia es rebosante en diferentes formas de vida y diversas culturas. -Esta enciclopedia tiene como objetivo documentar y recopilar toda información posible de nuestro mundo para ayudar a futuros aventureros e intelectuales en el camino del saber. +## Geografía y otras cosas + +En el plano de Hibolia hay un sol y dos lunas. Por la noche se suelen ver estrellas en el cielo. El origen de Hibolia, del mundo y del universo y gran parte de los hechos históricos que han ido sucediendo son justificados por la mitología elfica, que engloba también la humana y enana (ver religión en [[Elfos]]). Comunmente este relato del misticismo élfico es el que comunmente se acepta como el origen del mundo y los habitantes actuales de Hibolia aceptan lo que explican como lo que sucedio realmente, al ser los elfos seres longevos y generalmente sabios se considera correcto lo que sus leyendas explican. + +Hibolia está compuesta por tres grandes continentes: +- El continente del este, [[Elysia]], dónde se encuentran gran parte de los pueblos de los elfos y ciudades humanas y ciudades de enanos. +- El continente de [[Volsia]], que se encuentra en el norte dónde habitan gran parte de los enanos en casas excavadas dentro de altas montañas. +- El continente al oeste, [[Nilsia]], separado por [[Elysia]] por mar por el norte y por el sur por la [[Cordillera del segundo sol]]. ## Razas -A parte de animales, hay seres con consciencia propia habitando Hibolia de diferentes razas. +A parte de animales, hay seres con consciencia propia habitando Hibolia de diferentes razas. Principalmente Hibolia está habitado por: - [[Humanos]] - La raza más numerosa. Son muy variados, tanto en aspecto como en pensamiento. Tienen también una gran determinación en perseguir sus sueños al envejezer muy rápidamente. - [[Elfos]] - Viven en harmonia con la naturaleza de Hibolia. Viven durante mucho tiempo y buscan sobretodo la paz y justicia. - [[Enanos]] - Son mucho más bajitos que los humanos. Tienen la piel dura, en los dos sentidos y destacan por ser maestros artificies para hacer diferentes maquinas y cachivaches. -- [[Dragones]] -## Geografía y política +## Breve historia de Hibolia -Gran parte del plano de Hibolia, el habitable, lo componen el [[Imperio de Nozt]] y las [[Ciudades Libres]]. +Gran parte de la história de Hibolia ha sido recogida por la religión élfica. Todo el mundo conoce ésta versión: + +Después de la creación del tiempo, solo existían cuerpos celestiales 2(lunas). Aún tampoco brillaba la luz del sol. -Las otras razas que habitan en Hibolia también tienen publecitos o pequeñas ciudades, lejos del conflicto constante. \ No newline at end of file diff --git a/content/Hibolia/Lugares/Ciudades Libres/Ciudades Libres.md b/content/Hibolia/Lugares/Ciudades Libres/Ciudades Libres.md index 75e5861..e878c3e 100644 --- a/content/Hibolia/Lugares/Ciudades Libres/Ciudades Libres.md +++ b/content/Hibolia/Lugares/Ciudades Libres/Ciudades Libres.md @@ -4,7 +4,7 @@ visible: true Las ciudades libres són un conglomerado de diferentes ciudades donde [[Humanos]], [[Elfos]] y [[Enanos]] conviven, aunque realmente mayoritariamente los habitantes de las ciudades libres están compuestos por [[Humanos]]. -Todas estas ciudades libres antes eran realmente libres entre si, aunque debido a la creciente expansión del [[Imperio de Nozt]], se han juntado todas en una unión democrática, que és lo que se conoce ahora como Ciudades Libres. +Todas estas ciudades libres antes eran realmente libres entre si, aunque debido a la creciente expansión del [[Imperio Morválico]], se han juntado todas en una unión democrática, que és lo que se conoce ahora como Ciudades Libres. De las ciudades libres hay: diff --git a/content/Hibolia/Lugares/Ciudades Libres/Hirra.md b/content/Hibolia/Lugares/Ciudades Libres/Hirra.md new file mode 100644 index 0000000..e69de29 diff --git a/content/Hibolia/Lugares/Ciudades Libres/Limdor.md b/content/Hibolia/Lugares/Ciudades Libres/Limdor.md new file mode 100644 index 0000000..9cd5053 --- /dev/null +++ b/content/Hibolia/Lugares/Ciudades Libres/Limdor.md @@ -0,0 +1,13 @@ +--- +visible: true +--- + +Limdor es una de las principales ciudades de [[Hibolica]]. + +De Limdor destaca el centro, la zona más rica dónde se encuentran altos edificios construidos con mármol blanco y con decoraciones doradas de todo tipo. + +Más allà de las murallas del centro, se encuentran otros barrios más pobres dónde principalmente habitan humanos que intentan ganarse la vida con Limdor. Hay bastante orden en la ciudad en general gracias a la [[Guardia dorada]]. + +## Política + +Limdor és un reino, gobernado actualmente por [[Alyria IV]] \ No newline at end of file diff --git a/content/Hibolia/Lugares/Ciudades Libres/Narbora.md b/content/Hibolia/Lugares/Ciudades Libres/Narbora.md deleted file mode 100644 index a6c8e12..0000000 --- a/content/Hibolia/Lugares/Ciudades Libres/Narbora.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -visible: true ---- - - -Ciudad donde se encuentra el [[Gremio de Cazadores]] \ No newline at end of file diff --git a/content/Hibolia/Lugares/Ciudades Libres/Turlium.md b/content/Hibolia/Lugares/Ciudades Libres/Turlium.md new file mode 100644 index 0000000..e69de29 diff --git a/content/Hibolia/Lugares/Continentes/Elysia.md b/content/Hibolia/Lugares/Continentes/Elysia.md new file mode 100644 index 0000000..7f9d601 --- /dev/null +++ b/content/Hibolia/Lugares/Continentes/Elysia.md @@ -0,0 +1,10 @@ +--- +visible: true +--- + + +Continente situado al este de [[Hibolia]]. Se encuentran gran parte de los pueblos de los elfos y ciudades humanas y ciudades de enanos. + +## Ciudades de Elysia: +- [[Limdor]] +- .... \ No newline at end of file diff --git a/content/Hibolia/Lugares/Continentes/Nilsia.md b/content/Hibolia/Lugares/Continentes/Nilsia.md new file mode 100644 index 0000000..e69de29 diff --git a/content/Hibolia/Lugares/Continentes/Volsia.md b/content/Hibolia/Lugares/Continentes/Volsia.md new file mode 100644 index 0000000..e69de29 diff --git a/content/Hibolia/Lugares/Imperio de Nozt.md b/content/Hibolia/Lugares/Imperio Morválico.md similarity index 100% rename from content/Hibolia/Lugares/Imperio de Nozt.md rename to content/Hibolia/Lugares/Imperio Morválico.md diff --git a/content/Hibolia/Organizaciones/Gremio de Cazadores.md b/content/Hibolia/Organizaciones/Gremio de Cazadores.md deleted file mode 100644 index 1b4c8e7..0000000 --- a/content/Hibolia/Organizaciones/Gremio de Cazadores.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -visible: true ---- - - -El gremio de Cazadores es parte del ministerio de defensa establecido por la democracia de las [[Ciudades Libres]]. Se sabe que tiene su centro de operaciones en la ciudad de [[Narbora]] - diff --git a/content/Hibolia/Razas/Elfos.md b/content/Hibolia/Razas/Elfos.md index c855feb..2b7bfec 100644 --- a/content/Hibolia/Razas/Elfos.md +++ b/content/Hibolia/Razas/Elfos.md @@ -4,3 +4,5 @@ visible: true Los elfos le saben a la naturaleza. Tienen tres dioses pero no se cuales. Hola. +## Religion + diff --git a/content/Hibolia/Razas/Humanos.md b/content/Hibolia/Razas/Humanos.md index c556eb8..e1c9614 100644 --- a/content/Hibolia/Razas/Humanos.md +++ b/content/Hibolia/Razas/Humanos.md @@ -2,4 +2,6 @@ visible: true --- -Humanos \ No newline at end of file +Lel los humanos son como los humanos de siempre. + +## Religion \ No newline at end of file diff --git a/content/index.md b/content/index.md index 4f5ed74..e0f3f2d 100644 --- a/content/index.md +++ b/content/index.md @@ -1,38 +1,48 @@ --- visible: true --- -# Como asesinar a tu dragón +# Campana DND -Hola! En esta web encontraréis nota y info adicional de la campaña que iré modificando conforme vaya avanzando. Le he puesto este horripilante nombre de momento porque no se me ocurre ninguno otro. +Hola! En esta web encontraréis nota y info adicional de la campaña que iré modificando conforme vaya avanzando. Le he puesto este horripilante nombre de momento porque no se me ocurre ninguno otro. Y no sé hacia dónde dirigiréis la historia asi que en medio de la campaña puede ser que cambie el nombre. El enlace será el mismo siempre. -Es como una wiki, a la izquierda teneis diferentes notas que también tienen links entre ellas. +Tenéis que pensar esto como una base de conocimiento del mundo en el que transcurre la campaña. Igual que en la vida real todo el mundo conoce a Pedro Sánchez pues aquí lo que hay aquí escrito es conocimiento que todo el mundo conoce. + +Así espero que os sirva como base para hacer a vuestros personajes y luego a medida que avance la campaña lo iré actualizando con worldbuilding o cosas que vayan apareciendo o vayais descubriendo. + +Funciona como una wiki, a la izquierda tenéis diferentes notas que también tienen links entre ellas. Y que más cualquier cosa me decis por Whatsapp o por Discord si quereis. +Iré actualizando la web constantemente id leyendola cuando os lo indique de tanto en tanto vale. +## ¿Por dónde empiezo? + +~~Aquí: 0 - Prologo hay escrito en que situación se encontrarian vuestros personajes en este preciso instante.~~ + +(Vale como que no os conoceis a priori esto sudad) + +Empezad a leer por [[Hibolia]]. De momento aquí hay conocimiento general que cualquier persona dentro del mundo sabe. Mi idea es que a medida que vayais descubriendo cosas vaya publicando y escribiendo más cosas aquí. + +Si leeis un poco vereis que hay como una muy pequeñita amenaza. Algo tendréis que ver pero aún asi, + +Si alguno de vuestros personajes tuviese el rol de ir escribiendo o documentando las aventuras que va haciendo siguiendo un diario o algo así pues seria este, se podría adaptar y creo que molaria así como idea. ## Links importantes -Os dejo aqui debajo links importantes. La campaña la haremos en Foundry. Para los jugadores no es muy complicado de usar comparado con otras webs como Nivel20 o Roll20. +Os dejo links importantes. La campaña la haremos en Foundry, (a no ser que podamos jugar presencial molaria si se pudiese aghhh). Foundry para jugadores no deberia de resultar muy complicado de usar comparado con otras webs como Nivel20 o Roll20. - **Foundry**: [https://foundry.aranroig.com](https://foundry.aranroig.com) - **Esta web**: [https://caatd.rol.aranroig.com](https://caatd.rol.aranroig.com) -# FAQ - -> Os aconsejo encarecidamente leer esto porfa 🙏 +# Más cosas ## ¿Qué sistema? DnD 5E -## ¿Por dónde empiezo? +## Me he encontrado un link de color gris y me da mucho miedo ¿Qué es? -Aquí: [[0 - Prologo]] hay escrito en que situación se encontrarian vuestros personajes en este preciso instante. - -El resto de cosas es todo worldbuilding que podéis leer si quereis más immersion. Podeis empezar a leer por [[Hibolia]]. De momento aquí hay conocimiento general que cualquier persona dentro del mundo sabe. Mi idea es que a medida que vayais descubriendo cosas vaya publicando y escribiendo más cosas aquí. - -Si alguno de vuestros personajes tuviese el rol de ir escribiendo o documentando las aventuras que va haciendo siguiendo un diario o algo así pues seria este, se podría adaptar y creo que molaria así como idea. +Un link gris como [[Este link de aquí]] significa una referencia a un concepto, sitio, lugar o cosa en general que aún no está escrito ## ¿Qué días hay campaña? @@ -44,10 +54,6 @@ Esto es un vault de Obsidian (archivos de markdown con mods) dentro de un reposi El código fuente de todo esto está [aquí](https://git.aranroig.com/Syndria98/dnd-vault-template) -## Me he encontrado un link de color gris y me da mucho miedo ¿Qué es? - -Un link gris como [[Este link de aquí]] significa una referencia a un concepto, sitio, lugar o cosa en general que aún no está escrito - ## ¿Eres buen DM? -No :D \ No newline at end of file +No :DDDDDD \ No newline at end of file