var __typeError=msg=>{throw TypeError(msg)};var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck( obj,member,"access private method"),method);var __privateWrapper=(obj,member,setter,getter)=>({set _(value){__privateSet(obj,member,value,setter)},get _(){return __privateGet(obj,member,getter)}});var is_array=Array.isArray,index_of=Array.prototype.indexOf,includes=Array.prototype.includes,array_from=Array.from,define_property=Object.defineProperty,get_descriptor=Object.getOwnPropertyDescriptor,get_descriptors=Object.getOwnPropertyDescriptors,object_prototype=Object.prototype,array_prototype=Array.prototype,get_prototype_of=Object.getPrototypeOf,is_extensible=Object.isExtensible;function is_function(thing){return typeof thing=="function"}const noop$3=()=>{};function run(fn){return fn()}function run_all(arr){ for(var i=0;i{resolve2=res,reject=rej});return{promise,resolve:resolve2,reject}}function fallback(value,fallback2,lazy=!1){return value===void 0?lazy?fallback2():fallback2:value}function to_array(value,n){if(Array.isArray(value))return value;if(!(Symbol.iterator in value))return Array.from(value);const array2=[];for(const element2 of value)if(array2.push(element2),array2.length===n)break;return array2} const DERIVED=2,EFFECT=4,RENDER_EFFECT=8,MANAGED_EFFECT=1<<24,BLOCK_EFFECT=16,BRANCH_EFFECT=32,ROOT_EFFECT=64,BOUNDARY_EFFECT=128,CONNECTED=512,CLEAN=1024,DIRTY=2048,MAYBE_DIRTY=4096,INERT=8192,DESTROYED=16384,EFFECT_RAN=32768,EFFECT_TRANSPARENT=65536,EAGER_EFFECT=1<<17,HEAD_EFFECT=1<<18,EFFECT_PRESERVED=1<<19,USER_EFFECT=1<<20,EFFECT_OFFSCREEN=1<<25,WAS_MARKED=32768,REACTION_IS_UPDATING=1<<21,ASYNC=1<<22,ERROR_VALUE=1<<23,STATE_SYMBOL=Symbol("$state"),LEGACY_PROPS=Symbol("legacy props"),LOADING_ATTR_SYMBOL=Symbol( ""),STALE_REACTION=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ELEMENT_NODE$1=1,TEXT_NODE=3,COMMENT_NODE=8;function experimental_async_required(name){throw new Error("https://svelte.dev/e/experimental_async_required")}function lifecycle_outside_component(name){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function missing_context(){throw new Error("https://svelte.dev/e/missing_context")}function async_derived_orphan(){ throw new Error("https://svelte.dev/e/async_derived_orphan")}function effect_in_teardown(rune){throw new Error("https://svelte.dev/e/effect_in_teardown")}function effect_in_unowned_derived(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function effect_orphan(rune){throw new Error("https://svelte.dev/e/effect_orphan")}function effect_update_depth_exceeded(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function fork_discarded(){throw new Error("https://\ svelte.dev/e/fork_discarded")}function fork_timing(){throw new Error("https://svelte.dev/e/fork_timing")}function get_abort_signal_outside_reaction(){throw new Error("https://svelte.dev/e/get_abort_signal_outside_reaction")}function hydration_failed(){throw new Error("https://svelte.dev/e/hydration_failed")}function lifecycle_legacy_only(name){throw new Error("https://svelte.dev/e/lifecycle_legacy_only")}function props_invalid_value(key2){throw new Error("https://svelte.dev/e/props_invalid_value")} function state_descriptors_fixed(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function state_prototype_fixed(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function state_unsafe_mutation(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function svelte_boundary_reset_onerror(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const EACH_ITEM_REACTIVE=1,EACH_INDEX_REACTIVE=2,EACH_IS_CONTROLLED=4,EACH_IS_ANIMATED=8,EACH_ITEM_IMMUTABLE=16, PROPS_IS_IMMUTABLE=1,PROPS_IS_RUNES=2,PROPS_IS_UPDATED=4,PROPS_IS_BINDABLE=8,PROPS_IS_LAZY_INITIAL=16,TRANSITION_IN=1,TRANSITION_OUT=2,TRANSITION_GLOBAL=4,TEMPLATE_FRAGMENT=1,TEMPLATE_USE_IMPORT_NODE=2,HYDRATION_START="[",HYDRATION_START_ELSE="[!",HYDRATION_END="]",HYDRATION_ERROR={},UNINITIALIZED=Symbol(),NAMESPACE_HTML="http://www.w3.org/1999/xhtml",NAMESPACE_SVG="http://www.w3.org/2000/svg",ATTACHMENT_KEY="@attach";function hydratable_missing_but_expected(key2){console.warn("https://svelte.de\ v/e/hydratable_missing_but_expected")}function hydration_mismatch(location2){console.warn("https://svelte.dev/e/hydration_mismatch")}function select_multiple_invalid_value(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function svelte_boundary_reset_noop(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let hydrating=!1;function set_hydrating(value){hydrating=value}let hydrate_node;function set_hydrate_node(node2){if(node2===null)throw hydration_mismatch(),HYDRATION_ERROR; return hydrate_node=node2}function hydrate_next(){return set_hydrate_node(get_next_sibling(hydrate_node))}function reset(node2){if(hydrating){if(get_next_sibling(hydrate_node)!==null)throw hydration_mismatch(),HYDRATION_ERROR;hydrate_node=node2}}function next$1(count=1){if(hydrating){for(var i=count,node2=hydrate_node;i--;)node2=get_next_sibling(node2);hydrate_node=node2}}function skip_nodes(remove2=!0){for(var depth=0,node2=hydrate_node;;){if(node2.nodeType===COMMENT_NODE){var data=node2.data;if(data=== HYDRATION_END){if(depth===0)return node2;depth-=1}else(data===HYDRATION_START||data===HYDRATION_START_ELSE)&&(depth+=1)}var next2=get_next_sibling(node2);remove2&&node2.remove(),node2=next2}}function read_hydration_instruction(node2){if(!node2||node2.nodeType!==COMMENT_NODE)throw hydration_mismatch(),HYDRATION_ERROR;return node2.data}function equals(value){return value===this.v}function safe_not_equal(a,b){return a!=a?b==b:a!==b||a!==null&&typeof a=="object"||typeof a=="function"}function safe_equals(value){ return!safe_not_equal(value,this.v)}let legacy_mode_flag=!1;function enable_legacy_mode_flag(){legacy_mode_flag=!0}const empty$2=[];function snapshot(value,skip_warning=!1,no_tojson=!1){return clone$1(value,new Map,"",empty$2,null,no_tojson)}function clone$1(value,cloned,path2,paths,original=null,no_tojson=!1){if(typeof value=="object"&&value!==null){var unwrapped=cloned.get(value);if(unwrapped!==void 0)return unwrapped;if(value instanceof Map)return new Map(value);if(value instanceof Set)return new Set(value);if(is_array(value)){var copy=Array(value.length); cloned.set(value,copy),original!==null&&cloned.set(original,copy);for(var i=0;i(hasContext(key2)||missing_context(),getContext(key2)),context=>setContext(key2,context)]}function getContext(key2){return get_or_init_context_map().get(key2)}function setContext(key2,context){ return get_or_init_context_map().set(key2,context),context}function hasContext(key2){return get_or_init_context_map().has(key2)}function getAllContexts(){return get_or_init_context_map()}function push$1(props,runes=!1,fn){component_context={p:component_context,i:!1,c:null,e:null,s:props,x:null,l:legacy_mode_flag&&!runes?{s:null,u:null,$:[]}:null}}function pop(component2){var context=component_context,effects=context.e;if(effects!==null){context.e=null;for(var fn of effects)create_user_effect(fn)} return component2!==void 0&&(context.x=component2),context.i=!0,component_context=context.p,component2??{}}function is_runes(){return!legacy_mode_flag||component_context!==null&&component_context.l===null}function get_or_init_context_map(name){return component_context===null&&lifecycle_outside_component(),component_context.c??=new Map(get_parent_context(component_context)||void 0)}function get_parent_context(component_context2){let parent=component_context2.p;for(;parent!==null;){const context_map=parent. c;if(context_map!==null)return context_map;parent=parent.p}return null}let micro_tasks=[];function run_micro_tasks(){var tasks=micro_tasks;micro_tasks=[],run_all(tasks)}function queue_micro_task(fn){if(micro_tasks.length===0&&!is_flushing_sync){var tasks=micro_tasks;queueMicrotask(()=>{tasks===micro_tasks&&run_micro_tasks()})}micro_tasks.push(fn)}function flush_tasks(){for(;micro_tasks.length>0;)run_micro_tasks()}function handle_error$1(error2){var effect2=active_effect;if(effect2===null)return active_reaction. f|=ERROR_VALUE,error2;if((effect2.f&EFFECT_RAN)===0){if((effect2.f&BOUNDARY_EFFECT)===0)throw error2;effect2.b.error(error2)}else invoke_error_boundary(error2,effect2)}function invoke_error_boundary(error2,effect2){for(;effect2!==null;){if((effect2.f&BOUNDARY_EFFECT)!==0)try{effect2.b.error(error2);return}catch(e){error2=e}effect2=effect2.parent}throw error2}const STATUS_MASK=-7169;function set_signal_status(signal,status){signal.f=signal.f&STATUS_MASK|status}function update_derived_status(derived2){ (derived2.f&CONNECTED)!==0||derived2.deps===null?set_signal_status(derived2,CLEAN):set_signal_status(derived2,MAYBE_DIRTY)}function clear_marked(deps){if(deps!==null)for(const dep of deps)(dep.f&DERIVED)===0||(dep.f&WAS_MARKED)===0||(dep.f^=WAS_MARKED,clear_marked(dep.deps))}function defer_effect(effect2,dirty_effects,maybe_dirty_effects){(effect2.f&DIRTY)!==0?dirty_effects.add(effect2):(effect2.f&MAYBE_DIRTY)!==0&&maybe_dirty_effects.add(effect2),clear_marked(effect2.deps),set_signal_status(effect2, CLEAN)}const batches=new Set;let current_batch=null,previous_batch=null,batch_values=null,queued_root_effects=[],last_scheduled_effect=null,is_flushing=!1,is_flushing_sync=!1;class Batch{committed=!1;current=new Map;previous=new Map;#commit_callbacks=new Set;#discard_callbacks=new Set;#pending=0;#blocking_pending=0;#deferred=null;#dirty_effects=new Set;#maybe_dirty_effects=new Set;skipped_effects=new Set;is_fork=!1;#decrement_queued=!1;is_deferred(){return this.is_fork||this.#blocking_pending>0}process(root_effects){ queued_root_effects=[],this.apply();var effects=[],render_effects=[];for(const root2 of root_effects)this.#traverse_effect_tree(root2,effects,render_effects);if(this.is_deferred())this.#defer_effects(render_effects),this.#defer_effects(effects);else{for(const fn of this.#commit_callbacks)fn();this.#commit_callbacks.clear(),this.#pending===0&&this.#commit(),previous_batch=this,current_batch=null,flush_queued_effects(render_effects),flush_queued_effects(effects),previous_batch=null,this.#deferred?. resolve()}batch_values=null}#traverse_effect_tree(root2,effects,render_effects){root2.f^=CLEAN;for(var effect2=root2.first,pending_boundary=null;effect2!==null;){var flags2=effect2.f,is_branch=(flags2&(BRANCH_EFFECT|ROOT_EFFECT))!==0,is_skippable_branch=is_branch&&(flags2&CLEAN)!==0,skip=is_skippable_branch||(flags2&INERT)!==0||this.skipped_effects.has(effect2);if(!skip&&effect2.fn!==null){is_branch?effect2.f^=CLEAN:pending_boundary!==null&&(flags2&(EFFECT|RENDER_EFFECT|MANAGED_EFFECT))!==0?pending_boundary. b.defer_effect(effect2):(flags2&EFFECT)!==0?effects.push(effect2):is_dirty(effect2)&&((flags2&BLOCK_EFFECT)!==0&&this.#maybe_dirty_effects.add(effect2),update_effect(effect2));var child2=effect2.first;if(child2!==null){effect2=child2;continue}}var parent=effect2.parent;for(effect2=effect2.next;effect2===null&&parent!==null;)parent===pending_boundary&&(pending_boundary=null),effect2=parent.next,parent=parent.parent}}#defer_effects(effects){for(var i=0;i0){if(flush_effects(),current_batch!==null&¤t_batch!==this)return}else this.#pending===0&&this.process([]);this.deactivate()}discard(){for(const fn of this.#discard_callbacks)fn(this);this.#discard_callbacks.clear()}#commit(){if(batches.size>1){this.previous.clear();var previous_batch_values=batch_values,is_earlier=!0;for(const batch of batches){if(batch===this){is_earlier=!1;continue}const sources=[];for(const[source2,value]of this.current){if(batch.current.has(source2))if(is_earlier&&value!==batch.current.get(source2))batch.current.set(source2,value);else continue; sources.push(source2)}if(sources.length===0)continue;const others=[...batch.current.keys()].filter(s2=>!this.current.has(s2));if(others.length>0){var prev_queued_root_effects=queued_root_effects;queued_root_effects=[];const marked=new Set,checked=new Map;for(const source2 of sources)mark_effects(source2,others,marked,checked);if(queued_root_effects.length>0){current_batch=batch,batch.apply();for(const root2 of queued_root_effects)batch.#traverse_effect_tree(root2,[],[]);batch.deactivate()}queued_root_effects= prev_queued_root_effects}}current_batch=null,batch_values=previous_batch_values}this.committed=!0,batches.delete(this)}increment(blocking){this.#pending+=1,blocking&&(this.#blocking_pending+=1)}decrement(blocking){this.#pending-=1,blocking&&(this.#blocking_pending-=1),!this.#decrement_queued&&(this.#decrement_queued=!0,queue_micro_task(()=>{this.#decrement_queued=!1,this.is_deferred()?queued_root_effects.length>0&&this.flush():this.revive()}))}revive(){for(const e of this.#dirty_effects)this.#maybe_dirty_effects. delete(e),set_signal_status(e,DIRTY),schedule_effect(e);for(const e of this.#maybe_dirty_effects)set_signal_status(e,MAYBE_DIRTY),schedule_effect(e);this.flush()}oncommit(fn){this.#commit_callbacks.add(fn)}ondiscard(fn){this.#discard_callbacks.add(fn)}settled(){return(this.#deferred??=deferred()).promise}static ensure(){if(current_batch===null){const batch=current_batch=new Batch;batches.add(current_batch),is_flushing_sync||queue_micro_task(()=>{current_batch===batch&&batch.flush()})}return current_batch}apply(){}} function flushSync(fn){var was_flushing_sync=is_flushing_sync;is_flushing_sync=!0;try{var result;for(fn&&(current_batch!==null&&flush_effects(),result=fn());;){if(flush_tasks(),queued_root_effects.length===0&&(current_batch?.flush(),queued_root_effects.length===0))return last_scheduled_effect=null,result;flush_effects()}}finally{is_flushing_sync=was_flushing_sync}}function flush_effects(){is_flushing=!0;var source_stacks=null;try{for(var flush_count=0;queued_root_effects.length>0;){var batch=Batch. ensure();if(flush_count++>1e3){var updates,entry;infinite_loop_guard()}batch.process(queued_root_effects),old_values.clear()}}finally{is_flushing=!1,last_scheduled_effect=null}}function infinite_loop_guard(){try{effect_update_depth_exceeded()}catch(error2){invoke_error_boundary(error2,last_scheduled_effect)}}let eager_block_effects=null;function flush_queued_effects(effects){var length=effects.length;if(length!==0){for(var i=0;i0)){old_values.clear();for(const e of eager_block_effects){if((e.f&(DESTROYED|INERT))!==0)continue;const ordered_effects=[e];let ancestor=e.parent;for(;ancestor!==null;)eager_block_effects.has(ancestor)&&(eager_block_effects.delete(ancestor),ordered_effects. push(ancestor)),ancestor=ancestor.parent;for(let j=ordered_effects.length-1;j>=0;j--){const e2=ordered_effects[j];(e2.f&(DESTROYED|INERT))===0&&update_effect(e2)}}eager_block_effects.clear()}}eager_block_effects=null}}function mark_effects(value,sources,marked,checked){if(!marked.has(value)&&(marked.add(value),value.reactions!==null))for(const reaction of value.reactions){const flags2=reaction.f;(flags2&DERIVED)!==0?mark_effects(reaction,sources,marked,checked):(flags2&(ASYNC|BLOCK_EFFECT))!==0&& (flags2&DIRTY)===0&&depends_on(reaction,sources,checked)&&(set_signal_status(reaction,DIRTY),schedule_effect(reaction))}}function mark_eager_effects(value,effects){if(value.reactions!==null)for(const reaction of value.reactions){const flags2=reaction.f;(flags2&DERIVED)!==0?mark_eager_effects(reaction,effects):(flags2&EAGER_EFFECT)!==0&&(set_signal_status(reaction,DIRTY),effects.add(reaction))}}function depends_on(reaction,sources,checked){const depends=checked.get(reaction);if(depends!==void 0)return depends; if(reaction.deps!==null)for(const dep of reaction.deps){if(includes.call(sources,dep))return!0;if((dep.f&DERIVED)!==0&&depends_on(dep,sources,checked))return checked.set(dep,!0),!0}return checked.set(reaction,!1),!1}function schedule_effect(signal){for(var effect2=last_scheduled_effect=signal;effect2.parent!==null;){effect2=effect2.parent;var flags2=effect2.f;if(is_flushing&&effect2===active_effect&&(flags2&BLOCK_EFFECT)!==0&&(flags2&HEAD_EFFECT)===0)return;if((flags2&(ROOT_EFFECT|BRANCH_EFFECT))!== 0){if((flags2&CLEAN)===0)return;effect2.f^=CLEAN}}queued_root_effects.push(effect2)}function fork(fn){experimental_async_required(),current_batch!==null&&fork_timing();var batch=Batch.ensure();batch.is_fork=!0,batch_values=new Map;var committed=!1,settled2=batch.settled();flushSync(fn);for(var[source2,value]of batch.previous)source2.v=value;for(source2 of batch.current.keys())(source2.f&DERIVED)!==0&&set_signal_status(source2,DIRTY);return{commit:async()=>{if(committed){await settled2;return}batches. has(batch)||fork_discarded(),committed=!0,batch.is_fork=!1;for(var[source3,value2]of batch.current)source3.v=value2,source3.wv=increment_write_version();flushSync(()=>{var eager_effects2=new Set;for(var source4 of batch.current.keys())mark_eager_effects(source4,eager_effects2);set_eager_effects(eager_effects2),flush_eager_effects()}),batch.revive(),await settled2},discard:()=>{!committed&&batches.has(batch)&&(batches.delete(batch),batch.discard())}}}function createSubscriber(start2){let subscribers=0, version2=source$2(0),stop;return()=>{effect_tracking()&&(get$4(version2),render_effect(()=>(subscribers===0&&(stop=untrack$1(()=>start2(()=>increment$1(version2)))),subscribers+=1,()=>{queue_micro_task(()=>{subscribers-=1,subscribers===0&&(stop?.(),stop=void 0,increment$1(version2))})})))}}var flags=EFFECT_TRANSPARENT|EFFECT_PRESERVED|BOUNDARY_EFFECT;function boundary(node2,props,children){new Boundary(node2,props,children)}class Boundary{parent;is_pending=!1;#anchor;#hydrate_open=hydrating?hydrate_node: null;#props;#children;#effect;#main_effect=null;#pending_effect=null;#failed_effect=null;#offscreen_fragment=null;#pending_anchor=null;#local_pending_count=0;#pending_count=0;#pending_count_update_queued=!1;#is_creating_fallback=!1;#dirty_effects=new Set;#maybe_dirty_effects=new Set;#effect_pending=null;#effect_pending_subscriber=createSubscriber(()=>(this.#effect_pending=source$2(this.#local_pending_count),()=>{this.#effect_pending=null}));constructor(node2,props,children){this.#anchor=node2,this.#props= props,this.#children=children,this.parent=active_effect.b,this.is_pending=!!this.#props.pending,this.#effect=block(()=>{if(active_effect.b=this,hydrating){const comment2=this.#hydrate_open;hydrate_next(),comment2.nodeType===COMMENT_NODE&&comment2.data===HYDRATION_START_ELSE?this.#hydrate_pending_content():(this.#hydrate_resolved_content(),this.#pending_count===0&&(this.is_pending=!1))}else{var anchor=this.#get_anchor();try{this.#main_effect=branch(()=>children(anchor))}catch(error2){this.error(error2)} this.#pending_count>0?this.#show_pending_snippet():this.is_pending=!1}return()=>{this.#pending_anchor?.remove()}},flags),hydrating&&(this.#anchor=hydrate_node)}#hydrate_resolved_content(){try{this.#main_effect=branch(()=>this.#children(this.#anchor))}catch(error2){this.error(error2)}}#hydrate_pending_content(){const pending=this.#props.pending;pending&&(this.#pending_effect=branch(()=>pending(this.#anchor)),queue_micro_task(()=>{var anchor=this.#get_anchor();this.#main_effect=this.#run(()=>(Batch. ensure(),branch(()=>this.#children(anchor)))),this.#pending_count>0?this.#show_pending_snippet():(pause_effect(this.#pending_effect,()=>{this.#pending_effect=null}),this.is_pending=!1)}))}#get_anchor(){var anchor=this.#anchor;return this.is_pending&&(this.#pending_anchor=create_text(),this.#anchor.before(this.#pending_anchor),anchor=this.#pending_anchor),anchor}defer_effect(effect2){defer_effect(effect2,this.#dirty_effects,this.#maybe_dirty_effects)}is_rendered(){return!this.is_pending&&(!this.parent|| this.parent.is_rendered())}has_pending_snippet(){return!!this.#props.pending}#run(fn){var previous_effect=active_effect,previous_reaction=active_reaction,previous_ctx=component_context;set_active_effect(this.#effect),set_active_reaction(this.#effect),set_component_context(this.#effect.ctx);try{return fn()}catch(e){return handle_error$1(e),null}finally{set_active_effect(previous_effect),set_active_reaction(previous_reaction),set_component_context(previous_ctx)}}#show_pending_snippet(){const pending=this.#props. pending;this.#main_effect!==null&&(this.#offscreen_fragment=document.createDocumentFragment(),this.#offscreen_fragment.append(this.#pending_anchor),move_effect(this.#main_effect,this.#offscreen_fragment)),this.#pending_effect===null&&(this.#pending_effect=branch(()=>pending(this.#anchor)))}#update_pending_count(d2){if(!this.has_pending_snippet()){this.parent&&this.parent.#update_pending_count(d2);return}if(this.#pending_count+=d2,this.#pending_count===0){this.is_pending=!1;for(const e of this.#dirty_effects) set_signal_status(e,DIRTY),schedule_effect(e);for(const e of this.#maybe_dirty_effects)set_signal_status(e,MAYBE_DIRTY),schedule_effect(e);this.#dirty_effects.clear(),this.#maybe_dirty_effects.clear(),this.#pending_effect&&pause_effect(this.#pending_effect,()=>{this.#pending_effect=null}),this.#offscreen_fragment&&(this.#anchor.before(this.#offscreen_fragment),this.#offscreen_fragment=null)}}update_pending_count(d2){this.#update_pending_count(d2),this.#local_pending_count+=d2,!(!this.#effect_pending|| this.#pending_count_update_queued)&&(this.#pending_count_update_queued=!0,queue_micro_task(()=>{this.#pending_count_update_queued=!1,this.#effect_pending&&internal_set(this.#effect_pending,this.#local_pending_count)}))}get_effect_pending(){return this.#effect_pending_subscriber(),get$4(this.#effect_pending)}error(error2){var onerror=this.#props.onerror;let failed=this.#props.failed;if(this.#is_creating_fallback||!onerror&&!failed)throw error2;this.#main_effect&&(destroy_effect(this.#main_effect), this.#main_effect=null),this.#pending_effect&&(destroy_effect(this.#pending_effect),this.#pending_effect=null),this.#failed_effect&&(destroy_effect(this.#failed_effect),this.#failed_effect=null),hydrating&&(set_hydrate_node(this.#hydrate_open),next$1(),set_hydrate_node(skip_nodes()));var did_reset=!1,calling_on_error=!1;const reset2=()=>{if(did_reset){svelte_boundary_reset_noop();return}did_reset=!0,calling_on_error&&svelte_boundary_reset_onerror(),Batch.ensure(),this.#local_pending_count=0,this.#failed_effect!== null&&pause_effect(this.#failed_effect,()=>{this.#failed_effect=null}),this.is_pending=this.has_pending_snippet(),this.#main_effect=this.#run(()=>(this.#is_creating_fallback=!1,branch(()=>this.#children(this.#anchor)))),this.#pending_count>0?this.#show_pending_snippet():this.is_pending=!1};var previous_reaction=active_reaction;try{set_active_reaction(null),calling_on_error=!0,onerror?.(error2,reset2),calling_on_error=!1}catch(error3){invoke_error_boundary(error3,this.#effect&&this.#effect.parent)}finally{ set_active_reaction(previous_reaction)}failed&&queue_micro_task(()=>{this.#failed_effect=this.#run(()=>{Batch.ensure(),this.#is_creating_fallback=!0;try{return branch(()=>{failed(this.#anchor,()=>error2,()=>reset2)})}catch(error3){return invoke_error_boundary(error3,this.#effect.parent),null}finally{this.#is_creating_fallback=!1}})})}}function flatten(blockers,sync,async,fn){const d2=is_runes()?derived:derived_safe_equal;var pending=blockers.filter(b=>!b.settled);if(async.length===0&&pending.length=== 0){fn(sync.map(d2));return}var batch=current_batch,parent=active_effect,restore=capture(),blocker_promise=pending.length===1?pending[0].promise:pending.length>1?Promise.all(pending.map(b=>b.promise)):null;function finish(values){restore();try{fn(values)}catch(error2){(parent.f&DESTROYED)===0&&invoke_error_boundary(error2,parent)}batch?.deactivate(),unset_context()}if(async.length===0){blocker_promise.then(()=>finish(sync.map(d2)));return}function run2(){restore(),Promise.all(async.map(expression=>async_derived( expression))).then(result=>finish([...sync.map(d2),...result])).catch(error2=>invoke_error_boundary(error2,parent))}blocker_promise?blocker_promise.then(run2):run2()}function capture(){var previous_effect=active_effect,previous_reaction=active_reaction,previous_component_context=component_context,previous_batch2=current_batch;return function(activate_batch=!0){set_active_effect(previous_effect),set_active_reaction(previous_reaction),set_component_context(previous_component_context),activate_batch&& previous_batch2?.activate()}}function unset_context(){set_active_effect(null),set_active_reaction(null),set_component_context(null)}function derived(fn){var flags2=DERIVED|DIRTY,parent_derived=active_reaction!==null&&(active_reaction.f&DERIVED)!==0?active_reaction:null;return active_effect!==null&&(active_effect.f|=EFFECT_PRESERVED),{ctx:component_context,deps:null,effects:null,equals,f:flags2,fn,reactions:null,rv:0,v:UNINITIALIZED,wv:0,parent:parent_derived??active_effect,ac:null}}function async_derived(fn,label,location2){ let parent=active_effect;parent===null&&async_derived_orphan();var boundary2=parent.b,promise=void 0,signal=source$2(UNINITIALIZED),should_suspend=!active_reaction,deferreds=new Map;return async_effect(()=>{var d2=deferred();promise=d2.promise;try{Promise.resolve(fn()).then(d2.resolve,d2.reject).then(()=>{batch===current_batch&&batch.committed&&batch.deactivate(),unset_context()})}catch(error2){d2.reject(error2),unset_context()}var batch=current_batch;if(should_suspend){var blocking=boundary2.is_rendered(); boundary2.update_pending_count(1),batch.increment(blocking),deferreds.get(batch)?.reject(STALE_REACTION),deferreds.delete(batch),deferreds.set(batch,d2)}const handler=(value,error2=void 0)=>{if(batch.activate(),error2)error2!==STALE_REACTION&&(signal.f|=ERROR_VALUE,internal_set(signal,error2));else{(signal.f&ERROR_VALUE)!==0&&(signal.f^=ERROR_VALUE),internal_set(signal,value);for(const[b,d3]of deferreds){if(deferreds.delete(b),b===batch)break;d3.reject(STALE_REACTION)}}should_suspend&&(boundary2. update_pending_count(-1),batch.decrement(blocking))};d2.promise.then(handler,e=>handler(null,e||"unknown"))}),teardown(()=>{for(const d2 of deferreds.values())d2.reject(STALE_REACTION)}),new Promise(fulfil=>{function next2(p2){function go2(){p2===promise?fulfil(signal):next2(promise)}p2.then(go2,go2)}next2(promise)})}function user_derived(fn){const d2=derived(fn);return push_reaction_value(d2),d2}function derived_safe_equal(fn){const signal=derived(fn);return signal.equals=safe_equals,signal}function destroy_derived_effects(derived2){ var effects=derived2.effects;if(effects!==null){derived2.effects=null;for(var i=0;i0&&!eager_effects_deferred&&flush_eager_effects()}return value}function flush_eager_effects(){eager_effects_deferred=!1;for(const effect2 of eager_effects)(effect2.f&CLEAN)!==0&&set_signal_status(effect2,MAYBE_DIRTY),is_dirty(effect2)&&update_effect(effect2);eager_effects.clear()}function update$1(source2,d2=1){var value=get$4(source2),result=d2===1?value++:value--;return set$1( source2,value),result}function increment$1(source2){set$1(source2,source2.v+1)}function mark_reactions(signal,status){var reactions=signal.reactions;if(reactions!==null)for(var runes=is_runes(),length=reactions.length,i=0;i{if(update_version===parent_version)return fn();var reaction=active_reaction,version3=update_version;set_active_reaction(null),set_update_version(parent_version);var result=fn();return set_active_reaction(reaction),set_update_version(version3),result};return is_proxied_array&&sources.set("length",state$1(value.length)),new Proxy(value,{defineProperty(_,prop2,descriptor){(!("value"in descriptor)||descriptor.configurable===!1||descriptor.enumerable===!1|| descriptor.writable===!1)&&state_descriptors_fixed();var s2=sources.get(prop2);return s2===void 0?s2=with_parent(()=>{var s3=state$1(descriptor.value);return sources.set(prop2,s3),s3}):set$1(s2,descriptor.value,!0),!0},deleteProperty(target2,prop2){var s2=sources.get(prop2);if(s2===void 0){if(prop2 in target2){const s3=with_parent(()=>state$1(UNINITIALIZED));sources.set(prop2,s3),increment$1(version2)}}else set$1(s2,UNINITIALIZED),increment$1(version2);return!0},get(target2,prop2,receiver){if(prop2=== STATE_SYMBOL)return value;var s2=sources.get(prop2),exists=prop2 in target2;if(s2===void 0&&(!exists||get_descriptor(target2,prop2)?.writable)&&(s2=with_parent(()=>{var p2=proxy(exists?target2[prop2]:UNINITIALIZED),s3=state$1(p2);return s3}),sources.set(prop2,s2)),s2!==void 0){var v=get$4(s2);return v===UNINITIALIZED?void 0:v}return Reflect.get(target2,prop2,receiver)},getOwnPropertyDescriptor(target2,prop2){var descriptor=Reflect.getOwnPropertyDescriptor(target2,prop2);if(descriptor&&"value"in descriptor){ var s2=sources.get(prop2);s2&&(descriptor.value=get$4(s2))}else if(descriptor===void 0){var source2=sources.get(prop2),value2=source2?.v;if(source2!==void 0&&value2!==UNINITIALIZED)return{enumerable:!0,configurable:!0,value:value2,writable:!0}}return descriptor},has(target2,prop2){if(prop2===STATE_SYMBOL)return!0;var s2=sources.get(prop2),has=s2!==void 0&&s2.v!==UNINITIALIZED||Reflect.has(target2,prop2);if(s2!==void 0||active_effect!==null&&(!has||get_descriptor(target2,prop2)?.writable)){s2===void 0&& (s2=with_parent(()=>{var p2=has?proxy(target2[prop2]):UNINITIALIZED,s3=state$1(p2);return s3}),sources.set(prop2,s2));var value2=get$4(s2);if(value2===UNINITIALIZED)return!1}return has},set(target2,prop2,value2,receiver){var s2=sources.get(prop2),has=prop2 in target2;if(is_proxied_array&&prop2==="length")for(var i=value2;istate$1(UNINITIALIZED)),sources.set(i+"",other_s))} if(s2===void 0)(!has||get_descriptor(target2,prop2)?.writable)&&(s2=with_parent(()=>state$1(void 0)),set$1(s2,proxy(value2)),sources.set(prop2,s2));else{has=s2.v!==UNINITIALIZED;var p2=with_parent(()=>proxy(value2));set$1(s2,p2)}var descriptor=Reflect.getOwnPropertyDescriptor(target2,prop2);if(descriptor?.set&&descriptor.set.call(receiver,value2),!has){if(is_proxied_array&&typeof prop2=="string"){var ls=sources.get("length"),n=Number(prop2);Number.isInteger(n)&&n>=ls.v&&set$1(ls,n+1)}increment$1( version2)}return!0},ownKeys(target2){get$4(version2);var own_keys=Reflect.ownKeys(target2).filter(key3=>{var source3=sources.get(key3);return source3===void 0||source3.v!==UNINITIALIZED});for(var[key2,source2]of sources)source2.v!==UNINITIALIZED&&!(key2 in target2)&&own_keys.push(key2);return own_keys},setPrototypeOf(){state_prototype_fixed()}})}function get_proxied_value(value){try{if(value!==null&&typeof value=="object"&&STATE_SYMBOL in value)return value[STATE_SYMBOL]}catch{}return value}function is(a,b){ return Object.is(get_proxied_value(a),get_proxied_value(b))}var $window,$document,is_firefox,first_child_getter,next_sibling_getter;function init_operations(){if($window===void 0){$window=window,$document=document,is_firefox=/Firefox/.test(navigator.userAgent);var element_prototype=Element.prototype,node_prototype=Node.prototype,text_prototype=Text.prototype;first_child_getter=get_descriptor(node_prototype,"firstChild").get,next_sibling_getter=get_descriptor(node_prototype,"nextSibling").get,is_extensible( element_prototype)&&(element_prototype.__click=void 0,element_prototype.__className=void 0,element_prototype.__attributes=null,element_prototype.__style=void 0,element_prototype.__e=void 0),is_extensible(text_prototype)&&(text_prototype.__t=void 0)}}function create_text(value=""){return document.createTextNode(value)}function get_first_child(node2){return first_child_getter.call(node2)}function get_next_sibling(node2){return next_sibling_getter.call(node2)}function child(node2,is_text){if(!hydrating) return get_first_child(node2);var child2=get_first_child(hydrate_node);if(child2===null)child2=hydrate_node.appendChild(create_text());else if(is_text&&child2.nodeType!==TEXT_NODE){var text2=create_text();return child2?.before(text2),set_hydrate_node(text2),text2}return set_hydrate_node(child2),child2}function first_child(node2,is_text=!1){if(!hydrating){var first=get_first_child(node2);return first instanceof Comment&&first.data===""?get_next_sibling(first):first}if(is_text&&hydrate_node?.nodeType!== TEXT_NODE){var text2=create_text();return hydrate_node?.before(text2),set_hydrate_node(text2),text2}return hydrate_node}function sibling(node2,count=1,is_text=!1){let next_sibling=hydrating?hydrate_node:node2;for(var last_sibling;count--;)last_sibling=next_sibling,next_sibling=get_next_sibling(next_sibling);if(!hydrating)return next_sibling;if(is_text&&next_sibling?.nodeType!==TEXT_NODE){var text2=create_text();return next_sibling===null?last_sibling?.after(text2):next_sibling.before(text2),set_hydrate_node( text2),text2}return set_hydrate_node(next_sibling),next_sibling}function clear_text_content(node2){node2.textContent=""}function should_defer_append(){return!1}function autofocus(dom,value){if(value){const body2=document.body;dom.autofocus=!0,queue_micro_task(()=>{document.activeElement===body2&&dom.focus()})}}function remove_textarea_child(dom){hydrating&&get_first_child(dom)!==null&&clear_text_content(dom)}let listening_to_form_reset=!1;function add_form_reset_listener(){listening_to_form_reset|| (listening_to_form_reset=!0,document.addEventListener("reset",evt=>{Promise.resolve().then(()=>{if(!evt.defaultPrevented)for(const e of evt.target.elements)e.__on_r?.()})},{capture:!0}))}function listen(target2,events,handler,call_handler_immediately=!0){call_handler_immediately&&handler();for(var name of events)target2.addEventListener(name,handler);teardown(()=>{for(var name2 of events)target2.removeEventListener(name2,handler)})}function without_reactive_context(fn){var previous_reaction=active_reaction, previous_effect=active_effect;set_active_reaction(null),set_active_effect(null);try{return fn()}finally{set_active_reaction(previous_reaction),set_active_effect(previous_effect)}}function listen_to_event_and_reset_event(element2,event2,handler,on_reset=handler){element2.addEventListener(event2,()=>without_reactive_context(handler));const prev2=element2.__on_r;prev2?element2.__on_r=()=>{prev2(),on_reset(!0)}:element2.__on_r=()=>on_reset(!0),add_form_reset_listener()}function validate_effect(rune){ active_effect===null&&(active_reaction===null&&effect_orphan(),effect_in_unowned_derived()),is_destroying_effect&&effect_in_teardown()}function push_effect(effect2,parent_effect){var parent_last=parent_effect.last;parent_last===null?parent_effect.last=parent_effect.first=effect2:(parent_last.next=effect2,effect2.prev=parent_last,parent_effect.last=effect2)}function create_effect(type2,fn,sync){var parent=active_effect;parent!==null&&(parent.f&INERT)!==0&&(type2|=INERT);var effect2={ctx:component_context, deps:null,nodes:null,f:type2|DIRTY|CONNECTED,first:null,fn,last:null,next:null,parent,b:parent&&parent.b,prev:null,teardown:null,wv:0,ac:null};if(sync)try{update_effect(effect2),effect2.f|=EFFECT_RAN}catch(e2){throw destroy_effect(effect2),e2}else fn!==null&&schedule_effect(effect2);var e=effect2;if(sync&&e.deps===null&&e.teardown===null&&e.nodes===null&&e.first===e.last&&(e.f&EFFECT_PRESERVED)===0&&(e=e.first,(type2&BLOCK_EFFECT)!==0&&(type2&EFFECT_TRANSPARENT)!==0&&e!==null&&(e.f|=EFFECT_TRANSPARENT)), e!==null&&(e.parent=parent,parent!==null&&push_effect(e,parent),active_reaction!==null&&(active_reaction.f&DERIVED)!==0&&(type2&ROOT_EFFECT)===0)){var derived2=active_reaction;(derived2.effects??=[]).push(e)}return effect2}function effect_tracking(){return active_reaction!==null&&!untracking}function teardown(fn){const effect2=create_effect(RENDER_EFFECT,null,!1);return set_signal_status(effect2,CLEAN),effect2.teardown=fn,effect2}function user_effect(fn){validate_effect();var flags2=active_effect. f,defer=!active_reaction&&(flags2&BRANCH_EFFECT)!==0&&(flags2&EFFECT_RAN)===0;if(defer){var context=component_context;(context.e??=[]).push(fn)}else return create_user_effect(fn)}function create_user_effect(fn){return create_effect(EFFECT|USER_EFFECT,fn,!1)}function user_pre_effect(fn){return validate_effect(),create_effect(RENDER_EFFECT|USER_EFFECT,fn,!0)}function effect_root(fn){Batch.ensure();const effect2=create_effect(ROOT_EFFECT|EFFECT_PRESERVED,fn,!0);return()=>{destroy_effect(effect2)}}function component_root(fn){ Batch.ensure();const effect2=create_effect(ROOT_EFFECT|EFFECT_PRESERVED,fn,!0);return(options={})=>new Promise(fulfil=>{options.outro?pause_effect(effect2,()=>{destroy_effect(effect2),fulfil(void 0)}):(destroy_effect(effect2),fulfil(void 0))})}function effect(fn){return create_effect(EFFECT,fn,!1)}function async_effect(fn){return create_effect(ASYNC|EFFECT_PRESERVED,fn,!0)}function render_effect(fn,flags2=0){return create_effect(RENDER_EFFECT|flags2,fn,!0)}function template_effect(fn,sync=[],async=[],blockers=[]){ flatten(blockers,sync,async,values=>{create_effect(RENDER_EFFECT,()=>fn(...values.map(get$4)),!0)})}function deferred_template_effect(fn,sync=[],async=[],blockers=[]){var batch=current_batch,is_async=async.length>0||blockers.length>0;is_async&&batch.increment(!0),flatten(blockers,sync,async,values=>{create_effect(EFFECT,()=>fn(...values.map(get$4)),!1),is_async&&batch.decrement(!0)})}function block(fn,flags2=0){var effect2=create_effect(BLOCK_EFFECT|flags2,fn,!0);return effect2}function managed(fn,flags2=0){ var effect2=create_effect(MANAGED_EFFECT|flags2,fn,!0);return effect2}function branch(fn){return create_effect(BRANCH_EFFECT|EFFECT_PRESERVED,fn,!0)}function execute_effect_teardown(effect2){var teardown2=effect2.teardown;if(teardown2!==null){const previously_destroying_effect=is_destroying_effect,previous_reaction=active_reaction;set_is_destroying_effect(!0),set_active_reaction(null);try{teardown2.call(null)}finally{set_is_destroying_effect(previously_destroying_effect),set_active_reaction(previous_reaction)}}} function destroy_effect_children(signal,remove_dom=!1){var effect2=signal.first;for(signal.first=signal.last=null;effect2!==null;){const controller=effect2.ac;controller!==null&&without_reactive_context(()=>{controller.abort(STALE_REACTION)});var next2=effect2.next;(effect2.f&ROOT_EFFECT)!==0?effect2.parent=null:destroy_effect(effect2,remove_dom),effect2=next2}}function destroy_block_effect_children(signal){for(var effect2=signal.first;effect2!==null;){var next2=effect2.next;(effect2.f&BRANCH_EFFECT)=== 0&&destroy_effect(effect2),effect2=next2}}function destroy_effect(effect2,remove_dom=!0){var removed=!1;(remove_dom||(effect2.f&HEAD_EFFECT)!==0)&&effect2.nodes!==null&&effect2.nodes.end!==null&&(remove_effect_dom(effect2.nodes.start,effect2.nodes.end),removed=!0),destroy_effect_children(effect2,remove_dom&&!removed),remove_reactions(effect2,0),set_signal_status(effect2,DESTROYED);var transitions=effect2.nodes&&effect2.nodes.t;if(transitions!==null)for(const transition2 of transitions)transition2. stop();execute_effect_teardown(effect2);var parent=effect2.parent;parent!==null&&parent.first!==null&&unlink_effect(effect2),effect2.next=effect2.prev=effect2.teardown=effect2.ctx=effect2.deps=effect2.fn=effect2.nodes=effect2.ac=null}function remove_effect_dom(node2,end){for(;node2!==null;){var next2=node2===end?null:get_next_sibling(node2);node2.remove(),node2=next2}}function unlink_effect(effect2){var parent=effect2.parent,prev2=effect2.prev,next2=effect2.next;prev2!==null&&(prev2.next=next2), next2!==null&&(next2.prev=prev2),parent!==null&&(parent.first===effect2&&(parent.first=next2),parent.last===effect2&&(parent.last=prev2))}function pause_effect(effect2,callback,destroy=!0){var transitions=[];pause_children(effect2,transitions,!0);var fn=()=>{destroy&&destroy_effect(effect2),callback&&callback()},remaining=transitions.length;if(remaining>0){var check=()=>--remaining||fn();for(var transition2 of transitions)transition2.out(check)}else fn()}function pause_children(effect2,transitions,local){ if((effect2.f&INERT)===0){effect2.f^=INERT;var t=effect2.nodes&&effect2.nodes.t;if(t!==null)for(const transition2 of t)(transition2.is_global||local)&&transitions.push(transition2);for(var child2=effect2.first;child2!==null;){var sibling2=child2.next,transparent=(child2.f&EFFECT_TRANSPARENT)!==0||(child2.f&BRANCH_EFFECT)!==0&&(effect2.f&BLOCK_EFFECT)!==0;pause_children(child2,transitions,transparent?local:!1),child2=sibling2}}}function resume_effect(effect2){resume_children(effect2,!0)}function resume_children(effect2,local){ if((effect2.f&INERT)!==0){effect2.f^=INERT,(effect2.f&CLEAN)===0&&(set_signal_status(effect2,DIRTY),schedule_effect(effect2));for(var child2=effect2.first;child2!==null;){var sibling2=child2.next,transparent=(child2.f&EFFECT_TRANSPARENT)!==0||(child2.f&BRANCH_EFFECT)!==0;resume_children(child2,transparent?local:!1),child2=sibling2}var t=effect2.nodes&&effect2.nodes.t;if(t!==null)for(const transition2 of t)(transition2.is_global||local)&&transition2.in()}}function move_effect(effect2,fragment){if(effect2. nodes)for(var node2=effect2.nodes.start,end=effect2.nodes.end;node2!==null;){var next2=node2===end?null:get_next_sibling(node2);fragment.append(node2),node2=next2}}let is_updating_effect=!1,is_destroying_effect=!1;function set_is_destroying_effect(value){is_destroying_effect=value}let active_reaction=null,untracking=!1;function set_active_reaction(reaction){active_reaction=reaction}let active_effect=null;function set_active_effect(effect2){active_effect=effect2}let current_sources=null;function push_reaction_value(value){ active_reaction!==null&&(current_sources===null?current_sources=[value]:current_sources.push(value))}let new_deps=null,skipped_deps=0,untracked_writes=null;function set_untracked_writes(value){untracked_writes=value}let write_version=1,read_version=0,update_version=read_version;function set_update_version(value){update_version=value}function increment_write_version(){return++write_version}function is_dirty(reaction){var flags2=reaction.f;if((flags2&DIRTY)!==0)return!0;if(flags2&DERIVED&&(reaction. f&=~WAS_MARKED),(flags2&MAYBE_DIRTY)!==0){for(var dependencies2=reaction.deps,length=dependencies2.length,i=0;ireaction.wv)return!0}(flags2&CONNECTED)!==0&&batch_values===null&&set_signal_status(reaction,CLEAN)}return!1}function schedule_possible_effect_self_invalidation(signal,effect2,root2=!0){var reactions=signal.reactions;if(reactions!==null&&!(current_sources!==null&&includes.call( current_sources,signal)))for(var i=0;i{reaction.ac.abort(STALE_REACTION)}),reaction.ac=null);try{reaction. f|=REACTION_IS_UPDATING;var fn=reaction.fn,result=fn(),deps=reaction.deps;if(new_deps!==null){var i;if(remove_reactions(reaction,skipped_deps),deps!==null&&skipped_deps>0)for(deps.length=skipped_deps+new_deps.length,i=0;i{dom.isConnected&&dom.dispatchEvent(event2)}))}function create_event(event_name,dom,handler,options={}){ function target_handler(event2){if(options.capture||handle_event_propagation.call(dom,event2),!event2.cancelBubble)return without_reactive_context(()=>handler?.call(this,event2))}return event_name.startsWith("pointer")||event_name.startsWith("touch")||event_name==="wheel"?queue_micro_task(()=>{dom.addEventListener(event_name,target_handler,options)}):dom.addEventListener(event_name,target_handler,options),target_handler}function on(element2,type2,handler,options={}){var target_handler=create_event( type2,element2,handler,options);return()=>{element2.removeEventListener(type2,target_handler,options)}}function event(event_name,dom,handler,capture2,passive){var options={capture:capture2,passive},target_handler=create_event(event_name,dom,handler,options);(dom===document.body||dom===window||dom===document||dom instanceof HTMLMediaElement)&&teardown(()=>{dom.removeEventListener(event_name,target_handler,options)})}function delegate(events){for(var i=0;i{throw error2});throw throw_error}}finally{event2.__root=handler_element,delete event2.currentTarget,set_active_reaction(previous_reaction),set_active_effect(previous_effect)}}}function create_fragment_from_html(html2){var elem=document.createElement("template");return elem.innerHTML=html2.replaceAll("",""),elem.content}function assign_nodes(start2,end){var effect2=active_effect;effect2.nodes===null&&(effect2.nodes={start:start2,end,a:null,t:null})}function from_html(content2,flags2){ var is_fragment=(flags2&TEMPLATE_FRAGMENT)!==0,use_import_node=(flags2&TEMPLATE_USE_IMPORT_NODE)!==0,node2,has_start=!content2.startsWith("");return()=>{if(hydrating)return assign_nodes(hydrate_node,null),hydrate_node;node2===void 0&&(node2=create_fragment_from_html(has_start?content2:""+content2),is_fragment||(node2=get_first_child(node2)));var clone2=use_import_node||is_firefox?document.importNode(node2,!0):node2.cloneNode(!0);if(is_fragment){var start2=get_first_child(clone2),end=clone2. lastChild;assign_nodes(start2,end)}else assign_nodes(clone2,clone2);return clone2}}function from_namespace(content2,flags2,ns="svg"){var has_start=!content2.startsWith(""),wrapped=`<${ns}>${has_start?content2:""+content2}`,node2;return()=>{if(hydrating)return assign_nodes(hydrate_node,null),hydrate_node;if(!node2){var fragment=create_fragment_from_html(wrapped),root2=get_first_child(fragment);node2=get_first_child(root2)}var clone2=node2.cloneNode(!0);return assign_nodes(clone2,clone2), clone2}}function from_svg(content2,flags2){return from_namespace(content2,flags2,"svg")}function text$8(value=""){if(!hydrating){var t=create_text(value+"");return assign_nodes(t,t),t}var node2=hydrate_node;return node2.nodeType!==TEXT_NODE&&(node2.before(node2=create_text()),set_hydrate_node(node2)),assign_nodes(node2,node2),node2}function comment$2(){if(hydrating)return assign_nodes(hydrate_node,null),hydrate_node;var frag=document.createDocumentFragment(),start2=document.createComment(""),anchor=create_text(); return frag.append(start2,anchor),assign_nodes(start2,anchor),frag}function append(anchor,dom){if(hydrating){var effect2=active_effect;((effect2.f&EFFECT_RAN)===0||effect2.nodes.end===null)&&(effect2.nodes.end=hydrate_node),hydrate_next();return}anchor!==null&&anchor.before(dom)}function props_id(){if(hydrating&&hydrate_node&&hydrate_node.nodeType===COMMENT_NODE&&hydrate_node.textContent?.startsWith("$")){const id2=hydrate_node.textContent.substring(1);return hydrate_next(),id2}return(window.__svelte??= {}).uid??=1,`c${window.__svelte.uid++}`}let should_intro=!0;function set_should_intro(value){should_intro=value}function set_text(text2,value){var str=value==null?"":typeof value=="object"?value+"":value;str!==(text2.__t??=text2.nodeValue)&&(text2.__t=str,text2.nodeValue=str+"")}function mount(component2,options){return _mount(component2,options)}function hydrate(component2,options){init_operations(),options.intro=options.intro??!1;const target2=options.target,was_hydrating=hydrating,previous_hydrate_node=hydrate_node; try{for(var anchor=get_first_child(target2);anchor&&(anchor.nodeType!==COMMENT_NODE||anchor.data!==HYDRATION_START);)anchor=get_next_sibling(anchor);if(!anchor)throw HYDRATION_ERROR;set_hydrating(!0),set_hydrate_node(anchor);const instance=_mount(component2,{...options,anchor});return set_hydrating(!1),instance}catch(error2){if(error2 instanceof Error&&error2.message.split(` `).some(line=>line.startsWith("https://svelte.dev/e/")))throw error2;return error2!==HYDRATION_ERROR&&console.warn("Failed to hydrate: ",error2),options.recover===!1&&hydration_failed(),init_operations(),clear_text_content(target2),set_hydrating(!1),mount(component2,options)}finally{set_hydrating(was_hydrating),set_hydrate_node(previous_hydrate_node)}}const document_listeners=new Map;function _mount(Component,{target:target2,anchor,props={},events,context,intro=!0}){init_operations();var registered_events=new Set, event_handle=events2=>{for(var i=0;i{var anchor_node=anchor??target2.appendChild(create_text());return boundary(anchor_node,{pending:()=>{}},anchor_node2=>{if(context){push$1({});var ctx=component_context;ctx.c=context}if(events&&(props.$$events=events),hydrating&&assign_nodes(anchor_node2,null),should_intro=intro,component2=Component(anchor_node2,props)||{},should_intro=!0,hydrating&&(active_effect.nodes.end=hydrate_node,hydrate_node===null||hydrate_node. nodeType!==COMMENT_NODE||hydrate_node.data!==HYDRATION_END))throw hydration_mismatch(),HYDRATION_ERROR;context&&pop()}),()=>{for(var event_name of registered_events){target2.removeEventListener(event_name,handle_event_propagation);var n=document_listeners.get(event_name);--n===0?(document.removeEventListener(event_name,handle_event_propagation),document_listeners.delete(event_name)):document_listeners.set(event_name,n)}root_event_handles.delete(event_handle),anchor_node!==anchor&&anchor_node.parentNode?. removeChild(anchor_node)}});return mounted_components.set(component2,unmount2),component2}let mounted_components=new WeakMap;function unmount(component2,options){const fn=mounted_components.get(component2);return fn?(mounted_components.delete(component2),fn(options)):Promise.resolve()}class BranchManager{anchor;#batches=new Map;#onscreen=new Map;#offscreen=new Map;#outroing=new Set;#transition=!0;constructor(anchor,transition2=!0){this.anchor=anchor,this.#transition=transition2}#commit=()=>{var batch=current_batch; if(this.#batches.has(batch)){var key2=this.#batches.get(batch),onscreen=this.#onscreen.get(key2);if(onscreen)resume_effect(onscreen),this.#outroing.delete(key2);else{var offscreen=this.#offscreen.get(key2);offscreen&&(this.#onscreen.set(key2,offscreen.effect),this.#offscreen.delete(key2),offscreen.fragment.lastChild.remove(),this.anchor.before(offscreen.fragment),onscreen=offscreen.effect)}for(const[b,k]of this.#batches){if(this.#batches.delete(b),b===batch)break;const offscreen2=this.#offscreen. get(k);offscreen2&&(destroy_effect(offscreen2.effect),this.#offscreen.delete(k))}for(const[k,effect2]of this.#onscreen){if(k===key2||this.#outroing.has(k))continue;const on_destroy=()=>{if(Array.from(this.#batches.values()).includes(k)){var fragment=document.createDocumentFragment();move_effect(effect2,fragment),fragment.append(create_text()),this.#offscreen.set(k,{effect:effect2,fragment})}else destroy_effect(effect2);this.#outroing.delete(k),this.#onscreen.delete(k)};this.#transition||!onscreen? (this.#outroing.add(k),pause_effect(effect2,on_destroy,!1)):on_destroy()}}};#discard=batch=>{this.#batches.delete(batch);const keys2=Array.from(this.#batches.values());for(const[k,branch2]of this.#offscreen)keys2.includes(k)||(destroy_effect(branch2.effect),this.#offscreen.delete(k))};ensure(key2,fn){var batch=current_batch,defer=should_defer_append();if(fn&&!this.#onscreen.has(key2)&&!this.#offscreen.has(key2))if(defer){var fragment=document.createDocumentFragment(),target2=create_text();fragment. append(target2),this.#offscreen.set(key2,{effect:branch(()=>fn(target2)),fragment})}else this.#onscreen.set(key2,branch(()=>fn(this.anchor)));if(this.#batches.set(batch,key2),defer){for(const[k,effect2]of this.#onscreen)k===key2?batch.skipped_effects.delete(effect2):batch.skipped_effects.add(effect2);for(const[k,branch2]of this.#offscreen)k===key2?batch.skipped_effects.delete(branch2.effect):batch.skipped_effects.add(branch2.effect);batch.oncommit(this.#commit),batch.ondiscard(this.#discard)}else hydrating&&(this.anchor=hydrate_node),this.#commit()}}function if_block(node2,fn,elseif=!1){hydrating&&hydrate_next();var branches=new BranchManager(node2),flags2=elseif?EFFECT_TRANSPARENT:0;function update_branch(condition,fn2){if(hydrating){const is_else=read_hydration_instruction(node2)===HYDRATION_START_ELSE;if(condition===is_else){var anchor=skip_nodes();set_hydrate_node(anchor),branches.anchor=anchor,set_hydrating(!1),branches.ensure(condition,fn2),set_hydrating(!0);return}}branches.ensure( condition,fn2)}block(()=>{var has_branch=!1;fn((fn2,flag=!0)=>{has_branch=!0,update_branch(flag,fn2)}),has_branch||update_branch(!1,null)},flags2)}function key$1(node2,get_key,render_fn){hydrating&&hydrate_next();var branches=new BranchManager(node2),legacy=!is_runes();block(()=>{var key2=get_key();legacy&&key2!==null&&typeof key2=="object"&&(key2={}),branches.ensure(key2,render_fn)})}function index$2(_,i){return i}function pause_effects(state2,to_destroy,controlled_anchor){for(var transitions=[], length=to_destroy.length,group,remaining=to_destroy.length,i=0;i{if(group){if(group.pending.delete(effect2),group.done.add(effect2),group.pending.size===0){var groups=state2.outrogroups;destroy_effects(array_from(group.done)),groups.delete(group),groups.size===0&&(state2.outrogroups=null)}}else remaining-=1},!1)}if(remaining===0){var fast_path=transitions.length===0&&controlled_anchor!==null;if(fast_path){var anchor=controlled_anchor, parent_node=anchor.parentNode;clear_text_content(parent_node),parent_node.append(anchor),state2.items.clear()}destroy_effects(to_destroy,!fast_path)}else group={pending:new Set(to_destroy),done:new Set},(state2.outrogroups??=new Set).add(group)}function destroy_effects(to_destroy,remove_dom=!0){for(var i=0;i{var collection=get_collection();return is_array(collection)?collection:collection==null?[]:array_from(collection)}),array2,first_run=!0;function commit(){state2.fallback=fallback2,reconcile(state2,array2,anchor,flags2,get_key),fallback2!== null&&(array2.length===0?(fallback2.f&EFFECT_OFFSCREEN)===0?resume_effect(fallback2):(fallback2.f^=EFFECT_OFFSCREEN,move(fallback2,null,anchor)):pause_effect(fallback2,()=>{fallback2=null}))}var effect2=block(()=>{array2=get$4(each_array);var length=array2.length;let mismatch=!1;if(hydrating){var is_else=read_hydration_instruction(anchor)===HYDRATION_START_ELSE;is_else!==(length===0)&&(anchor=skip_nodes(),set_hydrate_node(anchor),set_hydrating(!1),mismatch=!0)}for(var keys2=new Set,batch=current_batch, defer=should_defer_append(),index2=0;index2fallback_fn(anchor)):(fallback2=branch(()=>fallback_fn(offscreen_anchor??=create_text())),fallback2.f|=EFFECT_OFFSCREEN)),hydrating&&length>0&&set_hydrate_node(skip_nodes()),!first_run)if(defer){for(const[key3,item2]of items2)keys2.has(key3)||batch.skipped_effects.add(item2.e);batch.oncommit(commit),batch.ondiscard( ()=>{})}else commit();mismatch&&set_hydrating(!0),get$4(each_array)}),state2={effect:effect2,items:items2,outrogroups:null,fallback:fallback2};first_run=!1,hydrating&&(anchor=hydrate_node)}function reconcile(state2,array2,anchor,flags2,get_key){var is_animated=(flags2&EACH_IS_ANIMATED)!==0,length=array2.length,items2=state2.items,current2=state2.effect.first,seen2,prev2=null,to_animate,matched=[],stashed=[],value,key2,effect2,i;if(is_animated)for(i=0;i0){var controlled_anchor=(flags2&EACH_IS_CONTROLLED)!==0&&length===0?anchor:null;if(is_animated){for(i=0;i{if(to_animate!==void 0)for(effect2 of to_animate)effect2.nodes?.a?.apply()})}function create_item(items2,anchor,value,key2,index2,render_fn,flags2,get_collection){var v=(flags2&EACH_ITEM_REACTIVE)!==0?(flags2&EACH_ITEM_IMMUTABLE)===0?mutable_source(value,!1,!1):source$2(value):null,i=(flags2&EACH_INDEX_REACTIVE)!==0?source$2(index2):null; return{v,i,e:branch(()=>(render_fn(anchor,v??value,i??index2,get_collection),()=>{items2.delete(key2)}))}}function move(effect2,next2,anchor){if(effect2.nodes)for(var node2=effect2.nodes.start,end=effect2.nodes.end,dest=next2&&(next2.f&EFFECT_OFFSCREEN)===0?next2.nodes.start:anchor;node2!==null;){var next_node=get_next_sibling(node2);if(dest.before(node2),node2===end)return;node2=next_node}}function link$2(state2,prev2,next2){prev2===null?state2.effect.first=next2:prev2.next=next2,next2===null?state2. effect.last=prev2:next2.prev=prev2}function html$6(node2,get_value,svg2=!1,mathml=!1,skip_warning=!1){var anchor=node2,value="";template_effect(()=>{var effect2=active_effect;if(value===(value=get_value()??"")){hydrating&&hydrate_next();return}if(effect2.nodes!==null&&(remove_effect_dom(effect2.nodes.start,effect2.nodes.end),effect2.nodes=null),value!==""){if(hydrating){hydrate_node.data;for(var next2=hydrate_next(),last=next2;next2!==null&&(next2.nodeType!==COMMENT_NODE||next2.data!=="");)last= next2,next2=get_next_sibling(next2);if(next2===null)throw hydration_mismatch(),HYDRATION_ERROR;assign_nodes(hydrate_node,last),anchor=set_hydrate_node(next2);return}var html2=value+"";svg2?html2=`${html2}`:mathml&&(html2=`${html2}`);var node3=create_fragment_from_html(html2);if((svg2||mathml)&&(node3=get_first_child(node3)),assign_nodes(get_first_child(node3),node3.lastChild),svg2||mathml)for(;get_first_child(node3);)anchor.before(get_first_child(node3));else anchor.before( node3)}})}function snippet(node2,get_snippet,...args){var branches=new BranchManager(node2);block(()=>{const snippet2=get_snippet()??null;branches.ensure(snippet2,snippet2&&(anchor=>snippet2(anchor,...args)))},EFFECT_TRANSPARENT)}function createRawSnippet(fn){return(anchor,...params)=>{var snippet2=fn(...params),element2;if(hydrating)element2=hydrate_node,hydrate_next();else{var html2=snippet2.render().trim(),fragment=create_fragment_from_html(html2);element2=get_first_child(fragment),anchor.before( element2)}const result=snippet2.setup?.(element2);assign_nodes(element2,element2),typeof result=="function"&&teardown(result)}}function component(node2,get_component,render_fn){hydrating&&hydrate_next();var branches=new BranchManager(node2);block(()=>{var component2=get_component()??null;branches.ensure(component2,component2&&(target2=>render_fn(target2,component2)))},EFFECT_TRANSPARENT)}const now=()=>performance.now(),raf={tick:_=>requestAnimationFrame(_),now:()=>now(),tasks:new Set};function run_tasks(){ const now2=raf.now();raf.tasks.forEach(task=>{task.c(now2)||(raf.tasks.delete(task),task.f())}),raf.tasks.size!==0&&raf.tick(run_tasks)}function loop(callback){let task;return raf.tasks.size===0&&raf.tick(run_tasks),{promise:new Promise(fulfill=>{raf.tasks.add(task={c:callback,f:fulfill})}),abort(){raf.tasks.delete(task)}}}function dispatch_event(element2,type2){without_reactive_context(()=>{element2.dispatchEvent(new CustomEvent(type2))})}function css_property_to_camelcase(style2){if(style2==="\ float")return"cssFloat";if(style2==="offset")return"cssOffset";if(style2.startsWith("--"))return style2;const parts=style2.split("-");return parts.length===1?parts[0]:parts[0]+parts.slice(1).map(word=>word[0].toUpperCase()+word.slice(1)).join("")}function css_to_keyframe(css2){const keyframe={},parts=css2.split(";");for(const part of parts){const[property,value]=part.split(":");if(!property||value===void 0)break;const formatted_property=css_property_to_camelcase(property.trim());keyframe[formatted_property]= value.trim()}return keyframe}const linear$1=t=>t;function transition(flags2,element2,get_fn,get_params){var is_intro=(flags2&TRANSITION_IN)!==0,is_outro=(flags2&TRANSITION_OUT)!==0,is_both=is_intro&&is_outro,is_global=(flags2&TRANSITION_GLOBAL)!==0,direction=is_both?"both":is_intro?"in":"out",current_options,inert=element2.inert,overflow=element2.style.overflow,intro,outro;function get_options(){return without_reactive_context(()=>current_options??=get_fn()(element2,get_params?.()??{},{direction}))} var transition2={is_global,in(){if(element2.inert=inert,!is_intro){outro?.abort(),outro?.reset?.();return}is_outro||intro?.abort(),dispatch_event(element2,"introstart"),intro=animate(element2,get_options(),outro,1,()=>{dispatch_event(element2,"introend"),intro?.abort(),intro=current_options=void 0,element2.style.overflow=overflow})},out(fn){if(!is_outro){fn?.(),current_options=void 0;return}element2.inert=!0,dispatch_event(element2,"outrostart"),outro=animate(element2,get_options(),intro,0,()=>{ dispatch_event(element2,"outroend"),fn?.()})},stop:()=>{intro?.abort(),outro?.abort()}},e=active_effect;if((e.nodes.t??=[]).push(transition2),is_intro&&should_intro){var run2=is_global;if(!run2){for(var block2=e.parent;block2&&(block2.f&EFFECT_TRANSPARENT)!==0;)for(;(block2=block2.parent)&&(block2.f&BLOCK_EFFECT)===0;);run2=!block2||(block2.f&EFFECT_RAN)!==0}run2&&effect(()=>{untrack$1(()=>transition2.in())})}}function animate(element2,options,counterpart,t2,on_finish){var is_intro=t2===1;if(is_function( options)){var a,aborted2=!1;return queue_micro_task(()=>{if(!aborted2){var o=options({direction:is_intro?"in":"out"});a=animate(element2,o,counterpart,t2,on_finish)}}),{abort:()=>{aborted2=!0,a?.abort()},deactivate:()=>a.deactivate(),reset:()=>a.reset(),t:()=>a.t()}}if(counterpart?.deactivate(),!options?.duration)return on_finish(),{abort:noop$3,deactivate:noop$3,reset:noop$3,t:()=>t2};const{delay=0,css:css2,tick:tick2,easing=linear$1}=options;var keyframes=[];if(is_intro&&counterpart===void 0&& (tick2&&tick2(0,1),css2)){var styles2=css_to_keyframe(css2(0,1));keyframes.push(styles2,styles2)}var get_t=()=>1-t2,animation=element2.animate(keyframes,{duration:delay,fill:"forwards"});return animation.onfinish=()=>{animation.cancel();var t1=counterpart?.t()??1-t2;counterpart?.abort();var delta=t2-t1,duration2=options.duration*Math.abs(delta),keyframes2=[];if(duration2>0){var needs_overflow_hidden=!1;if(css2)for(var n=Math.ceil(duration2/16.666666666666668),i=0;i<=n;i+=1){var t=t1+delta*easing( i/n),styles3=css_to_keyframe(css2(t,1-t));keyframes2.push(styles3),needs_overflow_hidden||=styles3.overflow==="hidden"}needs_overflow_hidden&&(element2.style.overflow="hidden"),get_t=()=>{var time2=animation.currentTime;return t1+delta*easing(time2/duration2)},tick2&&loop(()=>{if(animation.playState!=="running")return!1;var t3=get_t();return tick2(t3,1-t3),!0})}animation=element2.animate(keyframes2,{duration:duration2,fill:"forwards"}),animation.onfinish=()=>{get_t=()=>t2,tick2?.(t2,1-t2),on_finish()}}, {abort:()=>{animation&&(animation.cancel(),animation.effect=null,animation.onfinish=noop$3)},deactivate:()=>{on_finish=noop$3},reset:()=>{t2===0&&tick2?.(1,0)},t:()=>get_t()}}function element$4(node2,get_tag,is_svg,render_fn,get_namespace,location2){let was_hydrating=hydrating;hydrating&&hydrate_next();var element2=null;hydrating&&hydrate_node.nodeType===ELEMENT_NODE$1&&(element2=hydrate_node,hydrate_next());var anchor=hydrating?hydrate_node:node2,branches=new BranchManager(anchor,!1);block(()=>{ const next_tag=get_tag()||null;var ns=is_svg||next_tag==="svg"?NAMESPACE_SVG:null;if(next_tag===null){branches.ensure(null,null),set_should_intro(!0);return}return branches.ensure(next_tag,anchor2=>{if(next_tag){if(element2=hydrating?element2:ns?document.createElementNS(ns,next_tag):document.createElement(next_tag),assign_nodes(element2,element2),render_fn){hydrating&&is_raw_text_element(next_tag)&&element2.append(document.createComment(""));var child_anchor=hydrating?get_first_child(element2):element2. appendChild(create_text());hydrating&&(child_anchor===null?set_hydrating(!1):set_hydrate_node(child_anchor)),render_fn(element2,child_anchor)}active_effect.nodes.end=element2,anchor2.before(element2)}hydrating&&set_hydrate_node(anchor2)}),set_should_intro(!0),()=>{next_tag&&set_should_intro(!1)}},EFFECT_TRANSPARENT),teardown(()=>{set_should_intro(!0)}),was_hydrating&&(set_hydrating(!0),set_hydrate_node(anchor))}function head$1(hash2,render_fn){let previous_hydrate_node=null,was_hydrating=hydrating; var anchor;if(hydrating){previous_hydrate_node=hydrate_node;for(var head_anchor=get_first_child(document.head);head_anchor!==null&&(head_anchor.nodeType!==COMMENT_NODE||head_anchor.data!==hash2);)head_anchor=get_next_sibling(head_anchor);if(head_anchor===null)set_hydrating(!1);else{var start2=get_next_sibling(head_anchor);head_anchor.remove(),set_hydrate_node(start2)}}hydrating||(anchor=document.head.appendChild(create_text()));try{block(()=>render_fn(anchor),HEAD_EFFECT)}finally{was_hydrating&& (set_hydrating(!0),set_hydrate_node(previous_hydrate_node))}}function action(dom,action2,get_value){effect(()=>{var payload=untrack$1(()=>action2(dom,get_value?.())||{});if(get_value&&payload?.update){var inited2=!1,prev2={};render_effect(()=>{var value=get_value();deep_read_state(value),inited2&&safe_not_equal(prev2,value)&&(prev2=value,payload.update(value))}),inited2=!0}if(payload?.destroy)return()=>payload.destroy()})}function attach(node2,get_fn){var fn=void 0,e;managed(()=>{fn!==(fn=get_fn())&& (e&&(destroy_effect(e),e=null),fn&&(e=branch(()=>{effect(()=>fn(node2))})))})}function r$1(e){var t,f,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t=0;){var b=a+len;(a===0||whitespace$1.includes(classname[a-1]))&&(b===classname.length||whitespace$1.includes(classname[b]))?classname=(a===0?"":classname.substring( 0,a))+classname.substring(b+1):a=b}}return classname===""?null:classname}function append_styles(styles2,important=!1){var separator=important?" !important;":";",css2="";for(var key2 in styles2){var value=styles2[key2];value!=null&&value!==""&&(css2+=" "+key2+": "+value+separator)}return css2}function to_css_name(name){return name[0]!=="-"||name[1]!=="-"?name.toLowerCase():name}function to_style(value,styles2){if(styles2){var new_style="",normal_styles,important_styles;if(Array.isArray(styles2)?(normal_styles= styles2[0],important_styles=styles2[1]):normal_styles=styles2,value){value=String(value).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var in_str=!1,in_apo=0,in_comment=!1,reserved_names=[];normal_styles&&reserved_names.push(...Object.keys(normal_styles).map(to_css_name)),important_styles&&reserved_names.push(...Object.keys(important_styles).map(to_css_name));var start_index=0,name_index=-1;const len=value.length;for(var i=0;i{select_option(select,select.__value)});observer.observe(select,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),teardown(()=>{observer.disconnect()})}function get_option_value(option2){return"__value"in option2?option2.__value:option2.value}const CLASS=Symbol("class"),STYLE=Symbol("style"),IS_CUSTOM_ELEMENT=Symbol("is custom element"),IS_HTML=Symbol("is html");function remove_input_defaults(input){ if(hydrating){var already_removed=!1,remove_defaults=()=>{if(!already_removed){if(already_removed=!0,input.hasAttribute("value")){var value=input.value;set_attribute(input,"value",null),input.value=value}if(input.hasAttribute("checked")){var checked=input.checked;set_attribute(input,"checked",null),input.checked=checked}}};input.__on_r=remove_defaults,queue_micro_task(remove_defaults),add_form_reset_listener()}}function set_value(element2,value){var attributes=get_attributes(element2);attributes. value===(attributes.value=value??void 0)||element2.value===value&&(value!==0||element2.nodeName!=="PROGRESS")||(element2.value=value??"")}function set_selected(element2,selected){selected?element2.hasAttribute("selected")||element2.setAttribute("selected",""):element2.removeAttribute("selected")}function set_attribute(element2,attribute,value,skip_warning){var attributes=get_attributes(element2);hydrating&&(attributes[attribute]=element2.getAttribute(attribute),attribute==="src"||attribute==="sr\ cset"||attribute==="href"&&element2.nodeName==="LINK")||attributes[attribute]!==(attributes[attribute]=value)&&(attribute==="loading"&&(element2[LOADING_ATTR_SYMBOL]=value),value==null?element2.removeAttribute(attribute):typeof value!="string"&&get_setters(element2).includes(attribute)?element2[attribute]=value:element2.setAttribute(attribute,value))}function set_attributes(element2,prev2,next2,css_hash,should_remove_defaults=!1,skip_warning=!1){if(hydrating&&should_remove_defaults&&element2.tagName=== "INPUT"){var input=element2,attribute=input.type==="checkbox"?"defaultChecked":"defaultValue";attribute in next2||remove_input_defaults(input)}var attributes=get_attributes(element2),is_custom_element=attributes[IS_CUSTOM_ELEMENT],preserve_attribute_case=!attributes[IS_HTML];let is_hydrating_custom_element=hydrating&&is_custom_element;is_hydrating_custom_element&&set_hydrating(!1);var current2=prev2||{},is_option_element=element2.tagName==="OPTION";for(var key2 in prev2)key2 in next2||(next2[key2]= null);next2.class?next2.class=clsx(next2.class):(css_hash||next2[CLASS])&&(next2.class=null),next2[STYLE]&&(next2.style??=null);var setters=get_setters(element2);for(const key3 in next2){let value=next2[key3];if(is_option_element&&key3==="value"&&value==null){element2.value=element2.__value="",current2[key3]=value;continue}if(key3==="class"){var is_html=element2.namespaceURI==="http://www.w3.org/1999/xhtml";set_class(element2,is_html,value,css_hash,prev2?.[CLASS],next2[CLASS]),current2[key3]=value, current2[CLASS]=next2[CLASS];continue}if(key3==="style"){set_style(element2,value,prev2?.[STYLE],next2[STYLE]),current2[key3]=value,current2[STYLE]=next2[STYLE];continue}var prev_value=current2[key3];if(!(value===prev_value&&!(value===void 0&&element2.hasAttribute(key3)))){current2[key3]=value;var prefix=key3[0]+key3[1];if(prefix!=="$$")if(prefix==="on"){const opts={},event_handle_key="$$"+key3;let event_name=key3.slice(2);var delegated=can_delegate_event(event_name);if(is_capture_event(event_name)&& (event_name=event_name.slice(0,-7),opts.capture=!0),!delegated&&prev_value){if(value!=null)continue;element2.removeEventListener(event_name,current2[event_handle_key],opts),current2[event_handle_key]=null}if(value!=null)if(delegated)element2[`__${event_name}`]=value,delegate([event_name]);else{let handle2=function(evt){current2[key3].call(this,evt)};current2[event_handle_key]=create_event(event_name,element2,handle2,opts)}else delegated&&(element2[`__${event_name}`]=void 0)}else if(key3==="style") set_attribute(element2,key3,value);else if(key3==="autofocus")autofocus(element2,!!value);else if(!is_custom_element&&(key3==="__value"||key3==="value"&&value!=null))element2.value=element2.__value=value;else if(key3==="selected"&&is_option_element)set_selected(element2,value);else{var name=key3;preserve_attribute_case||(name=normalize_attribute(name));var is_default=name==="defaultValue"||name==="defaultChecked";if(value==null&&!is_custom_element&&!is_default)if(attributes[key3]=null,name==="va\ lue"||name==="checked"){let input2=element2;const use_default=prev2===void 0;if(name==="value"){let previous2=input2.defaultValue;input2.removeAttribute(name),input2.defaultValue=previous2,input2.value=input2.__value=use_default?previous2:null}else{let previous2=input2.defaultChecked;input2.removeAttribute(name),input2.defaultChecked=previous2,input2.checked=use_default?previous2:!1}}else element2.removeAttribute(key3);else is_default||setters.includes(name)&&(is_custom_element||typeof value!="s\ tring")?(element2[name]=value,name in attributes&&(attributes[name]=UNINITIALIZED)):typeof value!="function"&&set_attribute(element2,name,value)}}}return is_hydrating_custom_element&&set_hydrating(!0),current2}function attribute_effect(element2,fn,sync=[],async=[],blockers=[],css_hash,should_remove_defaults=!1,skip_warning=!1){flatten(blockers,sync,async,values=>{var prev2=void 0,effects={},is_select=element2.nodeName==="SELECT",inited2=!1;if(managed(()=>{var next2=fn(...values.map(get$4)),current2=set_attributes( element2,prev2,next2,css_hash,should_remove_defaults,skip_warning);inited2&&is_select&&"value"in next2&&select_option(element2,next2.value);for(let symbol of Object.getOwnPropertySymbols(effects))next2[symbol]||destroy_effect(effects[symbol]);for(let symbol of Object.getOwnPropertySymbols(next2)){var n=next2[symbol];symbol.description===ATTACHMENT_KEY&&(!prev2||n!==prev2[symbol])&&(effects[symbol]&&destroy_effect(effects[symbol]),effects[symbol]=branch(()=>attach(element2,()=>n))),current2[symbol]= n}prev2=current2}),is_select){var select=element2;effect(()=>{select_option(select,prev2.value,!0),init_select(select)})}inited2=!0})}function get_attributes(element2){return element2.__attributes??={[IS_CUSTOM_ELEMENT]:element2.nodeName.includes("-"),[IS_HTML]:element2.namespaceURI===NAMESPACE_HTML}}var setters_cache=new Map;function get_setters(element2){var cache_key=element2.getAttribute("is")||element2.nodeName,setters=setters_cache.get(cache_key);if(setters)return setters;setters_cache.set( cache_key,setters=[]);for(var descriptors,proto=element2,element_proto=Element.prototype;element_proto!==proto;){descriptors=get_descriptors(proto);for(var key2 in descriptors)descriptors[key2].set&&setters.push(key2);proto=get_prototype_of(proto)}return setters}function bind_value(input,get2,set2=get2){var batches2=new WeakSet;listen_to_event_and_reset_event(input,"input",async is_reset=>{var value=is_reset?input.defaultValue:input.value;if(value=is_numberlike_input(input)?to_number(value):value, set2(value),current_batch!==null&&batches2.add(current_batch),await tick(),value!==(value=get2())){var start2=input.selectionStart,end=input.selectionEnd,length=input.value.length;if(input.value=value??"",end!==null){var new_length=input.value.length;start2===end&&end===length&&new_length>length?(input.selectionStart=new_length,input.selectionEnd=new_length):(input.selectionStart=start2,input.selectionEnd=Math.min(end,new_length))}}}),(hydrating&&input.defaultValue!==input.value||untrack$1(get2)== null&&input.value)&&(set2(is_numberlike_input(input)?to_number(input.value):input.value),current_batch!==null&&batches2.add(current_batch)),render_effect(()=>{var value=get2();if(input===document.activeElement){var batch=previous_batch??current_batch;if(batches2.has(batch))return}is_numberlike_input(input)&&value===to_number(input.value)||input.type==="date"&&!value&&!input.value||value!==input.value&&(input.value=value??"")})}function is_numberlike_input(input){var type2=input.type;return type2=== "number"||type2==="range"}function to_number(value){return value===""?null:+value}function bind_files(input,get2,set2=get2){listen_to_event_and_reset_event(input,"change",()=>{set2(input.files)}),hydrating&&input.files&&set2(input.files),render_effect(()=>{input.files=get2()})}function is_bound_this(bound_value,element_or_component){return bound_value===element_or_component||bound_value?.[STATE_SYMBOL]===element_or_component}function bind_this(element_or_component={},update2,get_value,get_parts){ return effect(()=>{var old_parts,parts;return render_effect(()=>{old_parts=parts,parts=[],untrack$1(()=>{element_or_component!==get_value(...parts)&&(update2(element_or_component,...parts),old_parts&&is_bound_this(get_value(...old_parts),element_or_component)&&update2(null,...old_parts))})}),()=>{queue_micro_task(()=>{parts&&is_bound_this(get_value(...parts),element_or_component)&&update2(null,...parts)})}}),element_or_component}function bind_window_size(type2,set2){listen(window,["resize"],()=>without_reactive_context( ()=>set2(window[type2])))}function init(immutable=!1){const context=component_context,callbacks=context.l.u;if(!callbacks)return;let props=()=>deep_read_state(context.s);if(immutable){let version2=0,prev2={};const d2=derived(()=>{let changed=!1;const props2=context.s;for(const key2 in props2)props2[key2]!==prev2[key2]&&(prev2[key2]=props2[key2],changed=!0);return changed&&version2++,version2});props=()=>get$4(d2)}callbacks.b.length&&user_pre_effect(()=>{observe_all(context,props),run_all(callbacks. b)}),user_effect(()=>{const fns=untrack$1(()=>callbacks.m.map(run));return()=>{for(const fn of fns)typeof fn=="function"&&fn()}}),callbacks.a.length&&user_effect(()=>{observe_all(context,props),run_all(callbacks.a)})}function observe_all(context,props){if(context.l.s)for(const signal of context.l.s)get$4(signal);props()}function subscribe_to_store(store,run2,invalidate){if(store==null)return run2(void 0),noop$3;const unsub=untrack$1(()=>store.subscribe(run2,invalidate));return unsub.unsubscribe? ()=>unsub.unsubscribe():unsub}const subscriber_queue=[];function writable(value,start2=noop$3){let stop=null;const subscribers=new Set;function set2(new_value){if(safe_not_equal(value,new_value)&&(value=new_value,stop)){const run_queue=!subscriber_queue.length;for(const subscriber of subscribers)subscriber[1](),subscriber_queue.push(subscriber,value);if(run_queue){for(let i=0;i{subscribers.delete(subscriber),subscribers.size===0&&stop&&(stop(),stop=null)}}return{set:set2,update:update2,subscribe}}function get$3(store){let value;return subscribe_to_store(store,_=>value=_)(),value}let is_store_binding=!1,IS_UNMOUNTED=Symbol();function store_get(store,store_name,stores2){ const entry=stores2[store_name]??={store:null,source:mutable_source(void 0),unsubscribe:noop$3};if(entry.store!==store&&!(IS_UNMOUNTED in stores2))if(entry.unsubscribe(),entry.store=store??null,store==null)entry.source.v=void 0,entry.unsubscribe=noop$3;else{var is_synchronous_callback=!0;entry.unsubscribe=subscribe_to_store(store,v=>{is_synchronous_callback?entry.source.v=v:set$1(entry.source,v)}),is_synchronous_callback=!1}return store&&IS_UNMOUNTED in stores2?get$3(store):get$4(entry.source)}function setup_stores(){ const stores2={};function cleanup(){teardown(()=>{for(var store_name in stores2)stores2[store_name].unsubscribe();define_property(stores2,IS_UNMOUNTED,{enumerable:!1,value:!0})})}return[stores2,cleanup]}function capture_store_binding(fn){var previous_is_store_binding=is_store_binding;try{return is_store_binding=!1,[fn(),is_store_binding]}finally{is_store_binding=previous_is_store_binding}}const rest_props_handler={get(target2,key2){if(!target2.exclude.includes(key2))return target2.props[key2]},set(target2,key2){ return!1},getOwnPropertyDescriptor(target2,key2){if(!target2.exclude.includes(key2)&&key2 in target2.props)return{enumerable:!0,configurable:!0,value:target2.props[key2]}},has(target2,key2){return target2.exclude.includes(key2)?!1:key2 in target2.props},ownKeys(target2){return Reflect.ownKeys(target2.props).filter(key2=>!target2.exclude.includes(key2))}};function rest_props(props,exclude,name){return new Proxy({props,exclude},rest_props_handler)}const spread_props_handler={get(target2,key2){let i=target2. props.length;for(;i--;){let p2=target2.props[i];if(is_function(p2)&&(p2=p2()),typeof p2=="object"&&p2!==null&&key2 in p2)return p2[key2]}},set(target2,key2,value){let i=target2.props.length;for(;i--;){let p2=target2.props[i];is_function(p2)&&(p2=p2());const desc=get_descriptor(p2,key2);if(desc&&desc.set)return desc.set(value),!0}return!1},getOwnPropertyDescriptor(target2,key2){let i=target2.props.length;for(;i--;){let p2=target2.props[i];if(is_function(p2)&&(p2=p2()),typeof p2=="object"&&p2!==null&& key2 in p2){const descriptor=get_descriptor(p2,key2);return descriptor&&!descriptor.configurable&&(descriptor.configurable=!0),descriptor}}},has(target2,key2){if(key2===STATE_SYMBOL||key2===LEGACY_PROPS)return!1;for(let p2 of target2.props)if(is_function(p2)&&(p2=p2()),p2!=null&&key2 in p2)return!0;return!1},ownKeys(target2){const keys2=[];for(let p2 of target2.props)if(is_function(p2)&&(p2=p2()),!!p2){for(const key2 in p2)keys2.includes(key2)||keys2.push(key2);for(const key2 of Object.getOwnPropertySymbols( p2))keys2.includes(key2)||keys2.push(key2)}return keys2}};function spread_props(...props){return new Proxy({props},spread_props_handler)}function prop(props,key2,flags2,fallback2){var runes=!legacy_mode_flag||(flags2&PROPS_IS_RUNES)!==0,bindable=(flags2&PROPS_IS_BINDABLE)!==0,lazy=(flags2&PROPS_IS_LAZY_INITIAL)!==0,fallback_value=fallback2,fallback_dirty=!0,get_fallback=()=>(fallback_dirty&&(fallback_dirty=!1,fallback_value=lazy?untrack$1(fallback2):fallback2),fallback_value),setter;if(bindable){ var is_entry_props=STATE_SYMBOL in props||LEGACY_PROPS in props;setter=get_descriptor(props,key2)?.set??(is_entry_props&&key2 in props?v=>props[key2]=v:void 0)}var initial_value,is_store_sub=!1;bindable?[initial_value,is_store_sub]=capture_store_binding(()=>props[key2]):initial_value=props[key2],initial_value===void 0&&fallback2!==void 0&&(initial_value=get_fallback(),setter&&(runes&&props_invalid_value(),setter(initial_value)));var getter;if(runes?getter=()=>{var value=props[key2];return value=== void 0?get_fallback():(fallback_dirty=!0,value)}:getter=()=>{var value=props[key2];return value!==void 0&&(fallback_value=void 0),value===void 0?fallback_value:value},runes&&(flags2&PROPS_IS_UPDATED)===0)return getter;if(setter){var legacy_parent=props.$$legacy;return function(value,mutation){return arguments.length>0?((!runes||!mutation||legacy_parent||is_store_sub)&&setter(mutation?getter():value),value):getter()}}var overridden=!1,d2=((flags2&PROPS_IS_IMMUTABLE)!==0?derived:derived_safe_equal)( ()=>(overridden=!1,getter()));bindable&&get$4(d2);var parent_effect=active_effect;return function(value,mutation){if(arguments.length>0){const new_value=mutation?get$4(d2):runes&&bindable?proxy(value):value;return set$1(d2,new_value),overridden=!0,fallback_value!==void 0&&(fallback_value=new_value),value}return is_destroying_effect&&overridden||(parent_effect.f&DESTROYED)!==0?d2.v:get$4(d2)}}function asClassComponent(component2){return class extends Svelte4Component{constructor(options){super({component:component2, ...options})}}}class Svelte4Component{#events;#instance;constructor(options){var sources=new Map,add_source=(key2,value)=>{var s2=mutable_source(value,!1,!1);return sources.set(key2,s2),s2};const props=new Proxy({...options.props||{},$$events:{}},{get(target2,prop2){return get$4(sources.get(prop2)??add_source(prop2,Reflect.get(target2,prop2)))},has(target2,prop2){return prop2===LEGACY_PROPS?!0:(get$4(sources.get(prop2)??add_source(prop2,Reflect.get(target2,prop2))),Reflect.has(target2,prop2))},set(target2,prop2,value){ return set$1(sources.get(prop2)??add_source(prop2,value),value),Reflect.set(target2,prop2,value)}});this.#instance=(options.hydrate?hydrate:mount)(options.component,{target:options.target,anchor:options.anchor,props,context:options.context,intro:options.intro??!1,recover:options.recover}),(!options?.props?.$$host||options.sync===!1)&&flushSync(),this.#events=props.$$events;for(const key2 of Object.keys(this.#instance))key2==="$set"||key2==="$destroy"||key2==="$on"||define_property(this,key2,{get(){ return this.#instance[key2]},set(value){this.#instance[key2]=value},enumerable:!0});this.#instance.$set=next2=>{Object.assign(props,next2)},this.#instance.$destroy=()=>{unmount(this.#instance)}}$set(props){this.#instance.$set(props)}$on(event2,callback){this.#events[event2]=this.#events[event2]||[];const cb=(...args)=>callback.call(this,...args);return this.#events[event2].push(cb),()=>{this.#events[event2]=this.#events[event2].filter(fn=>fn!==cb)}}$destroy(){this.#instance.$destroy()}}function hydratable(key2,fn){ if(experimental_async_required(),hydrating){const store=window.__svelte?.h;if(store?.has(key2))return store.get(key2);hydratable_missing_but_expected()}return fn()}function getAbortSignal(){return active_reaction===null&&get_abort_signal_outside_reaction(),(active_reaction.ac??=new AbortController).signal}function onMount$1(fn){component_context===null&&lifecycle_outside_component(),legacy_mode_flag&&component_context.l!==null?init_update_callbacks(component_context).m.push(fn):user_effect(()=>{ const cleanup=untrack$1(fn);if(typeof cleanup=="function")return cleanup})}function onDestroy(fn){component_context===null&&lifecycle_outside_component(),onMount$1(()=>()=>untrack$1(fn))}function create_custom_event(type2,detail,{bubbles=!1,cancelable=!1}={}){return new CustomEvent(type2,{detail,bubbles,cancelable})}function createEventDispatcher(){const active_component_context=component_context;return active_component_context===null&&lifecycle_outside_component(),(type2,detail,options)=>{const events=active_component_context. s.$$events?.[type2];if(events){const callbacks=is_array(events)?events.slice():[events],event2=create_custom_event(type2,detail,options);for(const fn of callbacks)fn.call(active_component_context.x,event2);return!event2.defaultPrevented}return!0}}function beforeUpdate(fn){component_context===null&&lifecycle_outside_component(),component_context.l===null&&lifecycle_legacy_only(),init_update_callbacks(component_context).b.push(fn)}function afterUpdate(fn){component_context===null&&lifecycle_outside_component(), component_context.l===null&&lifecycle_legacy_only(),init_update_callbacks(component_context).a.push(fn)}function init_update_callbacks(context){var l=context.l;return l.u??={a:[],b:[],m:[]}}const svelte=Object.freeze(Object.defineProperty({__proto__:null,afterUpdate,beforeUpdate,createContext,createEventDispatcher,createRawSnippet,flushSync,fork,getAbortSignal,getAllContexts,getContext,hasContext,hydratable,hydrate,mount,onDestroy,onMount:onMount$1,setContext,settled,tick,unmount,untrack:untrack$1}, Symbol.toStringTag,{value:"Module"}));class HttpError{constructor(status,body2){this.status=status,typeof body2=="string"?this.body={message:body2}:body2?this.body=body2:this.body={message:`Error: ${status}`}}toString(){return JSON.stringify(this.body)}}class Redirect{constructor(status,location2){this.status=status,this.location=location2}}class SvelteKitError extends Error{constructor(status,text2,message){super(message),this.status=status,this.text=text2}}new URL("sveltekit-internal://");function normalize_path(path2,trailing_slash){ return path2==="/"||trailing_slash==="ignore"?path2:trailing_slash==="never"?path2.endsWith("/")?path2.slice(0,-1):path2:trailing_slash==="always"&&!path2.endsWith("/")?path2+"/":path2}function decode_pathname(pathname){return pathname.split("%25").map(decodeURI).join("%25")}function decode_params(params){for(const key2 in params)params[key2]=decodeURIComponent(params[key2]);return params}function strip_hash({href}){return href.split("#")[0]}function make_trackable(url2,callback,search_params_callback,allow_hash=!1){ const tracked=new URL(url2);Object.defineProperty(tracked,"searchParams",{value:new Proxy(tracked.searchParams,{get(obj,key2){if(key2==="get"||key2==="getAll"||key2==="has")return(param,...rest)=>(search_params_callback(param),obj[key2](param,...rest));callback();const value=Reflect.get(obj,key2);return typeof value=="function"?value.bind(obj):value}}),enumerable:!0,configurable:!0});const tracked_url_properties=["href","pathname","search","toString","toJSON"];allow_hash&&tracked_url_properties. push("hash");for(const property of tracked_url_properties)Object.defineProperty(tracked,property,{get(){return callback(),url2[property]},enumerable:!0,configurable:!0});return tracked}function hash$1(...values){let hash2=5381;for(const value of values)if(typeof value=="string"){let i=value.length;for(;i;)hash2=hash2*33^value.charCodeAt(--i)}else if(ArrayBuffer.isView(value)){const buffer=new Uint8Array(value.buffer,value.byteOffset,value.byteLength);let i=buffer.length;for(;i;)hash2=hash2*33^buffer[--i]}else throw new TypeError("value must be a string or TypedArray");return(hash2>>>0).toString(36)}new TextEncoder;new TextDecoder;function base64_decode(encoded){const binary=atob(encoded),bytes=new Uint8Array(binary.length);for(let i=0;i((input instanceof Request?input.method:init2?.method||"GET")!=="GET"&&cache.delete(build_selector(input)),native_fetch(input,init2));const cache=new Map; function initial_fetch(resource,opts){const selector=build_selector(resource,opts),script=document.querySelector(selector);if(script?.textContent){script.remove();let{body:body2,...init2}=JSON.parse(script.textContent);const ttl=script.getAttribute("data-ttl");return ttl&&cache.set(selector,{body:body2,init:init2,ttl:1e3*Number(ttl)}),script.getAttribute("data-b64")!==null&&(body2=base64_decode(body2)),Promise.resolve(new Response(body2,init2))}return window.fetch(resource,opts)}function subsequent_fetch(resource,resolved,opts){ if(cache.size>0){const selector=build_selector(resource,opts),cached2=cache.get(selector);if(cached2){if(performance.now(){const rest_match=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(segment); if(rest_match)return params.push({name:rest_match[1],matcher:rest_match[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const optional_match=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(segment);if(optional_match)return params.push({name:optional_match[1],matcher:optional_match[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!segment)return;const parts=segment.split(/\[(.+?)\](?!\])/);return"/"+parts.map((content2,i)=>{if(i%2){if(content2.startsWith("x+"))return escape$3(String.fromCharCode(parseInt( content2.slice(2),16)));if(content2.startsWith("u+"))return escape$3(String.fromCharCode(...content2.slice(2).split("-").map(code2=>parseInt(code2,16))));const match=param_pattern.exec(content2),[,is_optional,is_rest,name,matcher]=match;return params.push({name,matcher,optional:!!is_optional,rest:!!is_rest,chained:is_rest?i===1&&parts[0]==="":!1}),is_rest?"([^]*?)":is_optional?"([^/]*)?":"([^/]+?)"}return escape$3(content2)}).join("")}).join("")}/?$`),params}}function affects_path(segment){return segment!== ""&&!/^\([^)]+\)$/.test(segment)}function get_route_segments(route){return route.slice(1).split("/").filter(affects_path)}function exec(match,params,matchers2){const result={},values=match.slice(1),values_needing_match=values.filter(value=>value!==void 0);let buffered=0;for(let i=0;is2).join("/"),buffered=0),value===void 0)if(param.rest)value= "";else continue;if(!param.matcher||matchers2[param.matcher](value)){result[param.name]=value;const next_param=params[i+1],next_value=values[i+1];next_param&&!next_param.rest&&next_param.optional&&next_value&¶m.chained&&(buffered=0),!next_param&&!next_value&&Object.keys(result).length===values_needing_match.length&&(buffered=0);continue}if(param.optional&¶m.chained){buffered++;continue}return}if(!buffered)return result}function escape$3(str){return str.normalize().replace(/[[\]]/g,"\\$&"). replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function parse$5({nodes:nodes2,server_loads:server_loads2,dictionary:dictionary2,matchers:matchers2}){const layouts_with_server_load=new Set(server_loads2);return Object.entries(dictionary2).map(([id2,[leaf2,layouts,errors2]])=>{const{pattern:pattern2,params}=parse_route_id(id2),route={id:id2,exec:path2=>{const match=pattern2.exec(path2);if(match)return exec(match,params,matchers2)}, errors:[1,...errors2||[]].map(n=>nodes2[n]),layouts:[0,...layouts||[]].map(create_layout_loader),leaf:create_leaf_loader(leaf2)};return route.errors.length=route.layouts.length=Math.max(route.errors.length,route.layouts.length),route});function create_leaf_loader(id2){const uses_server_data=id2<0;return uses_server_data&&(id2=~id2),[uses_server_data,nodes2[id2]]}function create_layout_loader(id2){return id2===void 0?id2:[layouts_with_server_load.has(id2),nodes2[id2]]}}function get$2(key2,parse2=JSON. parse){try{return parse2(sessionStorage[key2])}catch{}}function set(key2,value,stringify2=JSON.stringify){const data=stringify2(value);try{sessionStorage[key2]=data}catch{}}const base=globalThis.__sveltekit__?.base??"",assets=globalThis.__sveltekit__?.assets??base??"",version$3="llama-server-webui",SNAPSHOT_KEY="sveltekit:snapshot",SCROLL_KEY="sveltekit:scroll",STATES_KEY="sveltekit:states",PAGE_URL_KEY="sveltekit:pageurl",HISTORY_INDEX="sveltekit:history",NAVIGATION_INDEX="sveltekit:n\ avigation",PRELOAD_PRIORITIES={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},origin=location.origin;function resolve_url(url2){if(url2 instanceof URL)return url2;let baseURI=document.baseURI;if(!baseURI){const baseTags=document.getElementsByTagName("base");baseURI=baseTags.length?baseTags[0].href:document.URL}return new URL(url2,baseURI)}function scroll_state(){return{x:pageXOffset,y:pageYOffset}}function link_option(element2,name){return element2.getAttribute(`data-sveltekit-${name}`)}const levels={ ...PRELOAD_PRIORITIES,"":PRELOAD_PRIORITIES.hover};function parent_element(element2){let parent=element2.assignedSlot??element2.parentNode;return parent?.nodeType===11&&(parent=parent.host),parent}function find_anchor(element2,target2){for(;element2&&element2!==target2;){if(element2.nodeName.toUpperCase()==="A"&&element2.hasAttribute("href"))return element2;element2=parent_element(element2)}}function get_link_info(a,base2,uses_hash_router){let url2;try{if(url2=new URL(a instanceof SVGAElement?a. href.baseVal:a.href,document.baseURI),uses_hash_router&&url2.hash.match(/^#[^/]/)){const route=location.hash.split("#")[1]||"/";url2.hash=`#${route}${url2.hash}`}}catch{}const target2=a instanceof SVGAElement?a.target.baseVal:a.target,external=!url2||!!target2||is_external_url(url2,base2,uses_hash_router)||(a.getAttribute("rel")||"").split(/\s+/).includes("external"),download=url2?.origin===origin&&a.hasAttribute("download");return{url:url2,external,target:target2,download}}function get_router_options(element2){ let keepfocus=null,noscroll=null,preload_code=null,preload_data=null,reload=null,replace_state=null,el=element2;for(;el&&el!==document.documentElement;)preload_code===null&&(preload_code=link_option(el,"preload-code")),preload_data===null&&(preload_data=link_option(el,"preload-data")),keepfocus===null&&(keepfocus=link_option(el,"keepfocus")),noscroll===null&&(noscroll=link_option(el,"noscroll")),reload===null&&(reload=link_option(el,"reload")),replace_state===null&&(replace_state=link_option(el, "replacestate")),el=parent_element(el);function get_option_state(value){switch(value){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:levels[preload_code??"off"],preload_data:levels[preload_data??"off"],keepfocus:get_option_state(keepfocus),noscroll:get_option_state(noscroll),reload:get_option_state(reload),replace_state:get_option_state(replace_state)}}function notifiable_store(value){const store=writable(value);let ready=!0;function notify(){ready= !0,store.update(val=>val)}function set2(new_value){ready=!1,store.set(new_value)}function subscribe(run2){let old_value;return store.subscribe(new_value=>{(old_value===void 0||ready&&new_value!==old_value)&&run2(old_value=new_value)})}return{notify,set:set2,subscribe}}const updated_listener={v:()=>{}};function create_updated_store(){const{set:set2,subscribe}=writable(!1);let timeout;async function check(){clearTimeout(timeout);try{const res=await fetch(`${assets}/_app/version.json`,{headers:{pragma:"\ no-cache","cache-control":"no-cache"}});if(!res.ok)return!1;const updated2=(await res.json()).version!==version$3;return updated2&&(set2(!0),updated_listener.v(),clearTimeout(timeout)),updated2}catch{return!1}}return{subscribe,check}}function is_external_url(url2,base2,hash_routing){return url2.origin!==origin||!url2.pathname.startsWith(base2)?!0:hash_routing?url2.pathname!==location.pathname:!1}const valid_layout_exports=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...valid_layout_exports]; const valid_layout_server_exports=new Set([...valid_layout_exports]);[...valid_layout_server_exports];function compact(arr){return arr.filter(val=>val!=null)}function get_status(error2){return error2 instanceof HttpError||error2 instanceof SvelteKitError?error2.status:500}function get_message(error2){return error2 instanceof SvelteKitError?error2.text:"Internal Error"}let page$3,navigating,updated;const is_legacy=onMount$1.toString().includes("$$")||/function \w+\(\) \{\}/.test(onMount$1.toString()); is_legacy?(page$3={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},navigating={current:null},updated={current:!1}):(page$3=new class{#data=state$1({});get data(){return get$4(this.#data)}set data(value){set$1(this.#data,value)}#form=state$1(null);get form(){return get$4(this.#form)}set form(value){set$1(this.#form,value)}#error=state$1(null);get error(){return get$4(this.#error)}set error(value){set$1(this.#error,value)}#params=state$1( {});get params(){return get$4(this.#params)}set params(value){set$1(this.#params,value)}#route=state$1({id:null});get route(){return get$4(this.#route)}set route(value){set$1(this.#route,value)}#state=state$1({});get state(){return get$4(this.#state)}set state(value){set$1(this.#state,value)}#status=state$1(-1);get status(){return get$4(this.#status)}set status(value){set$1(this.#status,value)}#url=state$1(new URL("https://example.com"));get url(){return get$4(this.#url)}set url(value){set$1(this.#url, value)}},navigating=new class{#current=state$1(null);get current(){return get$4(this.#current)}set current(value){set$1(this.#current,value)}},updated=new class{#current=state$1(!1);get current(){return get$4(this.#current)}set current(value){set$1(this.#current,value)}},updated_listener.v=()=>updated.current=!0);function update(new_page){Object.assign(page$3,new_page)}const noop_span={spanContext(){return noop_span_context},setAttribute(){return this},setAttributes(){return this},addEvent(){return this}, setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},noop_span_context={traceId:"",spanId:"",traceFlags:0},{onMount}=svelte,untrack=untrack$1??(value=>value()),ICON_REL_ATTRIBUTES=new Set(["icon","shortcut icon","apple-touch-icon"]),scroll_positions=get$2(SCROLL_KEY)??{},snapshots=get$2(SNAPSHOT_KEY)??{},stores={url:notifiable_store({}),page:notifiable_store({}),navigating:writable( null),updated:create_updated_store()};function update_scroll_positions(index2){scroll_positions[index2]=scroll_state()}function clear_onward_history(current_history_index2,current_navigation_index2){let i=current_history_index2+1;for(;scroll_positions[i];)delete scroll_positions[i],i+=1;for(i=current_navigation_index2+1;snapshots[i];)delete snapshots[i],i+=1}function native_navigation(url2,replace2=!1){return replace2?location.replace(url2.href):location.href=url2.href,new Promise(()=>{})}async function update_service_worker(){ if("serviceWorker"in navigator){const registration=await navigator.serviceWorker.getRegistration(base||"/");registration&&await registration.update()}}function noop$2(){}let routes,default_layout_loader,default_error_loader,container,target,app$1;const invalidated=[],components=[];let load_cache=null;function discard_load_cache(){load_cache?.fork?.then(f=>f?.discard()),load_cache=null}const reroute_cache=new Map,before_navigate_callbacks=new Set,on_navigate_callbacks=new Set,after_navigate_callbacks=new Set; let current={branch:[],error:null,url:null},hydrated=!1,started=!1,autoscroll=!0,is_navigating=!1,hash_navigating=!1,has_navigated=!1,force_invalidation=!1,root$1O,current_history_index,current_navigation_index,token;const preload_tokens=new Set,query_map=new Map;async function start$1(_app,_target,hydrate2){globalThis.__sveltekit__?.data&&globalThis.__sveltekit__.data,document.URL!==location.href&&(location.href=location.href),app$1=_app,await _app.hooks.init?.(),routes=parse$5(_app), container=document.documentElement,target=_target,default_layout_loader=_app.nodes[0],default_error_loader=_app.nodes[1],default_layout_loader(),default_error_loader(),current_history_index=history.state?.[HISTORY_INDEX],current_navigation_index=history.state?.[NAVIGATION_INDEX],current_history_index||(current_history_index=current_navigation_index=Date.now(),history.replaceState({...history.state,[HISTORY_INDEX]:current_history_index,[NAVIGATION_INDEX]:current_navigation_index},""));const scroll=scroll_positions[current_history_index]; function restore_scroll(){scroll&&(history.scrollRestoration="manual",scrollTo(scroll.x,scroll.y))}hydrate2?(restore_scroll(),await _hydrate(target,hydrate2)):(await navigate({type:"enter",url:resolve_url(app$1.hash?decode_hash(new URL(location.href)):location.href),replace_state:!0}),restore_scroll()),_start_router()}function reset_invalidation(){invalidated.length=0,force_invalidation=!1}function capture_snapshot(index2){components.some(c2=>c2?.snapshot)&&(snapshots[index2]=components.map(c2=>c2?. snapshot?.capture()))}function restore_snapshot(index2){snapshots[index2]?.forEach((value,i)=>{components[i]?.snapshot?.restore(value)})}function persist_state(){update_scroll_positions(current_history_index),set(SCROLL_KEY,scroll_positions),capture_snapshot(current_navigation_index),set(SNAPSHOT_KEY,snapshots)}async function _goto(url2,options,redirect_count,nav_token){let query_keys;options.invalidateAll&&discard_load_cache(),await navigate({type:"goto",url:resolve_url(url2),keepfocus:options. keepFocus,noscroll:options.noScroll,replace_state:options.replaceState,state:options.state,redirect_count,nav_token,accept:()=>{options.invalidateAll&&(force_invalidation=!0,query_keys=[...query_map.keys()]),options.invalidate&&options.invalidate.forEach(push_invalidated)}}),options.invalidateAll&&tick().then(tick).then(()=>{query_map.forEach(({resource},key2)=>{query_keys?.includes(key2)&&resource.refresh?.()})})}async function _preload_data(intent){if(intent.id!==load_cache?.id){discard_load_cache(); const preload2={};preload_tokens.add(preload2),load_cache={id:intent.id,token:preload2,promise:load_route({...intent,preload:preload2}).then(result=>(preload_tokens.delete(preload2),result.type==="loaded"&&result.state.error&&discard_load_cache(),result)),fork:null}}return load_cache.promise}async function _preload_code(url2){const route=(await get_navigation_intent(url2,!1))?.route;route&&await Promise.all([...route.layouts,route.leaf].map(load2=>load2?.[1]()))}async function initialize(result,target2,hydrate2){ current=result.state;const style2=document.querySelector("style[data-sveltekit]");if(style2&&style2.remove(),Object.assign(page$3,result.props.page),root$1O=new app$1.root({target:target2,props:{...result.props,stores,components},hydrate:hydrate2,sync:!1}),await Promise.resolve(),restore_snapshot(current_navigation_index),hydrate2){const navigation={from:null,to:{params:current.params,route:{id:current.route?.id??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()}; after_navigate_callbacks.forEach(fn=>fn(navigation))}started=!0}function get_navigation_result_from_branch({url:url2,params,branch:branch2,status,error:error2,route,form}){let slash="never";if(base&&(url2.pathname===base||url2.pathname===base+"/"))slash="always";else for(const node2 of branch2)node2?.slash!==void 0&&(slash=node2.slash);url2.pathname=normalize_path(url2.pathname,slash),url2.search=url2.search;const result={type:"loaded",state:{url:url2,params,branch:branch2,error:error2,route},props:{ constructors:compact(branch2).map(branch_node=>branch_node.node.component),page:clone_page(page$3)}};form!==void 0&&(result.props.form=form);let data={},data_changed=!page$3,p2=0;for(let i=0;i(is_tracking&&(uses.route=!0),target2[key2])}),params:new Proxy(params,{get:(target2,key2)=>(is_tracking&&uses.params.add(key2),target2[key2])}),data:server_data_node?.data??null,url:make_trackable(url2,()=>{is_tracking&&(uses.url=!0)},param=>{is_tracking&&uses.search_params.add(param)},app$1.hash),async fetch(resource,init2){ resource instanceof Request&&(init2={body:resource.method==="GET"||resource.method==="HEAD"?void 0:await resource.blob(),cache:resource.cache,credentials:resource.credentials,headers:[...resource.headers].length>0?resource?.headers:void 0,integrity:resource.integrity,keepalive:resource.keepalive,method:resource.method,mode:resource.mode,redirect:resource.redirect,referrer:resource.referrer,referrerPolicy:resource.referrerPolicy,signal:resource.signal,...init2});const{resolved,promise}=resolve_fetch_url( resource,init2,url2);return is_tracking&&depends(resolved.href),promise},setHeaders:()=>{},depends,parent(){return is_tracking&&(uses.parent=!0),parent()},untrack(fn){is_tracking=!1;try{return fn()}finally{is_tracking=!0}}};data=await node2.universal.load.call(null,load_input)??null}return{node:node2,loader,server:server_data_node,universal:node2.universal?.load?{type:"data",data,uses}:null,data:data??server_data_node?.data??null,slash:node2.universal?.trailingSlash??server_data_node?.slash}}function resolve_fetch_url(input,init2,url2){ let requested=input instanceof Request?input.url:input;const resolved=new URL(requested,url2);resolved.origin===url2.origin&&(requested=resolved.href.slice(url2.origin.length));const promise=started?subsequent_fetch(requested,resolved.href,init2):initial_fetch(requested,init2);return{resolved,promise}}function has_changed(parent_changed,route_changed,url_changed,search_params_changed,uses,params){if(force_invalidation)return!0;if(!uses)return!1;if(uses.parent&&parent_changed||uses.route&&route_changed|| uses.url&&url_changed)return!0;for(const tracked_params of uses.search_params)if(search_params_changed.has(tracked_params))return!0;for(const param of uses.params)if(params[param]!==current.params[param])return!0;for(const href of uses.dependencies)if(invalidated.some(fn=>fn(new URL(href))))return!0;return!1}function create_data_node(node2,previous2){return node2?.type==="data"?node2:node2?.type==="skip"?previous2??null:null}function diff_search_params(old_url,new_url){if(!old_url)return new Set( new_url.searchParams.keys());const changed=new Set([...old_url.searchParams.keys(),...new_url.searchParams.keys()]);for(const key2 of changed){const old_values2=old_url.searchParams.getAll(key2),new_values=new_url.searchParams.getAll(key2);old_values2.every(value=>new_values.includes(value))&&new_values.every(value=>old_values2.includes(value))&&changed.delete(key2)}return changed}function preload_error({error:error2,url:url2,route,params}){return{type:"loaded",state:{error:error2,url:url2,route, params,branch:[]},props:{page:clone_page(page$3),constructors:[]}}}async function load_route({id:id2,invalidating,url:url2,params,route,preload:preload2}){if(load_cache?.id===id2)return preload_tokens.delete(load_cache.token),load_cache.promise;const{errors:errors2,layouts,leaf:leaf2}=route,loaders=[...layouts,leaf2];errors2.forEach(loader=>loader?.().catch(()=>{})),loaders.forEach(loader=>loader?.[1]().catch(()=>{}));const url_changed=current.url?id2!==get_page_key(current.url):!1,route_changed=current. route?route.id!==current.route.id:!1,search_params_changed=diff_search_params(current.url,url2);let parent_changed=!1;const branch_promises=loaders.map(async(loader,i)=>{if(!loader)return;const previous2=current.branch[i];return loader[1]===previous2?.loader&&!has_changed(parent_changed,route_changed,url_changed,search_params_changed,previous2.universal?.uses,params)?previous2:(parent_changed=!0,load_node({loader:loader[1],url:url2,params,route,parent:async()=>{const data={};for(let j=0;j{});const branch2=[];for(let i=0;iPromise.resolve({}),server_data_node:create_data_node(server_data_node)}),root_error={node:await default_error_loader(),loader:default_error_loader,universal:null,server:null,data:null};return get_navigation_result_from_branch({url:url2,params,branch:[root_layout,root_error],status,error:error2,route:null})}catch(error22){ if(error22 instanceof Redirect)return _goto(new URL(error22.location,location.href),{},0);throw error22}}async function get_rerouted_url(url2){const href=url2.href;if(reroute_cache.has(href))return reroute_cache.get(href);let rerouted;try{const promise=(async()=>{let rerouted2=await app$1.hooks.reroute({url:new URL(url2),fetch:async(input,init2)=>resolve_fetch_url(input,init2,url2).promise})??url2;if(typeof rerouted2=="string"){const tmp=new URL(url2);app$1.hash?tmp.hash=rerouted2:tmp.pathname=rerouted2, rerouted2=tmp}return rerouted2})();reroute_cache.set(href,promise),rerouted=await promise}catch{reroute_cache.delete(href);return}return rerouted}async function get_navigation_intent(url2,invalidating){if(url2&&!is_external_url(url2,base,app$1.hash)){const rerouted=await get_rerouted_url(url2);if(!rerouted)return;const path2=get_url_path(rerouted);for(const route of routes){const params=route.exec(path2);if(params)return{id:get_page_key(url2),invalidating,route,params:decode_params(params),url:url2}}}} function get_url_path(url2){return decode_pathname(app$1.hash?url2.hash.replace(/^#/,"").replace(/[?#].+/,""):url2.pathname.slice(base.length))||"/"}function get_page_key(url2){return(app$1.hash?url2.hash.replace(/^#/,""):url2.pathname)+url2.search}function _before_navigate({url:url2,type:type2,intent,delta,event:event2}){let should_block=!1;const nav=create_navigation(current,intent,url2,type2);delta!==void 0&&(nav.navigation.delta=delta),event2!==void 0&&(nav.navigation.event=event2);const cancellable={ ...nav.navigation,cancel:()=>{should_block=!0,nav.reject(new Error("navigation cancelled"))}};return is_navigating||before_navigate_callbacks.forEach(fn=>fn(cancellable)),should_block?null:nav}async function navigate({type:type2,url:url2,popped,keepfocus,noscroll,replace_state,state:state2={},redirect_count=0,nav_token={},accept=noop$2,block:block2=noop$2,event:event2}){const prev_token=token;token=nav_token;const intent=await get_navigation_intent(url2,!1),nav=type2==="enter"?create_navigation( current,intent,url2,type2):_before_navigate({url:url2,type:type2,delta:popped?.delta,intent,event:event2});if(!nav){block2(),token===nav_token&&(token=prev_token);return}const previous_history_index=current_history_index,previous_navigation_index=current_navigation_index;accept(),is_navigating=!0,started&&nav.navigation.type!=="enter"&&stores.navigating.set(navigating.current=nav.navigation);let navigation_result=intent&&await load_route(intent);if(!navigation_result){if(is_external_url(url2,base, app$1.hash))return await native_navigation(url2,replace_state);navigation_result=await server_fallback(url2,{id:null},await handle_error(new SvelteKitError(404,"Not Found",`Not found: ${url2.pathname}`),{url:url2,params:{},route:{id:null}}),404,replace_state)}if(url2=intent?.url||url2,token!==nav_token)return nav.reject(new Error("navigation aborted")),!1;if(navigation_result.type==="redirect"){if(redirect_count<20){await navigate({type:type2,url:new URL(navigation_result.location,url2),popped,keepfocus, noscroll,replace_state,state:state2,redirect_count:redirect_count+1,nav_token}),nav.fulfil(void 0);return}navigation_result=await load_root_error_page({status:500,error:await handle_error(new Error("Redirect loop"),{url:url2,params:{},route:{id:null}}),url:url2,route:{id:null}})}else navigation_result.props.page.status>=400&&await stores.updated.check()&&(await update_service_worker(),await native_navigation(url2,replace_state));if(reset_invalidation(),update_scroll_positions(previous_history_index), capture_snapshot(previous_navigation_index),navigation_result.props.page.url.pathname!==url2.pathname&&(url2.pathname=navigation_result.props.page.url.pathname),state2=popped?popped.state:state2,!popped){const change=replace_state?0:1,entry={[HISTORY_INDEX]:current_history_index+=change,[NAVIGATION_INDEX]:current_navigation_index+=change,[STATES_KEY]:state2};(replace_state?history.replaceState:history.pushState).call(history,entry,"",url2),replace_state||clear_onward_history(current_history_index, current_navigation_index)}const load_cache_fork=intent&&load_cache?.id===intent.id?load_cache.fork:null;load_cache=null,navigation_result.props.page.state=state2;let commit_promise;if(started){const after_navigate=(await Promise.all(Array.from(on_navigate_callbacks,fn=>fn(nav.navigation)))).filter(value=>typeof value=="function");if(after_navigate.length>0){let cleanup=function(){after_navigate.forEach(fn=>{after_navigate_callbacks.delete(fn)})};after_navigate.push(cleanup),after_navigate.forEach( fn=>{after_navigate_callbacks.add(fn)})}current=navigation_result.state,navigation_result.props.page&&(navigation_result.props.page.url=url2);const fork2=load_cache_fork&&await load_cache_fork;fork2?commit_promise=fork2.commit():(root$1O.$set(navigation_result.props),update(navigation_result.props.page),commit_promise=settled?.()),has_navigated=!0}else await initialize(navigation_result,target,!1);const{activeElement}=document;await commit_promise,await tick(),await tick();let scroll=popped?popped. scroll:noscroll?scroll_state():null;if(autoscroll){const deep_linked=url2.hash&&document.getElementById(get_id(url2));if(scroll)scrollTo(scroll.x,scroll.y);else if(deep_linked){deep_linked.scrollIntoView();const{top,left}=deep_linked.getBoundingClientRect();scroll={x:pageXOffset+left,y:pageYOffset+top}}else scrollTo(0,0)}const changed_focus=document.activeElement!==activeElement&&document.activeElement!==document.body;!keepfocus&&!changed_focus&&reset_focus(url2,scroll),autoscroll=!0,navigation_result. props.page&&Object.assign(page$3,navigation_result.props.page),is_navigating=!1,type2==="popstate"&&restore_snapshot(current_navigation_index),nav.fulfil(void 0),after_navigate_callbacks.forEach(fn=>fn(nav.navigation)),stores.navigating.set(navigating.current=null)}async function server_fallback(url2,route,error2,status,replace_state){return url2.origin===origin&&url2.pathname===location.pathname&&!hydrated?await load_root_error_page({status,error:error2,url:url2,route}):await native_navigation( url2,replace_state)}function setup_preload(){let mousemove_timeout,current_a={element:void 0,href:void 0},current_priority;container.addEventListener("mousemove",event2=>{const target2=event2.target;clearTimeout(mousemove_timeout),mousemove_timeout=setTimeout(()=>{preload2(target2,PRELOAD_PRIORITIES.hover)},20)});function tap2(event2){event2.defaultPrevented||preload2(event2.composedPath()[0],PRELOAD_PRIORITIES.tap)}container.addEventListener("mousedown",tap2),container.addEventListener("touchst\ art",tap2,{passive:!0});const observer=new IntersectionObserver(entries=>{for(const entry of entries)entry.isIntersecting&&(_preload_code(new URL(entry.target.href)),observer.unobserve(entry.target))},{threshold:0});async function preload2(element2,priority){const a=find_anchor(element2,container),interacted=a===current_a.element&&a?.href===current_a.href&&priority>=current_priority;if(!a||interacted)return;const{url:url2,external,download}=get_link_info(a,base,app$1.hash);if(external||download) return;const options=get_router_options(a),same_url=url2&&get_page_key(current.url)===get_page_key(url2);if(!(options.reload||same_url))if(priority<=options.preload_data){current_a={element:a,href:a.href},current_priority=PRELOAD_PRIORITIES.tap;const intent=await get_navigation_intent(url2,!1);if(!intent)return;_preload_data(intent)}else priority<=options.preload_code&&(current_a={element:a,href:a.href},current_priority=priority,_preload_code(url2))}function after_navigate(){observer.disconnect(); for(const a of container.querySelectorAll("a")){const{url:url2,external,download}=get_link_info(a,base,app$1.hash);if(external||download)continue;const options=get_router_options(a);options.reload||(options.preload_code===PRELOAD_PRIORITIES.viewport&&observer.observe(a),options.preload_code===PRELOAD_PRIORITIES.eager&&_preload_code(url2))}}after_navigate_callbacks.add(after_navigate),after_navigate()}function handle_error(error2,event2){if(error2 instanceof HttpError)return error2.body;const status=get_status( error2),message=get_message(error2);return app$1.hooks.handleError({error:error2,event:event2,status,message})??{message}}function add_navigation_callback(callbacks,callback){onMount(()=>(callbacks.add(callback),()=>{callbacks.delete(callback)}))}function afterNavigate(callback){add_navigation_callback(after_navigate_callbacks,callback)}function goto(url2,opts={}){return url2=new URL(resolve_url(url2)),url2.origin!==origin?Promise.reject(new Error("goto: invalid URL")):_goto(url2,opts,0)}function push_invalidated(resource){ if(typeof resource=="function")invalidated.push(resource);else{const{href}=new URL(resource,location.href);invalidated.push(url2=>url2.href===href)}}function replaceState(url2,state2){const opts={[HISTORY_INDEX]:current_history_index,[NAVIGATION_INDEX]:current_navigation_index,[PAGE_URL_KEY]:page$3.url.href,[STATES_KEY]:state2};history.replaceState(opts,"",resolve_url(url2)),page$3.state=state2,root$1O.$set({page:untrack(()=>clone_page(page$3))})}function _start_router(){history.scrollRestoration= "manual",addEventListener("beforeunload",e=>{let should_block=!1;if(persist_state(),!is_navigating){const nav=create_navigation(current,void 0,null,"leave"),navigation={...nav.navigation,cancel:()=>{should_block=!0,nav.reject(new Error("navigation cancelled"))}};before_navigate_callbacks.forEach(fn=>fn(navigation))}should_block?(e.preventDefault(),e.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&persist_state()}),navigator. connection?.saveData||setup_preload(),container.addEventListener("click",async event2=>{if(event2.button||event2.which!==1||event2.metaKey||event2.ctrlKey||event2.shiftKey||event2.altKey||event2.defaultPrevented)return;const a=find_anchor(event2.composedPath()[0],container);if(!a)return;const{url:url2,external,target:target2,download}=get_link_info(a,base,app$1.hash);if(!url2)return;if(target2==="_parent"||target2==="_top"){if(window.parent!==window)return}else if(target2&&target2!=="_self")return; const options=get_router_options(a);if(!(a instanceof SVGAElement)&&url2.protocol!==location.protocol&&!(url2.protocol==="https:"||url2.protocol==="http:")||download)return;const[nonhash,hash2]=(app$1.hash?url2.hash.replace(/^#/,""):url2.href).split("#"),same_pathname=nonhash===strip_hash(location);if(external||options.reload&&(!same_pathname||!hash2)){_before_navigate({url:url2,type:"link",event:event2})?is_navigating=!0:event2.preventDefault();return}if(hash2!==void 0&&same_pathname){const[,current_hash]=current. url.href.split("#");if(current_hash===hash2){if(event2.preventDefault(),hash2===""||hash2==="top"&&a.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const element2=a.ownerDocument.getElementById(decodeURIComponent(hash2));element2&&(element2.scrollIntoView(),element2.focus())}return}if(hash_navigating=!0,update_scroll_positions(current_history_index),update_url(url2),!options.replace_state)return;hash_navigating=!1}event2.preventDefault(),await new Promise(fulfil=>{requestAnimationFrame( ()=>{setTimeout(fulfil,0)}),setTimeout(fulfil,100)}),await navigate({type:"link",url:url2,keepfocus:options.keepfocus,noscroll:options.noscroll,replace_state:options.replace_state??url2.href===location.href,event:event2})}),container.addEventListener("submit",event2=>{if(event2.defaultPrevented)return;const form=HTMLFormElement.prototype.cloneNode.call(event2.target),submitter=event2.submitter;if((submitter?.formTarget||form.target)==="_blank"||(submitter?.formMethod||form.method)!=="get")return; const url2=new URL(submitter?.hasAttribute("formaction")&&submitter?.formAction||form.action);if(is_external_url(url2,base,!1))return;const event_form=event2.target,options=get_router_options(event_form);if(options.reload)return;event2.preventDefault(),event2.stopPropagation();const data=new FormData(event_form,submitter);url2.search=new URLSearchParams(data).toString(),navigate({type:"form",url:url2,keepfocus:options.keepfocus,noscroll:options.noscroll,replace_state:options.replace_state??url2. href===location.href,event:event2})}),addEventListener("popstate",async event2=>{if(!resetting_focus){if(event2.state?.[HISTORY_INDEX]){const history_index=event2.state[HISTORY_INDEX];if(token={},history_index===current_history_index)return;const scroll=scroll_positions[history_index],state2=event2.state[STATES_KEY]??{},url2=new URL(event2.state[PAGE_URL_KEY]??location.href),navigation_index=event2.state[NAVIGATION_INDEX],is_hash_change=current.url?strip_hash(location)===strip_hash(current.url): !1;if(navigation_index===current_navigation_index&&(has_navigated||is_hash_change)){state2!==page$3.state&&(page$3.state=state2),update_url(url2),scroll_positions[current_history_index]=scroll_state(),scroll&&scrollTo(scroll.x,scroll.y),current_history_index=history_index;return}const delta=history_index-current_history_index;await navigate({type:"popstate",url:url2,popped:{state:state2,scroll,delta},accept:()=>{current_history_index=history_index,current_navigation_index=navigation_index},block:()=>{ history.go(-delta)},nav_token:token,event:event2})}else if(!hash_navigating){const url2=new URL(location.href);update_url(url2),app$1.hash&&location.reload()}}}),addEventListener("hashchange",()=>{hash_navigating&&(hash_navigating=!1,history.replaceState({...history.state,[HISTORY_INDEX]:++current_history_index,[NAVIGATION_INDEX]:current_navigation_index},"",location.href))});for(const link2 of document.querySelectorAll("link"))ICON_REL_ATTRIBUTES.has(link2.rel)&&(link2.href=link2.href);addEventListener( "pageshow",event2=>{event2.persisted&&stores.navigating.set(navigating.current=null)});function update_url(url2){current.url=page$3.url=url2,stores.page.set(clone_page(page$3)),stores.page.notify()}}async function _hydrate(target2,{status=200,error:error2,node_ids,params,route,server_route,data:server_data_nodes,form}){hydrated=!0;const url2=new URL(location.href);let parsed_route;({params={},route={id:null}}=await get_navigation_intent(url2,!1)||{}),parsed_route=routes.find(({id:id2})=>id2===route. id);let result,hydrate2=!0;try{const branch_promises=node_ids.map(async(n,i)=>{const server_data_node=server_data_nodes[i];return server_data_node?.uses&&(server_data_node.uses=deserialize_uses(server_data_node.uses)),load_node({loader:app$1.nodes[n],url:url2,params,route,parent:async()=>{const data={};for(let j=0;j{const history_state=history.state;resetting_focus=!0,location.replace(`#${id2}`),app$1.hash&&location.replace(url2.hash),history.replaceState(history_state,"",url2.hash),scrollTo(x,y),resetting_focus=!1})}else{const root2=document.body,tabindex=root2.getAttribute("tabindex");root2.tabIndex=-1,root2.focus({preventScroll:!0,focusVisible:!1}),tabindex!==null?root2.setAttribute("tabindex",tabindex):root2.removeAttribute( "tabindex")}const selection=getSelection();if(selection&&selection.type!=="None"){const ranges=[];for(let i=0;i{if(selection.rangeCount===ranges.length){for(let i=0;i{fulfil=f,reject=r2});return complete.catch(()=>{}),{navigation:{from:{params:current2.params,route:{id:current2.route?.id??null},url:current2.url},to:url2&&{params:intent?.params??null,route:{id:intent?.route?.id??null},url:url2},willUnload:!intent,type:type2,complete},fulfil,reject}}function clone_page(page2){return{data:page2.data,error:page2.error, form:page2.form,params:page2.params,route:page2.route,state:page2.state,status:page2.status,url:page2.url}}function decode_hash(url2){const new_url=new URL(url2);return new_url.hash=decodeURIComponent(url2.hash),new_url}function get_id(url2){let id2;if(app$1.hash){const[,,second]=url2.hash.split("#",3);id2=second??""}else id2=url2.hash.slice(1);return decodeURIComponent(id2)}const scriptRel="modulepreload",assetsURL=function(dep,importerUrl){return new URL(dep,importerUrl).href},seen={},__vitePreload=function(baseModule,deps,importerUrl){ let promise=Promise.resolve();if(deps&&deps.length>0){let allSettled=function(promises$2){return Promise.all(promises$2.map(p2=>Promise.resolve(p2).then(value$1=>({status:"fulfilled",value:value$1}),reason=>({status:"rejected",reason}))))};const links=document.getElementsByTagName("link"),cspNonceMeta=document.querySelector("meta[property=csp-nonce]"),cspNonce=cspNonceMeta?.nonce||cspNonceMeta?.getAttribute("nonce");promise=allSettled(deps.map(dep=>{if(dep=assetsURL(dep,importerUrl),dep in seen) return;seen[dep]=!0;const isCss=dep.endsWith(".css"),cssSelector=isCss?'[rel="stylesheet"]':"";if(importerUrl)for(let i$1=links.length-1;i$1>=0;i$1--){const link$12=links[i$1];if(link$12.href===dep&&(!isCss||link$12.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${dep}"]${cssSelector}`))return;const link2=document.createElement("link");if(link2.rel=isCss?"stylesheet":scriptRel,isCss||(link2.as="script"),link2.crossOrigin="",link2.href=dep,cspNonce&&link2.setAttribute("nonc\ e",cspNonce),document.head.appendChild(link2),isCss)return new Promise((res,rej)=>{link2.addEventListener("load",res),link2.addEventListener("error",()=>rej(new Error(`Unable to preload CSS for ${dep}`)))})}))}function handlePreloadError(err$2){const e$1=new Event("vite:preloadError",{cancelable:!0});if(e$1.payload=err$2,window.dispatchEvent(e$1),!e$1.defaultPrevented)throw err$2}return promise.then(res=>{for(const item of res||[])item.status==="rejected"&&handlePreloadError(item.reason);return baseModule(). catch(handlePreloadError)})},matchers={},PUBLIC_VERSION="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(PUBLIC_VERSION);var root_4$G=from_html('
'),root$1N=from_html(" ",1);function Root$6($$anchor,$$props){push$1($$props,!0);let components2=prop($$props, "components",23,()=>[]),data_0=prop($$props,"data_0",3,null),data_1=prop($$props,"data_1",3,null);user_pre_effect(()=>$$props.stores.page.set($$props.page)),user_effect(()=>{$$props.stores,$$props.page,$$props.constructors,components2(),$$props.form,data_0(),data_1(),$$props.stores.page.notify()});let mounted=state$1(!1),navigated=state$1(!1),title2=state$1(null);onMount$1(()=>{const unsubscribe=$$props.stores.page.subscribe(()=>{get$4(mounted)&&(set$1(navigated,!0),tick().then(()=>{set$1(title2, document.title||"untitled page",!0)}))});return set$1(mounted,!0),unsubscribe});const Pyramid_1=user_derived(()=>$$props.constructors[1]);var fragment=root$1N(),node2=first_child(fragment);{var consequent=$$anchor2=>{const Pyramid_0=user_derived(()=>$$props.constructors[0]);var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>get$4(Pyramid_0),($$anchor3,Pyramid_0_1)=>{bind_this(Pyramid_0_1($$anchor3,{get data(){return data_0()},get form(){return $$props.form},get params(){ return $$props.page.params},children:($$anchor4,$$slotProps)=>{var fragment_2=comment$2(),node_2=first_child(fragment_2);component(node_2,()=>get$4(Pyramid_1),($$anchor5,Pyramid_1_1)=>{bind_this(Pyramid_1_1($$anchor5,{get data(){return data_1()},get form(){return $$props.form},get params(){return $$props.page.params}}),$$value=>components2()[1]=$$value,()=>components2()?.[1])}),append($$anchor4,fragment_2)},$$slots:{default:!0}}),$$value=>components2()[0]=$$value,()=>components2()?.[0])}),append( $$anchor2,fragment_1)},alternate=$$anchor2=>{const Pyramid_0=user_derived(()=>$$props.constructors[0]);var fragment_3=comment$2(),node_3=first_child(fragment_3);component(node_3,()=>get$4(Pyramid_0),($$anchor3,Pyramid_0_2)=>{bind_this(Pyramid_0_2($$anchor3,{get data(){return data_0()},get form(){return $$props.form},get params(){return $$props.page.params}}),$$value=>components2()[0]=$$value,()=>components2()?.[0])}),append($$anchor2,fragment_3)};if_block(node2,$$render=>{$$props.constructors[1]? $$render(consequent):$$render(alternate,!1)})}var node_4=sibling(node2,2);{var consequent_2=$$anchor2=>{var div=root_4$G(),node_5=child(div);{var consequent_1=$$anchor3=>{var text2=text$8();template_effect(()=>set_text(text2,get$4(title2))),append($$anchor3,text2)};if_block(node_5,$$render=>{get$4(navigated)&&$$render(consequent_1)})}reset(div),append($$anchor2,div)};if_block(node_4,$$render=>{get$4(mounted)&&$$render(consequent_2)})}append($$anchor,fragment),pop()}const root$1M=asClassComponent( Root$6),nodes=[()=>__vitePreload(()=>Promise.resolve().then(()=>_0),void 0,import.meta.url),()=>__vitePreload(()=>Promise.resolve().then(()=>_1),void 0,import.meta.url),()=>__vitePreload(()=>Promise.resolve().then(()=>_2),void 0,import.meta.url),()=>__vitePreload(()=>Promise.resolve().then(()=>_3),void 0,import.meta.url)],server_loads=[],dictionary={"/":[2],"/chat/[id]":[3]},hooks={handleError:({error:error2})=>{console.error(error2)},reroute:()=>{},transport:{}}, decoders=Object.fromEntries(Object.entries(hooks.transport).map(([k,v])=>[k,v.decode])),encoders=Object.fromEntries(Object.entries(hooks.transport).map(([k,v])=>[k,v.encode])),hash=!0,decode$2=(type2,value)=>decoders[type2](value),app=Object.freeze(Object.defineProperty({__proto__:null,decode:decode$2,decoders,dictionary,encoders,hash,hooks,matchers,nodes,root:root$1M,server_loads},Symbol.toStringTag,{value:"Module"}));function start(element2,options){start$1(app,element2,options)}const page$2={ get params(){return page$3.params},get route(){return page$3.route},get status(){return page$3.status},get url(){return page$3.url}};stores.updated.check;const page$1=page$2,CLASS_PART_SEPARATOR="-",createClassGroupUtils=config2=>{const classMap=createClassMap(config2),{conflictingClassGroups,conflictingClassGroupModifiers}=config2;return{getClassGroupId:className=>{const classParts=className.split(CLASS_PART_SEPARATOR);return classParts[0]===""&&classParts.length!==1&&classParts.shift(),getGroupRecursive( classParts,classMap)||getGroupIdForArbitraryProperty(className)},getConflictingClassGroupIds:(classGroupId,hasPostfixModifier)=>{const conflicts=conflictingClassGroups[classGroupId]||[];return hasPostfixModifier&&conflictingClassGroupModifiers[classGroupId]?[...conflicts,...conflictingClassGroupModifiers[classGroupId]]:conflicts}}},getGroupRecursive=(classParts,classPartObject)=>{if(classParts.length===0)return classPartObject.classGroupId;const currentClassPart=classParts[0],nextClassPartObject=classPartObject. nextPart.get(currentClassPart),classGroupFromNextClassPart=nextClassPartObject?getGroupRecursive(classParts.slice(1),nextClassPartObject):void 0;if(classGroupFromNextClassPart)return classGroupFromNextClassPart;if(classPartObject.validators.length===0)return;const classRest=classParts.join(CLASS_PART_SEPARATOR);return classPartObject.validators.find(({validator})=>validator(classRest))?.classGroupId},arbitraryPropertyRegex=/^\[(.+)\]$/,getGroupIdForArbitraryProperty=className=>{if(arbitraryPropertyRegex. test(className)){const arbitraryPropertyClassName=arbitraryPropertyRegex.exec(className)[1],property=arbitraryPropertyClassName?.substring(0,arbitraryPropertyClassName.indexOf(":"));if(property)return"arbitrary.."+property}},createClassMap=config2=>{const{theme,classGroups}=config2,classMap={nextPart:new Map,validators:[]};for(const classGroupId in classGroups)processClassesRecursively(classGroups[classGroupId],classMap,classGroupId,theme);return classMap},processClassesRecursively=(classGroup,classPartObject,classGroupId,theme)=>{ classGroup.forEach(classDefinition=>{if(typeof classDefinition=="string"){const classPartObjectToEdit=classDefinition===""?classPartObject:getPart(classPartObject,classDefinition);classPartObjectToEdit.classGroupId=classGroupId;return}if(typeof classDefinition=="function"){if(isThemeGetter(classDefinition)){processClassesRecursively(classDefinition(theme),classPartObject,classGroupId,theme);return}classPartObject.validators.push({validator:classDefinition,classGroupId});return}Object.entries(classDefinition). forEach(([key2,classGroup2])=>{processClassesRecursively(classGroup2,getPart(classPartObject,key2),classGroupId,theme)})})},getPart=(classPartObject,path2)=>{let currentClassPartObject=classPartObject;return path2.split(CLASS_PART_SEPARATOR).forEach(pathPart=>{currentClassPartObject.nextPart.has(pathPart)||currentClassPartObject.nextPart.set(pathPart,{nextPart:new Map,validators:[]}),currentClassPartObject=currentClassPartObject.nextPart.get(pathPart)}),currentClassPartObject},isThemeGetter=func=>func. isThemeGetter,createLruCache=maxCacheSize=>{if(maxCacheSize<1)return{get:()=>{},set:()=>{}};let cacheSize=0,cache2=new Map,previousCache=new Map;const update2=(key2,value)=>{cache2.set(key2,value),cacheSize++,cacheSize>maxCacheSize&&(cacheSize=0,previousCache=cache2,cache2=new Map)};return{get(key2){let value=cache2.get(key2);if(value!==void 0)return value;if((value=previousCache.get(key2))!==void 0)return update2(key2,value),value},set(key2,value){cache2.has(key2)?cache2.set(key2,value):update2( key2,value)}}},IMPORTANT_MODIFIER="!",MODIFIER_SEPARATOR=":",MODIFIER_SEPARATOR_LENGTH=MODIFIER_SEPARATOR.length,createParseClassName=config2=>{const{prefix,experimentalParseClassName}=config2;let parseClassName=className=>{const modifiers=[];let bracketDepth=0,parenDepth=0,modifierStart=0,postfixModifierPosition;for(let index2=0;index2modifierStart?postfixModifierPosition-modifierStart:void 0;return{modifiers,hasImportantModifier,baseClassName,maybePostfixModifierPosition}};if(prefix){const fullPrefix=prefix+MODIFIER_SEPARATOR,parseClassNameOriginal=parseClassName;parseClassName=className=>className.startsWith(fullPrefix)?parseClassNameOriginal(className.substring(fullPrefix.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1, baseClassName:className,maybePostfixModifierPosition:void 0}}if(experimentalParseClassName){const parseClassNameOriginal=parseClassName;parseClassName=className=>experimentalParseClassName({className,parseClassName:parseClassNameOriginal})}return parseClassName},stripImportantModifier=baseClassName=>baseClassName.endsWith(IMPORTANT_MODIFIER)?baseClassName.substring(0,baseClassName.length-1):baseClassName.startsWith(IMPORTANT_MODIFIER)?baseClassName.substring(1):baseClassName,createSortModifiers=config2=>{ const orderSensitiveModifiers=Object.fromEntries(config2.orderSensitiveModifiers.map(modifier=>[modifier,!0]));return modifiers=>{if(modifiers.length<=1)return modifiers;const sortedModifiers=[];let unsortedModifiers=[];return modifiers.forEach(modifier=>{modifier[0]==="["||orderSensitiveModifiers[modifier]?(sortedModifiers.push(...unsortedModifiers.sort(),modifier),unsortedModifiers=[]):unsortedModifiers.push(modifier)}),sortedModifiers.push(...unsortedModifiers.sort()),sortedModifiers}},createConfigUtils=config2=>({ cache:createLruCache(config2.cacheSize),parseClassName:createParseClassName(config2),sortModifiers:createSortModifiers(config2),...createClassGroupUtils(config2)}),SPLIT_CLASSES_REGEX=/\s+/,mergeClassList=(classList,configUtils)=>{const{parseClassName,getClassGroupId,getConflictingClassGroupIds,sortModifiers}=configUtils,classGroupsInConflict=[],classNames=classList.trim().split(SPLIT_CLASSES_REGEX);let result="";for(let index2=classNames.length-1;index2>=0;index2-=1){const originalClassName=classNames[index2], {isExternal,modifiers,hasImportantModifier,baseClassName,maybePostfixModifierPosition}=parseClassName(originalClassName);if(isExternal){result=originalClassName+(result.length>0?" "+result:result);continue}let hasPostfixModifier=!!maybePostfixModifierPosition,classGroupId=getClassGroupId(hasPostfixModifier?baseClassName.substring(0,maybePostfixModifierPosition):baseClassName);if(!classGroupId){if(!hasPostfixModifier){result=originalClassName+(result.length>0?" "+result:result);continue}if(classGroupId= getClassGroupId(baseClassName),!classGroupId){result=originalClassName+(result.length>0?" "+result:result);continue}hasPostfixModifier=!1}const variantModifier=sortModifiers(modifiers).join(":"),modifierId=hasImportantModifier?variantModifier+IMPORTANT_MODIFIER:variantModifier,classId=modifierId+classGroupId;if(classGroupsInConflict.includes(classId))continue;classGroupsInConflict.push(classId);const conflictGroups=getConflictingClassGroupIds(classGroupId,hasPostfixModifier);for(let i=0;i0?" "+result:result)}return result};function twJoin(){let index2=0,argument,resolvedValue,string2="";for(;index2{if(typeof mix=="string")return mix;let resolvedValue,string2="";for(let k=0;kcreateConfigCurrent(previousConfig),createConfigFirst());return configUtils=createConfigUtils(config2),cacheGet=configUtils.cache.get,cacheSet=configUtils. cache.set,functionToCall=tailwindMerge,tailwindMerge(classList)}function tailwindMerge(classList){const cachedResult=cacheGet(classList);if(cachedResult)return cachedResult;const result=mergeClassList(classList,configUtils);return cacheSet(classList,result),result}return function(){return functionToCall(twJoin.apply(null,arguments))}}const fromTheme=key2=>{const themeGetter=theme=>theme[key2]||[];return themeGetter.isThemeGetter=!0,themeGetter},arbitraryValueRegex=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,arbitraryVariableRegex=/^\((?:(\w[\w-]*):)?(.+)\)$/i, fractionRegex=/^\d+\/\d+$/,tshirtUnitRegex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lengthUnitRegex=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,colorFunctionRegex=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,shadowRegex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,imageRegex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,isFraction=value=>fractionRegex. test(value),isNumber=value=>!!value&&!Number.isNaN(Number(value)),isInteger=value=>!!value&&Number.isInteger(Number(value)),isPercent=value=>value.endsWith("%")&&isNumber(value.slice(0,-1)),isTshirtSize=value=>tshirtUnitRegex.test(value),isAny=()=>!0,isLengthOnly=value=>lengthUnitRegex.test(value)&&!colorFunctionRegex.test(value),isNever=()=>!1,isShadow=value=>shadowRegex.test(value),isImage=value=>imageRegex.test(value),isAnyNonArbitrary=value=>!isArbitraryValue(value)&&!isArbitraryVariable(value), isArbitrarySize=value=>getIsArbitraryValue(value,isLabelSize,isNever),isArbitraryValue=value=>arbitraryValueRegex.test(value),isArbitraryLength=value=>getIsArbitraryValue(value,isLabelLength,isLengthOnly),isArbitraryNumber=value=>getIsArbitraryValue(value,isLabelNumber,isNumber),isArbitraryPosition=value=>getIsArbitraryValue(value,isLabelPosition,isNever),isArbitraryImage=value=>getIsArbitraryValue(value,isLabelImage,isImage),isArbitraryShadow=value=>getIsArbitraryValue(value,isLabelShadow,isShadow), isArbitraryVariable=value=>arbitraryVariableRegex.test(value),isArbitraryVariableLength=value=>getIsArbitraryVariable(value,isLabelLength),isArbitraryVariableFamilyName=value=>getIsArbitraryVariable(value,isLabelFamilyName),isArbitraryVariablePosition=value=>getIsArbitraryVariable(value,isLabelPosition),isArbitraryVariableSize=value=>getIsArbitraryVariable(value,isLabelSize),isArbitraryVariableImage=value=>getIsArbitraryVariable(value,isLabelImage),isArbitraryVariableShadow=value=>getIsArbitraryVariable( value,isLabelShadow,!0),getIsArbitraryValue=(value,testLabel,testValue)=>{const result=arbitraryValueRegex.exec(value);return result?result[1]?testLabel(result[1]):testValue(result[2]):!1},getIsArbitraryVariable=(value,testLabel,shouldMatchNoLabel=!1)=>{const result=arbitraryVariableRegex.exec(value);return result?result[1]?testLabel(result[1]):shouldMatchNoLabel:!1},isLabelPosition=label=>label==="position"||label==="percentage",isLabelImage=label=>label==="image"||label==="url",isLabelSize=label=>label=== "length"||label==="size"||label==="bg-size",isLabelLength=label=>label==="length",isLabelNumber=label=>label==="number",isLabelFamilyName=label=>label==="family-name",isLabelShadow=label=>label==="shadow",getDefaultConfig=()=>{const themeColor=fromTheme("color"),themeFont=fromTheme("font"),themeText=fromTheme("text"),themeFontWeight=fromTheme("font-weight"),themeTracking=fromTheme("tracking"),themeLeading=fromTheme("leading"),themeBreakpoint=fromTheme("breakpoint"),themeContainer=fromTheme("cont\ ainer"),themeSpacing=fromTheme("spacing"),themeRadius=fromTheme("radius"),themeShadow=fromTheme("shadow"),themeInsetShadow=fromTheme("inset-shadow"),themeTextShadow=fromTheme("text-shadow"),themeDropShadow=fromTheme("drop-shadow"),themeBlur=fromTheme("blur"),themePerspective=fromTheme("perspective"),themeAspect=fromTheme("aspect"),themeEase=fromTheme("ease"),themeAnimate=fromTheme("animate"),scaleBreak=()=>["auto","avoid","all","avoid-page","page","left","right","column"],scalePosition=()=>["cen\ ter","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],scalePositionWithArbitrary=()=>[...scalePosition(),isArbitraryVariable,isArbitraryValue],scaleOverflow=()=>["auto","hidden","clip","visible","scroll"],scaleOverscroll=()=>["auto","contain","none"],scaleUnambiguousSpacing=()=>[isArbitraryVariable,isArbitraryValue,themeSpacing],scaleInset=()=>[isFraction,"full","auto",...scaleUnambiguousSpacing()],scaleGridTemplateColsRows=()=>[ isInteger,"none","subgrid",isArbitraryVariable,isArbitraryValue],scaleGridColRowStartAndEnd=()=>["auto",{span:["full",isInteger,isArbitraryVariable,isArbitraryValue]},isInteger,isArbitraryVariable,isArbitraryValue],scaleGridColRowStartOrEnd=()=>[isInteger,"auto",isArbitraryVariable,isArbitraryValue],scaleGridAutoColsRows=()=>["auto","min","max","fr",isArbitraryVariable,isArbitraryValue],scaleAlignPrimaryAxis=()=>["start","end","center","between","around","evenly","stretch","baseline","center-saf\ e","end-safe"],scaleAlignSecondaryAxis=()=>["start","end","center","stretch","center-safe","end-safe"],scaleMargin=()=>["auto",...scaleUnambiguousSpacing()],scaleSizing=()=>[isFraction,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...scaleUnambiguousSpacing()],scaleColor=()=>[themeColor,isArbitraryVariable,isArbitraryValue],scaleBgPosition=()=>[...scalePosition(),isArbitraryVariablePosition,isArbitraryPosition,{position:[isArbitraryVariable,isArbitraryValue]}],scaleBgRepeat=()=>[ "no-repeat",{repeat:["","x","y","space","round"]}],scaleBgSize=()=>["auto","cover","contain",isArbitraryVariableSize,isArbitrarySize,{size:[isArbitraryVariable,isArbitraryValue]}],scaleGradientStopPosition=()=>[isPercent,isArbitraryVariableLength,isArbitraryLength],scaleRadius=()=>["","none","full",themeRadius,isArbitraryVariable,isArbitraryValue],scaleBorderWidth=()=>["",isNumber,isArbitraryVariableLength,isArbitraryLength],scaleLineStyle=()=>["solid","dashed","dotted","double"],scaleBlendMode=()=>[ "normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],scaleMaskImagePosition=()=>[isNumber,isPercent,isArbitraryVariablePosition,isArbitraryPosition],scaleBlur=()=>["","none",themeBlur,isArbitraryVariable,isArbitraryValue],scaleRotate=()=>["none",isNumber,isArbitraryVariable,isArbitraryValue],scaleScale=()=>["none",isNumber,isArbitraryVariable,isArbitraryValue],scaleSkew=()=>[ isNumber,isArbitraryVariable,isArbitraryValue],scaleTranslate=()=>[isFraction,"full",...scaleUnambiguousSpacing()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[isTshirtSize],breakpoint:[isTshirtSize],color:[isAny],container:[isTshirtSize],"drop-shadow":[isTshirtSize],ease:["in","out","in-out"],font:[isAnyNonArbitrary],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[isTshirtSize],leading:[ "none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[isTshirtSize],shadow:[isTshirtSize],spacing:["px",isNumber],text:[isTshirtSize],"text-shadow":[isTshirtSize],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",isFraction,isArbitraryValue,isArbitraryVariable,themeAspect]}],container:["container"],columns:[{columns:[isNumber,isArbitraryValue,isArbitraryVariable,themeContainer]}], "break-after":[{"break-after":scaleBreak()}],"break-before":[{"break-before":scaleBreak()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid", "inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:scalePositionWithArbitrary()}],overflow:[{overflow:scaleOverflow()}],"overflow-x":[{"overflow-x":scaleOverflow()}],"overflow-y":[{"overflow-y":scaleOverflow()}],overscroll:[ {overscroll:scaleOverscroll()}],"overscroll-x":[{"overscroll-x":scaleOverscroll()}],"overscroll-y":[{"overscroll-y":scaleOverscroll()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:scaleInset()}],"inset-x":[{"inset-x":scaleInset()}],"inset-y":[{"inset-y":scaleInset()}],start:[{start:scaleInset()}],end:[{end:scaleInset()}],top:[{top:scaleInset()}],right:[{right:scaleInset()}],bottom:[{bottom:scaleInset()}],left:[{left:scaleInset()}],visibility:["visible","invisible","c\ ollapse"],z:[{z:[isInteger,"auto",isArbitraryVariable,isArbitraryValue]}],basis:[{basis:[isFraction,"full","auto",themeContainer,...scaleUnambiguousSpacing()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[isNumber,isFraction,"auto","initial","none",isArbitraryValue]}],grow:[{grow:["",isNumber,isArbitraryVariable,isArbitraryValue]}],shrink:[{shrink:["",isNumber,isArbitraryVariable,isArbitraryValue]}],order:[ {order:[isInteger,"first","last","none",isArbitraryVariable,isArbitraryValue]}],"grid-cols":[{"grid-cols":scaleGridTemplateColsRows()}],"col-start-end":[{col:scaleGridColRowStartAndEnd()}],"col-start":[{"col-start":scaleGridColRowStartOrEnd()}],"col-end":[{"col-end":scaleGridColRowStartOrEnd()}],"grid-rows":[{"grid-rows":scaleGridTemplateColsRows()}],"row-start-end":[{row:scaleGridColRowStartAndEnd()}],"row-start":[{"row-start":scaleGridColRowStartOrEnd()}],"row-end":[{"row-end":scaleGridColRowStartOrEnd()}], "grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":scaleGridAutoColsRows()}],"auto-rows":[{"auto-rows":scaleGridAutoColsRows()}],gap:[{gap:scaleUnambiguousSpacing()}],"gap-x":[{"gap-x":scaleUnambiguousSpacing()}],"gap-y":[{"gap-y":scaleUnambiguousSpacing()}],"justify-content":[{justify:[...scaleAlignPrimaryAxis(),"normal"]}],"justify-items":[{"justify-items":[...scaleAlignSecondaryAxis(),"normal"]}],"justify-self":[{"justify-self":["auto",...scaleAlignSecondaryAxis()]}], "align-content":[{content:["normal",...scaleAlignPrimaryAxis()]}],"align-items":[{items:[...scaleAlignSecondaryAxis(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...scaleAlignSecondaryAxis(),{baseline:["","last"]}]}],"place-content":[{"place-content":scaleAlignPrimaryAxis()}],"place-items":[{"place-items":[...scaleAlignSecondaryAxis(),"baseline"]}],"place-self":[{"place-self":["auto",...scaleAlignSecondaryAxis()]}],p:[{p:scaleUnambiguousSpacing()}],px:[{px:scaleUnambiguousSpacing()}],py:[ {py:scaleUnambiguousSpacing()}],ps:[{ps:scaleUnambiguousSpacing()}],pe:[{pe:scaleUnambiguousSpacing()}],pt:[{pt:scaleUnambiguousSpacing()}],pr:[{pr:scaleUnambiguousSpacing()}],pb:[{pb:scaleUnambiguousSpacing()}],pl:[{pl:scaleUnambiguousSpacing()}],m:[{m:scaleMargin()}],mx:[{mx:scaleMargin()}],my:[{my:scaleMargin()}],ms:[{ms:scaleMargin()}],me:[{me:scaleMargin()}],mt:[{mt:scaleMargin()}],mr:[{mr:scaleMargin()}],mb:[{mb:scaleMargin()}],ml:[{ml:scaleMargin()}],"space-x":[{"space-x":scaleUnambiguousSpacing()}], "space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":scaleUnambiguousSpacing()}],"space-y-reverse":["space-y-reverse"],size:[{size:scaleSizing()}],w:[{w:[themeContainer,"screen",...scaleSizing()]}],"min-w":[{"min-w":[themeContainer,"screen","none",...scaleSizing()]}],"max-w":[{"max-w":[themeContainer,"screen","none","prose",{screen:[themeBreakpoint]},...scaleSizing()]}],h:[{h:["screen","lh",...scaleSizing()]}],"min-h":[{"min-h":["screen","lh","none",...scaleSizing()]}],"max-h":[{"max-h":[ "screen","lh",...scaleSizing()]}],"font-size":[{text:["base",themeText,isArbitraryVariableLength,isArbitraryLength]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[themeFontWeight,isArbitraryVariable,isArbitraryNumber]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",isPercent,isArbitraryValue]}],"font-family":[ {font:[isArbitraryVariableFamilyName,isArbitraryValue,themeFont]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[themeTracking,isArbitraryVariable,isArbitraryValue]}],"line-clamp":[{"line-clamp":[isNumber,"none",isArbitraryVariable,isArbitraryNumber]}],leading:[{leading:[themeLeading, ...scaleUnambiguousSpacing()]}],"list-image":[{"list-image":["none",isArbitraryVariable,isArbitraryValue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",isArbitraryVariable,isArbitraryValue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:scaleColor()}],"text-color":[{text:scaleColor()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-\ style":[{decoration:[...scaleLineStyle(),"wavy"]}],"text-decoration-thickness":[{decoration:[isNumber,"from-font","auto",isArbitraryVariable,isArbitraryLength]}],"text-decoration-color":[{decoration:scaleColor()}],"underline-offset":[{"underline-offset":[isNumber,"auto",isArbitraryVariable,isArbitraryValue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[ {indent:scaleUnambiguousSpacing()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",isArbitraryVariable,isArbitraryValue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",isArbitraryVariable,isArbitraryValue]}],"bg-attachment":[{bg:["fixe\ d","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:scaleBgPosition()}],"bg-repeat":[{bg:scaleBgRepeat()}],"bg-size":[{bg:scaleBgSize()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},isInteger,isArbitraryVariable,isArbitraryValue],radial:["",isArbitraryVariable,isArbitraryValue],conic:[isInteger,isArbitraryVariable,isArbitraryValue]},isArbitraryVariableImage, isArbitraryImage]}],"bg-color":[{bg:scaleColor()}],"gradient-from-pos":[{from:scaleGradientStopPosition()}],"gradient-via-pos":[{via:scaleGradientStopPosition()}],"gradient-to-pos":[{to:scaleGradientStopPosition()}],"gradient-from":[{from:scaleColor()}],"gradient-via":[{via:scaleColor()}],"gradient-to":[{to:scaleColor()}],rounded:[{rounded:scaleRadius()}],"rounded-s":[{"rounded-s":scaleRadius()}],"rounded-e":[{"rounded-e":scaleRadius()}],"rounded-t":[{"rounded-t":scaleRadius()}],"rounded-r":[{"r\ ounded-r":scaleRadius()}],"rounded-b":[{"rounded-b":scaleRadius()}],"rounded-l":[{"rounded-l":scaleRadius()}],"rounded-ss":[{"rounded-ss":scaleRadius()}],"rounded-se":[{"rounded-se":scaleRadius()}],"rounded-ee":[{"rounded-ee":scaleRadius()}],"rounded-es":[{"rounded-es":scaleRadius()}],"rounded-tl":[{"rounded-tl":scaleRadius()}],"rounded-tr":[{"rounded-tr":scaleRadius()}],"rounded-br":[{"rounded-br":scaleRadius()}],"rounded-bl":[{"rounded-bl":scaleRadius()}],"border-w":[{border:scaleBorderWidth()}], "border-w-x":[{"border-x":scaleBorderWidth()}],"border-w-y":[{"border-y":scaleBorderWidth()}],"border-w-s":[{"border-s":scaleBorderWidth()}],"border-w-e":[{"border-e":scaleBorderWidth()}],"border-w-t":[{"border-t":scaleBorderWidth()}],"border-w-r":[{"border-r":scaleBorderWidth()}],"border-w-b":[{"border-b":scaleBorderWidth()}],"border-w-l":[{"border-l":scaleBorderWidth()}],"divide-x":[{"divide-x":scaleBorderWidth()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":scaleBorderWidth()}], "divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...scaleLineStyle(),"hidden","none"]}],"divide-style":[{divide:[...scaleLineStyle(),"hidden","none"]}],"border-color":[{border:scaleColor()}],"border-color-x":[{"border-x":scaleColor()}],"border-color-y":[{"border-y":scaleColor()}],"border-color-s":[{"border-s":scaleColor()}],"border-color-e":[{"border-e":scaleColor()}],"border-color-t":[{"border-t":scaleColor()}],"border-color-r":[{"border-r":scaleColor()}],"border-color-b":[{"bor\ der-b":scaleColor()}],"border-color-l":[{"border-l":scaleColor()}],"divide-color":[{divide:scaleColor()}],"outline-style":[{outline:[...scaleLineStyle(),"none","hidden"]}],"outline-offset":[{"outline-offset":[isNumber,isArbitraryVariable,isArbitraryValue]}],"outline-w":[{outline:["",isNumber,isArbitraryVariableLength,isArbitraryLength]}],"outline-color":[{outline:scaleColor()}],shadow:[{shadow:["","none",themeShadow,isArbitraryVariableShadow,isArbitraryShadow]}],"shadow-color":[{shadow:scaleColor()}], "inset-shadow":[{"inset-shadow":["none",themeInsetShadow,isArbitraryVariableShadow,isArbitraryShadow]}],"inset-shadow-color":[{"inset-shadow":scaleColor()}],"ring-w":[{ring:scaleBorderWidth()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:scaleColor()}],"ring-offset-w":[{"ring-offset":[isNumber,isArbitraryLength]}],"ring-offset-color":[{"ring-offset":scaleColor()}],"inset-ring-w":[{"inset-ring":scaleBorderWidth()}],"inset-ring-color":[{"inset-ring":scaleColor()}],"text-shadow":[{"text-shado\ w":["none",themeTextShadow,isArbitraryVariableShadow,isArbitraryShadow]}],"text-shadow-color":[{"text-shadow":scaleColor()}],opacity:[{opacity:[isNumber,isArbitraryVariable,isArbitraryValue]}],"mix-blend":[{"mix-blend":[...scaleBlendMode(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":scaleBlendMode()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-po\ s":[{"mask-linear":[isNumber]}],"mask-image-linear-from-pos":[{"mask-linear-from":scaleMaskImagePosition()}],"mask-image-linear-to-pos":[{"mask-linear-to":scaleMaskImagePosition()}],"mask-image-linear-from-color":[{"mask-linear-from":scaleColor()}],"mask-image-linear-to-color":[{"mask-linear-to":scaleColor()}],"mask-image-t-from-pos":[{"mask-t-from":scaleMaskImagePosition()}],"mask-image-t-to-pos":[{"mask-t-to":scaleMaskImagePosition()}],"mask-image-t-from-color":[{"mask-t-from":scaleColor()}],"\ mask-image-t-to-color":[{"mask-t-to":scaleColor()}],"mask-image-r-from-pos":[{"mask-r-from":scaleMaskImagePosition()}],"mask-image-r-to-pos":[{"mask-r-to":scaleMaskImagePosition()}],"mask-image-r-from-color":[{"mask-r-from":scaleColor()}],"mask-image-r-to-color":[{"mask-r-to":scaleColor()}],"mask-image-b-from-pos":[{"mask-b-from":scaleMaskImagePosition()}],"mask-image-b-to-pos":[{"mask-b-to":scaleMaskImagePosition()}],"mask-image-b-from-color":[{"mask-b-from":scaleColor()}],"mask-image-b-to-colo\ r":[{"mask-b-to":scaleColor()}],"mask-image-l-from-pos":[{"mask-l-from":scaleMaskImagePosition()}],"mask-image-l-to-pos":[{"mask-l-to":scaleMaskImagePosition()}],"mask-image-l-from-color":[{"mask-l-from":scaleColor()}],"mask-image-l-to-color":[{"mask-l-to":scaleColor()}],"mask-image-x-from-pos":[{"mask-x-from":scaleMaskImagePosition()}],"mask-image-x-to-pos":[{"mask-x-to":scaleMaskImagePosition()}],"mask-image-x-from-color":[{"mask-x-from":scaleColor()}],"mask-image-x-to-color":[{"mask-x-to":scaleColor()}], "mask-image-y-from-pos":[{"mask-y-from":scaleMaskImagePosition()}],"mask-image-y-to-pos":[{"mask-y-to":scaleMaskImagePosition()}],"mask-image-y-from-color":[{"mask-y-from":scaleColor()}],"mask-image-y-to-color":[{"mask-y-to":scaleColor()}],"mask-image-radial":[{"mask-radial":[isArbitraryVariable,isArbitraryValue]}],"mask-image-radial-from-pos":[{"mask-radial-from":scaleMaskImagePosition()}],"mask-image-radial-to-pos":[{"mask-radial-to":scaleMaskImagePosition()}],"mask-image-radial-from-color":[{ "mask-radial-from":scaleColor()}],"mask-image-radial-to-color":[{"mask-radial-to":scaleColor()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":scalePosition()}],"mask-image-conic-pos":[{"mask-conic":[isNumber]}],"mask-image-conic-from-pos":[{"mask-conic-from":scaleMaskImagePosition()}],"mask-image-conic-to-pos":[{"mask-conic-to":scaleMaskImagePosition()}], "mask-image-conic-from-color":[{"mask-conic-from":scaleColor()}],"mask-image-conic-to-color":[{"mask-conic-to":scaleColor()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:scaleBgPosition()}],"mask-repeat":[{mask:scaleBgRepeat()}],"mask-size":[{mask:scaleBgSize()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",isArbitraryVariable,isArbitraryValue]}],filter:[ {filter:["","none",isArbitraryVariable,isArbitraryValue]}],blur:[{blur:scaleBlur()}],brightness:[{brightness:[isNumber,isArbitraryVariable,isArbitraryValue]}],contrast:[{contrast:[isNumber,isArbitraryVariable,isArbitraryValue]}],"drop-shadow":[{"drop-shadow":["","none",themeDropShadow,isArbitraryVariableShadow,isArbitraryShadow]}],"drop-shadow-color":[{"drop-shadow":scaleColor()}],grayscale:[{grayscale:["",isNumber,isArbitraryVariable,isArbitraryValue]}],"hue-rotate":[{"hue-rotate":[isNumber,isArbitraryVariable, isArbitraryValue]}],invert:[{invert:["",isNumber,isArbitraryVariable,isArbitraryValue]}],saturate:[{saturate:[isNumber,isArbitraryVariable,isArbitraryValue]}],sepia:[{sepia:["",isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-filter":[{"backdrop-filter":["","none",isArbitraryVariable,isArbitraryValue]}],"backdrop-blur":[{"backdrop-blur":scaleBlur()}],"backdrop-brightness":[{"backdrop-brightness":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-contrast":[{"backdrop-contrast":[ isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-invert":[{"backdrop-invert":["",isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-opacity":[{"backdrop-opacity":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-saturate":[{"backdrop-saturate":[isNumber,isArbitraryVariable,isArbitraryValue]}], "backdrop-sepia":[{"backdrop-sepia":["",isNumber,isArbitraryVariable,isArbitraryValue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":scaleUnambiguousSpacing()}],"border-spacing-x":[{"border-spacing-x":scaleUnambiguousSpacing()}],"border-spacing-y":[{"border-spacing-y":scaleUnambiguousSpacing()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none", isArbitraryVariable,isArbitraryValue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[isNumber,"initial",isArbitraryVariable,isArbitraryValue]}],ease:[{ease:["linear","initial",themeEase,isArbitraryVariable,isArbitraryValue]}],delay:[{delay:[isNumber,isArbitraryVariable,isArbitraryValue]}],animate:[{animate:["none",themeAnimate,isArbitraryVariable,isArbitraryValue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[themePerspective,isArbitraryVariable, isArbitraryValue]}],"perspective-origin":[{"perspective-origin":scalePositionWithArbitrary()}],rotate:[{rotate:scaleRotate()}],"rotate-x":[{"rotate-x":scaleRotate()}],"rotate-y":[{"rotate-y":scaleRotate()}],"rotate-z":[{"rotate-z":scaleRotate()}],scale:[{scale:scaleScale()}],"scale-x":[{"scale-x":scaleScale()}],"scale-y":[{"scale-y":scaleScale()}],"scale-z":[{"scale-z":scaleScale()}],"scale-3d":["scale-3d"],skew:[{skew:scaleSkew()}],"skew-x":[{"skew-x":scaleSkew()}],"skew-y":[{"skew-y":scaleSkew()}], transform:[{transform:[isArbitraryVariable,isArbitraryValue,"","none","gpu","cpu"]}],"transform-origin":[{origin:scalePositionWithArbitrary()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:scaleTranslate()}],"translate-x":[{"translate-x":scaleTranslate()}],"translate-y":[{"translate-y":scaleTranslate()}],"translate-z":[{"translate-z":scaleTranslate()}],"translate-none":["translate-none"],accent:[{accent:scaleColor()}],appearance:[{appearance:["none","auto"]}],"caret-color":[ {caret:scaleColor()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in", "zoom-out",isArbitraryVariable,isArbitraryValue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":scaleUnambiguousSpacing()}],"scroll-mx":[{"scroll-mx":scaleUnambiguousSpacing()}],"scroll-my":[{"scroll-my":scaleUnambiguousSpacing()}],"scroll-ms":[{"scroll-ms":scaleUnambiguousSpacing()}],"scroll-me":[{"scroll-me":scaleUnambiguousSpacing()}], "scroll-mt":[{"scroll-mt":scaleUnambiguousSpacing()}],"scroll-mr":[{"scroll-mr":scaleUnambiguousSpacing()}],"scroll-mb":[{"scroll-mb":scaleUnambiguousSpacing()}],"scroll-ml":[{"scroll-ml":scaleUnambiguousSpacing()}],"scroll-p":[{"scroll-p":scaleUnambiguousSpacing()}],"scroll-px":[{"scroll-px":scaleUnambiguousSpacing()}],"scroll-py":[{"scroll-py":scaleUnambiguousSpacing()}],"scroll-ps":[{"scroll-ps":scaleUnambiguousSpacing()}],"scroll-pe":[{"scroll-pe":scaleUnambiguousSpacing()}],"scroll-pt":[{"s\ croll-pt":scaleUnambiguousSpacing()}],"scroll-pr":[{"scroll-pr":scaleUnambiguousSpacing()}],"scroll-pb":[{"scroll-pb":scaleUnambiguousSpacing()}],"scroll-pl":[{"scroll-pl":scaleUnambiguousSpacing()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-\ y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",isArbitraryVariable,isArbitraryValue]}],fill:[{fill:["none",...scaleColor()]}],"stroke-w":[{stroke:[isNumber,isArbitraryVariableLength,isArbitraryLength,isArbitraryNumber]}],stroke:[{stroke:["none",...scaleColor()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:[ "overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn\ -spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-\ tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","bord\ er-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-\ py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},mergeConfigs=(baseConfig,{cacheSize, prefix,experimentalParseClassName,extend:extend2={},override={}})=>(overrideProperty(baseConfig,"cacheSize",cacheSize),overrideProperty(baseConfig,"prefix",prefix),overrideProperty(baseConfig,"experimentalParseClassName",experimentalParseClassName),overrideConfigProperties(baseConfig.theme,override.theme),overrideConfigProperties(baseConfig.classGroups,override.classGroups),overrideConfigProperties(baseConfig.conflictingClassGroups,override.conflictingClassGroups),overrideConfigProperties(baseConfig. conflictingClassGroupModifiers,override.conflictingClassGroupModifiers),overrideProperty(baseConfig,"orderSensitiveModifiers",override.orderSensitiveModifiers),mergeConfigProperties(baseConfig.theme,extend2.theme),mergeConfigProperties(baseConfig.classGroups,extend2.classGroups),mergeConfigProperties(baseConfig.conflictingClassGroups,extend2.conflictingClassGroups),mergeConfigProperties(baseConfig.conflictingClassGroupModifiers,extend2.conflictingClassGroupModifiers),mergeArrayProperties(baseConfig, extend2,"orderSensitiveModifiers"),baseConfig),overrideProperty=(baseObject,overrideKey,overrideValue)=>{overrideValue!==void 0&&(baseObject[overrideKey]=overrideValue)},overrideConfigProperties=(baseObject,overrideObject)=>{if(overrideObject)for(const key2 in overrideObject)overrideProperty(baseObject,key2,overrideObject[key2])},mergeConfigProperties=(baseObject,mergeObject)=>{if(mergeObject)for(const key2 in mergeObject)mergeArrayProperties(baseObject,mergeObject,key2)},mergeArrayProperties=(baseObject,mergeObject,key2)=>{ const mergeValue=mergeObject[key2];mergeValue!==void 0&&(baseObject[key2]=baseObject[key2]?baseObject[key2].concat(mergeValue):mergeValue)},extendTailwindMerge=(configExtension,...createConfig)=>typeof configExtension=="function"?createTailwindMerge(getDefaultConfig,configExtension,...createConfig):createTailwindMerge(()=>mergeConfigs(getDefaultConfig(),configExtension),...createConfig),twMerge=createTailwindMerge(getDefaultConfig);function cn$1(...inputs){return twMerge(clsx$1(inputs))}var SPACE_REGEX=/\s+/g, removeExtraSpaces=str=>typeof str!="string"||!str?str:str.replace(SPACE_REGEX," ").trim(),cx=(...classnames)=>{const classList=[],buildClassString=input=>{if(!input&&input!==0&&input!==0n)return;if(Array.isArray(input)){for(let i=0,len=input.length;i0?removeExtraSpaces(classList.join(" ")):void 0},falsyToString=value=>value===!1?"false":value===!0?"true":value===0?"0":value,isEmptyObject=obj=>{if(!obj||typeof obj!="object")return!0;for(const _ in obj)return!1;return!0},isEqual=(obj1,obj2)=>{if(obj1===obj2)return!0;if(!obj1|| !obj2)return!1;const keys1=Object.keys(obj1),keys2=Object.keys(obj2);if(keys1.length!==keys2.length)return!1;for(let i=0;i{for(const key2 in obj2)if(Object.prototype.hasOwnProperty.call(obj2,key2)){const val2=obj2[key2];key2 in obj1?obj1[key2]=cx(obj1[key2],val2):obj1[key2]=val2}return obj1},flat=(arr,target2)=>{for(let i=0;i{const result=[];flat(arrays,result);const filtered=[];for(let i=0;i{const result={};for(const key2 in obj1){const val1=obj1[key2];if(key2 in obj2){const val2=obj2[key2];Array.isArray(val1)||Array.isArray(val2)?result[key2]=flatMergeArrays(val2,val1):typeof val1=="object"&&typeof val2=="object"&&val1&&val2?result[key2]=mergeObjects( val1,val2):result[key2]=val2+" "+val1}else result[key2]=val1}for(const key2 in obj2)key2 in obj1||(result[key2]=obj2[key2]);return result},defaultConfig={twMerge:!0,twMergeConfig:{}};function createState$1(){let cachedTwMerge=null,cachedTwMergeConfig={},didTwMergeConfigChange=!1;return{get cachedTwMerge(){return cachedTwMerge},set cachedTwMerge(value){cachedTwMerge=value},get cachedTwMergeConfig(){return cachedTwMergeConfig},set cachedTwMergeConfig(value){cachedTwMergeConfig=value},get didTwMergeConfigChange(){ return didTwMergeConfigChange},set didTwMergeConfigChange(value){didTwMergeConfigChange=value},reset(){cachedTwMerge=null,cachedTwMergeConfig={},didTwMergeConfigChange=!1}}}var state=createState$1(),getTailwindVariants=cn2=>{const tv2=(options,configProp)=>{const{extend:extend2=null,slots:slotProps={},variants:variantsProps={},compoundVariants:compoundVariantsProps=[],compoundSlots=[],defaultVariants:defaultVariantsProps={}}=options,config2={...defaultConfig,...configProp},base2=extend2?.base?cx( extend2.base,options?.base):options?.base,variants2=extend2?.variants&&!isEmptyObject(extend2.variants)?mergeObjects(variantsProps,extend2.variants):variantsProps,defaultVariants=extend2?.defaultVariants&&!isEmptyObject(extend2.defaultVariants)?{...extend2.defaultVariants,...defaultVariantsProps}:defaultVariantsProps;!isEmptyObject(config2.twMergeConfig)&&!isEqual(config2.twMergeConfig,state.cachedTwMergeConfig)&&(state.didTwMergeConfigChange=!0,state.cachedTwMergeConfig=config2.twMergeConfig);const isExtendedSlotsEmpty=isEmptyObject( extend2?.slots),componentSlots=isEmptyObject(slotProps)?{}:{base:cx(options?.base,isExtendedSlotsEmpty&&extend2?.base),...slotProps},slots=isExtendedSlotsEmpty?componentSlots:joinObjects({...extend2?.slots},isEmptyObject(componentSlots)?{base:options?.base}:componentSlots),compoundVariants=isEmptyObject(extend2?.compoundVariants)?compoundVariantsProps:flatMergeArrays(extend2?.compoundVariants,compoundVariantsProps),component2=props=>{if(isEmptyObject(variants2)&&isEmptyObject(slotProps)&&isExtendedSlotsEmpty) return cn2(base2,props?.class,props?.className)(config2);if(compoundVariants&&!Array.isArray(compoundVariants))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof compoundVariants}`);if(compoundSlots&&!Array.isArray(compoundSlots))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof compoundSlots}`);const getVariantValue=(variant,vrs=variants2,_slotKey=null,slotProps2=null)=>{const variantObj=vrs[variant];if(!variantObj||isEmptyObject( variantObj))return null;const variantProp=slotProps2?.[variant]??props?.[variant];if(variantProp===null)return null;const variantKey=falsyToString(variantProp);if(typeof variantKey=="object")return null;const defaultVariantProp=defaultVariants?.[variant],key2=variantKey??falsyToString(defaultVariantProp);return variantObj[key2||"false"]},getVariantClassNames=()=>{if(!variants2)return null;const keys2=Object.keys(variants2),result=[];for(let i=0;i{if(!variants2||typeof variants2!="object")return null;const result=[];for(const variant in variants2){const variantValue=getVariantValue(variant,variants2,slotKey,slotProps2),value=slotKey==="base"&&typeof variantValue=="string"?variantValue:variantValue&&variantValue[slotKey];value&&result.push(value)}return result},propsWithoutUndefined={};for(const prop2 in props){const value=props[prop2]; value!==void 0&&(propsWithoutUndefined[prop2]=value)}const getCompleteProps=(key2,slotProps2)=>{const initialProp=typeof props?.[key2]=="object"?{[key2]:props[key2]?.initial}:{};return{...defaultVariants,...propsWithoutUndefined,...initialProp,...slotProps2}},getCompoundVariantsValue=(cv=[],slotProps2)=>{const result=[],cvLength=cv.length;for(let i=0;i{ const compoundClassNames=getCompoundVariantsValue(compoundVariants,slotProps2);if(!Array.isArray(compoundClassNames))return compoundClassNames;const result={},cnFn=cn2;for(let i=0;i{ if(compoundSlots.length<1)return null;const result={},completeProps=getCompleteProps(null,slotProps2);for(let i=0;i{const compoundVariantClasses=getCompoundVariantClassNamesBySlot( slotProps2),compoundSlotClasses=getCompoundSlotClassNameBySlot(slotProps2);return cnFn(slots[slotKey],getVariantClassNamesBySlotKey(slotKey,slotProps2),compoundVariantClasses?compoundVariantClasses[slotKey]:void 0,compoundSlotClasses?compoundSlotClasses[slotKey]:void 0,slotProps2?.class,slotProps2?.className)(config2)}}return slotsFns}return cn2(base2,getVariantClassNames(),getCompoundVariantsValue(compoundVariants),props?.class,props?.className)(config2)},getVariantKeys=()=>{if(!(!variants2||typeof variants2!= "object"))return Object.keys(variants2)};return component2.variantKeys=getVariantKeys(),component2.extend=extend2,component2.base=base2,component2.slots=slots,component2.variants=variants2,component2.defaultVariants=defaultVariants,component2.compoundSlots=compoundSlots,component2.compoundVariants=compoundVariants,component2};return{tv:tv2,createTV:configProp=>(options,config2)=>tv2(options,config2?mergeObjects(configProp,config2):configProp)}},createTwMerge=cachedTwMergeConfig=>isEmptyObject(cachedTwMergeConfig)? twMerge:extendTailwindMerge({...cachedTwMergeConfig,extend:{theme:cachedTwMergeConfig.theme,classGroups:cachedTwMergeConfig.classGroups,conflictingClassGroupModifiers:cachedTwMergeConfig.conflictingClassGroupModifiers,conflictingClassGroups:cachedTwMergeConfig.conflictingClassGroups,...cachedTwMergeConfig.extend}}),executeMerge=(classnames,config2)=>{const base2=cx(classnames);return!base2||!(config2?.twMerge??!0)?base2:((!state.cachedTwMerge||state.didTwMergeConfigChange)&&(state.didTwMergeConfigChange= !1,state.cachedTwMerge=createTwMerge(state.cachedTwMergeConfig)),state.cachedTwMerge(base2)||void 0)},cnMerge=(...classnames)=>config2=>executeMerge(classnames,config2),{tv}=getTailwindVariants(cnMerge);const buttonVariants=tv({base:"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium outlin\ e-none transition-all focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white", outline:"bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border",secondary:"dark:bg-secondary dark:text-secondary-foreground bg-background shadow-sm text-foreground hover:bg-muted-foreground/20",ghost:"hover:text-accent-foreground hover:bg-muted-foreground/10 backdrop-blur-sm",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg\ ]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4","icon-lg":"size-10",icon:"size-9","icon-sm":"size-5 rounded-sm"}},defaultVariants:{variant:"default",size:"default"}});var root_1$17=from_html(""),root_2$1v=from_html("");function Button($$anchor,$$props){push$1($$props,!0);let variant=prop($$props,"variant",3,"default"),size2=prop($$props,"size",3,"default"),ref2=prop($$props,"ref",15,null),href=prop($$props,"href",3,void 0),type2=prop($$props,"type",3,"button"),restProps=rest_props( $$props,["$$slots","$$events","$$legacy","class","variant","size","ref","href","type","disabled","children"]);var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var a=root_1$17();attribute_effect(a,$0=>({"data-slot":"button",class:$0,href:$$props.disabled?void 0:href(),"aria-disabled":$$props.disabled,role:$$props.disabled?"link":void 0,tabindex:$$props.disabled?-1:void 0,...restProps}),[()=>cn$1(buttonVariants({variant:variant(),size:size2()}),$$props.class)],void 0, void 0,"svelte-1q39rn8");var node_1=child(a);snippet(node_1,()=>$$props.children??noop$3),reset(a),bind_this(a,$$value=>ref2($$value),()=>ref2()),append($$anchor2,a)},alternate=$$anchor2=>{var button=root_2$1v();attribute_effect(button,$0=>({"data-slot":"button",class:$0,type:type2(),disabled:$$props.disabled,...restProps}),[()=>cn$1(buttonVariants({variant:variant(),size:size2()}),$$props.class)],void 0,void 0,"svelte-1q39rn8");var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3), reset(button),bind_this(button,$$value=>ref2($$value),()=>ref2()),append($$anchor2,button)};if_block(node2,$$render=>{href()?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}function isFunction$2(value){return typeof value=="function"}function isObject$2(value){return value!==null&&typeof value=="object"}const CLASS_VALUE_PRIMITIVE_TYPES=["string","number","bigint","boolean"];function isClassValue(value){return value==null||CLASS_VALUE_PRIMITIVE_TYPES.includes(typeof value)? !0:Array.isArray(value)?value.every(item=>isClassValue(item)):typeof value=="object"?Object.getPrototypeOf(value)===Object.prototype:!1}const BoxSymbol$1=Symbol("box"),isWritableSymbol$1=Symbol("is-writable");function boxWith$1(getter,setter){const derived2=user_derived(getter);return setter?{[BoxSymbol$1]:!0,[isWritableSymbol$1]:!0,get current(){return get$4(derived2)},set current(v){setter(v)}}:{[BoxSymbol$1]:!0,get current(){return getter()}}}function isBox$1(value){return isObject$2(value)&& BoxSymbol$1 in value}function isWritableBox$1(value){return isBox$1(value)&&isWritableSymbol$1 in value}function boxFrom$1(value){return isBox$1(value)?value:isFunction$2(value)?boxWith$1(value):simpleBox(value)}function boxFlatten$1(boxes){return Object.entries(boxes).reduce((acc,[key2,b])=>isBox$1(b)?(isWritableBox$1(b)?Object.defineProperty(acc,key2,{get(){return b.current},set(v){b.current=v}}):Object.defineProperty(acc,key2,{get(){return b.current}}),acc):Object.assign(acc,{[key2]:b}),{})}function toReadonlyBox$1(b){ return isWritableBox$1(b)?{[BoxSymbol$1]:!0,get current(){return b.current}}:b}function simpleBox(initialValue){let current2=state$1(proxy(initialValue));return{[BoxSymbol$1]:!0,[isWritableSymbol$1]:!0,get current(){return get$4(current2)},set current(v){set$1(current2,v,!0)}}}function box$1(initialValue){let current2=state$1(proxy(initialValue));return{[BoxSymbol$1]:!0,[isWritableSymbol$1]:!0,get current(){return get$4(current2)},set current(v){set$1(current2,v,!0)}}}box$1.from=boxFrom$1;box$1. with=boxWith$1;box$1.flatten=boxFlatten$1;box$1.readonly=toReadonlyBox$1;box$1.isBox=isBox$1;box$1.isWritableBox=isWritableBox$1;function composeHandlers(...handlers2){return function(e){for(const handler of handlers2)if(handler){if(e.defaultPrevented)return;typeof handler=="function"?handler.call(this,e):handler.current?.call(this,e)}}}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(x){ return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x}var cjs={},inlineStyleParser,hasRequiredInlineStyleParser;function requireInlineStyleParser(){if(hasRequiredInlineStyleParser)return inlineStyleParser;hasRequiredInlineStyleParser=1;var COMMENT_REGEX=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,NEWLINE_REGEX=/\n/g,WHITESPACE_REGEX=/^\s*/,PROPERTY_REGEX=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,COLON_REGEX=/^:\s*/,VALUE_REGEX=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, SEMICOLON_REGEX=/^[;\s]*/,TRIM_REGEX=/^\s+|\s+$/g,NEWLINE2=` `,FORWARD_SLASH="/",ASTERISK="*",EMPTY_STRING="",TYPE_COMMENT="comment",TYPE_DECLARATION="declaration";inlineStyleParser=function(style2,options){if(typeof style2!="string")throw new TypeError("First argument must be a string");if(!style2)return[];options=options||{};var lineno=1,column=1;function updatePosition(str){var lines=str.match(NEWLINE_REGEX);lines&&(lineno+=lines.length);var i=str.lastIndexOf(NEWLINE2);column=~i?str.length-i:column+str.length}function position2(){var start2={line:lineno, column};return function(node2){return node2.position=new Position(start2),whitespace2(),node2}}function Position(start2){this.start=start2,this.end={line:lineno,column},this.source=options.source}Position.prototype.content=style2;function error2(msg){var err=new Error(options.source+":"+lineno+":"+column+": "+msg);if(err.reason=msg,err.filename=options.source,err.line=lineno,err.column=column,err.source=style2,!options.silent)throw err}function match(re2){var m=re2.exec(style2);if(m){var str=m[0]; return updatePosition(str),style2=style2.slice(str.length),m}}function whitespace2(){match(WHITESPACE_REGEX)}function comments(rules2){var c2;for(rules2=rules2||[];c2=comment2();)c2!==!1&&rules2.push(c2);return rules2}function comment2(){var pos=position2();if(!(FORWARD_SLASH!=style2.charAt(0)||ASTERISK!=style2.charAt(1))){for(var i=2;EMPTY_STRING!=style2.charAt(i)&&(ASTERISK!=style2.charAt(i)||FORWARD_SLASH!=style2.charAt(i+1));)++i;if(i+=2,EMPTY_STRING===style2.charAt(i-1))return error2("End o\ f comment missing");var str=style2.slice(2,i-2);return column+=2,updatePosition(str),style2=style2.slice(i),column+=2,pos({type:TYPE_COMMENT,comment:str})}}function declaration(){var pos=position2(),prop2=match(PROPERTY_REGEX);if(prop2){if(comment2(),!match(COLON_REGEX))return error2("property missing ':'");var val=match(VALUE_REGEX),ret=pos({type:TYPE_DECLARATION,property:trim(prop2[0].replace(COMMENT_REGEX,EMPTY_STRING)),value:val?trim(val[0].replace(COMMENT_REGEX,EMPTY_STRING)):EMPTY_STRING}); return match(SEMICOLON_REGEX),ret}}function declarations(){var decls=[];comments(decls);for(var decl;decl=declaration();)decl!==!1&&(decls.push(decl),comments(decls));return decls}return whitespace2(),declarations()};function trim(str){return str?str.replace(TRIM_REGEX,EMPTY_STRING):EMPTY_STRING}return inlineStyleParser}var hasRequiredCjs;function requireCjs(){if(hasRequiredCjs)return cjs;hasRequiredCjs=1;var __importDefault=cjs&&cjs.__importDefault||function(mod){return mod&&mod.__esModule?mod: {default:mod}};Object.defineProperty(cjs,"__esModule",{value:!0}),cjs.default=StyleToObject2;var inline_style_parser_1=__importDefault(requireInlineStyleParser());function StyleToObject2(style2,iterator){var styleObject=null;if(!style2||typeof style2!="string")return styleObject;var declarations=(0,inline_style_parser_1.default)(style2),hasIterator=typeof iterator=="function";return declarations.forEach(function(declaration){if(declaration.type==="declaration"){var property=declaration.property, value=declaration.value;hasIterator?iterator(property,value,declaration):value&&(styleObject=styleObject||{},styleObject[property]=value)}}),styleObject}return cjs}var cjsExports=requireCjs();const StyleToObject=getDefaultExportFromCjs(cjsExports),parse$4=StyleToObject.default||StyleToObject,NUMBER_CHAR_RE=/\d/,STR_SPLITTERS=["-","_","/","."];function isUppercase(char=""){if(!NUMBER_CHAR_RE.test(char))return char!==char.toLowerCase()}function splitByCase(str){const parts=[];let buff="",previousUpper, previousSplitter;for(const char of str){const isSplitter=STR_SPLITTERS.includes(char);if(isSplitter===!0){parts.push(buff),buff="",previousUpper=void 0;continue}const isUpper=isUppercase(char);if(previousSplitter===!1){if(previousUpper===!1&&isUpper===!0){parts.push(buff),buff=char,previousUpper=isUpper;continue}if(previousUpper===!0&&isUpper===!1&&buff.length>1){const lastChar=buff.at(-1);parts.push(buff.slice(0,Math.max(0,buff.length-1))),buff=lastChar+char,previousUpper=isUpper;continue}}buff+= char,previousUpper=isUpper,previousSplitter=isSplitter}return parts.push(buff),parts}function pascalCase(str){return str?splitByCase(str).map(p2=>upperFirst(p2)).join(""):""}function camelCase(str){return lowerFirst(pascalCase(str||""))}function upperFirst(str){return str?str[0].toUpperCase()+str.slice(1):""}function lowerFirst(str){return str?str[0].toLowerCase()+str.slice(1):""}function cssToStyleObj(css2){if(!css2)return{};const styleObj={};function iterator(name,value){if(name.startsWith("-m\ oz-")||name.startsWith("-webkit-")||name.startsWith("-ms-")||name.startsWith("-o-")){styleObj[pascalCase(name)]=value;return}if(name.startsWith("--")){styleObj[name]=value;return}styleObj[camelCase(name)]=value}return parse$4(css2,iterator),styleObj}function executeCallbacks(...callbacks){return(...args)=>{for(const callback of callbacks)typeof callback=="function"&&callback(...args)}}function createParser$2(matcher,replacer){const regex=RegExp(matcher,"g");return str=>{if(typeof str!="string")throw new TypeError( `expected an argument of type string, but got ${typeof str}`);return str.match(regex)?str.replace(regex,replacer):str}}const camelToKebab$1=createParser$2(/[A-Z]/,match=>`-${match.toLowerCase()}`);function styleToCSS$1(styleObj){if(!styleObj||typeof styleObj!="object"||Array.isArray(styleObj))throw new TypeError(`expected an argument of type object, but got ${typeof styleObj}`);return Object.keys(styleObj).map(property=>`${camelToKebab$1(property)}: ${styleObj[property]};`).join(` `)}function styleToString$1(style2={}){return styleToCSS$1(style2).replace(` `," ")}const EVENT_LIST=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchan\ ge","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onp\ ointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","\ onwebkittransitionend","onwheel"],EVENT_LIST_SET=new Set(EVENT_LIST);function isEventHandler(key2){return EVENT_LIST_SET.has(key2)}function mergeProps(...args){const result={...args[0]};for(let i=1;iv_reactions.has(r2));needs_version_increase&&increment$1(version2)}return res}delete(key2){var sources=this.#sources,s2=sources.get(key2),res=super.delete(key2);return s2!==void 0&&(sources.delete(key2),set$1(this.#size,super.size),set$1(s2,-1),increment$1(this.#version)),res}clear(){if(super.size!==0){super.clear();var sources=this.#sources; set$1(this.#size,0);for(var s2 of sources.values())set$1(s2,-1);increment$1(this.#version),sources.clear()}}#read_all(){get$4(this.#version);var sources=this.#sources;if(this.#size.v!==sources.size){for(var key2 of super.keys())if(!sources.has(key2)){var s2=this.#source(0);sources.set(key2,s2)}}for([,s2]of this.#sources)get$4(s2)}keys(){return get$4(this.#version),super.keys()}values(){return this.#read_all(),super.values()}entries(){return this.#read_all(),super.entries()}[Symbol.iterator](){return this. entries()}get size(){return get$4(this.#size),super.size}}class ReactiveValue{#fn;#subscribe;constructor(fn,onsubscribe){this.#fn=fn,this.#subscribe=createSubscriber(onsubscribe)}get current(){return this.#subscribe(),this.#fn()}}const parenthesis_regex=/\(.+\)/,non_parenthesized_keywords=new Set(["all","print","screen","and","or","not","only"]);class MediaQuery extends ReactiveValue{constructor(query,fallback2){let final_query=parenthesis_regex.test(query)||query.split(/[\s,]+/).some(keyword2=>non_parenthesized_keywords. has(keyword2.trim()))?query:`(${query})`;const q2=window.matchMedia(final_query);super(()=>q2.matches,update2=>on(q2,"change",update2))}}let ActiveElement$3=class{#document;#subscribe;constructor(options={}){const{window:window2=defaultWindow$3,document:document2=window2?.document}=options;window2!==void 0&&(this.#document=document2,this.#subscribe=createSubscriber(update2=>{const cleanupFocusIn=on(window2,"focusin",update2),cleanupFocusOut=on(window2,"focusout",update2);return()=>{cleanupFocusIn(), cleanupFocusOut()}}))}get current(){return this.#subscribe?.(),this.#document?getActiveElement$4(this.#document):null}};new ActiveElement$3;function isFunction$1(value){return typeof value=="function"}function extract(value,defaultValue){if(isFunction$1(value)){const gotten=value();return gotten===void 0?defaultValue:gotten}return value===void 0?defaultValue:value}let Context$1=class{#name;#key;constructor(name){this.#name=name,this.#key=Symbol(name)}get key(){return this.#key}exists(){return hasContext( this.#key)}get(){const context=getContext(this.#key);if(context===void 0)throw new Error(`Context "${this.#name}" not found`);return context}getOr(fallback2){const context=getContext(this.#key);return context===void 0?fallback2:context}set(context){return setContext(this.#key,context)}};function useDebounce(callback,wait){let context=state$1(null);const wait$=user_derived(()=>extract(wait,250));function debounced(...args){if(get$4(context))get$4(context).timeout&&clearTimeout(get$4(context).timeout);else{ let resolve2,reject;const promise=new Promise((res,rej)=>{resolve2=res,reject=rej});set$1(context,{timeout:null,runner:null,promise,resolve:resolve2,reject},!0)}return get$4(context).runner=async()=>{if(!get$4(context))return;const ctx=get$4(context);set$1(context,null);try{ctx.resolve(await callback.apply(this,args))}catch(error2){ctx.reject(error2)}},get$4(context).timeout=setTimeout(get$4(context).runner,get$4(wait$)),get$4(context).promise}return debounced.cancel=async()=>{(!get$4(context)|| get$4(context).timeout===null)&&(await new Promise(resolve2=>setTimeout(resolve2,0)),!get$4(context)||get$4(context).timeout===null)||(clearTimeout(get$4(context).timeout),get$4(context).reject("Cancelled"),set$1(context,null))},debounced.runScheduledNow=async()=>{(!get$4(context)||!get$4(context).timeout)&&(await new Promise(resolve2=>setTimeout(resolve2,0)),!get$4(context)||!get$4(context).timeout)||(clearTimeout(get$4(context).timeout),get$4(context).timeout=null,await get$4(context).runner?.())}, Object.defineProperty(debounced,"pending",{enumerable:!0,get(){return!!get$4(context)?.timeout}}),debounced}function runEffect$1(flush,effect2){switch(flush){case"post":user_effect(effect2);break;case"pre":user_pre_effect(effect2);break}}function runWatcher$1(sources,flush,effect2,options={}){const{lazy=!1}=options;let active=!lazy,previousValues=Array.isArray(sources)?[]:void 0;runEffect$1(flush,()=>{const values=Array.isArray(sources)?sources.map(source2=>source2()):sources();if(!active){active= !0,previousValues=values;return}const cleanup=untrack$1(()=>effect2(values,previousValues));return previousValues=values,cleanup})}function watch$1(sources,effect2,options){runWatcher$1(sources,"post",effect2,options)}function watchPre$1(sources,effect2,options){runWatcher$1(sources,"pre",effect2,options)}watch$1.pre=watchPre$1;function get$1(value){return isFunction$1(value)?value():value}class ElementSize{#size={width:0,height:0};#observed=!1;#options;#node;#window;#width=user_derived(()=>(get$4( this.#subscribe)?.(),this.getSize().width));#height=user_derived(()=>(get$4(this.#subscribe)?.(),this.getSize().height));#subscribe=user_derived(()=>{const node$=get$1(this.#node);if(node$)return createSubscriber(update2=>{if(!this.#window)return;const observer=new this.#window.ResizeObserver(entries=>{this.#observed=!0;for(const entry of entries){const boxSize=this.#options.box==="content-box"?entry.contentBoxSize:entry.borderBoxSize,boxSizeArr=Array.isArray(boxSize)?boxSize:[boxSize];this.#size. width=boxSizeArr.reduce((acc,size2)=>Math.max(acc,size2.inlineSize),0),this.#size.height=boxSizeArr.reduce((acc,size2)=>Math.max(acc,size2.blockSize),0)}update2()});return observer.observe(node$),()=>{this.#observed=!1,observer.disconnect()}})});constructor(node2,options={box:"border-box"}){this.#window=options.window??defaultWindow$3,this.#options=options,this.#node=node2,this.#size={width:0,height:0}}calculateSize(){const element2=get$1(this.#node);if(!element2||!this.#window)return;const offsetWidth=element2. offsetWidth,offsetHeight=element2.offsetHeight;if(this.#options.box==="border-box")return{width:offsetWidth,height:offsetHeight};const style2=this.#window.getComputedStyle(element2),paddingWidth=parseFloat(style2.paddingLeft)+parseFloat(style2.paddingRight),paddingHeight=parseFloat(style2.paddingTop)+parseFloat(style2.paddingBottom),borderWidth=parseFloat(style2.borderLeftWidth)+parseFloat(style2.borderRightWidth),borderHeight=parseFloat(style2.borderTopWidth)+parseFloat(style2.borderBottomWidth), contentWidth=offsetWidth-paddingWidth-borderWidth,contentHeight=offsetHeight-paddingHeight-borderHeight;return{width:contentWidth,height:contentHeight}}getSize(){return this.#observed?this.#size:this.calculateSize()??this.#size}get current(){return get$4(this.#subscribe)?.(),this.getSize()}get width(){return get$4(this.#width)}get height(){return get$4(this.#height)}}class IsMounted{#isMounted=state$1(!1);constructor(){user_effect(()=>(untrack$1(()=>set$1(this.#isMounted,!0)),()=>{set$1(this.#isMounted, !1)}))}get current(){return get$4(this.#isMounted)}}class Previous{#previousCallback=()=>{};#previous=user_derived(()=>this.#previousCallback());constructor(getter,initialValue){let actualPrevious;initialValue!==void 0&&(actualPrevious=initialValue),this.#previousCallback=()=>{try{return actualPrevious}finally{actualPrevious=getter()}}}get current(){return get$4(this.#previous)}}function onDestroyEffect(fn){user_effect(()=>()=>{fn()})}function onMountEffect(fn){user_effect(()=>untrack$1(()=>fn()))} function afterSleep(ms,cb){return setTimeout(cb,ms)}function afterTick(fn){tick().then(fn)}const ELEMENT_NODE=1,DOCUMENT_NODE=9,DOCUMENT_FRAGMENT_NODE=11;function isHTMLElement$2(node2){return isObject$2(node2)&&node2.nodeType===ELEMENT_NODE&&typeof node2.nodeName=="string"}function isDocument(node2){return isObject$2(node2)&&node2.nodeType===DOCUMENT_NODE}function isWindow(node2){return isObject$2(node2)&&node2.constructor?.name==="VisualViewport"}function isNode$1(node2){return isObject$2(node2)&& node2.nodeType!==void 0}function isShadowRoot$1(node2){return isNode$1(node2)&&node2.nodeType===DOCUMENT_FRAGMENT_NODE&&"host"in node2}function contains$3(parent,child2){if(!parent||!child2||!isHTMLElement$2(parent)||!isHTMLElement$2(child2))return!1;const rootNode=child2.getRootNode?.();if(parent===child2||parent.contains(child2))return!0;if(rootNode&&isShadowRoot$1(rootNode)){let next2=child2;for(;next2;){if(parent===next2)return!0;next2=next2.parentNode||next2.host}}return!1}function getDocument$1(node2){ return isDocument(node2)?node2:isWindow(node2)?node2.document:node2?.ownerDocument??document}function getWindow$1(node2){return isShadowRoot$1(node2)?getWindow$1(node2.host):isDocument(node2)?node2.defaultView??window:isHTMLElement$2(node2)?node2.ownerDocument?.defaultView??window:window}function getActiveElement$3(rootNode){let activeElement=rootNode.activeElement;for(;activeElement?.shadowRoot;){const el=activeElement.shadowRoot.activeElement;if(el===activeElement)break;activeElement=el}return activeElement} class DOMContext{element;#root=user_derived(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return get$4(this.#root)}set root(value){set$1(this.#root,value)}constructor(element2){typeof element2=="function"?this.element=boxWith$1(element2):this.element=element2}getDocument=()=>getDocument$1(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>getActiveElement$3(this.root);isActiveElement=node2=>node2===this.getActiveElement();getElementById(id2){ return this.root.getElementById(id2)}querySelector=selector=>this.root?this.root.querySelector(selector):null;querySelectorAll=selector=>this.root?this.root.querySelectorAll(selector):[];setTimeout=(callback,delay)=>this.getWindow().setTimeout(callback,delay);clearTimeout=timeoutId=>this.getWindow().clearTimeout(timeoutId)}function attachRef(ref2,onChange){return{[createAttachmentKey()]:node2=>isBox$1(ref2)?(ref2.current=node2,untrack$1(()=>onChange?.(node2)),()=>{"isConnected"in node2&&node2.isConnected|| (ref2.current=null,onChange?.(null))}):(ref2(node2),untrack$1(()=>onChange?.(node2)),()=>{"isConnected"in node2&&node2.isConnected||(ref2(null),onChange?.(null))})}}function boolToStr(condition){return condition?"true":"false"}function boolToStrTrueOrUndef(condition){return condition?"true":void 0}function boolToEmptyStrOrUndef(condition){return condition?"":void 0}function boolToTrueOrUndef(condition){return condition?!0:void 0}function getDataOpenClosed(condition){return condition?"open":"clos\ ed"}function getDataChecked(condition){return condition?"checked":"unchecked"}function getAriaChecked(checked,indeterminate){return indeterminate?"mixed":checked?"true":"false"}class BitsAttrs{#variant;#prefix;attrs;constructor(config2){this.#variant=config2.getVariant?config2.getVariant():null,this.#prefix=this.#variant?`data-${this.#variant}-`:`data-${config2.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(config2.parts.map( part=>[part,this.getAttr(part)]))}getAttr(part,variantOverride){return variantOverride?`data-${variantOverride}-${part}`:`${this.#prefix}${part}`}selector(part,variantOverride){return`[${this.getAttr(part,variantOverride)}]`}}function createBitsAttrs(config2){const bitsAttrs=new BitsAttrs(config2);return{...bitsAttrs.attrs,selector:bitsAttrs.selector,getAttr:bitsAttrs.getAttr}}const ARROW_DOWN="ArrowDown",ARROW_LEFT="ArrowLeft",ARROW_RIGHT="ArrowRight",ARROW_UP="ArrowUp",END="End",ENTER="Enter", ESCAPE="Escape",HOME="Home",PAGE_DOWN="PageDown",PAGE_UP="PageUp",SPACE=" ",TAB="Tab";function getElemDirection(elem){return window.getComputedStyle(elem).getPropertyValue("direction")}function getNextKey(dir="ltr",orientation="horizontal"){return{horizontal:dir==="rtl"?ARROW_LEFT:ARROW_RIGHT,vertical:ARROW_DOWN}[orientation]}function getPrevKey(dir="ltr",orientation="horizontal"){return{horizontal:dir==="rtl"?ARROW_RIGHT:ARROW_LEFT,vertical:ARROW_UP}[orientation]}function getDirectionalKeys(dir="\ ltr",orientation="horizontal"){return["ltr","rtl"].includes(dir)||(dir="ltr"),["horizontal","vertical"].includes(orientation)||(orientation="horizontal"),{nextKey:getNextKey(dir,orientation),prevKey:getPrevKey(dir,orientation)}}const isBrowser$2=typeof document<"u",isIOS=getIsIOS();function getIsIOS(){return isBrowser$2&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function isHTMLElement$1(element2){ return element2 instanceof HTMLElement}function isElement$1(element2){return element2 instanceof Element}function isElementOrSVGElement(element2){return element2 instanceof Element||element2 instanceof SVGElement}function isTouch(e){return e.pointerType==="touch"}function isFocusVisible(element2){return element2.matches(":focus-visible")}function isNotNull(value){return value!==null}function isSelectableInput(element2){return element2 instanceof HTMLInputElement&&"select"in element2}class RovingFocusGroup{#opts;#currentTabStopId=box$1( null);constructor(opts){this.#opts=opts}getCandidateNodes(){return this.#opts.rootNode.current?this.#opts.candidateSelector?Array.from(this.#opts.rootNode.current.querySelectorAll(this.#opts.candidateSelector)):this.#opts.candidateAttr?Array.from(this.#opts.rootNode.current.querySelectorAll(`[${this.#opts.candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){const items2=this.getCandidateNodes();items2.length&&items2[0]?.focus()}handleKeydown(node2,e,both=!1){const rootNode=this.#opts. rootNode.current;if(!rootNode||!node2)return;const items2=this.getCandidateNodes();if(!items2.length)return;const currentIndex=items2.indexOf(node2),dir=getElemDirection(rootNode),{nextKey,prevKey}=getDirectionalKeys(dir,this.#opts.orientation.current),loop2=this.#opts.loop.current,keyToIndex={[nextKey]:currentIndex+1,[prevKey]:currentIndex-1,[HOME]:0,[END]:items2.length-1};if(both){const altNextKey=nextKey===ARROW_DOWN?ARROW_RIGHT:ARROW_DOWN,altPrevKey=prevKey===ARROW_UP?ARROW_LEFT:ARROW_UP;keyToIndex[altNextKey]= currentIndex+1,keyToIndex[altPrevKey]=currentIndex-1}let itemIndex=keyToIndex[e.key];if(itemIndex===void 0)return;e.preventDefault(),itemIndex<0&&loop2?itemIndex=items2.length-1:itemIndex===items2.length&&loop2&&(itemIndex=0);const itemToFocus=items2[itemIndex];if(itemToFocus)return itemToFocus.focus(),this.#currentTabStopId.current=itemToFocus.id,this.#opts.onCandidateFocus?.(itemToFocus),itemToFocus}getTabIndex(node2){const items2=this.getCandidateNodes(),anyActive=this.#currentTabStopId.current!== null;return node2&&!anyActive&&items2[0]===node2?(this.#currentTabStopId.current=node2.id,0):node2?.id===this.#currentTabStopId.current?0:-1}setCurrentTabStopId(id2){this.#currentTabStopId.current=id2}focusCurrentTabStop(){const currentTabStopId=this.#currentTabStopId.current;if(!currentTabStopId)return;const currentTabStop=this.#opts.rootNode.current?.querySelector(`#${currentTabStopId}`);!currentTabStop||!isHTMLElement$1(currentTabStop)||currentTabStop.focus()}}class AnimationsComplete{#opts;#currentFrame=null;constructor(opts){ this.#opts=opts,onDestroyEffect(()=>this.#cleanup())}#cleanup(){this.#currentFrame&&(window.cancelAnimationFrame(this.#currentFrame),this.#currentFrame=null)}run(fn){this.#cleanup();const node2=this.#opts.ref.current;if(node2){if(typeof node2.getAnimations!="function"){this.#executeCallback(fn);return}this.#currentFrame=window.requestAnimationFrame(()=>{const animations=node2.getAnimations();if(animations.length===0){this.#executeCallback(fn);return}Promise.allSettled(animations.map(animation=>animation. finished)).then(()=>{this.#executeCallback(fn)})})}}#executeCallback(fn){const execute=()=>{fn()};this.#opts.afterTick?afterTick(execute):execute()}}class PresenceManager{#opts;#enabled;#afterAnimations;#shouldRender=state$1(!1);constructor(opts){this.#opts=opts,set$1(this.#shouldRender,opts.open.current,!0),this.#enabled=opts.enabled??!0,this.#afterAnimations=new AnimationsComplete({ref:this.#opts.ref,afterTick:this.#opts.open}),watch$1(()=>this.#opts.open.current,isOpen=>{isOpen&&set$1(this.#shouldRender, !0),this.#enabled&&this.#afterAnimations.run(()=>{isOpen===this.#opts.open.current&&(this.#opts.open.current||set$1(this.#shouldRender,!1),this.#opts.onComplete?.())})})}get shouldRender(){return get$4(this.#shouldRender)}}function noop$1(){}function createId(prefixOrUid,uid){return`bits-${prefixOrUid}`}const dialogAttrs=createBitsAttrs({component:"dialog",parts:["content","trigger","overlay","title","description","close","cancel","action"]}),DialogRootContext=new Context$1("Dialog.Root | AlertD\ ialog.Root");class DialogRootState{static create(opts){const parent=DialogRootContext.getOr(null);return DialogRootContext.set(new DialogRootState(opts,parent))}opts;#triggerNode=state$1(null);get triggerNode(){return get$4(this.#triggerNode)}set triggerNode(value){set$1(this.#triggerNode,value,!0)}#contentNode=state$1(null);get contentNode(){return get$4(this.#contentNode)}set contentNode(value){set$1(this.#contentNode,value,!0)}#overlayNode=state$1(null);get overlayNode(){return get$4(this.#overlayNode)}set overlayNode(value){ set$1(this.#overlayNode,value,!0)}#descriptionNode=state$1(null);get descriptionNode(){return get$4(this.#descriptionNode)}set descriptionNode(value){set$1(this.#descriptionNode,value,!0)}#contentId=state$1(void 0);get contentId(){return get$4(this.#contentId)}set contentId(value){set$1(this.#contentId,value,!0)}#titleId=state$1(void 0);get titleId(){return get$4(this.#titleId)}set titleId(value){set$1(this.#titleId,value,!0)}#triggerId=state$1(void 0);get triggerId(){return get$4(this.#triggerId)}set triggerId(value){ set$1(this.#triggerId,value,!0)}#descriptionId=state$1(void 0);get descriptionId(){return get$4(this.#descriptionId)}set descriptionId(value){set$1(this.#descriptionId,value,!0)}#cancelNode=state$1(null);get cancelNode(){return get$4(this.#cancelNode)}set cancelNode(value){set$1(this.#cancelNode,value,!0)}#nestedOpenCount=state$1(0);get nestedOpenCount(){return get$4(this.#nestedOpenCount)}set nestedOpenCount(value){set$1(this.#nestedOpenCount,value,!0)}depth;parent;contentPresence;overlayPresence;constructor(opts,parent){ this.opts=opts,this.parent=parent,this.depth=parent?parent.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new PresenceManager({ref:boxWith$1(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new PresenceManager({ref:boxWith$1(()=>this.overlayNode),open:this.opts.open,enabled:!0}),watch$1(()=>this.opts.open.current,isOpen=>{ this.parent&&(isOpen?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),onDestroyEffect(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=part=>dialogAttrs.getAttr(part,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--, this.parent?.decrementNested())}#sharedProps=user_derived(()=>({"data-state":getDataOpenClosed(this.opts.open.current)}));get sharedProps(){return get$4(this.#sharedProps)}set sharedProps(value){set$1(this.#sharedProps,value)}}class DialogCloseState{static create(opts){return new DialogCloseState(opts,DialogRootContext.get())}opts;root;attachment;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this. onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===SPACE||e.key===ENTER)&&(e.preventDefault(),this.root.handleClose())}#props=user_derived(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return get$4(this.#props)}set props(value){ set$1(this.#props,value)}}class DialogActionState{static create(opts){return new DialogActionState(opts,DialogRootContext.get())}opts;root;attachment;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref)}#props=user_derived(()=>({id:this.opts.id.current,[this.root.getBitsAttr("action")]:"",...this.root.sharedProps,...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class DialogTitleState{static create(opts){ return new DialogTitleState(opts,DialogRootContext.get())}opts;root;attachment;constructor(opts,root2){this.opts=opts,this.root=root2,this.root.titleId=this.opts.id.current,this.attachment=attachRef(this.opts.ref),watch$1.pre(()=>this.opts.id.current,id2=>{this.root.titleId=id2})}#props=user_derived(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.getBitsAttr("title")]:"",...this.root.sharedProps,...this.attachment}));get props(){return get$4(this.#props)}set props(value){ set$1(this.#props,value)}}class DialogDescriptionState{static create(opts){return new DialogDescriptionState(opts,DialogRootContext.get())}opts;root;attachment;constructor(opts,root2){this.opts=opts,this.root=root2,this.root.descriptionId=this.opts.id.current,this.attachment=attachRef(this.opts.ref,v=>{this.root.descriptionNode=v}),watch$1.pre(()=>this.opts.id.current,id2=>{this.root.descriptionId=id2})}#props=user_derived(()=>({id:this.opts.id.current,[this.root.getBitsAttr("description")]:"",...this. root.sharedProps,...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class DialogContentState{static create(opts){return new DialogContentState(opts,DialogRootContext.get())}opts;root;attachment;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref,v=>{this.root.contentNode=v,this.root.contentId=v?.id})}#snippetProps=user_derived(()=>({open:this.root.opts.open.current}));get snippetProps(){return get$4(this.#snippetProps)}set snippetProps(value){ set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr("content")]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:"layou\ t style paint"},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,"data-nested-open":boolToEmptyStrOrUndef(this.root.nestedOpenCount>0),"data-nested":boolToEmptyStrOrUndef(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}get shouldRender(){return this.root.contentPresence.shouldRender}}class DialogOverlayState{static create(opts){return new DialogOverlayState(opts,DialogRootContext. get())}opts;root;attachment;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref,v=>this.root.overlayNode=v)}#snippetProps=user_derived(()=>({open:this.root.opts.open.current}));get snippetProps(){return get$4(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,[this.root.getBitsAttr("overlay")]:"",style:{pointerEvents:"auto","--bits-dialog-depth":this.root.depth,"--bits-dialog-nes\ ted-count":this.root.nestedOpenCount},"data-nested-open":boolToEmptyStrOrUndef(this.root.nestedOpenCount>0),"data-nested":boolToEmptyStrOrUndef(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}get shouldRender(){return this.root.overlayPresence.shouldRender}}class AlertDialogCancelState{static create(opts){return new AlertDialogCancelState(opts,DialogRootContext.get())}opts;root;attachment;constructor(opts,root2){ this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref,v=>this.root.cancelNode=v),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===SPACE||e.key===ENTER)&&(e.preventDefault(),this.root.handleClose())}#props=user_derived(()=>({id:this.opts.id.current,[this.root.getBitsAttr("cancel")]:"",onclick:this.onclick,onkeydown:this.onkeydown, tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}function Alert_dialog($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1);DialogRootState.create({variant:boxWith$1(()=>"alert-dialog"),open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),onOpenChangeComplete:boxWith$1( ()=>onOpenChangeComplete())});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}var root_2$1u=from_html("
");function Dialog_title$1($$anchor,$$props){const uid=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)),ref2=prop($$props,"ref",15,null),level=prop($$props,"level",3,2),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const titleState=DialogTitleState. create({id:boxWith$1(()=>id2()),level:boxWith$1(()=>level()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,titleState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$4(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1u();attribute_effect(div,()=>({...get$4(mergedProps)}));var node_2=child( div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}var root_2$1t=from_html("");function Alert_dialog_action$1($$anchor,$$props){const uid=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child", "id","ref"]);const actionState=DialogActionState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,actionState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$4(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var button=root_2$1t();attribute_effect(button,()=>({ ...get$4(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor2,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}var root_2$1s=from_html("");function Alert_dialog_cancel$1($$anchor,$$props){const uid=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)),ref2=prop($$props,"ref",15,null),disabled=prop($$props,"disabl\ ed",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","children","child","disabled"]);const cancelState=AlertDialogCancelState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),disabled:boxWith$1(()=>!!disabled())}),mergedProps=user_derived(()=>mergeProps(restProps,cancelState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props. child,()=>({props:get$4(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var button=root_2$1s();attribute_effect(button,()=>({...get$4(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor2,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}function Portal_consumer($$anchor,$$props){var fragment=comment$2(),node2=first_child(fragment);key$1( node2,()=>$$props.children,$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.children??noop$3),append($$anchor2,fragment_1)}),append($$anchor,fragment)}const BitsConfigContext=new Context$1("BitsConfig");function getBitsConfig(){const fallback2=new BitsConfigState(null,{});return BitsConfigContext.getOr(fallback2).opts}class BitsConfigState{opts;constructor(parent,opts){const resolveConfigOption=createConfigResolver(parent,opts);this.opts={defaultPortalTo:resolveConfigOption( config2=>config2.defaultPortalTo),defaultLocale:resolveConfigOption(config2=>config2.defaultLocale)}}}function createConfigResolver(parent,currentOpts){return getter=>boxWith$1(()=>{const value=getter(currentOpts)?.current;if(value!==void 0)return value;if(parent!==null)return getter(parent.opts)?.current})}function createPropResolver(configOption,fallback2){return getProp=>{const config2=getBitsConfig();return boxWith$1(()=>{const propValue=getProp();if(propValue!==void 0)return propValue;const option2=configOption( config2).current;return option2!==void 0?option2:fallback2})}}const resolvePortalToProp=createPropResolver(config2=>config2.defaultPortalTo,"body");function Portal$2($$anchor,$$props){push$1($$props,!0);const to=resolvePortalToProp(()=>$$props.to),context=getAllContexts();let target2=user_derived(getTarget);function getTarget(){if(!isBrowser$2||$$props.disabled)return null;let localTarget=null;return typeof to.current=="string"?localTarget=document.querySelector(to.current):localTarget=to.current, localTarget}let instance;function unmountInstance(){instance&&(unmount(instance),instance=null)}watch$1([()=>get$4(target2),()=>$$props.disabled],([target3,disabled])=>{if(!target3||disabled){unmountInstance();return}return instance=mount(Portal_consumer,{target:target3,props:{children:$$props.children},context}),()=>{unmountInstance()}});var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props. children??noop$3),append($$anchor2,fragment_1)};if_block(node2,$$render=>{$$props.disabled&&$$render(consequent)})}append($$anchor,fragment),pop()}class CustomEventDispatcher{eventName;options;constructor(eventName,options={bubbles:!0,cancelable:!0}){this.eventName=eventName,this.options=options}createEvent(detail){return new CustomEvent(this.eventName,{...this.options,detail})}dispatch(element2,detail){const event2=this.createEvent(detail);return element2.dispatchEvent(event2),event2}listen(element2,callback,options){ const handler=event2=>{callback(event2)};return on(element2,this.eventName,handler,options)}}function debounce$1(fn,wait=500){let timeout=null;const debounced=(...args)=>{timeout!==null&&clearTimeout(timeout),timeout=setTimeout(()=>{fn(...args)},wait)};return debounced.destroy=()=>{timeout!==null&&(clearTimeout(timeout),timeout=null)},debounced}function isOrContainsTarget(node2,target2){return node2===target2||node2.contains(target2)}function getOwnerDocument(el){return el?.ownerDocument??document} function isClickTrulyOutside(event2,contentNode){const{clientX,clientY}=event2,rect=contentNode.getBoundingClientRect();return clientXrect.right||clientYrect.bottom}const SELECTION_KEYS=[ENTER,SPACE],FIRST_KEYS$1=[ARROW_DOWN,PAGE_UP,HOME],LAST_KEYS$1=[ARROW_UP,PAGE_DOWN,END],FIRST_LAST_KEYS$1=[...FIRST_KEYS$1,...LAST_KEYS$1],SUB_OPEN_KEYS={ltr:[...SELECTION_KEYS,ARROW_RIGHT],rtl:[...SELECTION_KEYS,ARROW_LEFT]},SUB_CLOSE_KEYS={ltr:[ARROW_LEFT],rtl:[ARROW_RIGHT]}; function isMouseEvent(event2){return event2.pointerType==="mouse"}function focus(element2,{select=!1}={}){if(!element2||!element2.focus)return;const doc=getDocument$1(element2);if(doc.activeElement===element2)return;const previouslyFocusedElement=doc.activeElement;element2.focus({preventScroll:!0}),element2!==previouslyFocusedElement&&isSelectableInput(element2)&&select&&element2.select()}function focusFirst(candidates,{select=!1}={},getActiveElement2){const previouslyFocusedElement=getActiveElement2(); for(const candidate of candidates)if(focus(candidate,{select}),getActiveElement2()!==previouslyFocusedElement)return!0}let isUsingKeyboard=state$1(!1);class IsUsingKeyboard{static _refs=0;static _cleanup;constructor(){user_effect(()=>(IsUsingKeyboard._refs===0&&(IsUsingKeyboard._cleanup=effect_root(()=>{const callbacksToDispose=[],handlePointer=_=>{set$1(isUsingKeyboard,!1)},handleKeydown=_=>{set$1(isUsingKeyboard,!0)};return callbacksToDispose.push(on(document,"pointerdown",handlePointer,{capture:!0}), on(document,"pointermove",handlePointer,{capture:!0}),on(document,"keydown",handleKeydown,{capture:!0})),executeCallbacks(...callbacksToDispose)})),IsUsingKeyboard._refs++,()=>{IsUsingKeyboard._refs--,IsUsingKeyboard._refs===0&&(set$1(isUsingKeyboard,!1),IsUsingKeyboard._cleanup?.())}))}get current(){return get$4(isUsingKeyboard)}set current(value){set$1(isUsingKeyboard,value,!0)}}var candidateSelectors=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","b\ utton:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],candidateSelector=candidateSelectors.join(","),NoElement=typeof Element>"u",matches=NoElement?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,getRootNode=!NoElement&&Element.prototype. getRootNode?function(element2){var _element$getRootNode;return element2==null||(_element$getRootNode=element2.getRootNode)===null||_element$getRootNode===void 0?void 0:_element$getRootNode.call(element2)}:function(element2){return element2?.ownerDocument},isInert=function isInert2(node2,lookUp){var _node$getAttribute;lookUp===void 0&&(lookUp=!0);var inertAtt=node2==null||(_node$getAttribute=node2.getAttribute)===null||_node$getAttribute===void 0?void 0:_node$getAttribute.call(node2,"inert"),inert=inertAtt=== ""||inertAtt==="true",result=inert||lookUp&&node2&&isInert2(node2.parentNode);return result},isContentEditable=function(node2){var _node$getAttribute2,attValue=node2==null||(_node$getAttribute2=node2.getAttribute)===null||_node$getAttribute2===void 0?void 0:_node$getAttribute2.call(node2,"contenteditable");return attValue===""||attValue==="true"},getCandidates=function(el,includeContainer,filter){if(isInert(el))return[];var candidates=Array.prototype.slice.apply(el.querySelectorAll(candidateSelector)); return includeContainer&&matches.call(el,candidateSelector)&&candidates.unshift(el),candidates=candidates.filter(filter),candidates},getCandidatesIteratively=function getCandidatesIteratively2(elements,includeContainer,options){for(var candidates=[],elementsToCheck=Array.from(elements);elementsToCheck.length;){var element2=elementsToCheck.shift();if(!isInert(element2,!1))if(element2.tagName==="SLOT"){var assigned=element2.assignedElements(),content2=assigned.length?assigned:element2.children,nestedCandidates=getCandidatesIteratively2( content2,!0,options);options.flatten?candidates.push.apply(candidates,nestedCandidates):candidates.push({scopeParent:element2,candidates:nestedCandidates})}else{var validCandidate=matches.call(element2,candidateSelector);validCandidate&&options.filter(element2)&&(includeContainer||!elements.includes(element2))&&candidates.push(element2);var shadowRoot=element2.shadowRoot||typeof options.getShadowRoot=="function"&&options.getShadowRoot(element2),validShadowRoot=!isInert(shadowRoot,!1)&&(!options. shadowRootFilter||options.shadowRootFilter(element2));if(shadowRoot&&validShadowRoot){var _nestedCandidates=getCandidatesIteratively2(shadowRoot===!0?element2.children:shadowRoot.children,!0,options);options.flatten?candidates.push.apply(candidates,_nestedCandidates):candidates.push({scopeParent:element2,candidates:_nestedCandidates})}else elementsToCheck.unshift.apply(elementsToCheck,element2.children)}}return candidates},hasTabIndex=function(node2){return!isNaN(parseInt(node2.getAttribute("tab\ index"),10))},getTabIndex=function(node2){if(!node2)throw new Error("No node provided");return node2.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(node2.tagName)||isContentEditable(node2))&&!hasTabIndex(node2)?0:node2.tabIndex},getSortOrderTabIndex=function(node2,isScope){var tabIndex=getTabIndex(node2);return tabIndex<0&&isScope&&!hasTabIndex(node2)?0:tabIndex},sortOrderedTabbables=function(a,b){return a.tabIndex===b.tabIndex?a.documentOrder-b.documentOrder:a.tabIndex-b.tabIndex},isInput=function(node2){ return node2.tagName==="INPUT"},isHiddenInput=function(node2){return isInput(node2)&&node2.type==="hidden"},isDetailsWithSummary=function(node2){var r2=node2.tagName==="DETAILS"&&Array.prototype.slice.apply(node2.children).some(function(child2){return child2.tagName==="SUMMARY"});return r2},getCheckedRadio=function(nodes2,form){for(var i=0;isummary:first-of-type"),nodeUnderDetails=isDirectSummary?node2.parentElement:node2;if(matches.call(nodeUnderDetails,"details:not([open]) *"))return!0;if(!displayCheck||displayCheck==="full"||displayCheck==="legacy-full"){if(typeof getShadowRoot=="function"){for(var originalNode=node2;node2;){var parentElement=node2.parentElement,rootNode=getRootNode( node2);if(parentElement&&!parentElement.shadowRoot&&getShadowRoot(parentElement)===!0)return isZeroArea(node2);node2.assignedSlot?node2=node2.assignedSlot:!parentElement&&rootNode!==node2.ownerDocument?node2=rootNode.host:node2=parentElement}node2=originalNode}if(isNodeAttached(node2))return!node2.getClientRects().length;if(displayCheck!=="legacy-full")return!0}else if(displayCheck==="non-zero-area")return isZeroArea(node2);return!1},isDisabledFromFieldset=function(node2){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/. test(node2.tagName))for(var parentNode=node2.parentElement;parentNode;){if(parentNode.tagName==="FIELDSET"&&parentNode.disabled){for(var i=0;i=0)},sortByOrder=function sortByOrder2(candidates){var regularTabbables=[],orderedTabbables=[];return candidates. forEach(function(item,i){var isScope=!!item.scopeParent,element2=isScope?item.scopeParent:item,candidateTabindex=getSortOrderTabIndex(element2,isScope),elements=isScope?sortByOrder2(item.candidates):element2;candidateTabindex===0?isScope?regularTabbables.push.apply(regularTabbables,elements):regularTabbables.push(element2):orderedTabbables.push({documentOrder:i,tabIndex:candidateTabindex,item,isScope,content:elements})}),orderedTabbables.sort(sortOrderedTabbables).reduce(function(acc,sortable){return sortable. isScope?acc.push.apply(acc,sortable.content):acc.push(sortable.content),acc},[]).concat(regularTabbables)},tabbable=function(container2,options){options=options||{};var candidates;return options.getShadowRoot?candidates=getCandidatesIteratively([container2],options.includeContainer,{filter:isNodeMatchingSelectorTabbable.bind(null,options),flatten:!1,getShadowRoot:options.getShadowRoot,shadowRootFilter:isValidShadowRootTabbable}):candidates=getCandidates(container2,options.includeContainer,isNodeMatchingSelectorTabbable. bind(null,options)),sortByOrder(candidates)},focusable=function(container2,options){options=options||{};var candidates;return options.getShadowRoot?candidates=getCandidatesIteratively([container2],options.includeContainer,{filter:isNodeMatchingSelectorFocusable.bind(null,options),flatten:!0,getShadowRoot:options.getShadowRoot}):candidates=getCandidates(container2,options.includeContainer,isNodeMatchingSelectorFocusable.bind(null,options)),candidates},isTabbable=function(node2,options){if(options= options||{},!node2)throw new Error("No node provided");return matches.call(node2,candidateSelector)===!1?!1:isNodeMatchingSelectorTabbable(options,node2)},focusableCandidateSelector=candidateSelectors.concat("iframe").join(","),isFocusable=function(node2,options){if(options=options||{},!node2)throw new Error("No node provided");return matches.call(node2,focusableCandidateSelector)===!1?!1:isNodeMatchingSelectorFocusable(options,node2)};function getTabbableOptions(){return{getShadowRoot:!0,displayCheck:typeof ResizeObserver== "function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"}}function getTabbableFrom(currentNode,direction){if(!isTabbable(currentNode,getTabbableOptions()))return getTabbableFromFocusable(currentNode,direction);const doc=getDocument$1(currentNode),allTabbable=tabbable(doc.body,getTabbableOptions());direction==="prev"&&allTabbable.reverse();const activeIndex=allTabbable.indexOf(currentNode);return activeIndex===-1?doc.body:allTabbable.slice(activeIndex+1)[0]}function getTabbableFromFocusable(currentNode,direction){ const doc=getDocument$1(currentNode);if(!isFocusable(currentNode,getTabbableOptions()))return doc.body;const allFocusable=focusable(doc.body,getTabbableOptions());direction==="prev"&&allFocusable.reverse();const activeIndex=allFocusable.indexOf(currentNode);return activeIndex===-1?doc.body:allFocusable.slice(activeIndex+1).find(node2=>isTabbable(node2,getTabbableOptions()))??doc.body}function next(array2,index2,loop2=!0){if(!(array2.length===0||index2<0||index2>=array2.length))return array2.length=== 1&&index2===0?array2[0]:index2===array2.length-1?loop2?array2[0]:void 0:array2[index2+1]}function prev(array2,index2,loop2=!0){if(!(array2.length===0||index2<0||index2>=array2.length))return array2.length===1&&index2===0?array2[0]:index2===0?loop2?array2[array2.length-1]:void 0:array2[index2-1]}function forward(array2,index2,increment2,loop2=!0){if(array2.length===0||index2<0||index2>=array2.length)return;let targetIndex=index2+increment2;return loop2?targetIndex=(targetIndex%array2.length+array2. length)%array2.length:targetIndex=Math.max(0,Math.min(targetIndex,array2.length-1)),array2[targetIndex]}function backward(array2,index2,decrement,loop2=!0){if(array2.length===0||index2<0||index2>=array2.length)return;let targetIndex=index2-decrement;return loop2?targetIndex=(targetIndex%array2.length+array2.length)%array2.length:targetIndex=Math.max(0,Math.min(targetIndex,array2.length-1)),array2[targetIndex]}function getNextMatch(values,search2,currentMatch){const lowerSearch=search2.toLowerCase(); if(lowerSearch.endsWith(" ")){const searchWithoutSpace=lowerSearch.slice(0,-1);if(values.filter(value=>value.toLowerCase().startsWith(searchWithoutSpace)).length<=1)return getNextMatch(values,searchWithoutSpace,currentMatch);const currentMatchLowercase=currentMatch?.toLowerCase();if(currentMatchLowercase&¤tMatchLowercase.startsWith(searchWithoutSpace)&¤tMatchLowercase.charAt(searchWithoutSpace.length)===" "&&search2.trim()===searchWithoutSpace)return currentMatch;const spacedMatches=values. filter(value=>value.toLowerCase().startsWith(lowerSearch));if(spacedMatches.length>0){const currentMatchIndex2=currentMatch?values.indexOf(currentMatch):-1;return wrapArray(spacedMatches,Math.max(currentMatchIndex2,0)).find(match=>match!==currentMatch)||currentMatch}}const normalizedSearch=search2.length>1&&Array.from(search2).every(char=>char===search2[0])?search2[0]:search2,normalizedLowerSearch=normalizedSearch.toLowerCase(),currentMatchIndex=currentMatch?values.indexOf(currentMatch):-1;let wrappedValues=wrapArray( values,Math.max(currentMatchIndex,0));normalizedSearch.length===1&&(wrappedValues=wrappedValues.filter(v=>v!==currentMatch));const nextMatch=wrappedValues.find(value=>value?.toLowerCase().startsWith(normalizedLowerSearch));return nextMatch!==currentMatch?nextMatch:void 0}function wrapArray(array2,startIndex){return array2.map((_,index2)=>array2[(startIndex+index2)%array2.length])}const defaultOptions={afterMs:1e4,onChange:noop$1};function boxAutoReset(defaultValue,options){const{afterMs,onChange, getWindow:getWindow2}={...defaultOptions,...options};let timeout=null,value=state$1(proxy(defaultValue));function resetAfter(){return getWindow2().setTimeout(()=>{set$1(value,defaultValue,!0),onChange?.(defaultValue)},afterMs)}return user_effect(()=>()=>{timeout&&getWindow2().clearTimeout(timeout)}),boxWith$1(()=>get$4(value),v=>{set$1(value,v,!0),onChange?.(v),timeout&&getWindow2().clearTimeout(timeout),timeout=resetAfter()})}class DOMTypeahead{#opts;#search;#onMatch=user_derived(()=>this.#opts. onMatch?this.#opts.onMatch:node2=>node2.focus());#getCurrentItem=user_derived(()=>this.#opts.getCurrentItem?this.#opts.getCurrentItem:this.#opts.getActiveElement);constructor(opts){this.#opts=opts,this.#search=boxAutoReset("",{afterMs:1e3,getWindow:opts.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(key2,candidates){if(!candidates.length)return;this.#search.current=this.#search.current+key2;const currentItem=get$4( this.#getCurrentItem)(),currentMatch=candidates.find(item=>item===currentItem)?.textContent?.trim()??"",values=candidates.map(item=>item.textContent?.trim()??""),nextMatch=getNextMatch(values,this.#search.current,currentMatch),newItem=candidates.find(item=>item.textContent?.trim()===nextMatch);return newItem&&get$4(this.#onMatch)(newItem),newItem}resetTypeahead(){this.#search.current=""}get search(){return this.#search.current}}class GraceArea{#opts;#enabled;#isPointerInTransit;#pointerGraceArea=state$1( null);constructor(opts){this.#opts=opts,this.#enabled=user_derived(()=>this.#opts.enabled()),this.#isPointerInTransit=boxAutoReset(!1,{afterMs:opts.transitTimeout??300,onChange:value=>{get$4(this.#enabled)&&this.#opts.setIsPointerInTransit?.(value)},getWindow:()=>getWindow$1(this.#opts.triggerNode())}),watch$1([opts.triggerNode,opts.contentNode,opts.enabled],([triggerNode,contentNode,enabled])=>{if(!triggerNode||!contentNode||!enabled)return;const handleTriggerLeave=e=>{this.#createGraceArea(e,contentNode)}, handleContentLeave=e=>{this.#createGraceArea(e,triggerNode)};return executeCallbacks(on(triggerNode,"pointerleave",handleTriggerLeave),on(contentNode,"pointerleave",handleContentLeave))}),watch$1(()=>get$4(this.#pointerGraceArea),()=>{const handleTrackPointerGrace=e=>{if(!get$4(this.#pointerGraceArea))return;const target2=e.target;if(!isElement$1(target2))return;const pointerPosition={x:e.clientX,y:e.clientY},hasEnteredTarget=opts.triggerNode()?.contains(target2)||opts.contentNode()?.contains(target2), isPointerOutsideGraceArea=!isPointInPolygon$1(pointerPosition,get$4(this.#pointerGraceArea));hasEnteredTarget?this.#removeGraceArea():isPointerOutsideGraceArea&&(this.#removeGraceArea(),opts.onPointerExit())},doc=getDocument$1(opts.triggerNode()??opts.contentNode());if(doc)return on(doc,"pointermove",handleTrackPointerGrace)})}#removeGraceArea(){set$1(this.#pointerGraceArea,null),this.#isPointerInTransit.current=!1}#createGraceArea(e,hoverTarget){const currentTarget=e.currentTarget;if(!isHTMLElement$1( currentTarget))return;const exitPoint={x:e.clientX,y:e.clientY},exitSide=getExitSideFromRect(exitPoint,currentTarget.getBoundingClientRect()),paddedExitPoints=getPaddedExitPoints(exitPoint,exitSide),hoverTargetPoints=getPointsFromRect(hoverTarget.getBoundingClientRect()),graceArea=getHull([...paddedExitPoints,...hoverTargetPoints]);set$1(this.#pointerGraceArea,graceArea,!0),this.#isPointerInTransit.current=!0}}function getExitSideFromRect(point2,rect){const top=Math.abs(rect.top-point2.y),bottom=Math. abs(rect.bottom-point2.y),right=Math.abs(rect.right-point2.x),left=Math.abs(rect.left-point2.x);switch(Math.min(top,bottom,right,left)){case left:return"left";case right:return"right";case top:return"top";case bottom:return"bottom";default:throw new Error("unreachable")}}function getPaddedExitPoints(exitPoint,exitSide,padding=5){const tipPadding=padding*1.5;switch(exitSide){case"top":return[{x:exitPoint.x-padding,y:exitPoint.y+padding},{x:exitPoint.x,y:exitPoint.y-tipPadding},{x:exitPoint.x+padding, y:exitPoint.y+padding}];case"bottom":return[{x:exitPoint.x-padding,y:exitPoint.y-padding},{x:exitPoint.x,y:exitPoint.y+tipPadding},{x:exitPoint.x+padding,y:exitPoint.y-padding}];case"left":return[{x:exitPoint.x+padding,y:exitPoint.y-padding},{x:exitPoint.x-tipPadding,y:exitPoint.y},{x:exitPoint.x+padding,y:exitPoint.y+padding}];case"right":return[{x:exitPoint.x-padding,y:exitPoint.y-padding},{x:exitPoint.x+tipPadding,y:exitPoint.y},{x:exitPoint.x-padding,y:exitPoint.y+padding}]}}function getPointsFromRect(rect){ const{top,right,bottom,left}=rect;return[{x:left,y:top},{x:right,y:top},{x:right,y:bottom},{x:left,y:bottom}]}function isPointInPolygon$1(point2,polygon){const{x,y}=point2;let inside=!1;for(let i=0,j=polygon.length-1;iy!=yj>y&&x<(xj-xi)*(y-yi)/(yj-yi)+xi&&(inside=!inside)}return inside}function getHull(points){const newPoints=points.slice();return newPoints.sort((a,b)=>a.xb.x?1:a.yb.y?1:0),getHullPresorted(newPoints)}function getHullPresorted(points){if(points.length<=1)return points.slice();const upperHull=[];for(let i=0;i=2;){const q2=upperHull[upperHull.length-1],r2=upperHull[upperHull.length-2];if((q2.x-r2.x)*(p2.y-r2.y)>=(q2.y-r2.y)*(p2.x-r2.x))upperHull.pop();else break}upperHull.push(p2)}upperHull.pop();const lowerHull=[];for(let i=points.length-1;i>=0;i--){const p2=points[i];for(;lowerHull.length>=2;){ const q2=lowerHull[lowerHull.length-1],r2=lowerHull[lowerHull.length-2];if((q2.x-r2.x)*(p2.y-r2.y)>=(q2.y-r2.y)*(p2.x-r2.x))lowerHull.pop();else break}lowerHull.push(p2)}return lowerHull.pop(),upperHull.length===1&&lowerHull.length===1&&upperHull[0].x===lowerHull[0].x&&upperHull[0].y===lowerHull[0].y?upperHull:upperHull.concat(lowerHull)}const CONTEXT_MENU_TRIGGER_ATTR="data-context-menu-trigger",CONTEXT_MENU_CONTENT_ATTR="data-context-menu-content",MenuRootContext=new Context$1("Menu.Root"),MenuMenuContext=new Context$1( "Menu.Root | Menu.Sub"),MenuContentContext=new Context$1("Menu.Content"),MenuOpenEvent=new CustomEventDispatcher("bitsmenuopen",{bubbles:!1,cancelable:!0}),menuAttrs=createBitsAttrs({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});class MenuRootState{static create(opts){const root2=new MenuRootState(opts);return MenuRootContext.set(root2)}opts;isUsingKeyboard=new IsUsingKeyboard;#ignoreCloseAutoFocus=state$1( !1);get ignoreCloseAutoFocus(){return get$4(this.#ignoreCloseAutoFocus)}set ignoreCloseAutoFocus(value){set$1(this.#ignoreCloseAutoFocus,value,!0)}#isPointerInTransit=state$1(!1);get isPointerInTransit(){return get$4(this.#isPointerInTransit)}set isPointerInTransit(value){set$1(this.#isPointerInTransit,value,!0)}constructor(opts){this.opts=opts}getBitsAttr=part=>menuAttrs.getAttr(part,this.opts.variant.current)}class MenuMenuState{static create(opts,root2){return MenuMenuContext.set(new MenuMenuState( opts,root2,null))}opts;root;parentMenu;contentId=boxWith$1(()=>"");#contentNode=state$1(null);get contentNode(){return get$4(this.#contentNode)}set contentNode(value){set$1(this.#contentNode,value,!0)}contentPresence;#triggerNode=state$1(null);get triggerNode(){return get$4(this.#triggerNode)}set triggerNode(value){set$1(this.#triggerNode,value,!0)}constructor(opts,root2,parentMenu){this.opts=opts,this.root=root2,this.parentMenu=parentMenu,this.contentPresence=new PresenceManager({ref:boxWith$1( ()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),parentMenu&&watch$1(()=>parentMenu.opts.open.current,()=>{parentMenu.opts.open.current||(this.opts.open.current=!1)})}toggleOpen(){this.opts.open.current=!this.opts.open.current}onOpen(){this.opts.open.current=!0}onClose(){this.opts.open.current=!1}}class MenuContentState{static create(opts){return MenuContentContext.set(new MenuContentState(opts,MenuMenuContext.get()))}opts;parentMenu;rovingFocusGroup;domContext;attachment;#search=state$1( "");get search(){return get$4(this.#search)}set search(value){set$1(this.#search,value,!0)}#timer=0;#handleTypeaheadSearch;#mounted=state$1(!1);get mounted(){return get$4(this.#mounted)}set mounted(value){set$1(this.#mounted,value,!0)}#isSub;constructor(opts,parentMenu){this.opts=opts,this.parentMenu=parentMenu,this.domContext=new DOMContext(opts.ref),this.attachment=attachRef(this.opts.ref,v=>{this.parentMenu.contentNode!==v&&(this.parentMenu.contentNode=v)}),parentMenu.contentId=opts.id,this.#isSub= opts.isSub??!1,this.onkeydown=this.onkeydown.bind(this),this.onblur=this.onblur.bind(this),this.onfocus=this.onfocus.bind(this),this.handleInteractOutside=this.handleInteractOutside.bind(this),new GraceArea({contentNode:()=>this.parentMenu.contentNode,triggerNode:()=>this.parentMenu.triggerNode,enabled:()=>this.parentMenu.opts.open.current&&!!this.parentMenu.triggerNode?.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger")),onPointerExit:()=>{this.parentMenu.opts.open.current=!1},setIsPointerInTransit:value=>{ this.parentMenu.root.isPointerInTransit=value}}),this.#handleTypeaheadSearch=new DOMTypeahead({getActiveElement:()=>this.domContext.getActiveElement(),getWindow:()=>this.domContext.getWindow()}).handleTypeaheadSearch,this.rovingFocusGroup=new RovingFocusGroup({rootNode:boxWith$1(()=>this.parentMenu.contentNode),candidateAttr:this.parentMenu.root.getBitsAttr("item"),loop:this.opts.loop,orientation:boxWith$1(()=>"vertical")}),watch$1(()=>this.parentMenu.contentNode,contentNode=>{if(!contentNode)return; const handler=()=>{afterTick(()=>{this.parentMenu.root.isUsingKeyboard.current&&this.rovingFocusGroup.focusFirstCandidate()})};return MenuOpenEvent.listen(contentNode,handler)}),user_effect(()=>{this.parentMenu.opts.open.current||this.domContext.getWindow().clearTimeout(this.#timer)})}#getCandidateNodes(){const node2=this.parentMenu.contentNode;return node2?Array.from(node2.querySelectorAll(`[${this.parentMenu.root.getBitsAttr("item")}]:not([data-disabled])`)):[]}#isPointerMovingToSubmenu(){return this. parentMenu.root.isPointerInTransit}onCloseAutoFocus=e=>{this.opts.onCloseAutoFocus.current?.(e),!(e.defaultPrevented||this.#isSub)&&this.parentMenu.triggerNode&&isTabbable(this.parentMenu.triggerNode)&&(e.preventDefault(),this.parentMenu.triggerNode.focus())};handleTabKeyDown(e){let rootMenu=this.parentMenu;for(;rootMenu.parentMenu!==null;)rootMenu=rootMenu.parentMenu;if(!rootMenu.triggerNode)return;e.preventDefault();const nodeToFocus=getTabbableFrom(rootMenu.triggerNode,e.shiftKey?"prev":"next"); nodeToFocus?(this.parentMenu.root.ignoreCloseAutoFocus=!0,rootMenu.onClose(),afterTick(()=>{nodeToFocus.focus(),afterTick(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})})):this.domContext.getDocument().body.focus()}onkeydown(e){if(e.defaultPrevented)return;if(e.key===TAB){this.handleTabKeyDown(e);return}const target2=e.target,currentTarget=e.currentTarget;if(!isHTMLElement$1(target2)||!isHTMLElement$1(currentTarget))return;const isKeydownInside=target2.closest(`[${this.parentMenu.root.getBitsAttr( "content")}]`)?.id===this.parentMenu.contentId.current,isModifierKey=e.ctrlKey||e.altKey||e.metaKey,isCharacterKey=e.key.length===1;if(this.rovingFocusGroup.handleKeydown(target2,e)||e.code==="Space")return;const candidateNodes=this.#getCandidateNodes();isKeydownInside&&!isModifierKey&&isCharacterKey&&this.#handleTypeaheadSearch(e.key,candidateNodes),e.target?.id===this.parentMenu.contentId.current&&FIRST_LAST_KEYS$1.includes(e.key)&&(e.preventDefault(),LAST_KEYS$1.includes(e.key)&&candidateNodes. reverse(),focusFirst(candidateNodes,{select:!1},()=>this.domContext.getActiveElement()))}onblur(e){isElement$1(e.currentTarget)&&isElement$1(e.target)&&(e.currentTarget.contains?.(e.target)||(this.domContext.getWindow().clearTimeout(this.#timer),this.search=""))}onfocus(_){this.parentMenu.root.isUsingKeyboard.current&&afterTick(()=>this.rovingFocusGroup.focusFirstCandidate())}onItemEnter(){return this.#isPointerMovingToSubmenu()}onItemLeave(e){if(e.currentTarget.hasAttribute(this.parentMenu.root. getBitsAttr("sub-trigger"))||this.#isPointerMovingToSubmenu()||this.parentMenu.root.isUsingKeyboard.current)return;this.parentMenu.contentNode?.focus(),this.rovingFocusGroup.setCurrentTabStopId("")}onTriggerLeave(){return!!this.#isPointerMovingToSubmenu()}handleInteractOutside(e){if(!isElementOrSVGElement(e.target))return;const triggerId=this.parentMenu.triggerNode?.id;if(e.target.id===triggerId){e.preventDefault();return}e.target.closest(`#${triggerId}`)&&e.preventDefault()}get shouldRender(){return this. parentMenu.contentPresence.shouldRender}#snippetProps=user_derived(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return get$4(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,role:"menu","aria-orientation":"vertical",[this.parentMenu.root.getBitsAttr("content")]:"","data-state":getDataOpenClosed(this.parentMenu.opts.open.current),onkeydown:this.onkeydown,onblur:this.onblur,onfocus:this.onfocus,dir:this. parentMenu.root.opts.dir.current,style:{pointerEvents:"auto",contain:"layout style paint"},...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}popperProps={onCloseAutoFocus:e=>this.onCloseAutoFocus(e)}}class MenuItemSharedState{opts;content;attachment;#isFocused=state$1(!1);constructor(opts,content2){this.opts=opts,this.content=content2,this.attachment=attachRef(this.opts.ref),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this. onpointerleave.bind(this),this.onfocus=this.onfocus.bind(this),this.onblur=this.onblur.bind(this)}onpointermove(e){if(!e.defaultPrevented&&isMouseEvent(e))if(this.opts.disabled.current)this.content.onItemLeave(e);else{if(this.content.onItemEnter())return;const item=e.currentTarget;if(!isHTMLElement$1(item))return;item.focus()}}onpointerleave(e){e.defaultPrevented||isMouseEvent(e)&&this.content.onItemLeave(e)}onfocus(e){afterTick(()=>{e.defaultPrevented||this.opts.disabled.current||set$1(this.#isFocused, !0)})}onblur(e){afterTick(()=>{e.defaultPrevented||set$1(this.#isFocused,!1)})}#props=user_derived(()=>({id:this.opts.id.current,tabindex:-1,role:"menuitem","aria-disabled":boolToStr(this.opts.disabled.current),"data-disabled":boolToEmptyStrOrUndef(this.opts.disabled.current),"data-highlighted":get$4(this.#isFocused)?"":void 0,[this.content.parentMenu.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onfocus:this.onfocus,onblur:this.onblur,...this.attachment}));get props(){ return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class MenuItemState{static create(opts){const item=new MenuItemSharedState(opts,MenuContentContext.get());return new MenuItemState(opts,item)}opts;item;root;#isPointerDown=!1;constructor(opts,item){this.opts=opts,this.item=item,this.root=item.content.parentMenu.root,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind( this)}#handleSelect(){if(this.item.opts.disabled.current)return;const selectEvent=new CustomEvent("menuitemselect",{bubbles:!0,cancelable:!0});if(this.opts.onSelect.current(selectEvent),selectEvent.defaultPrevented){this.item.content.parentMenu.root.isUsingKeyboard.current=!1;return}this.opts.closeOnSelect.current&&this.item.content.parentMenu.root.opts.onClose()}onkeydown(e){const isTypingAhead=this.item.content.search!=="";if(!(this.item.opts.disabled.current||isTypingAhead&&e.key===SPACE)&&SELECTION_KEYS. includes(e.key)){if(!isHTMLElement$1(e.currentTarget))return;e.currentTarget.click(),e.preventDefault()}}onclick(_){this.item.opts.disabled.current||this.#handleSelect()}onpointerup(e){if(!e.defaultPrevented&&!this.#isPointerDown){if(!isHTMLElement$1(e.currentTarget))return;e.currentTarget?.click()}}onpointerdown(_){this.#isPointerDown=!0}#props=user_derived(()=>mergeProps(this.item.props,{onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown}));get props(){ return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class MenuSubTriggerState{static create(opts){const content2=MenuContentContext.get(),item=new MenuItemSharedState(opts,content2),submenu=MenuMenuContext.get();return new MenuSubTriggerState(opts,item,content2,submenu)}opts;item;content;submenu;attachment;#openTimer=null;constructor(opts,item,content2,submenu){this.opts=opts,this.item=item,this.content=content2,this.submenu=submenu,this.attachment=attachRef(this.opts.ref,v=>this. submenu.triggerNode=v),this.onpointerleave=this.onpointerleave.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),onDestroyEffect(()=>{this.#clearOpenTimer()})}#clearOpenTimer(){this.#openTimer!==null&&(this.content.domContext.getWindow().clearTimeout(this.#openTimer),this.#openTimer=null)}onpointermove(e){isMouseEvent(e)&&!this.item.opts.disabled.current&&!this.submenu.opts.open.current&&!this.#openTimer&&!this. content.parentMenu.root.isPointerInTransit&&(this.#openTimer=this.content.domContext.setTimeout(()=>{this.submenu.onOpen(),this.#clearOpenTimer()},this.opts.openDelay.current))}onpointerleave(e){isMouseEvent(e)&&this.#clearOpenTimer()}onkeydown(e){const isTypingAhead=this.content.search!=="";this.item.opts.disabled.current||isTypingAhead&&e.key===SPACE||SUB_OPEN_KEYS[this.submenu.root.opts.dir.current].includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}onclick(e){if(this.item.opts.disabled. current||!isHTMLElement$1(e.currentTarget))return;e.currentTarget.focus();const selectEvent=new CustomEvent("menusubtriggerselect",{bubbles:!0,cancelable:!0});this.opts.onSelect.current(selectEvent),this.submenu.opts.open.current||(this.submenu.onOpen(),afterTick(()=>{const contentNode=this.submenu.contentNode;contentNode&&MenuOpenEvent.dispatch(contentNode)}))}#props=user_derived(()=>mergeProps({"aria-haspopup":"menu","aria-expanded":boolToStr(this.submenu.opts.open.current),"data-state":getDataOpenClosed( this.submenu.opts.open.current),"aria-controls":this.submenu.opts.open.current?this.submenu.contentId.current:void 0,[this.submenu.root.getBitsAttr("sub-trigger")]:"",onclick:this.onclick,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onkeydown:this.onkeydown,...this.attachment},this.item.props));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class MenuSeparatorState{static create(opts){return new MenuSeparatorState(opts,MenuRootContext.get())}opts;root;attachment;constructor(opts,root2){ this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref)}#props=user_derived(()=>({id:this.opts.id.current,role:"group",[this.root.getBitsAttr("separator")]:"",...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class DropdownMenuTriggerState{static create(opts){return new DropdownMenuTriggerState(opts,MenuMenuContext.get())}opts;parentMenu;attachment;constructor(opts,parentMenu){this.opts=opts,this.parentMenu=parentMenu,this.attachment= attachRef(this.opts.ref,v=>this.parentMenu.triggerNode=v)}onclick=e=>{this.opts.disabled.current||e.detail!==0||(this.parentMenu.toggleOpen(),e.preventDefault())};onpointerdown=e=>{if(!this.opts.disabled.current){if(e.pointerType==="touch")return e.preventDefault();e.button===0&&e.ctrlKey===!1&&(this.parentMenu.toggleOpen(),this.parentMenu.opts.open.current||e.preventDefault())}};onpointerup=e=>{this.opts.disabled.current||e.pointerType==="touch"&&(e.preventDefault(),this.parentMenu.toggleOpen())};onkeydown=e=>{ if(!this.opts.disabled.current){if(e.key===SPACE||e.key===ENTER){this.parentMenu.toggleOpen(),e.preventDefault();return}e.key===ARROW_DOWN&&(this.parentMenu.onOpen(),e.preventDefault())}};#ariaControls=user_derived(()=>{if(this.parentMenu.opts.open.current&&this.parentMenu.contentId.current)return this.parentMenu.contentId.current});#props=user_derived(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"aria-haspopup":"menu","aria-expanded":boolToStr(this.parentMenu.opts.open.current), "aria-controls":get$4(this.#ariaControls),"data-disabled":boolToEmptyStrOrUndef(this.opts.disabled.current),"data-state":getDataOpenClosed(this.parentMenu.opts.open.current),[this.parentMenu.root.getBitsAttr("trigger")]:"",onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown,...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class MenuSubmenuState{static create(opts){const menu=MenuMenuContext. get();return MenuMenuContext.set(new MenuMenuState(opts,menu.root,menu))}}globalThis.bitsDismissableLayers??=new Map;class DismissibleLayerState{static create(opts){return new DismissibleLayerState(opts)}opts;#interactOutsideProp;#behaviorType;#interceptedEvents={pointerdown:!1};#isResponsibleLayer=!1;#isFocusInsideDOMTree=!1;#documentObj=void 0;#onFocusOutside;#unsubClickListener=noop$1;constructor(opts){this.opts=opts,this.#behaviorType=opts.interactOutsideBehavior,this.#interactOutsideProp=opts. onInteractOutside,this.#onFocusOutside=opts.onFocusOutside,user_effect(()=>{this.#documentObj=getOwnerDocument(this.opts.ref.current)});let unsubEvents=noop$1;const cleanup=()=>{this.#resetState(),globalThis.bitsDismissableLayers.delete(this),this.#handleInteractOutside.destroy(),unsubEvents()};watch$1([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return afterSleep(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers. set(this,this.#behaviorType),unsubEvents(),unsubEvents=this.#addEventListeners())}),cleanup}),onDestroyEffect(()=>{this.#resetState.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#handleInteractOutside.destroy(),this.#unsubClickListener(),unsubEvents()})}#handleFocus=event2=>{event2.defaultPrevented||this.opts.ref.current&&afterTick(()=>{!this.opts.ref.current||this.#isTargetWithinLayer(event2.target)||event2.target&&!this.#isFocusInsideDOMTree&&this.#onFocusOutside.current?.(event2)})};#addEventListeners(){ return executeCallbacks(on(this.#documentObj,"pointerdown",executeCallbacks(this.#markInterceptedEvent,this.#markResponsibleLayer),{capture:!0}),on(this.#documentObj,"pointerdown",executeCallbacks(this.#markNonInterceptedEvent,this.#handleInteractOutside)),on(this.#documentObj,"focusin",this.#handleFocus))}#handleDismiss=e=>{let event2=e;event2.defaultPrevented&&(event2=createWrappedEvent(e)),this.#interactOutsideProp.current(e)};#handleInteractOutside=debounce$1(e=>{if(!this.opts.ref.current){this.#unsubClickListener(); return}const isEventValid=this.opts.isValidEvent.current(e,this.opts.ref.current)||isValidEvent(e,this.opts.ref.current);if(!this.#isResponsibleLayer||this.#isAnyEventIntercepted()||!isEventValid){this.#unsubClickListener();return}let event2=e;if(event2.defaultPrevented&&(event2=createWrappedEvent(event2)),this.#behaviorType.current!=="close"&&this.#behaviorType.current!=="defer-otherwise-close"){this.#unsubClickListener();return}e.pointerType==="touch"?(this.#unsubClickListener(),this.#unsubClickListener= on(this.#documentObj,"click",this.#handleDismiss,{once:!0})):this.#interactOutsideProp.current(event2)},10);#markInterceptedEvent=e=>{this.#interceptedEvents[e.type]=!0};#markNonInterceptedEvent=e=>{this.#interceptedEvents[e.type]=!1};#markResponsibleLayer=()=>{this.opts.ref.current&&(this.#isResponsibleLayer=isResponsibleLayer(this.opts.ref.current))};#isTargetWithinLayer=target2=>this.opts.ref.current?isOrContainsTarget(this.opts.ref.current,target2):!1;#resetState=debounce$1(()=>{for(const eventType in this.#interceptedEvents) this.#interceptedEvents[eventType]=!1;this.#isResponsibleLayer=!1},20);#isAnyEventIntercepted(){return Object.values(this.#interceptedEvents).some(Boolean)}#onfocuscapture=()=>{this.#isFocusInsideDOMTree=!0};#onblurcapture=()=>{this.#isFocusInsideDOMTree=!1};props={onfocuscapture:this.#onfocuscapture,onblurcapture:this.#onblurcapture}}function getTopMostDismissableLayer(layersArr=[...globalThis.bitsDismissableLayers]){return layersArr.findLast(([_,{current:behaviorType}])=>behaviorType==="close"|| behaviorType==="ignore")}function isResponsibleLayer(node2){const layersArr=[...globalThis.bitsDismissableLayers],topMostLayer=getTopMostDismissableLayer(layersArr);if(topMostLayer)return topMostLayer[0].opts.ref.current===node2;const[firstLayerNode]=layersArr[0];return firstLayerNode.opts.ref.current===node2}function isValidEvent(e,node2){const target2=e.target;if(!isElementOrSVGElement(target2))return!1;const targetIsContextMenuTrigger=!!target2.closest(`[${CONTEXT_MENU_TRIGGER_ATTR}]`);if("bu\ tton"in e&&e.button>0&&!targetIsContextMenuTrigger)return!1;if("button"in e&&e.button===0&&targetIsContextMenuTrigger)return!0;const nodeIsContextMenu=!!node2.closest(`[${CONTEXT_MENU_CONTENT_ATTR}]`);return targetIsContextMenuTrigger&&nodeIsContextMenu?!1:getOwnerDocument(target2).documentElement.contains(target2)&&!isOrContainsTarget(node2,target2)&&isClickTrulyOutside(e,node2)}function createWrappedEvent(e){const capturedCurrentTarget=e.currentTarget,capturedTarget=e.target;let newEvent;e instanceof PointerEvent?newEvent=new PointerEvent(e.type,e):newEvent=new PointerEvent("pointerdown",e);let isPrevented=!1;return new Proxy(newEvent,{get:(target2,prop2)=>prop2==="currentTarget"?capturedCurrentTarget:prop2==="target"?capturedTarget:prop2==="preventDefault"?()=>{isPrevented=!0,typeof target2.preventDefault=="function"&&target2.preventDefault()}:prop2==="defaultPrevented"?isPrevented:prop2 in target2?target2[prop2]:e[prop2]})}function Dismissible_layer($$anchor,$$props){push$1($$props,!0);let interactOutsideBehavior=prop( $$props,"interactOutsideBehavior",3,"close"),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),onFocusOutside=prop($$props,"onFocusOutside",3,noop$1),isValidEvent2=prop($$props,"isValidEvent",3,()=>!1);const dismissibleLayerState=DismissibleLayerState.create({id:boxWith$1(()=>$$props.id),interactOutsideBehavior:boxWith$1(()=>interactOutsideBehavior()),onInteractOutside:boxWith$1(()=>onInteractOutside()),enabled:boxWith$1(()=>$$props.enabled),onFocusOutside:boxWith$1(()=>onFocusOutside()), isValidEvent:boxWith$1(()=>isValidEvent2()),ref:$$props.ref});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3,()=>({props:dismissibleLayerState.props})),append($$anchor,fragment),pop()}globalThis.bitsEscapeLayers??=new Map;class EscapeLayerState{static create(opts){return new EscapeLayerState(opts)}opts;domContext;constructor(opts){this.opts=opts,this.domContext=new DOMContext(this.opts.ref);let unsubEvents=noop$1;watch$1(()=>opts.enabled.current,enabled=>(enabled&& (globalThis.bitsEscapeLayers.set(this,opts.escapeKeydownBehavior),unsubEvents=this.#addEventListener()),()=>{unsubEvents(),globalThis.bitsEscapeLayers.delete(this)}))}#addEventListener=()=>on(this.domContext.getDocument(),"keydown",this.#onkeydown,{passive:!1});#onkeydown=e=>{if(e.key!==ESCAPE||!isResponsibleEscapeLayer(this))return;const clonedEvent=new KeyboardEvent(e.type,e);e.preventDefault();const behaviorType=this.opts.escapeKeydownBehavior.current;behaviorType!=="close"&&behaviorType!=="d\ efer-otherwise-close"||this.opts.onEscapeKeydown.current(clonedEvent)}}function isResponsibleEscapeLayer(instance){const layersArr=[...globalThis.bitsEscapeLayers],topMostLayer=layersArr.findLast(([_,{current:behaviorType}])=>behaviorType==="close"||behaviorType==="ignore");if(topMostLayer)return topMostLayer[0]===instance;const[firstLayerNode]=layersArr[0];return firstLayerNode===instance}function Escape_layer($$anchor,$$props){push$1($$props,!0);let escapeKeydownBehavior=prop($$props,"escapeKe\ ydownBehavior",3,"close"),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1);EscapeLayerState.create({escapeKeydownBehavior:boxWith$1(()=>escapeKeydownBehavior()),onEscapeKeydown:boxWith$1(()=>onEscapeKeydown()),enabled:boxWith$1(()=>$$props.enabled),ref:$$props.ref});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}class FocusScopeManager{static instance;#scopeStack=simpleBox([]);#focusHistory=new WeakMap;#preFocusHistory=new WeakMap;static getInstance(){ return this.instance||(this.instance=new FocusScopeManager),this.instance}register(scope2){const current2=this.getActive();current2&¤t2!==scope2&¤t2.pause();const activeElement=document.activeElement;activeElement&&activeElement!==document.body&&this.#preFocusHistory.set(scope2,activeElement),this.#scopeStack.current=this.#scopeStack.current.filter(s2=>s2!==scope2),this.#scopeStack.current.unshift(scope2)}unregister(scope2){this.#scopeStack.current=this.#scopeStack.current.filter(s2=>s2!== scope2);const next2=this.getActive();next2&&next2.resume()}getActive(){return this.#scopeStack.current[0]}setFocusMemory(scope2,element2){this.#focusHistory.set(scope2,element2)}getFocusMemory(scope2){return this.#focusHistory.get(scope2)}isActiveScope(scope2){return this.getActive()===scope2}setPreFocusMemory(scope2,element2){this.#preFocusHistory.set(scope2,element2)}getPreFocusMemory(scope2){return this.#preFocusHistory.get(scope2)}clearPreFocusMemory(scope2){this.#preFocusHistory.delete(scope2)}} class FocusScope{#paused=!1;#container=null;#manager=FocusScopeManager.getInstance();#cleanupFns=[];#opts;constructor(opts){this.#opts=opts}get paused(){return this.#paused}pause(){this.#paused=!0}resume(){this.#paused=!1}#cleanup(){for(const fn of this.#cleanupFns)fn();this.#cleanupFns=[]}mount(container2){this.#container&&this.unmount(),this.#container=container2,this.#manager.register(this),this.#setupEventListeners(),this.#handleOpenAutoFocus()}unmount(){this.#container&&(this.#cleanup(),this.#handleCloseAutoFocus(), this.#manager.unregister(this),this.#manager.clearPreFocusMemory(this),this.#container=null)}#handleOpenAutoFocus(){if(!this.#container)return;const event2=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#opts.onOpenAutoFocus.current(event2),event2.defaultPrevented||requestAnimationFrame(()=>{if(!this.#container)return;const firstTabbable=this.#getFirstTabbable();firstTabbable?(firstTabbable.focus(),this.#manager.setFocusMemory(this,firstTabbable)):this.#container.focus()})}#handleCloseAutoFocus(){ const event2=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#opts.onCloseAutoFocus.current?.(event2),!event2.defaultPrevented){const preFocusedElement=this.#manager.getPreFocusMemory(this);if(preFocusedElement&&document.contains(preFocusedElement))try{preFocusedElement.focus()}catch{document.body.focus()}}}#setupEventListeners(){if(!this.#container||!this.#opts.trap.current)return;const container2=this.#container,doc=container2.ownerDocument,handleFocus=e=>{if(this.#paused|| !this.#manager.isActiveScope(this))return;const target2=e.target;if(!target2)return;if(container2.contains(target2))this.#manager.setFocusMemory(this,target2);else{const lastFocused=this.#manager.getFocusMemory(this);if(lastFocused&&container2.contains(lastFocused)&&isFocusable(lastFocused))e.preventDefault(),lastFocused.focus();else{const firstTabbable=this.#getFirstTabbable(),firstFocusable=this.#getAllFocusables()[0];(firstTabbable||firstFocusable||container2).focus()}}},handleKeydown=e=>{if(!this.#opts. loop||this.#paused||e.key!=="Tab"||!this.#manager.isActiveScope(this))return;const tabbables=this.#getTabbables();if(tabbables.length===0)return;const first=tabbables[0],last=tabbables[tabbables.length-1];!e.shiftKey&&doc.activeElement===last?(e.preventDefault(),first.focus()):e.shiftKey&&doc.activeElement===first&&(e.preventDefault(),last.focus())};this.#cleanupFns.push(on(doc,"focusin",handleFocus,{capture:!0}),on(container2,"keydown",handleKeydown));const observer=new MutationObserver(()=>{const lastFocused=this.#manager. getFocusMemory(this);if(lastFocused&&!container2.contains(lastFocused)){const firstTabbable=this.#getFirstTabbable(),firstFocusable=this.#getAllFocusables()[0],elementToFocus=firstTabbable||firstFocusable;elementToFocus?(elementToFocus.focus(),this.#manager.setFocusMemory(this,elementToFocus)):container2.focus()}});observer.observe(container2,{childList:!0,subtree:!0}),this.#cleanupFns.push(()=>observer.disconnect())}#getTabbables(){return this.#container?tabbable(this.#container,{includeContainer:!1, getShadowRoot:!0}):[]}#getFirstTabbable(){return this.#getTabbables()[0]||null}#getAllFocusables(){return this.#container?focusable(this.#container,{includeContainer:!1,getShadowRoot:!0}):[]}static use(opts){let scope2=null;return watch$1([()=>opts.ref.current,()=>opts.enabled.current],([ref2,enabled])=>{ref2&&enabled?(scope2||(scope2=new FocusScope(opts)),scope2.mount(ref2)):scope2&&(scope2.unmount(),scope2=null)}),onDestroyEffect(()=>{scope2?.unmount()}),{get props(){return{tabindex:-1}}}}}function Focus_scope($$anchor,$$props){ push$1($$props,!0);let enabled=prop($$props,"enabled",3,!1),trapFocus=prop($$props,"trapFocus",3,!1),loop2=prop($$props,"loop",3,!1),onCloseAutoFocus=prop($$props,"onCloseAutoFocus",3,noop$1),onOpenAutoFocus=prop($$props,"onOpenAutoFocus",3,noop$1);const focusScopeState=FocusScope.use({enabled:boxWith$1(()=>enabled()),trap:boxWith$1(()=>trapFocus()),loop:loop2(),onCloseAutoFocus:boxWith$1(()=>onCloseAutoFocus()),onOpenAutoFocus:boxWith$1(()=>onOpenAutoFocus()),ref:$$props.ref});var fragment=comment$2(), node2=first_child(fragment);snippet(node2,()=>$$props.focusScope??noop$3,()=>({props:focusScopeState.props})),append($$anchor,fragment),pop()}globalThis.bitsTextSelectionLayers??=new Map;class TextSelectionLayerState{static create(opts){return new TextSelectionLayerState(opts)}opts;domContext;#unsubSelectionLock=noop$1;constructor(opts){this.opts=opts,this.domContext=new DOMContext(opts.ref);let unsubEvents=noop$1;watch$1(()=>this.opts.enabled.current,isEnabled=>(isEnabled&&(globalThis.bitsTextSelectionLayers. set(this,this.opts.enabled),unsubEvents(),unsubEvents=this.#addEventListeners()),()=>{unsubEvents(),this.#resetSelectionLock(),globalThis.bitsTextSelectionLayers.delete(this)}))}#addEventListeners(){return executeCallbacks(on(this.domContext.getDocument(),"pointerdown",this.#pointerdown),on(this.domContext.getDocument(),"pointerup",composeHandlers(this.#resetSelectionLock,this.opts.onPointerUp.current)))}#pointerdown=e=>{const node2=this.opts.ref.current,target2=e.target;!isHTMLElement$1(node2)|| !isHTMLElement$1(target2)||!this.opts.enabled.current||!isHighestLayer(this)||!contains$3(node2,target2)||(this.opts.onPointerDown.current(e),!e.defaultPrevented&&(this.#unsubSelectionLock=preventTextSelectionOverflow(node2,this.domContext.getDocument().body)))};#resetSelectionLock=()=>{this.#unsubSelectionLock(),this.#unsubSelectionLock=noop$1}}const getUserSelect=node2=>node2.style.userSelect||node2.style.webkitUserSelect;function preventTextSelectionOverflow(node2,body2){const originalBodyUserSelect=getUserSelect( body2),originalNodeUserSelect=getUserSelect(node2);return setUserSelect(body2,"none"),setUserSelect(node2,"text"),()=>{setUserSelect(body2,originalBodyUserSelect),setUserSelect(node2,originalNodeUserSelect)}}function setUserSelect(node2,value){node2.style.userSelect=value,node2.style.webkitUserSelect=value}function isHighestLayer(instance){const layersArr=[...globalThis.bitsTextSelectionLayers];if(!layersArr.length)return!1;const highestLayer=layersArr.at(-1);return highestLayer?highestLayer[0]=== instance:!1}function Text_selection_layer($$anchor,$$props){push$1($$props,!0);let preventOverflowTextSelection=prop($$props,"preventOverflowTextSelection",3,!0),onPointerDown=prop($$props,"onPointerDown",3,noop$1),onPointerUp=prop($$props,"onPointerUp",3,noop$1);TextSelectionLayerState.create({id:boxWith$1(()=>$$props.id),onPointerDown:boxWith$1(()=>onPointerDown()),onPointerUp:boxWith$1(()=>onPointerUp()),enabled:boxWith$1(()=>$$props.enabled&&preventOverflowTextSelection()),ref:$$props.ref}); var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}globalThis.bitsIdCounter??={current:0};function useId(prefix="bits"){return globalThis.bitsIdCounter.current++,`${prefix}-${globalThis.bitsIdCounter.current}`}class SharedState{#factory;#subscribers=0;#state=state$1();#scope;constructor(factory){this.#factory=factory}#dispose(){this.#subscribers-=1,this.#scope&&this.#subscribers<=0&&(this.#scope(),set$1(this.#state,void 0), this.#scope=void 0)}get(...args){return this.#subscribers+=1,get$4(this.#state)===void 0&&(this.#scope=effect_root(()=>{set$1(this.#state,this.#factory(...args),!0)})),user_effect(()=>()=>{this.#dispose()}),get$4(this.#state)}}const lockMap=new SvelteMap;let initialBodyStyle=state$1(null),stopTouchMoveListener=null,cleanupTimeoutId=null,isInCleanupTransition=!1;const anyLocked=boxWith$1(()=>{for(const value of lockMap.values())if(value)return!0;return!1});let cleanupScheduledAt=null;const bodyLockStackCount=new SharedState( ()=>{function resetBodyStyle(){document.body.setAttribute("style",get$4(initialBodyStyle)??""),document.body.style.removeProperty("--scrollbar-width"),isIOS&&stopTouchMoveListener?.(),set$1(initialBodyStyle,null)}function cancelPendingCleanup(){cleanupTimeoutId!==null&&(window.clearTimeout(cleanupTimeoutId),cleanupTimeoutId=null)}function scheduleCleanupIfNoNewLocks(delay,callback){cancelPendingCleanup(),isInCleanupTransition=!0,cleanupScheduledAt=Date.now();const currentCleanupId=cleanupScheduledAt, cleanupFn=()=>{cleanupTimeoutId=null,cleanupScheduledAt===currentCleanupId&&(isAnyLocked(lockMap)?isInCleanupTransition=!1:(isInCleanupTransition=!1,callback()))},actualDelay=delay===null?24:delay;cleanupTimeoutId=window.setTimeout(cleanupFn,actualDelay)}function ensureInitialStyleCaptured(){get$4(initialBodyStyle)===null&&lockMap.size===0&&!isInCleanupTransition&&set$1(initialBodyStyle,document.body.getAttribute("style"),!0)}return watch$1(()=>anyLocked.current,()=>{if(!anyLocked.current)return; ensureInitialStyleCaptured(),isInCleanupTransition=!1;const htmlStyle=getComputedStyle(document.documentElement),bodyStyle=getComputedStyle(document.body),hasStableGutter=htmlStyle.scrollbarGutter?.includes("stable")||bodyStyle.scrollbarGutter?.includes("stable"),verticalScrollbarWidth=window.innerWidth-document.documentElement.clientWidth,config2={padding:Number.parseInt(bodyStyle.paddingRight??"0",10)+verticalScrollbarWidth,margin:Number.parseInt(bodyStyle.marginRight??"0",10)};verticalScrollbarWidth> 0&&!hasStableGutter&&(document.body.style.paddingRight=`${config2.padding}px`,document.body.style.marginRight=`${config2.margin}px`,document.body.style.setProperty("--scrollbar-width",`${verticalScrollbarWidth}px`)),document.body.style.overflow="hidden",isIOS&&(stopTouchMoveListener=on(document,"touchmove",e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),afterTick(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}), onDestroyEffect(()=>()=>{stopTouchMoveListener?.()}),{get lockMap(){return lockMap},resetBodyStyle,scheduleCleanupIfNoNewLocks,cancelPendingCleanup,ensureInitialStyleCaptured}});class BodyScrollLock{#id=useId();#initialState;#restoreScrollDelay=()=>null;#countState;locked;constructor(initialState,restoreScrollDelay=()=>null){this.#initialState=initialState,this.#restoreScrollDelay=restoreScrollDelay,this.#countState=bodyLockStackCount.get(),this.#countState&&(this.#countState.cancelPendingCleanup(), this.#countState.ensureInitialStyleCaptured(),this.#countState.lockMap.set(this.#id,this.#initialState??!1),this.locked=boxWith$1(()=>this.#countState.lockMap.get(this.#id)??!1,v=>this.#countState.lockMap.set(this.#id,v)),onDestroyEffect(()=>{if(this.#countState.lockMap.delete(this.#id),isAnyLocked(this.#countState.lockMap))return;const restoreScrollDelay2=this.#restoreScrollDelay();this.#countState.scheduleCleanupIfNoNewLocks(restoreScrollDelay2,()=>{this.#countState.resetBodyStyle()})}))}}function isAnyLocked(map2){ for(const[_,value]of map2)if(value)return!0;return!1}function Scroll_lock($$anchor,$$props){push$1($$props,!0);let preventScroll=prop($$props,"preventScroll",3,!0),restoreScrollDelay=prop($$props,"restoreScrollDelay",3,null);preventScroll()&&new BodyScrollLock(preventScroll(),()=>restoreScrollDelay()),pop()}var root_6$C=from_html(" ",1),root_8$r=from_html("
",1);function Alert_dialog_content$1($$anchor,$$props){const uid=props_id();push$1($$props,!0);let id2=prop($$props,"\ id",19,()=>createId(uid)),ref2=prop($$props,"ref",15,null),forceMount=prop($$props,"forceMount",3,!1),interactOutsideBehavior=prop($$props,"interactOutsideBehavior",3,"ignore"),onCloseAutoFocus=prop($$props,"onCloseAutoFocus",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),onOpenAutoFocus=prop($$props,"onOpenAutoFocus",3,noop$1),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),preventScroll=prop($$props,"preventScroll",3,!0),trapFocus=prop($$props,"trapFocus",3,!0), restoreScrollDelay=prop($$props,"restoreScrollDelay",3,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","interactOutsideBehavior","onCloseAutoFocus","onEscapeKeydown","onOpenAutoFocus","onInteractOutside","preventScroll","trapFocus","restoreScrollDelay"]);const contentState=DialogContentState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,contentState.props));var fragment=comment$2(), node2=first_child(fragment);{var consequent_2=$$anchor2=>{Focus_scope($$anchor2,{get ref(){return contentState.opts.ref},loop:!0,get trapFocus(){return trapFocus()},get enabled(){return contentState.root.opts.open.current},get onCloseAutoFocus(){return onCloseAutoFocus()},onOpenAutoFocus:e=>{onOpenAutoFocus()(e),!e.defaultPrevented&&(e.preventDefault(),afterSleep(0,()=>contentState.opts.ref.current?.focus()))},focusScope:($$anchor3,$$arg0)=>{let focusScopeProps=()=>$$arg0?.().props;Escape_layer( $$anchor3,spread_props(()=>get$4(mergedProps),{get enabled(){return contentState.root.opts.open.current},get ref(){return contentState.opts.ref},onEscapeKeydown:e=>{onEscapeKeydown()(e),!e.defaultPrevented&&contentState.root.handleClose()},children:($$anchor4,$$slotProps)=>{Dismissible_layer($$anchor4,spread_props(()=>get$4(mergedProps),{get ref(){return contentState.opts.ref},get enabled(){return contentState.root.opts.open.current},get interactOutsideBehavior(){return interactOutsideBehavior()}, onInteractOutside:e=>{onInteractOutside()(e),!e.defaultPrevented&&contentState.root.handleClose()},children:($$anchor5,$$slotProps2)=>{Text_selection_layer($$anchor5,spread_props(()=>get$4(mergedProps),{get ref(){return contentState.opts.ref},get enabled(){return contentState.root.opts.open.current},children:($$anchor6,$$slotProps3)=>{var fragment_5=comment$2(),node_1=first_child(fragment_5);{var consequent_1=$$anchor7=>{var fragment_6=root_6$C(),node_2=first_child(fragment_6);{var consequent=$$anchor8=>{ Scroll_lock($$anchor8,{get preventScroll(){return preventScroll()},get restoreScrollDelay(){return restoreScrollDelay()}})};if_block(node_2,$$render=>{contentState.root.opts.open.current&&$$render(consequent)})}var node_3=sibling(node_2,2);{let $0=user_derived(()=>({props:mergeProps(get$4(mergedProps),focusScopeProps()),...contentState.snippetProps}));snippet(node_3,()=>$$props.child,()=>get$4($0))}append($$anchor7,fragment_6)},alternate=$$anchor7=>{var fragment_8=root_8$r(),node_4=first_child(fragment_8); Scroll_lock(node_4,{get preventScroll(){return preventScroll()}});var div=sibling(node_4,2);attribute_effect(div,$0=>({...$0}),[()=>mergeProps(get$4(mergedProps),focusScopeProps())]);var node_5=child(div);snippet(node_5,()=>$$props.children??noop$3),reset(div),append($$anchor7,fragment_8)};if_block(node_1,$$render=>{$$props.child?$$render(consequent_1):$$render(alternate,!1)})}append($$anchor6,fragment_5)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})}; if_block(node2,$$render=>{(contentState.shouldRender||forceMount())&&$$render(consequent_2)})}append($$anchor,fragment),pop()}var root_3$10=from_html("
");function Dialog_overlay$1($$anchor,$$props){const uid=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)),forceMount=prop($$props,"forceMount",3,!1),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const overlayState=DialogOverlayState. create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,overlayState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{var consequent=$$anchor3=>{var fragment_2=comment$2(),node_2=first_child(fragment_2);{let $0=user_derived(()=>({props:mergeProps(get$4(mergedProps)),...overlayState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$4( $0))}append($$anchor3,fragment_2)},alternate=$$anchor3=>{var div=root_3$10();attribute_effect(div,$0=>({...$0}),[()=>mergeProps(get$4(mergedProps))]);var node_3=child(div);snippet(node_3,()=>$$props.children??noop$3,()=>overlayState.snippetProps),reset(div),append($$anchor3,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor2,fragment_1)};if_block(node2,$$render=>{(overlayState.shouldRender||forceMount())&&$$render(consequent_1)})}append($$anchor, fragment),pop()}var root_2$1r=from_html("
");function Dialog_description$1($$anchor,$$props){const uid=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","children","child","ref"]);const descriptionState=DialogDescriptionState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,descriptionState. props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$4(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1r();attribute_effect(div,()=>({...get$4(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent): $$render(alternate,!1)})}append($$anchor,fragment),pop()}const checkboxAttrs=createBitsAttrs({component:"checkbox",parts:["root","group","group-label","input"]}),CheckboxGroupContext=new Context$1("Checkbox.Group"),CheckboxRootContext=new Context$1("Checkbox.Root");class CheckboxRootState{static create(opts,group=null){return CheckboxRootContext.set(new CheckboxRootState(opts,group))}opts;group;#trueName=user_derived(()=>this.group&&this.group.opts.name.current?this.group.opts.name.current:this. opts.name.current);get trueName(){return get$4(this.#trueName)}set trueName(value){set$1(this.#trueName,value)}#trueRequired=user_derived(()=>this.group&&this.group.opts.required.current?!0:this.opts.required.current);get trueRequired(){return get$4(this.#trueRequired)}set trueRequired(value){set$1(this.#trueRequired,value)}#trueDisabled=user_derived(()=>this.group&&this.group.opts.disabled.current?!0:this.opts.disabled.current);get trueDisabled(){return get$4(this.#trueDisabled)}set trueDisabled(value){ set$1(this.#trueDisabled,value)}#trueReadonly=user_derived(()=>this.group&&this.group.opts.readonly.current?!0:this.opts.readonly.current);get trueReadonly(){return get$4(this.#trueReadonly)}set trueReadonly(value){set$1(this.#trueReadonly,value)}attachment;constructor(opts,group){this.opts=opts,this.group=group,this.attachment=attachRef(this.opts.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),watch$1.pre([()=>snapshot(this.group?.opts.value.current),()=>this. opts.value.current],([groupValue,value])=>{!groupValue||!value||(this.opts.checked.current=groupValue.includes(value))}),watch$1.pre(()=>this.opts.checked.current,checked=>{this.group&&(checked?this.group?.addValue(this.opts.value.current):this.group?.removeValue(this.opts.value.current))})}onkeydown(e){if(!(this.trueDisabled||this.trueReadonly)){if(e.key===ENTER){e.preventDefault(),this.opts.type.current==="submit"&&e.currentTarget.closest("form")?.requestSubmit();return}e.key===SPACE&&(e.preventDefault(), this.#toggle())}}#toggle(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current}onclick(e){if(!(this.trueDisabled||this.trueReadonly)){if(this.opts.type.current==="submit"){this.#toggle();return}e.preventDefault(),this.#toggle()}}#snippetProps=user_derived(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current}));get snippetProps(){return get$4(this.#snippetProps)}set snippetProps(value){ set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,role:"checkbox",type:this.opts.type.current,disabled:this.trueDisabled,"aria-checked":getAriaChecked(this.opts.checked.current,this.opts.indeterminate.current),"aria-required":boolToStr(this.trueRequired),"aria-readonly":boolToStr(this.trueReadonly),"data-disabled":boolToEmptyStrOrUndef(this.trueDisabled),"data-readonly":boolToEmptyStrOrUndef(this.trueReadonly),"data-state":getCheckboxDataState(this.opts.checked.current, this.opts.indeterminate.current),[checkboxAttrs.root]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class CheckboxInputState{static create(){return new CheckboxInputState(CheckboxRootContext.get())}root;#trueChecked=user_derived(()=>this.root.group?!!(this.root.opts.value.current!==void 0&&this.root.group.opts.value.current.includes(this.root.opts.value.current)):this.root.opts.checked.current);get trueChecked(){ return get$4(this.#trueChecked)}set trueChecked(value){set$1(this.#trueChecked,value)}#shouldRender=user_derived(()=>!!this.root.trueName);get shouldRender(){return get$4(this.#shouldRender)}set shouldRender(value){set$1(this.#shouldRender,value)}constructor(root2){this.root=root2,this.onfocus=this.onfocus.bind(this)}onfocus(_){isHTMLElement$1(this.root.opts.ref.current)&&this.root.opts.ref.current.focus()}#props=user_derived(()=>({type:"checkbox",checked:this.root.opts.checked.current===!0,disabled:this. root.trueDisabled,required:this.root.trueRequired,name:this.root.trueName,value:this.root.opts.value.current,readonly:this.root.trueReadonly,onfocus:this.onfocus}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}function getCheckboxDataState(checked,indeterminate){return indeterminate?"indeterminate":checked?"checked":"unchecked"}enable_legacy_mode_flag();var root_1$16=from_html(""),root_2$1q=from_html("");function Hidden_input($$anchor,$$props){ push$1($$props,!0);let value=prop($$props,"value",15),restProps=rest_props($$props,["$$slots","$$events","$$legacy","value"]);const mergedProps=user_derived(()=>mergeProps(restProps,{"aria-hidden":"true",tabindex:-1,style:srOnlyStylesString}));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var input=root_1$16();attribute_effect(input,()=>({...get$4(mergedProps),value:value()}),void 0,void 0,void 0,void 0,!0),append($$anchor2,input)},alternate=$$anchor2=>{var input_1=root_2$1q(); attribute_effect(input_1,()=>({...get$4(mergedProps)}),void 0,void 0,void 0,void 0,!0),bind_value(input_1,value),append($$anchor2,input_1)};if_block(node2,$$render=>{get$4(mergedProps).type==="checkbox"?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}function Checkbox_input($$anchor,$$props){push$1($$props,!1);const inputState=CheckboxInputState.create();init();var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{Hidden_input($$anchor2,spread_props( ()=>inputState.props))};if_block(node2,$$render=>{inputState.shouldRender&&$$render(consequent)})}append($$anchor,fragment),pop()}var root_2$1p=from_html(""),root$1L=from_html(" ",1);function Checkbox$1($$anchor,$$props){const uid=props_id();push$1($$props,!0);let checked=prop($$props,"checked",15,!1),ref2=prop($$props,"ref",15,null),disabled=prop($$props,"disabled",3,!1),required2=prop($$props,"required",3,!1),name=prop($$props,"name",3,void 0),value=prop($$props,"valu\ e",3,"on"),id2=prop($$props,"id",19,()=>createId(uid)),indeterminate=prop($$props,"indeterminate",15,!1),type2=prop($$props,"type",3,"button"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","checked","ref","onCheckedChange","children","disabled","required","name","value","id","indeterminate","onIndeterminateChange","child","type","readonly"]);const group=CheckboxGroupContext.getOr(null);group&&value()&&(group.opts.value.current.includes(value())?checked(!0):checked(!1)),watch$1.pre( ()=>value(),()=>{group&&value()&&(group.opts.value.current.includes(value())?checked(!0):checked(!1))});const rootState=CheckboxRootState.create({checked:boxWith$1(()=>checked(),v=>{checked(v),$$props.onCheckedChange?.(v)}),disabled:boxWith$1(()=>disabled()??!1),required:boxWith$1(()=>required2()),name:boxWith$1(()=>name()),value:boxWith$1(()=>value()),id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),indeterminate:boxWith$1(()=>indeterminate(),v=>{indeterminate(v),$$props.onIndeterminateChange?.( v)}),type:boxWith$1(()=>type2()),readonly:boxWith$1(()=>!!$$props.readonly)},group),mergedProps=user_derived(()=>mergeProps({...restProps},rootState.props));var fragment=root$1L(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>({props:get$4(mergedProps),...rootState.snippetProps}));snippet(node_1,()=>$$props.child,()=>get$4($0))}append($$anchor2,fragment_1)},alternate=$$anchor2=>{var button=root_2$1p();attribute_effect( button,()=>({...get$4(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3,()=>rootState.snippetProps),reset(button),append($$anchor2,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}var node_3=sibling(node2,2);Checkbox_input(node_3,{}),append($$anchor,fragment),pop()}const collapsibleAttrs=createBitsAttrs({component:"collapsible",parts:["root","content","trigger"]}),CollapsibleRootContext=new Context$1("Collapsible.Ro\ ot");class CollapsibleRootState{static create(opts){return CollapsibleRootContext.set(new CollapsibleRootState(opts))}opts;attachment;#contentNode=state$1(null);get contentNode(){return get$4(this.#contentNode)}set contentNode(value){set$1(this.#contentNode,value,!0)}contentPresence;#contentId=state$1(void 0);get contentId(){return get$4(this.#contentId)}set contentId(value){set$1(this.#contentId,value,!0)}constructor(opts){this.opts=opts,this.toggleOpen=this.toggleOpen.bind(this),this.attachment= attachRef(this.opts.ref),this.contentPresence=new PresenceManager({ref:boxWith$1(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}})}toggleOpen(){this.opts.open.current=!this.opts.open.current}#props=user_derived(()=>({id:this.opts.id.current,"data-state":getDataOpenClosed(this.opts.open.current),"data-disabled":boolToEmptyStrOrUndef(this.opts.disabled.current),[collapsibleAttrs.root]:"",...this.attachment}));get props(){return get$4( this.#props)}set props(value){set$1(this.#props,value)}}class CollapsibleContentState{static create(opts){return new CollapsibleContentState(opts,CollapsibleRootContext.get())}opts;root;attachment;#present=user_derived(()=>this.opts.hiddenUntilFound.current?this.root.opts.open.current:this.opts.forceMount.current||this.root.opts.open.current);get present(){return get$4(this.#present)}set present(value){set$1(this.#present,value)}#originalStyles;#isMountAnimationPrevented=state$1(!1);#width=state$1( 0);#height=state$1(0);constructor(opts,root2){this.opts=opts,this.root=root2,set$1(this.#isMountAnimationPrevented,root2.opts.open.current,!0),this.root.contentId=this.opts.id.current,this.attachment=attachRef(this.opts.ref,v=>this.root.contentNode=v),watch$1.pre(()=>this.opts.id.current,id2=>{this.root.contentId=id2}),user_pre_effect(()=>{const rAF=requestAnimationFrame(()=>{set$1(this.#isMountAnimationPrevented,!1)});return()=>{cancelAnimationFrame(rAF)}}),watch$1.pre([()=>this.opts.ref.current, ()=>this.opts.hiddenUntilFound.current],([node2,hiddenUntilFound])=>!node2||!hiddenUntilFound?void 0:on(node2,"beforematch",()=>{this.root.opts.open.current||requestAnimationFrame(()=>{this.root.opts.open.current=!0})})),watch$1([()=>this.opts.ref.current,()=>this.present],([node2])=>{node2&&afterTick(()=>{if(!this.opts.ref.current)return;this.#originalStyles=this.#originalStyles||{transitionDuration:node2.style.transitionDuration,animationName:node2.style.animationName},node2.style.transitionDuration= "0s",node2.style.animationName="none";const rect=node2.getBoundingClientRect();if(set$1(this.#height,rect.height,!0),set$1(this.#width,rect.width,!0),!get$4(this.#isMountAnimationPrevented)){const{animationName,transitionDuration}=this.#originalStyles;node2.style.transitionDuration=transitionDuration,node2.style.animationName=animationName}})})}get shouldRender(){return this.root.contentPresence.shouldRender}#snippetProps=user_derived(()=>({open:this.root.opts.open.current}));get snippetProps(){ return get$4(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":get$4(this.#height)?`${get$4(this.#height)}px`:void 0,"--bits-collapsible-content-width":get$4(this.#width)?`${get$4(this.#width)}px`:void 0},hidden:this.opts.hiddenUntilFound.current&&!this.root.opts.open.current?"until-found":void 0,"data-state":getDataOpenClosed(this.root.opts.open.current),"data-disabled":boolToEmptyStrOrUndef( this.root.opts.disabled.current),[collapsibleAttrs.content]:"",...this.opts.hiddenUntilFound.current&&!this.shouldRender?{}:{hidden:this.opts.hiddenUntilFound.current?!this.shouldRender:this.opts.forceMount.current?void 0:!this.shouldRender},...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class CollapsibleTriggerState{static create(opts){return new CollapsibleTriggerState(opts,CollapsibleRootContext.get())}opts;root;attachment;#isDisabled=user_derived( ()=>this.opts.disabled.current||this.root.opts.disabled.current);constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){if(!get$4(this.#isDisabled)){if(e.button!==0)return e.preventDefault();this.root.toggleOpen()}}onkeydown(e){get$4(this.#isDisabled)||(e.key===SPACE||e.key===ENTER)&&(e.preventDefault(),this.root.toggleOpen())}#props=user_derived(()=>({id:this.opts.id. current,type:"button",disabled:get$4(this.#isDisabled),"aria-controls":this.root.contentId,"aria-expanded":boolToStr(this.root.opts.open.current),"data-state":getDataOpenClosed(this.root.opts.open.current),"data-disabled":boolToEmptyStrOrUndef(get$4(this.#isDisabled)),[collapsibleAttrs.trigger]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}var root_2$1o=from_html("
");function Collapsible$1($$anchor,$$props){ const uid=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)),ref2=prop($$props,"ref",15,null),open2=prop($$props,"open",15,!1),disabled=prop($$props,"disabled",3,!1),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child","id","ref","open","disabled","onOpenChange","onOpenChangeComplete"]);const rootState=CollapsibleRootState.create( {open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),disabled:boxWith$1(()=>disabled()),id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())}),mergedProps=user_derived(()=>mergeProps(restProps,rootState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$4(mergedProps)})),append($$anchor2, fragment_1)},alternate=$$anchor2=>{var div=root_2$1o();attribute_effect(div,()=>({...get$4(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}var root_2$1n=from_html("
");function Collapsible_content$1($$anchor,$$props){const uid=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),forceMount=prop( $$props,"forceMount",3,!1),hiddenUntilFound=prop($$props,"hiddenUntilFound",3,!1),id2=prop($$props,"id",19,()=>createId(uid)),restProps=rest_props($$props,["$$slots","$$events","$$legacy","child","ref","forceMount","hiddenUntilFound","children","id"]);const contentState=CollapsibleContentState.create({id:boxWith$1(()=>id2()),forceMount:boxWith$1(()=>forceMount()),hiddenUntilFound:boxWith$1(()=>hiddenUntilFound()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps, contentState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>({...contentState.snippetProps,props:get$4(mergedProps)}));snippet(node_1,()=>$$props.child,()=>get$4($0))}append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1n();attribute_effect(div,()=>({...get$4(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append( $$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}var root_2$1m=from_html("");function Collapsible_trigger$1($$anchor,$$props){const uid=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid)),disabled=prop($$props,"disabled",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child","ref","id","disabled"]);const triggerState=CollapsibleTriggerState. create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),disabled:boxWith$1(()=>disabled())}),mergedProps=user_derived(()=>mergeProps(restProps,triggerState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$4(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var button=root_2$1m();attribute_effect(button,()=>({...get$4(mergedProps)})); var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor2,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}const sides=["top","right","bottom","left"],min=Math.min,max=Math.max,round=Math.round,floor=Math.floor,createCoords=v=>({x:v,y:v}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$1(start2,value,end){ return max(start2,min(value,end))}function evaluate(value,param){return typeof value=="function"?value(param):value}function getSide$1(placement){return placement.split("-")[0]}function getAlignment(placement){return placement.split("-")[1]}function getOppositeAxis(axis){return axis==="x"?"y":"x"}function getAxisLength(axis){return axis==="y"?"height":"width"}const yAxisSides=new Set(["top","bottom"]);function getSideAxis(placement){return yAxisSides.has(getSide$1(placement))?"y":"x"}function getAlignmentAxis(placement){ return getOppositeAxis(getSideAxis(placement))}function getAlignmentSides(placement,rects,rtl){rtl===void 0&&(rtl=!1);const alignment=getAlignment(placement),alignmentAxis=getAlignmentAxis(placement),length=getAxisLength(alignmentAxis);let mainAlignmentSide=alignmentAxis==="x"?alignment===(rtl?"end":"start")?"right":"left":alignment==="start"?"bottom":"top";return rects.reference[length]>rects.floating[length]&&(mainAlignmentSide=getOppositePlacement(mainAlignmentSide)),[mainAlignmentSide,getOppositePlacement( mainAlignmentSide)]}function getExpandedPlacements(placement){const oppositePlacement=getOppositePlacement(placement);return[getOppositeAlignmentPlacement(placement),oppositePlacement,getOppositeAlignmentPlacement(oppositePlacement)]}function getOppositeAlignmentPlacement(placement){return placement.replace(/start|end/g,alignment=>oppositeAlignmentMap[alignment])}const lrPlacement=["left","right"],rlPlacement=["right","left"],tbPlacement=["top","bottom"],btPlacement=["bottom","top"];function getSideList(side,isStart,rtl){ switch(side){case"top":case"bottom":return rtl?isStart?rlPlacement:lrPlacement:isStart?lrPlacement:rlPlacement;case"left":case"right":return isStart?tbPlacement:btPlacement;default:return[]}}function getOppositeAxisPlacements(placement,flipAlignment,direction,rtl){const alignment=getAlignment(placement);let list2=getSideList(getSide$1(placement),direction==="start",rtl);return alignment&&(list2=list2.map(side=>side+"-"+alignment),flipAlignment&&(list2=list2.concat(list2.map(getOppositeAlignmentPlacement)))), list2}function getOppositePlacement(placement){return placement.replace(/left|right|bottom|top/g,side=>oppositeSideMap[side])}function expandPaddingObject(padding){return{top:0,right:0,bottom:0,left:0,...padding}}function getPaddingObject(padding){return typeof padding!="number"?expandPaddingObject(padding):{top:padding,right:padding,bottom:padding,left:padding}}function rectToClientRect(rect){const{x,y,width,height}=rect;return{width,height,top:y,left:x,right:x+width,bottom:y+height,x,y}}function computeCoordsFromPlacement(_ref,placement,rtl){ let{reference,floating}=_ref;const sideAxis=getSideAxis(placement),alignmentAxis=getAlignmentAxis(placement),alignLength=getAxisLength(alignmentAxis),side=getSide$1(placement),isVertical=sideAxis==="y",commonX=reference.x+reference.width/2-floating.width/2,commonY=reference.y+reference.height/2-floating.height/2,commonAlign=reference[alignLength]/2-floating[alignLength]/2;let coords;switch(side){case"top":coords={x:commonX,y:reference.y-floating.height};break;case"bottom":coords={x:commonX,y:reference. y+reference.height};break;case"right":coords={x:reference.x+reference.width,y:commonY};break;case"left":coords={x:reference.x-floating.width,y:commonY};break;default:coords={x:reference.x,y:reference.y}}switch(getAlignment(placement)){case"start":coords[alignmentAxis]-=commonAlign*(rtl&&isVertical?-1:1);break;case"end":coords[alignmentAxis]+=commonAlign*(rtl&&isVertical?-1:1);break}return coords}const computePosition$1=async(reference,floating,config2)=>{const{placement="bottom",strategy="absolu\ te",middleware=[],platform:platform2}=config2,validMiddleware=middleware.filter(Boolean),rtl=await(platform2.isRTL==null?void 0:platform2.isRTL(floating));let rects=await platform2.getElementRects({reference,floating,strategy}),{x,y}=computeCoordsFromPlacement(rects,placement,rtl),statefulPlacement=placement,middlewareData={},resetCount=0;for(let i=0;i({name:"arrow",options,async fn(state2){const{x,y,placement,rects,platform:platform2,elements,middlewareData}=state2,{element:element2,padding=0}=evaluate(options,state2)|| {};if(element2==null)return{};const paddingObject=getPaddingObject(padding),coords={x,y},axis=getAlignmentAxis(placement),length=getAxisLength(axis),arrowDimensions=await platform2.getDimensions(element2),isYAxis=axis==="y",minProp=isYAxis?"top":"left",maxProp=isYAxis?"bottom":"right",clientProp=isYAxis?"clientHeight":"clientWidth",endDiff=rects.reference[length]+rects.reference[axis]-coords[axis]-rects.floating[length],startDiff=coords[axis]-rects.reference[axis],arrowOffsetParent=await(platform2. getOffsetParent==null?void 0:platform2.getOffsetParent(element2));let clientSize=arrowOffsetParent?arrowOffsetParent[clientProp]:0;(!clientSize||!await(platform2.isElement==null?void 0:platform2.isElement(arrowOffsetParent)))&&(clientSize=elements.floating[clientProp]||rects.floating[length]);const centerToReference=endDiff/2-startDiff/2,largestPossiblePadding=clientSize/2-arrowDimensions[length]/2-1,minPadding=min(paddingObject[minProp],largestPossiblePadding),maxPadding=min(paddingObject[maxProp], largestPossiblePadding),min$1=minPadding,max2=clientSize-arrowDimensions[length]-maxPadding,center=clientSize/2-arrowDimensions[length]/2+centerToReference,offset2=clamp$1(min$1,center,max2),shouldAddOffset=!middlewareData.arrow&&getAlignment(placement)!=null&¢er!==offset2&&rects.reference[length]/2-(centerside2<=0)){var _middlewareData$flip2,_overflowsData$filter;const nextIndex=(((_middlewareData$flip2=middlewareData.flip)==null?void 0:_middlewareData$flip2.index)||0)+1,nextPlacement=placements[nextIndex];if(nextPlacement&&(!(checkCrossAxis=== "alignment"?initialSideAxis!==getSideAxis(nextPlacement):!1)||overflowsData.every(d2=>d2.overflows[0]>0&&getSideAxis(d2.placement)===initialSideAxis)))return{data:{index:nextIndex,overflows:overflowsData},reset:{placement:nextPlacement}};let resetPlacement=(_overflowsData$filter=overflowsData.filter(d2=>d2.overflows[0]<=0).sort((a,b)=>a.overflows[1]-b.overflows[1])[0])==null?void 0:_overflowsData$filter.placement;if(!resetPlacement)switch(fallbackStrategy){case"bestFit":{var _overflowsData$filter2; const placement2=(_overflowsData$filter2=overflowsData.filter(d2=>{if(hasFallbackAxisSideDirection){const currentSideAxis=getSideAxis(d2.placement);return currentSideAxis===initialSideAxis||currentSideAxis==="y"}return!0}).map(d2=>[d2.placement,d2.overflows.filter(overflow2=>overflow2>0).reduce((acc,overflow2)=>acc+overflow2,0)]).sort((a,b)=>a[1]-b[1])[0])==null?void 0:_overflowsData$filter2[0];placement2&&(resetPlacement=placement2);break}case"initialPlacement":resetPlacement=initialPlacement;break} if(placement!==resetPlacement)return{reset:{placement:resetPlacement}}}return{}}}};function getSideOffsets(overflow,rect){return{top:overflow.top-rect.height,right:overflow.right-rect.width,bottom:overflow.bottom-rect.height,left:overflow.left-rect.width}}function isAnySideFullyClipped(overflow){return sides.some(side=>overflow[side]>=0)}const hide$1=function(options){return options===void 0&&(options={}),{name:"hide",options,async fn(state2){const{rects}=state2,{strategy="referenceHidden",...detectOverflowOptions}=evaluate( options,state2);switch(strategy){case"referenceHidden":{const overflow=await detectOverflow(state2,{...detectOverflowOptions,elementContext:"reference"}),offsets=getSideOffsets(overflow,rects.reference);return{data:{referenceHiddenOffsets:offsets,referenceHidden:isAnySideFullyClipped(offsets)}}}case"escaped":{const overflow=await detectOverflow(state2,{...detectOverflowOptions,altBoundary:!0}),offsets=getSideOffsets(overflow,rects.floating);return{data:{escapedOffsets:offsets,escaped:isAnySideFullyClipped( offsets)}}}default:return{}}}}},originSides=new Set(["left","top"]);async function convertValueToCoords(state2,options){const{placement,platform:platform2,elements}=state2,rtl=await(platform2.isRTL==null?void 0:platform2.isRTL(elements.floating)),side=getSide$1(placement),alignment=getAlignment(placement),isVertical=getSideAxis(placement)==="y",mainAxisMulti=originSides.has(side)?-1:1,crossAxisMulti=rtl&&isVertical?-1:1,rawValue=evaluate(options,state2);let{mainAxis,crossAxis,alignmentAxis}=typeof rawValue== "number"?{mainAxis:rawValue,crossAxis:0,alignmentAxis:null}:{mainAxis:rawValue.mainAxis||0,crossAxis:rawValue.crossAxis||0,alignmentAxis:rawValue.alignmentAxis};return alignment&&typeof alignmentAxis=="number"&&(crossAxis=alignment==="end"?alignmentAxis*-1:alignmentAxis),isVertical?{x:crossAxis*crossAxisMulti,y:mainAxis*mainAxisMulti}:{x:mainAxis*mainAxisMulti,y:crossAxis*crossAxisMulti}}const offset$1=function(options){return options===void 0&&(options=0),{name:"offset",options,async fn(state2){ var _middlewareData$offse,_middlewareData$arrow;const{x,y,placement,middlewareData}=state2,diffCoords=await convertValueToCoords(state2,options);return placement===((_middlewareData$offse=middlewareData.offset)==null?void 0:_middlewareData$offse.placement)&&(_middlewareData$arrow=middlewareData.arrow)!=null&&_middlewareData$arrow.alignmentOffset?{}:{x:x+diffCoords.x,y:y+diffCoords.y,data:{...diffCoords,placement}}}}},shift$1=function(options){return options===void 0&&(options={}),{name:"shift",options, async fn(state2){const{x,y,placement}=state2,{mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!1,limiter={fn:_ref=>{let{x:x2,y:y2}=_ref;return{x:x2,y:y2}}},...detectOverflowOptions}=evaluate(options,state2),coords={x,y},overflow=await detectOverflow(state2,detectOverflowOptions),crossAxis=getSideAxis(getSide$1(placement)),mainAxis=getOppositeAxis(crossAxis);let mainAxisCoord=coords[mainAxis],crossAxisCoord=coords[crossAxis];if(checkMainAxis){const minSide=mainAxis==="y"?"top":"left",maxSide=mainAxis=== "y"?"bottom":"right",min2=mainAxisCoord+overflow[minSide],max2=mainAxisCoord-overflow[maxSide];mainAxisCoord=clamp$1(min2,mainAxisCoord,max2)}if(checkCrossAxis){const minSide=crossAxis==="y"?"top":"left",maxSide=crossAxis==="y"?"bottom":"right",min2=crossAxisCoord+overflow[minSide],max2=crossAxisCoord-overflow[maxSide];crossAxisCoord=clamp$1(min2,crossAxisCoord,max2)}const limitedCoords=limiter.fn({...state2,[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord});return{...limitedCoords,data:{x:limitedCoords. x-x,y:limitedCoords.y-y,enabled:{[mainAxis]:checkMainAxis,[crossAxis]:checkCrossAxis}}}}}},limitShift$1=function(options){return options===void 0&&(options={}),{options,fn(state2){const{x,y,placement,rects,middlewareData}=state2,{offset:offset2=0,mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!0}=evaluate(options,state2),coords={x,y},crossAxis=getSideAxis(placement),mainAxis=getOppositeAxis(crossAxis);let mainAxisCoord=coords[mainAxis],crossAxisCoord=coords[crossAxis];const rawOffset=evaluate( offset2,state2),computedOffset=typeof rawOffset=="number"?{mainAxis:rawOffset,crossAxis:0}:{mainAxis:0,crossAxis:0,...rawOffset};if(checkMainAxis){const len=mainAxis==="y"?"height":"width",limitMin=rects.reference[mainAxis]-rects.floating[len]+computedOffset.mainAxis,limitMax=rects.reference[mainAxis]+rects.reference[len]-computedOffset.mainAxis;mainAxisCoordlimitMax&&(mainAxisCoord=limitMax)}if(checkCrossAxis){var _middlewareData$offse,_middlewareData$offse2; const len=mainAxis==="y"?"width":"height",isOriginSide=originSides.has(getSide$1(placement)),limitMin=rects.reference[crossAxis]-rects.floating[len]+(isOriginSide&&((_middlewareData$offse=middlewareData.offset)==null?void 0:_middlewareData$offse[crossAxis])||0)+(isOriginSide?0:computedOffset.crossAxis),limitMax=rects.reference[crossAxis]+rects.reference[len]+(isOriginSide?0:((_middlewareData$offse2=middlewareData.offset)==null?void 0:_middlewareData$offse2[crossAxis])||0)-(isOriginSide?computedOffset. crossAxis:0);crossAxisCoordlimitMax&&(crossAxisCoord=limitMax)}return{[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord}}}},size$1=function(options){return options===void 0&&(options={}),{name:"size",options,async fn(state2){var _state$middlewareData,_state$middlewareData2;const{placement,rects,platform:platform2,elements}=state2,{apply=()=>{},...detectOverflowOptions}=evaluate(options,state2),overflow=await detectOverflow(state2,detectOverflowOptions), side=getSide$1(placement),alignment=getAlignment(placement),isYAxis=getSideAxis(placement)==="y",{width,height}=rects.floating;let heightSide,widthSide;side==="top"||side==="bottom"?(heightSide=side,widthSide=alignment===(await(platform2.isRTL==null?void 0:platform2.isRTL(elements.floating))?"start":"end")?"left":"right"):(widthSide=side,heightSide=alignment==="end"?"top":"bottom");const maximumClippingHeight=height-overflow.top-overflow.bottom,maximumClippingWidth=width-overflow.left-overflow.right, overflowAvailableHeight=min(height-overflow[heightSide],maximumClippingHeight),overflowAvailableWidth=min(width-overflow[widthSide],maximumClippingWidth),noShift=!state2.middlewareData.shift;let availableHeight=overflowAvailableHeight,availableWidth=overflowAvailableWidth;if((_state$middlewareData=state2.middlewareData.shift)!=null&&_state$middlewareData.enabled.x&&(availableWidth=maximumClippingWidth),(_state$middlewareData2=state2.middlewareData.shift)!=null&&_state$middlewareData2.enabled.y&& (availableHeight=maximumClippingHeight),noShift&&!alignment){const xMin=max(overflow.left,0),xMax=max(overflow.right,0),yMin=max(overflow.top,0),yMax=max(overflow.bottom,0);isYAxis?availableWidth=width-2*(xMin!==0||xMax!==0?xMin+xMax:max(overflow.left,overflow.right)):availableHeight=height-2*(yMin!==0||yMax!==0?yMin+yMax:max(overflow.top,overflow.bottom))}await apply({...state2,availableWidth,availableHeight});const nextDimensions=await platform2.getDimensions(elements.floating);return width!== nextDimensions.width||height!==nextDimensions.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<"u"}function getNodeName(node2){return isNode(node2)?(node2.nodeName||"").toLowerCase():"#document"}function getWindow(node2){var _node$ownerDocument;return(node2==null||(_node$ownerDocument=node2.ownerDocument)==null?void 0:_node$ownerDocument.defaultView)||window}function getDocumentElement(node2){var _ref;return(_ref=(isNode(node2)?node2.ownerDocument:node2.document)||window. document)==null?void 0:_ref.documentElement}function isNode(value){return hasWindow()?value instanceof Node||value instanceof getWindow(value).Node:!1}function isElement(value){return hasWindow()?value instanceof Element||value instanceof getWindow(value).Element:!1}function isHTMLElement(value){return hasWindow()?value instanceof HTMLElement||value instanceof getWindow(value).HTMLElement:!1}function isShadowRoot(value){return!hasWindow()||typeof ShadowRoot>"u"?!1:value instanceof ShadowRoot||value instanceof getWindow(value).ShadowRoot}const invalidOverflowDisplayValues=new Set(["inline","contents"]);function isOverflowElement(element2){const{overflow,overflowX,overflowY,display}=getComputedStyle$1(element2);return/auto|scroll|overlay|hidden|clip/.test(overflow+overflowY+overflowX)&&!invalidOverflowDisplayValues.has(display)}const tableElements=new Set(["table","td","th"]);function isTableElement(element2){return tableElements.has(getNodeName(element2))}const topLayerSelectors=[":popover-open",":mod\ al"];function isTopLayer(element2){return topLayerSelectors.some(selector=>{try{return element2.matches(selector)}catch{return!1}})}const transformProperties=["transform","translate","scale","rotate","perspective"],willChangeValues=["transform","translate","scale","rotate","perspective","filter"],containValues=["paint","layout","strict","content"];function isContainingBlock(elementOrCss){const webkit=isWebKit(),css2=isElement(elementOrCss)?getComputedStyle$1(elementOrCss):elementOrCss;return transformProperties. some(value=>css2[value]?css2[value]!=="none":!1)||(css2.containerType?css2.containerType!=="normal":!1)||!webkit&&(css2.backdropFilter?css2.backdropFilter!=="none":!1)||!webkit&&(css2.filter?css2.filter!=="none":!1)||willChangeValues.some(value=>(css2.willChange||"").includes(value))||containValues.some(value=>(css2.contain||"").includes(value))}function getContainingBlock(element2){let currentNode=getParentNode(element2);for(;isHTMLElement(currentNode)&&!isLastTraversableNode(currentNode);){if(isContainingBlock( currentNode))return currentNode;if(isTopLayer(currentNode))return null;currentNode=getParentNode(currentNode)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const lastTraversableNodeNames=new Set(["html","body","#document"]);function isLastTraversableNode(node2){return lastTraversableNodeNames.has(getNodeName(node2))}function getComputedStyle$1(element2){return getWindow(element2).getComputedStyle(element2)}function getNodeScroll(element2){ return isElement(element2)?{scrollLeft:element2.scrollLeft,scrollTop:element2.scrollTop}:{scrollLeft:element2.scrollX,scrollTop:element2.scrollY}}function getParentNode(node2){if(getNodeName(node2)==="html")return node2;const result=node2.assignedSlot||node2.parentNode||isShadowRoot(node2)&&node2.host||getDocumentElement(node2);return isShadowRoot(result)?result.host:result}function getNearestOverflowAncestor(node2){const parentNode=getParentNode(node2);return isLastTraversableNode(parentNode)?node2. ownerDocument?node2.ownerDocument.body:node2.body:isHTMLElement(parentNode)&&isOverflowElement(parentNode)?parentNode:getNearestOverflowAncestor(parentNode)}function getOverflowAncestors(node2,list2,traverseIframes){var _node$ownerDocument2;list2===void 0&&(list2=[]),traverseIframes===void 0&&(traverseIframes=!0);const scrollableAncestor=getNearestOverflowAncestor(node2),isBody=scrollableAncestor===((_node$ownerDocument2=node2.ownerDocument)==null?void 0:_node$ownerDocument2.body),win=getWindow( scrollableAncestor);if(isBody){const frameElement=getFrameElement(win);return list2.concat(win,win.visualViewport||[],isOverflowElement(scrollableAncestor)?scrollableAncestor:[],frameElement&&traverseIframes?getOverflowAncestors(frameElement):[])}return list2.concat(scrollableAncestor,getOverflowAncestors(scrollableAncestor,[],traverseIframes))}function getFrameElement(win){return win.parent&&Object.getPrototypeOf(win.parent)?win.frameElement:null}function getCssDimensions(element2){const css2=getComputedStyle$1( element2);let width=parseFloat(css2.width)||0,height=parseFloat(css2.height)||0;const hasOffset=isHTMLElement(element2),offsetWidth=hasOffset?element2.offsetWidth:width,offsetHeight=hasOffset?element2.offsetHeight:height,shouldFallback=round(width)!==offsetWidth||round(height)!==offsetHeight;return shouldFallback&&(width=offsetWidth,height=offsetHeight),{width,height,$:shouldFallback}}function unwrapElement(element2){return isElement(element2)?element2:element2.contextElement}function getScale(element2){ const domElement=unwrapElement(element2);if(!isHTMLElement(domElement))return createCoords(1);const rect=domElement.getBoundingClientRect(),{width,height,$}=getCssDimensions(domElement);let x=($?round(rect.width):rect.width)/width,y=($?round(rect.height):rect.height)/height;return(!x||!Number.isFinite(x))&&(x=1),(!y||!Number.isFinite(y))&&(y=1),{x,y}}const noOffsets=createCoords(0);function getVisualOffsets(element2){const win=getWindow(element2);return!isWebKit()||!win.visualViewport?noOffsets: {x:win.visualViewport.offsetLeft,y:win.visualViewport.offsetTop}}function shouldAddVisualOffsets(element2,isFixed,floatingOffsetParent){return isFixed===void 0&&(isFixed=!1),!floatingOffsetParent||isFixed&&floatingOffsetParent!==getWindow(element2)?!1:isFixed}function getBoundingClientRect(element2,includeScale,isFixedStrategy,offsetParent){includeScale===void 0&&(includeScale=!1),isFixedStrategy===void 0&&(isFixedStrategy=!1);const clientRect=element2.getBoundingClientRect(),domElement=unwrapElement( element2);let scale2=createCoords(1);includeScale&&(offsetParent?isElement(offsetParent)&&(scale2=getScale(offsetParent)):scale2=getScale(element2));const visualOffsets=shouldAddVisualOffsets(domElement,isFixedStrategy,offsetParent)?getVisualOffsets(domElement):createCoords(0);let x=(clientRect.left+visualOffsets.x)/scale2.x,y=(clientRect.top+visualOffsets.y)/scale2.y,width=clientRect.width/scale2.x,height=clientRect.height/scale2.y;if(domElement){const win=getWindow(domElement),offsetWin=offsetParent&& isElement(offsetParent)?getWindow(offsetParent):offsetParent;let currentWin=win,currentIFrame=getFrameElement(currentWin);for(;currentIFrame&&offsetParent&&offsetWin!==currentWin;){const iframeScale=getScale(currentIFrame),iframeRect=currentIFrame.getBoundingClientRect(),css2=getComputedStyle$1(currentIFrame),left=iframeRect.left+(currentIFrame.clientLeft+parseFloat(css2.paddingLeft))*iframeScale.x,top=iframeRect.top+(currentIFrame.clientTop+parseFloat(css2.paddingTop))*iframeScale.y;x*=iframeScale. x,y*=iframeScale.y,width*=iframeScale.x,height*=iframeScale.y,x+=left,y+=top,currentWin=getWindow(currentIFrame),currentIFrame=getFrameElement(currentWin)}}return rectToClientRect({width,height,x,y})}function getWindowScrollBarX(element2,rect){const leftScroll=getNodeScroll(element2).scrollLeft;return rect?rect.left+leftScroll:getBoundingClientRect(getDocumentElement(element2)).left+leftScroll}function getHTMLOffset(documentElement,scroll,ignoreScrollbarX){ignoreScrollbarX===void 0&&(ignoreScrollbarX= !1);const htmlRect=documentElement.getBoundingClientRect(),x=htmlRect.left+scroll.scrollLeft-(ignoreScrollbarX?0:getWindowScrollBarX(documentElement,htmlRect)),y=htmlRect.top+scroll.scrollTop;return{x,y}}function convertOffsetParentRelativeRectToViewportRelativeRect(_ref){let{elements,rect,offsetParent,strategy}=_ref;const isFixed=strategy==="fixed",documentElement=getDocumentElement(offsetParent),topLayer=elements?isTopLayer(elements.floating):!1;if(offsetParent===documentElement||topLayer&&isFixed) return rect;let scroll={scrollLeft:0,scrollTop:0},scale2=createCoords(1);const offsets=createCoords(0),isOffsetParentAnElement=isHTMLElement(offsetParent);if((isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed)&&((getNodeName(offsetParent)!=="body"||isOverflowElement(documentElement))&&(scroll=getNodeScroll(offsetParent)),isHTMLElement(offsetParent))){const offsetRect=getBoundingClientRect(offsetParent);scale2=getScale(offsetParent),offsets.x=offsetRect.x+offsetParent.clientLeft,offsets. y=offsetRect.y+offsetParent.clientTop}const htmlOffset=documentElement&&!isOffsetParentAnElement&&!isFixed?getHTMLOffset(documentElement,scroll,!0):createCoords(0);return{width:rect.width*scale2.x,height:rect.height*scale2.y,x:rect.x*scale2.x-scroll.scrollLeft*scale2.x+offsets.x+htmlOffset.x,y:rect.y*scale2.y-scroll.scrollTop*scale2.y+offsets.y+htmlOffset.y}}function getClientRects(element2){return Array.from(element2.getClientRects())}function getDocumentRect(element2){const html2=getDocumentElement( element2),scroll=getNodeScroll(element2),body2=element2.ownerDocument.body,width=max(html2.scrollWidth,html2.clientWidth,body2.scrollWidth,body2.clientWidth),height=max(html2.scrollHeight,html2.clientHeight,body2.scrollHeight,body2.clientHeight);let x=-scroll.scrollLeft+getWindowScrollBarX(element2);const y=-scroll.scrollTop;return getComputedStyle$1(body2).direction==="rtl"&&(x+=max(html2.clientWidth,body2.clientWidth)-width),{width,height,x,y}}function getViewportRect(element2,strategy){const win=getWindow( element2),html2=getDocumentElement(element2),visualViewport=win.visualViewport;let width=html2.clientWidth,height=html2.clientHeight,x=0,y=0;if(visualViewport){width=visualViewport.width,height=visualViewport.height;const visualViewportBased=isWebKit();(!visualViewportBased||visualViewportBased&&strategy==="fixed")&&(x=visualViewport.offsetLeft,y=visualViewport.offsetTop)}return{width,height,x,y}}const absoluteOrFixed=new Set(["absolute","fixed"]);function getInnerBoundingClientRect(element2,strategy){ const clientRect=getBoundingClientRect(element2,!0,strategy==="fixed"),top=clientRect.top+element2.clientTop,left=clientRect.left+element2.clientLeft,scale2=isHTMLElement(element2)?getScale(element2):createCoords(1),width=element2.clientWidth*scale2.x,height=element2.clientHeight*scale2.y,x=left*scale2.x,y=top*scale2.y;return{width,height,x,y}}function getClientRectFromClippingAncestor(element2,clippingAncestor,strategy){let rect;if(clippingAncestor==="viewport")rect=getViewportRect(element2,strategy);else if(clippingAncestor=== "document")rect=getDocumentRect(getDocumentElement(element2));else if(isElement(clippingAncestor))rect=getInnerBoundingClientRect(clippingAncestor,strategy);else{const visualOffsets=getVisualOffsets(element2);rect={x:clippingAncestor.x-visualOffsets.x,y:clippingAncestor.y-visualOffsets.y,width:clippingAncestor.width,height:clippingAncestor.height}}return rectToClientRect(rect)}function hasFixedPositionAncestor(element2,stopNode){const parentNode=getParentNode(element2);return parentNode===stopNode|| !isElement(parentNode)||isLastTraversableNode(parentNode)?!1:getComputedStyle$1(parentNode).position==="fixed"||hasFixedPositionAncestor(parentNode,stopNode)}function getClippingElementAncestors(element2,cache2){const cachedResult=cache2.get(element2);if(cachedResult)return cachedResult;let result=getOverflowAncestors(element2,[],!1).filter(el=>isElement(el)&&getNodeName(el)!=="body"),currentContainingBlockComputedStyle=null;const elementIsFixed=getComputedStyle$1(element2).position==="fixed";let currentNode=elementIsFixed? getParentNode(element2):element2;for(;isElement(currentNode)&&!isLastTraversableNode(currentNode);){const computedStyle=getComputedStyle$1(currentNode),currentNodeIsContaining=isContainingBlock(currentNode);!currentNodeIsContaining&&computedStyle.position==="fixed"&&(currentContainingBlockComputedStyle=null),(elementIsFixed?!currentNodeIsContaining&&!currentContainingBlockComputedStyle:!currentNodeIsContaining&&computedStyle.position==="static"&&!!currentContainingBlockComputedStyle&&absoluteOrFixed. has(currentContainingBlockComputedStyle.position)||isOverflowElement(currentNode)&&!currentNodeIsContaining&&hasFixedPositionAncestor(element2,currentNode))?result=result.filter(ancestor=>ancestor!==currentNode):currentContainingBlockComputedStyle=computedStyle,currentNode=getParentNode(currentNode)}return cache2.set(element2,result),result}function getClippingRect(_ref){let{element:element2,boundary:boundary2,rootBoundary,strategy}=_ref;const clippingAncestors=[...boundary2==="clippingAncestors"? isTopLayer(element2)?[]:getClippingElementAncestors(element2,this._c):[].concat(boundary2),rootBoundary],firstClippingAncestor=clippingAncestors[0],clippingRect=clippingAncestors.reduce((accRect,clippingAncestor)=>{const rect=getClientRectFromClippingAncestor(element2,clippingAncestor,strategy);return accRect.top=max(rect.top,accRect.top),accRect.right=min(rect.right,accRect.right),accRect.bottom=min(rect.bottom,accRect.bottom),accRect.left=max(rect.left,accRect.left),accRect},getClientRectFromClippingAncestor( element2,firstClippingAncestor,strategy));return{width:clippingRect.right-clippingRect.left,height:clippingRect.bottom-clippingRect.top,x:clippingRect.left,y:clippingRect.top}}function getDimensions(element2){const{width,height}=getCssDimensions(element2);return{width,height}}function getRectRelativeToOffsetParent(element2,offsetParent,strategy){const isOffsetParentAnElement=isHTMLElement(offsetParent),documentElement=getDocumentElement(offsetParent),isFixed=strategy==="fixed",rect=getBoundingClientRect( element2,!0,isFixed,offsetParent);let scroll={scrollLeft:0,scrollTop:0};const offsets=createCoords(0);function setLeftRTLScrollbarOffset(){offsets.x=getWindowScrollBarX(documentElement)}if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed)if((getNodeName(offsetParent)!=="body"||isOverflowElement(documentElement))&&(scroll=getNodeScroll(offsetParent)),isOffsetParentAnElement){const offsetRect=getBoundingClientRect(offsetParent,!0,isFixed,offsetParent);offsets.x=offsetRect.x+offsetParent. clientLeft,offsets.y=offsetRect.y+offsetParent.clientTop}else documentElement&&setLeftRTLScrollbarOffset();isFixed&&!isOffsetParentAnElement&&documentElement&&setLeftRTLScrollbarOffset();const htmlOffset=documentElement&&!isOffsetParentAnElement&&!isFixed?getHTMLOffset(documentElement,scroll):createCoords(0),x=rect.left+scroll.scrollLeft-offsets.x-htmlOffset.x,y=rect.top+scroll.scrollTop-offsets.y-htmlOffset.y;return{x,y,width:rect.width,height:rect.height}}function isStaticPositioned(element2){ return getComputedStyle$1(element2).position==="static"}function getTrueOffsetParent(element2,polyfill){if(!isHTMLElement(element2)||getComputedStyle$1(element2).position==="fixed")return null;if(polyfill)return polyfill(element2);let rawOffsetParent=element2.offsetParent;return getDocumentElement(element2)===rawOffsetParent&&(rawOffsetParent=rawOffsetParent.ownerDocument.body),rawOffsetParent}function getOffsetParent(element2,polyfill){const win=getWindow(element2);if(isTopLayer(element2))return win; if(!isHTMLElement(element2)){let svgOffsetParent=getParentNode(element2);for(;svgOffsetParent&&!isLastTraversableNode(svgOffsetParent);){if(isElement(svgOffsetParent)&&!isStaticPositioned(svgOffsetParent))return svgOffsetParent;svgOffsetParent=getParentNode(svgOffsetParent)}return win}let offsetParent=getTrueOffsetParent(element2,polyfill);for(;offsetParent&&isTableElement(offsetParent)&&isStaticPositioned(offsetParent);)offsetParent=getTrueOffsetParent(offsetParent,polyfill);return offsetParent&& isLastTraversableNode(offsetParent)&&isStaticPositioned(offsetParent)&&!isContainingBlock(offsetParent)?win:offsetParent||getContainingBlock(element2)||win}const getElementRects=async function(data){const getOffsetParentFn=this.getOffsetParent||getOffsetParent,getDimensionsFn=this.getDimensions,floatingDimensions=await getDimensionsFn(data.floating);return{reference:getRectRelativeToOffsetParent(data.reference,await getOffsetParentFn(data.floating),data.strategy),floating:{x:0,y:0,width:floatingDimensions. width,height:floatingDimensions.height}}};function isRTL(element2){return getComputedStyle$1(element2).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(a,b){return a.x===b.x&&a.y===b.y&&a.width===b.width&&a.height===b.height}function observeMove(element2,onMove){let io=null,timeoutId;const root2=getDocumentElement( element2);function cleanup(){var _io;clearTimeout(timeoutId),(_io=io)==null||_io.disconnect(),io=null}function refresh(skip,threshold){skip===void 0&&(skip=!1),threshold===void 0&&(threshold=1),cleanup();const elementRectForRootMargin=element2.getBoundingClientRect(),{left,top,width,height}=elementRectForRootMargin;if(skip||onMove(),!width||!height)return;const insetTop=floor(top),insetRight=floor(root2.clientWidth-(left+width)),insetBottom=floor(root2.clientHeight-(top+height)),insetLeft=floor( left),options={rootMargin:-insetTop+"px "+-insetRight+"px "+-insetBottom+"px "+-insetLeft+"px",threshold:max(0,min(1,threshold))||1};let isFirstUpdate=!0;function handleObserve(entries){const ratio=entries[0].intersectionRatio;if(ratio!==threshold){if(!isFirstUpdate)return refresh();ratio?refresh(!1,ratio):timeoutId=setTimeout(()=>{refresh(!1,1e-7)},1e3)}ratio===1&&!rectsAreEqual(elementRectForRootMargin,element2.getBoundingClientRect())&&refresh(),isFirstUpdate=!1}try{io=new IntersectionObserver( handleObserve,{...options,root:root2.ownerDocument})}catch{io=new IntersectionObserver(handleObserve,options)}io.observe(element2)}return refresh(!0),cleanup}function autoUpdate(reference,floating,update2,options){options===void 0&&(options={});const{ancestorScroll=!0,ancestorResize=!0,elementResize=typeof ResizeObserver=="function",layoutShift=typeof IntersectionObserver=="function",animationFrame=!1}=options,referenceEl=unwrapElement(reference),ancestors=ancestorScroll||ancestorResize?[...referenceEl? getOverflowAncestors(referenceEl):[],...getOverflowAncestors(floating)]:[];ancestors.forEach(ancestor=>{ancestorScroll&&ancestor.addEventListener("scroll",update2,{passive:!0}),ancestorResize&&ancestor.addEventListener("resize",update2)});const cleanupIo=referenceEl&&layoutShift?observeMove(referenceEl,update2):null;let reobserveFrame=-1,resizeObserver=null;elementResize&&(resizeObserver=new ResizeObserver(_ref=>{let[firstEntry]=_ref;firstEntry&&firstEntry.target===referenceEl&&resizeObserver&&(resizeObserver. unobserve(floating),cancelAnimationFrame(reobserveFrame),reobserveFrame=requestAnimationFrame(()=>{var _resizeObserver;(_resizeObserver=resizeObserver)==null||_resizeObserver.observe(floating)})),update2()}),referenceEl&&!animationFrame&&resizeObserver.observe(referenceEl),resizeObserver.observe(floating));let frameId,prevRefRect=animationFrame?getBoundingClientRect(reference):null;animationFrame&&frameLoop();function frameLoop(){const nextRefRect=getBoundingClientRect(reference);prevRefRect&&!rectsAreEqual( prevRefRect,nextRefRect)&&update2(),prevRefRect=nextRefRect,frameId=requestAnimationFrame(frameLoop)}return update2(),()=>{var _resizeObserver2;ancestors.forEach(ancestor=>{ancestorScroll&&ancestor.removeEventListener("scroll",update2),ancestorResize&&ancestor.removeEventListener("resize",update2)}),cleanupIo?.(),(_resizeObserver2=resizeObserver)==null||_resizeObserver2.disconnect(),resizeObserver=null,animationFrame&&cancelAnimationFrame(frameId)}}const offset=offset$1,shift=shift$1,flip=flip$1, size=size$1,hide=hide$1,arrow=arrow$1,limitShift=limitShift$1,computePosition=(reference,floating,options)=>{const cache2=new Map,mergedOptions={platform,...options},platformWithCache={...mergedOptions.platform,_c:cache2};return computePosition$1(reference,floating,{...mergedOptions,platform:platformWithCache})};function get(valueOrGetValue){return typeof valueOrGetValue=="function"?valueOrGetValue():valueOrGetValue}function getDPR(element2){return typeof window>"u"?1:(element2.ownerDocument.defaultView|| window).devicePixelRatio||1}function roundByDPR(element2,value){const dpr=getDPR(element2);return Math.round(value*dpr)/dpr}function getFloatingContentCSSVars(name){return{[`--bits-${name}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${name}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${name}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${name}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${name}\ -anchor-height`]:"var(--bits-floating-anchor-height)"}}function useFloating(options){const whileElementsMountedOption=options.whileElementsMounted,openOption=user_derived(()=>get(options.open)??!0),middlewareOption=user_derived(()=>get(options.middleware)),transformOption=user_derived(()=>get(options.transform)??!0),placementOption=user_derived(()=>get(options.placement)??"bottom"),strategyOption=user_derived(()=>get(options.strategy)??"absolute"),sideOffsetOption=user_derived(()=>get(options.sideOffset)?? 0),alignOffsetOption=user_derived(()=>get(options.alignOffset)??0),reference=options.reference;let x=state$1(0),y=state$1(0);const floating=simpleBox(null);let strategy=state$1(proxy(get$4(strategyOption))),placement=state$1(proxy(get$4(placementOption))),middlewareData=state$1(proxy({})),isPositioned=state$1(!1);const floatingStyles=user_derived(()=>{const xVal=floating.current?roundByDPR(floating.current,get$4(x)):get$4(x),yVal=floating.current?roundByDPR(floating.current,get$4(y)):get$4(y);return get$4( transformOption)?{position:get$4(strategy),left:"0",top:"0",transform:`translate(${xVal}px, ${yVal}px)`,...floating.current&&getDPR(floating.current)>=1.5&&{willChange:"transform"}}:{position:get$4(strategy),left:`${xVal}px`,top:`${yVal}px`}});let whileElementsMountedCleanup;function update2(){reference.current===null||floating.current===null||computePosition(reference.current,floating.current,{middleware:get$4(middlewareOption),placement:get$4(placementOption),strategy:get$4(strategyOption)}).then( position2=>{if(!get$4(openOption)&&get$4(x)!==0&&get$4(y)!==0){const maxExpectedOffset=Math.max(Math.abs(get$4(sideOffsetOption)),Math.abs(get$4(alignOffsetOption)),15);if(position2.x<=maxExpectedOffset&&position2.y<=maxExpectedOffset)return}set$1(x,position2.x,!0),set$1(y,position2.y,!0),set$1(strategy,position2.strategy,!0),set$1(placement,position2.placement,!0),set$1(middlewareData,position2.middlewareData,!0),set$1(isPositioned,!0)})}function cleanup(){typeof whileElementsMountedCleanup=="f\ unction"&&(whileElementsMountedCleanup(),whileElementsMountedCleanup=void 0)}function attach2(){if(cleanup(),whileElementsMountedOption===void 0){update2();return}reference.current===null||floating.current===null||(whileElementsMountedCleanup=whileElementsMountedOption(reference.current,floating.current,update2))}function reset2(){get$4(openOption)||set$1(isPositioned,!1)}return user_effect(update2),user_effect(attach2),user_effect(reset2),user_effect(()=>cleanup),{floating,reference,get strategy(){ return get$4(strategy)},get placement(){return get$4(placement)},get middlewareData(){return get$4(middlewareData)},get isPositioned(){return get$4(isPositioned)},get floatingStyles(){return get$4(floatingStyles)},get update(){return update2}}}const OPPOSITE_SIDE={top:"bottom",right:"left",bottom:"top",left:"right"},FloatingRootContext=new Context$1("Floating.Root"),FloatingContentContext=new Context$1("Floating.Content"),FloatingTooltipRootContext=new Context$1("Floating.Root");class FloatingRootState{static create(tooltip=!1){ return tooltip?FloatingTooltipRootContext.set(new FloatingRootState):FloatingRootContext.set(new FloatingRootState)}anchorNode=simpleBox(null);customAnchorNode=simpleBox(null);triggerNode=simpleBox(null);constructor(){user_effect(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class FloatingContentState{static create(opts,tooltip=!1){ return tooltip?FloatingContentContext.set(new FloatingContentState(opts,FloatingTooltipRootContext.get())):FloatingContentContext.set(new FloatingContentState(opts,FloatingRootContext.get()))}opts;root;contentRef=simpleBox(null);wrapperRef=simpleBox(null);arrowRef=simpleBox(null);contentAttachment=attachRef(this.contentRef);wrapperAttachment=attachRef(this.wrapperRef);arrowAttachment=attachRef(this.arrowRef);arrowId=simpleBox(useId());#transformedStyle=user_derived(()=>{if(typeof this.opts.style== "string")return cssToStyleObj(this.opts.style);if(!this.opts.style)return{}});#updatePositionStrategy=void 0;#arrowSize=new ElementSize(()=>this.arrowRef.current??void 0);#arrowWidth=user_derived(()=>this.#arrowSize?.width??0);#arrowHeight=user_derived(()=>this.#arrowSize?.height??0);#desiredPlacement=user_derived(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#boundary=user_derived(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts. collisionBoundary.current:[this.opts.collisionBoundary.current]);#hasExplicitBoundaries=user_derived(()=>get$4(this.#boundary).length>0);get hasExplicitBoundaries(){return get$4(this.#hasExplicitBoundaries)}set hasExplicitBoundaries(value){set$1(this.#hasExplicitBoundaries,value)}#detectOverflowOptions=user_derived(()=>({padding:this.opts.collisionPadding.current,boundary:get$4(this.#boundary).filter(isNotNull),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return get$4(this.#detectOverflowOptions)}set detectOverflowOptions(value){ set$1(this.#detectOverflowOptions,value)}#availableWidth=state$1(void 0);#availableHeight=state$1(void 0);#anchorWidth=state$1(void 0);#anchorHeight=state$1(void 0);#middleware=user_derived(()=>[offset({mainAxis:this.opts.sideOffset.current+get$4(this.#arrowHeight),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&shift({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?limitShift():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions. current&&flip({...this.detectOverflowOptions}),size({...this.detectOverflowOptions,apply:({rects,availableWidth,availableHeight})=>{const{width:anchorWidth,height:anchorHeight}=rects.reference;set$1(this.#availableWidth,availableWidth,!0),set$1(this.#availableHeight,availableHeight,!0),set$1(this.#anchorWidth,anchorWidth,!0),set$1(this.#anchorHeight,anchorHeight,!0)}}),this.arrowRef.current&&arrow({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),transformOrigin({arrowWidth:get$4( this.#arrowWidth),arrowHeight:get$4(this.#arrowHeight)}),this.opts.hideWhenDetached.current&&hide({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return get$4(this.#middleware)}set middleware(value){set$1(this.#middleware,value)}floating;#placedSide=user_derived(()=>getSideFromPlacement(this.floating.placement));get placedSide(){return get$4(this.#placedSide)}set placedSide(value){set$1(this.#placedSide,value)}#placedAlign=user_derived(()=>getAlignFromPlacement( this.floating.placement));get placedAlign(){return get$4(this.#placedAlign)}set placedAlign(value){set$1(this.#placedAlign,value)}#arrowX=user_derived(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return get$4(this.#arrowX)}set arrowX(value){set$1(this.#arrowX,value)}#arrowY=user_derived(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return get$4(this.#arrowY)}set arrowY(value){set$1(this.#arrowY,value)}#cannotCenterArrow=user_derived(()=>this.floating.middlewareData.arrow?. centerOffset!==0);get cannotCenterArrow(){return get$4(this.#cannotCenterArrow)}set cannotCenterArrow(value){set$1(this.#cannotCenterArrow,value)}#contentZIndex=state$1();get contentZIndex(){return get$4(this.#contentZIndex)}set contentZIndex(value){set$1(this.#contentZIndex,value,!0)}#arrowBaseSide=user_derived(()=>OPPOSITE_SIDE[this.placedSide]);get arrowBaseSide(){return get$4(this.#arrowBaseSide)}set arrowBaseSide(value){set$1(this.#arrowBaseSide,value)}#wrapperProps=user_derived(()=>({id:this. opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${get$4(this.#availableWidth)}px`,"--bits-floating-available-height":`${get$4( this.#availableHeight)}px`,"--bits-floating-anchor-width":`${get$4(this.#anchorWidth)}px`,"--bits-floating-anchor-height":`${get$4(this.#anchorHeight)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...get$4(this.#transformedStyle)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return get$4(this.#wrapperProps)}set wrapperProps(value){set$1(this.#wrapperProps,value)}#props=user_derived(()=>({"data-side":this.placedSide, "data-align":this.placedAlign,style:styleToString$1({...get$4(this.#transformedStyle)}),...this.contentAttachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}#arrowStyle=user_derived(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%\ ) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return get$4(this.#arrowStyle)}set arrowStyle(value){set$1(this.#arrowStyle,value)}constructor(opts,root2){this.opts=opts,this.root=root2,opts.customAnchor&&(this.root.customAnchorNode.current=opts.customAnchor.current),watch$1(()=>opts.customAnchor.current,customAnchor=>{this.root.customAnchorNode. current=customAnchor}),this.floating=useFloating({strategy:()=>this.opts.strategy.current,placement:()=>get$4(this.#desiredPlacement),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...args)=>autoUpdate(...args,{animationFrame:this.#updatePositionStrategy?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),user_effect(()=>{this.floating.isPositioned&&this.opts.onPlaced?. current()}),watch$1(()=>this.contentRef.current,contentNode=>{if(!contentNode)return;const win=getWindow$1(contentNode);this.contentZIndex=win.getComputedStyle(contentNode).zIndex}),user_effect(()=>{this.floating.floating.current=this.wrapperRef.current})}}class FloatingArrowState{static create(opts){return new FloatingArrowState(opts,FloatingContentContext.get())}opts;content;constructor(opts,content2){this.opts=opts,this.content=content2}#props=user_derived(()=>({id:this.opts.id.current,style:this. content.arrowStyle,"data-side":this.content.placedSide,...this.content.arrowAttachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class FloatingAnchorState{static create(opts,tooltip=!1){return tooltip?new FloatingAnchorState(opts,FloatingTooltipRootContext.get()):new FloatingAnchorState(opts,FloatingRootContext.get())}opts;root;constructor(opts,root2){this.opts=opts,this.root=root2,opts.virtualEl&&opts.virtualEl.current?root2.triggerNode=boxFrom$1(opts.virtualEl. current):root2.triggerNode=opts.ref}}function transformOrigin(options){return{name:"transformOrigin",options,fn(data){const{placement,rects,middlewareData}=data,isArrowHidden=middlewareData.arrow?.centerOffset!==0,arrowWidth=isArrowHidden?0:options.arrowWidth,arrowHeight=isArrowHidden?0:options.arrowHeight,[placedSide,placedAlign]=getSideAndAlignFromPlacement(placement),noArrowAlign={start:"0%",center:"50%",end:"100%"}[placedAlign],arrowXCenter=(middlewareData.arrow?.x??0)+arrowWidth/2,arrowYCenter=(middlewareData. arrow?.y??0)+arrowHeight/2;let x="",y="";return placedSide==="bottom"?(x=isArrowHidden?noArrowAlign:`${arrowXCenter}px`,y=`${-arrowHeight}px`):placedSide==="top"?(x=isArrowHidden?noArrowAlign:`${arrowXCenter}px`,y=`${rects.floating.height+arrowHeight}px`):placedSide==="right"?(x=`${-arrowHeight}px`,y=isArrowHidden?noArrowAlign:`${arrowYCenter}px`):placedSide==="left"&&(x=`${rects.floating.width+arrowHeight}px`,y=isArrowHidden?noArrowAlign:`${arrowYCenter}px`),{data:{x,y}}}}}function getSideAndAlignFromPlacement(placement){ const[side,align="center"]=placement.split("-");return[side,align]}function getSideFromPlacement(placement){return getSideAndAlignFromPlacement(placement)[0]}function getAlignFromPlacement(placement){return getSideAndAlignFromPlacement(placement)[1]}function Floating_layer($$anchor,$$props){push$1($$props,!0);let tooltip=prop($$props,"tooltip",3,!1);FloatingRootState.create(tooltip());var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor, fragment),pop()}class DataTypeahead{#opts;#candidateValues=user_derived(()=>this.#opts.candidateValues());#search;constructor(opts){this.#opts=opts,this.#search=boxAutoReset("",{afterMs:1e3,getWindow:this.#opts.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(key2){if(!this.#opts.enabled()||!get$4(this.#candidateValues).length)return;this.#search.current=this.#search.current+key2;const currentItem=this.#opts. getCurrentItem(),currentMatch=get$4(this.#candidateValues).find(item=>item===currentItem)??"",values=get$4(this.#candidateValues).map(item=>item??""),nextMatch=getNextMatch(values,this.#search.current,currentMatch),newItem=get$4(this.#candidateValues).find(item=>item===nextMatch);return newItem&&this.#opts.onMatch(newItem),newItem}resetTypeahead(){this.#search.current=""}}const FIRST_KEYS=[ARROW_DOWN,PAGE_UP,HOME],LAST_KEYS=[ARROW_UP,PAGE_DOWN,END],FIRST_LAST_KEYS=[...FIRST_KEYS,...LAST_KEYS],selectAttrs=createBitsAttrs( {component:"select",parts:["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"]}),SelectRootContext=new Context$1("Select.Root | Combobox.Root"),SelectContentContext=new Context$1("Select.Content | Combobox.Content");class SelectBaseRootState{opts;#touchedInput=state$1(!1);get touchedInput(){return get$4(this.#touchedInput)}set touchedInput(value){set$1(this.#touchedInput,value,!0)}#inputNode=state$1( null);get inputNode(){return get$4(this.#inputNode)}set inputNode(value){set$1(this.#inputNode,value,!0)}#contentNode=state$1(null);get contentNode(){return get$4(this.#contentNode)}set contentNode(value){set$1(this.#contentNode,value,!0)}contentPresence;#viewportNode=state$1(null);get viewportNode(){return get$4(this.#viewportNode)}set viewportNode(value){set$1(this.#viewportNode,value,!0)}#triggerNode=state$1(null);get triggerNode(){return get$4(this.#triggerNode)}set triggerNode(value){set$1( this.#triggerNode,value,!0)}#valueId=state$1("");get valueId(){return get$4(this.#valueId)}set valueId(value){set$1(this.#valueId,value,!0)}#highlightedNode=state$1(null);get highlightedNode(){return get$4(this.#highlightedNode)}set highlightedNode(value){set$1(this.#highlightedNode,value,!0)}#highlightedValue=user_derived(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null);get highlightedValue(){return get$4(this.#highlightedValue)}set highlightedValue(value){set$1(this.#highlightedValue, value)}#highlightedId=user_derived(()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return get$4(this.#highlightedId)}set highlightedId(value){set$1(this.#highlightedId,value)}#highlightedLabel=user_derived(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null);get highlightedLabel(){return get$4(this.#highlightedLabel)}set highlightedLabel(value){set$1(this.#highlightedLabel,value)}isUsingKeyboard=!1;isCombobox=!1;domContext=new DOMContext( ()=>null);constructor(opts){this.opts=opts,this.isCombobox=opts.isCombobox,this.contentPresence=new PresenceManager({ref:boxWith$1(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),user_pre_effect(()=>{this.opts.open.current||this.setHighlightedNode(null)})}setHighlightedNode(node2,initial=!1){this.highlightedNode=node2,node2&&(this.isUsingKeyboard||initial)&&node2.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){ const node2=this.contentNode;return node2?Array.from(node2.querySelectorAll(`[${this.getBitsAttr("item")}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(initial=!1){this.setHighlightedNode(null);let nodes2=this.getCandidateNodes();if(nodes2.length){if(this.viewportNode){const viewportRect=this.viewportNode.getBoundingClientRect();nodes2=nodes2.filter(node2=>{if(!this.viewportNode)return!1;const nodeRect=node2.getBoundingClientRect();return nodeRect.rightviewportRect.left&&nodeRect.bottomviewportRect.top})}this.setHighlightedNode(nodes2[0],initial)}}getNodeByValue(value){return this.getCandidateNodes().find(node2=>node2.dataset.value===value)??null}setOpen(open2){this.opts.open.current=open2}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}getBitsAttr=part=>selectAttrs.getAttr( part,this.isCombobox?"combobox":void 0)}class SelectSingleRootState extends SelectBaseRootState{opts;isMulti=!1;#hasValue=user_derived(()=>this.opts.value.current!=="");get hasValue(){return get$4(this.#hasValue)}set hasValue(value){set$1(this.#hasValue,value)}#currentLabel=user_derived(()=>this.opts.items.current.length?this.opts.items.current.find(item=>item.value===this.opts.value.current)?.label??"":"");get currentLabel(){return get$4(this.#currentLabel)}set currentLabel(value){set$1(this.#currentLabel, value)}#candidateLabels=user_derived(()=>this.opts.items.current.length?this.opts.items.current.filter(item=>!item.disabled).map(item=>item.label):[]);get candidateLabels(){return get$4(this.#candidateLabels)}set candidateLabels(value){set$1(this.#candidateLabels,value)}#dataTypeaheadEnabled=user_derived(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return get$4(this.#dataTypeaheadEnabled)}set dataTypeaheadEnabled(value){set$1(this.#dataTypeaheadEnabled,value)}constructor(opts){ super(opts),this.opts=opts,user_effect(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),watch$1(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(itemValue){return this.opts.value.current===itemValue}toggleItem(itemValue,itemLabel=itemValue){const newValue=this.includesItem(itemValue)?"":itemValue;this.opts.value.current=newValue,newValue!==""&&(this.opts.inputValue.current=itemLabel)}setInitialHighlightedNode(){ afterTick(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==""){const node2=this.getNodeByValue(this.opts.value.current);if(node2){this.setHighlightedNode(node2,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class SelectMultipleRootState extends SelectBaseRootState{opts;isMulti=!0;#hasValue=user_derived(()=>this.opts.value.current.length>0);get hasValue(){return get$4(this.#hasValue)}set hasValue(value){set$1(this.#hasValue, value)}constructor(opts){super(opts),this.opts=opts,user_effect(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),watch$1(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(itemValue){return this.opts.value.current.includes(itemValue)}toggleItem(itemValue,itemLabel=itemValue){this.includesItem(itemValue)?this.opts.value.current=this.opts.value.current.filter(v=>v!==itemValue):this.opts.value.current=[...this.opts. value.current,itemValue],this.opts.inputValue.current=itemLabel}setInitialHighlightedNode(){afterTick(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const node2=this.getNodeByValue(this.opts.value.current[0]);if(node2){this.setHighlightedNode(node2,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class SelectRootState{static create(props){const{type:type2,...rest}=props, rootState=type2==="single"?new SelectSingleRootState(rest):new SelectMultipleRootState(rest);return SelectRootContext.set(rootState)}}class SelectTriggerState{static create(opts){return new SelectTriggerState(opts,SelectRootContext.get())}opts;root;attachment;#domTypeahead;#dataTypeahead;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(opts.ref,v=>this.root.triggerNode=v),this.root.domContext=new DOMContext(opts.ref),this.#domTypeahead=new DOMTypeahead({getCurrentItem:()=>this. root.highlightedNode,onMatch:node2=>{this.root.setHighlightedNode(node2)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()}),this.#dataTypeahead=new DataTypeahead({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:label=>{if(this.root.isMulti||!this.root.opts.items.current)return;const matchedItem=this.root.opts.items.current.find(item=>item.label===label);matchedItem&&(this.root.opts.value.current=matchedItem.value)}, enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()}),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}#handleOpen(){this.root.opts.open.current=!0,this.#dataTypeahead.resetTypeahead(),this.#domTypeahead.resetTypeahead()}#handlePointerOpen(_){this.#handleOpen()}#handleKeyboardSelection(){ const isCurrentSelectedValue=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&isCurrentSelectedValue&&!this.root.isMulti?(this.root.handleClose(),!0):(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!isCurrentSelectedValue?(this.root.handleClose(),!0):!1)}onkeydown(e){if(this.root.isUsingKeyboard=!0,(e.key===ARROW_UP||e.key===ARROW_DOWN)&&e.preventDefault(), !this.root.opts.open.current){if(e.key===ENTER||e.key===SPACE||e.key===ARROW_DOWN||e.key===ARROW_UP)e.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){this.#dataTypeahead.handleTypeaheadSearch(e.key);return}if(this.root.hasValue)return;const candidateNodes2=this.root.getCandidateNodes();if(!candidateNodes2.length)return;if(e.key===ARROW_DOWN){const firstCandidate=candidateNodes2[0];this.root.setHighlightedNode(firstCandidate)}else if(e.key===ARROW_UP){ const lastCandidate=candidateNodes2[candidateNodes2.length-1];this.root.setHighlightedNode(lastCandidate)}return}if(e.key===TAB){this.root.handleClose();return}if((e.key===ENTER||e.key===SPACE&&this.#domTypeahead.search==="")&&!e.isComposing&&(e.preventDefault(),this.#handleKeyboardSelection()))return;if(e.key===ARROW_UP&&e.altKey&&this.root.handleClose(),FIRST_LAST_KEYS.includes(e.key)){e.preventDefault();const candidateNodes2=this.root.getCandidateNodes(),currHighlightedNode=this.root.highlightedNode, currIndex=currHighlightedNode?candidateNodes2.indexOf(currHighlightedNode):-1,loop2=this.root.opts.loop.current;let nextItem;if(e.key===ARROW_DOWN?nextItem=next(candidateNodes2,currIndex,loop2):e.key===ARROW_UP?nextItem=prev(candidateNodes2,currIndex,loop2):e.key===PAGE_DOWN?nextItem=forward(candidateNodes2,currIndex,10,loop2):e.key===PAGE_UP?nextItem=backward(candidateNodes2,currIndex,10,loop2):e.key===HOME?nextItem=candidateNodes2[0]:e.key===END&&(nextItem=candidateNodes2[candidateNodes2.length- 1]),!nextItem)return;this.root.setHighlightedNode(nextItem);return}const isModifierKey=e.ctrlKey||e.altKey||e.metaKey,isCharacterKey=e.key.length===1,isSpaceKey=e.key===SPACE,candidateNodes=this.root.getCandidateNodes();if(e.key!==TAB){if(!isModifierKey&&(isCharacterKey||isSpaceKey)){!this.#domTypeahead.handleTypeaheadSearch(e.key,candidateNodes)&&isSpaceKey&&(e.preventDefault(),this.#handleKeyboardSelection());return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(e){ e.currentTarget.focus()}onpointerdown(e){if(this.root.opts.disabled.current)return;if(e.pointerType==="touch")return e.preventDefault();const target2=e.target;target2?.hasPointerCapture(e.pointerId)&&target2?.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&(this.root.opts.open.current===!1?this.#handlePointerOpen(e):this.root.handleClose())}onpointerup(e){this.root.opts.disabled.current||(e.preventDefault(),e.pointerType==="touch"&&(this.root.opts.open.current===!1?this.#handlePointerOpen( e):this.root.handleClose()))}#props=user_derived(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":boolToStr(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":getDataOpenClosed(this.root.opts.open.current),"data-disabled":boolToEmptyStrOrUndef(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.getBitsAttr("trigger")]:"",onpointerdown:this.onpointerdown, onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class SelectContentState{static create(opts){return SelectContentContext.set(new SelectContentState(opts,SelectRootContext.get()))}opts;root;attachment;#isPositioned=state$1(!1);get isPositioned(){return get$4(this.#isPositioned)}set isPositioned(value){set$1(this.#isPositioned,value,!0)}domContext;constructor(opts,root2){ this.opts=opts,this.root=root2,this.attachment=attachRef(opts.ref,v=>this.root.contentNode=v),this.domContext=new DOMContext(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),onDestroyEffect(()=>{this.root.contentNode=null,this.isPositioned=!1}),watch$1(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.isPositioned=!1)}),this.onpointermove=this.onpointermove.bind(this)}onpointermove(_){this.root.isUsingKeyboard=!1}#styles=user_derived(()=>getFloatingContentCSSVars( this.root.isCombobox?"combobox":"select"));onInteractOutside=e=>{if(e.target===this.root.triggerNode||e.target===this.root.inputNode){e.preventDefault();return}this.opts.onInteractOutside.current(e),!e.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=e=>{e.preventDefault()};onCloseAutoFocus=e=>{e.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#snippetProps=user_derived( ()=>({open:this.root.opts.open.current}));get snippetProps(){return get$4(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":getDataOpenClosed(this.root.opts.open.current),[this.root.getBitsAttr("content")]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...get$4(this.#styles)},onpointermove:this. onpointermove,...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.isPositioned=!0)}}}class SelectItemState{static create(opts){return new SelectItemState(opts,SelectRootContext.get())}opts;root;attachment;#isSelected=user_derived( ()=>this.root.includesItem(this.opts.value.current));get isSelected(){return get$4(this.#isSelected)}set isSelected(value){set$1(this.#isSelected,value)}#isHighlighted=user_derived(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return get$4(this.#isHighlighted)}set isHighlighted(value){set$1(this.#isHighlighted,value)}prevHighlighted=new Previous(()=>this.isHighlighted);#mounted=state$1(!1);get mounted(){return get$4(this.#mounted)}set mounted(value){set$1(this.#mounted, value,!0)}constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(opts.ref),watch$1([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),watch$1(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove. bind(this)}handleSelect(){if(this.opts.disabled.current)return;const isCurrentSelectedValue=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&isCurrentSelectedValue&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!isCurrentSelectedValue&&this.root.handleClose()}#snippetProps=user_derived(()=>({selected:this.isSelected,highlighted:this.isHighlighted}));get snippetProps(){ return get$4(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}onpointerdown(e){e.preventDefault()}onpointerup(e){if(!(e.defaultPrevented||!this.opts.ref.current)){if(e.pointerType==="touch"&&!isIOS){on(this.opts.ref.current,"click",()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}e.preventDefault(),this.handleSelect(),e.pointerType==="touch"&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(e){e.pointerType!== "touch"&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}#props=user_derived(()=>({id:this.opts.id.current,role:"option","aria-selected":this.root.includesItem(this.opts.value.current)?"true":void 0,"data-value":this.opts.value.current,"data-disabled":boolToEmptyStrOrUndef(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?"":void 0,"data-selected":this.root.includesItem( this.opts.value.current)?"":void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class SelectHiddenInputState{static create(opts){return new SelectHiddenInputState(opts,SelectRootContext.get())}opts;root;#shouldRender=user_derived(()=>this.root.opts.name.current!=="");get shouldRender(){ return get$4(this.#shouldRender)}set shouldRender(value){set$1(this.#shouldRender,value)}constructor(opts,root2){this.opts=opts,this.root=root2,this.onfocus=this.onfocus.bind(this)}onfocus(e){e.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}#props=user_derived(()=>({disabled:boolToTrueOrUndef(this.root.opts.disabled.current),required:boolToTrueOrUndef(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current, onfocus:this.onfocus}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class SelectViewportState{static create(opts){return new SelectViewportState(opts,SelectContentContext.get())}opts;content;root;attachment;#prevScrollTop=state$1(0);get prevScrollTop(){return get$4(this.#prevScrollTop)}set prevScrollTop(value){set$1(this.#prevScrollTop,value,!0)}constructor(opts,content2){this.opts=opts,this.content=content2,this.root=content2.root,this.attachment=attachRef(opts. ref,v=>{this.root.viewportNode=v})}#props=user_derived(()=>({id:this.opts.id.current,role:"presentation",[this.root.getBitsAttr("viewport")]:"",style:{position:"relative",flex:1,overflow:"auto"},...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class SelectScrollButtonImplState{opts;content;root;attachment;autoScrollTimer=null;userScrollTimer=-1;isUserScrolling=!1;onAutoScroll=noop$1;#mounted=state$1(!1);get mounted(){return get$4(this.#mounted)}set mounted(value){ set$1(this.#mounted,value,!0)}constructor(opts,content2){this.opts=opts,this.content=content2,this.root=content2.root,this.attachment=attachRef(opts.ref),watch$1([()=>this.mounted],()=>{if(!this.mounted){this.isUserScrolling=!1;return}this.isUserScrolling}),user_effect(()=>{this.mounted||this.clearAutoScrollInterval()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}handleUserScroll(){this.content. domContext.clearTimeout(this.userScrollTimer),this.isUserScrolling=!0,this.userScrollTimer=this.content.domContext.setTimeout(()=>{this.isUserScrolling=!1},200)}clearAutoScrollInterval(){this.autoScrollTimer!==null&&(this.content.domContext.clearTimeout(this.autoScrollTimer),this.autoScrollTimer=null)}onpointerdown(_){if(this.autoScrollTimer!==null)return;const autoScroll=tick2=>{this.onAutoScroll(),this.autoScrollTimer=this.content.domContext.setTimeout(()=>autoScroll(tick2+1),this.opts.delay.current( tick2))};this.autoScrollTimer=this.content.domContext.setTimeout(()=>autoScroll(1),this.opts.delay.current(0))}onpointermove(e){this.onpointerdown(e)}onpointerleave(_){this.clearAutoScrollInterval()}#props=user_derived(()=>({id:this.opts.id.current,"aria-hidden":boolToStrTrueOrUndef(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props, value)}}class SelectScrollDownButtonState{static create(opts){return new SelectScrollDownButtonState(new SelectScrollButtonImplState(opts,SelectContentContext.get()))}scrollButtonState;content;root;#canScrollDown=state$1(!1);get canScrollDown(){return get$4(this.#canScrollDown)}set canScrollDown(value){set$1(this.#canScrollDown,value,!0)}scrollIntoViewTimer=null;constructor(scrollButtonState){this.scrollButtonState=scrollButtonState,this.content=scrollButtonState.content,this.root=scrollButtonState. root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,watch$1([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),on(this.root.viewportNode,"scroll",()=>this.handleScroll())}),watch$1([()=>this.root.opts.inputValue.current,()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{!this.root.viewportNode||!this.content.isPositioned||this.handleScroll(!0)}),watch$1(()=>this.scrollButtonState. mounted,()=>{this.scrollButtonState.mounted&&(this.scrollIntoViewTimer&&clearTimeout(this.scrollIntoViewTimer),this.scrollIntoViewTimer=afterSleep(5,()=>{this.root.highlightedNode?.scrollIntoView({block:this.root.opts.scrollAlignment.current})}))})}handleScroll=(manual=!1)=>{if(manual||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;const maxScroll=this.root.viewportNode.scrollHeight-this.root.viewportNode.clientHeight,paddingTop=Number.parseInt(getComputedStyle(this.root. viewportNode).paddingTop,10);this.canScrollDown=Math.ceil(this.root.viewportNode.scrollTop){const viewport=this.root.viewportNode,selectedItem=this.root.highlightedNode;!viewport||!selectedItem||(viewport.scrollTop=viewport.scrollTop+selectedItem.offsetHeight)};#props=user_derived(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr("scroll-down-button")]:""}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class SelectScrollUpButtonState{static create(opts){ return new SelectScrollUpButtonState(new SelectScrollButtonImplState(opts,SelectContentContext.get()))}scrollButtonState;content;root;#canScrollUp=state$1(!1);get canScrollUp(){return get$4(this.#canScrollUp)}set canScrollUp(value){set$1(this.#canScrollUp,value,!0)}constructor(scrollButtonState){this.scrollButtonState=scrollButtonState,this.content=scrollButtonState.content,this.root=scrollButtonState.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,watch$1([()=>this.root.viewportNode, ()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),on(this.root.viewportNode,"scroll",()=>this.handleScroll())})}handleScroll=(manual=!1)=>{if(manual||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;const paddingTop=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollUp=this.root.viewportNode.scrollTop-paddingTop>.1};handleAutoScroll=()=>{!this.root.viewportNode||!this. root.highlightedNode||(this.root.viewportNode.scrollTop=this.root.viewportNode.scrollTop-this.root.highlightedNode.offsetHeight)};#props=user_derived(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr("scroll-up-button")]:""}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}function Select_hidden_input($$anchor,$$props){push$1($$props,!0);let value=prop($$props,"value",15);const hiddenInputState=SelectHiddenInputState.create({value:boxWith$1(()=>value())}); var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{Hidden_input($$anchor2,spread_props(()=>hiddenInputState.props,{get autocomplete(){return $$props.autocomplete},get value(){return value()},set value($$value){value($$value)}}))};if_block(node2,$$render=>{hiddenInputState.shouldRender&&$$render(consequent)})}append($$anchor,fragment),pop()}function Floating_layer_anchor($$anchor,$$props){push$1($$props,!0);let tooltip=prop($$props,"tooltip",3,!1);FloatingAnchorState. create({id:boxWith$1(()=>$$props.id),virtualEl:boxWith$1(()=>$$props.virtualEl),ref:$$props.ref},tooltip());var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}var root_4$F=from_svg(''),root_2$1l=from_html("");function Arrow($$anchor,$$props){push$1($$props,!0);let id2=prop( $$props,"id",19,useId),width=prop($$props,"width",3,10),height=prop($$props,"height",3,5),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","children","child","width","height"]);const mergedProps=user_derived(()=>mergeProps(restProps,{id:id2()}));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$4(mergedProps)})),append($$anchor2,fragment_1)}, alternate_1=$$anchor2=>{var span=root_2$1l();attribute_effect(span,()=>({...get$4(mergedProps)}));var node_2=child(span);{var consequent_1=$$anchor3=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);snippet(node_3,()=>$$props.children??noop$3),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var svg2=root_4$F();template_effect(()=>{set_attribute(svg2,"width",width()),set_attribute(svg2,"height",height())}),append($$anchor3,svg2)};if_block(node_2,$$render=>{$$props.children?$$render( consequent_1):$$render(alternate,!1)})}reset(span),append($$anchor2,span)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate_1,!1)})}append($$anchor,fragment),pop()}function Floating_layer_arrow($$anchor,$$props){push$1($$props,!0);let id2=prop($$props,"id",19,useId),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref"]);const arrowState=FloatingArrowState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2( v))}),mergedProps=user_derived(()=>mergeProps(restProps,arrowState.props));Arrow($$anchor,spread_props(()=>get$4(mergedProps))),pop()}function Floating_layer_content($$anchor,$$props){push$1($$props,!0);let side=prop($$props,"side",3,"bottom"),sideOffset=prop($$props,"sideOffset",3,0),align=prop($$props,"align",3,"center"),alignOffset=prop($$props,"alignOffset",3,0),arrowPadding=prop($$props,"arrowPadding",3,0),avoidCollisions=prop($$props,"avoidCollisions",3,!0),collisionBoundary=prop($$props,"\ collisionBoundary",19,()=>[]),collisionPadding=prop($$props,"collisionPadding",3,0),hideWhenDetached=prop($$props,"hideWhenDetached",3,!1),onPlaced=prop($$props,"onPlaced",3,()=>{}),sticky=prop($$props,"sticky",3,"partial"),updatePositionStrategy=prop($$props,"updatePositionStrategy",3,"optimized"),strategy=prop($$props,"strategy",3,"fixed"),dir=prop($$props,"dir",3,"ltr"),style2=prop($$props,"style",19,()=>({})),wrapperId=prop($$props,"wrapperId",19,useId),customAnchor=prop($$props,"customAncho\ r",3,null),tooltip=prop($$props,"tooltip",3,!1);const contentState=FloatingContentState.create({side:boxWith$1(()=>side()),sideOffset:boxWith$1(()=>sideOffset()),align:boxWith$1(()=>align()),alignOffset:boxWith$1(()=>alignOffset()),id:boxWith$1(()=>$$props.id),arrowPadding:boxWith$1(()=>arrowPadding()),avoidCollisions:boxWith$1(()=>avoidCollisions()),collisionBoundary:boxWith$1(()=>collisionBoundary()),collisionPadding:boxWith$1(()=>collisionPadding()),hideWhenDetached:boxWith$1(()=>hideWhenDetached()), onPlaced:boxWith$1(()=>onPlaced()),sticky:boxWith$1(()=>sticky()),updatePositionStrategy:boxWith$1(()=>updatePositionStrategy()),strategy:boxWith$1(()=>strategy()),dir:boxWith$1(()=>dir()),style:boxWith$1(()=>style2()),enabled:boxWith$1(()=>$$props.enabled),wrapperId:boxWith$1(()=>wrapperId()),customAnchor:boxWith$1(()=>customAnchor())},tooltip()),mergedProps=user_derived(()=>mergeProps(contentState.wrapperProps,{style:{pointerEvents:"auto"}}));var fragment=comment$2(),node2=first_child(fragment); snippet(node2,()=>$$props.content??noop$3,()=>({props:contentState.props,wrapperProps:get$4(mergedProps)})),append($$anchor,fragment),pop()}function Floating_layer_content_static($$anchor,$$props){push$1($$props,!0),onMount$1(()=>{$$props.onPlaced?.()});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.content??noop$3,()=>({props:{},wrapperProps:{}})),append($$anchor,fragment),pop()}function Popper_content($$anchor,$$props){let isStatic=prop($$props,"isStatic",3,!1), restProps=rest_props($$props,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{Floating_layer_content_static($$anchor2,{get content(){return $$props.content},get onPlaced(){return $$props.onPlaced}})},alternate=$$anchor2=>{Floating_layer_content($$anchor2,spread_props({get content(){return $$props.content},get onPlaced(){return $$props.onPlaced}},()=>restProps))};if_block(node2,$$render=>{isStatic()? $$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment)}var root_1$15=from_html(" ",1);function Popper_layer_inner($$anchor,$$props){push$1($$props,!0);let interactOutsideBehavior=prop($$props,"interactOutsideBehavior",3,"close"),trapFocus=prop($$props,"trapFocus",3,!0),isValidEvent2=prop($$props,"isValidEvent",3,()=>!1),customAnchor=prop($$props,"customAnchor",3,null),isStatic=prop($$props,"isStatic",3,!1),tooltip=prop($$props,"tooltip",3,!1),contentPointerEvents=prop($$props, "contentPointerEvents",3,"auto"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus", "onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);Popper_content($$anchor,{get isStatic(){return isStatic()},get id(){return $$props.id},get side(){return $$props.side},get sideOffset(){return $$props.sideOffset},get align(){return $$props.align},get alignOffset(){return $$props.alignOffset},get arrowPadding(){return $$props.arrowPadding},get avoidCollisions(){return $$props.avoidCollisions},get collisionBoundary(){ return $$props.collisionBoundary},get collisionPadding(){return $$props.collisionPadding},get sticky(){return $$props.sticky},get hideWhenDetached(){return $$props.hideWhenDetached},get updatePositionStrategy(){return $$props.updatePositionStrategy},get strategy(){return $$props.strategy},get dir(){return $$props.dir},get wrapperId(){return $$props.wrapperId},get style(){return $$props.style},get onPlaced(){return $$props.onPlaced},get customAnchor(){return customAnchor()},get enabled(){return $$props. enabled},get tooltip(){return tooltip()},content:($$anchor2,$$arg0)=>{let floatingProps=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;var fragment_1=root_1$15(),node2=first_child(fragment_1);{var consequent=$$anchor3=>{Scroll_lock($$anchor3,{get preventScroll(){return $$props.preventScroll}})},alternate=$$anchor3=>{var fragment_3=comment$2(),node_1=first_child(fragment_3);{var consequent_1=$$anchor4=>{Scroll_lock($$anchor4,{get preventScroll(){return $$props.preventScroll}})};if_block( node_1,$$render=>{$$props.forceMount||$$render(consequent_1)},!0)}append($$anchor3,fragment_3)};if_block(node2,$$render=>{$$props.forceMount&&$$props.enabled?$$render(consequent):$$render(alternate,!1)})}var node_2=sibling(node2,2);Focus_scope(node_2,{get onOpenAutoFocus(){return $$props.onOpenAutoFocus},get onCloseAutoFocus(){return $$props.onCloseAutoFocus},get loop(){return $$props.loop},get enabled(){return $$props.enabled},get trapFocus(){return trapFocus()},get forceMount(){return $$props. forceMount},get ref(){return $$props.ref},focusScope:($$anchor3,$$arg02)=>{let focusScopeProps=()=>$$arg02?.().props;Escape_layer($$anchor3,{get onEscapeKeydown(){return $$props.onEscapeKeydown},get escapeKeydownBehavior(){return $$props.escapeKeydownBehavior},get enabled(){return $$props.enabled},get ref(){return $$props.ref},children:($$anchor4,$$slotProps)=>{Dismissible_layer($$anchor4,{get id(){return $$props.id},get onInteractOutside(){return $$props.onInteractOutside},get onFocusOutside(){ return $$props.onFocusOutside},get interactOutsideBehavior(){return interactOutsideBehavior()},get isValidEvent(){return isValidEvent2()},get enabled(){return $$props.enabled},get ref(){return $$props.ref},children:($$anchor5,$$arg03)=>{let dismissibleProps=()=>$$arg03?.().props;Text_selection_layer($$anchor5,{get id(){return $$props.id},get preventOverflowTextSelection(){return $$props.preventOverflowTextSelection},get onPointerDown(){return $$props.onPointerDown},get onPointerUp(){return $$props. onPointerUp},get enabled(){return $$props.enabled},get ref(){return $$props.ref},children:($$anchor6,$$slotProps2)=>{var fragment_8=comment$2(),node_3=first_child(fragment_8);{let $0=user_derived(()=>({props:mergeProps(restProps,floatingProps(),dismissibleProps(),focusScopeProps(),{style:{pointerEvents:contentPointerEvents()}}),wrapperProps:wrapperProps()}));snippet(node_3,()=>$$props.popper??noop$3,()=>get$4($0))}append($$anchor6,fragment_8)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{ default:!0}})},$$slots:{focusScope:!0}}),append($$anchor2,fragment_1)},$$slots:{content:!0}}),pop()}function Popper_layer($$anchor,$$props){let interactOutsideBehavior=prop($$props,"interactOutsideBehavior",3,"close"),trapFocus=prop($$props,"trapFocus",3,!0),isValidEvent2=prop($$props,"isValidEvent",3,()=>!1),customAnchor=prop($$props,"customAnchor",3,null),isStatic=prop($$props,"isStatic",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","popper","open","onEscapeKeydown","esca\ peKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);var fragment=comment$2(), node2=first_child(fragment);{var consequent=$$anchor2=>{Popper_layer_inner($$anchor2,spread_props({get popper(){return $$props.popper},get onEscapeKeydown(){return $$props.onEscapeKeydown},get escapeKeydownBehavior(){return $$props.escapeKeydownBehavior},get preventOverflowTextSelection(){return $$props.preventOverflowTextSelection},get id(){return $$props.id},get onPointerDown(){return $$props.onPointerDown},get onPointerUp(){return $$props.onPointerUp},get side(){return $$props.side},get sideOffset(){ return $$props.sideOffset},get align(){return $$props.align},get alignOffset(){return $$props.alignOffset},get arrowPadding(){return $$props.arrowPadding},get avoidCollisions(){return $$props.avoidCollisions},get collisionBoundary(){return $$props.collisionBoundary},get collisionPadding(){return $$props.collisionPadding},get sticky(){return $$props.sticky},get hideWhenDetached(){return $$props.hideWhenDetached},get updatePositionStrategy(){return $$props.updatePositionStrategy},get strategy(){return $$props. strategy},get dir(){return $$props.dir},get preventScroll(){return $$props.preventScroll},get wrapperId(){return $$props.wrapperId},get style(){return $$props.style},get onPlaced(){return $$props.onPlaced},get customAnchor(){return customAnchor()},get isStatic(){return isStatic()},get enabled(){return $$props.open},get onInteractOutside(){return $$props.onInteractOutside},get onCloseAutoFocus(){return $$props.onCloseAutoFocus},get onOpenAutoFocus(){return $$props.onOpenAutoFocus},get interactOutsideBehavior(){ return interactOutsideBehavior()},get loop(){return $$props.loop},get trapFocus(){return trapFocus()},get isValidEvent(){return isValidEvent2()},get onFocusOutside(){return $$props.onFocusOutside},forceMount:!1,get ref(){return $$props.ref}},()=>restProps))};if_block(node2,$$render=>{$$props.shouldRender&&$$render(consequent)})}append($$anchor,fragment)}function Popper_layer_force_mount($$anchor,$$props){let interactOutsideBehavior=prop($$props,"interactOutsideBehavior",3,"close"),trapFocus=prop( $$props,"trapFocus",3,!0),isValidEvent2=prop($$props,"isValidEvent",3,()=>!1),customAnchor=prop($$props,"customAnchor",3,null),isStatic=prop($$props,"isStatic",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositi\ onStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);Popper_layer_inner($$anchor,spread_props({get popper(){return $$props.popper},get onEscapeKeydown(){return $$props.onEscapeKeydown},get escapeKeydownBehavior(){return $$props.escapeKeydownBehavior},get preventOverflowTextSelection(){return $$props.preventOverflowTextSelection}, get id(){return $$props.id},get onPointerDown(){return $$props.onPointerDown},get onPointerUp(){return $$props.onPointerUp},get side(){return $$props.side},get sideOffset(){return $$props.sideOffset},get align(){return $$props.align},get alignOffset(){return $$props.alignOffset},get arrowPadding(){return $$props.arrowPadding},get avoidCollisions(){return $$props.avoidCollisions},get collisionBoundary(){return $$props.collisionBoundary},get collisionPadding(){return $$props.collisionPadding},get sticky(){ return $$props.sticky},get hideWhenDetached(){return $$props.hideWhenDetached},get updatePositionStrategy(){return $$props.updatePositionStrategy},get strategy(){return $$props.strategy},get dir(){return $$props.dir},get preventScroll(){return $$props.preventScroll},get wrapperId(){return $$props.wrapperId},get style(){return $$props.style},get onPlaced(){return $$props.onPlaced},get customAnchor(){return customAnchor()},get isStatic(){return isStatic()},get enabled(){return $$props.enabled},get onInteractOutside(){ return $$props.onInteractOutside},get onCloseAutoFocus(){return $$props.onCloseAutoFocus},get onOpenAutoFocus(){return $$props.onOpenAutoFocus},get interactOutsideBehavior(){return interactOutsideBehavior()},get loop(){return $$props.loop},get trapFocus(){return trapFocus()},get isValidEvent(){return isValidEvent2()},get onFocusOutside(){return $$props.onFocusOutside}},()=>restProps,{forceMount:!0}))}var root_4$E=from_html("
"),root_9$r=from_html("
");function Select_content$1($$anchor,$$props){const uid=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)),ref2=prop($$props,"ref",15,null),forceMount=prop($$props,"forceMount",3,!1),side=prop($$props,"side",3,"bottom"),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),preventScroll=prop($$props,"preventScroll",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","forceMount", "side","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]);const contentState=SelectContentState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),onInteractOutside:boxWith$1(()=>onInteractOutside()),onEscapeKeydown:boxWith$1(()=>onEscapeKeydown())}),mergedProps=user_derived(()=>mergeProps(restProps,contentState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{Popper_layer_force_mount($$anchor2,spread_props( ()=>get$4(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get side(){return side()},get enabled(){return contentState.root.opts.open.current},get id(){return id2()},get preventScroll(){return preventScroll()},forceMount:!0,get shouldRender(){return contentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:contentState.props.style},{style:$$props. style}));var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent=$$anchor4=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);{let $0=user_derived(()=>({props:get$4(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$4($0))}append($$anchor4,fragment_3)},alternate=$$anchor4=>{var div=root_4$E();attribute_effect(div,()=>({...wrapperProps()}));var div_1=child(div);attribute_effect(div_1,()=>({...get$4(finalProps)})); var node_3=child(div_1);snippet(node_3,()=>$$props.children??noop$3),reset(div_1),reset(div),append($$anchor4,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor3,fragment_2)},$$slots:{popper:!0}}))},alternate_2=$$anchor2=>{var fragment_4=comment$2(),node_4=first_child(fragment_4);{var consequent_3=$$anchor3=>{Popper_layer($$anchor3,spread_props(()=>get$4(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get side(){ return side()},get open(){return contentState.root.opts.open.current},get id(){return id2()},get preventScroll(){return preventScroll()},forceMount:!1,get shouldRender(){return contentState.shouldRender},popper:($$anchor4,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:contentState.props.style},{style:$$props.style}));var fragment_6=comment$2(),node_5=first_child(fragment_6);{var consequent_2=$$anchor5=>{ var fragment_7=comment$2(),node_6=first_child(fragment_7);{let $0=user_derived(()=>({props:get$4(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_6,()=>$$props.child,()=>get$4($0))}append($$anchor5,fragment_7)},alternate_1=$$anchor5=>{var div_2=root_9$r();attribute_effect(div_2,()=>({...wrapperProps()}));var div_3=child(div_2);attribute_effect(div_3,()=>({...get$4(finalProps)}));var node_7=child(div_3);snippet(node_7,()=>$$props.children??noop$3),reset(div_3), reset(div_2),append($$anchor5,div_2)};if_block(node_5,$$render=>{$$props.child?$$render(consequent_2):$$render(alternate_1,!1)})}append($$anchor4,fragment_6)},$$slots:{popper:!0}}))};if_block(node_4,$$render=>{forceMount()||$$render(consequent_3)},!0)}append($$anchor2,fragment_4)};if_block(node2,$$render=>{forceMount()?$$render(consequent_1):$$render(alternate_2,!1)})}append($$anchor,fragment),pop()}function Mounted($$anchor,$$props){push$1($$props,!0);let mounted=prop($$props,"mounted",15,!1),onMountedChange=prop( $$props,"onMountedChange",3,noop$1);onMountEffect(()=>(mounted(!0),onMountedChange()(!0),()=>{mounted(!1),onMountedChange()(!1)})),pop()}var root_2$1k=from_html("
"),root$1K=from_html(" ",1);function Select_item$1($$anchor,$$props){const uid=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)),ref2=prop($$props,"ref",15,null),label=prop($$props,"label",19,()=>$$props.value),disabled=prop($$props,"disabled",3,!1),onHighlight=prop($$props,"onHighlight",3, noop$1),onUnhighlight=prop($$props,"onUnhighlight",3,noop$1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]);const itemState=SelectItemState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),value:boxWith$1(()=>$$props.value),disabled:boxWith$1(()=>disabled()),label:boxWith$1(()=>label()),onHighlight:boxWith$1(()=>onHighlight()),onUnhighlight:boxWith$1(()=>onUnhighlight())}), mergedProps=user_derived(()=>mergeProps(restProps,itemState.props));var fragment=root$1K(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>({props:get$4(mergedProps),...itemState.snippetProps}));snippet(node_1,()=>$$props.child,()=>get$4($0))}append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1k();attribute_effect(div,()=>({...get$4(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props. children??noop$3,()=>itemState.snippetProps),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}var node_3=sibling(node2,2);Mounted(node_3,{get mounted(){return itemState.mounted},set mounted($$value){itemState.mounted=$$value}}),append($$anchor,fragment),pop()}var root_2$1j=from_html("
");function Select_viewport($$anchor,$$props){const uid=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)), ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","children","child"]);const viewportState=SelectViewportState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,viewportState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$4( mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1j();attribute_effect(div,()=>({...get$4(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}var root_3$$=from_html("
"),root_1$14=from_html(" ",1);function Select_scroll_down_button$1($$anchor,$$props){const uid=props_id(); push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)),ref2=prop($$props,"ref",15,null),delay=prop($$props,"delay",3,()=>50),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const scrollButtonState=SelectScrollDownButtonState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),delay:boxWith$1(()=>delay())}),mergedProps=user_derived(()=>mergeProps(restProps,scrollButtonState.props));var fragment=comment$2(),node2=first_child( fragment);{var consequent_1=$$anchor2=>{var fragment_1=root_1$14(),node_1=first_child(fragment_1);Mounted(node_1,{get mounted(){return scrollButtonState.scrollButtonState.mounted},set mounted($$value){scrollButtonState.scrollButtonState.mounted=$$value}});var node_2=sibling(node_1,2);{var consequent=$$anchor3=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);snippet(node_3,()=>$$props.child,()=>({props:restProps})),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var div=root_3$$(); attribute_effect(div,()=>({...get$4(mergedProps)}));var node_4=child(div);snippet(node_4,()=>$$props.children??noop$3),reset(div),append($$anchor3,div)};if_block(node_2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor2,fragment_1)};if_block(node2,$$render=>{scrollButtonState.canScrollDown&&$$render(consequent_1)})}append($$anchor,fragment),pop()}var root_3$_=from_html("
"),root_1$13=from_html(" ",1);function Select_scroll_up_button$1($$anchor,$$props){ const uid=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)),ref2=prop($$props,"ref",15,null),delay=prop($$props,"delay",3,()=>50),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const scrollButtonState=SelectScrollUpButtonState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),delay:boxWith$1(()=>delay())}),mergedProps=user_derived(()=>mergeProps(restProps,scrollButtonState.props));var fragment=comment$2(), node2=first_child(fragment);{var consequent_1=$$anchor2=>{var fragment_1=root_1$13(),node_1=first_child(fragment_1);Mounted(node_1,{get mounted(){return scrollButtonState.scrollButtonState.mounted},set mounted($$value){scrollButtonState.scrollButtonState.mounted=$$value}});var node_2=sibling(node_1,2);{var consequent=$$anchor3=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);snippet(node_3,()=>$$props.child,()=>({props:restProps})),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var div=root_3$_(); attribute_effect(div,()=>({...get$4(mergedProps)}));var node_4=child(div);snippet(node_4,()=>$$props.children??noop$3),reset(div),append($$anchor3,div)};if_block(node_2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor2,fragment_1)};if_block(node2,$$render=>{scrollButtonState.canScrollUp&&$$render(consequent_1)})}append($$anchor,fragment),pop()}function Menu_sub($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),onOpenChange=prop($$props, "onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1);MenuSubmenuState.create({open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()?.(v)}),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())}),Floating_layer($$anchor,{children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}var root_2$1i=from_html("
"); function Menu_item($$anchor,$$props){const uid=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid)),disabled=prop($$props,"disabled",3,!1),onSelect=prop($$props,"onSelect",3,noop$1),closeOnSelect=prop($$props,"closeOnSelect",3,!0),restProps=rest_props($$props,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]);const itemState=MenuItemState.create({id:boxWith$1(()=>id2()),disabled:boxWith$1( ()=>disabled()),onSelect:boxWith$1(()=>onSelect()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),closeOnSelect:boxWith$1(()=>closeOnSelect())}),mergedProps=user_derived(()=>mergeProps(restProps,itemState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$4(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1i();attribute_effect(div, ()=>({...get$4(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}var root_2$1h=from_html("
");function Menu_separator($$anchor,$$props){const uid=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid)),restProps=rest_props($$props,["$$slots","$$ev\ ents","$$legacy","ref","id","child","children"]);const separatorState=MenuSeparatorState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,separatorState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$4(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1h(); attribute_effect(div,()=>({...get$4(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}var root_4$D=from_html("
"),root_9$q=from_html("
");function Menu_sub_content($$anchor,$$props){const uid=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)), ref2=prop($$props,"ref",15,null),loop2=prop($$props,"loop",3,!0),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),forceMount=prop($$props,"forceMount",3,!1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),interactOutsideBehavior=prop($$props,"interactOutsideBehavior",3,"defer-otherwise-close"),escapeKeydownBehavior=prop($$props,"escapeKeydownBehavior",3,"defer-otherwise-close"),onOpenAutoFocusProp=prop($$props,"onOpenAutoFocus",3,noop$1),onCloseAutoFocusProp=prop($$props,"on\ CloseAutoFocus",3,noop$1),onFocusOutside=prop($$props,"onFocusOutside",3,noop$1),side=prop($$props,"side",3,"right"),trapFocus=prop($$props,"trapFocus",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","children","child","loop","onInteractOutside","forceMount","onEscapeKeydown","interactOutsideBehavior","escapeKeydownBehavior","onOpenAutoFocus","onCloseAutoFocus","onFocusOutside","side","trapFocus","style"]);const subContentState=MenuContentState.create({id:boxWith$1( ()=>id2()),loop:boxWith$1(()=>loop2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),isSub:!0,onCloseAutoFocus:boxWith$1(()=>handleCloseAutoFocus)});function onkeydown(e){const isKeyDownInside=e.currentTarget.contains(e.target),isCloseKey=SUB_CLOSE_KEYS[subContentState.parentMenu.root.opts.dir.current].includes(e.key);isKeyDownInside&&isCloseKey&&(subContentState.parentMenu.onClose(),subContentState.parentMenu.triggerNode?.focus(),e.preventDefault())}const dataAttr=user_derived(()=>subContentState.parentMenu. root.getBitsAttr("sub-content")),mergedProps=user_derived(()=>mergeProps(restProps,subContentState.props,{side:side(),onkeydown,[get$4(dataAttr)]:""}));function handleOpenAutoFocus(e){onOpenAutoFocusProp()(e),!e.defaultPrevented&&(e.preventDefault(),subContentState.parentMenu.root.isUsingKeyboard&&subContentState.parentMenu.contentNode&&MenuOpenEvent.dispatch(subContentState.parentMenu.contentNode))}function handleCloseAutoFocus(e){onCloseAutoFocusProp()(e),!e.defaultPrevented&&e.preventDefault()} function handleInteractOutside(e){onInteractOutside()(e),!e.defaultPrevented&&subContentState.parentMenu.onClose()}function handleEscapeKeydown(e){onEscapeKeydown()(e),!e.defaultPrevented&&subContentState.parentMenu.onClose()}function handleOnFocusOutside(e){onFocusOutside()(e),!e.defaultPrevented&&isHTMLElement$1(e.target)&&e.target.id!==subContentState.parentMenu.triggerNode?.id&&subContentState.parentMenu.onClose()}var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{ Popper_layer_force_mount($$anchor2,spread_props(()=>get$4(mergedProps),{get ref(){return subContentState.opts.ref},get interactOutsideBehavior(){return interactOutsideBehavior()},get escapeKeydownBehavior(){return escapeKeydownBehavior()},onOpenAutoFocus:handleOpenAutoFocus,get enabled(){return subContentState.parentMenu.opts.open.current},onInteractOutside:handleInteractOutside,onEscapeKeydown:handleEscapeKeydown,onFocusOutside:handleOnFocusOutside,preventScroll:!1,get loop(){return loop2()},get trapFocus(){ return trapFocus()},get shouldRender(){return subContentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),get$4(mergedProps),{style:getFloatingContentCSSVars("menu")},{style:$$props.style}));var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent=$$anchor4=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);{let $0=user_derived(()=>({props:get$4(finalProps), wrapperProps:wrapperProps(),...subContentState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$4($0))}append($$anchor4,fragment_3)},alternate=$$anchor4=>{var div=root_4$D();attribute_effect(div,()=>({...wrapperProps()}));var div_1=child(div);attribute_effect(div_1,()=>({...get$4(finalProps)}));var node_3=child(div_1);snippet(node_3,()=>$$props.children??noop$3),reset(div_1),reset(div),append($$anchor4,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):$$render(alternate, !1)})}append($$anchor3,fragment_2)},$$slots:{popper:!0}}))},alternate_2=$$anchor2=>{var fragment_4=comment$2(),node_4=first_child(fragment_4);{var consequent_3=$$anchor3=>{Popper_layer($$anchor3,spread_props(()=>get$4(mergedProps),{get ref(){return subContentState.opts.ref},get interactOutsideBehavior(){return interactOutsideBehavior()},get escapeKeydownBehavior(){return escapeKeydownBehavior()},onCloseAutoFocus:handleCloseAutoFocus,onOpenAutoFocus:handleOpenAutoFocus,get open(){return subContentState. parentMenu.opts.open.current},onInteractOutside:handleInteractOutside,onEscapeKeydown:handleEscapeKeydown,onFocusOutside:handleOnFocusOutside,preventScroll:!1,get loop(){return loop2()},get trapFocus(){return trapFocus()},get shouldRender(){return subContentState.shouldRender},popper:($$anchor4,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),get$4(mergedProps),{style:getFloatingContentCSSVars("menu")},{style:$$props. style}));var fragment_6=comment$2(),node_5=first_child(fragment_6);{var consequent_2=$$anchor5=>{var fragment_7=comment$2(),node_6=first_child(fragment_7);{let $0=user_derived(()=>({props:get$4(finalProps),wrapperProps:wrapperProps(),...subContentState.snippetProps}));snippet(node_6,()=>$$props.child,()=>get$4($0))}append($$anchor5,fragment_7)},alternate_1=$$anchor5=>{var div_2=root_9$q();attribute_effect(div_2,()=>({...wrapperProps()}));var div_3=child(div_2);attribute_effect(div_3,()=>({...get$4( finalProps)}));var node_7=child(div_3);snippet(node_7,()=>$$props.children??noop$3),reset(div_3),reset(div_2),append($$anchor5,div_2)};if_block(node_5,$$render=>{$$props.child?$$render(consequent_2):$$render(alternate_1,!1)})}append($$anchor4,fragment_6)},$$slots:{popper:!0}}))};if_block(node_4,$$render=>{forceMount()||$$render(consequent_3)},!0)}append($$anchor2,fragment_4)};if_block(node2,$$render=>{forceMount()?$$render(consequent_1):$$render(alternate_2,!1)})}append($$anchor,fragment),pop()} var root_3$Z=from_html("
");function Menu_sub_trigger($$anchor,$$props){const uid=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)),disabled=prop($$props,"disabled",3,!1),ref2=prop($$props,"ref",15,null),onSelect=prop($$props,"onSelect",3,noop$1),openDelay=prop($$props,"openDelay",3,100),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","disabled","ref","children","child","onSelect","openDelay"]);const subTriggerState=MenuSubTriggerState. create({disabled:boxWith$1(()=>disabled()),onSelect:boxWith$1(()=>onSelect()),id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),openDelay:boxWith$1(()=>openDelay())}),mergedProps=user_derived(()=>mergeProps(restProps,subTriggerState.props));Floating_layer_anchor($$anchor,{get id(){return id2()},get ref(){return subTriggerState.opts.ref},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);{var consequent=$$anchor3=>{var fragment_2=comment$2(),node_1=first_child( fragment_2);snippet(node_1,()=>$$props.child,()=>({props:get$4(mergedProps)})),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var div=root_3$Z();attribute_effect(div,()=>({...get$4(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor3,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}function isPointInPolygon(point2,polygon){const[x,y]=point2; let isInside=!1;const length=polygon.length;for(let i=0,j=length-1;i=y!=yj>=y&&x<=(xj-xi)*(y-yi)/(yj-yi)+xi&&(isInside=!isInside)}return isInside}function isInsideRect(point2,rect){return point2[0]>=rect.left&&point2[0]<=rect.right&&point2[1]>=rect.top&&point2[1]<=rect.bottom}function getSide(triggerRect,contentRect){const triggerCenterX=triggerRect.left+triggerRect.width/2,triggerCenterY=triggerRect.top+triggerRect.height/ 2,contentCenterX=contentRect.left+contentRect.width/2,contentCenterY=contentRect.top+contentRect.height/2,deltaX=contentCenterX-triggerCenterX,deltaY=contentCenterY-triggerCenterY;return Math.abs(deltaX)>Math.abs(deltaY)?deltaX>0?"right":"left":deltaY>0?"bottom":"top"}class SafePolygon{#opts;#buffer;#exitPoint=null;#exitTarget=null;constructor(opts){this.#opts=opts,this.#buffer=opts.buffer??1,watch$1([opts.triggerNode,opts.contentNode,opts.enabled],([triggerNode,contentNode,enabled])=>{if(!triggerNode|| !contentNode||!enabled){this.#exitPoint=null,this.#exitTarget=null;return}const doc=getDocument$1(triggerNode),handlePointerMove=e=>{this.#onPointerMove(e,triggerNode,contentNode)},handleTriggerLeave=e=>{const target2=e.relatedTarget;isElement$1(target2)&&contentNode.contains(target2)||(this.#exitPoint=[e.clientX,e.clientY],this.#exitTarget="content")},handleTriggerEnter=()=>{this.#exitPoint=null,this.#exitTarget=null},handleContentEnter=()=>{this.#exitPoint=null,this.#exitTarget=null},handleContentLeave=e=>{ const target2=e.relatedTarget;isElement$1(target2)&&triggerNode.contains(target2)||(this.#exitPoint=[e.clientX,e.clientY],this.#exitTarget="trigger")};return[on(doc,"pointermove",handlePointerMove),on(triggerNode,"pointerleave",handleTriggerLeave),on(triggerNode,"pointerenter",handleTriggerEnter),on(contentNode,"pointerenter",handleContentEnter),on(contentNode,"pointerleave",handleContentLeave)].reduce((acc,cleanup)=>()=>{acc(),cleanup()},()=>{})})}#onPointerMove(e,triggerNode,contentNode){if(!this.#exitPoint|| !this.#exitTarget)return;const clientPoint=[e.clientX,e.clientY],triggerRect=triggerNode.getBoundingClientRect(),contentRect=contentNode.getBoundingClientRect();if(this.#exitTarget==="content"&&isInsideRect(clientPoint,contentRect)){this.#exitPoint=null,this.#exitTarget=null;return}if(this.#exitTarget==="trigger"&&isInsideRect(clientPoint,triggerRect)){this.#exitPoint=null,this.#exitTarget=null;return}const side=getSide(triggerRect,contentRect),corridorPoly=this.#getCorridorPolygon(triggerRect,contentRect, side);if(corridorPoly&&isPointInPolygon(clientPoint,corridorPoly))return;const targetRect=this.#exitTarget==="content"?contentRect:triggerRect,safePoly=this.#getSafePolygon(this.#exitPoint,targetRect,side,this.#exitTarget);isPointInPolygon(clientPoint,safePoly)||(this.#exitPoint=null,this.#exitTarget=null,this.#opts.onPointerExit())}#getCorridorPolygon(triggerRect,contentRect,side){const buffer=this.#buffer;switch(side){case"top":return[[Math.min(triggerRect.left,contentRect.left)-buffer,triggerRect. top],[Math.min(triggerRect.left,contentRect.left)-buffer,contentRect.bottom],[Math.max(triggerRect.right,contentRect.right)+buffer,contentRect.bottom],[Math.max(triggerRect.right,contentRect.right)+buffer,triggerRect.top]];case"bottom":return[[Math.min(triggerRect.left,contentRect.left)-buffer,triggerRect.bottom],[Math.min(triggerRect.left,contentRect.left)-buffer,contentRect.top],[Math.max(triggerRect.right,contentRect.right)+buffer,contentRect.top],[Math.max(triggerRect.right,contentRect.right)+ buffer,triggerRect.bottom]];case"left":return[[triggerRect.left,Math.min(triggerRect.top,contentRect.top)-buffer],[contentRect.right,Math.min(triggerRect.top,contentRect.top)-buffer],[contentRect.right,Math.max(triggerRect.bottom,contentRect.bottom)+buffer],[triggerRect.left,Math.max(triggerRect.bottom,contentRect.bottom)+buffer]];case"right":return[[triggerRect.right,Math.min(triggerRect.top,contentRect.top)-buffer],[contentRect.left,Math.min(triggerRect.top,contentRect.top)-buffer],[contentRect. left,Math.max(triggerRect.bottom,contentRect.bottom)+buffer],[triggerRect.right,Math.max(triggerRect.bottom,contentRect.bottom)+buffer]]}}#getSafePolygon(exitPoint,targetRect,side,exitTarget){const buffer=this.#buffer*4,[x,y]=exitPoint;switch(exitTarget==="trigger"?this.#flipSide(side):side){case"top":return[[x-buffer,y+buffer],[x+buffer,y+buffer],[targetRect.right+buffer,targetRect.bottom],[targetRect.right+buffer,targetRect.top],[targetRect.left-buffer,targetRect.top],[targetRect.left-buffer,targetRect. bottom]];case"bottom":return[[x-buffer,y-buffer],[x+buffer,y-buffer],[targetRect.right+buffer,targetRect.top],[targetRect.right+buffer,targetRect.bottom],[targetRect.left-buffer,targetRect.bottom],[targetRect.left-buffer,targetRect.top]];case"left":return[[x+buffer,y-buffer],[x+buffer,y+buffer],[targetRect.right,targetRect.bottom+buffer],[targetRect.left,targetRect.bottom+buffer],[targetRect.left,targetRect.top-buffer],[targetRect.right,targetRect.top-buffer]];case"right":return[[x-buffer,y-buffer], [x-buffer,y+buffer],[targetRect.left,targetRect.bottom+buffer],[targetRect.right,targetRect.bottom+buffer],[targetRect.right,targetRect.top-buffer],[targetRect.left,targetRect.top-buffer]]}}#flipSide(side){switch(side){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}}const popoverAttrs=createBitsAttrs({component:"popover",parts:["root","trigger","content","close","overlay"]}),PopoverRootContext=new Context$1("Popover.Root");class PopoverRootState{static create(opts){ return PopoverRootContext.set(new PopoverRootState(opts))}opts;#contentNode=state$1(null);get contentNode(){return get$4(this.#contentNode)}set contentNode(value){set$1(this.#contentNode,value,!0)}contentPresence;#triggerNode=state$1(null);get triggerNode(){return get$4(this.#triggerNode)}set triggerNode(value){set$1(this.#triggerNode,value,!0)}#overlayNode=state$1(null);get overlayNode(){return get$4(this.#overlayNode)}set overlayNode(value){set$1(this.#overlayNode,value,!0)}overlayPresence;#openedViaHover=state$1( !1);get openedViaHover(){return get$4(this.#openedViaHover)}set openedViaHover(value){set$1(this.#openedViaHover,value,!0)}#hasInteractedWithContent=state$1(!1);get hasInteractedWithContent(){return get$4(this.#hasInteractedWithContent)}set hasInteractedWithContent(value){set$1(this.#hasInteractedWithContent,value,!0)}#hoverCooldown=state$1(!1);get hoverCooldown(){return get$4(this.#hoverCooldown)}set hoverCooldown(value){set$1(this.#hoverCooldown,value,!0)}#closeDelay=state$1(0);get closeDelay(){ return get$4(this.#closeDelay)}set closeDelay(value){set$1(this.#closeDelay,value,!0)}#closeTimeout=null;#domContext=null;constructor(opts){this.opts=opts,this.contentPresence=new PresenceManager({ref:boxWith$1(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new PresenceManager({ref:boxWith$1(()=>this.overlayNode),open:this.opts.open}),watch$1(()=>this.opts.open.current,isOpen=>{isOpen||(this.openedViaHover= !1,this.hasInteractedWithContent=!1,this.#clearCloseTimeout())})}setDomContext(ctx){this.#domContext=ctx}#clearCloseTimeout(){this.#closeTimeout!==null&&this.#domContext&&(this.#domContext.clearTimeout(this.#closeTimeout),this.#closeTimeout=null)}toggleOpen(){this.#clearCloseTimeout(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#clearCloseTimeout(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#clearCloseTimeout(),!this.opts.open.current&&(this. openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#clearCloseTimeout(),this.closeDelay<=0?this.opts.open.current=!1:this.#domContext&&(this.#closeTimeout=this.#domContext.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#closeTimeout= null},this.closeDelay))))}cancelDelayedClose(){this.#clearCloseTimeout()}markInteraction(){this.hasInteractedWithContent=!0,this.#clearCloseTimeout()}}class PopoverTriggerState{static create(opts){return new PopoverTriggerState(opts,PopoverRootContext.get())}opts;root;attachment;domContext;#openTimeout=null;#closeTimeout=null;#isHovering=state$1(!1);constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref,v=>this.root.triggerNode=v),this.domContext=new DOMContext( opts.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),watch$1(()=>this.opts.closeDelay.current,delay=>{this.root.closeDelay=delay})}#clearOpenTimeout(){this.#openTimeout!==null&&(this.domContext.clearTimeout(this.#openTimeout),this.#openTimeout=null)}#clearCloseTimeout(){this.#closeTimeout!==null&&(this.domContext.clearTimeout( this.#closeTimeout),this.#closeTimeout=null)}#clearAllTimeouts(){this.#clearOpenTimeout(),this.#clearCloseTimeout()}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||isTouch(e)||(set$1(this.#isHovering,!0),this.#clearCloseTimeout(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const delay=this.opts.openDelay.current;delay<=0?this.root.handleHoverOpen():this.#openTimeout=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(), this.#openTimeout=null},delay)}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&(isTouch(e)||(set$1(this.#isHovering,!1),this.#clearOpenTimeout(),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(this.#clearAllTimeouts(),get$4(this.#isHovering)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}get$4(this.#isHovering)&&this.opts.openOnHover.current&&this. root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===ENTER||e.key===SPACE)&&(e.preventDefault(),this.#clearAllTimeouts(),this.root.toggleOpen())}#getAriaControls(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#props=user_derived(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expand\ ed":boolToStr(this.root.opts.open.current),"data-state":getDataOpenClosed(this.root.opts.open.current),"aria-controls":this.#getAriaControls(),[popoverAttrs.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class PopoverContentState{static create(opts){return new PopoverContentState( opts,PopoverRootContext.get())}opts;root;attachment;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref,v=>this.root.contentNode=v),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new SafePolygon({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&& this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(_){this.root.markInteraction()}onfocusin(e){const target2=e.target;isElement$1(target2)&&isTabbable(target2)&&this.root.markInteraction()}onpointerenter(e){isTouch(e)||this.root.cancelDelayedClose()}onpointerleave(e){isTouch(e)}onInteractOutside=e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!isElement$1(e.target))return;const closestTrigger=e.target. closest(popoverAttrs.selector("trigger"));if(!(closestTrigger&&closestTrigger===this.root.triggerNode)){if(this.opts.customAnchor.current){if(isElement$1(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current=="string"){const el=document.querySelector(this.opts.customAnchor.current);if(el&&el.contains(e.target))return}}this.root.handleClose()}};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&& this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#snippetProps=user_derived(()=>({open:this.root.opts.open.current}));get snippetProps(){return get$4(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,tabindex:-1,"data-state":getDataOpenClosed(this.root.opts.open.current),[popoverAttrs.content]:"", style:{pointerEvents:"auto",contain:"layout style paint"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}}var root_4$C=from_html("
"),root_9$p=from_html("
");function Popover_content$1($$anchor,$$props){ const uid=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid)),forceMount=prop($$props,"forceMount",3,!1),onOpenAutoFocus=prop($$props,"onOpenAutoFocus",3,noop$1),onCloseAutoFocus=prop($$props,"onCloseAutoFocus",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),trapFocus=prop($$props,"trapFocus",3,!0),preventScroll=prop($$props,"preventScroll",3,!1),customAnchor=prop( $$props,"customAnchor",3,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]);const contentState=PopoverContentState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),onInteractOutside:boxWith$1(()=>onInteractOutside()),onEscapeKeydown:boxWith$1(()=>onEscapeKeydown()),customAnchor:boxWith$1(()=>customAnchor())}), mergedProps=user_derived(()=>mergeProps(restProps,contentState.props)),effectiveTrapFocus=user_derived(()=>trapFocus()&&contentState.shouldTrapFocus);function handleOpenAutoFocus(e){contentState.shouldTrapFocus||e.preventDefault(),onOpenAutoFocus()(e)}var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{Popper_layer_force_mount($$anchor2,spread_props(()=>get$4(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get enabled(){return contentState. root.opts.open.current},get id(){return id2()},get trapFocus(){return get$4(effectiveTrapFocus)},get preventScroll(){return preventScroll()},loop:!0,forceMount:!0,get customAnchor(){return customAnchor()},onOpenAutoFocus:handleOpenAutoFocus,get onCloseAutoFocus(){return onCloseAutoFocus()},get shouldRender(){return contentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars( "popover")},{style:$$props.style}));var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent=$$anchor4=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);{let $0=user_derived(()=>({props:get$4(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$4($0))}append($$anchor4,fragment_3)},alternate=$$anchor4=>{var div=root_4$C();attribute_effect(div,()=>({...wrapperProps()}));var div_1=child(div);attribute_effect(div_1, ()=>({...get$4(finalProps)}));var node_3=child(div_1);snippet(node_3,()=>$$props.children??noop$3),reset(div_1),reset(div),append($$anchor4,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor3,fragment_2)},$$slots:{popper:!0}}))},alternate_2=$$anchor2=>{var fragment_4=comment$2(),node_4=first_child(fragment_4);{var consequent_3=$$anchor3=>{Popper_layer($$anchor3,spread_props(()=>get$4(mergedProps),()=>contentState.popperProps,{get ref(){return contentState. opts.ref},get open(){return contentState.root.opts.open.current},get id(){return id2()},get trapFocus(){return get$4(effectiveTrapFocus)},get preventScroll(){return preventScroll()},loop:!0,forceMount:!1,get customAnchor(){return customAnchor()},onOpenAutoFocus:handleOpenAutoFocus,get onCloseAutoFocus(){return onCloseAutoFocus()},get shouldRender(){return contentState.shouldRender},popper:($$anchor4,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived( ()=>mergeProps(props(),{style:getFloatingContentCSSVars("popover")},{style:$$props.style}));var fragment_6=comment$2(),node_5=first_child(fragment_6);{var consequent_2=$$anchor5=>{var fragment_7=comment$2(),node_6=first_child(fragment_7);{let $0=user_derived(()=>({props:get$4(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_6,()=>$$props.child,()=>get$4($0))}append($$anchor5,fragment_7)},alternate_1=$$anchor5=>{var div_2=root_9$p();attribute_effect(div_2,()=>({ ...wrapperProps()}));var div_3=child(div_2);attribute_effect(div_3,()=>({...get$4(finalProps)}));var node_7=child(div_3);snippet(node_7,()=>$$props.children??noop$3),reset(div_3),reset(div_2),append($$anchor5,div_2)};if_block(node_5,$$render=>{$$props.child?$$render(consequent_2):$$render(alternate_1,!1)})}append($$anchor4,fragment_6)},$$slots:{popper:!0}}))};if_block(node_4,$$render=>{forceMount()||$$render(consequent_3)},!0)}append($$anchor2,fragment_4)};if_block(node2,$$render=>{forceMount()? $$render(consequent_1):$$render(alternate_2,!1)})}append($$anchor,fragment),pop()}var root_3$Y=from_html("");function Popover_trigger$1($$anchor,$$props){const uid=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)),ref2=prop($$props,"ref",15,null),type2=prop($$props,"type",3,"button"),disabled=prop($$props,"disabled",3,!1),openOnHover=prop($$props,"openOnHover",3,!1),openDelay=prop($$props,"openDelay",3,700),closeDelay=prop($$props,"closeDelay",3,300), restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]);const triggerState=PopoverTriggerState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),disabled:boxWith$1(()=>!!disabled()),openOnHover:boxWith$1(()=>openOnHover()),openDelay:boxWith$1(()=>openDelay()),closeDelay:boxWith$1(()=>closeDelay())}),mergedProps=user_derived(()=>mergeProps(restProps,triggerState.props,{type:type2()})); Floating_layer_anchor($$anchor,{get id(){return id2()},get ref(){return triggerState.opts.ref},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);{var consequent=$$anchor3=>{var fragment_2=comment$2(),node_1=first_child(fragment_2);snippet(node_1,()=>$$props.child,()=>({props:get$4(mergedProps)})),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var button=root_3$Y();attribute_effect(button,()=>({...get$4(mergedProps)}));var node_2=child(button);snippet( node_2,()=>$$props.children??noop$3),reset(button),append($$anchor3,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}function Dialog($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1);DialogRootState.create({variant:boxWith$1(()=>"dialog"),open:boxWith$1( ()=>open2(),v=>{open2(v),onOpenChange()(v)}),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}var root_2$1g=from_html("");function Dialog_close($$anchor,$$props){const uid=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)),ref2=prop($$props,"ref",15,null),disabled=prop($$props,"disabled",3,!1),restProps=rest_props( $$props,["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]);const closeState=DialogCloseState.create({variant:boxWith$1(()=>"close"),id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),disabled:boxWith$1(()=>!!disabled())}),mergedProps=user_derived(()=>mergeProps(restProps,closeState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({ props:get$4(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var button=root_2$1g();attribute_effect(button,()=>({...get$4(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor2,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}var root_6$B=from_html(" ",1),root_8$q=from_html("
",1);function Dialog_content$1($$anchor,$$props){ const uid=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)),ref2=prop($$props,"ref",15,null),forceMount=prop($$props,"forceMount",3,!1),onCloseAutoFocus=prop($$props,"onCloseAutoFocus",3,noop$1),onOpenAutoFocus=prop($$props,"onOpenAutoFocus",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),trapFocus=prop($$props,"trapFocus",3,!0),preventScroll=prop($$props,"preventScroll",3,!0),restoreScrollDelay=prop( $$props,"restoreScrollDelay",3,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const contentState=DialogContentState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,contentState.props));var fragment=comment$2(),node2=first_child(fragment); {var consequent_2=$$anchor2=>{Focus_scope($$anchor2,{get ref(){return contentState.opts.ref},loop:!0,get trapFocus(){return trapFocus()},get enabled(){return contentState.root.opts.open.current},get onOpenAutoFocus(){return onOpenAutoFocus()},get onCloseAutoFocus(){return onCloseAutoFocus()},focusScope:($$anchor3,$$arg0)=>{let focusScopeProps=()=>$$arg0?.().props;Escape_layer($$anchor3,spread_props(()=>get$4(mergedProps),{get enabled(){return contentState.root.opts.open.current},get ref(){return contentState. opts.ref},onEscapeKeydown:e=>{onEscapeKeydown()(e),!e.defaultPrevented&&contentState.root.handleClose()},children:($$anchor4,$$slotProps)=>{Dismissible_layer($$anchor4,spread_props(()=>get$4(mergedProps),{get ref(){return contentState.opts.ref},get enabled(){return contentState.root.opts.open.current},onInteractOutside:e=>{onInteractOutside()(e),!e.defaultPrevented&&contentState.root.handleClose()},children:($$anchor5,$$slotProps2)=>{Text_selection_layer($$anchor5,spread_props(()=>get$4(mergedProps), {get ref(){return contentState.opts.ref},get enabled(){return contentState.root.opts.open.current},children:($$anchor6,$$slotProps3)=>{var fragment_5=comment$2(),node_1=first_child(fragment_5);{var consequent_1=$$anchor7=>{var fragment_6=root_6$B(),node_2=first_child(fragment_6);{var consequent=$$anchor8=>{Scroll_lock($$anchor8,{get preventScroll(){return preventScroll()},get restoreScrollDelay(){return restoreScrollDelay()}})};if_block(node_2,$$render=>{contentState.root.opts.open.current&&$$render( consequent)})}var node_3=sibling(node_2,2);{let $0=user_derived(()=>({props:mergeProps(get$4(mergedProps),focusScopeProps()),...contentState.snippetProps}));snippet(node_3,()=>$$props.child,()=>get$4($0))}append($$anchor7,fragment_6)},alternate=$$anchor7=>{var fragment_8=root_8$q(),node_4=first_child(fragment_8);Scroll_lock(node_4,{get preventScroll(){return preventScroll()}});var div=sibling(node_4,2);attribute_effect(div,$0=>({...$0}),[()=>mergeProps(get$4(mergedProps),focusScopeProps())]);var node_5=child( div);snippet(node_5,()=>$$props.children??noop$3),reset(div),append($$anchor7,fragment_8)};if_block(node_1,$$render=>{$$props.child?$$render(consequent_1):$$render(alternate,!1)})}append($$anchor6,fragment_5)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};if_block(node2,$$render=>{(contentState.shouldRender||forceMount())&&$$render(consequent_2)})}append($$anchor,fragment),pop()}function Menu($$anchor,$$props){push$1($$props,!0);let open2=prop( $$props,"open",15,!1),dir=prop($$props,"dir",3,"ltr"),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1),variant=prop($$props,"_internal_variant",3,"dropdown-menu");const root2=MenuRootState.create({variant:boxWith$1(()=>variant()),dir:boxWith$1(()=>dir()),onClose:()=>{open2(!1),onOpenChange()(!1)}});MenuMenuState.create({open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())}, root2),Floating_layer($$anchor,{children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}var root_4$B=from_html("
"),root_9$o=from_html("
");function Dropdown_menu_content$1($$anchor,$$props){const uid=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)),ref2=prop($$props,"ref",15,null),loop2=prop( $$props,"loop",3,!0),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),onCloseAutoFocus=prop($$props,"onCloseAutoFocus",3,noop$1),forceMount=prop($$props,"forceMount",3,!1),trapFocus=prop($$props,"trapFocus",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onEscapeKeydown","onCloseAutoFocus","forceMount","trapFocus","style"]);const contentState=MenuContentState. create({id:boxWith$1(()=>id2()),loop:boxWith$1(()=>loop2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),onCloseAutoFocus:boxWith$1(()=>onCloseAutoFocus())}),mergedProps=user_derived(()=>mergeProps(restProps,contentState.props));function handleInteractOutside(e){if(contentState.handleInteractOutside(e),!e.defaultPrevented&&(onInteractOutside()(e),!e.defaultPrevented)){if(e.target&&e.target instanceof Element){const subContentSelector=`[${contentState.parentMenu.root.getBitsAttr("sub-content")}]`;if(e.target. closest(subContentSelector))return}contentState.parentMenu.onClose()}}function handleEscapeKeydown(e){onEscapeKeydown()(e),!e.defaultPrevented&&contentState.parentMenu.onClose()}var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{Popper_layer_force_mount($$anchor2,spread_props(()=>get$4(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get enabled(){return contentState.parentMenu.opts.open.current},onInteractOutside:handleInteractOutside, onEscapeKeydown:handleEscapeKeydown,get trapFocus(){return trapFocus()},get loop(){return loop2()},forceMount:!0,get id(){return id2()},get shouldRender(){return contentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars("dropdown-menu")},{style:$$props.style}));var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent=$$anchor4=>{ var fragment_3=comment$2(),node_2=first_child(fragment_3);{let $0=user_derived(()=>({props:get$4(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$4($0))}append($$anchor4,fragment_3)},alternate=$$anchor4=>{var div=root_4$B();attribute_effect(div,()=>({...wrapperProps()}));var div_1=child(div);attribute_effect(div_1,()=>({...get$4(finalProps)}));var node_3=child(div_1);snippet(node_3,()=>$$props.children??noop$3),reset(div_1),reset(div), append($$anchor4,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor3,fragment_2)},$$slots:{popper:!0}}))},alternate_2=$$anchor2=>{var fragment_4=comment$2(),node_4=first_child(fragment_4);{var consequent_3=$$anchor3=>{Popper_layer($$anchor3,spread_props(()=>get$4(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get open(){return contentState.parentMenu.opts.open.current},onInteractOutside:handleInteractOutside, onEscapeKeydown:handleEscapeKeydown,get trapFocus(){return trapFocus()},get loop(){return loop2()},forceMount:!1,get id(){return id2()},get shouldRender(){return contentState.shouldRender},popper:($$anchor4,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars("dropdown-menu")},{style:$$props.style}));var fragment_6=comment$2(),node_5=first_child(fragment_6);{var consequent_2=$$anchor5=>{ var fragment_7=comment$2(),node_6=first_child(fragment_7);{let $0=user_derived(()=>({props:get$4(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_6,()=>$$props.child,()=>get$4($0))}append($$anchor5,fragment_7)},alternate_1=$$anchor5=>{var div_2=root_9$o();attribute_effect(div_2,()=>({...wrapperProps()}));var div_3=child(div_2);attribute_effect(div_3,()=>({...get$4(finalProps)}));var node_7=child(div_3);snippet(node_7,()=>$$props.children??noop$3),reset(div_3), reset(div_2),append($$anchor5,div_2)};if_block(node_5,$$render=>{$$props.child?$$render(consequent_2):$$render(alternate_1,!1)})}append($$anchor4,fragment_6)},$$slots:{popper:!0}}))};if_block(node_4,$$render=>{forceMount()||$$render(consequent_3)},!0)}append($$anchor2,fragment_4)};if_block(node2,$$render=>{forceMount()?$$render(consequent_1):$$render(alternate_2,!1)})}append($$anchor,fragment),pop()}var root_3$X=from_html("");function Menu_trigger($$anchor,$$props){const uid=props_id(); push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)),ref2=prop($$props,"ref",15,null),disabled=prop($$props,"disabled",3,!1),type2=prop($$props,"type",3,"button"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","child","children","disabled","type"]);const triggerState=DropdownMenuTriggerState.create({id:boxWith$1(()=>id2()),disabled:boxWith$1(()=>disabled()??!1),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,triggerState. props,{type:type2()}));Floating_layer_anchor($$anchor,{get id(){return id2()},get ref(){return triggerState.opts.ref},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);{var consequent=$$anchor3=>{var fragment_2=comment$2(),node_1=first_child(fragment_2);snippet(node_1,()=>$$props.child,()=>({props:get$4(mergedProps)})),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var button=root_3$X();attribute_effect(button,()=>({...get$4(mergedProps)}));var node_2=child( button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor3,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}const labelAttrs=createBitsAttrs({component:"label",parts:["root"]});class LabelRootState{static create(opts){return new LabelRootState(opts)}opts;attachment;constructor(opts){this.opts=opts,this.attachment=attachRef(this.opts.ref),this.onmousedown=this.onmousedown. bind(this)}onmousedown(e){e.detail>1&&e.preventDefault()}#props=user_derived(()=>({id:this.opts.id.current,[labelAttrs.root]:"",onmousedown:this.onmousedown,...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}var root_2$1f=from_html("");function Label$1($$anchor,$$props){const uid=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots", "$$events","$$legacy","children","child","id","ref","for"]);const rootState=LabelRootState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,rootState.props,{for:$$props.for}));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$4(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{ var label=root_2$1f();attribute_effect(label,()=>({...get$4(mergedProps),for:$$props.for}));var node_2=child(label);snippet(node_2,()=>$$props.children??noop$3),reset(label),append($$anchor2,label)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}class SvelteResizeObserver{#node;#onResize;constructor(node2,onResize){this.#node=node2,this.#onResize=onResize,this.handler=this.handler.bind(this),user_effect(this.handler)}handler(){ let rAF=0;const _node=this.#node();if(!_node)return;const resizeObserver=new ResizeObserver(()=>{cancelAnimationFrame(rAF),rAF=window.requestAnimationFrame(this.#onResize)});return resizeObserver.observe(_node),()=>{window.cancelAnimationFrame(rAF),resizeObserver.unobserve(_node)}}}class StateMachine{state;#machine;constructor(initialState,machine){this.state=simpleBox(initialState),this.#machine=machine,this.dispatch=this.dispatch.bind(this)}#reducer(event2){return this.#machine[this.state.current][event2]?? this.state.current}dispatch(event2){this.state.current=this.#reducer(event2)}}const animationNameCache=new WeakMap,ANIMATION_NAME_CACHE_TTL_MS=16,presenceMachine={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}};class Presence{opts;#prevAnimationNameState=state$1("none");get prevAnimationNameState(){return get$4(this.#prevAnimationNameState)}set prevAnimationNameState(value){set$1(this.#prevAnimationNameState, value,!0)}#styles=state$1(proxy({display:"",animationName:"none"}));get styles(){return get$4(this.#styles)}set styles(value){set$1(this.#styles,value,!0)}initialStatus;previousPresent;machine;present;constructor(opts){this.opts=opts,this.present=this.opts.open,this.initialStatus=opts.open.current?"mounted":"unmounted",this.previousPresent=new Previous(()=>this.present.current),this.machine=new StateMachine(this.initialStatus,presenceMachine),this.handleAnimationEnd=this.handleAnimationEnd.bind( this),this.handleAnimationStart=this.handleAnimationStart.bind(this),watchPresenceChange(this),watchStatusChange(this),watchRefChange(this)}handleAnimationEnd(event2){if(!this.opts.ref.current)return;const currAnimationName=this.styles.animationName||getAnimationName(this.opts.ref.current),isCurrentAnimation=currAnimationName.includes(event2.animationName)||currAnimationName==="none";event2.target===this.opts.ref.current&&isCurrentAnimation&&this.machine.dispatch("ANIMATION_END")}handleAnimationStart(event2){ if(this.opts.ref.current&&event2.target===this.opts.ref.current){const animationName=getAnimationName(this.opts.ref.current,!0);this.prevAnimationNameState=animationName,this.styles.animationName=animationName}}#isPresent=user_derived(()=>["mounted","unmountSuspended"].includes(this.machine.state.current));get isPresent(){return get$4(this.#isPresent)}set isPresent(value){set$1(this.#isPresent,value)}}function watchPresenceChange(state2){watch$1(()=>state2.present.current,()=>{if(!state2.opts.ref. current||!(state2.present.current!==state2.previousPresent.current))return;const prevAnimationName=state2.prevAnimationNameState,currAnimationName=getAnimationName(state2.opts.ref.current,!0);if(state2.styles.animationName=currAnimationName,state2.present.current)state2.machine.dispatch("MOUNT");else if(currAnimationName==="none"||state2.styles.display==="none")state2.machine.dispatch("UNMOUNT");else{const isAnimating=prevAnimationName!==currAnimationName;state2.previousPresent.current&&isAnimating? state2.machine.dispatch("ANIMATION_OUT"):state2.machine.dispatch("UNMOUNT")}})}function watchStatusChange(state2){watch$1(()=>state2.machine.state.current,()=>{if(!state2.opts.ref.current)return;const currAnimationName=state2.machine.state.current==="mounted"?getAnimationName(state2.opts.ref.current,!0):"none";state2.prevAnimationNameState=currAnimationName,state2.styles.animationName=currAnimationName})}function watchRefChange(state2){watch$1(()=>state2.opts.ref.current,()=>{if(!state2.opts.ref. current)return;const computed=getComputedStyle(state2.opts.ref.current);return state2.styles={display:computed.display,animationName:computed.animationName||"none"},executeCallbacks(on(state2.opts.ref.current,"animationstart",state2.handleAnimationStart),on(state2.opts.ref.current,"animationcancel",state2.handleAnimationEnd),on(state2.opts.ref.current,"animationend",state2.handleAnimationEnd))})}function getAnimationName(node2,forceRefresh=!1){if(!node2)return"none";const now2=performance.now(), cached2=animationNameCache.get(node2);if(!forceRefresh&&cached2&&now2-cached2.timestamp$$props.open),ref:$$props.ref});var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(), node_1=first_child(fragment_1);snippet(node_1,()=>$$props.presence??noop$3,()=>({present:presenceState.isPresent})),append($$anchor2,fragment_1)};if_block(node2,$$render=>{($$props.forceMount||$$props.open||presenceState.isPresent)&&$$render(consequent)})}append($$anchor,fragment),pop()}function Popover$1($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1);PopoverRootState. create({open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())}),Floating_layer($$anchor,{children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}function clamp(n,min2,max2){return Math.min(max2,Math.max(min2,n))}const scrollAreaAttrs=createBitsAttrs({component:"scroll-area",parts:["root","viewpo\ rt","corner","thumb","scrollbar"]}),ScrollAreaRootContext=new Context$1("ScrollArea.Root"),ScrollAreaScrollbarContext=new Context$1("ScrollArea.Scrollbar"),ScrollAreaScrollbarVisibleContext=new Context$1("ScrollArea.ScrollbarVisible"),ScrollAreaScrollbarAxisContext=new Context$1("ScrollArea.ScrollbarAxis"),ScrollAreaScrollbarSharedContext=new Context$1("ScrollArea.ScrollbarShared");class ScrollAreaRootState{static create(opts){return ScrollAreaRootContext.set(new ScrollAreaRootState(opts))}opts;attachment;#scrollAreaNode=state$1( null);get scrollAreaNode(){return get$4(this.#scrollAreaNode)}set scrollAreaNode(value){set$1(this.#scrollAreaNode,value,!0)}#viewportNode=state$1(null);get viewportNode(){return get$4(this.#viewportNode)}set viewportNode(value){set$1(this.#viewportNode,value,!0)}#contentNode=state$1(null);get contentNode(){return get$4(this.#contentNode)}set contentNode(value){set$1(this.#contentNode,value,!0)}#scrollbarXNode=state$1(null);get scrollbarXNode(){return get$4(this.#scrollbarXNode)}set scrollbarXNode(value){ set$1(this.#scrollbarXNode,value,!0)}#scrollbarYNode=state$1(null);get scrollbarYNode(){return get$4(this.#scrollbarYNode)}set scrollbarYNode(value){set$1(this.#scrollbarYNode,value,!0)}#cornerWidth=state$1(0);get cornerWidth(){return get$4(this.#cornerWidth)}set cornerWidth(value){set$1(this.#cornerWidth,value,!0)}#cornerHeight=state$1(0);get cornerHeight(){return get$4(this.#cornerHeight)}set cornerHeight(value){set$1(this.#cornerHeight,value,!0)}#scrollbarXEnabled=state$1(!1);get scrollbarXEnabled(){ return get$4(this.#scrollbarXEnabled)}set scrollbarXEnabled(value){set$1(this.#scrollbarXEnabled,value,!0)}#scrollbarYEnabled=state$1(!1);get scrollbarYEnabled(){return get$4(this.#scrollbarYEnabled)}set scrollbarYEnabled(value){set$1(this.#scrollbarYEnabled,value,!0)}domContext;constructor(opts){this.opts=opts,this.attachment=attachRef(opts.ref,v=>this.scrollAreaNode=v),this.domContext=new DOMContext(opts.ref)}#props=user_derived(()=>({id:this.opts.id.current,dir:this.opts.dir.current,style:{position:"\ relative","--bits-scroll-area-corner-height":`${this.cornerHeight}px`,"--bits-scroll-area-corner-width":`${this.cornerWidth}px`},[scrollAreaAttrs.root]:"",...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class ScrollAreaViewportState{static create(opts){return new ScrollAreaViewportState(opts,ScrollAreaRootContext.get())}opts;root;attachment;#contentId=simpleBox(useId());#contentRef=simpleBox(null);contentAttachment=attachRef(this.#contentRef, v=>this.root.contentNode=v);constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(opts.ref,v=>this.root.viewportNode=v)}#props=user_derived(()=>({id:this.opts.id.current,style:{overflowX:this.root.scrollbarXEnabled?"scroll":"hidden",overflowY:this.root.scrollbarYEnabled?"scroll":"hidden"},[scrollAreaAttrs.viewport]:"",...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}#contentProps=user_derived(()=>({id:this.#contentId. current,"data-scroll-area-content":"",style:{minWidth:this.root.scrollbarXEnabled?"fit-content":void 0},...this.contentAttachment}));get contentProps(){return get$4(this.#contentProps)}set contentProps(value){set$1(this.#contentProps,value)}}class ScrollAreaScrollbarState{static create(opts){return ScrollAreaScrollbarContext.set(new ScrollAreaScrollbarState(opts,ScrollAreaRootContext.get()))}opts;root;#isHorizontal=user_derived(()=>this.opts.orientation.current==="horizontal");get isHorizontal(){ return get$4(this.#isHorizontal)}set isHorizontal(value){set$1(this.#isHorizontal,value)}#hasThumb=state$1(!1);get hasThumb(){return get$4(this.#hasThumb)}set hasThumb(value){set$1(this.#hasThumb,value,!0)}constructor(opts,root2){this.opts=opts,this.root=root2,watch$1(()=>this.isHorizontal,isHorizontal=>isHorizontal?(this.root.scrollbarXEnabled=!0,()=>{this.root.scrollbarXEnabled=!1}):(this.root.scrollbarYEnabled=!0,()=>{this.root.scrollbarYEnabled=!1}))}}class ScrollAreaScrollbarHoverState{static create(){ return new ScrollAreaScrollbarHoverState(ScrollAreaScrollbarContext.get())}scrollbar;root;#isVisible=state$1(!1);get isVisible(){return get$4(this.#isVisible)}set isVisible(value){set$1(this.#isVisible,value,!0)}constructor(scrollbar){this.scrollbar=scrollbar,this.root=scrollbar.root,user_effect(()=>{const scrollAreaNode=this.root.scrollAreaNode,hideDelay=this.root.opts.scrollHideDelay.current;let hideTimer=0;if(!scrollAreaNode)return;const handlePointerEnter=()=>{this.root.domContext.clearTimeout( hideTimer),untrack$1(()=>this.isVisible=!0)},handlePointerLeave=()=>{hideTimer&&this.root.domContext.clearTimeout(hideTimer),hideTimer=this.root.domContext.setTimeout(()=>{untrack$1(()=>{this.scrollbar.hasThumb=!1,this.isVisible=!1})},hideDelay)},unsubListeners=executeCallbacks(on(scrollAreaNode,"pointerenter",handlePointerEnter),on(scrollAreaNode,"pointerleave",handlePointerLeave));return()=>{this.root.domContext.getWindow().clearTimeout(hideTimer),unsubListeners()}})}#props=user_derived(()=>({ "data-state":this.isVisible?"visible":"hidden"}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class ScrollAreaScrollbarScrollState{static create(){return new ScrollAreaScrollbarScrollState(ScrollAreaScrollbarContext.get())}scrollbar;root;machine=new StateMachine("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"\ interacting"}});#isHidden=user_derived(()=>this.machine.state.current==="hidden");get isHidden(){return get$4(this.#isHidden)}set isHidden(value){set$1(this.#isHidden,value)}constructor(scrollbar){this.scrollbar=scrollbar,this.root=scrollbar.root;const debounceScrollend=useDebounce(()=>this.machine.dispatch("SCROLL_END"),100);user_effect(()=>{const _state=this.machine.state.current,scrollHideDelay=this.root.opts.scrollHideDelay.current;if(_state==="idle"){const hideTimer=this.root.domContext.setTimeout( ()=>this.machine.dispatch("HIDE"),scrollHideDelay);return()=>this.root.domContext.clearTimeout(hideTimer)}}),user_effect(()=>{const viewportNode=this.root.viewportNode;if(!viewportNode)return;const scrollDirection=this.scrollbar.isHorizontal?"scrollLeft":"scrollTop";let prevScrollPos=viewportNode[scrollDirection];return on(viewportNode,"scroll",()=>{const scrollPos=viewportNode[scrollDirection];prevScrollPos!==scrollPos&&(this.machine.dispatch("SCROLL"),debounceScrollend()),prevScrollPos=scrollPos})}), this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}onpointerenter(_){this.machine.dispatch("POINTER_ENTER")}onpointerleave(_){this.machine.dispatch("POINTER_LEAVE")}#props=user_derived(()=>({"data-state":this.machine.state.current==="hidden"?"hidden":"visible",onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class ScrollAreaScrollbarAutoState{static create(){ return new ScrollAreaScrollbarAutoState(ScrollAreaScrollbarContext.get())}scrollbar;root;#isVisible=state$1(!1);get isVisible(){return get$4(this.#isVisible)}set isVisible(value){set$1(this.#isVisible,value,!0)}constructor(scrollbar){this.scrollbar=scrollbar,this.root=scrollbar.root;const handleResize=useDebounce(()=>{const viewportNode=this.root.viewportNode;if(!viewportNode)return;const isOverflowX=viewportNode.offsetWidththis.root.viewportNode,handleResize),new SvelteResizeObserver(()=>this.root.contentNode,handleResize)}#props=user_derived(()=>({"data-state":this.isVisible?"visible":"hidden"}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class ScrollAreaScrollbarVisibleState{static create(){return ScrollAreaScrollbarVisibleContext.set(new ScrollAreaScrollbarVisibleState( ScrollAreaScrollbarContext.get()))}scrollbar;root;#thumbNode=state$1(null);get thumbNode(){return get$4(this.#thumbNode)}set thumbNode(value){set$1(this.#thumbNode,value,!0)}#pointerOffset=state$1(0);get pointerOffset(){return get$4(this.#pointerOffset)}set pointerOffset(value){set$1(this.#pointerOffset,value,!0)}#sizes=state$1({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}});get sizes(){return get$4(this.#sizes)}set sizes(value){set$1(this.#sizes,value)}#thumbRatio=user_derived( ()=>getThumbRatio(this.sizes.viewport,this.sizes.content));get thumbRatio(){return get$4(this.#thumbRatio)}set thumbRatio(value){set$1(this.#thumbRatio,value)}#hasThumb=user_derived(()=>this.thumbRatio>0&&this.thumbRatio<1);get hasThumb(){return get$4(this.#hasThumb)}set hasThumb(value){set$1(this.#hasThumb,value)}#prevTransformStyle=state$1("");get prevTransformStyle(){return get$4(this.#prevTransformStyle)}set prevTransformStyle(value){set$1(this.#prevTransformStyle,value,!0)}constructor(scrollbar){ this.scrollbar=scrollbar,this.root=scrollbar.root,user_effect(()=>{this.scrollbar.hasThumb=this.hasThumb}),user_effect(()=>{!this.scrollbar.hasThumb&&this.thumbNode&&(this.prevTransformStyle=this.thumbNode.style.transform)})}setSizes(sizes){this.sizes=sizes}getScrollPosition(pointerPos,dir){return getScrollPositionFromPointer({pointerPos,pointerOffset:this.pointerOffset,sizes:this.sizes,dir})}onThumbPointerUp(){this.pointerOffset=0}onThumbPointerDown(pointerPos){this.pointerOffset=pointerPos}xOnThumbPositionChange(){ if(!(this.root.viewportNode&&this.thumbNode))return;const scrollPos=this.root.viewportNode.scrollLeft,transformStyle=`translate3d(${getThumbOffsetFromScroll({scrollPos,sizes:this.sizes,dir:this.root.opts.dir.current})}px, 0, 0)`;this.thumbNode.style.transform=transformStyle,this.prevTransformStyle=transformStyle}xOnWheelScroll(scrollPos){this.root.viewportNode&&(this.root.viewportNode.scrollLeft=scrollPos)}xOnDragScroll(pointerPos){this.root.viewportNode&&(this.root.viewportNode.scrollLeft=this. getScrollPosition(pointerPos,this.root.opts.dir.current))}yOnThumbPositionChange(){if(!(this.root.viewportNode&&this.thumbNode))return;const scrollPos=this.root.viewportNode.scrollTop,transformStyle=`translate3d(0, ${getThumbOffsetFromScroll({scrollPos,sizes:this.sizes})}px, 0)`;this.thumbNode.style.transform=transformStyle,this.prevTransformStyle=transformStyle}yOnWheelScroll(scrollPos){this.root.viewportNode&&(this.root.viewportNode.scrollTop=scrollPos)}yOnDragScroll(pointerPos){this.root.viewportNode&& (this.root.viewportNode.scrollTop=this.getScrollPosition(pointerPos,this.root.opts.dir.current))}}class ScrollAreaScrollbarXState{static create(opts){return ScrollAreaScrollbarAxisContext.set(new ScrollAreaScrollbarXState(opts,ScrollAreaScrollbarVisibleContext.get()))}opts;scrollbarVis;root;scrollbar;attachment;#computedStyle=state$1();get computedStyle(){return get$4(this.#computedStyle)}set computedStyle(value){set$1(this.#computedStyle,value,!0)}constructor(opts,scrollbarVis){this.opts=opts,this. scrollbarVis=scrollbarVis,this.root=scrollbarVis.root,this.scrollbar=scrollbarVis.scrollbar,this.attachment=attachRef(this.scrollbar.opts.ref,v=>this.root.scrollbarXNode=v),user_effect(()=>{this.scrollbar.opts.ref.current&&this.opts.mounted.current&&(this.computedStyle=getComputedStyle(this.scrollbar.opts.ref.current))}),user_effect(()=>{this.onResize()})}onThumbPointerDown=pointerPos=>{this.scrollbarVis.onThumbPointerDown(pointerPos.x)};onDragScroll=pointerPos=>{this.scrollbarVis.xOnDragScroll( pointerPos.x)};onThumbPointerUp=()=>{this.scrollbarVis.onThumbPointerUp()};onThumbPositionChange=()=>{this.scrollbarVis.xOnThumbPositionChange()};onWheelScroll=(e,maxScrollPos)=>{if(!this.root.viewportNode)return;const scrollPos=this.root.viewportNode.scrollLeft+e.deltaX;this.scrollbarVis.xOnWheelScroll(scrollPos),isScrollingWithinScrollbarBounds(scrollPos,maxScrollPos)&&e.preventDefault()};onResize=()=>{this.scrollbar.opts.ref.current&&this.root.viewportNode&&this.computedStyle&&this.scrollbarVis. setSizes({content:this.root.viewportNode.scrollWidth,viewport:this.root.viewportNode.offsetWidth,scrollbar:{size:this.scrollbar.opts.ref.current.clientWidth,paddingStart:toInt(this.computedStyle.paddingLeft),paddingEnd:toInt(this.computedStyle.paddingRight)}})};#thumbSize=user_derived(()=>getThumbSize(this.scrollbarVis.sizes));get thumbSize(){return get$4(this.#thumbSize)}set thumbSize(value){set$1(this.#thumbSize,value)}#props=user_derived(()=>({id:this.scrollbar.opts.id.current,"data-orientati\ on":"horizontal",style:{bottom:0,left:this.root.opts.dir.current==="rtl"?"var(--bits-scroll-area-corner-width)":0,right:this.root.opts.dir.current==="ltr"?"var(--bits-scroll-area-corner-width)":0,"--bits-scroll-area-thumb-width":`${this.thumbSize}px`},...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class ScrollAreaScrollbarYState{static create(opts){return ScrollAreaScrollbarAxisContext.set(new ScrollAreaScrollbarYState(opts,ScrollAreaScrollbarVisibleContext. get()))}opts;scrollbarVis;root;scrollbar;attachment;#computedStyle=state$1();get computedStyle(){return get$4(this.#computedStyle)}set computedStyle(value){set$1(this.#computedStyle,value,!0)}constructor(opts,scrollbarVis){this.opts=opts,this.scrollbarVis=scrollbarVis,this.root=scrollbarVis.root,this.scrollbar=scrollbarVis.scrollbar,this.attachment=attachRef(this.scrollbar.opts.ref,v=>this.root.scrollbarYNode=v),user_effect(()=>{this.scrollbar.opts.ref.current&&this.opts.mounted.current&&(this.computedStyle= getComputedStyle(this.scrollbar.opts.ref.current))}),user_effect(()=>{this.onResize()}),this.onThumbPointerDown=this.onThumbPointerDown.bind(this),this.onDragScroll=this.onDragScroll.bind(this),this.onThumbPointerUp=this.onThumbPointerUp.bind(this),this.onThumbPositionChange=this.onThumbPositionChange.bind(this),this.onWheelScroll=this.onWheelScroll.bind(this),this.onResize=this.onResize.bind(this)}onThumbPointerDown(pointerPos){this.scrollbarVis.onThumbPointerDown(pointerPos.y)}onDragScroll(pointerPos){ this.scrollbarVis.yOnDragScroll(pointerPos.y)}onThumbPointerUp(){this.scrollbarVis.onThumbPointerUp()}onThumbPositionChange(){this.scrollbarVis.yOnThumbPositionChange()}onWheelScroll(e,maxScrollPos){if(!this.root.viewportNode)return;const scrollPos=this.root.viewportNode.scrollTop+e.deltaY;this.scrollbarVis.yOnWheelScroll(scrollPos),isScrollingWithinScrollbarBounds(scrollPos,maxScrollPos)&&e.preventDefault()}onResize(){this.scrollbar.opts.ref.current&&this.root.viewportNode&&this.computedStyle&& this.scrollbarVis.setSizes({content:this.root.viewportNode.scrollHeight,viewport:this.root.viewportNode.offsetHeight,scrollbar:{size:this.scrollbar.opts.ref.current.clientHeight,paddingStart:toInt(this.computedStyle.paddingTop),paddingEnd:toInt(this.computedStyle.paddingBottom)}})}#thumbSize=user_derived(()=>getThumbSize(this.scrollbarVis.sizes));get thumbSize(){return get$4(this.#thumbSize)}set thumbSize(value){set$1(this.#thumbSize,value)}#props=user_derived(()=>({id:this.scrollbar.opts.id.current, "data-orientation":"vertical",style:{top:0,right:this.root.opts.dir.current==="ltr"?0:void 0,left:this.root.opts.dir.current==="rtl"?0:void 0,bottom:"var(--bits-scroll-area-corner-height)","--bits-scroll-area-thumb-height":`${this.thumbSize}px`},...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class ScrollAreaScrollbarSharedState{static create(){return ScrollAreaScrollbarSharedContext.set(new ScrollAreaScrollbarSharedState(ScrollAreaScrollbarAxisContext. get()))}scrollbarState;root;scrollbarVis;scrollbar;#rect=state$1(null);get rect(){return get$4(this.#rect)}set rect(value){set$1(this.#rect,value)}#prevWebkitUserSelect=state$1("");get prevWebkitUserSelect(){return get$4(this.#prevWebkitUserSelect)}set prevWebkitUserSelect(value){set$1(this.#prevWebkitUserSelect,value,!0)}handleResize;handleThumbPositionChange;handleWheelScroll;handleThumbPointerDown;handleThumbPointerUp;#maxScrollPos=user_derived(()=>this.scrollbarVis.sizes.content-this.scrollbarVis. sizes.viewport);get maxScrollPos(){return get$4(this.#maxScrollPos)}set maxScrollPos(value){set$1(this.#maxScrollPos,value)}constructor(scrollbarState){this.scrollbarState=scrollbarState,this.root=scrollbarState.root,this.scrollbarVis=scrollbarState.scrollbarVis,this.scrollbar=scrollbarState.scrollbarVis.scrollbar,this.handleResize=useDebounce(()=>this.scrollbarState.onResize(),10),this.handleThumbPositionChange=this.scrollbarState.onThumbPositionChange,this.handleWheelScroll=this.scrollbarState. onWheelScroll,this.handleThumbPointerDown=this.scrollbarState.onThumbPointerDown,this.handleThumbPointerUp=this.scrollbarState.onThumbPointerUp,user_effect(()=>{const maxScrollPos=this.maxScrollPos,scrollbarNode=this.scrollbar.opts.ref.current;this.root.viewportNode;const handleWheel=e=>{const node2=e.target;scrollbarNode?.contains(node2)&&this.handleWheelScroll(e,maxScrollPos)};return on(this.root.domContext.getDocument(),"wheel",handleWheel,{passive:!1})}),user_pre_effect(()=>{this.scrollbarVis. sizes,untrack$1(()=>this.handleThumbPositionChange())}),new SvelteResizeObserver(()=>this.scrollbar.opts.ref.current,this.handleResize),new SvelteResizeObserver(()=>this.root.contentNode,this.handleResize),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onlostpointercapture=this.onlostpointercapture.bind(this)}handleDragScroll(e){if(!this.rect)return;const x=e.clientX-this.rect.left,y=e.clientY-this. rect.top;this.scrollbarState.onDragScroll({x,y})}#cleanupPointerState(){this.rect!==null&&(this.root.domContext.getDocument().body.style.webkitUserSelect=this.prevWebkitUserSelect,this.root.viewportNode&&(this.root.viewportNode.style.scrollBehavior=""),this.rect=null)}onpointerdown(e){if(e.button!==0)return;e.target.setPointerCapture(e.pointerId),this.rect=this.scrollbar.opts.ref.current?.getBoundingClientRect()??null,this.prevWebkitUserSelect=this.root.domContext.getDocument().body.style.webkitUserSelect, this.root.domContext.getDocument().body.style.webkitUserSelect="none",this.root.viewportNode&&(this.root.viewportNode.style.scrollBehavior="auto"),this.handleDragScroll(e)}onpointermove(e){this.handleDragScroll(e)}onpointerup(e){const target2=e.target;target2.hasPointerCapture(e.pointerId)&&target2.releasePointerCapture(e.pointerId),this.#cleanupPointerState()}onlostpointercapture(_){this.#cleanupPointerState()}#props=user_derived(()=>mergeProps({...this.scrollbarState.props,style:{position:"abs\ olute",...this.scrollbarState.props.style},[scrollAreaAttrs.scrollbar]:"",onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerup:this.onpointerup,onlostpointercapture:this.onlostpointercapture}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class ScrollAreaThumbImplState{static create(opts){return new ScrollAreaThumbImplState(opts,ScrollAreaScrollbarSharedContext.get())}opts;scrollbarState;attachment;#root;#removeUnlinkedScrollListener=state$1();#debounceScrollEnd=useDebounce( ()=>{get$4(this.#removeUnlinkedScrollListener)&&(get$4(this.#removeUnlinkedScrollListener)(),set$1(this.#removeUnlinkedScrollListener,void 0))},100);constructor(opts,scrollbarState){this.opts=opts,this.scrollbarState=scrollbarState,this.#root=scrollbarState.root,this.attachment=attachRef(this.opts.ref,v=>this.scrollbarState.scrollbarVis.thumbNode=v),user_effect(()=>{const viewportNode=this.#root.viewportNode;if(!viewportNode)return;const handleScroll=()=>{if(this.#debounceScrollEnd(),!get$4(this.#removeUnlinkedScrollListener)){ const listener=addUnlinkedScrollListener(viewportNode,this.scrollbarState.handleThumbPositionChange);set$1(this.#removeUnlinkedScrollListener,listener,!0),this.scrollbarState.handleThumbPositionChange()}};return untrack$1(()=>this.scrollbarState.handleThumbPositionChange()),on(viewportNode,"scroll",handleScroll)}),this.onpointerdowncapture=this.onpointerdowncapture.bind(this),this.onpointerup=this.onpointerup.bind(this)}onpointerdowncapture(e){const thumb=e.target;if(!thumb)return;const thumbRect=thumb. getBoundingClientRect(),x=e.clientX-thumbRect.left,y=e.clientY-thumbRect.top;this.scrollbarState.handleThumbPointerDown({x,y})}onpointerup(_){this.scrollbarState.handleThumbPointerUp()}#props=user_derived(()=>({id:this.opts.id.current,"data-state":this.scrollbarState.scrollbarVis.hasThumb?"visible":"hidden",style:{width:"var(--bits-scroll-area-thumb-width)",height:"var(--bits-scroll-area-thumb-height)",transform:this.scrollbarState.scrollbarVis.prevTransformStyle},onpointerdowncapture:this.onpointerdowncapture, onpointerup:this.onpointerup,[scrollAreaAttrs.thumb]:"",...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class ScrollAreaCornerImplState{static create(opts){return new ScrollAreaCornerImplState(opts,ScrollAreaRootContext.get())}opts;root;attachment;#width=state$1(0);#height=state$1(0);#hasSize=user_derived(()=>!!(get$4(this.#width)&&get$4(this.#height)));get hasSize(){return get$4(this.#hasSize)}set hasSize(value){set$1(this.#hasSize,value)}constructor(opts,root2){ this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref),new SvelteResizeObserver(()=>this.root.scrollbarXNode,()=>{const height=this.root.scrollbarXNode?.offsetHeight||0;this.root.cornerHeight=height,set$1(this.#height,height,!0)}),new SvelteResizeObserver(()=>this.root.scrollbarYNode,()=>{const width=this.root.scrollbarYNode?.offsetWidth||0;this.root.cornerWidth=width,set$1(this.#width,width,!0)})}#props=user_derived(()=>({id:this.opts.id.current,style:{width:get$4(this.#width), height:get$4(this.#height),position:"absolute",right:this.root.opts.dir.current==="ltr"?0:void 0,left:this.root.opts.dir.current==="rtl"?0:void 0,bottom:0},[scrollAreaAttrs.corner]:"",...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}function toInt(value){return value?Number.parseInt(value,10):0}function getThumbRatio(viewportSize,contentSize){const ratio=viewportSize/contentSize;return Number.isNaN(ratio)?0:ratio}function getThumbSize(sizes){ const ratio=getThumbRatio(sizes.viewport,sizes.content),scrollbarPadding=sizes.scrollbar.paddingStart+sizes.scrollbar.paddingEnd,thumbSize=(sizes.scrollbar.size-scrollbarPadding)*ratio;return Math.max(thumbSize,18)}function getScrollPositionFromPointer({pointerPos,pointerOffset,sizes,dir="ltr"}){const thumbSizePx=getThumbSize(sizes),thumbCenter=thumbSizePx/2,offset2=pointerOffset||thumbCenter,thumbOffsetFromEnd=thumbSizePx-offset2,minPointerPos=sizes.scrollbar.paddingStart+offset2,maxPointerPos=sizes. scrollbar.size-sizes.scrollbar.paddingEnd-thumbOffsetFromEnd,maxScrollPos=sizes.content-sizes.viewport,scrollRange=dir==="ltr"?[0,maxScrollPos]:[maxScrollPos*-1,0];return linearScale([minPointerPos,maxPointerPos],scrollRange)(pointerPos)}function getThumbOffsetFromScroll({scrollPos,sizes,dir="ltr"}){const thumbSizePx=getThumbSize(sizes),scrollbarPadding=sizes.scrollbar.paddingStart+sizes.scrollbar.paddingEnd,scrollbar=sizes.scrollbar.size-scrollbarPadding,maxScrollPos=sizes.content-sizes.viewport, maxThumbPos=scrollbar-thumbSizePx,scrollClampRange=dir==="ltr"?[0,maxScrollPos]:[maxScrollPos*-1,0],scrollWithoutMomentum=clamp(scrollPos,scrollClampRange[0],scrollClampRange[1]);return linearScale([0,maxScrollPos],[0,maxThumbPos])(scrollWithoutMomentum)}function linearScale(input,output){return value=>{if(input[0]===input[1]||output[0]===output[1])return output[0];const ratio=(output[1]-output[0])/(input[1]-input[0]);return output[0]+ratio*(value-input[0])}}function isScrollingWithinScrollbarBounds(scrollPos,maxScrollPos){ return scrollPos>0&&scrollPoswin.cancelAnimationFrame( rAF)}var root_2$1e=from_html("
");function Scroll_area$1($$anchor,$$props){const uid=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid)),type2=prop($$props,"type",3,"hover"),dir=prop($$props,"dir",3,"ltr"),scrollHideDelay=prop($$props,"scrollHideDelay",3,600),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","id","type","dir","scrollHideDelay","children","child"]);const rootState=ScrollAreaRootState.create( {type:boxWith$1(()=>type2()),dir:boxWith$1(()=>dir()),scrollHideDelay:boxWith$1(()=>scrollHideDelay()),id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,rootState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$4(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1e(); attribute_effect(div,()=>({...get$4(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}var root$1J=from_html("
");function Scroll_area_viewport($$anchor,$$props){const uid=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid)),restProps=rest_props( $$props,["$$slots","$$events","$$legacy","ref","id","children"]);const viewportState=ScrollAreaViewportState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,viewportState.props)),mergedContentProps=user_derived(()=>mergeProps({},viewportState.contentProps));var div=root$1J();attribute_effect(div,()=>({...get$4(mergedProps)}));var div_1=child(div);attribute_effect(div_1,()=>({...get$4(mergedContentProps)}));var node2=child(div_1); snippet(node2,()=>$$props.children??noop$3),reset(div_1),reset(div),append($$anchor,div),pop()}var root_2$1d=from_html("
");function Scroll_area_scrollbar_shared($$anchor,$$props){push$1($$props,!0);let restProps=rest_props($$props,["$$slots","$$events","$$legacy","child","children"]);const scrollbarSharedState=ScrollAreaScrollbarSharedState.create(),mergedProps=user_derived(()=>mergeProps(restProps,scrollbarSharedState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{ var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$4(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1d();attribute_effect(div,()=>({...get$4(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}function Scroll_area_scrollbar_x($$anchor,$$props){ push$1($$props,!0);let restProps=rest_props($$props,["$$slots","$$events","$$legacy"]);const isMounted=new IsMounted,scrollbarXState=ScrollAreaScrollbarXState.create({mounted:boxWith$1(()=>isMounted.current)}),mergedProps=user_derived(()=>mergeProps(restProps,scrollbarXState.props));Scroll_area_scrollbar_shared($$anchor,spread_props(()=>get$4(mergedProps))),pop()}function Scroll_area_scrollbar_y($$anchor,$$props){push$1($$props,!0);let restProps=rest_props($$props,["$$slots","$$events","$$legacy"]); const isMounted=new IsMounted,scrollbarYState=ScrollAreaScrollbarYState.create({mounted:boxWith$1(()=>isMounted.current)}),mergedProps=user_derived(()=>mergeProps(restProps,scrollbarYState.props));Scroll_area_scrollbar_shared($$anchor,spread_props(()=>get$4(mergedProps))),pop()}function Scroll_area_scrollbar_visible($$anchor,$$props){push$1($$props,!0);let restProps=rest_props($$props,["$$slots","$$events","$$legacy"]);const scrollbarVisibleState=ScrollAreaScrollbarVisibleState.create();var fragment=comment$2(), node2=first_child(fragment);{var consequent=$$anchor2=>{Scroll_area_scrollbar_x($$anchor2,spread_props(()=>restProps))},alternate=$$anchor2=>{Scroll_area_scrollbar_y($$anchor2,spread_props(()=>restProps))};if_block(node2,$$render=>{scrollbarVisibleState.scrollbar.opts.orientation.current==="horizontal"?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}function Scroll_area_scrollbar_auto($$anchor,$$props){push$1($$props,!0);let forceMount=prop($$props,"forceMount",3,!1), restProps=rest_props($$props,["$$slots","$$events","$$legacy","forceMount"]);const scrollbarAutoState=ScrollAreaScrollbarAutoState.create(),mergedProps=user_derived(()=>mergeProps(restProps,scrollbarAutoState.props));{const presence=$$anchor2=>{Scroll_area_scrollbar_visible($$anchor2,spread_props(()=>get$4(mergedProps)))};let $0=user_derived(()=>forceMount()||scrollbarAutoState.isVisible);Presence_layer($$anchor,{get open(){return get$4($0)},get ref(){return scrollbarAutoState.scrollbar.opts.ref}, presence,$$slots:{presence:!0}})}pop()}function Scroll_area_scrollbar_scroll($$anchor,$$props){push$1($$props,!0);let forceMount=prop($$props,"forceMount",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","forceMount"]);const scrollbarScrollState=ScrollAreaScrollbarScrollState.create(),mergedProps=user_derived(()=>mergeProps(restProps,scrollbarScrollState.props));{const presence=$$anchor2=>{Scroll_area_scrollbar_visible($$anchor2,spread_props(()=>get$4(mergedProps)))};let $0=user_derived( ()=>forceMount()||!scrollbarScrollState.isHidden);Presence_layer($$anchor,spread_props(()=>get$4(mergedProps),{get open(){return get$4($0)},get ref(){return scrollbarScrollState.scrollbar.opts.ref},presence,$$slots:{presence:!0}}))}pop()}function Scroll_area_scrollbar_hover($$anchor,$$props){push$1($$props,!0);let forceMount=prop($$props,"forceMount",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","forceMount"]);const scrollbarHoverState=ScrollAreaScrollbarHoverState.create(), scrollbarAutoState=ScrollAreaScrollbarAutoState.create(),mergedProps=user_derived(()=>mergeProps(restProps,scrollbarHoverState.props,scrollbarAutoState.props,{"data-state":scrollbarHoverState.isVisible?"visible":"hidden"})),open2=user_derived(()=>forceMount()||scrollbarHoverState.isVisible&&scrollbarAutoState.isVisible);Presence_layer($$anchor,{get open(){return get$4(open2)},get ref(){return scrollbarAutoState.scrollbar.opts.ref},presence:$$anchor2=>{Scroll_area_scrollbar_visible($$anchor2,spread_props( ()=>get$4(mergedProps)))},$$slots:{presence:!0}}),pop()}function Scroll_area_scrollbar$1($$anchor,$$props){const uid=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid)),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","id","orientation"]);const scrollbarState=ScrollAreaScrollbarState.create({orientation:boxWith$1(()=>$$props.orientation),id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),type2=user_derived( ()=>scrollbarState.root.opts.type.current);var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{Scroll_area_scrollbar_hover($$anchor2,spread_props(()=>restProps,{get id(){return id2()}}))},alternate_2=$$anchor2=>{var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent_1=$$anchor3=>{Scroll_area_scrollbar_scroll($$anchor3,spread_props(()=>restProps,{get id(){return id2()}}))},alternate_1=$$anchor3=>{var fragment_4=comment$2(),node_2=first_child(fragment_4); {var consequent_2=$$anchor4=>{Scroll_area_scrollbar_auto($$anchor4,spread_props(()=>restProps,{get id(){return id2()}}))},alternate=$$anchor4=>{var fragment_6=comment$2(),node_3=first_child(fragment_6);{var consequent_3=$$anchor5=>{Scroll_area_scrollbar_visible($$anchor5,spread_props(()=>restProps,{get id(){return id2()}}))};if_block(node_3,$$render=>{get$4(type2)==="always"&&$$render(consequent_3)},!0)}append($$anchor4,fragment_6)};if_block(node_2,$$render=>{get$4(type2)==="auto"?$$render(consequent_2): $$render(alternate,!1)},!0)}append($$anchor3,fragment_4)};if_block(node_1,$$render=>{get$4(type2)==="scroll"?$$render(consequent_1):$$render(alternate_1,!1)},!0)}append($$anchor2,fragment_2)};if_block(node2,$$render=>{get$4(type2)==="hover"?$$render(consequent):$$render(alternate_2,!1)})}append($$anchor,fragment),pop()}var root_2$1c=from_html("
");function Scroll_area_thumb_impl($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["\ $$slots","$$events","$$legacy","ref","id","child","children","present"]);const isMounted=new IsMounted,thumbState=ScrollAreaThumbImplState.create({id:boxWith$1(()=>$$props.id),ref:boxWith$1(()=>ref2(),v=>ref2(v)),mounted:boxWith$1(()=>isMounted.current)}),mergedProps=user_derived(()=>mergeProps(restProps,thumbState.props,{style:{hidden:!$$props.present}}));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet( node_1,()=>$$props.child,()=>({props:get$4(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1c();attribute_effect(div,()=>({...get$4(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}function Scroll_area_thumb($$anchor,$$props){const uid=props_id();push$1($$props,!0);let id2=prop( $$props,"id",19,()=>createId(uid)),ref2=prop($$props,"ref",15,null),forceMount=prop($$props,"forceMount",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","forceMount"]);const scrollbarState=ScrollAreaScrollbarVisibleContext.get();{const presence=($$anchor2,$$arg0)=>{let present=()=>$$arg0?.().present;Scroll_area_thumb_impl($$anchor2,spread_props(()=>restProps,{get id(){return id2()},get present(){return present()},get ref(){return ref2()},set ref($$value){ref2($$value)}}))}; let $0=user_derived(()=>forceMount()||scrollbarState.hasThumb);Presence_layer($$anchor,{get open(){return get$4($0)},get ref(){return scrollbarState.scrollbar.opts.ref},presence,$$slots:{presence:!0}})}pop()}var root_2$1b=from_html("
");function Scroll_area_corner_impl($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","id","children","child"]);const cornerState=ScrollAreaCornerImplState.create( {id:boxWith$1(()=>$$props.id),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,cornerState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$4(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1b();attribute_effect(div,()=>({...get$4(mergedProps)}));var node_2=child(div);snippet(node_2, ()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}function Scroll_area_corner($$anchor,$$props){const uid=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid)),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","id"]);const scrollAreaState=ScrollAreaRootContext.get(),hasBothScrollbarsVisible=user_derived( ()=>!!(scrollAreaState.scrollbarXNode&&scrollAreaState.scrollbarYNode)),hasCorner=user_derived(()=>scrollAreaState.opts.type.current!=="scroll"&&get$4(hasBothScrollbarsVisible));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{Scroll_area_corner_impl($$anchor2,spread_props(()=>restProps,{get id(){return id2()},get ref(){return ref2()},set ref($$value){ref2($$value)}}))};if_block(node2,$$render=>{get$4(hasCorner)&&$$render(consequent)})}append($$anchor,fragment),pop()} var root$1I=from_html(" ",1);function Select($$anchor,$$props){push$1($$props,!0);let value=prop($$props,"value",15),onValueChange=prop($$props,"onValueChange",3,noop$1),name=prop($$props,"name",3,""),disabled=prop($$props,"disabled",3,!1),open2=prop($$props,"open",15,!1),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1),loop2=prop($$props,"loop",3,!1),scrollAlignment=prop($$props,"scrollAlignment",3,"nearest"),required2=prop( $$props,"required",3,!1),items2=prop($$props,"items",19,()=>[]),allowDeselect=prop($$props,"allowDeselect",3,!1);function handleDefaultValue(){value()===void 0&&value($$props.type==="single"?"":[])}handleDefaultValue(),watch$1.pre(()=>value(),()=>{handleDefaultValue()});let inputValue=state$1("");const rootState=SelectRootState.create({type:$$props.type,value:boxWith$1(()=>value(),v=>{value(v),onValueChange()(v)}),disabled:boxWith$1(()=>disabled()),required:boxWith$1(()=>required2()),open:boxWith$1( ()=>open2(),v=>{open2(v),onOpenChange()(v)}),loop:boxWith$1(()=>loop2()),scrollAlignment:boxWith$1(()=>scrollAlignment()),name:boxWith$1(()=>name()),isCombobox:!1,items:boxWith$1(()=>items2()),allowDeselect:boxWith$1(()=>allowDeselect()),inputValue:boxWith$1(()=>get$4(inputValue),v=>set$1(inputValue,v,!0)),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())});var fragment=root$1I(),node2=first_child(fragment);Floating_layer(node2,{children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(), node_1=first_child(fragment_1);snippet(node_1,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}});var node_2=sibling(node2,2);{var consequent_1=$$anchor2=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);{var consequent=$$anchor3=>{Select_hidden_input($$anchor3,{get autocomplete(){return $$props.autocomplete}})},alternate=$$anchor3=>{var fragment_4=comment$2(),node_4=first_child(fragment_4);each(node_4,16,()=>rootState.opts.value.current,item=>item,($$anchor4,item)=>{ Select_hidden_input($$anchor4,{get value(){return item},get autocomplete(){return $$props.autocomplete}})}),append($$anchor3,fragment_4)};if_block(node_3,$$render=>{rootState.opts.value.current.length===0?$$render(consequent):$$render(alternate,!1)})}append($$anchor2,fragment_2)},alternate_1=$$anchor2=>{Select_hidden_input($$anchor2,{get autocomplete(){return $$props.autocomplete},get value(){return rootState.opts.value.current},set value($$value){rootState.opts.value.current=$$value}})};if_block( node_2,$$render=>{Array.isArray(rootState.opts.value.current)?$$render(consequent_1):$$render(alternate_1,!1)})}append($$anchor,fragment),pop()}var root_3$W=from_html("");function Select_trigger$1($$anchor,$$props){const uid=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)),ref2=prop($$props,"ref",15,null),type2=prop($$props,"type",3,"button"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","child","children","type"]);const triggerState=SelectTriggerState. create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,triggerState.props,{type:type2()}));var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Floating_layer_anchor,($$anchor2,FloatingLayer_Anchor)=>{FloatingLayer_Anchor($$anchor2,{get id(){return id2()},get ref(){return triggerState.opts.ref},children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{var consequent=$$anchor4=>{ var fragment_2=comment$2(),node_2=first_child(fragment_2);snippet(node_2,()=>$$props.child,()=>({props:get$4(mergedProps)})),append($$anchor4,fragment_2)},alternate=$$anchor4=>{var button=root_3$W();attribute_effect(button,()=>({...get$4(mergedProps)}));var node_3=child(button);snippet(node_3,()=>$$props.children??noop$3),reset(button),append($$anchor4,button)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor3,fragment_1)},$$slots:{default:!0}})}), append($$anchor,fragment),pop()}const switchAttrs=createBitsAttrs({component:"switch",parts:["root","thumb"]}),SwitchRootContext=new Context$1("Switch.Root");class SwitchRootState{static create(opts){return SwitchRootContext.set(new SwitchRootState(opts))}opts;attachment;constructor(opts){this.opts=opts,this.attachment=attachRef(opts.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this)}#toggle(){this.opts.checked.current=!this.opts.checked.current}onkeydown(e){!(e.key=== ENTER||e.key===SPACE)||this.opts.disabled.current||(e.preventDefault(),this.#toggle())}onclick(_){this.opts.disabled.current||this.#toggle()}#sharedProps=user_derived(()=>({"data-disabled":boolToEmptyStrOrUndef(this.opts.disabled.current),"data-state":getDataChecked(this.opts.checked.current),"data-required":boolToEmptyStrOrUndef(this.opts.required.current)}));get sharedProps(){return get$4(this.#sharedProps)}set sharedProps(value){set$1(this.#sharedProps,value)}#snippetProps=user_derived(()=>({ checked:this.opts.checked.current}));get snippetProps(){return get$4(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({...this.sharedProps,id:this.opts.id.current,role:"switch",disabled:boolToTrueOrUndef(this.opts.disabled.current),"aria-checked":getAriaChecked(this.opts.checked.current,!1),"aria-required":boolToStr(this.opts.required.current),[switchAttrs.root]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){ return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class SwitchInputState{static create(){return new SwitchInputState(SwitchRootContext.get())}root;#shouldRender=user_derived(()=>this.root.opts.name.current!==void 0);get shouldRender(){return get$4(this.#shouldRender)}set shouldRender(value){set$1(this.#shouldRender,value)}constructor(root2){this.root=root2}#props=user_derived(()=>({type:"checkbox",name:this.root.opts.name.current,value:this.root.opts.value.current,checked:this. root.opts.checked.current,disabled:this.root.opts.disabled.current,required:this.root.opts.required.current}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class SwitchThumbState{static create(opts){return new SwitchThumbState(opts,SwitchRootContext.get())}opts;root;attachment;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(opts.ref)}#snippetProps=user_derived(()=>({checked:this.root.opts.checked.current}));get snippetProps(){return get$4( this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({...this.root.sharedProps,id:this.opts.id.current,[switchAttrs.thumb]:"",...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}function Switch_input($$anchor,$$props){push$1($$props,!1);const inputState=SwitchInputState.create();init();var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{Hidden_input($$anchor2,spread_props( ()=>inputState.props))};if_block(node2,$$render=>{inputState.shouldRender&&$$render(consequent)})}append($$anchor,fragment),pop()}var root_2$1a=from_html(""),root$1H=from_html(" ",1);function Switch$1($$anchor,$$props){const uid=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid)),disabled=prop($$props,"disabled",3,!1),required2=prop($$props,"required",3,!1),checked=prop($$props,"checked",15,!1),value=prop($$props, "value",3,"on"),name=prop($$props,"name",3,void 0),type2=prop($$props,"type",3,"button"),onCheckedChange=prop($$props,"onCheckedChange",3,noop$1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","required","checked","value","name","type","onCheckedChange"]);const rootState=SwitchRootState.create({checked:boxWith$1(()=>checked(),v=>{checked(v),onCheckedChange()?.(v)}),disabled:boxWith$1(()=>disabled()??!1),required:boxWith$1(()=>required2()),value:boxWith$1( ()=>value()),name:boxWith$1(()=>name()),id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,rootState.props,{type:type2()}));var fragment=root$1H(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>({props:get$4(mergedProps),...rootState.snippetProps}));snippet(node_1,()=>$$props.child,()=>get$4($0))}append($$anchor2,fragment_1)},alternate=$$anchor2=>{ var button=root_2$1a();attribute_effect(button,()=>({...get$4(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3,()=>rootState.snippetProps),reset(button),append($$anchor2,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}var node_3=sibling(node2,2);Switch_input(node_3,{}),append($$anchor,fragment),pop()}var root_2$19=from_html("");function Switch_thumb($$anchor,$$props){const uid=props_id();push$1($$props, !0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid)),restProps=rest_props($$props,["$$slots","$$events","$$legacy","child","children","ref","id"]);const thumbState=SwitchThumbState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,thumbState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived( ()=>({props:get$4(mergedProps),...thumbState.snippetProps}));snippet(node_1,()=>$$props.child,()=>get$4($0))}append($$anchor2,fragment_1)},alternate=$$anchor2=>{var span=root_2$19();attribute_effect(span,()=>({...get$4(mergedProps)}));var node_2=child(span);snippet(node_2,()=>$$props.children??noop$3,()=>thumbState.snippetProps),reset(span),append($$anchor2,span)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}class TimeoutFn{#interval;#cb;#timer=null;constructor(cb,interval){ this.#cb=cb,this.#interval=interval,this.stop=this.stop.bind(this),this.start=this.start.bind(this),onDestroyEffect(this.stop)}#clear(){this.#timer!==null&&(window.clearTimeout(this.#timer),this.#timer=null)}stop(){this.#clear()}start(...args){this.#clear(),this.#timer=window.setTimeout(()=>{this.#timer=null,this.#cb(...args)},this.#interval)}}const tooltipAttrs=createBitsAttrs({component:"tooltip",parts:["content","trigger"]}),TooltipProviderContext=new Context$1("Tooltip.Provider"),TooltipRootContext=new Context$1( "Tooltip.Root");class TooltipProviderState{static create(opts){return TooltipProviderContext.set(new TooltipProviderState(opts))}opts;#isOpenDelayed=state$1(!0);get isOpenDelayed(){return get$4(this.#isOpenDelayed)}set isOpenDelayed(value){set$1(this.#isOpenDelayed,value,!0)}isPointerInTransit=simpleBox(!1);#timerFn;#openTooltip=state$1(null);constructor(opts){this.opts=opts,this.#timerFn=new TimeoutFn(()=>{this.isOpenDelayed=!0},this.opts.skipDelayDuration.current)}#startTimer=()=>{this.opts.skipDelayDuration. current!==0&&this.#timerFn.start()};#clearTimer=()=>{this.#timerFn.stop()};onOpen=tooltip=>{get$4(this.#openTooltip)&&get$4(this.#openTooltip)!==tooltip&&get$4(this.#openTooltip).handleClose(),this.#clearTimer(),this.isOpenDelayed=!1,set$1(this.#openTooltip,tooltip,!0)};onClose=tooltip=>{get$4(this.#openTooltip)===tooltip&&set$1(this.#openTooltip,null),this.#startTimer()};isTooltipOpen=tooltip=>get$4(this.#openTooltip)===tooltip}class TooltipRootState{static create(opts){return TooltipRootContext. set(new TooltipRootState(opts,TooltipProviderContext.get()))}opts;provider;#delayDuration=user_derived(()=>this.opts.delayDuration.current??this.provider.opts.delayDuration.current);get delayDuration(){return get$4(this.#delayDuration)}set delayDuration(value){set$1(this.#delayDuration,value)}#disableHoverableContent=user_derived(()=>this.opts.disableHoverableContent.current??this.provider.opts.disableHoverableContent.current);get disableHoverableContent(){return get$4(this.#disableHoverableContent)}set disableHoverableContent(value){ set$1(this.#disableHoverableContent,value)}#disableCloseOnTriggerClick=user_derived(()=>this.opts.disableCloseOnTriggerClick.current??this.provider.opts.disableCloseOnTriggerClick.current);get disableCloseOnTriggerClick(){return get$4(this.#disableCloseOnTriggerClick)}set disableCloseOnTriggerClick(value){set$1(this.#disableCloseOnTriggerClick,value)}#disabled=user_derived(()=>this.opts.disabled.current??this.provider.opts.disabled.current);get disabled(){return get$4(this.#disabled)}set disabled(value){ set$1(this.#disabled,value)}#ignoreNonKeyboardFocus=user_derived(()=>this.opts.ignoreNonKeyboardFocus.current??this.provider.opts.ignoreNonKeyboardFocus.current);get ignoreNonKeyboardFocus(){return get$4(this.#ignoreNonKeyboardFocus)}set ignoreNonKeyboardFocus(value){set$1(this.#ignoreNonKeyboardFocus,value)}#contentNode=state$1(null);get contentNode(){return get$4(this.#contentNode)}set contentNode(value){set$1(this.#contentNode,value,!0)}contentPresence;#triggerNode=state$1(null);get triggerNode(){ return get$4(this.#triggerNode)}set triggerNode(value){set$1(this.#triggerNode,value,!0)}#wasOpenDelayed=state$1(!1);#timerFn;#stateAttr=user_derived(()=>this.opts.open.current?get$4(this.#wasOpenDelayed)?"delayed-open":"instant-open":"closed");get stateAttr(){return get$4(this.#stateAttr)}set stateAttr(value){set$1(this.#stateAttr,value)}constructor(opts,provider){this.opts=opts,this.provider=provider,this.#timerFn=new TimeoutFn(()=>{set$1(this.#wasOpenDelayed,!0),this.opts.open.current=!0},this. delayDuration??0),this.contentPresence=new PresenceManager({open:this.opts.open,ref:boxWith$1(()=>this.contentNode),onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),watch$1(()=>this.delayDuration,()=>{this.delayDuration!==void 0&&(this.#timerFn=new TimeoutFn(()=>{set$1(this.#wasOpenDelayed,!0),this.opts.open.current=!0},this.delayDuration))}),watch$1(()=>this.opts.open.current,isOpen=>{isOpen?this.provider.onOpen(this):this.provider.onClose(this)},{lazy:!0})}handleOpen=()=>{ this.#timerFn.stop(),set$1(this.#wasOpenDelayed,!1),this.opts.open.current=!0};handleClose=()=>{this.#timerFn.stop(),this.opts.open.current=!1};#handleDelayedOpen=()=>{this.#timerFn.stop();const shouldSkipDelay=!this.provider.isOpenDelayed,delayDuration=this.delayDuration??0;shouldSkipDelay||delayDuration===0?(set$1(this.#wasOpenDelayed,delayDuration>0&&shouldSkipDelay,!0),this.opts.open.current=!0):this.#timerFn.start()};onTriggerEnter=()=>{this.#handleDelayedOpen()};onTriggerLeave=()=>{this.disableHoverableContent? this.handleClose():this.#timerFn.stop()}}class TooltipTriggerState{static create(opts){return new TooltipTriggerState(opts,TooltipRootContext.get())}opts;root;attachment;#isPointerDown=simpleBox(!1);#hasPointerMoveOpened=state$1(!1);#isDisabled=user_derived(()=>this.opts.disabled.current||this.root.disabled);domContext;#transitCheckTimeout=null;constructor(opts,root2){this.opts=opts,this.root=root2,this.domContext=new DOMContext(opts.ref),this.attachment=attachRef(this.opts.ref,v=>this.root.triggerNode= v)}#clearTransitCheck=()=>{this.#transitCheckTimeout!==null&&(clearTimeout(this.#transitCheckTimeout),this.#transitCheckTimeout=null)};handlePointerUp=()=>{this.#isPointerDown.current=!1};#onpointerup=()=>{get$4(this.#isDisabled)||(this.#isPointerDown.current=!1)};#onpointerdown=()=>{get$4(this.#isDisabled)||(this.#isPointerDown.current=!0,this.domContext.getDocument().addEventListener("pointerup",()=>{this.handlePointerUp()},{once:!0}))};#onpointerenter=e=>{if(!get$4(this.#isDisabled)&&e.pointerType!== "touch"){if(this.root.provider.isPointerInTransit.current){this.#clearTransitCheck(),this.#transitCheckTimeout=window.setTimeout(()=>{this.root.provider.isPointerInTransit.current&&(this.root.provider.isPointerInTransit.current=!1,this.root.onTriggerEnter(),set$1(this.#hasPointerMoveOpened,!0))},250);return}this.root.onTriggerEnter(),set$1(this.#hasPointerMoveOpened,!0)}};#onpointermove=e=>{get$4(this.#isDisabled)||e.pointerType!=="touch"&&(get$4(this.#hasPointerMoveOpened)||(this.#clearTransitCheck(), this.root.provider.isPointerInTransit.current=!1,this.root.onTriggerEnter(),set$1(this.#hasPointerMoveOpened,!0)))};#onpointerleave=()=>{get$4(this.#isDisabled)||(this.#clearTransitCheck(),this.root.onTriggerLeave(),set$1(this.#hasPointerMoveOpened,!1))};#onfocus=e=>{this.#isPointerDown.current||get$4(this.#isDisabled)||this.root.ignoreNonKeyboardFocus&&!isFocusVisible(e.currentTarget)||this.root.handleOpen()};#onblur=()=>{get$4(this.#isDisabled)||this.root.handleClose()};#onclick=()=>{this.root. disableCloseOnTriggerClick||get$4(this.#isDisabled)||this.root.handleClose()};#props=user_derived(()=>({id:this.opts.id.current,"aria-describedby":this.root.opts.open.current?this.root.contentNode?.id:void 0,"data-state":this.root.stateAttr,"data-disabled":boolToEmptyStrOrUndef(get$4(this.#isDisabled)),"data-delay-duration":`${this.root.delayDuration}`,[tooltipAttrs.trigger]:"",tabindex:get$4(this.#isDisabled)?void 0:this.opts.tabindex.current,disabled:this.opts.disabled.current,onpointerup:this.#onpointerup, onpointerdown:this.#onpointerdown,onpointerenter:this.#onpointerenter,onpointermove:this.#onpointermove,onpointerleave:this.#onpointerleave,onfocus:this.#onfocus,onblur:this.#onblur,onclick:this.#onclick,...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}}class TooltipContentState{static create(opts){return new TooltipContentState(opts,TooltipRootContext.get())}opts;root;attachment;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment= attachRef(this.opts.ref,v=>this.root.contentNode=v),new SafePolygon({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&!this.root.disableHoverableContent,onPointerExit:()=>{this.root.provider.isTooltipOpen(this.root)&&this.root.handleClose()}}),onMountEffect(()=>on(window,"scroll",e=>{const target2=e.target;target2&&target2.contains(this.root.triggerNode)&&this.root.handleClose()}))}onInteractOutside=e=>{if(isElement$1(e.target)&& this.root.triggerNode?.contains(e.target)&&this.root.disableCloseOnTriggerClick){e.preventDefault();return}this.opts.onInteractOutside.current(e),!e.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current?.(e),!e.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=e=>{e.preventDefault()};onCloseAutoFocus=e=>{e.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#snippetProps=user_derived(()=>({open:this.root.opts.open. current}));get snippetProps(){return get$4(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,"data-state":this.root.stateAttr,"data-disabled":boolToEmptyStrOrUndef(this.root.disabled),style:{outline:"none"},[tooltipAttrs.content]:"",...this.attachment}));get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown, onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus}}function Tooltip($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1);TooltipRootState.create({open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),delayDuration:boxWith$1(()=>$$props.delayDuration),disableCloseOnTriggerClick:boxWith$1(()=>$$props.disableCloseOnTriggerClick),disableHoverableContent:boxWith$1( ()=>$$props.disableHoverableContent),ignoreNonKeyboardFocus:boxWith$1(()=>$$props.ignoreNonKeyboardFocus),disabled:boxWith$1(()=>$$props.disabled),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())}),Floating_layer($$anchor,{tooltip:!0,children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}var root_4$A=from_html("
"),root_9$n=from_html( "
");function Tooltip_content$1($$anchor,$$props){const uid=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)),ref2=prop($$props,"ref",15,null),side=prop($$props,"side",3,"top"),sideOffset=prop($$props,"sideOffset",3,0),align=prop($$props,"align",3,"center"),avoidCollisions=prop($$props,"avoidCollisions",3,!0),arrowPadding=prop($$props,"arrowPadding",3,0),sticky=prop($$props,"sticky",3,"partial"),hideWhenDetached=prop($$props,"hideWhenDetached", 3,!1),collisionPadding=prop($$props,"collisionPadding",3,0),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),forceMount=prop($$props,"forceMount",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child","id","ref","side","sideOffset","align","avoidCollisions","arrowPadding","sticky","strategy","hideWhenDetached","collisionPadding","onInteractOutside","onEscapeKeydown","forceMount","style"]);const contentState=TooltipContentState. create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),onInteractOutside:boxWith$1(()=>onInteractOutside()),onEscapeKeydown:boxWith$1(()=>onEscapeKeydown())}),floatingProps=user_derived(()=>({side:side(),sideOffset:sideOffset(),align:align(),avoidCollisions:avoidCollisions(),arrowPadding:arrowPadding(),sticky:sticky(),hideWhenDetached:hideWhenDetached(),collisionPadding:collisionPadding(),strategy:$$props.strategy})),mergedProps=user_derived(()=>mergeProps(restProps,get$4(floatingProps), contentState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{{const popper=($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars("tooltip")},{style:$$props.style}));var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent=$$anchor4=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);{let $02=user_derived(()=>({ props:get$4(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$4($02))}append($$anchor4,fragment_3)},alternate=$$anchor4=>{var div=root_4$A();attribute_effect(div,()=>({...wrapperProps()}));var div_1=child(div);attribute_effect(div_1,()=>({...get$4(finalProps)}));var node_3=child(div_1);snippet(node_3,()=>$$props.children??noop$3),reset(div_1),reset(div),append($$anchor4,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent): $$render(alternate,!1)})}append($$anchor3,fragment_2)};let $0=user_derived(()=>contentState.root.disableHoverableContent?"none":"auto");Popper_layer_force_mount($$anchor2,spread_props(()=>get$4(mergedProps),()=>contentState.popperProps,{get enabled(){return contentState.root.opts.open.current},get id(){return id2()},trapFocus:!1,loop:!1,preventScroll:!1,forceMount:!0,get ref(){return contentState.opts.ref},tooltip:!0,get shouldRender(){return contentState.shouldRender},get contentPointerEvents(){ return get$4($0)},popper,$$slots:{popper:!0}}))}},alternate_2=$$anchor2=>{var fragment_4=comment$2(),node_4=first_child(fragment_4);{var consequent_3=$$anchor3=>{{const popper=($$anchor4,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars("tooltip")},{style:$$props.style}));var fragment_6=comment$2(),node_5=first_child(fragment_6);{var consequent_2=$$anchor5=>{var fragment_7=comment$2(), node_6=first_child(fragment_7);{let $02=user_derived(()=>({props:get$4(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_6,()=>$$props.child,()=>get$4($02))}append($$anchor5,fragment_7)},alternate_1=$$anchor5=>{var div_2=root_9$n();attribute_effect(div_2,()=>({...wrapperProps()}));var div_3=child(div_2);attribute_effect(div_3,()=>({...get$4(finalProps)}));var node_7=child(div_3);snippet(node_7,()=>$$props.children??noop$3),reset(div_3),reset(div_2),append($$anchor5, div_2)};if_block(node_5,$$render=>{$$props.child?$$render(consequent_2):$$render(alternate_1,!1)})}append($$anchor4,fragment_6)};let $0=user_derived(()=>contentState.root.disableHoverableContent?"none":"auto");Popper_layer($$anchor3,spread_props(()=>get$4(mergedProps),()=>contentState.popperProps,{get open(){return contentState.root.opts.open.current},get id(){return id2()},trapFocus:!1,loop:!1,preventScroll:!1,forceMount:!1,get ref(){return contentState.opts.ref},tooltip:!0,get shouldRender(){return contentState. shouldRender},get contentPointerEvents(){return get$4($0)},popper,$$slots:{popper:!0}}))}};if_block(node_4,$$render=>{forceMount()||$$render(consequent_3)},!0)}append($$anchor2,fragment_4)};if_block(node2,$$render=>{forceMount()?$$render(consequent_1):$$render(alternate_2,!1)})}append($$anchor,fragment),pop()}var root_3$V=from_html("");function Tooltip_trigger$1($$anchor,$$props){const uid=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid)),disabled=prop( $$props,"disabled",3,!1),type2=prop($$props,"type",3,"button"),tabindex=prop($$props,"tabindex",3,0),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child","id","disabled","type","tabindex","ref"]);const triggerState=TooltipTriggerState.create({id:boxWith$1(()=>id2()),disabled:boxWith$1(()=>disabled()??!1),tabindex:boxWith$1(()=>tabindex()??0),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,triggerState. props,{type:type2()}));Floating_layer_anchor($$anchor,{get id(){return id2()},get ref(){return triggerState.opts.ref},tooltip:!0,children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);{var consequent=$$anchor3=>{var fragment_2=comment$2(),node_1=first_child(fragment_2);snippet(node_1,()=>$$props.child,()=>({props:get$4(mergedProps)})),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var button=root_3$V();attribute_effect(button,()=>({...get$4(mergedProps)})); var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor3,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}function Tooltip_arrow($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref"]);Floating_layer_arrow($$anchor,spread_props(()=>restProps,{get ref(){return ref2()}, set ref($$value){ref2($$value)}})),pop()}function Tooltip_provider($$anchor,$$props){push$1($$props,!0);let delayDuration=prop($$props,"delayDuration",3,700),disableCloseOnTriggerClick=prop($$props,"disableCloseOnTriggerClick",3,!1),disableHoverableContent=prop($$props,"disableHoverableContent",3,!1),disabled=prop($$props,"disabled",3,!1),ignoreNonKeyboardFocus=prop($$props,"ignoreNonKeyboardFocus",3,!1),skipDelayDuration=prop($$props,"skipDelayDuration",3,300);TooltipProviderState.create({delayDuration:boxWith$1( ()=>delayDuration()),disableCloseOnTriggerClick:boxWith$1(()=>disableCloseOnTriggerClick()),disableHoverableContent:boxWith$1(()=>disableHoverableContent()),disabled:boxWith$1(()=>disabled()),ignoreNonKeyboardFocus:boxWith$1(()=>ignoreNonKeyboardFocus()),skipDelayDuration:boxWith$1(()=>skipDelayDuration())});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}function Tooltip_trigger($$anchor,$$props){push$1($$props,!0); let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Tooltip_trigger$1,($$anchor2,TooltipPrimitive_Trigger)=>{TooltipPrimitive_Trigger($$anchor2,spread_props({"data-slot":"tooltip-trigger"},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))}),append($$anchor,fragment),pop()}var root_3$U=from_html("
"),root_2$18=from_html(" ",1);function Tooltip_content($$anchor,$$props){ push$1($$props,!0);const tooltipContent=$$anchor2=>{var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Tooltip_content$1,($$anchor3,TooltipPrimitive_Content)=>{TooltipPrimitive_Content($$anchor3,spread_props({"data-slot":"tooltip-content",get sideOffset(){return sideOffset()},get side(){return side()},get class(){return get$4(contentClass)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor4,$$slotProps)=>{var fragment_1=root_2$18(), node_1=first_child(fragment_1);snippet(node_1,()=>$$props.children??noop$3);var node_2=sibling(node_1,2);{const child2=($$anchor5,$$arg0)=>{let props=()=>$$arg0?.().props;var div=root_3$U();attribute_effect(div,$0=>({class:$0,...props()}),[()=>cn$1("z-50 size-2.5 rotate-45 rounded-[2px] bg-primary","data-[side=top]:translate-x-1/2 data-[side=top]:translate-y-[calc(-50%_+_2px)]","data-[side=bottom]:-translate-x-1/2 data-[side=bottom]:-translate-y-[calc(-50%_+_1px)]","data-[side=right]:translate-x\ -[calc(50%_+_2px)] data-[side=right]:translate-y-1/2","data-[side=left]:-translate-y-[calc(50%_-_3px)]",$$props.arrowClasses)]),append($$anchor5,div)};component(node_2,()=>Tooltip_arrow,($$anchor5,TooltipPrimitive_Arrow)=>{TooltipPrimitive_Arrow($$anchor5,{child:child2,$$slots:{child:!0}})})}append($$anchor4,fragment_1)},$$slots:{default:!0}}))}),append($$anchor2,fragment)};let ref2=prop($$props,"ref",15,null),sideOffset=prop($$props,"sideOffset",3,0),side=prop($$props,"side",3,"top"),noPortal=prop( $$props,"noPortal",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","sideOffset","side","children","arrowClasses","noPortal"]);const contentClass=user_derived(()=>cn$1("z-50 w-fit origin-(--bits-tooltip-content-transform-origin) animate-in rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-foreground fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side\ =top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",$$props.class));var fragment_2=comment$2(),node_3=first_child(fragment_2);{var consequent=$$anchor2=>{tooltipContent($$anchor2)},alternate=$$anchor2=>{var fragment_4=comment$2(),node_4=first_child(fragment_4);component(node_4,()=>Portal$2,($$anchor3,TooltipPrimitive_Portal)=>{TooltipPrimitive_Portal($$anchor3,{children:($$anchor4,$$slotProps)=>{tooltipContent($$anchor4)},$$slots:{ default:!0}})}),append($$anchor2,fragment_4)};if_block(node_3,$$render=>{noPortal()?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment_2),pop()}const Root$5=Tooltip,Provider=Tooltip_provider;var root_4$z=from_html("

"),root_1$12=from_html(" ",1);function ActionIcon($$anchor,$$props){let variant=prop($$props,"variant",3,"ghost"),size2=prop($$props,"size",3,"sm"),className=prop($$props,"class",3,""),disabled=prop($$props,"disabled",3,!1),iconSize=prop($$props,"icon\ Size",3,"h-3 w-3");var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$5,($$anchor2,Tooltip_Root)=>{Tooltip_Root($$anchor2,{children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$12(),node_1=first_child(fragment_1);component(node_1,()=>Tooltip_trigger,($$anchor4,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor4,{children:($$anchor5,$$slotProps2)=>{{let $0=user_derived(()=>$$props["aria-label"]||$$props.tooltip);Button($$anchor5,{get variant(){return variant()},get size(){return size2()}, get disabled(){return disabled()},get onclick(){return $$props.onclick},get class(){return`h-6 w-6 p-0 ${className()??""} flex`},get"aria-label"(){return get$4($0)},children:($$anchor6,$$slotProps3)=>{const IconComponent=user_derived(()=>$$props.icon);var fragment_3=comment$2(),node_2=first_child(fragment_3);component(node_2,()=>get$4(IconComponent),($$anchor7,IconComponent_1)=>{IconComponent_1($$anchor7,{get class(){return iconSize()}})}),append($$anchor6,fragment_3)},$$slots:{default:!0}})}},$$slots:{ default:!0}})});var node_3=sibling(node_1,2);component(node_3,()=>Tooltip_content,($$anchor4,Tooltip_Content)=>{Tooltip_Content($$anchor4,{children:($$anchor5,$$slotProps2)=>{var p2=root_4$z(),text2=child(p2,!0);reset(p2),template_effect(()=>set_text(text2,$$props.tooltip)),append($$anchor5,p2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment)}const defaultAttributes={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24", fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var root$1G=from_svg("");function Icon($$anchor,$$props){push$1($$props,!0);const color=prop($$props,"color",3,"currentColor"),size2=prop($$props,"size",3,24),strokeWidth=prop($$props,"strokeWidth",3,2),absoluteStrokeWidth=prop($$props,"absoluteStrokeWidth",3,!1),iconNode=prop($$props,"iconNode",19,()=>[]),props=rest_props($$props,["$$slots","$$events","$$legacy","name","color", "size","strokeWidth","absoluteStrokeWidth","iconNode","children"]);var svg2=root$1G();attribute_effect(svg2,$0=>({...defaultAttributes,...props,width:size2(),height:size2(),stroke:color(),"stroke-width":$0,class:["lucide-icon lucide",$$props.name&&`lucide-${$$props.name}`,$$props.class]}),[()=>absoluteStrokeWidth()?Number(strokeWidth())*24/Number(size2()):strokeWidth()]);var node2=child(svg2);each(node2,17,iconNode,index$2,($$anchor2,$$item)=>{var $$array=user_derived(()=>to_array(get$4($$item), 2));let tag=()=>get$4($$array)[0],attrs=()=>get$4($$array)[1];var fragment=comment$2(),node_1=first_child(fragment);element$4(node_1,tag,!0,($$element,$$anchor3)=>{attribute_effect($$element,()=>({...attrs()}))}),append($$anchor2,fragment)});var node_2=sibling(node2);snippet(node_2,()=>$$props.children??noop$3),reset(svg2),append($$anchor,svg2),pop()}function Arrow_big_up($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path", {d:"M9 18v-6H5l7-7 7 7h-4v6H9z"}]];Icon($$anchor,spread_props({name:"arrow-big-up"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Arrow_right($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M5 12h14"}],["path",{d:"m12\ 5 7 7-7 7"}]];Icon($$anchor,spread_props({name:"arrow-right"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Arrow_up($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m5 12 7-7 7 7"}],["path",{d:"M12 19V5"}]];Icon($$anchor, spread_props({name:"arrow-up"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Book_open_text($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 7v14"}],["path",{d:"M16 12h2"}],["path",{d:"M16 8h2"}],["path",{d:"M3 18a\ 1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"}],["path",{d:"M6 12h2"}],["path",{d:"M6 8h2"}]];Icon($$anchor,spread_props({name:"book-open-text"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Braces($$anchor,$$props){push$1( $$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1"}]];Icon($$anchor,spread_props({name:"braces"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2, fragment_1)},$$slots:{default:!0}})),pop()}function Brain($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375"}],["path",{d:"M6.003 \ 5.125A3 3 0 0 0 6.401 6.5"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18"}]];Icon($$anchor,spread_props({name:"brain"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Cable($$anchor,$$props){ push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1"}],["path",{d:"M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9"}],["path",{d:"M21 21v-2h-4"}],["path",{d:"M3 5h4V3"}],["path",{d:"M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3"}]];Icon($$anchor,spread_props({name:"cable"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{ var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Check($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M20 6 9 17l-5-5"}]];Icon($$anchor,spread_props({name:"check"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1); snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Chevron_down($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m6 9 6 6 6-6"}]];Icon($$anchor,spread_props({name:"chevron-down"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3), append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Chevron_left($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m15 18-6-6 6-6"}]];Icon($$anchor,spread_props({name:"chevron-left"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})), pop()}function Chevron_up($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m18 15-6-6-6 6"}]];Icon($$anchor,spread_props({name:"chevron-up"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Chevron_right($$anchor,$$props){ push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m9 18 6-6-6-6"}]];Icon($$anchor,spread_props({name:"chevron-right"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Chevrons_up_down($$anchor,$$props){push$1($$props,!0);let props=rest_props( $$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m7 15 5 5 5-5"}],["path",{d:"m7 9 5-5 5 5"}]];Icon($$anchor,spread_props({name:"chevrons-up-down"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Circle_alert($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$\ $slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16"}]];Icon($$anchor,spread_props({name:"circle-alert"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Circle_check_big($$anchor,$$props){ push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335"}],["path",{d:"m9 11 3 3L22 4"}]];Icon($$anchor,spread_props({name:"circle-check-big"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Circle_x($$anchor,$$props){ push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]];Icon($$anchor,spread_props({name:"circle-x"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Clock($$anchor,$$props){ push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"10"}],["polyline",{points:"12 6 12 12 16 14"}]];Icon($$anchor,spread_props({name:"clock"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Code($$anchor,$$props){push$1($$props, !0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m16 18 6-6-6-6"}],["path",{d:"m8 6-6 6 6 6"}]];Icon($$anchor,spread_props({name:"code"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Copy($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props, ["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];Icon($$anchor,spread_props({name:"copy"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Database($$anchor,$$props){push$1( $$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5"}],["path",{d:"M3 12A9 3 0 0 0 21 12"}]];Icon($$anchor,spread_props({name:"database"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Download($$anchor,$$props){ push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 15V3"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["path",{d:"m7 10 5 5 5-5"}]];Icon($$anchor,spread_props({name:"download"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Ellipsis($$anchor,$$props){ push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]];Icon($$anchor,spread_props({name:"ellipsis"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function External_link($$anchor,$$props){ push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]];Icon($$anchor,spread_props({name:"external-link"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})), pop()}function Eye($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]];Icon($$anchor,spread_props({name:"eye"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children?? noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function File_text($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}],["path",{d:"M10 9H8"}],["path",{d:"M16 13H8"}],["path",{d:"M16 17H8"}]];Icon($$anchor,spread_props({name:"file-text"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{ var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function File_x($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}],["path",{d:"m14.5 12.5-5 5"}],["path",{d:"m9.5 12.5 5 5"}]];Icon($$anchor,spread_props({name:"\ file-x"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function File$1($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}]];Icon( $$anchor,spread_props({name:"file"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Flask_conical($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.\ 96l5.51-10.08A2 2 0 0 0 10 8V2"}],["path",{d:"M6.453 15h11.094"}],["path",{d:"M8.5 2h7"}]];Icon($$anchor,spread_props({name:"flask-conical"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Folder_open($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]); const iconNode=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]];Icon($$anchor,spread_props({name:"folder-open"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Funnel($$anchor,$$props){ push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"}]];Icon($$anchor,spread_props({name:"funnel"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2, fragment_1)},$$slots:{default:!0}})),pop()}function Gauge($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m12 14 4-4"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0"}]];Icon($$anchor,spread_props({name:"gauge"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{ default:!0}})),pop()}function Git_branch($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["line",{x1:"6",x2:"6",y1:"3",y2:"15"}],["circle",{cx:"18",cy:"6",r:"3"}],["circle",{cx:"6",cy:"18",r:"3"}],["path",{d:"M18 9a9 9 0 0 1-9 9"}]];Icon($$anchor,spread_props({name:"git-branch"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props. children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Globe($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"}],["path",{d:"M2 12h20"}]];Icon($$anchor,spread_props({name:"globe"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1); snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Heart_off($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["line",{x1:"2",y1:"2",x2:"22",y2:"22"}],["path",{d:"M16.5 16.5 12 21l-7-7c-1.5-1.45-3-3.2-3-5.5a5.5 5.5 0 0 1 2.14-4.35"}],["path",{d:"M8.76 3.1c1.15.22 2.13.78 3.24 1.9 1.5-1.5 2.74-2 4.5-2A5.5 5.5 0 0 1 22 8.5c0 2.12-1.3 3.78-2.67 5.17"}]];Icon($$anchor,spread_props( {name:"heart-off"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Heart($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5\ 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"}]];Icon($$anchor,spread_props({name:"heart"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Image$1($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"18",height:"18",x:"3",y:"3", rx:"2",ry:"2"}],["circle",{cx:"9",cy:"9",r:"2"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"}]];Icon($$anchor,spread_props({name:"image"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Info$1($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legac\ y"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];Icon($$anchor,spread_props({name:"info"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Key($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]); const iconNode=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"}],["path",{d:"m21 2-9.6 9.6"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5"}]];Icon($$anchor,spread_props({name:"key"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Layers($$anchor,$$props){push$1($$props,!0);let props=rest_props( $$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17"}]];Icon($$anchor,spread_props({name:"layers"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(), node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function List_checks($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m3 17 2 2 4-4"}],["path",{d:"m3 7 2 2 4-4"}],["path",{d:"M13 6h8"}],["path",{d:"M13 12h8"}],["path",{d:"M13 18h8"}]];Icon($$anchor,spread_props({name:"list-checks"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{ var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Loader_circle($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];Icon($$anchor,spread_props({name:"loader-circle"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(), node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Message_square($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"}]];Icon($$anchor,spread_props({name:"message-square"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(), node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Mic($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22"}]];Icon($$anchor,spread_props({name:"mic"},()=>props,{get iconNode(){return iconNode}, children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Minus($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M5 12h14"}]];Icon($$anchor,spread_props({name:"minus"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(), node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Monitor($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21"}]];Icon($$anchor,spread_props({name:"monitor"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{ var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Moon($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"}]];Icon($$anchor,spread_props({name:"moon"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child( fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Music($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M9 18V5l12-2v13"}],["circle",{cx:"6",cy:"18",r:"3"}],["circle",{cx:"18",cy:"16",r:"3"}]];Icon($$anchor,spread_props({name:"music"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child( fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Package($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"}],["path",{d:"M12 22V12"}],["polyline",{points:"3.29 7 12 12 20.71 7"}],["path",{d:"m7.5 4.27 9 5.15"}]];Icon($$anchor, spread_props({name:"package"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Panel_left($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]];Icon($$anchor,spread_props( {name:"panel-left"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Pencil($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.62\ 2l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];Icon($$anchor,spread_props({name:"pencil"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Plus($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M5 12h14"}],[ "path",{d:"M12 5v14"}]];Icon($$anchor,spread_props({name:"plus"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Power_off($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15"}],["path",{d:"M6\ .16 6.16a9 9 0 1 0 12.68 12.68"}],["path",{d:"M12 2v4"}],["path",{d:"m2 2 20 20"}]];Icon($$anchor,spread_props({name:"power-off"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Power($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[ ["path",{d:"M12 2v10"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04"}]];Icon($$anchor,spread_props({name:"power"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Radio($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M4.9 1\ 9.1C1 15.2 1 8.8 4.9 4.9"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5"}],["circle",{cx:"12",cy:"12",r:"2"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19"}]];Icon($$anchor,spread_props({name:"radio"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Refresh_cw($$anchor,$$props){ push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]];Icon($$anchor,spread_props({name:"refresh-cw"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children?? noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Rotate_ccw($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}]];Icon($$anchor,spread_props({name:"rotate-ccw"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props. children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Rotate_cw($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}]];Icon($$anchor,spread_props({name:"rotate-cw"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2, ()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Search($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]];Icon($$anchor,spread_props({name:"search"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children?? noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Server($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18"}]];Icon($$anchor,spread_props({name:"server"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{ var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Settings$1($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73\ 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}],["circle",{cx:"12",cy:"12",r:"3"}]];Icon($$anchor,spread_props({name:"settings"},()=>props,{get iconNode(){return iconNode}, children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Sparkles($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6\ .135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"}],["path",{d:"M20 3v4"}],["path",{d:"M22 5h-4"}],["path",{d:"M4 17v2"}],["path",{d:"M5 18H3"}]];Icon($$anchor,spread_props({name:"sparkles"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Square_pen($$anchor,$$props){ push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"}]];Icon($$anchor,spread_props({name:"square-pen"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2, ()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Square($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}]];Icon($$anchor,spread_props({name:"square"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append( $$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Sun($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"4"}],["path",{d:"M12 2v2"}],["path",{d:"M12 20v2"}],["path",{d:"m4.93 4.93 1.41 1.41"}],["path",{d:"m17.66 17.66 1.41 1.41"}],["path",{d:"M2 12h2"}],["path",{d:"M20 12h2"}],["path",{d:"m6.34 17.66-1.41 1.41"}],["path",{d:"m19.07 4.93-1.41 1.41"}]];Icon($$anchor,spread_props({name:"sun"}, ()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Timer_off($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M10 2h4"}],["path",{d:"M4.6 11a8 8 0 0 0 1.7 8.7 8 8 0 0 0 8.7 1.7"}],["path",{d:"M7.4 7.4a8 8 0 0 1 10.3 1 8 8 0\ 0 1 .9 10.2"}],["path",{d:"m2 2 20 20"}],["path",{d:"M12 12v-2"}]];Icon($$anchor,spread_props({name:"timer-off"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Trash_2($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M\ 3 6h18"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17"}]];Icon($$anchor,spread_props({name:"trash-2"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Triangle_alert($$anchor,$$props){ push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4"}],["path",{d:"M12 17h.01"}]];Icon($$anchor,spread_props({name:"triangle-alert"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{ default:!0}})),pop()}function Upload($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 3v12"}],["path",{d:"m17 8-5-5-5 5"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}]];Icon($$anchor,spread_props({name:"upload"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2, fragment_1)},$$slots:{default:!0}})),pop()}function Whole_word($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"7",cy:"12",r:"3"}],["path",{d:"M10 9v6"}],["circle",{cx:"17",cy:"12",r:"3"}],["path",{d:"M14 7v8"}],["path",{d:"M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1"}]];Icon($$anchor,spread_props({name:"whole-word"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(), node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Wrench($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"}]];Icon($$anchor,spread_props({name:"wrench"},()=>props,{get iconNode(){ return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function X($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];Icon($$anchor,spread_props({name:"x"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{ var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Zap($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"}]];Icon($$anchor,spread_props({name:"zap"}, ()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}var AttachmentType=(AttachmentType2=>(AttachmentType2.AUDIO="AUDIO",AttachmentType2.IMAGE="IMAGE",AttachmentType2.MCP_PROMPT="MCP_PROMPT",AttachmentType2.MCP_RESOURCE="MCP_RESOURCE",AttachmentType2.PDF="PDF",AttachmentType2.TEXT="TEXT",AttachmentType2.LEGACY_CONTEXT= "context",AttachmentType2))(AttachmentType||{}),ToolCallType=(ToolCallType2=>(ToolCallType2.FUNCTION="function",ToolCallType2))(ToolCallType||{}),AgenticSectionType=(AgenticSectionType2=>(AgenticSectionType2.TEXT="text",AgenticSectionType2.TOOL_CALL="tool_call",AgenticSectionType2.TOOL_CALL_PENDING="tool_call_pending",AgenticSectionType2.TOOL_CALL_STREAMING="tool_call_streaming",AgenticSectionType2.REASONING="reasoning",AgenticSectionType2.REASONING_PENDING="reasoning_pending",AgenticSectionType2))( AgenticSectionType||{}),ChatMessageStatsView=(ChatMessageStatsView2=>(ChatMessageStatsView2.GENERATION="generation",ChatMessageStatsView2.READING="reading",ChatMessageStatsView2.TOOLS="tools",ChatMessageStatsView2.SUMMARY="summary",ChatMessageStatsView2))(ChatMessageStatsView||{}),ReasoningFormat=(ReasoningFormat2=>(ReasoningFormat2.NONE="none",ReasoningFormat2.AUTO="auto",ReasoningFormat2))(ReasoningFormat||{}),MessageRole=(MessageRole2=>(MessageRole2.USER="user",MessageRole2.ASSISTANT="assista\ nt",MessageRole2.SYSTEM="system",MessageRole2.TOOL="tool",MessageRole2))(MessageRole||{}),MessageType=(MessageType2=>(MessageType2.ROOT="root",MessageType2.TEXT="text",MessageType2.THINK="think",MessageType2.SYSTEM="system",MessageType2))(MessageType||{}),ContentPartType=(ContentPartType2=>(ContentPartType2.TEXT="text",ContentPartType2.IMAGE_URL="image_url",ContentPartType2.INPUT_AUDIO="input_audio",ContentPartType2))(ContentPartType||{}),ErrorDialogType=(ErrorDialogType2=>(ErrorDialogType2.TIMEOUT= "timeout",ErrorDialogType2.SERVER="server",ErrorDialogType2))(ErrorDialogType||{}),FileTypeCategory=(FileTypeCategory2=>(FileTypeCategory2.IMAGE="image",FileTypeCategory2.AUDIO="audio",FileTypeCategory2.PDF="pdf",FileTypeCategory2.TEXT="text",FileTypeCategory2))(FileTypeCategory||{}),SpecialFileType=(SpecialFileType2=>(SpecialFileType2.MCP_PROMPT="mcp-prompt",SpecialFileType2))(SpecialFileType||{}),FileTypeImage=(FileTypeImage2=>(FileTypeImage2.JPEG="jpeg",FileTypeImage2.PNG="png",FileTypeImage2. GIF="gif",FileTypeImage2.WEBP="webp",FileTypeImage2.SVG="svg",FileTypeImage2))(FileTypeImage||{}),FileTypeAudio=(FileTypeAudio2=>(FileTypeAudio2.MP3="mp3",FileTypeAudio2.WAV="wav",FileTypeAudio2.WEBM="webm",FileTypeAudio2))(FileTypeAudio||{}),FileTypePdf=(FileTypePdf2=>(FileTypePdf2.PDF="pdf",FileTypePdf2))(FileTypePdf||{}),FileTypeText=(FileTypeText2=>(FileTypeText2.PLAIN_TEXT="plainText",FileTypeText2.MARKDOWN="md",FileTypeText2.ASCIIDOC="asciidoc",FileTypeText2.JAVASCRIPT="js",FileTypeText2.TYPESCRIPT= "ts",FileTypeText2.JSX="jsx",FileTypeText2.TSX="tsx",FileTypeText2.CSS="css",FileTypeText2.HTML="html",FileTypeText2.JSON="json",FileTypeText2.XML="xml",FileTypeText2.YAML="yaml",FileTypeText2.CSV="csv",FileTypeText2.LOG="log",FileTypeText2.PYTHON="python",FileTypeText2.JAVA="java",FileTypeText2.CPP="cpp",FileTypeText2.PHP="php",FileTypeText2.RUBY="ruby",FileTypeText2.GO="go",FileTypeText2.RUST="rust",FileTypeText2.SHELL="shell",FileTypeText2.SQL="sql",FileTypeText2.R="r",FileTypeText2.SCALA="sc\ ala",FileTypeText2.KOTLIN="kotlin",FileTypeText2.SWIFT="swift",FileTypeText2.DART="dart",FileTypeText2.VUE="vue",FileTypeText2.SVELTE="svelte",FileTypeText2.LATEX="latex",FileTypeText2.BIBTEX="bibtex",FileTypeText2.CUDA="cuda",FileTypeText2.VULKAN="vulkan",FileTypeText2.HASKELL="haskell",FileTypeText2.CSHARP="csharp",FileTypeText2.PROPERTIES="properties",FileTypeText2))(FileTypeText||{}),FileExtensionImage=(FileExtensionImage2=>(FileExtensionImage2.JPG=".jpg",FileExtensionImage2.JPEG=".jpeg",FileExtensionImage2. PNG=".png",FileExtensionImage2.GIF=".gif",FileExtensionImage2.WEBP=".webp",FileExtensionImage2.SVG=".svg",FileExtensionImage2))(FileExtensionImage||{}),FileExtensionAudio=(FileExtensionAudio2=>(FileExtensionAudio2.MP3=".mp3",FileExtensionAudio2.WAV=".wav",FileExtensionAudio2))(FileExtensionAudio||{}),FileExtensionPdf=(FileExtensionPdf2=>(FileExtensionPdf2.PDF=".pdf",FileExtensionPdf2))(FileExtensionPdf||{}),FileExtensionText=(FileExtensionText2=>(FileExtensionText2.TXT=".txt",FileExtensionText2. MD=".md",FileExtensionText2.ADOC=".adoc",FileExtensionText2.JS=".js",FileExtensionText2.TS=".ts",FileExtensionText2.JSX=".jsx",FileExtensionText2.TSX=".tsx",FileExtensionText2.CSS=".css",FileExtensionText2.HTML=".html",FileExtensionText2.HTM=".htm",FileExtensionText2.JSON=".json",FileExtensionText2.XML=".xml",FileExtensionText2.YAML=".yaml",FileExtensionText2.YML=".yml",FileExtensionText2.CSV=".csv",FileExtensionText2.LOG=".log",FileExtensionText2.PY=".py",FileExtensionText2.JAVA=".java",FileExtensionText2. CPP=".cpp",FileExtensionText2.C=".c",FileExtensionText2.H=".h",FileExtensionText2.PHP=".php",FileExtensionText2.RB=".rb",FileExtensionText2.GO=".go",FileExtensionText2.RS=".rs",FileExtensionText2.SH=".sh",FileExtensionText2.BAT=".bat",FileExtensionText2.SQL=".sql",FileExtensionText2.R=".r",FileExtensionText2.SCALA=".scala",FileExtensionText2.KT=".kt",FileExtensionText2.SWIFT=".swift",FileExtensionText2.DART=".dart",FileExtensionText2.VUE=".vue",FileExtensionText2.SVELTE=".svelte",FileExtensionText2. TEX=".tex",FileExtensionText2.BIB=".bib",FileExtensionText2.CU=".cu",FileExtensionText2.CUH=".cuh",FileExtensionText2.COMP=".comp",FileExtensionText2.HPP=".hpp",FileExtensionText2.HS=".hs",FileExtensionText2.PROPERTIES=".properties",FileExtensionText2.CS=".cs",FileExtensionText2))(FileExtensionText||{}),MimeTypePrefix=(MimeTypePrefix2=>(MimeTypePrefix2.IMAGE="image/",MimeTypePrefix2.TEXT="text",MimeTypePrefix2))(MimeTypePrefix||{}),MimeTypeIncludes=(MimeTypeIncludes2=>(MimeTypeIncludes2.JSON="js\ on",MimeTypeIncludes2.JAVASCRIPT="javascript",MimeTypeIncludes2.TYPESCRIPT="typescript",MimeTypeIncludes2))(MimeTypeIncludes||{}),UriPattern=(UriPattern2=>(UriPattern2.DATABASE_KEYWORD="database",UriPattern2.DATABASE_SCHEME="db://",UriPattern2))(UriPattern||{}),MimeTypeApplication=(MimeTypeApplication2=>(MimeTypeApplication2.PDF="application/pdf",MimeTypeApplication2.OCTET_STREAM="application/octet-stream",MimeTypeApplication2))(MimeTypeApplication||{}),MimeTypeAudio=(MimeTypeAudio2=>(MimeTypeAudio2. MP3_MPEG="audio/mpeg",MimeTypeAudio2.MP3="audio/mp3",MimeTypeAudio2.MP4="audio/mp4",MimeTypeAudio2.WAV="audio/wav",MimeTypeAudio2.WEBM="audio/webm",MimeTypeAudio2.WEBM_OPUS="audio/webm;codecs=opus",MimeTypeAudio2))(MimeTypeAudio||{}),MimeTypeImage=(MimeTypeImage2=>(MimeTypeImage2.JPEG="image/jpeg",MimeTypeImage2.JPG="image/jpg",MimeTypeImage2.PNG="image/png",MimeTypeImage2.GIF="image/gif",MimeTypeImage2.WEBP="image/webp",MimeTypeImage2.SVG="image/svg+xml",MimeTypeImage2))(MimeTypeImage||{}),MimeTypeText=(MimeTypeText2=>(MimeTypeText2. PLAIN="text/plain",MimeTypeText2.MARKDOWN="text/markdown",MimeTypeText2.ASCIIDOC="text/asciidoc",MimeTypeText2.JAVASCRIPT="text/javascript",MimeTypeText2.JAVASCRIPT_APP="application/javascript",MimeTypeText2.TYPESCRIPT="text/typescript",MimeTypeText2.JSX="text/jsx",MimeTypeText2.TSX="text/tsx",MimeTypeText2.CSS="text/css",MimeTypeText2.HTML="text/html",MimeTypeText2.JSON="application/json",MimeTypeText2.XML_TEXT="text/xml",MimeTypeText2.XML_APP="application/xml",MimeTypeText2.YAML_TEXT="text/yam\ l",MimeTypeText2.YAML_APP="application/yaml",MimeTypeText2.CSV="text/csv",MimeTypeText2.PYTHON="text/x-python",MimeTypeText2.JAVA="text/x-java-source",MimeTypeText2.CPP_HDR="text/x-c++hdr",MimeTypeText2.CPP_SRC="text/x-c++src",MimeTypeText2.CSHARP="text/x-csharp",MimeTypeText2.HASKELL="text/x-haskell",MimeTypeText2.C_SRC="text/x-csrc",MimeTypeText2.C_HDR="text/x-chdr",MimeTypeText2.PHP="text/x-php",MimeTypeText2.RUBY="text/x-ruby",MimeTypeText2.GO="text/x-go",MimeTypeText2.RUST="text/x-rust",MimeTypeText2. SHELL="text/x-shellscript",MimeTypeText2.BAT="application/x-bat",MimeTypeText2.SQL="text/x-sql",MimeTypeText2.R="text/x-r",MimeTypeText2.SCALA="text/x-scala",MimeTypeText2.KOTLIN="text/x-kotlin",MimeTypeText2.SWIFT="text/x-swift",MimeTypeText2.DART="text/x-dart",MimeTypeText2.VUE="text/x-vue",MimeTypeText2.SVELTE="text/x-svelte",MimeTypeText2.TEX="text/x-tex",MimeTypeText2.TEX_APP="application/x-tex",MimeTypeText2.LATEX="application/x-latex",MimeTypeText2.BIBTEX="text/x-bibtex",MimeTypeText2.CUDA= "text/x-cuda",MimeTypeText2.PROPERTIES="text/properties",MimeTypeText2))(MimeTypeText||{}),MCPConnectionPhase=(MCPConnectionPhase2=>(MCPConnectionPhase2.IDLE="idle",MCPConnectionPhase2.TRANSPORT_CREATING="transport_creating",MCPConnectionPhase2.TRANSPORT_READY="transport_ready",MCPConnectionPhase2.INITIALIZING="initializing",MCPConnectionPhase2.CAPABILITIES_EXCHANGED="capabilities_exchanged",MCPConnectionPhase2.LISTING_TOOLS="listing_tools",MCPConnectionPhase2.CONNECTED="connected",MCPConnectionPhase2. ERROR="error",MCPConnectionPhase2.DISCONNECTED="disconnected",MCPConnectionPhase2))(MCPConnectionPhase||{}),MCPLogLevel=(MCPLogLevel2=>(MCPLogLevel2.INFO="info",MCPLogLevel2.WARN="warn",MCPLogLevel2.ERROR="error",MCPLogLevel2))(MCPLogLevel||{}),MCPTransportType=(MCPTransportType2=>(MCPTransportType2.WEBSOCKET="websocket",MCPTransportType2.STREAMABLE_HTTP="streamable_http",MCPTransportType2.SSE="sse",MCPTransportType2))(MCPTransportType||{}),HealthCheckStatus=(HealthCheckStatus2=>(HealthCheckStatus2. IDLE="idle",HealthCheckStatus2.CONNECTING="connecting",HealthCheckStatus2.SUCCESS="success",HealthCheckStatus2.ERROR="error",HealthCheckStatus2))(HealthCheckStatus||{}),MCPContentType=(MCPContentType2=>(MCPContentType2.TEXT="text",MCPContentType2.IMAGE="image",MCPContentType2.RESOURCE="resource",MCPContentType2))(MCPContentType||{}),JsonSchemaType=(JsonSchemaType2=>(JsonSchemaType2.OBJECT="object",JsonSchemaType2))(JsonSchemaType||{}),MCPRefType=(MCPRefType2=>(MCPRefType2.PROMPT="ref/prompt",MCPRefType2. RESOURCE="ref/resource",MCPRefType2))(MCPRefType||{}),ModelModality=(ModelModality2=>(ModelModality2.TEXT="TEXT",ModelModality2.AUDIO="AUDIO",ModelModality2.VISION="VISION",ModelModality2))(ModelModality||{}),ServerRole=(ServerRole2=>(ServerRole2.MODEL="model",ServerRole2.ROUTER="router",ServerRole2))(ServerRole||{}),ServerModelStatus=(ServerModelStatus2=>(ServerModelStatus2.UNLOADED="unloaded",ServerModelStatus2.LOADING="loading",ServerModelStatus2.LOADED="loaded",ServerModelStatus2.SLEEPING="s\ leeping",ServerModelStatus2.FAILED="failed",ServerModelStatus2))(ServerModelStatus||{}),ParameterSource=(ParameterSource2=>(ParameterSource2.DEFAULT="default",ParameterSource2.CUSTOM="custom",ParameterSource2))(ParameterSource||{}),SyncableParameterType=(SyncableParameterType2=>(SyncableParameterType2.NUMBER="number",SyncableParameterType2.STRING="string",SyncableParameterType2.BOOLEAN="boolean",SyncableParameterType2))(SyncableParameterType||{}),SettingsFieldType=(SettingsFieldType2=>(SettingsFieldType2. INPUT="input",SettingsFieldType2.TEXTAREA="textarea",SettingsFieldType2.CHECKBOX="checkbox",SettingsFieldType2.SELECT="select",SettingsFieldType2))(SettingsFieldType||{}),ColorMode=(ColorMode2=>(ColorMode2.LIGHT="light",ColorMode2.DARK="dark",ColorMode2.SYSTEM="system",ColorMode2))(ColorMode||{}),McpPromptVariant=(McpPromptVariant2=>(McpPromptVariant2.MESSAGE="message",McpPromptVariant2.ATTACHMENT="attachment",McpPromptVariant2))(McpPromptVariant||{}),UrlProtocol=(UrlProtocol2=>(UrlProtocol2.DATA= "data:",UrlProtocol2.HTTP="http://",UrlProtocol2.HTTPS="https://",UrlProtocol2.WEBSOCKET="ws://",UrlProtocol2.WEBSOCKET_SECURE="wss://",UrlProtocol2))(UrlProtocol||{}),KeyboardKey=(KeyboardKey2=>(KeyboardKey2.ENTER="Enter",KeyboardKey2.ESCAPE="Escape",KeyboardKey2.ARROW_UP="ArrowUp",KeyboardKey2.ARROW_DOWN="ArrowDown",KeyboardKey2.TAB="Tab",KeyboardKey2.D_LOWER="d",KeyboardKey2.D_UPPER="D",KeyboardKey2.E_UPPER="E",KeyboardKey2.K_LOWER="k",KeyboardKey2.O_UPPER="O",KeyboardKey2.SPACE=" ",KeyboardKey2))( KeyboardKey||{}),root_1$11=from_html(''),root$1F=from_html('
');function ActionIconsCodeBlock($$anchor,$$props){push$1($$props,!0);let disabled=prop($$props,"disabled",3,!1);const showPreview=user_derived(()=>$$props.language?.toLowerCase()===FileTypeText.HTML);function handlePreview(){disabled()||$$props.onPreview?.($$props.code,$$props.language)}var div=root$1F(),div_1=child(div); let classes;var node2=child(div_1);{let $0=user_derived(()=>!disabled()),$1=user_derived(()=>disabled()?"Code incomplete":"Copy code");ActionIconCopyToClipboard(node2,{get text(){return $$props.code},get canCopy(){return get$4($0)},get ariaLabel(){return get$4($1)}})}reset(div_1);var node_1=sibling(div_1,2);{var consequent=$$anchor2=>{var button=root_1$11();let classes_1;button.__click=handlePreview;var node_2=child(button);Eye(node_2,{size:16}),reset(button),template_effect(()=>{classes_1=set_class( button,1,"preview-code-btn",null,classes_1,{"opacity-50":disabled(),"!cursor-not-allowed":disabled()}),set_attribute(button,"title",disabled()?"Code incomplete":"Preview code"),set_attribute(button,"aria-disabled",disabled())}),append($$anchor2,button)};if_block(node_1,$$render=>{get$4(showPreview)&&$$render(consequent)})}reset(div),template_effect(()=>classes=set_class(div_1,1,"copy-code-btn",null,classes,{"opacity-50":disabled(),"!cursor-not-allowed":disabled()})),append($$anchor,div),pop()}delegate( ["click"]);const ATTACHMENT_SAVED_REGEX=/\[Attachment saved: ([^\]]+)\]/,NEWLINE_SEPARATOR=` `,TURN_LIMIT_MESSAGE="\n\n```\nTurn limit reached\n```\n",LLM_ERROR_BLOCK_START=` \`\`\` Upstream LLM error: `,LLM_ERROR_BLOCK_END="\n```\n",DEFAULT_AGENTIC_CONFIG={enabled:!0,maxTurns:100,maxToolPreviewLines:25},LEGACY_REASONING_TAGS={START:"<<>>"},LEGACY_AGENTIC_REGEX={COMPLETED_TOOL_CALL:/<<>>\n<<>>\n<<>>([\s\S]*?)<<>>([\s\S]*?)<<>>/g,REASONING_BLOCK:/<<>>[\s\S]*?<<>>/g,REASONING_EXTRACT:/<<>>([\s\S]*?)<<>>/, REASONING_OPEN:/<<>>[\s\S]*$/,AGENTIC_TOOL_CALL_OPEN:/\n*<<>>[\s\S]*$/,HAS_LEGACY_MARKERS:/<<<(?:AGENTIC_TOOL_CALL_START|reasoning_content_start)>>>/},API_MODELS={LIST:"/v1/models",LOAD:"/models/load",UNLOAD:"/models/unload"},CORS_PROXY_ENDPOINT="/cors-proxy",ATTACHMENT_LABEL_PDF_FILE="PDF File",ATTACHMENT_LABEL_MCP_PROMPT="MCP Prompt",ATTACHMENT_LABEL_MCP_RESOURCE="MCP Resource",AUTO_SCROLL_INTERVAL=100,AUTO_SCROLL_AT_BOTTOM_THRESHOLD=10,DEFAULT_BINARY_DETECTION_OPTIONS={ prefixLength:1024*10,suspiciousCharThresholdRatio:.15,maxAbsoluteNullBytes:2},DEFAULT_CACHE_TTL_MS=300*1e3,DEFAULT_CACHE_MAX_ENTRIES=100,MODEL_PROPS_CACHE_TTL_MS=600*1e3,MODEL_PROPS_CACHE_MAX_ENTRIES=50,MCP_RESOURCE_CACHE_MAX_ENTRIES=50,MCP_RESOURCE_CACHE_TTL_MS=300*1e3,MAX_INACTIVE_CONVERSATION_STATES=10,INACTIVE_CONVERSATION_STATE_MAX_AGE_MS=1800*1e3,INITIAL_FILE_SIZE=0,PROMPT_CONTENT_SEPARATOR=` `,CLIPBOARD_CONTENT_QUOTE_PREFIX='"',PROMPT_TRIGGER_PREFIX="/",RESOURCE_TRIGGER_PREFIX="@",CODE_BLOCK_SCROLL_CONTAINER_CLASS="code-block-scroll-container",CODE_BLOCK_WRAPPER_CLASS="code-block-wrapper",CODE_BLOCK_HEADER_CLASS="code-block-header",CODE_BLOCK_ACTIONS_CLASS="code-block-actions",CODE_LANGUAGE_CLASS="code-language",COPY_CODE_BTN_CLASS="copy-code-btn",PREVIEW_CODE_BTN_CLASS="preview-code-btn",RELATIVE_CLASS="relative",NEWLINE=` `,DEFAULT_LANGUAGE="text",LANG_PATTERN=/^(\w*)\n?/,AMPERSAND_REGEX=/&/g,LT_REGEX=//g,FENCE_PATTERN=/^```|\n```/g,CONTEXT_KEY_MESSAGE_EDIT="chat-message-edit",CONTEXT_KEY_CHAT_ACTIONS="chat-actions",CONTEXT_KEY_CHAT_SETTINGS_DIALOG="chat-settings-dialog",BOX_BORDER="border border-border/30 focus-within:border-border dark:border-border/20 dark:focus-within:border-border",INPUT_CLASSES=` bg-muted/60 dark:bg-muted/75 ${BOX_BORDER} shadow-sm outline-none text-foreground `,PANEL_CLASSES=` bg-background border border-border/30 dark:border-border/20 shadow-sm backdrop-blur-lg! rounded-t-lg! `,CHAT_FORM_POPOVER_MAX_HEIGHT="max-h-80",GOOGLE_FAVICON_BASE_URL="https://www.google.com/s2/favicons",DEFAULT_FAVICON_SIZE=32,DOMAIN_SEPARATOR=".",ROOT_DOMAIN_MIN_PARTS=2,MS_PER_SECOND=1e3,SECONDS_PER_MINUTE=60,SECONDS_PER_HOUR=3600,SHORT_DURATION_THRESHOLD=1,MEDIUM_DURATION_THRESHOLD=10,DEFAULT_PERFORMANCE_TIME="0s",KEY_VALUE_PAIR_KEY_MAX_LENGTH=256,KEY_VALUE_PAIR_VALUE_MAX_LENGTH=8192,KEY_VALUE_PAIR_UNSAFE_KEY_RE=/[\x00-\x1F\x7F]/g,KEY_VALUE_PAIR_UNSAFE_VALUE_RE=/[\x00-\x08\x0A-\x0D\x0E-\x1F\x7F]/g, FILE_TYPE_ICONS={[FileTypeCategory.IMAGE]:Image$1,[FileTypeCategory.AUDIO]:Mic,[FileTypeCategory.TEXT]:File_text,[FileTypeCategory.PDF]:File$1},MODALITY_ICONS={[ModelModality.VISION]:Eye,[ModelModality.AUDIO]:Mic},MODALITY_LABELS={[ModelModality.VISION]:"Vision",[ModelModality.AUDIO]:"Audio"},CODE_BLOCK_REGEXP=/(```[\s\S]*?```|`[^`\n]+`)/g,LATEX_MATH_AND_CODE_PATTERN=new RegExp("(```[\\S\\s]*?```|`.*?`)|(?--api-key option for the server.",systemMessage:"The starting message that defines how model should behave.",showSystemMessage:"Display the system message at the top of each conversation.",theme:"Choose the color theme for the interface. You can choos\ e between System (follows your device settings), Light, or Dark.",pasteLongTextToFileLen:"On pasting long text, it will be converted to a file. You can control the file length by setting the value of this parameter. Value 0 means disable.",copyTextAttachmentsAsPlainText:"When copying a message with text attachments, combine them into a single plain text string instead of a special format that can be pasted back as attachments.",samplers:'The order at which samplers are applied, in simplified way\ . Default is "top_k;typ_p;top_p;min_p;temperature": top_k->typ_p->top_p->min_p->temperature',backend_sampling:"Enable backend-based samplers. When enabled, supported samplers run on the accelerator backend for faster sampling.",temperature:"Controls the randomness of the generated text by affecting the probability distribution of the output tokens. Higher = more random, lower = more focused.",dynatemp_range:"Addon for the temperature sampler. The added value to the range of dynamic temperature, \ which adjusts probabilities by entropy of tokens.",dynatemp_exponent:"Addon for the temperature sampler. Smoothes out the probability redistribution based on the most probable token.",top_k:"Keeps only k top tokens.",top_p:"Limits tokens to those that together have a cumulative probability of at least p",min_p:"Limits tokens based on the minimum probability for a token to be considered, relative to the probability of the most likely token.",xtc_probability:"XTC sampler cuts out top tokens; this \ parameter controls the chance of cutting tokens at all. 0 disables XTC.",xtc_threshold:"XTC sampler cuts out top tokens; this parameter controls the token probability that is required to cut that token.",typ_p:"Sorts and limits tokens based on the difference between log-probability and entropy.",repeat_last_n:"Last n tokens to consider for penalizing repetition",repeat_penalty:"Controls the repetition of token sequences in the generated text",presence_penalty:"Limits tokens based on whether they\ appear in the output or not.",frequency_penalty:"Limits tokens based on how often they appear in the output.",dry_multiplier:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the DRY sampling multiplier.",dry_base:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the DRY sampling base value.",dry_allowed_length:"DRY sampling reduces repetition in generated text even across long contexts. This paramet\ er sets the allowed length for DRY sampling.",dry_penalty_last_n:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets DRY penalty for the last n tokens.",max_tokens:"The maximum number of token per output. Use -1 for infinite (no limit).",custom:"Custom JSON parameters to send to the API. Must be valid JSON format.",showThoughtInProgress:"Expand thought process by default when generating messages.",disableReasoningParsing:"Send reasoning_format=none s\ o the server returns thinking tokens inline instead of extracting them into a separate field.",excludeReasoningFromContext:"Strip thinking from previous messages before sending. When off, thinking is sent back via the reasoning_content field so the model sees its own chain-of-thought across turns.",showRawOutputSwitch:"Show toggle button to display messages as plain text instead of Markdown-formatted content",keepStatsVisible:"Keep processing statistics visible after generation finishes.",showMessageStats:"\ Display generation statistics (tokens/second, token count, duration) below each assistant message.",askForTitleConfirmation:"Ask for confirmation before automatically changing conversation title when editing the first message.",pdfAsImage:"Parse PDF as image instead of text. Automatically falls back to text processing for non-vision models.",disableAutoScroll:"Disable automatic scrolling while messages stream so you can control the viewport position manually.",renderUserContentAsMarkdown:"Render\ user messages using markdown formatting in the chat.",alwaysShowSidebarOnDesktop:"Always keep the sidebar visible on desktop instead of auto-hiding it.",autoShowSidebarOnNewChat:"Automatically show sidebar when starting a new chat. Disable to keep the sidebar hidden until you click on it.",sendOnEnter:"Use Enter to send messages and Shift + Enter for new lines. When disabled, use Ctrl/Cmd + Enter.",autoMicOnEmpty:"Automatically show microphone button instead of send button when textarea is empt\ y for models with audio modality support.",fullHeightCodeBlocks:"Always display code blocks at their full natural height, overriding any height limits.",showRawModelNames:'Display full raw model identifiers (e.g. "ggml-org/GLM-4.7-Flash-GGUF:Q8_0") instead of parsed names with badges.',mcpServers:"Configure MCP servers as a JSON list. Use the form in the MCP Client settings section to edit.",mcpServerUsageStats:"Usage statistics for MCP servers. Tracks how many times tools from each server have \ been used.",agenticMaxTurns:"Maximum number of tool execution cycles before stopping (prevents infinite loops).",agenticMaxToolPreviewLines:"Number of lines shown in tool output previews (last N lines). Only these previews and the final LLM response persist after the agentic loop completes.",showToolCallInProgress:"Automatically expand tool call details while executing and keep them expanded after completion.",pyInterpreterEnabled:"Enable Python interpreter using Pyodide. Allows running Python c\ ode in markdown code blocks.",preEncodeConversation:"After each response, re-submit the conversation to pre-fill the server KV cache. Makes the next turn faster since the prompt is already encoded while you read the response.",enableContinueGeneration:'Enable "Continue" button for assistant messages. Currently works only with non-reasoning models.'},SETTINGS_COLOR_MODES_CONFIG=[{value:ColorMode.SYSTEM,label:"System",icon:Monitor},{value:ColorMode.LIGHT,label:"Light",icon:Sun},{value:ColorMode.DARK, label:"Dark",icon:Moon}],NUMERIC_FIELDS=["temperature","top_k","top_p","min_p","max_tokens","pasteLongTextToFileLen","dynatemp_range","dynatemp_exponent","typ_p","xtc_probability","xtc_threshold","repeat_last_n","repeat_penalty","presence_penalty","frequency_penalty","dry_multiplier","dry_base","dry_allowed_length","dry_penalty_last_n","agenticMaxTurns","agenticMaxToolPreviewLines"],POSITIVE_INTEGER_FIELDS=["agenticMaxTurns","agenticMaxToolPreviewLines"],SETTINGS_KEYS={THEME:"theme",API_KEY:"api\ Key",SYSTEM_MESSAGE:"systemMessage",PASTE_LONG_TEXT_TO_FILE_LEN:"pasteLongTextToFileLen",COPY_TEXT_ATTACHMENTS_AS_PLAIN_TEXT:"copyTextAttachmentsAsPlainText",SEND_ON_ENTER:"sendOnEnter",ENABLE_CONTINUE_GENERATION:"enableContinueGeneration",PDF_AS_IMAGE:"pdfAsImage",ASK_FOR_TITLE_CONFIRMATION:"askForTitleConfirmation",SHOW_MESSAGE_STATS:"showMessageStats",SHOW_THOUGHT_IN_PROGRESS:"showThoughtInProgress",KEEP_STATS_VISIBLE:"keepStatsVisible",AUTO_MIC_ON_EMPTY:"autoMicOnEmpty",RENDER_USER_CONTENT_AS_MARKDOWN:"\ renderUserContentAsMarkdown",DISABLE_AUTO_SCROLL:"disableAutoScroll",ALWAYS_SHOW_SIDEBAR_ON_DESKTOP:"alwaysShowSidebarOnDesktop",AUTO_SHOW_SIDEBAR_ON_NEW_CHAT:"autoShowSidebarOnNewChat",FULL_HEIGHT_CODE_BLOCKS:"fullHeightCodeBlocks",SHOW_RAW_MODEL_NAMES:"showRawModelNames",TEMPERATURE:"temperature",DYNATEMP_RANGE:"dynatemp_range",DYNATEMP_EXPONENT:"dynatemp_exponent",TOP_K:"top_k",TOP_P:"top_p",MIN_P:"min_p",XTC_PROBABILITY:"xtc_probability",XTC_THRESHOLD:"xtc_threshold",TYP_P:"typ_p",MAX_TOKENS:"\ max_tokens",SAMPLERS:"samplers",BACKEND_SAMPLING:"backend_sampling",REPEAT_LAST_N:"repeat_last_n",REPEAT_PENALTY:"repeat_penalty",PRESENCE_PENALTY:"presence_penalty",FREQUENCY_PENALTY:"frequency_penalty",DRY_MULTIPLIER:"dry_multiplier",DRY_BASE:"dry_base",DRY_ALLOWED_LENGTH:"dry_allowed_length",DRY_PENALTY_LAST_N:"dry_penalty_last_n",AGENTIC_MAX_TURNS:"agenticMaxTurns",ALWAYS_SHOW_AGENTIC_TURNS:"alwaysShowAgenticTurns",AGENTIC_MAX_TOOL_PREVIEW_LINES:"agenticMaxToolPreviewLines",SHOW_TOOL_CALL_IN_PROGRESS:"\ showToolCallInProgress",PRE_ENCODE_CONVERSATION:"preEncodeConversation",DISABLE_REASONING_PARSING:"disableReasoningParsing",EXCLUDE_REASONING_FROM_CONTEXT:"excludeReasoningFromContext",SHOW_RAW_OUTPUT_SWITCH:"showRawOutputSwitch",CUSTOM:"custom"},SETTINGS_SECTION_TITLES={GENERAL:"General",DISPLAY:"Display",SAMPLING:"Sampling",PENALTIES:"Penalties",IMPORT_EXPORT:"Import/Export",MCP:"MCP",DEVELOPER:"Developer"};FileTypeAudio.MP3+"",FileExtensionAudio.MP3,MimeTypeAudio.MP3_MPEG,MimeTypeAudio.MP3,FileTypeAudio. WAV+"",FileExtensionAudio.WAV,MimeTypeAudio.WAV;FileTypeImage.JPEG+"",FileExtensionImage.JPG,FileExtensionImage.JPEG,MimeTypeImage.JPEG,FileTypeImage.PNG+"",FileExtensionImage.PNG,MimeTypeImage.PNG,FileTypeImage.GIF+"",FileExtensionImage.GIF,MimeTypeImage.GIF,FileTypeImage.WEBP+"",FileExtensionImage.WEBP,MimeTypeImage.WEBP,FileTypeImage.SVG+"",FileExtensionImage.SVG,MimeTypeImage.SVG;FileTypePdf.PDF+"",FileExtensionPdf.PDF,MimeTypeApplication.PDF;FileTypeText.PLAIN_TEXT+"",FileExtensionText.TXT, MimeTypeText.PLAIN,FileTypeText.MARKDOWN+"",FileExtensionText.MD,MimeTypeText.MARKDOWN,FileTypeText.ASCIIDOC+"",FileExtensionText.ADOC,MimeTypeText.ASCIIDOC,FileTypeText.JAVASCRIPT+"",FileExtensionText.JS,MimeTypeText.JAVASCRIPT,MimeTypeText.JAVASCRIPT_APP,FileTypeText.TYPESCRIPT+"",FileExtensionText.TS,MimeTypeText.TYPESCRIPT,FileTypeText.JSX+"",FileExtensionText.JSX,MimeTypeText.JSX,FileTypeText.TSX+"",FileExtensionText.TSX,MimeTypeText.TSX,FileTypeText.CSS+"",FileExtensionText.CSS,MimeTypeText. CSS,FileTypeText.HTML+"",FileExtensionText.HTML,FileExtensionText.HTM,MimeTypeText.HTML,FileTypeText.JSON+"",FileExtensionText.JSON,MimeTypeText.JSON,FileTypeText.XML+"",FileExtensionText.XML,MimeTypeText.XML_TEXT,MimeTypeText.XML_APP,FileTypeText.YAML+"",FileExtensionText.YAML,FileExtensionText.YML,MimeTypeText.YAML_TEXT,MimeTypeText.YAML_APP,FileTypeText.CSV+"",FileExtensionText.CSV,MimeTypeText.CSV,FileTypeText.LOG+"",FileExtensionText.LOG,MimeTypeText.PLAIN,FileTypeText.PYTHON+"",FileExtensionText. PY,MimeTypeText.PYTHON,FileTypeText.JAVA+"",FileExtensionText.JAVA,MimeTypeText.JAVA,FileTypeText.CPP+"",FileExtensionText.CPP,FileExtensionText.C,FileExtensionText.H,FileExtensionText.HPP,MimeTypeText.CPP_SRC,MimeTypeText.CPP_HDR,MimeTypeText.C_SRC,MimeTypeText.C_HDR,FileTypeText.PHP+"",FileExtensionText.PHP,MimeTypeText.PHP,FileTypeText.RUBY+"",FileExtensionText.RB,MimeTypeText.RUBY,FileTypeText.GO+"",FileExtensionText.GO,MimeTypeText.GO,FileTypeText.RUST+"",FileExtensionText.RS,MimeTypeText.RUST, FileTypeText.SHELL+"",FileExtensionText.SH,FileExtensionText.BAT,MimeTypeText.SHELL,MimeTypeText.BAT,FileTypeText.SQL+"",FileExtensionText.SQL,MimeTypeText.SQL,FileTypeText.R+"",FileExtensionText.R,MimeTypeText.R,FileTypeText.SCALA+"",FileExtensionText.SCALA,MimeTypeText.SCALA,FileTypeText.KOTLIN+"",FileExtensionText.KT,MimeTypeText.KOTLIN,FileTypeText.SWIFT+"",FileExtensionText.SWIFT,MimeTypeText.SWIFT,FileTypeText.DART+"",FileExtensionText.DART,MimeTypeText.DART,FileTypeText.VUE+"",FileExtensionText. VUE,MimeTypeText.VUE,FileTypeText.SVELTE+"",FileExtensionText.SVELTE,MimeTypeText.SVELTE,FileTypeText.LATEX+"",FileExtensionText.TEX,MimeTypeText.LATEX,MimeTypeText.TEX,MimeTypeText.TEX_APP,FileTypeText.BIBTEX+"",FileExtensionText.BIB,MimeTypeText.BIBTEX,FileTypeText.CUDA+"",FileExtensionText.CU,FileExtensionText.CUH,MimeTypeText.CUDA,FileTypeText.VULKAN+"",FileExtensionText.COMP,MimeTypeText.PLAIN,FileTypeText.HASKELL+"",FileExtensionText.HS,MimeTypeText.HASKELL,FileTypeText.CSHARP+"",FileExtensionText. CS,MimeTypeText.CSHARP,FileTypeText.PROPERTIES+"",FileExtensionText.PROPERTIES,MimeTypeText.PROPERTIES;const BR_PATTERN=//gi,LIST_PATTERN=/^
    ([\s\S]*)<\/ul>$/i,LI_PATTERN=/
  • ([\s\S]*?)<\/li>/gi,TOOLTIP_DELAY_DURATION=500,FORK_TREE_DEPTH_PADDING=8,SYSTEM_MESSAGE_PLACEHOLDER="System message",URI_SCHEME_SEPARATOR="://",TEMPLATE_EXPRESSION_REGEX=/\{([+#./;?&]?)([^}]+)\}/g,URI_TEMPLATE_OPERATORS={RESERVED:"+",FRAGMENT:"#",PATH_SEGMENT:"/",LABEL:".",PATH_PARAM:";",FORM_QUERY:"?",FORM_CONTINUATION:"\ &"},URI_TEMPLATE_SEPARATORS={COMMA:",",SLASH:"/",PERIOD:".",SEMICOLON:";",QUERY_PREFIX:"?",QUERY_CONTINUATION:"&"},VARIABLE_EXPLODE_MODIFIER_REGEX=/[*]$/,VARIABLE_PREFIX_MODIFIER_REGEX=/:[\d]+$/,LEADING_SLASHES_REGEX=/^\/+/,DEFAULT_MOBILE_BREAKPOINT=768;class IsMobile extends MediaQuery{constructor(breakpoint=DEFAULT_MOBILE_BREAKPOINT){super(`max-width: ${breakpoint-1}px`)}}const SYNCABLE_PARAMETERS=[{key:"temperature",serverKey:"temperature",type:SyncableParameterType.NUMBER,canSync:!0},{key:"t\ op_k",serverKey:"top_k",type:SyncableParameterType.NUMBER,canSync:!0},{key:"top_p",serverKey:"top_p",type:SyncableParameterType.NUMBER,canSync:!0},{key:"min_p",serverKey:"min_p",type:SyncableParameterType.NUMBER,canSync:!0},{key:"dynatemp_range",serverKey:"dynatemp_range",type:SyncableParameterType.NUMBER,canSync:!0},{key:"dynatemp_exponent",serverKey:"dynatemp_exponent",type:SyncableParameterType.NUMBER,canSync:!0},{key:"xtc_probability",serverKey:"xtc_probability",type:SyncableParameterType.NUMBER, canSync:!0},{key:"xtc_threshold",serverKey:"xtc_threshold",type:SyncableParameterType.NUMBER,canSync:!0},{key:"typ_p",serverKey:"typ_p",type:SyncableParameterType.NUMBER,canSync:!0},{key:"repeat_last_n",serverKey:"repeat_last_n",type:SyncableParameterType.NUMBER,canSync:!0},{key:"repeat_penalty",serverKey:"repeat_penalty",type:SyncableParameterType.NUMBER,canSync:!0},{key:"presence_penalty",serverKey:"presence_penalty",type:SyncableParameterType.NUMBER,canSync:!0},{key:"frequency_penalty",serverKey:"\ frequency_penalty",type:SyncableParameterType.NUMBER,canSync:!0},{key:"dry_multiplier",serverKey:"dry_multiplier",type:SyncableParameterType.NUMBER,canSync:!0},{key:"dry_base",serverKey:"dry_base",type:SyncableParameterType.NUMBER,canSync:!0},{key:"dry_allowed_length",serverKey:"dry_allowed_length",type:SyncableParameterType.NUMBER,canSync:!0},{key:"dry_penalty_last_n",serverKey:"dry_penalty_last_n",type:SyncableParameterType.NUMBER,canSync:!0},{key:"max_tokens",serverKey:"max_tokens",type:SyncableParameterType. NUMBER,canSync:!0},{key:"samplers",serverKey:"samplers",type:SyncableParameterType.STRING,canSync:!0},{key:"backend_sampling",serverKey:"backend_sampling",type:SyncableParameterType.BOOLEAN,canSync:!0},{key:"pasteLongTextToFileLen",serverKey:"pasteLongTextToFileLen",type:SyncableParameterType.NUMBER,canSync:!0},{key:"pdfAsImage",serverKey:"pdfAsImage",type:SyncableParameterType.BOOLEAN,canSync:!0},{key:"showThoughtInProgress",serverKey:"showThoughtInProgress",type:SyncableParameterType.BOOLEAN,canSync:!0}, {key:"keepStatsVisible",serverKey:"keepStatsVisible",type:SyncableParameterType.BOOLEAN,canSync:!0},{key:"showMessageStats",serverKey:"showMessageStats",type:SyncableParameterType.BOOLEAN,canSync:!0},{key:"askForTitleConfirmation",serverKey:"askForTitleConfirmation",type:SyncableParameterType.BOOLEAN,canSync:!0},{key:"disableAutoScroll",serverKey:"disableAutoScroll",type:SyncableParameterType.BOOLEAN,canSync:!0},{key:"renderUserContentAsMarkdown",serverKey:"renderUserContentAsMarkdown",type:SyncableParameterType. BOOLEAN,canSync:!0},{key:"autoMicOnEmpty",serverKey:"autoMicOnEmpty",type:SyncableParameterType.BOOLEAN,canSync:!0},{key:"pyInterpreterEnabled",serverKey:"pyInterpreterEnabled",type:SyncableParameterType.BOOLEAN,canSync:!0},{key:"enableContinueGeneration",serverKey:"enableContinueGeneration",type:SyncableParameterType.BOOLEAN,canSync:!0},{key:"fullHeightCodeBlocks",serverKey:"fullHeightCodeBlocks",type:SyncableParameterType.BOOLEAN,canSync:!0},{key:"systemMessage",serverKey:"systemMessage",type:SyncableParameterType. STRING,canSync:!0},{key:"showSystemMessage",serverKey:"showSystemMessage",type:SyncableParameterType.BOOLEAN,canSync:!0},{key:"theme",serverKey:"theme",type:SyncableParameterType.STRING,canSync:!0},{key:"copyTextAttachmentsAsPlainText",serverKey:"copyTextAttachmentsAsPlainText",type:SyncableParameterType.BOOLEAN,canSync:!0},{key:"showRawOutputSwitch",serverKey:"showRawOutputSwitch",type:SyncableParameterType.BOOLEAN,canSync:!0},{key:"alwaysShowSidebarOnDesktop",serverKey:"alwaysShowSidebarOnDesk\ top",type:SyncableParameterType.BOOLEAN,canSync:!0},{key:"autoShowSidebarOnNewChat",serverKey:"autoShowSidebarOnNewChat",type:SyncableParameterType.BOOLEAN,canSync:!0},{key:"showRawModelNames",serverKey:"showRawModelNames",type:SyncableParameterType.BOOLEAN,canSync:!0},{key:"mcpServers",serverKey:"mcpServers",type:SyncableParameterType.STRING,canSync:!0},{key:"agenticMaxTurns",serverKey:"agenticMaxTurns",type:SyncableParameterType.NUMBER,canSync:!0},{key:"agenticMaxToolPreviewLines",serverKey:"a\ genticMaxToolPreviewLines",type:SyncableParameterType.NUMBER,canSync:!0},{key:"showToolCallInProgress",serverKey:"showToolCallInProgress",type:SyncableParameterType.BOOLEAN,canSync:!0},{key:"alwaysShowAgenticTurns",serverKey:"alwaysShowAgenticTurns",type:SyncableParameterType.BOOLEAN,canSync:!0},{key:"excludeReasoningFromContext",serverKey:"excludeReasoningFromContext",type:SyncableParameterType.BOOLEAN,canSync:!0},{key:"sendOnEnter",serverKey:"sendOnEnter",type:SyncableParameterType.BOOLEAN,canSync:!0}]; class ParameterSyncService{static roundFloatingPoint(value){return normalizeFloatingPoint(value)}static extractServerDefaults(serverParams,webuiSettings){const extracted={};if(serverParams){for(const param of SYNCABLE_PARAMETERS)if(param.canSync&¶m.serverKey in serverParams){const value=serverParams[param.serverKey];value!==void 0&&(extracted[param.key]=this.roundFloatingPoint(value))}serverParams.samplers&&Array.isArray(serverParams.samplers)&&(extracted.samplers=serverParams.samplers.join( ";"))}if(webuiSettings){for(const param of SYNCABLE_PARAMETERS)if(param.canSync&¶m.serverKey in webuiSettings){const value=webuiSettings[param.serverKey];value!==void 0&&(extracted[param.key]=this.roundFloatingPoint(value))}}return extracted}static mergeWithServerDefaults(currentSettings,serverDefaults,userOverrides=new Set){const merged={...currentSettings};for(const[key2,serverValue]of Object.entries(serverDefaults))userOverrides.has(key2)||(merged[key2]=this.roundFloatingPoint(serverValue)); return merged}static getParameterInfo(key2,currentValue,propsDefaults,userOverrides){const hasPropsDefault=propsDefaults[key2]!==void 0,isUserOverride=userOverrides.has(key2),source2=isUserOverride?ParameterSource.CUSTOM:ParameterSource.DEFAULT;return{value:currentValue,source:source2,serverDefault:hasPropsDefault?propsDefaults[key2]:void 0,userOverride:isUserOverride?currentValue:void 0}}static canSyncParameter(key2){return SYNCABLE_PARAMETERS.some(param=>param.key===key2&¶m.canSync)}static getSyncableParameterKeys(){ return SYNCABLE_PARAMETERS.filter(param=>param.canSync).map(param=>param.key)}static validateServerParameter(key2,value){const param=SYNCABLE_PARAMETERS.find(p2=>p2.key===key2);if(!param)return!1;switch(param.type){case SyncableParameterType.NUMBER:return typeof value=="number"&&!isNaN(value);case SyncableParameterType.STRING:return typeof value=="string";case SyncableParameterType.BOOLEAN:return typeof value=="boolean";default:return!1}}static createParameterDiff(currentSettings,serverDefaults){ const diff2={};for(const key2 of this.getSyncableParameterKeys()){const currentValue=currentSettings[key2],serverValue=serverDefaults[key2];serverValue!==void 0&&(diff2[key2]={current:currentValue,server:serverValue,differs:currentValue!==serverValue})}return diff2}}class PropsService{static async fetch(autoload=!1){const params={};return autoload||(params.autoload="false"),apiFetchWithParams("./props",params,{authOnly:!0})}static async fetchForModel(modelId,autoload=!1){const params={model:modelId}; return autoload||(params.autoload="false"),apiFetchWithParams("./props",params,{authOnly:!0})}}class ServerStore{#props=state$1(null);get props(){return get$4(this.#props)}set props(value){set$1(this.#props,value,!0)}#loading=state$1(!1);get loading(){return get$4(this.#loading)}set loading(value){set$1(this.#loading,value,!0)}#error=state$1(null);get error(){return get$4(this.#error)}set error(value){set$1(this.#error,value,!0)}#role=state$1(null);get role(){return get$4(this.#role)}set role(value){ set$1(this.#role,value,!0)}fetchPromise=null;get defaultParams(){return this.props?.default_generation_settings?.params||null}get contextSize(){const nCtx=this.props?.default_generation_settings?.n_ctx;return typeof nCtx=="number"?nCtx:null}get webuiSettings(){return this.props?.webui_settings}get isRouterMode(){return this.role===ServerRole.ROUTER}get isModelMode(){return this.role===ServerRole.MODEL}async fetch(){if(this.fetchPromise)return this.fetchPromise;this.loading=!0,this.error=null;const fetchPromise=(async()=>{ try{const props=await PropsService.fetch();this.props=props,this.error=null,this.detectRole(props)}catch(error2){this.error=this.getErrorMessage(error2),console.error("Error fetching server properties:",error2)}finally{this.loading=!1,this.fetchPromise=null}})();this.fetchPromise=fetchPromise,await fetchPromise}getErrorMessage(error2){if(error2 instanceof Error){const message=error2.message||"";if(error2.name==="TypeError"&&message.includes("fetch"))return"Server is not running or unreachable";if(message. includes("ECONNREFUSED"))return"Connection refused - server may be offline";if(message.includes("ENOTFOUND"))return"Server not found - check server address";if(message.includes("ETIMEDOUT"))return"Request timed out";if(message.includes("503"))return"Server temporarily unavailable";if(message.includes("500"))return"Server error - check server logs";if(message.includes("404"))return"Server endpoint not found";if(message.includes("403")||message.includes("401"))return"Access denied"}return"Failed t\ o connect to server"}clear(){this.props=null,this.error=null,this.loading=!1,this.role=null,this.fetchPromise=null}detectRole(props){const newRole=props?.role===ServerRole.ROUTER?ServerRole.ROUTER:ServerRole.MODEL;this.role!==newRole&&(this.role=newRole,console.info(`Server running in ${newRole===ServerRole.ROUTER?"ROUTER":"MODEL"} mode`))}}const serverStore=new ServerStore,serverProps=()=>serverStore.props,serverLoading=()=>serverStore.loading,serverError=()=>serverStore.error,contextSize=()=>serverStore. contextSize,isRouterMode=()=>serverStore.isRouterMode;class SettingsStore{#config=state$1(proxy({...SETTING_CONFIG_DEFAULT}));get config(){return get$4(this.#config)}set config(value){set$1(this.#config,value,!0)}#theme=state$1("auto");get theme(){return get$4(this.#theme)}set theme(value){set$1(this.#theme,value,!0)}#isInitialized=state$1(!1);get isInitialized(){return get$4(this.#isInitialized)}set isInitialized(value){set$1(this.#isInitialized,value,!0)}#userOverrides=state$1(proxy(new Set));get userOverrides(){ return get$4(this.#userOverrides)}set userOverrides(value){set$1(this.#userOverrides,value,!0)}getServerDefaults(){const serverParams=serverStore.defaultParams,webuiSettings=serverStore.webuiSettings;return ParameterSyncService.extractServerDefaults(serverParams,webuiSettings)}constructor(){this.initialize()}initialize(){try{this.loadConfig(),this.loadTheme(),this.isInitialized=!0}catch(error2){console.error("Failed to initialize settings store:",error2)}}loadConfig(){try{const storedConfigRaw=localStorage. getItem(CONFIG_LOCALSTORAGE_KEY),savedVal=JSON.parse(storedConfigRaw||"{}");this.config={...SETTING_CONFIG_DEFAULT,...savedVal},"sendOnEnter"in savedVal||new IsMobile().current&&(this.config.sendOnEnter=!1);const savedOverrides=JSON.parse(localStorage.getItem(USER_OVERRIDES_LOCALSTORAGE_KEY)||"[]");this.userOverrides=new Set(savedOverrides)}catch(error2){console.warn("Failed to parse config from localStorage, using defaults:",error2),this.config={...SETTING_CONFIG_DEFAULT},this.userOverrides=new Set}}loadTheme(){ this.theme=localStorage.getItem("theme")||"auto"}updateConfig(key2,value){if(this.config[key2]=value,ParameterSyncService.canSyncParameter(key2)){const propsDefault=this.getServerDefaults()[key2];if(propsDefault!==void 0){const normalizedValue=normalizeFloatingPoint(value),normalizedDefault=normalizeFloatingPoint(propsDefault);normalizedValue===normalizedDefault?this.userOverrides.delete(key2):this.userOverrides.add(key2)}}this.saveConfig()}updateMultipleConfig(updates){Object.assign(this.config, updates);const propsDefaults=this.getServerDefaults();for(const[key2,value]of Object.entries(updates))if(ParameterSyncService.canSyncParameter(key2)){const propsDefault=propsDefaults[key2];if(propsDefault!==void 0){const normalizedValue=normalizeFloatingPoint(value),normalizedDefault=normalizeFloatingPoint(propsDefault);normalizedValue===normalizedDefault?this.userOverrides.delete(key2):this.userOverrides.add(key2)}}this.saveConfig()}saveConfig(){try{localStorage.setItem(CONFIG_LOCALSTORAGE_KEY, JSON.stringify(this.config)),localStorage.setItem(USER_OVERRIDES_LOCALSTORAGE_KEY,JSON.stringify(Array.from(this.userOverrides)))}catch(error2){console.error("Failed to save config to localStorage:",error2)}}updateTheme(newTheme){this.theme=newTheme,this.saveTheme()}saveTheme(){try{this.theme==="auto"?localStorage.removeItem("theme"):localStorage.setItem("theme",this.theme)}catch(error2){console.error("Failed to save theme to localStorage:",error2)}}resetConfig(){this.config={...SETTING_CONFIG_DEFAULT}, this.saveConfig()}resetTheme(){this.theme="auto",this.saveTheme()}resetAll(){this.resetConfig(),this.resetTheme()}resetParameterToServerDefault(key2){const serverDefaults=this.getServerDefaults(),webuiSettings=serverStore.webuiSettings;webuiSettings&&key2 in webuiSettings?setConfigValue(this.config,key2,webuiSettings[key2]):serverDefaults[key2]!==void 0?setConfigValue(this.config,key2,""):key2 in SETTING_CONFIG_DEFAULT&&setConfigValue(this.config,key2,getConfigValue(SETTING_CONFIG_DEFAULT,key2)), this.userOverrides.delete(key2),this.saveConfig()}syncWithServerDefaults(){const propsDefaults=this.getServerDefaults();if(Object.keys(propsDefaults).length===0)return;for(const[key2,propsValue]of Object.entries(propsDefaults)){const currentValue=getConfigValue(this.config,key2),normalizedCurrent=normalizeFloatingPoint(currentValue),normalizedDefault=normalizeFloatingPoint(propsValue);normalizedCurrent===normalizedDefault&&this.userOverrides.delete(key2)}const webuiSettings=serverStore.webuiSettings; if(webuiSettings)for(const[key2,value]of Object.entries(webuiSettings))!this.userOverrides.has(key2)&&value!==void 0&&setConfigValue(this.config,key2,value);this.saveConfig(),console.log("User overrides after sync:",Array.from(this.userOverrides))}forceSyncWithServerDefaults(){const propsDefaults=this.getServerDefaults(),webuiSettings=serverStore.webuiSettings;for(const key2 of ParameterSyncService.getSyncableParameterKeys())webuiSettings&&key2 in webuiSettings?setConfigValue(this.config,key2,webuiSettings[key2]): propsDefaults[key2]!==void 0?setConfigValue(this.config,key2,""):key2 in SETTING_CONFIG_DEFAULT&&setConfigValue(this.config,key2,getConfigValue(SETTING_CONFIG_DEFAULT,key2)),this.userOverrides.delete(key2);this.saveConfig()}getConfig(key2){return this.config[key2]}getAllConfig(){return{...this.config}}canSyncParameter(key2){return ParameterSyncService.canSyncParameter(key2)}getParameterInfo(key2){const propsDefaults=this.getServerDefaults(),currentValue=getConfigValue(this.config,key2);return ParameterSyncService. getParameterInfo(key2,currentValue??"",propsDefaults,this.userOverrides)}getParameterDiff(){const serverDefaults=this.getServerDefaults();if(Object.keys(serverDefaults).length===0)return{};const configAsRecord=configToParameterRecord(this.config,ParameterSyncService.getSyncableParameterKeys());return ParameterSyncService.createParameterDiff(configAsRecord,serverDefaults)}clearAllUserOverrides(){this.userOverrides.clear(),this.saveConfig(),console.log("Cleared all user overrides")}}const settingsStore=new SettingsStore, config$1=()=>settingsStore.config;function getAuthHeaders(){const apiKey=config$1().apiKey?.toString().trim();return apiKey?{Authorization:`Bearer ${apiKey}`}:{}}function getJsonHeaders(){return{"Content-Type":"application/json",...getAuthHeaders()}}async function apiFetch(path2,options={}){const{authOnly=!1,headers:customHeaders,...fetchOptions}=options,headers={...authOnly?getAuthHeaders():getJsonHeaders(),...customHeaders},url2=path2.startsWith(UrlProtocol.HTTP)||path2.startsWith(UrlProtocol. HTTPS)?path2:`${base}${path2}`,response=await fetch(url2,{...fetchOptions,headers});if(!response.ok){const errorMessage=await parseErrorMessage(response);throw new Error(errorMessage)}return response.json()}async function apiFetchWithParams(basePath,params,options={}){const url2=new URL(basePath,window.location.href);for(const[key2,value]of Object.entries(params))value!=null&&url2.searchParams.set(key2,value);const{authOnly=!1,headers:customHeaders,...fetchOptions}=options,headers={...authOnly?getAuthHeaders(): getJsonHeaders(),...customHeaders},response=await fetch(url2.toString(),{...fetchOptions,headers});if(!response.ok){const errorMessage=await parseErrorMessage(response);throw new Error(errorMessage)}return response.json()}async function apiPost(path2,body2,options={}){return apiFetch(path2,{method:"POST",body:JSON.stringify(body2),...options})}async function parseErrorMessage(response){try{const errorData=await response.json();if(errorData?.error?.message)return errorData.error.message;if(errorData?. error&&typeof errorData.error=="string")return errorData.error;if(errorData?.message)return errorData.message}catch{}return`Request failed: ${response.status} ${response.statusText}`}function error(status,body2){throw new HttpError(status,body2)}async function validateApiKey(fetch2){try{const apiKey=config$1().apiKey,headers={"Content-Type":"application/json"};apiKey&&(headers.Authorization=`Bearer ${apiKey}`);const response=await fetch2(`${base}/props`,{headers});if(!response.ok){if(response.status=== 401||response.status===403)throw error(401,"Access denied");console.warn(`Server responded with status ${response.status} during API key validation`);return}}catch(err){if(err&&typeof err=="object"&&"status"in err)throw err;console.warn("Cannot connect to server for API key validation:",err)}}function isMcpPromptUpload(file){return file.type===SpecialFileType.MCP_PROMPT&&!!file.mcpPrompt}function isMcpPromptAttachment(attachment){return attachment.type===AttachmentType.MCP_PROMPT}function isMcpResourceAttachment(attachment){ return attachment.type===AttachmentType.MCP_RESOURCE}function getUploadedFileCategory$1(file){const categoryByMime=getFileTypeCategory(file.type);return categoryByMime||getFileTypeCategoryByExtension(file.name)}function getAttachmentDisplayItems(options){const{uploadedFiles=[],attachments=[]}=options,items2=[];for(const file of uploadedFiles)items2.push({id:file.id,name:file.name,size:file.size,preview:file.preview,isImage:getUploadedFileCategory$1(file)===FileTypeCategory.IMAGE,isMcpPrompt:isMcpPromptUpload( file),isLoading:file.isLoading,loadError:file.loadError,uploadedFile:file,textContent:file.textContent});for(const[index2,attachment]of attachments.entries()){const isImage2=isImageFile(attachment),isMcpPrompt=isMcpPromptAttachment(attachment),isMcpResource=isMcpResourceAttachment(attachment);items2.push({id:`attachment-${index2}`,name:attachment.name,preview:isImage2&&"base64Url"in attachment?attachment.base64Url:void 0,isImage:isImage2,isMcpPrompt,isMcpResource,attachment,attachmentIndex:index2, textContent:"content"in attachment?attachment.content:void 0})}return items2.reverse()}function getUploadedFileCategory(uploadedFile){const categoryByMime=getFileTypeCategory(uploadedFile.type);return categoryByMime||getFileTypeCategoryByExtension(uploadedFile.name)}function isTextFile(attachment,uploadedFile){return uploadedFile?getUploadedFileCategory(uploadedFile)===FileTypeCategory.TEXT:attachment?attachment.type===AttachmentType.TEXT||attachment.type===AttachmentType.LEGACY_CONTEXT:!1}function isImageFile(attachment,uploadedFile){ return uploadedFile?getUploadedFileCategory(uploadedFile)===FileTypeCategory.IMAGE:attachment?attachment.type===AttachmentType.IMAGE:!1}function isPdfFile$1(attachment,uploadedFile){return uploadedFile?getUploadedFileCategory(uploadedFile)===FileTypeCategory.PDF:attachment?attachment.type===AttachmentType.PDF:!1}function isAudioFile(attachment,uploadedFile){return uploadedFile?getUploadedFileCategory(uploadedFile)===FileTypeCategory.AUDIO:attachment?attachment.type===AttachmentType.AUDIO:!1}function autoResizeTextarea(textareaElement){ textareaElement&&(textareaElement.style.height="1rem",textareaElement.style.height=textareaElement.scrollHeight+"px")}function findMessageById(messages,id2){if(id2)return messages.find(m=>m.id===id2)}function filterByLeafNodeId(messages,leafNodeId,includeRoot=!1){const result=[],nodeMap=new Map;for(const msg of messages)nodeMap.set(msg.id,msg);let startNode=nodeMap.get(leafNodeId);if(!startNode){let latestTime=-1;for(const msg of messages)msg.timestamp>latestTime&&(startNode=msg,latestTime=msg.timestamp)} let currentNode=startNode;for(;currentNode&&((currentNode.type!=="root"||includeRoot)&&result.push(currentNode),currentNode.parent!==null);)currentNode=nodeMap.get(currentNode.parent);return result.sort((a,b)=>a.role===MessageRole.SYSTEM&&b.role!==MessageRole.SYSTEM?-1:a.role!==MessageRole.SYSTEM&&b.role===MessageRole.SYSTEM?1:a.timestamp-b.timestamp),result}function findLeafNode(messages,messageId){const nodeMap=new Map;for(const msg of messages)nodeMap.set(msg.id,msg);let currentNode=nodeMap.get( messageId);for(;currentNode&¤tNode.children.length>0;){const lastChildId=currentNode.children[currentNode.children.length-1];currentNode=nodeMap.get(lastChildId)}return currentNode?.id??messageId}function findDescendantMessages(messages,messageId){const nodeMap=new Map;for(const msg of messages)nodeMap.set(msg.id,msg);const descendants=[],queue=[messageId];for(;queue.length>0;){const currentId=queue.shift(),currentNode=nodeMap.get(currentId);if(currentNode)for(const childId of currentNode. children)descendants.push(childId),queue.push(childId)}return descendants}function getMessageSiblings(messages,messageId){const nodeMap=new Map;for(const msg of messages)nodeMap.set(msg.id,msg);const message=nodeMap.get(messageId);if(!message)return null;if(message.parent===null)return{message,siblingIds:[messageId],currentIndex:0,totalSiblings:1};const parentNode=nodeMap.get(message.parent);if(!parentNode)return{message,siblingIds:[messageId],currentIndex:0,totalSiblings:1};const siblingIds=parentNode. children,siblingLeafIds=siblingIds.map(siblingId=>findLeafNode(messages,siblingId)),currentIndex=siblingIds.indexOf(messageId);return{message,siblingIds:siblingLeafIds,currentIndex,totalSiblings:siblingIds.length}}var core$5,hasRequiredCore$4;function requireCore$4(){if(hasRequiredCore$4)return core$5;hasRequiredCore$4=1;function deepFreeze(obj){return obj instanceof Map?obj.clear=obj.delete=obj.set=function(){throw new Error("map is read-only")}:obj instanceof Set&&(obj.add=obj.clear=obj.delete= function(){throw new Error("set is read-only")}),Object.freeze(obj),Object.getOwnPropertyNames(obj).forEach(name=>{const prop2=obj[name],type2=typeof prop2;(type2==="object"||type2==="function")&&!Object.isFrozen(prop2)&&deepFreeze(prop2)}),obj}class Response2{constructor(mode){mode.data===void 0&&(mode.data={}),this.data=mode.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function escapeHTML(value){return value.replace(/&/g,"&").replace(//g,">").replace( /"/g,""").replace(/'/g,"'")}function inherit$1(original,...objects){const result=Object.create(null);for(const key2 in original)result[key2]=original[key2];return objects.forEach(function(obj){for(const key2 in obj)result[key2]=obj[key2]}),result}const SPAN_CLOSE="",emitsWrappingTags=node2=>!!node2.scope,scopeToCSSClass=(name,{prefix})=>{if(name.startsWith("language:"))return name.replace("language:","language-");if(name.includes(".")){const pieces=name.split(".");return[`${prefix}${pieces. shift()}`,...pieces.map((x,i)=>`${x}${"_".repeat(i+1)}`)].join(" ")}return`${prefix}${name}`};class HTMLRenderer{constructor(parseTree3,options){this.buffer="",this.classPrefix=options.classPrefix,parseTree3.walk(this)}addText(text2){this.buffer+=escapeHTML(text2)}openNode(node2){if(!emitsWrappingTags(node2))return;const className=scopeToCSSClass(node2.scope,{prefix:this.classPrefix});this.span(className)}closeNode(node2){emitsWrappingTags(node2)&&(this.buffer+=SPAN_CLOSE)}value(){return this.buffer}span(className){ this.buffer+=``}}const newNode=(opts={})=>{const result={children:[]};return Object.assign(result,opts),result};class TokenTree{constructor(){this.rootNode=newNode(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(node2){this.top.children.push(node2)}openNode(scope2){const node2=newNode({scope:scope2});this.add(node2),this.stack.push(node2)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){ for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(builder){return this.constructor._walk(builder,this.rootNode)}static _walk(builder,node2){return typeof node2=="string"?builder.addText(node2):node2.children&&(builder.openNode(node2),node2.children.forEach(child2=>this._walk(builder,child2)),builder.closeNode(node2)),builder}static _collapse(node2){typeof node2!="string"&&node2.children&&(node2.children.every(el=>typeof el=="string")?node2.children=[node2.children. join("")]:node2.children.forEach(child2=>{TokenTree._collapse(child2)}))}}class TokenTreeEmitter extends TokenTree{constructor(options){super(),this.options=options}addText(text2){text2!==""&&this.add(text2)}startScope(scope2){this.openNode(scope2)}endScope(){this.closeNode()}__addSublanguage(emitter,name){const node2=emitter.root;name&&(node2.scope=`language:${name}`),this.add(node2)}toHTML(){return new HTMLRenderer(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function source2(re2){ return re2?typeof re2=="string"?re2:re2.source:null}function lookahead2(re2){return concat2("(?=",re2,")")}function anyNumberOfTimes(re2){return concat2("(?:",re2,")*")}function optional2(re2){return concat2("(?:",re2,")?")}function concat2(...args){return args.map(x=>source2(x)).join("")}function stripOptionsFromArgs2(args){const opts=args[args.length-1];return typeof opts=="object"&&opts.constructor===Object?(args.splice(args.length-1,1),opts):{}}function either2(...args){return"("+(stripOptionsFromArgs2( args).capture?"":"?:")+args.map(x=>source2(x)).join("|")+")"}function countMatchGroups(re2){return new RegExp(re2.toString()+"|").exec("").length-1}function startsWith(re2,lexeme){const match=re2&&re2.exec(lexeme);return match&&match.index===0}const BACKREF_RE=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function _rewriteBackreferences(regexps,{joinWith}){let numCaptures=0;return regexps.map(regex=>{numCaptures+=1;const offset2=numCaptures;let re2=source2(regex),out="";for(;re2.length>0;){const match=BACKREF_RE. exec(re2);if(!match){out+=re2;break}out+=re2.substring(0,match.index),re2=re2.substring(match.index+match[0].length),match[0][0]==="\\"&&match[1]?out+="\\"+String(Number(match[1])+offset2):(out+=match[0],match[0]==="("&&numCaptures++)}return out}).map(re2=>`(${re2})`).join(joinWith)}const MATCH_NOTHING_RE=/\b\B/,IDENT_RE2="[a-zA-Z]\\w*",UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",NUMBER_RE="\\b\\d+(\\.\\d+)?",C_NUMBER_RE="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",BINARY_NUMBER_RE="\ \\b(0b[01]+)",RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG=(opts={})=>{const beginShebang=/^#![ ]*\//;return opts.binary&&(opts.begin=concat2(beginShebang,/.*\b/,opts.binary,/\b.*/)),inherit$1({scope:"meta",begin:beginShebang,end:/$/,relevance:0,"on:begin":(m,resp)=>{m.index!==0&&resp.ignoreMatch()}},opts)},BACKSLASH_ESCAPE={begin:"\\\\[\\s\\S]",relevance:0},APOS_STRING_MODE={ scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[BACKSLASH_ESCAPE]},QUOTE_STRING_MODE={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[BACKSLASH_ESCAPE]},PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},COMMENT=function(begin,end,modeOptions={}){const mode=inherit$1({scope:"comment",begin,end,contains:[]},modeOptions);mode.contains.push({scope:"doctag",begin:"[ \ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const ENGLISH_WORD=either2("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return mode.contains.push({begin:concat2(/[ ]+/,"(",ENGLISH_WORD,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),mode},C_LINE_COMMENT_MODE=COMMENT("//","$"),C_BLOCK_COMMENT_MODE=COMMENT("/\\*","\\*/"),HASH_COMMENT_MODE=COMMENT("#","$"), NUMBER_MODE={scope:"number",begin:NUMBER_RE,relevance:0},C_NUMBER_MODE={scope:"number",begin:C_NUMBER_RE,relevance:0},BINARY_NUMBER_MODE={scope:"number",begin:BINARY_NUMBER_RE,relevance:0},REGEXP_MODE={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[BACKSLASH_ESCAPE]}]},TITLE_MODE={scope:"title",begin:IDENT_RE2,relevance:0},UNDERSCORE_TITLE_MODE={scope:"title",begin:UNDERSCORE_IDENT_RE,relevance:0},METHOD_GUARD={begin:"\ \\.\\s*"+UNDERSCORE_IDENT_RE,relevance:0};var MODES2=Object.freeze({__proto__:null,APOS_STRING_MODE,BACKSLASH_ESCAPE,BINARY_NUMBER_MODE,BINARY_NUMBER_RE,COMMENT,C_BLOCK_COMMENT_MODE,C_LINE_COMMENT_MODE,C_NUMBER_MODE,C_NUMBER_RE,END_SAME_AS_BEGIN:function(mode){return Object.assign(mode,{"on:begin":(m,resp)=>{resp.data._beginMatch=m[1]},"on:end":(m,resp)=>{resp.data._beginMatch!==m[1]&&resp.ignoreMatch()}})},HASH_COMMENT_MODE,IDENT_RE:IDENT_RE2,MATCH_NOTHING_RE,METHOD_GUARD,NUMBER_MODE,NUMBER_RE, PHRASAL_WORDS_MODE,QUOTE_STRING_MODE,REGEXP_MODE,RE_STARTERS_RE,SHEBANG,TITLE_MODE,UNDERSCORE_IDENT_RE,UNDERSCORE_TITLE_MODE});function skipIfHasPrecedingDot(match,response){match.input[match.index-1]==="."&&response.ignoreMatch()}function scopeClassName(mode,_parent){mode.className!==void 0&&(mode.scope=mode.className,delete mode.className)}function beginKeywords(mode,parent){parent&&mode.beginKeywords&&(mode.begin="\\b("+mode.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",mode.__beforeBegin= skipIfHasPrecedingDot,mode.keywords=mode.keywords||mode.beginKeywords,delete mode.beginKeywords,mode.relevance===void 0&&(mode.relevance=0))}function compileIllegal(mode,_parent){Array.isArray(mode.illegal)&&(mode.illegal=either2(...mode.illegal))}function compileMatch(mode,_parent){if(mode.match){if(mode.begin||mode.end)throw new Error("begin & end are not supported with match");mode.begin=mode.match,delete mode.match}}function compileRelevance(mode,_parent){mode.relevance===void 0&&(mode.relevance= 1)}const beforeMatchExt=(mode,parent)=>{if(!mode.beforeMatch)return;if(mode.starts)throw new Error("beforeMatch cannot be used with starts");const originalMode=Object.assign({},mode);Object.keys(mode).forEach(key2=>{delete mode[key2]}),mode.keywords=originalMode.keywords,mode.begin=concat2(originalMode.beforeMatch,lookahead2(originalMode.begin)),mode.starts={relevance:0,contains:[Object.assign(originalMode,{endsParent:!0})]},mode.relevance=0,delete originalMode.beforeMatch},COMMON_KEYWORDS=["of", "and","for","in","not","or","if","then","parent","list","value"],DEFAULT_KEYWORD_SCOPE="keyword";function compileKeywords(rawKeywords,caseInsensitive,scopeName=DEFAULT_KEYWORD_SCOPE){const compiledKeywords=Object.create(null);return typeof rawKeywords=="string"?compileList(scopeName,rawKeywords.split(" ")):Array.isArray(rawKeywords)?compileList(scopeName,rawKeywords):Object.keys(rawKeywords).forEach(function(scopeName2){Object.assign(compiledKeywords,compileKeywords(rawKeywords[scopeName2],caseInsensitive, scopeName2))}),compiledKeywords;function compileList(scopeName2,keywordList){caseInsensitive&&(keywordList=keywordList.map(x=>x.toLowerCase())),keywordList.forEach(function(keyword2){const pair=keyword2.split("|");compiledKeywords[pair[0]]=[scopeName2,scoreForKeyword(pair[0],pair[1])]})}}function scoreForKeyword(keyword2,providedScore){return providedScore?Number(providedScore):commonKeyword(keyword2)?0:1}function commonKeyword(keyword2){return COMMON_KEYWORDS.includes(keyword2.toLowerCase())}const seenDeprecations={}, error2=message=>{console.error(message)},warn2=(message,...args)=>{console.log(`WARN: ${message}`,...args)},deprecated2=(version3,message)=>{seenDeprecations[`${version3}/${message}`]||(console.log(`Deprecated as of ${version3}. ${message}`),seenDeprecations[`${version3}/${message}`]=!0)},MultiClassError=new Error;function remapScopeNames(mode,regexes,{key:key2}){let offset2=0;const scopeNames=mode[key2],emit={},positions={};for(let i=1;i<=regexes.length;i++)positions[i+offset2]=scopeNames[i],emit[i+ offset2]=!0,offset2+=countMatchGroups(regexes[i-1]);mode[key2]=positions,mode[key2]._emit=emit,mode[key2]._multi=!0}function beginMultiClass(mode){if(Array.isArray(mode.begin)){if(mode.skip||mode.excludeBegin||mode.returnBegin)throw error2("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),MultiClassError;if(typeof mode.beginScope!="object"||mode.beginScope===null)throw error2("beginScope must be object"),MultiClassError;remapScopeNames(mode,mode.begin,{key:"beginScope"}),mode. begin=_rewriteBackreferences(mode.begin,{joinWith:""})}}function endMultiClass(mode){if(Array.isArray(mode.end)){if(mode.skip||mode.excludeEnd||mode.returnEnd)throw error2("skip, excludeEnd, returnEnd not compatible with endScope: {}"),MultiClassError;if(typeof mode.endScope!="object"||mode.endScope===null)throw error2("endScope must be object"),MultiClassError;remapScopeNames(mode,mode.end,{key:"endScope"}),mode.end=_rewriteBackreferences(mode.end,{joinWith:""})}}function scopeSugar(mode){mode. scope&&typeof mode.scope=="object"&&mode.scope!==null&&(mode.beginScope=mode.scope,delete mode.scope)}function MultiClass(mode){scopeSugar(mode),typeof mode.beginScope=="string"&&(mode.beginScope={_wrap:mode.beginScope}),typeof mode.endScope=="string"&&(mode.endScope={_wrap:mode.endScope}),beginMultiClass(mode),endMultiClass(mode)}function compileLanguage(language2){function langRe(value,global2){return new RegExp(source2(value),"m"+(language2.case_insensitive?"i":"")+(language2.unicodeRegex?"u": "")+(global2?"g":""))}class MultiRegex{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(re2,opts){opts.position=this.position++,this.matchIndexes[this.matchAt]=opts,this.regexes.push([opts,re2]),this.matchAt+=countMatchGroups(re2)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const terminators=this.regexes.map(el=>el[1]);this.matcherRe=langRe(_rewriteBackreferences(terminators,{joinWith:"|"}),!0),this.lastIndex=0}exec(s2){this.matcherRe.lastIndex= this.lastIndex;const match=this.matcherRe.exec(s2);if(!match)return null;const i=match.findIndex((el,i2)=>i2>0&&el!==void 0),matchData=this.matchIndexes[i];return match.splice(0,i),Object.assign(match,matchData)}}class ResumableMultiRegex{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(index2){if(this.multiRegexes[index2])return this.multiRegexes[index2];const matcher=new MultiRegex;return this.rules.slice(index2).forEach(([re2,opts])=>matcher. addRule(re2,opts)),matcher.compile(),this.multiRegexes[index2]=matcher,matcher}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(re2,opts){this.rules.push([re2,opts]),opts.type==="begin"&&this.count++}exec(s2){const m=this.getMatcher(this.regexIndex);m.lastIndex=this.lastIndex;let result=m.exec(s2);if(this.resumingScanAtSamePosition()&&!(result&&result.index===this.lastIndex)){const m2=this.getMatcher(0);m2.lastIndex=this.lastIndex+1,result=m2.exec(s2)} return result&&(this.regexIndex+=result.position+1,this.regexIndex===this.count&&this.considerAll()),result}}function buildModeRegex(mode){const mm=new ResumableMultiRegex;return mode.contains.forEach(term=>mm.addRule(term.begin,{rule:term,type:"begin"})),mode.terminatorEnd&&mm.addRule(mode.terminatorEnd,{type:"end"}),mode.illegal&&mm.addRule(mode.illegal,{type:"illegal"}),mm}function compileMode(mode,parent){const cmode=mode;if(mode.isCompiled)return cmode;[scopeClassName,compileMatch,MultiClass, beforeMatchExt].forEach(ext=>ext(mode,parent)),language2.compilerExtensions.forEach(ext=>ext(mode,parent)),mode.__beforeBegin=null,[beginKeywords,compileIllegal,compileRelevance].forEach(ext=>ext(mode,parent)),mode.isCompiled=!0;let keywordPattern=null;return typeof mode.keywords=="object"&&mode.keywords.$pattern&&(mode.keywords=Object.assign({},mode.keywords),keywordPattern=mode.keywords.$pattern,delete mode.keywords.$pattern),keywordPattern=keywordPattern||/\w+/,mode.keywords&&(mode.keywords=compileKeywords( mode.keywords,language2.case_insensitive)),cmode.keywordPatternRe=langRe(keywordPattern,!0),parent&&(mode.begin||(mode.begin=/\B|\b/),cmode.beginRe=langRe(cmode.begin),!mode.end&&!mode.endsWithParent&&(mode.end=/\B|\b/),mode.end&&(cmode.endRe=langRe(cmode.end)),cmode.terminatorEnd=source2(cmode.end)||"",mode.endsWithParent&&parent.terminatorEnd&&(cmode.terminatorEnd+=(mode.end?"|":"")+parent.terminatorEnd)),mode.illegal&&(cmode.illegalRe=langRe(mode.illegal)),mode.contains||(mode.contains=[]),mode. contains=[].concat(...mode.contains.map(function(c2){return expandOrCloneMode(c2==="self"?mode:c2)})),mode.contains.forEach(function(c2){compileMode(c2,cmode)}),mode.starts&&compileMode(mode.starts,parent),cmode.matcher=buildModeRegex(cmode),cmode}if(language2.compilerExtensions||(language2.compilerExtensions=[]),language2.contains&&language2.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return language2.classNameAliases= inherit$1(language2.classNameAliases||{}),compileMode(language2)}function dependencyOnParent(mode){return mode?mode.endsWithParent||dependencyOnParent(mode.starts):!1}function expandOrCloneMode(mode){return mode.variants&&!mode.cachedVariants&&(mode.cachedVariants=mode.variants.map(function(variant){return inherit$1(mode,{variants:null},variant)})),mode.cachedVariants?mode.cachedVariants:dependencyOnParent(mode)?inherit$1(mode,{starts:mode.starts?inherit$1(mode.starts):null}):Object.isFrozen(mode)? inherit$1(mode):mode}var version2="11.11.1";class HTMLInjectionError extends Error{constructor(reason,html2){super(reason),this.name="HTMLInjectionError",this.html=html2}}const escape2=escapeHTML,inherit=inherit$1,NO_MATCH=Symbol("nomatch"),MAX_KEYWORD_HITS=7,HLJS=function(hljs){const languages=Object.create(null),aliases=Object.create(null),plugins=[];let SAFE_MODE=!0;const LANGUAGE_NOT_FOUND="Could not find the language '{}', did you forget to load/include a language module?",PLAINTEXT_LANGUAGE={ disableAutodetect:!0,name:"Plain text",contains:[]};let options={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:TokenTreeEmitter};function shouldNotHighlight(languageName){return options.noHighlightRe.test(languageName)}function blockLanguage(block2){let classes=block2.className+" ";classes+=block2.parentNode?block2.parentNode.className:"";const match=options. languageDetectRe.exec(classes);if(match){const language2=getLanguage(match[1]);return language2||(warn2(LANGUAGE_NOT_FOUND.replace("{}",match[1])),warn2("Falling back to no-highlight mode for this block.",block2)),language2?match[1]:"no-highlight"}return classes.split(/\s+/).find(_class=>shouldNotHighlight(_class)||getLanguage(_class))}function highlight2(codeOrLanguageName,optionsOrCode,ignoreIllegals){let code2="",languageName="";typeof optionsOrCode=="object"?(code2=codeOrLanguageName,ignoreIllegals= optionsOrCode.ignoreIllegals,languageName=optionsOrCode.language):(deprecated2("10.7.0","highlight(lang, code, ...args) has been deprecated."),deprecated2("10.7.0",`Please use highlight(code, options) instead. https://github.com/highlightjs/highlight.js/issues/2277`),languageName=codeOrLanguageName,code2=optionsOrCode),ignoreIllegals===void 0&&(ignoreIllegals=!0);const context={code:code2,language:languageName};fire("before:highlight",context);const result=context.result?context.result:_highlight(context.language,context.code,ignoreIllegals);return result.code=context.code,fire("after:highlight",result),result}function _highlight(languageName,codeToHighlight,ignoreIllegals,continuation){const keywordHits=Object. create(null);function keywordData(mode,matchText){return mode.keywords[matchText]}function processKeywords(){if(!top.keywords){emitter.addText(modeBuffer);return}let lastIndex=0;top.keywordPatternRe.lastIndex=0;let match=top.keywordPatternRe.exec(modeBuffer),buf="";for(;match;){buf+=modeBuffer.substring(lastIndex,match.index);const word=language2.case_insensitive?match[0].toLowerCase():match[0],data=keywordData(top,word);if(data){const[kind,keywordRelevance]=data;if(emitter.addText(buf),buf="",keywordHits[word]= (keywordHits[word]||0)+1,keywordHits[word]<=MAX_KEYWORD_HITS&&(relevance+=keywordRelevance),kind.startsWith("_"))buf+=match[0];else{const cssClass=language2.classNameAliases[kind]||kind;emitKeyword(match[0],cssClass)}}else buf+=match[0];lastIndex=top.keywordPatternRe.lastIndex,match=top.keywordPatternRe.exec(modeBuffer)}buf+=modeBuffer.substring(lastIndex),emitter.addText(buf)}function processSubLanguage(){if(modeBuffer==="")return;let result2=null;if(typeof top.subLanguage=="string"){if(!languages[top. subLanguage]){emitter.addText(modeBuffer);return}result2=_highlight(top.subLanguage,modeBuffer,!0,continuations[top.subLanguage]),continuations[top.subLanguage]=result2._top}else result2=highlightAuto(modeBuffer,top.subLanguage.length?top.subLanguage:null);top.relevance>0&&(relevance+=result2.relevance),emitter.__addSublanguage(result2._emitter,result2.language)}function processBuffer(){top.subLanguage!=null?processSubLanguage():processKeywords(),modeBuffer=""}function emitKeyword(keyword2,scope2){ keyword2!==""&&(emitter.startScope(scope2),emitter.addText(keyword2),emitter.endScope())}function emitMultiClass(scope2,match){let i=1;const max2=match.length-1;for(;i<=max2;){if(!scope2._emit[i]){i++;continue}const klass=language2.classNameAliases[scope2[i]]||scope2[i],text2=match[i];klass?emitKeyword(text2,klass):(modeBuffer=text2,processKeywords(),modeBuffer=""),i++}}function startNewMode(mode,match){return mode.scope&&typeof mode.scope=="string"&&emitter.openNode(language2.classNameAliases[mode. scope]||mode.scope),mode.beginScope&&(mode.beginScope._wrap?(emitKeyword(modeBuffer,language2.classNameAliases[mode.beginScope._wrap]||mode.beginScope._wrap),modeBuffer=""):mode.beginScope._multi&&(emitMultiClass(mode.beginScope,match),modeBuffer="")),top=Object.create(mode,{parent:{value:top}}),top}function endOfMode(mode,match,matchPlusRemainder){let matched=startsWith(mode.endRe,matchPlusRemainder);if(matched){if(mode["on:end"]){const resp=new Response2(mode);mode["on:end"](match,resp),resp.isMatchIgnored&& (matched=!1)}if(matched){for(;mode.endsParent&&mode.parent;)mode=mode.parent;return mode}}if(mode.endsWithParent)return endOfMode(mode.parent,match,matchPlusRemainder)}function doIgnore(lexeme){return top.matcher.regexIndex===0?(modeBuffer+=lexeme[0],1):(resumeScanAtSamePosition=!0,0)}function doBeginMatch(match){const lexeme=match[0],newMode=match.rule,resp=new Response2(newMode),beforeCallbacks=[newMode.__beforeBegin,newMode["on:begin"]];for(const cb of beforeCallbacks)if(cb&&(cb(match,resp),resp. isMatchIgnored))return doIgnore(lexeme);return newMode.skip?modeBuffer+=lexeme:(newMode.excludeBegin&&(modeBuffer+=lexeme),processBuffer(),!newMode.returnBegin&&!newMode.excludeBegin&&(modeBuffer=lexeme)),startNewMode(newMode,match),newMode.returnBegin?0:lexeme.length}function doEndMatch(match){const lexeme=match[0],matchPlusRemainder=codeToHighlight.substring(match.index),endMode=endOfMode(top,match,matchPlusRemainder);if(!endMode)return NO_MATCH;const origin2=top;top.endScope&&top.endScope._wrap? (processBuffer(),emitKeyword(lexeme,top.endScope._wrap)):top.endScope&&top.endScope._multi?(processBuffer(),emitMultiClass(top.endScope,match)):origin2.skip?modeBuffer+=lexeme:(origin2.returnEnd||origin2.excludeEnd||(modeBuffer+=lexeme),processBuffer(),origin2.excludeEnd&&(modeBuffer=lexeme));do top.scope&&emitter.closeNode(),!top.skip&&!top.subLanguage&&(relevance+=top.relevance),top=top.parent;while(top!==endMode.parent);return endMode.starts&&startNewMode(endMode.starts,match),origin2.returnEnd? 0:lexeme.length}function processContinuations(){const list2=[];for(let current2=top;current2!==language2;current2=current2.parent)current2.scope&&list2.unshift(current2.scope);list2.forEach(item=>emitter.openNode(item))}let lastMatch={};function processLexeme(textBeforeMatch,match){const lexeme=match&&match[0];if(modeBuffer+=textBeforeMatch,lexeme==null)return processBuffer(),0;if(lastMatch.type==="begin"&&match.type==="end"&&lastMatch.index===match.index&&lexeme===""){if(modeBuffer+=codeToHighlight. slice(match.index,match.index+1),!SAFE_MODE){const err=new Error(`0 width match regex (${languageName})`);throw err.languageName=languageName,err.badRule=lastMatch.rule,err}return 1}if(lastMatch=match,match.type==="begin")return doBeginMatch(match);if(match.type==="illegal"&&!ignoreIllegals){const err=new Error('Illegal lexeme "'+lexeme+'" for mode "'+(top.scope||"")+'"');throw err.mode=top,err}else if(match.type==="end"){const processed=doEndMatch(match);if(processed!==NO_MATCH)return processed} if(match.type==="illegal"&&lexeme==="")return modeBuffer+=` `,1;if(iterations>1e5&&iterations>match.index*3)throw new Error("potential infinite loop, way more iterations than matches");return modeBuffer+=lexeme,lexeme.length}const language2=getLanguage(languageName);if(!language2)throw error2(LANGUAGE_NOT_FOUND.replace("{}",languageName)),new Error('Unknown language: "'+languageName+'"');const md=compileLanguage(language2);let result="",top=continuation||md;const continuations={},emitter=new options.__emitter(options);processContinuations();let modeBuffer="", relevance=0,index2=0,iterations=0,resumeScanAtSamePosition=!1;try{if(language2.__emitTokens)language2.__emitTokens(codeToHighlight,emitter);else{for(top.matcher.considerAll();;){iterations++,resumeScanAtSamePosition?resumeScanAtSamePosition=!1:top.matcher.considerAll(),top.matcher.lastIndex=index2;const match=top.matcher.exec(codeToHighlight);if(!match)break;const beforeMatch=codeToHighlight.substring(index2,match.index),processedCount=processLexeme(beforeMatch,match);index2=match.index+processedCount} processLexeme(codeToHighlight.substring(index2))}return emitter.finalize(),result=emitter.toHTML(),{language:languageName,value:result,relevance,illegal:!1,_emitter:emitter,_top:top}}catch(err){if(err.message&&err.message.includes("Illegal"))return{language:languageName,value:escape2(codeToHighlight),illegal:!0,relevance:0,_illegalBy:{message:err.message,index:index2,context:codeToHighlight.slice(index2-100,index2+100),mode:err.mode,resultSoFar:result},_emitter:emitter};if(SAFE_MODE)return{language:languageName, value:escape2(codeToHighlight),illegal:!1,relevance:0,errorRaised:err,_emitter:emitter,_top:top};throw err}}function justTextHighlightResult(code2){const result={value:escape2(code2),illegal:!1,relevance:0,_top:PLAINTEXT_LANGUAGE,_emitter:new options.__emitter(options)};return result._emitter.addText(code2),result}function highlightAuto(code2,languageSubset){languageSubset=languageSubset||options.languages||Object.keys(languages);const plaintext2=justTextHighlightResult(code2),results=languageSubset. filter(getLanguage).filter(autoDetection).map(name=>_highlight(name,code2,!1));results.unshift(plaintext2);const sorted=results.sort((a,b)=>{if(a.relevance!==b.relevance)return b.relevance-a.relevance;if(a.language&&b.language){if(getLanguage(a.language).supersetOf===b.language)return 1;if(getLanguage(b.language).supersetOf===a.language)return-1}return 0}),[best,secondBest]=sorted,result=best;return result.secondBest=secondBest,result}function updateClassName(element2,currentLang,resultLang){const language2=currentLang&& aliases[currentLang]||resultLang;element2.classList.add("hljs"),element2.classList.add(`language-${language2}`)}function highlightElement(element2){let node2=null;const language2=blockLanguage(element2);if(shouldNotHighlight(language2))return;if(fire("before:highlightElement",{el:element2,language:language2}),element2.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",element2);return}if(element2.children.length>0&&(options.ignoreUnescapedHTML|| (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(element2)),options.throwUnescapedHTML))throw new HTMLInjectionError("One of your code blocks includes unescaped HTML.",element2.innerHTML);node2=element2;const text2=node2.textContent,result=language2?highlight2(text2,{language:language2,ignoreIllegals:!0}): highlightAuto(text2);element2.innerHTML=result.value,element2.dataset.highlighted="yes",updateClassName(element2,language2,result.language),element2.result={language:result.language,re:result.relevance,relevance:result.relevance},result.secondBest&&(element2.secondBest={language:result.secondBest.language,relevance:result.secondBest.relevance}),fire("after:highlightElement",{el:element2,result,text:text2})}function configure2(userOptions){options=inherit(options,userOptions)}const initHighlighting=()=>{ highlightAll(),deprecated2("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function initHighlightingOnLoad(){highlightAll(),deprecated2("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let wantsHighlight=!1;function highlightAll(){function boot(){highlightAll()}if(document.readyState==="loading"){wantsHighlight||window.addEventListener("DOMContentLoaded",boot,!1),wantsHighlight=!0;return}document.querySelectorAll(options.cssSelector).forEach(highlightElement)} function registerLanguage(languageName,languageDefinition){let lang=null;try{lang=languageDefinition(hljs)}catch(error$1){if(error2("Language definition for '{}' could not be registered.".replace("{}",languageName)),SAFE_MODE)error2(error$1);else throw error$1;lang=PLAINTEXT_LANGUAGE}lang.name||(lang.name=languageName),languages[languageName]=lang,lang.rawDefinition=languageDefinition.bind(null,hljs),lang.aliases&®isterAliases(lang.aliases,{languageName})}function unregisterLanguage(languageName){ delete languages[languageName];for(const alias of Object.keys(aliases))aliases[alias]===languageName&&delete aliases[alias]}function listLanguages(){return Object.keys(languages)}function getLanguage(name){return name=(name||"").toLowerCase(),languages[name]||languages[aliases[name]]}function registerAliases(aliasList,{languageName}){typeof aliasList=="string"&&(aliasList=[aliasList]),aliasList.forEach(alias=>{aliases[alias.toLowerCase()]=languageName})}function autoDetection(name){const lang=getLanguage( name);return lang&&!lang.disableAutodetect}function upgradePluginAPI(plugin){plugin["before:highlightBlock"]&&!plugin["before:highlightElement"]&&(plugin["before:highlightElement"]=data=>{plugin["before:highlightBlock"](Object.assign({block:data.el},data))}),plugin["after:highlightBlock"]&&!plugin["after:highlightElement"]&&(plugin["after:highlightElement"]=data=>{plugin["after:highlightBlock"](Object.assign({block:data.el},data))})}function addPlugin(plugin){upgradePluginAPI(plugin),plugins.push( plugin)}function removePlugin(plugin){const index2=plugins.indexOf(plugin);index2!==-1&&plugins.splice(index2,1)}function fire(event2,args){const cb=event2;plugins.forEach(function(plugin){plugin[cb]&&plugin[cb](args)})}function deprecateHighlightBlock(el){return deprecated2("10.7.0","highlightBlock will be removed entirely in v12.0"),deprecated2("10.7.0","Please use highlightElement now."),highlightElement(el)}Object.assign(hljs,{highlight:highlight2,highlightAuto,highlightAll,highlightElement, highlightBlock:deprecateHighlightBlock,configure:configure2,initHighlighting,initHighlightingOnLoad,registerLanguage,unregisterLanguage,listLanguages,getLanguage,registerAliases,autoDetection,inherit,addPlugin,removePlugin}),hljs.debugMode=function(){SAFE_MODE=!1},hljs.safeMode=function(){SAFE_MODE=!0},hljs.versionString=version2,hljs.regex={concat:concat2,lookahead:lookahead2,either:either2,optional:optional2,anyNumberOfTimes};for(const key2 in MODES2)typeof MODES2[key2]=="object"&&deepFreeze(MODES2[key2]); return Object.assign(hljs,MODES2),hljs},highlight=HLJS({});return highlight.newInstance=()=>HLJS({}),core$5=highlight,highlight.HighlightJS=highlight,highlight.default=highlight,core$5}var _1c_1,hasRequired_1c;function require_1c(){if(hasRequired_1c)return _1c_1;hasRequired_1c=1;function _1c2(hljs){const UNDERSCORE_IDENT_RE="[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+",KEYWORD="далее "+"возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли\ конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ",METAKEYWORD="загрузитьизфайла "+"вебклиент вместо внешнеесоединение клиент конецобласти мобильноеприложениеклиент мобильноеприложениесервер наклиенте наклиентенасервере наклиентенасерверебезконтекста насервере насерверебезконтекста область перед после сервер толстыйклиентобычноеприложение т\ олстыйклиентуправляемоеприложение тонкийклиент ",BUILTIN="разделительстраниц разделительстрок символтабуляции "+"ansitooem oemtoansi ввестивидсубконто ввестиперечисление ввестипериод ввестиплансчетов выбранныйплансчетов датагод датамесяц датачисло заголовоксистемы значениевстроку значениеизстроки каталогиб каталогпользователя кодсимв конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоин\ тервала конквартала конмесяца коннедели лог лог10 максимальноеколичествосубконто названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найтиссылки началопериодаби началостандартногоинтервала начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода обработкаожидания основнойжурналрасчетов основнойплансчетов основнойязык очиститьокносообщений периодстр получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезнач\ ение получитьта префиксавтонумерации пропись пустоезначение разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо симв создатьобъект статусвозврата стрколичествострок сформироватьпозициюдокумента счетпокоду текущеевремя типзначения типзначениястр установитьтана установитьтапо фиксшаблон шаблон "+ "acos asin atan base64значение base64строка cos exp log log10 pow sin sqrt tan xmlзначение xmlстрока xmlтип xmlтипзнч активноеокно безопасныйрежим безопасныйрежимразделенияданных булево ввестидату ввестизначение ввестистроку ввестичисло возможностьчтенияxml вопрос восстановитьзначение врег выгрузитьжурналрегистрации выполнитьобработкуоповещения выполнитьпроверкуправдоступа вычислить год данныеформывзначение дата день деньгода деньнедели добавитьмесяц заблокироватьданныедляредактирования заблокир\ оватьработупользователя завершитьработусистемы загрузитьвнешнююкомпоненту закрытьсправку записатьjson записатьxml записатьдатуjson записьжурналарегистрации заполнитьзначениясвойств запроситьразрешениепользователя запуститьприложение запуститьсистему зафиксироватьтранзакцию значениевданныеформы значениевстрокувнутр значениевфайл значениезаполнено значениеизстрокивнутр значениеизфайла изxmlтипа импортмоделиxdto имякомпьютера имяпользователя инициализироватьпредопределенныеданные информацияобошибке\ каталогбиблиотекимобильногоустройства каталогвременныхфайлов каталогдокументов каталогпрограммы кодироватьстроку кодлокализацииинформационнойбазы кодсимвола командасистемы конецгода конецдня конецквартала конецмесяца конецминуты конецнедели конецчаса конфигурациябазыданныхизмененадинамически конфигурацияизменена копироватьданныеформы копироватьфайл краткоепредставлениеошибки лев макс местноевремя месяц мин минута монопольныйрежим найти найтинедопустимыесимволыxml найтиокнопонавигационнойссылке \ найтипомеченныенаудаление найтипоссылкам найтифайлы началогода началодня началоквартала началомесяца началоминуты началонедели началочаса начатьзапросразрешенияпользователя начатьзапускприложения начатькопированиефайла начатьперемещениефайла начатьподключениевнешнейкомпоненты начатьподключениерасширенияработыскриптографией начатьподключениерасширенияработысфайлами начатьпоискфайлов начатьполучениекаталогавременныхфайлов начатьполучениекаталогадокументов начатьполучениерабочегокаталогаданныхпольз\ ователя начатьполучениефайлов начатьпомещениефайла начатьпомещениефайлов начатьсозданиедвоичныхданныхизфайла начатьсозданиекаталога начатьтранзакцию начатьудалениефайлов начатьустановкувнешнейкомпоненты начатьустановкурасширенияработыскриптографией начатьустановкурасширенияработысфайлами неделягода необходимостьзавершениясоединения номерсеансаинформационнойбазы номерсоединенияинформационнойбазы нрег нстр обновитьинтерфейс обновитьнумерациюобъектов обновитьповторноиспользуемыезначения обработкапр\ ерыванияпользователя объединитьфайлы окр описаниеошибки оповестить оповеститьобизменении отключитьобработчикзапросанастроекклиенталицензирования отключитьобработчикожидания отключитьобработчикоповещения открытьзначение открытьиндекссправки открытьсодержаниесправки открытьсправку открытьформу открытьформумодально отменитьтранзакцию очиститьжурналрегистрации очиститьнастройкипользователя очиститьсообщения параметрыдоступа перейтипонавигационнойссылке переместитьфайл подключитьвнешнююкомпоненту под\ ключитьобработчикзапросанастроекклиенталицензирования подключитьобработчикожидания подключитьобработчикоповещения подключитьрасширениеработыскриптографией подключитьрасширениеработысфайлами подробноепредставлениеошибки показатьвводдаты показатьвводзначения показатьвводстроки показатьвводчисла показатьвопрос показатьзначение показатьинформациюобошибке показатьнакарте показатьоповещениепользователя показатьпредупреждение полноеимяпользователя получитьcomобъект получитьxmlтип получитьадреспоместопо\ ложению получитьблокировкусеансов получитьвремязавершенияспящегосеанса получитьвремязасыпанияпассивногосеанса получитьвремяожиданияблокировкиданных получитьданныевыбора получитьдополнительныйпараметрклиенталицензирования получитьдопустимыекодылокализации получитьдопустимыечасовыепояса получитьзаголовокклиентскогоприложения получитьзаголовоксистемы получитьзначенияотборажурналарегистрации получитьидентификаторконфигурации получитьизвременногохранилища получитьимявременногофайла получитьимяклиента\ лицензирования получитьинформациюэкрановклиента получитьиспользованиежурналарегистрации получитьиспользованиесобытияжурналарегистрации получитькраткийзаголовокприложения получитьмакетоформления получитьмаскувсефайлы получитьмаскувсефайлыклиента получитьмаскувсефайлысервера получитьместоположениепоадресу получитьминимальнуюдлинупаролейпользователей получитьнавигационнуюссылку получитьнавигационнуюссылкуинформационнойбазы получитьобновлениеконфигурациибазыданных получитьобновлениепредопределенныхд\ анныхинформационнойбазы получитьобщиймакет получитьобщуюформу получитьокна получитьоперативнуюотметкувремени получитьотключениебезопасногорежима получитьпараметрыфункциональныхопцийинтерфейса получитьполноеимяпредопределенногозначения получитьпредставлениянавигационныхссылок получитьпроверкусложностипаролейпользователей получитьразделительпути получитьразделительпутиклиента получитьразделительпутисервера получитьсеансыинформационнойбазы получитьскоростьклиентскогосоединения получитьсоединенияинф\ ормационнойбазы получитьсообщенияпользователю получитьсоответствиеобъектаиформы получитьсоставстандартногоинтерфейсаodata получитьструктурухранениябазыданных получитьтекущийсеансинформационнойбазы получитьфайл получитьфайлы получитьформу получитьфункциональнуюопцию получитьфункциональнуюопциюинтерфейса получитьчасовойпоясинформационнойбазы пользователиос поместитьвовременноехранилище поместитьфайл поместитьфайлы прав праводоступа предопределенноезначение представлениекодалокализации представлени\ епериода представлениеправа представлениеприложения представлениесобытияжурналарегистрации представлениечасовогопояса предупреждение прекратитьработусистемы привилегированныйрежим продолжитьвызов прочитатьjson прочитатьxml прочитатьдатуjson пустаястрока рабочийкаталогданныхпользователя разблокироватьданныедляредактирования разделитьфайл разорватьсоединениесвнешнимисточникомданных раскодироватьстроку рольдоступна секунда сигнал символ скопироватьжурналрегистрации смещениелетнеговремени смещениест\ андартноговремени соединитьбуферыдвоичныхданных создатькаталог создатьфабрикуxdto сокрл сокрлп сокрп сообщить состояние сохранитьзначение сохранитьнастройкипользователя сред стрдлина стрзаканчиваетсяна стрзаменить стрнайти стрначинаетсяс строка строкасоединенияинформационнойбазы стрполучитьстроку стрразделить стрсоединить стрсравнить стрчисловхождений стрчислострок стршаблон текущаядата текущаядатасеанса текущаяуниверсальнаядата текущаяуниверсальнаядатавмиллисекундах текущийвариантинтерфейсаклие\ нтскогоприложения текущийвариантосновногошрифтаклиентскогоприложения текущийкодлокализации текущийрежимзапуска текущийязык текущийязыксистемы тип типзнч транзакцияактивна трег удалитьданныеинформационнойбазы удалитьизвременногохранилища удалитьобъекты удалитьфайлы универсальноевремя установитьбезопасныйрежим установитьбезопасныйрежимразделенияданных установитьблокировкусеансов установитьвнешнююкомпоненту установитьвремязавершенияспящегосеанса установитьвремязасыпанияпассивногосеанса установитьвр\ емяожиданияблокировкиданных установитьзаголовокклиентскогоприложения установитьзаголовоксистемы установитьиспользованиежурналарегистрации установитьиспользованиесобытияжурналарегистрации установитькраткийзаголовокприложения установитьминимальнуюдлинупаролейпользователей установитьмонопольныйрежим установитьнастройкиклиенталицензирования установитьобновлениепредопределенныхданныхинформационнойбазы установитьотключениебезопасногорежима установитьпараметрыфункциональныхопцийинтерфейса установитьпри\ вилегированныйрежим установитьпроверкусложностипаролейпользователей установитьрасширениеработыскриптографией установитьрасширениеработысфайлами установитьсоединениесвнешнимисточникомданных установитьсоответствиеобъектаиформы установитьсоставстандартногоинтерфейсаodata установитьчасовойпоясинформационнойбазы установитьчасовойпояссеанса формат цел час часовойпояс часовойпояссеанса число числопрописью этоадресвременногохранилища "+ "wsссылки библиотекакартинок библиотекамакетовоформлениякомпоновкиданных библиотекастилей бизнеспроцессы внешниеисточникиданных внешниеобработки внешниеотчеты встроенныепокупки главныйинтерфейс главныйстиль документы доставляемыеуведомления журналыдокументов задачи информацияобинтернетсоединении использованиерабочейдаты историяработыпользователя константы критерииотбора метаданные обработки отображениерекламы отправкадоставляемыхуведомлений отчеты панельзадачос параметрзапуска параметрысеанса пе\ речисления планывидоврасчета планывидовхарактеристик планыобмена планысчетов полнотекстовыйпоиск пользователиинформационнойбазы последовательности проверкавстроенныхпокупок рабочаядата расширенияконфигурации регистрыбухгалтерии регистрынакопления регистрырасчета регистрысведений регламентныезадания сериализаторxdto справочники средствагеопозиционирования средствакриптографии средствамультимедиа средстваотображениярекламы средствапочты средствателефонии фабрикаxdto файловыепотоки фоновыезадания х\ ранилищанастроек хранилищевариантовотчетов хранилищенастроекданныхформ хранилищеобщихнастроек хранилищепользовательскихнастроекдинамическихсписков хранилищепользовательскихнастроекотчетов хранилищесистемныхнастроек ",CLASS2="webцвета windowsцвета windowsшрифты библиотекакартинок рамкистиля с\ имволы цветастиля шрифтыстиля "+"автоматическоесохранениеданныхформывнастройках автонумерациявформе автораздвижениесерий анимациядиаграммы вариантвыравниванияэлементовизаголовков вариантуправлениявысотойтаблицы вертикальнаяпрокруткаформы вертикальноеположение вертикальноеположениеэлемента видгруппыформы виддекорацииформы виддополненияэлементаформы видизмененияданных видкнопкиформы видпереключателя видподписейкдиаграмме видполяформы видфлажка влияниеразмеранапузырекдиаг\ раммы горизонтальноеположение горизонтальноеположениеэлемента группировкаколонок группировкаподчиненныхэлементовформы группыиэлементы действиеперетаскивания дополнительныйрежимотображения допустимыедействияперетаскивания интервалмеждуэлементамиформы использованиевывода использованиеполосыпрокрутки используемоезначениеточкибиржевойдиаграммы историявыборапривводе источникзначенийоситочекдиаграммы источникзначенияразмерапузырькадиаграммы категориягруппыкоманд максимумсерий начальноеотображениедерев\ а начальноеотображениесписка обновлениетекстаредактирования ориентациядендрограммы ориентациядиаграммы ориентацияметокдиаграммы ориентацияметоксводнойдиаграммы ориентацияэлементаформы отображениевдиаграмме отображениевлегендедиаграммы отображениегруппыкнопок отображениезаголовкашкалыдиаграммы отображениезначенийсводнойдиаграммы отображениезначенияизмерительнойдиаграммы отображениеинтерваладиаграммыганта отображениекнопки отображениекнопкивыбора отображениеобсужденийформы отображениеобычнойгруппы\ отображениеотрицательныхзначенийпузырьковойдиаграммы отображениепанелипоиска отображениеподсказки отображениепредупрежденияприредактировании отображениеразметкиполосырегулирования отображениестраницформы отображениетаблицы отображениетекстазначениядиаграммыганта отображениеуправленияобычнойгруппы отображениефигурыкнопки палитрацветовдиаграммы поведениеобычнойгруппы поддержкамасштабадендрограммы поддержкамасштабадиаграммыганта поддержкамасштабасводнойдиаграммы поисквтаблицепривводе положениезаго\ ловкаэлементаформы положениекартинкикнопкиформы положениекартинкиэлементаграфическойсхемы положениекоманднойпанелиформы положениекоманднойпанелиэлементаформы положениеопорнойточкиотрисовки положениеподписейкдиаграмме положениеподписейшкалызначенийизмерительнойдиаграммы положениесостоянияпросмотра положениестрокипоиска положениетекстасоединительнойлинии положениеуправленияпоиском положениешкалывремени порядокотображенияточекгоризонтальнойгистограммы порядоксерийвлегендедиаграммы размеркартинки ра\ сположениезаголовкашкалыдиаграммы растягиваниеповертикалидиаграммыганта режимавтоотображениясостояния режимвводастроктаблицы режимвыборанезаполненного режимвыделениядаты режимвыделениястрокитаблицы режимвыделениятаблицы режимизмененияразмера режимизменениясвязанногозначения режимиспользованиядиалогапечати режимиспользованияпараметракоманды режиммасштабированияпросмотра режимосновногоокнаклиентскогоприложения режимоткрытияокнаформы режимотображениявыделения режимотображениягеографическойсхемы реж\ имотображениязначенийсерии режимотрисовкисеткиграфическойсхемы режимполупрозрачностидиаграммы режимпробеловдиаграммы режимразмещениянастранице режимредактированияколонки режимсглаживаниядиаграммы режимсглаживанияиндикатора режимсписказадач сквозноевыравнивание сохранениеданныхформывнастройках способзаполнениятекстазаголовкашкалыдиаграммы способопределенияограничивающегозначениядиаграммы стандартнаягруппакоманд стандартноеоформление статусоповещенияпользователя стильстрелки типаппроксимациилиниит\ рендадиаграммы типдиаграммы типединицышкалывремени типимпортасерийслоягеографическойсхемы типлиниигеографическойсхемы типлиниидиаграммы типмаркерагеографическойсхемы типмаркерадиаграммы типобластиоформления типорганизацииисточникаданныхгеографическойсхемы типотображениясериислоягеографическойсхемы типотображенияточечногообъектагеографическойсхемы типотображенияшкалыэлементалегендыгеографическойсхемы типпоискаобъектовгеографическойсхемы типпроекциигеографическойсхемы типразмещенияизмерений типраз\ мещенияреквизитовизмерений типрамкиэлементауправления типсводнойдиаграммы типсвязидиаграммыганта типсоединениязначенийпосериямдиаграммы типсоединенияточекдиаграммы типсоединительнойлинии типстороныэлементаграфическойсхемы типформыотчета типшкалырадарнойдиаграммы факторлиниитрендадиаграммы фигуракнопки фигурыграфическойсхемы фиксациявтаблице форматдняшкалывремени форматкартинки ширинаподчиненныхэлементовформы "+ "виддвижениябухгалтерии виддвижениянакопления видпериодарегистрарасчета видсчета видточкимаршрутабизнеспроцесса использованиеагрегатарегистранакопления использованиегруппиэлементов использованиережимапроведения использованиесреза периодичностьагрегатарегистранакопления режимавтовремя режимзаписидокумента режимпроведениядокумента "+ "авторегистрацияизменений допустимыйномерсообщения отправкаэлементаданных получениеэлементаданных "+"использованиерасшифровкитабличногодокумента ориентациястраницы положениеитоговколоноксводнойтаблицы положениеитоговстроксводнойтаблицы положениетекстаотносительнокартинки расположениезаголовкагруппировкитабличногодокумента способчтениязначенийтабличногодокумента типдвустороннейпечати типзаполненияобластит\ абличногодокумента типкурсоровтабличногодокумента типлиниирисункатабличногодокумента типлинииячейкитабличногодокумента типнаправленияпереходатабличногодокумента типотображениявыделениятабличногодокумента типотображениялинийсводнойтаблицы типразмещениятекстатабличногодокумента типрисункатабличногодокумента типсмещениятабличногодокумента типузоратабличногодокумента типфайлатабличногодокумента точностьпечати чередованиерасположениястраниц "+ "отображениевремениэлементовпланировщика "+"типфайлаформатированногодокумента "+"обходрезультатазапроса типзаписизапроса "+"видзаполнениярасшифровкипостроителяотчета типдобавленияпредставлений типизмеренияпостроителяотчета типразмещенияитогов "+"доступкфайлу режимдиалогавыбо\ рафайла режимоткрытияфайла "+"типизмеренияпостроителязапроса "+"видданныханализа методкластеризации типединицыинтервалавременианализаданных типзаполнениятаблицырезультатаанализаданных типиспользованиячисловыхзначенийанализаданных типисточникаданныхпоискаассоциаций типколонкианализаданныхдереворешений типколонкианализаданныхкластеризация типколонкианализаданныхобщаястатистика типколонкианализаданныхпоискассоциаций типколонкианализаданныхпоиск\ последовательностей типколонкимоделипрогноза типмерырасстоянияанализаданных типотсеченияправилассоциации типполяанализаданных типстандартизациианализаданных типупорядочиванияправилассоциациианализаданных типупорядочиванияшаблоновпоследовательностейанализаданных типупрощениядереварешений "+ "wsнаправлениепараметра вариантxpathxs вариантзаписидатыjson вариантпростоготипаxs видгруппымоделиxs видфасетаxdto действиепостроителяdom завершенностьпростоготипаxs завершенностьсоставноготипаxs завершенностьсхемыxs запрещенныеподстановкиxs исключениягруппподстановкиxs категорияиспользованияатрибутаxs категорияограниченияидентичностиxs категорияограниченияпространствименxs методнаследованияxs модельсодержимогоxs назначениетипаxml недопустимыеподстановкиxs обработкапробельныхсимволовxs обработка\ содержимогоxs ограничениезначенияxs параметрыотбораузловdom переносстрокjson позициявдокументеdom пробельныесимволыxml типатрибутаxml типзначенияjson типканоническогоxml типкомпонентыxs типпроверкиxml типрезультатаdomxpath типузлаdom типузлаxml формаxml формапредставленияxs форматдатыjson экранированиесимволовjson "+ "видсравнениякомпоновкиданных действиеобработкирасшифровкикомпоновкиданных направлениесортировкикомпоновкиданных расположениевложенныхэлементоврезультатакомпоновкиданных расположениеитоговкомпоновкиданных расположениегруппировкикомпоновкиданных расположениеполейгруппировкикомпоновкиданных расположениеполякомпоновкиданных расположениереквизитовкомпоновкиданных расположениересурсовкомпоновкиданных типбухгалтерскогоостаткакомпоновкиданных типвыводатекстакомпоновкиданных типгруппировкикомпоновкиданн\ ых типгруппыэлементовотборакомпоновкиданных типдополненияпериодакомпоновкиданных типзаголовкаполейкомпоновкиданных типмакетагруппировкикомпоновкиданных типмакетаобластикомпоновкиданных типостаткакомпоновкиданных типпериодакомпоновкиданных типразмещениятекстакомпоновкиданных типсвязинаборовданныхкомпоновкиданных типэлементарезультатакомпоновкиданных расположениелегендыдиаграммыкомпоновкиданных типпримененияотборакомпоновкиданных режимотображенияэлементанастройкикомпоновкиданных режимотображенияна\ строеккомпоновкиданных состояниеэлементанастройкикомпоновкиданных способвосстановлениянастроеккомпоновкиданных режимкомпоновкирезультата использованиепараметракомпоновкиданных автопозицияресурсовкомпоновкиданных вариантиспользованиягруппировкикомпоновкиданных расположениересурсоввдиаграммекомпоновкиданных фиксациякомпоновкиданных использованиеусловногооформлениякомпоновкиданных "+ "важностьинтернетпочтовогосообщения обработкатекстаинтернетпочтовогосообщения способкодированияинтернетпочтовоговложения способкодированиянеasciiсимволовинтернетпочтовогосообщения типтекстапочтовогосообщения протоколинтернетпочты статусразборапочтовогосообщения "+ "режимтранзакциизаписижурналарегистрации статустранзакциизаписижурналарегистрации уровеньжурналарегистрации "+"расположениехранилищасертификатовкриптографии режимвключениясертификатовкриптографии режимпроверкисертификатакриптографии типхранилищасертификатовкриптографии "+ "кодировкаименфайловвzipфайле методсжатияzip методшифрованияzip режимвосстановленияпутейфайловzip режимобработкиподкаталоговzip режимсохраненияпутейzip уровеньсжатияzip "+"звуковоеоповещение направлениепереходакстроке позициявпотоке порядокбайтов режимблокировкиданных режимуправленияблокировкойданных сервисвстроенныхпокупок состояниефоновогозадания типподпис\ чикадоставляемыхуведомлений уровеньиспользованиязащищенногосоединенияftp "+"направлениепорядкасхемызапроса типдополненияпериодамисхемызапроса типконтрольнойточкисхемызапроса типобъединениясхемызапроса типпараметрадоступнойтаблицысхемызапроса типсоединениясхемызапроса "+ "httpметод автоиспользованиеобщегореквизита автопрефиксномеразадачи вариантвстроенногоязыка видиерархии видрегистранакопления видтаблицывнешнегоисточникаданных записьдвиженийприпроведении заполнениепоследовательностей индексирование использованиебазыпланавидоврасчета использованиебыстроговыбора использованиеобщегореквизита использованиеподчинения использованиеполнотекстовогопоиска использованиеразделяемыхданныхобщегореквизита использованиереквизита назначениеиспользованияприложения назначениерас\ ширенияконфигурации направлениепередачи обновлениепредопределенныхданных оперативноепроведение основноепредставлениевидарасчета основноепредставлениевидахарактеристики основноепредставлениезадачи основноепредставлениепланаобмена основноепредставлениесправочника основноепредставлениесчета перемещениеграницыприпроведении периодичностьномерабизнеспроцесса периодичностьномерадокумента периодичностьрегистрарасчета периодичностьрегистрасведений повторноеиспользованиевозвращаемыхзначений полнотекстовый\ поискпривводепостроке принадлежностьобъекта проведение разделениеаутентификацииобщегореквизита разделениеданныхобщегореквизита разделениерасширенийконфигурацииобщегореквизита режимавтонумерацииобъектов режимзаписирегистра режимиспользованиямодальности режимиспользованиясинхронныхвызововрасширенийплатформыивнешнихкомпонент режимповторногоиспользованиясеансов режимполученияданныхвыборапривводепостроке режимсовместимости режимсовместимостиинтерфейса режимуправленияблокировкойданныхпоумолчанию серии\ кодовпланавидовхарактеристик сериикодовпланасчетов сериикодовсправочника созданиепривводе способвыбора способпоискастрокипривводепостроке способредактирования типданныхтаблицывнешнегоисточникаданных типкодапланавидоврасчета типкодасправочника типмакета типномерабизнеспроцесса типномерадокумента типномеразадачи типформы удалениедвижений "+ "важностьпроблемыприменениярасширенияконфигурации вариантинтерфейсаклиентскогоприложения вариантмасштабаформклиентскогоприложения вариантосновногошрифтаклиентскогоприложения вариантстандартногопериода вариантстандартнойдатыначала видграницы видкартинки видотображенияполнотекстовогопоиска видрамки видсравнения видцвета видчисловогозначения видшрифта допустимаядлина допустимыйзнак использованиеbyteordermark использованиеметаданныхполнотекстовогопоиска источникрасширенийконфигурации клавиша кодвозв\ ратадиалога кодировкаxbase кодировкатекста направлениепоиска направлениесортировки обновлениепредопределенныхданных обновлениеприизмененииданных отображениепанелиразделов проверказаполнения режимдиалогавопрос режимзапускаклиентскогоприложения режимокругления режимоткрытияформприложения режимполнотекстовогопоиска скоростьклиентскогосоединения состояниевнешнегоисточникаданных состояниеобновленияконфигурациибазыданных способвыборасертификатаwindows способкодированиястроки статуссообщения типвнешней\ компоненты типплатформы типповеденияклавишиenter типэлементаинформацииовыполненииобновленияконфигурациибазыданных уровеньизоляциитранзакций хешфункция частидаты",TYPE="comобъект ftpсоединение httpзапрос httpсервисответ httpсоединение wsопределения wsпрокси xbase анализданных аннотацияxs блокировкаданных буфердвоичныхданных включениеxs выражениекомпо\ новкиданных генераторслучайныхчисел географическаясхема географическиекоординаты графическаясхема группамоделиxs данныерасшифровкикомпоновкиданных двоичныеданные дендрограмма диаграмма диаграммаганта диалогвыборафайла диалогвыборацвета диалогвыборашрифта диалограсписаниярегламентногозадания диалогредактированиястандартногопериода диапазон документdom документhtml документацияxs доставляемоеуведомление записьdom записьfastinfoset записьhtml записьjson записьxml записьzipфайла записьданных записьт\ екста записьузловdom запрос защищенноесоединениеopenssl значенияполейрасшифровкикомпоновкиданных извлечениетекста импортxs интернетпочта интернетпочтовоесообщение интернетпочтовыйпрофиль интернетпрокси интернетсоединение информациядляприложенияxs использованиеатрибутаxs использованиесобытияжурналарегистрации источникдоступныхнастроеккомпоновкиданных итераторузловdom картинка квалификаторыдаты квалификаторыдвоичныхданных квалификаторыстроки квалификаторычисла компоновщикмакетакомпоновкиданных ком\ поновщикнастроеккомпоновкиданных конструктормакетаоформлениякомпоновкиданных конструкторнастроеккомпоновкиданных конструкторформатнойстроки линия макеткомпоновкиданных макетобластикомпоновкиданных макетоформлениякомпоновкиданных маскаxs менеджеркриптографии наборсхемxml настройкикомпоновкиданных настройкисериализацииjson обработкакартинок обработкарасшифровкикомпоновкиданных обходдереваdom объявлениеатрибутаxs объявлениенотацииxs объявлениеэлементаxs описаниеиспользованиясобытиядоступжурналареги\ страции описаниеиспользованиясобытияотказвдоступежурналарегистрации описаниеобработкирасшифровкикомпоновкиданных описаниепередаваемогофайла описаниетипов определениегруппыатрибутовxs определениегруппымоделиxs определениеограниченияидентичностиxs определениепростоготипаxs определениесоставноготипаxs определениетипадокументаdom определенияxpathxs отборкомпоновкиданных пакетотображаемыхдокументов параметрвыбора параметркомпоновкиданных параметрызаписиjson параметрызаписиxml параметрычтенияxml перео\ пределениеxs планировщик полеанализаданных полекомпоновкиданных построительdom построительзапроса построительотчета построительотчетаанализаданных построительсхемxml поток потоквпамяти почта почтовоесообщение преобразованиеxsl преобразованиекканоническомуxml процессорвыводарезультатакомпоновкиданныхвколлекциюзначений процессорвыводарезультатакомпоновкиданныхвтабличныйдокумент процессоркомпоновкиданных разыменовательпространствименdom рамка расписаниерегламентногозадания расширенноеимяxml результ\ атчтенияданных своднаядиаграмма связьпараметравыбора связьпотипу связьпотипукомпоновкиданных сериализаторxdto сертификатклиентаwindows сертификатклиентафайл сертификаткриптографии сертификатыудостоверяющихцентровwindows сертификатыудостоверяющихцентровфайл сжатиеданных системнаяинформация сообщениепользователю сочетаниеклавиш сравнениезначений стандартнаядатаначала стандартныйпериод схемаxml схемакомпоновкиданных табличныйдокумент текстовыйдокумент тестируемоеприложение типданныхxml уникальныйид\ ентификатор фабрикаxdto файл файловыйпоток фасетдлиныxs фасетколичестваразрядовдробнойчастиxs фасетмаксимальноговключающегозначенияxs фасетмаксимальногоисключающегозначенияxs фасетмаксимальнойдлиныxs фасетминимальноговключающегозначенияxs фасетминимальногоисключающегозначенияxs фасетминимальнойдлиныxs фасетобразцаxs фасетобщегоколичестваразрядовxs фасетперечисленияxs фасетпробельныхсимволовxs фильтрузловdom форматированнаястрока форматированныйдокумент фрагментxs хешированиеданных хранилищезначе\ ния цвет чтениеfastinfoset чтениеhtml чтениеjson чтениеxml чтениеzipфайла чтениеданных чтениетекста чтениеузловdom шрифт элементрезультатакомпоновкиданных "+"comsafearray деревозначений массив соответствие списокзначений структура таблицазначений фиксированнаяструктура фиксированноесоответствие фиксированныймассив ", LITERAL="null истина ложь неопределено",NUMBERS=hljs.inherit(hljs.NUMBER_MODE),STRINGS={className:"string",begin:'"|\\|',end:'"|$',contains:[{begin:'""'}]},DATE2={begin:"'",end:"'",excludeBegin:!0,excludeEnd:!0,contains:[{className:"number",begin:"\\d{4}([\\.\\\\/:-]?\\d{2}){0,5}"}]},PUNCTUATION={match:/[;()+\-:=,]/,className:"punctuation",relevance:0},COMMENTS=hljs.inherit(hljs.C_LINE_COMMENT_MODE),META={className:"meta",begin:"#|&",end:"$",keywords:{$pattern:UNDERSCORE_IDENT_RE, keyword:KEYWORD+METAKEYWORD},contains:[COMMENTS]},SYMBOL={className:"symbol",begin:"~",end:";|:",excludeEnd:!0},FUNCTION={className:"function",variants:[{begin:"процедура|функция",end:"\\)",keywords:"процедура функция"},{begin:"конецпроцедуры|конецфункции",keywords:"конецпроцедуры конецфункции"}],contains:[{begin:"\\(",end:"\\)",endsParent:!0,contains:[{className:"params",begin:UNDERSCORE_IDENT_RE,end:",",excludeEnd:!0, endsWithParent:!0,keywords:{$pattern:UNDERSCORE_IDENT_RE,keyword:"знач",literal:LITERAL},contains:[NUMBERS,STRINGS,DATE2]},COMMENTS]},hljs.inherit(hljs.TITLE_MODE,{begin:UNDERSCORE_IDENT_RE})]};return{name:"1C:Enterprise",case_insensitive:!0,keywords:{$pattern:UNDERSCORE_IDENT_RE,keyword:KEYWORD,built_in:BUILTIN,class:CLASS2,type:TYPE,literal:LITERAL},contains:[META,FUNCTION,COMMENTS,SYMBOL,NUMBERS,STRINGS,DATE2,PUNCTUATION]}}return _1c_1=_1c2,_1c_1}var abnf_1,hasRequiredAbnf;function requireAbnf(){ if(hasRequiredAbnf)return abnf_1;hasRequiredAbnf=1;function abnf2(hljs){const regex=hljs.regex,IDENT=/^[a-zA-Z][a-zA-Z0-9-]*/,KEYWORDS2=["ALPHA","BIT","CHAR","CR","CRLF","CTL","DIGIT","DQUOTE","HEXDIG","HTAB","LF","LWSP","OCTET","SP","VCHAR","WSP"],COMMENT=hljs.COMMENT(/;/,/$/),TERMINAL_BINARY={scope:"symbol",match:/%b[0-1]+(-[0-1]+|(\.[0-1]+)+)?/},TERMINAL_DECIMAL={scope:"symbol",match:/%d[0-9]+(-[0-9]+|(\.[0-9]+)+)?/},TERMINAL_HEXADECIMAL={scope:"symbol",match:/%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+)?/}, CASE_SENSITIVITY={scope:"symbol",match:/%[si](?=".*")/},RULE_DECLARATION={scope:"attribute",match:regex.concat(IDENT,/(?=\s*=)/)};return{name:"Augmented Backus-Naur Form",illegal:/[!@#$^&',?+~`|:]/,keywords:KEYWORDS2,contains:[{scope:"operator",match:/=\/?/},RULE_DECLARATION,COMMENT,TERMINAL_BINARY,TERMINAL_DECIMAL,TERMINAL_HEXADECIMAL,CASE_SENSITIVITY,hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE]}}return abnf_1=abnf2,abnf_1}var accesslog_1,hasRequiredAccesslog;function requireAccesslog(){if(hasRequiredAccesslog) return accesslog_1;hasRequiredAccesslog=1;function accesslog2(hljs){const regex=hljs.regex,HTTP_VERBS=["GET","POST","HEAD","PUT","DELETE","CONNECT","OPTIONS","PATCH","TRACE"];return{name:"Apache Access Log",contains:[{className:"number",begin:/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?\b/,relevance:5},{className:"number",begin:/\b\d+\b/,relevance:0},{className:"string",begin:regex.concat(/"/,regex.either(...HTTP_VERBS)),end:/"/,keywords:HTTP_VERBS,illegal:/\n/,relevance:5,contains:[{begin:/HTTP\/[12]\.\d'/, relevance:5}]},{className:"string",begin:/\[\d[^\]\n]{8,}\]/,illegal:/\n/,relevance:1},{className:"string",begin:/\[/,end:/\]/,illegal:/\n/,relevance:0},{className:"string",begin:/"Mozilla\/\d\.\d \(/,end:/"/,illegal:/\n/,relevance:3},{className:"string",begin:/"/,end:/"/,illegal:/\n/,relevance:0}]}}return accesslog_1=accesslog2,accesslog_1}var actionscript_1,hasRequiredActionscript;function requireActionscript(){if(hasRequiredActionscript)return actionscript_1;hasRequiredActionscript=1;function actionscript2(hljs){ const regex=hljs.regex,IDENT_RE2=/[a-zA-Z_$][a-zA-Z0-9_$]*/,PKG_NAME_RE=regex.concat(IDENT_RE2,regex.concat("(\\.",IDENT_RE2,")*")),IDENT_FUNC_RETURN_TYPE_RE=/([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)/,AS3_REST_ARG_MODE={className:"rest_arg",begin:/[.]{3}/,end:IDENT_RE2,relevance:10};return{name:"ActionScript",aliases:["as"],keywords:{keyword:["as","break","case","catch","class","const","continue","default","delete","do","dynamic","each","else","extends","final","finally","for","function","get","if","imple\ ments","import","in","include","instanceof","interface","internal","is","namespace","native","new","override","package","private","protected","public","return","set","static","super","switch","this","throw","try","typeof","use","var","void","while","with"],literal:["true","false","null","undefined"]},contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.C_NUMBER_MODE,{match:[/\bpackage/,/\s+/,PKG_NAME_RE],className:{1:"keyword",3:"title.cl\ ass"}},{match:[/\b(?:class|interface|extends|implements)/,/\s+/,IDENT_RE2],className:{1:"keyword",3:"title.class"}},{className:"meta",beginKeywords:"import include",end:/;/,keywords:{keyword:"import include"}},{beginKeywords:"function",end:/[{;]/,excludeEnd:!0,illegal:/\S/,contains:[hljs.inherit(hljs.TITLE_MODE,{className:"title.function"}),{className:"params",begin:/\(/,end:/\)/,contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,AS3_REST_ARG_MODE]}, {begin:regex.concat(/:\s*/,IDENT_FUNC_RETURN_TYPE_RE)}]},hljs.METHOD_GUARD],illegal:/#/}}return actionscript_1=actionscript2,actionscript_1}var ada_1,hasRequiredAda;function requireAda(){if(hasRequiredAda)return ada_1;hasRequiredAda=1;function ada2(hljs){const INTEGER_RE="\\d(_|\\d)*",EXPONENT_RE="[eE][-+]?"+INTEGER_RE,DECIMAL_LITERAL_RE=INTEGER_RE+"(\\."+INTEGER_RE+")?("+EXPONENT_RE+")?",BASED_INTEGER_RE="\\w+",NUMBER_RE="\\b("+(INTEGER_RE+"#"+BASED_INTEGER_RE+"(\\."+BASED_INTEGER_RE+")?#("+EXPONENT_RE+ ")?")+"|"+DECIMAL_LITERAL_RE+")",ID_REGEX="[A-Za-z](_?[A-Za-z0-9.])*",BAD_CHARS=`[]\\{\\}%#'"`,COMMENTS=hljs.COMMENT("--","$"),VAR_DECLS={begin:"\\s+:\\s+",end:"\\s*(:=|;|\\)|=>|$)",illegal:BAD_CHARS,contains:[{beginKeywords:"loop for declare others",endsParent:!0},{className:"keyword",beginKeywords:"not null constant access function procedure in out aliased exception"},{className:"type",begin:ID_REGEX,endsParent:!0,relevance:0}]};return{name:"Ada",case_insensitive:!0,keywords:{keyword:["abort", "else","new","return","abs","elsif","not","reverse","abstract","end","accept","entry","select","access","exception","of","separate","aliased","exit","or","some","all","others","subtype","and","for","out","synchronized","array","function","overriding","at","tagged","generic","package","task","begin","goto","pragma","terminate","body","private","then","if","procedure","type","case","in","protected","constant","interface","is","raise","use","declare","range","delay","limited","record","when","delta", "loop","rem","while","digits","renames","with","do","mod","requeue","xor"],literal:["True","False"]},contains:[COMMENTS,{className:"string",begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{className:"string",begin:/'.'/},{className:"number",begin:NUMBER_RE,relevance:0},{className:"symbol",begin:"'"+ID_REGEX},{className:"title",begin:"(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?",end:"(is|$)",keywords:"package body",excludeBegin:!0,excludeEnd:!0,illegal:BAD_CHARS},{begin:"(\\\ b(with|overriding)\\s+)?\\b(function|procedure)\\s+",end:"(\\bis|\\bwith|\\brenames|\\)\\s*;)",keywords:"overriding function procedure with is renames return",returnBegin:!0,contains:[COMMENTS,{className:"title",begin:"(\\bwith\\s+)?\\b(function|procedure)\\s+",end:"(\\(|\\s+|$)",excludeBegin:!0,excludeEnd:!0,illegal:BAD_CHARS},VAR_DECLS,{className:"type",begin:"\\breturn\\s+",end:"(\\s+|;|$)",keywords:"return",excludeBegin:!0,excludeEnd:!0,endsParent:!0,illegal:BAD_CHARS}]},{className:"type",begin:"\ \\b(sub)?type\\s+",end:"\\s+",keywords:"type",excludeBegin:!0,illegal:BAD_CHARS},VAR_DECLS]}}return ada_1=ada2,ada_1}var angelscript_1,hasRequiredAngelscript;function requireAngelscript(){if(hasRequiredAngelscript)return angelscript_1;hasRequiredAngelscript=1;function angelscript2(hljs){const builtInTypeMode={className:"built_in",begin:"\\b(void|bool|int8|int16|int32|int64|int|uint8|uint16|uint32|uint64|uint|string|ref|array|double|float|auto|dictionary)"},objectHandleMode={className:"symbol",begin:"\ [a-zA-Z0-9_]+@"},genericMode={className:"keyword",begin:"<",end:">",contains:[builtInTypeMode,objectHandleMode]};return builtInTypeMode.contains=[genericMode],objectHandleMode.contains=[genericMode],{name:"AngelScript",aliases:["asc"],keywords:["for","in|0","break","continue","while","do|0","return","if","else","case","switch","namespace","is","cast","or","and","xor","not","get|0","in","inout|10","out","override","set|0","private","public","const","default|0","final","shared","external","mixin|1\ 0","enum","typedef","funcdef","this","super","import","from","interface","abstract|0","try","catch","protected","explicit","property"],illegal:"(^using\\s+[A-Za-z0-9_\\.]+;$|\\bfunction\\s*[^\\(])",contains:[{className:"string",begin:"'",end:"'",illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE],relevance:0},{className:"string",begin:'"""',end:'"""'},{className:"string",begin:'"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE],relevance:0},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"\ string",begin:"^\\s*\\[",end:"\\]"},{beginKeywords:"interface namespace",end:/\{/,illegal:"[;.\\-]",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+"}]},{beginKeywords:"class",end:/\{/,illegal:"[;.\\-]",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+",contains:[{begin:"[:,]\\s*",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+"}]}]}]},builtInTypeMode,objectHandleMode,{className:"literal",begin:"\\b(null|true|false)"},{className:"number",relevance:0,begin:"(-?)(\\b0[xXbBoOdD][a-fA-F0-9]+|(\\\ b\\d+(\\.\\d*)?f?|\\.\\d+f?)([eE][-+]?\\d+f?)?)"}]}}return angelscript_1=angelscript2,angelscript_1}var apache_1,hasRequiredApache;function requireApache(){if(hasRequiredApache)return apache_1;hasRequiredApache=1;function apache2(hljs){const NUMBER_REF={className:"number",begin:/[$%]\d+/},NUMBER={className:"number",begin:/\b\d+/},IP_ADDRESS={className:"number",begin:/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?/},PORT_NUMBER={className:"number",begin:/:\d{1,5}/};return{name:"Apache config",aliases:[ "apacheconf"],case_insensitive:!0,contains:[hljs.HASH_COMMENT_MODE,{className:"section",begin:/<\/?/,end:/>/,contains:[IP_ADDRESS,PORT_NUMBER,hljs.inherit(hljs.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute",begin:/\w+/,relevance:0,keywords:{_:["order","deny","allow","setenv","rewriterule","rewriteengine","rewritecond","documentroot","sethandler","errordocument","loadmodule","options","header","listen","serverroot","servername"]},starts:{end:/$/,relevance:0,keywords:{literal:"on off al\ l deny allow"},contains:[{scope:"punctuation",match:/\\\n/},{className:"meta",begin:/\s\[/,end:/\]$/},{className:"variable",begin:/[\$%]\{/,end:/\}/,contains:["self",NUMBER_REF]},IP_ADDRESS,NUMBER,hljs.QUOTE_STRING_MODE]}}],illegal:/\S/}}return apache_1=apache2,apache_1}var applescript_1,hasRequiredApplescript;function requireApplescript(){if(hasRequiredApplescript)return applescript_1;hasRequiredApplescript=1;function applescript2(hljs){const regex=hljs.regex,STRING=hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal:null}),PARAMS={className:"params",begin:/\(/,end:/\)/,contains:["self",hljs.C_NUMBER_MODE,STRING]},COMMENT_MODE_1=hljs.COMMENT(/--/,/$/),COMMENT_MODE_2=hljs.COMMENT(/\(\*/,/\*\)/,{contains:["self",COMMENT_MODE_1]}),COMMENTS=[COMMENT_MODE_1,COMMENT_MODE_2,hljs.HASH_COMMENT_MODE],KEYWORD_PATTERNS=[/apart from/,/aside from/,/instead of/,/out of/,/greater than/,/isn't|(doesn't|does not) (equal|come before|come after|contain)/,/(greater|less) than( or equal)?/,/(starts?|ends|begins?) with/,/contained by/, /comes (before|after)/,/a (ref|reference)/,/POSIX (file|path)/,/(date|time) string/,/quoted form/],BUILT_IN_PATTERNS=[/clipboard info/,/the clipboard/,/info for/,/list (disks|folder)/,/mount volume/,/path to/,/(close|open for) access/,/(get|set) eof/,/current date/,/do shell script/,/get volume settings/,/random number/,/set volume/,/system attribute/,/system info/,/time to GMT/,/(load|run|store) script/,/scripting components/,/ASCII (character|number)/,/localized string/,/choose (application|color|file|file name|folder|from list|remote application|URL)/, /display (alert|dialog)/];return{name:"AppleScript",aliases:["osascript"],keywords:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second \ set seventh since sixth some tell tenth that the|0 then third through thru timeout times to transaction try until where while whose with without",literal:"AppleScript false linefeed return pi quote result space tab true",built_in:"alias application boolean class constant date file integer list number real record string text activate beep count delay launch log offset read round run say summarize write character characters contents day frontmost id item length month name|0 paragraph paragraphs re\ st reverse running time version weekday word words year"},contains:[STRING,hljs.C_NUMBER_MODE,{className:"built_in",begin:regex.concat(/\b/,regex.either(...BUILT_IN_PATTERNS),/\b/)},{className:"built_in",begin:/^\s*return\b/},{className:"literal",begin:/\b(text item delimiters|current application|missing value)\b/},{className:"keyword",begin:regex.concat(/\b/,regex.either(...KEYWORD_PATTERNS),/\b/)},{beginKeywords:"on",illegal:/[${=;\n]/,contains:[hljs.UNDERSCORE_TITLE_MODE,PARAMS]},...COMMENTS], illegal:/\/\/|->|=>|\[\[/}}return applescript_1=applescript2,applescript_1}var arcade_1,hasRequiredArcade;function requireArcade(){if(hasRequiredArcade)return arcade_1;hasRequiredArcade=1;function arcade2(hljs){const regex=hljs.regex,IDENT_RE2="[A-Za-z_][0-9A-Za-z_]*",KEYWORDS2={keyword:["break","case","catch","continue","debugger","do","else","export","for","function","if","import","in","new","of","return","switch","try","var","void","while"],literal:["BackSlash","DoubleQuote","ForwardSlash","I\ nfinity","NaN","NewLine","PI","SingleQuote","Tab","TextFormatting","false","null","true","undefined"],built_in:["Abs","Acos","All","Angle","Any","Area","AreaGeodetic","Array","Asin","Atan","Atan2","Attachments","Average","Back","Bearing","Boolean","Buffer","BufferGeodetic","Ceil","Centroid","ChangeTimeZone","Clip","Concatenate","Console","Constrain","Contains","ConvertDirection","ConvexHull","Cos","Count","Crosses","Cut","Date|0","DateAdd","DateDiff","DateOnly","Day","Decode","DefaultValue","Den\ sify","DensifyGeodetic","Dictionary","Difference","Disjoint","Distance","DistanceGeodetic","DistanceToCoordinate","Distinct","Domain","DomainCode","DomainName","EnvelopeIntersects","Equals","Erase","Exp","Expects","Extent","Feature","FeatureInFilter","FeatureSet","FeatureSetByAssociation","FeatureSetById","FeatureSetByName","FeatureSetByPortalItem","FeatureSetByRelationshipClass","FeatureSetByRelationshipName","Filter","FilterBySubtypeCode","Find","First|0","Floor","FromCharCode","FromCodePoint", "FromJSON","Front","GdbVersion","Generalize","Geometry","GetEnvironment","GetFeatureSet","GetFeatureSetInfo","GetUser","GroupBy","Guid","HasKey","HasValue","Hash","Hour","IIf","ISOMonth","ISOWeek","ISOWeekday","ISOYear","Includes","IndexOf","Insert","Intersection","Intersects","IsEmpty","IsNan","IsSelfIntersecting","IsSimple","KnowledgeGraphByPortalItem","Left|0","Length","Length3D","LengthGeodetic","Log","Lower","Map","Max","Mean","MeasureToCoordinate","Mid","Millisecond","Min","Minute","Month", "MultiPartToSinglePart","Multipoint","NearestCoordinate","NearestVertex","NextSequenceValue","None","Now","Number","Offset","OrderBy","Overlaps","Point","PointToCoordinate","Polygon","Polyline","Pop","Portal","Pow","Proper","Push","QueryGraph","Random","Reduce","Relate","Replace","Resize","Reverse","Right|0","RingIsClockwise","Rotate","Round","Schema","Second","SetGeometry","Simplify","Sin","Slice","Sort","Splice","Split","Sqrt","StandardizeFilename","StandardizeGuid","Stdev","SubtypeCode","Subt\ ypeName","Subtypes","Sum","SymmetricDifference","Tan","Text","Time","TimeZone","TimeZoneOffset","Timestamp","ToCharCode","ToCodePoint","ToHex","ToLocal","ToUTC","Today","Top|0","Touches","TrackAccelerationAt","TrackAccelerationWindow","TrackCurrentAcceleration","TrackCurrentDistance","TrackCurrentSpeed","TrackCurrentTime","TrackDistanceAt","TrackDistanceWindow","TrackDuration","TrackFieldWindow","TrackGeometryWindow","TrackIndex","TrackSpeedAt","TrackSpeedWindow","TrackStartTime","TrackWindow","\ Trim","TypeOf","Union","Upper","UrlEncode","Variance","Week","Weekday","When|0","Within","Year|0"]},PROFILE_VARS=["aggregatedFeatures","analytic","config","datapoint","datastore","editcontext","feature","featureSet","feedfeature","fencefeature","fencenotificationtype","graph","join","layer","locationupdate","map","measure","measure","originalFeature","record","reference","rowindex","sourcedatastore","sourcefeature","sourcelayer","target","targetdatastore","targetfeature","targetlayer","userInput", "value","variables","view"],SYMBOL={className:"symbol",begin:"\\$"+regex.either(...PROFILE_VARS)},NUMBER={className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:hljs.C_NUMBER_RE}],relevance:0},SUBST={className:"subst",begin:"\\$\\{",end:"\\}",keywords:KEYWORDS2,contains:[]},TEMPLATE_STRING={className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE,SUBST]};SUBST.contains=[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,TEMPLATE_STRING,NUMBER,hljs.REGEXP_MODE]; const PARAMS_CONTAINS=SUBST.contains.concat([hljs.C_BLOCK_COMMENT_MODE,hljs.C_LINE_COMMENT_MODE]);return{name:"ArcGIS Arcade",case_insensitive:!0,keywords:KEYWORDS2,contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,TEMPLATE_STRING,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,SYMBOL,NUMBER,{begin:/[{,]\s*/,relevance:0,contains:[{begin:IDENT_RE2+"\\s*:",returnBegin:!0,relevance:0,contains:[{className:"attr",begin:IDENT_RE2,relevance:0}]}]},{begin:"("+hljs.RE_STARTERS_RE+"|\\b(return)\\b)\\\ s*",keywords:"return",contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+IDENT_RE2+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:IDENT_RE2},{begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS2,contains:PARAMS_CONTAINS}]}]}],relevance:0},{beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[hljs.inherit(hljs.TITLE_MODE,{className:"title.function",begin:IDENT_RE2}), {className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:PARAMS_CONTAINS}],illegal:/\[|%/},{begin:/\$[(.]/}],illegal:/#(?!!)/}}return arcade_1=arcade2,arcade_1}var arduino_1,hasRequiredArduino;function requireArduino(){if(hasRequiredArduino)return arduino_1;hasRequiredArduino=1;function cPlusPlus2(hljs){const regex=hljs.regex,C_LINE_COMMENT_MODE=hljs.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),DECLTYPE_AUTO_RE="decltype\\(auto\\)",NAMESPACE_RE="[a-zA-Z_]\\w*::",FUNCTION_TYPE_RE="\ (?!struct)("+DECLTYPE_AUTO_RE+"|"+regex.optional(NAMESPACE_RE)+"[a-zA-Z_]\\w*"+regex.optional("<[^<>]+>")+")",CPP_PRIMITIVE_TYPES={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},STRINGS={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},hljs.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},NUMBERS={className:"\ number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:L\ L?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},PREPROCESSOR={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},hljs.inherit(STRINGS,{className:"string"}),{className:"string",begin:/<.*?>/},C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},TITLE_MODE={className:"title",begin:regex.optional(NAMESPACE_RE)+hljs.IDENT_RE,relevance:0},FUNCTION_TITLE=regex.optional(NAMESPACE_RE)+ hljs.IDENT_RE+"\\s*\\(",RESERVED_KEYWORDS=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","n\ oexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],RESERVED_TYPES=["bool","char","char16_t","char32_t","char8_t","double", "float","int","long","short","void","wchar_t","unsigned","signed","const","static"],TYPE_HINTS=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursiv\ e_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],FUNCTION_HINTS=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl", "exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","ss\ canf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],CPP_KEYWORDS={type:RESERVED_TYPES,keyword:RESERVED_KEYWORDS,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:TYPE_HINTS},FUNCTION_DISPATCH={className:"function.dispatch",relevance:0,keywords:{_hint:FUNCTION_HINTS}, begin:regex.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,hljs.IDENT_RE,regex.lookahead(/(<[^<>]+>|)\s*\(/))},EXPRESSION_CONTAINS=[FUNCTION_DISPATCH,PREPROCESSOR,CPP_PRIMITIVE_TYPES,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,NUMBERS,STRINGS],EXPRESSION_CONTEXT={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:CPP_KEYWORDS,contains:EXPRESSION_CONTAINS.concat([{begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,contains:EXPRESSION_CONTAINS. concat(["self"]),relevance:0}]),relevance:0},FUNCTION_DECLARATION={className:"function",begin:"("+FUNCTION_TYPE_RE+"[\\*&\\s]+)+"+FUNCTION_TITLE,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:CPP_KEYWORDS,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:DECLTYPE_AUTO_RE,keywords:CPP_KEYWORDS,relevance:0},{begin:FUNCTION_TITLE,returnBegin:!0,contains:[TITLE_MODE],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[STRINGS,NUMBERS]},{relevance:0,match:/,/},{className:"params", begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,relevance:0,contains:[C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,CPP_PRIMITIVE_TYPES,{begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,relevance:0,contains:["self",C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,CPP_PRIMITIVE_TYPES]}]},CPP_PRIMITIVE_TYPES,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,PREPROCESSOR]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:CPP_KEYWORDS,illegal:"",keywords:CPP_KEYWORDS,contains:["self",CPP_PRIMITIVE_TYPES]},{begin:hljs.IDENT_RE+"::",keywords:CPP_KEYWORDS},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/, /\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function arduino2(hljs){const ARDUINO_KW={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand", "Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch", "scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","a\ ttachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blin\ kVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","\ tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noD\ isplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","ge\ tBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect", "line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},ARDUINO=cPlusPlus2(hljs),kws=ARDUINO.keywords;return kws.type=[ ...kws.type,...ARDUINO_KW.type],kws.literal=[...kws.literal,...ARDUINO_KW.literal],kws.built_in=[...kws.built_in,...ARDUINO_KW.built_in],kws._hints=ARDUINO_KW._hints,ARDUINO.name="Arduino",ARDUINO.aliases=["ino"],ARDUINO.supersetOf="cpp",ARDUINO}return arduino_1=arduino2,arduino_1}var armasm_1,hasRequiredArmasm;function requireArmasm(){if(hasRequiredArmasm)return armasm_1;hasRequiredArmasm=1;function armasm2(hljs){const COMMENT={variants:[hljs.COMMENT("^[ \\t]*(?=#)","$",{relevance:0,excludeBegin:!0}), hljs.COMMENT("[;@]","$",{relevance:0}),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]};return{name:"ARM Assembly",case_insensitive:!0,aliases:["arm"],keywords:{$pattern:"\\.?"+hljs.IDENT_RE,meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN \ ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 w0 \ w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 w15 w16 w17 w18 w19 w20 w21 w22 w23 w24 w25 w26 w27 w28 w29 w30 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25 x26 x27 x28 x29 x30 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr\ _cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 {PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} \ {RWPI} {SWST} {NOSWST} . @"},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2\ ?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?(?=\\s)"},COMMENT,hljs.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"[#$=]?\ 0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^[ \\t]*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"[=#]\\w+"}],relevance:0}]}}return armasm_1=armasm2,armasm_1}var xml_1,hasRequiredXml;function requireXml(){if(hasRequiredXml)return xml_1;hasRequiredXml=1;function xml2(hljs){const regex=hljs.regex,TAG_NAME_RE=regex.concat(/[\p{L}_]/u,regex.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u), XML_IDENT_RE=/[\p{L}0-9._:-]+/u,XML_ENTITIES={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},XML_META_KEYWORDS={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},XML_META_PAR_KEYWORDS=hljs.inherit(XML_META_KEYWORDS,{begin:/\(/,end:/\)/}),APOS_META_STRING_MODE=hljs.inherit(hljs.APOS_STRING_MODE,{className:"string"}),QUOTE_META_STRING_MODE=hljs.inherit(hljs.QUOTE_STRING_MODE,{className:"string"}),TAG_INTERNALS={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[XML_META_KEYWORDS,QUOTE_META_STRING_MODE, APOS_META_STRING_MODE,XML_META_PAR_KEYWORDS,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[XML_META_KEYWORDS,XML_META_PAR_KEYWORDS,QUOTE_META_STRING_MODE,APOS_META_STRING_MODE]}]}]},hljs.COMMENT(//,{relevance:10}),{begin://,relevance:10},XML_ENTITIES,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[QUOTE_META_STRING_MODE]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/, keywords:{name:"style"},contains:[TAG_INTERNALS],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[TAG_INTERNALS],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:regex.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:TAG_NAME_RE, relevance:0,starts:TAG_INTERNALS}]},{className:"tag",begin:regex.concat(/<\//,regex.lookahead(regex.concat(TAG_NAME_RE,/>/))),contains:[{className:"name",begin:TAG_NAME_RE,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}return xml_1=xml2,xml_1}var asciidoc_1,hasRequiredAsciidoc;function requireAsciidoc(){if(hasRequiredAsciidoc)return asciidoc_1;hasRequiredAsciidoc=1;function asciidoc2(hljs){const regex=hljs.regex,HORIZONTAL_RULE={begin:"^'{3,}[ \\t]*$",relevance:10},ESCAPED_FORMATTING=[{begin:/\\[*_`]/}, {begin:/\\\\\*{2}[^\n]*?\*{2}/},{begin:/\\\\_{2}[^\n]*_{2}/},{begin:/\\\\`{2}[^\n]*`{2}/},{begin:/[:;}][*_`](?![*_`])/}],STRONG=[{className:"strong",begin:/\*{2}([^\n]+?)\*{2}/},{className:"strong",begin:regex.concat(/\*\*/,/((\*(?!\*)|\\[^\n]|[^*\n\\])+\n)+/,/(\*(?!\*)|\\[^\n]|[^*\n\\])*/,/\*\*/),relevance:0},{className:"strong",begin:/\B\*(\S|\S[^\n]*?\S)\*(?!\w)/},{className:"strong",begin:/\*[^\s]([^\n]+\n)+([^\n]+)\*/}],EMPHASIS=[{className:"emphasis",begin:/_{2}([^\n]+?)_{2}/},{className:"\ emphasis",begin:regex.concat(/__/,/((_(?!_)|\\[^\n]|[^_\n\\])+\n)+/,/(_(?!_)|\\[^\n]|[^_\n\\])*/,/__/),relevance:0},{className:"emphasis",begin:/\b_(\S|\S[^\n]*?\S)_(?!\w)/},{className:"emphasis",begin:/_[^\s]([^\n]+\n)+([^\n]+)_/},{className:"emphasis",begin:"\\B'(?!['\\s])",end:"(\\n{2}|')",contains:[{begin:"\\\\'\\w",relevance:0}],relevance:0}],ADMONITION={className:"symbol",begin:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",relevance:10},BULLET_LIST={className:"bullet",begin:"^(\\*+|-+|\\.+|[^\ \\n]+?::)\\s+"};return{name:"AsciiDoc",aliases:["adoc"],contains:[hljs.COMMENT("^/{4,}\\n","\\n/{4,}$",{relevance:10}),hljs.COMMENT("^//","$",{relevance:0}),{className:"title",begin:"^\\.\\w.*$"},{begin:"^[=\\*]{4,}\\n",end:"\\n^[=\\*]{4,}$",relevance:10},{className:"section",relevance:10,variants:[{begin:"^(={1,6})[ ].+?([ ]\\1)?$"},{begin:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$"}]},{className:"meta",begin:"^:.+?:",end:"\\s",excludeEnd:!0,relevance:10},{className:"meta",begin:"^\\[.+?\\]$",relevance:0}, {className:"quote",begin:"^_{4,}\\n",end:"\\n_{4,}$",relevance:10},{className:"code",begin:"^[\\-\\.]{4,}\\n",end:"\\n[\\-\\.]{4,}$",relevance:10},{begin:"^\\+{4,}\\n",end:"\\n\\+{4,}$",contains:[{begin:"<",end:">",subLanguage:"xml",relevance:0}],relevance:10},BULLET_LIST,ADMONITION,...ESCAPED_FORMATTING,...STRONG,...EMPHASIS,{className:"string",variants:[{begin:"``.+?''"},{begin:"`.+?'"}]},{className:"code",begin:/`{2}/,end:/(\n{2}|`{2})/},{className:"code",begin:"(`.+?`|\\+.+?\\+)",relevance:0}, {className:"code",begin:"^[ \\t]",end:"$",relevance:0},HORIZONTAL_RULE,{begin:"(link:)?(http|https|ftp|file|irc|image:?):\\S+?\\[[^[]*?\\]",returnBegin:!0,contains:[{begin:"(link|image:?):",relevance:0},{className:"link",begin:"\\w",end:"[^\\[]+",relevance:0},{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0,relevance:0}],relevance:10}]}}return asciidoc_1=asciidoc2,asciidoc_1}var aspectj_1,hasRequiredAspectj;function requireAspectj(){if(hasRequiredAspectj)return aspectj_1;hasRequiredAspectj= 1;function aspectj2(hljs){const regex=hljs.regex,KEYWORDS2=["false","synchronized","int","abstract","float","private","char","boolean","static","null","if","const","for","true","while","long","throw","strictfp","finally","protected","import","native","final","return","void","enum","else","extends","implements","break","transient","new","catch","instanceof","byte","super","volatile","case","assert","short","package","default","double","public","try","this","switch","continue","throws","privileged", "aspectOf","adviceexecution","proceed","cflowbelow","cflow","initialization","preinitialization","staticinitialization","withincode","target","within","execution","getWithinTypeName","handler","thisJoinPoint","thisJoinPointStaticPart","thisEnclosingJoinPointStaticPart","declare","parents","warning","error","soft","precedence","thisAspectInstance"],SHORTKEYS=["get","set","args","call"];return{name:"AspectJ",keywords:KEYWORDS2,illegal:/<\/|#/,contains:[hljs.COMMENT(/\/\*\*/,/\*\//,{relevance:0,contains:[ {begin:/\w+@/,relevance:0},{className:"doctag",begin:/@[A-Za-z]+/}]}),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{className:"class",beginKeywords:"aspect",end:/[{;=]/,excludeEnd:!0,illegal:/[:;"\[\]]/,contains:[{beginKeywords:"extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton"},hljs.UNDERSCORE_TITLE_MODE,{begin:/\([^\)]*/,end:/[)]+/,keywords:KEYWORDS2.concat(SHORTKEYS),excludeEnd:!1}]},{className:"class",beginKeywords:"\ class interface",end:/[{;=]/,excludeEnd:!0,relevance:0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},hljs.UNDERSCORE_TITLE_MODE]},{beginKeywords:"pointcut after before around throwing returning",end:/[)]/,excludeEnd:!1,illegal:/["\[\]]/,contains:[{begin:regex.concat(hljs.UNDERSCORE_IDENT_RE,/\s*\(/),returnBegin:!0,contains:[hljs.UNDERSCORE_TITLE_MODE]}]},{begin:/[:]/,returnBegin:!0,end:/[{;]/,relevance:0,excludeEnd:!1,keywords:KEYWORDS2,illegal:/["\[\]]/, contains:[{begin:regex.concat(hljs.UNDERSCORE_IDENT_RE,/\s*\(/),keywords:KEYWORDS2.concat(SHORTKEYS),relevance:0},hljs.QUOTE_STRING_MODE]},{beginKeywords:"new throw",relevance:0},{className:"function",begin:/\w+ +\w+(\.\w+)?\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/,returnBegin:!0,end:/[{;=]/,keywords:KEYWORDS2,excludeEnd:!0,contains:[{begin:regex.concat(hljs.UNDERSCORE_IDENT_RE,/\s*\(/),returnBegin:!0,relevance:0,contains:[hljs.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,relevance:0, keywords:KEYWORDS2,contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},hljs.C_NUMBER_MODE,{className:"meta",begin:/@[A-Za-z]+/}]}}return aspectj_1=aspectj2,aspectj_1}var autohotkey_1,hasRequiredAutohotkey;function requireAutohotkey(){if(hasRequiredAutohotkey)return autohotkey_1;hasRequiredAutohotkey=1;function autohotkey2(hljs){const BACKTICK_ESCAPE={begin:"`[\\s\\S]"};return{name:"AutoHotkey", case_insensitive:!0,aliases:["ahk"],keywords:{keyword:"Break Continue Critical Exit ExitApp Gosub Goto New OnExit Pause return SetBatchLines SetTimer Suspend Thread Throw Until ahk_id ahk_class ahk_pid ahk_exe ahk_group",literal:"true false NOT AND OR",built_in:"ComSpec Clipboard ClipboardAll ErrorLevel"},contains:[BACKTICK_ESCAPE,hljs.inherit(hljs.QUOTE_STRING_MODE,{contains:[BACKTICK_ESCAPE]}),hljs.COMMENT(";","$",{relevance:0}),hljs.C_BLOCK_COMMENT_MODE,{className:"number",begin:hljs.NUMBER_RE, relevance:0},{className:"variable",begin:"%[a-zA-Z0-9#_$@]+%"},{className:"built_in",begin:"^\\s*\\w+\\s*(,|%)"},{className:"title",variants:[{begin:'^[^\\n";]+::(?!=)'},{begin:'^[^\\n";]+:(?!=)',relevance:0}]},{className:"meta",begin:"^\\s*#\\w+",end:"$",relevance:0},{className:"built_in",begin:"A_[a-zA-Z0-9]+"},{begin:",\\s*,"}]}}return autohotkey_1=autohotkey2,autohotkey_1}var autoit_1,hasRequiredAutoit;function requireAutoit(){if(hasRequiredAutoit)return autoit_1;hasRequiredAutoit=1;function autoit2(hljs){ const KEYWORDS2="ByRef Case Const ContinueCase ContinueLoop Dim Do Else ElseIf EndFunc EndIf EndSelect EndSwitch EndWith Enum Exit ExitLoop For Func Global If In Local Next ReDim Return Select Static Step Switch Then To Until Volatile WEnd While With",DIRECTIVES=["EndRegion","forcedef","forceref","ignorefunc","include","include-once","NoTrayIcon","OnAutoItStartRegister","pragma","Region","RequireAdmin","Tidy_Off","Tidy_On","Tidy_Parameters"],LITERAL="True False And Null Not Or Default",BUILT_IN="\ Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend C\ ontrolSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir Fil\ eClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICrea\ te GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUI\ CtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete \ GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt Is\ Keyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWr\ ite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft Str\ ingLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown, UDPShutdown TCPStartup, UDPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent T\ rayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait WinWaitA\ ctive WinWaitClose WinWaitNotActive",COMMENT={variants:[hljs.COMMENT(";","$",{relevance:0}),hljs.COMMENT("#cs","#ce"),hljs.COMMENT("#comments-start","#comments-end")]},VARIABLE={begin:"\\$[A-z0-9_]+"},STRING={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},NUMBER={variants:[hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE]},PREPROCESSOR={className:"meta",begin:"#",end:"$",keywords:{keyword:DIRECTIVES},contains:[ {begin:/\\\n/,relevance:0},{beginKeywords:"include",keywords:{keyword:"include"},end:"$",contains:[STRING,{className:"string",variants:[{begin:"<",end:">"},{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]}]},STRING,COMMENT]},CONSTANT={className:"symbol",begin:"@[A-z0-9_]+"},FUNCTION={beginKeywords:"Func",end:"$",illegal:"\\$|\\[|%",contains:[hljs.inherit(hljs.UNDERSCORE_TITLE_MODE,{className:"title.function"}),{className:"params",begin:"\ \\(",end:"\\)",contains:[VARIABLE,STRING,NUMBER]}]};return{name:"AutoIt",case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:KEYWORDS2,built_in:BUILT_IN,literal:LITERAL},contains:[COMMENT,VARIABLE,STRING,NUMBER,PREPROCESSOR,CONSTANT,FUNCTION]}}return autoit_1=autoit2,autoit_1}var avrasm_1,hasRequiredAvrasm;function requireAvrasm(){if(hasRequiredAvrasm)return avrasm_1;hasRequiredAvrasm=1;function avrasm2(hljs){return{name:"AVR Assembly",case_insensitive:!0,keywords:{$pattern:"\\.?"+hljs.IDENT_RE, keyword:"adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts \ sub subi swap tst wdr",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr \ gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf",meta:".byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list .listmac .macro .nolist .org .set"},contains:[hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT( ";","$",{relevance:0}),hljs.C_NUMBER_MODE,hljs.BINARY_NUMBER_MODE,{className:"number",begin:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},hljs.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",illegal:"[^\\\\][^']"},{className:"symbol",begin:"^[A-Za-z0-9_.$]+:"},{className:"meta",begin:"#",end:"$"},{className:"subst",begin:"@[0-9]+"}]}}return avrasm_1=avrasm2,avrasm_1}var awk_1,hasRequiredAwk;function requireAwk(){if(hasRequiredAwk)return awk_1;hasRequiredAwk=1;function awk2(hljs){const VARIABLE={ className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},KEYWORDS2="BEGIN END if else while do for in break continue delete next nextfile function func exit|10",STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,relevance:10},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE]};return{name:"Awk",keywords:{keyword:KEYWORDS2},contains:[VARIABLE,STRING,hljs.REGEXP_MODE,hljs.HASH_COMMENT_MODE,hljs.NUMBER_MODE]}}return awk_1=awk2,awk_1}var axapta_1,hasRequiredAxapta;function requireAxapta(){if(hasRequiredAxapta)return axapta_1;hasRequiredAxapta=1;function axapta2(hljs){const IDENT_RE2=hljs.UNDERSCORE_IDENT_RE,KEYWORDS2={keyword:["abstract","as","asc","avg","break","breakpoint","by","byref","case","catch","changecompany","class","client","client","co\ mmon","const","continue","count","crosscompany","delegate","delete_from","desc","display","div","do","edit","else","eventhandler","exists","extends","final","finally","firstfast","firstonly","firstonly1","firstonly10","firstonly100","firstonly1000","flush","for","forceliterals","forcenestedloop","forceplaceholders","forceselectorder","forupdate","from","generateonly","group","hint","if","implements","in","index","insert_recordset","interface","internal","is","join","like","maxof","minof","mod","\ namespace","new","next","nofetch","notexists","optimisticlock","order","outer","pessimisticlock","print","private","protected","public","readonly","repeatableread","retry","return","reverse","select","server","setting","static","sum","super","switch","this","throw","try","ttsabort","ttsbegin","ttscommit","unchecked","update_recordset","using","validtimestate","void","where","while"],built_in:["anytype","boolean","byte","char","container","date","double","enum","guid","int","int64","long","real", "short","str","utcdatetime","var"],literal:["default","false","null","true"]},CLASS_DEFINITION={variants:[{match:[/(class|interface)\s+/,IDENT_RE2,/\s+(extends|implements)\s+/,IDENT_RE2]},{match:[/class\s+/,IDENT_RE2]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:KEYWORDS2};return{name:"X++",aliases:["x++"],keywords:KEYWORDS2,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,{className:"meta",begin:"#",end:"\ $"},CLASS_DEFINITION]}}return axapta_1=axapta2,axapta_1}var bash_1,hasRequiredBash;function requireBash(){if(hasRequiredBash)return bash_1;hasRequiredBash=1;function bash2(hljs){const regex=hljs.regex,VAR={},BRACED_VAR={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[VAR]}]};Object.assign(VAR,{className:"variable",variants:[{begin:regex.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},BRACED_VAR]});const SUBST={className:"subst",begin:/\$\(/,end:/\)/,contains:[hljs.BACKSLASH_ESCAPE]}, COMMENT=hljs.inherit(hljs.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),HERE_DOC={begin:/<<-?\s*(?=\w+)/,starts:{contains:[hljs.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},QUOTE_STRING={className:"string",begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,VAR,SUBST]};SUBST.contains.push(QUOTE_STRING);const ESCAPED_QUOTE={match:/\\"/},APOS_STRING={className:"string",begin:/'/,end:/'/},ESCAPED_APOS={match:/\\'/},ARITHMETIC={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/, className:"number"},hljs.NUMBER_MODE,VAR]},SH_LIKE_SHELLS=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],KNOWN_SHEBANG=hljs.SHEBANG({binary:`(${SH_LIKE_SHELLS.join("|")})`,relevance:10}),FUNCTION={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},KEYWORDS2=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],LITERALS2=["t\ rue","false"],PATH_MODE={match:/(\/[a-z._-]+)+/},SHELL_BUILT_INS=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],BASH_BUILT_INS=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],ZSH_BUILT_INS=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments", "compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","\ zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],GNU_CORE_UTILS=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","\ tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:KEYWORDS2,literal:LITERALS2,built_in:[...SHELL_BUILT_INS, ...BASH_BUILT_INS,"set","shopt",...ZSH_BUILT_INS,...GNU_CORE_UTILS]},contains:[KNOWN_SHEBANG,hljs.SHEBANG(),FUNCTION,ARITHMETIC,COMMENT,HERE_DOC,PATH_MODE,QUOTE_STRING,ESCAPED_QUOTE,APOS_STRING,ESCAPED_APOS,VAR]}}return bash_1=bash2,bash_1}var basic_1,hasRequiredBasic;function requireBasic(){if(hasRequiredBasic)return basic_1;hasRequiredBasic=1;function basic2(hljs){return{name:"BASIC",case_insensitive:!0,illegal:"^.",keywords:{$pattern:"[a-zA-Z][a-zA-Z0-9_$%!#]*",keyword:["ABS","ASC","AND","ATN", "AUTO|0","BEEP","BLOAD|10","BSAVE|10","CALL","CALLS","CDBL","CHAIN","CHDIR","CHR$|10","CINT","CIRCLE","CLEAR","CLOSE","CLS","COLOR","COM","COMMON","CONT","COS","CSNG","CSRLIN","CVD","CVI","CVS","DATA","DATE$","DEFDBL","DEFINT","DEFSNG","DEFSTR","DEF|0","SEG","USR","DELETE","DIM","DRAW","EDIT","END","ENVIRON","ENVIRON$","EOF","EQV","ERASE","ERDEV","ERDEV$","ERL","ERR","ERROR","EXP","FIELD","FILES","FIX","FOR|0","FRE","GET","GOSUB|10","GOTO","HEX$","IF","THEN","ELSE|0","INKEY$","INP","INPUT","INPU\ T#","INPUT$","INSTR","IMP","INT","IOCTL","IOCTL$","KEY","ON","OFF","LIST","KILL","LEFT$","LEN","LET","LINE","LLIST","LOAD","LOC","LOCATE","LOF","LOG","LPRINT","USING","LSET","MERGE","MID$","MKDIR","MKD$","MKI$","MKS$","MOD","NAME","NEW","NEXT","NOISE","NOT","OCT$","ON","OR","PEN","PLAY","STRIG","OPEN","OPTION","BASE","OUT","PAINT","PALETTE","PCOPY","PEEK","PMAP","POINT","POKE","POS","PRINT","PRINT]","PSET","PRESET","PUT","RANDOMIZE","READ","REM","RENUM","RESET|0","RESTORE","RESUME","RETURN|0","R\ IGHT$","RMDIR","RND","RSET","RUN","SAVE","SCREEN","SGN","SHELL","SIN","SOUND","SPACE$","SPC","SQR","STEP","STICK","STOP","STR$","STRING$","SWAP","SYSTEM","TAB","TAN","TIME$","TIMER","TROFF","TRON","TO","USR","VAL","VARPTR","VARPTR$","VIEW","WAIT","WHILE","WEND","WIDTH","WINDOW","WRITE","XOR"]},contains:[{scope:"string",begin:/"/,end:/"|$/,contains:[hljs.BACKSLASH_ESCAPE]},hljs.COMMENT("REM","$",{relevance:10}),hljs.COMMENT("'","$",{relevance:0}),{className:"symbol",begin:"^[0-9]+ ",relevance:10}, {className:"number",begin:"\\b\\d+(\\.\\d+)?([edED]\\d+)?[#!]?",relevance:0},{className:"number",begin:"(&[hH][0-9a-fA-F]{1,4})"},{className:"number",begin:"(&[oO][0-7]{1,6})"}]}}return basic_1=basic2,basic_1}var bnf_1,hasRequiredBnf;function requireBnf(){if(hasRequiredBnf)return bnf_1;hasRequiredBnf=1;function bnf2(hljs){return{name:"Backus–Naur Form",contains:[{className:"attribute",begin://},{begin:/::=/,end:/$/,contains:[{begin://},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE, hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]}]}}return bnf_1=bnf2,bnf_1}var brainfuck_1,hasRequiredBrainfuck;function requireBrainfuck(){if(hasRequiredBrainfuck)return brainfuck_1;hasRequiredBrainfuck=1;function brainfuck2(hljs){const LITERAL={className:"literal",begin:/[+-]+/,relevance:0};return{name:"Brainfuck",aliases:["bf"],contains:[hljs.COMMENT(/[^\[\]\.,\+\-<> \r\n]/,/[\[\]\.,\+\-<> \r\n]/,{contains:[{match:/[ ]+[^\[\]\.,\+\-<> \r\n]/,relevance:0}],returnEnd:!0,relevance:0}),{className:"\ title",begin:"[\\[\\]]",relevance:0},{className:"string",begin:"[\\.,]",relevance:0},{begin:/(?=\+\+|--)/,contains:[LITERAL]},LITERAL]}}return brainfuck_1=brainfuck2,brainfuck_1}var c_1,hasRequiredC;function requireC(){if(hasRequiredC)return c_1;hasRequiredC=1;function c2(hljs){const regex=hljs.regex,C_LINE_COMMENT_MODE=hljs.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),DECLTYPE_AUTO_RE="decltype\\(auto\\)",NAMESPACE_RE="[a-zA-Z_]\\w*::",FUNCTION_TYPE_RE="("+DECLTYPE_AUTO_RE+"|"+regex.optional(NAMESPACE_RE)+ "[a-zA-Z_]\\w*"+regex.optional("<[^<>]+>")+")",TYPES2={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},STRINGS={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},hljs.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},NUMBERS={className:"number",variants:[{match:/\b(0b[01']+)/}, {match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},PREPROCESSOR={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/, relevance:0},hljs.inherit(STRINGS,{className:"string"}),{className:"string",begin:/<.*?>/},C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},TITLE_MODE={className:"title",begin:regex.optional(NAMESPACE_RE)+hljs.IDENT_RE,relevance:0},FUNCTION_TITLE=regex.optional(NAMESPACE_RE)+hljs.IDENT_RE+"\\s*\\(",KEYWORDS2={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","s\ truct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","c\ onst","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf futu\ re isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},EXPRESSION_CONTAINS=[PREPROCESSOR,TYPES2,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,NUMBERS, STRINGS],EXPRESSION_CONTEXT={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:KEYWORDS2,contains:EXPRESSION_CONTAINS.concat([{begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:EXPRESSION_CONTAINS.concat(["self"]),relevance:0}]),relevance:0},FUNCTION_DECLARATION={begin:"("+FUNCTION_TYPE_RE+"[\\*&\\s]+)+"+FUNCTION_TITLE,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:KEYWORDS2,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:DECLTYPE_AUTO_RE,keywords:KEYWORDS2, relevance:0},{begin:FUNCTION_TITLE,returnBegin:!0,contains:[hljs.inherit(TITLE_MODE,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,relevance:0,contains:[C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,TYPES2,{begin:/\(/,end:/\)/,keywords:KEYWORDS2,relevance:0,contains:["self",C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,TYPES2]}]},TYPES2,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,PREPROCESSOR]}; return{name:"C",aliases:["h"],keywords:KEYWORDS2,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},hljs.TITLE_MODE]}]),exports:{preprocessor:PREPROCESSOR,strings:STRINGS,keywords:KEYWORDS2}}}return c_1=c2,c_1}var cal_1,hasRequiredCal;function requireCal(){ if(hasRequiredCal)return cal_1;hasRequiredCal=1;function cal2(hljs){const regex=hljs.regex,KEYWORDS2=["div","mod","in","and","or","not","xor","asserterror","begin","case","do","downto","else","end","exit","for","local","if","of","repeat","then","to","until","while","with","var"],LITERALS2="false true",COMMENT_MODES=[hljs.C_LINE_COMMENT_MODE,hljs.COMMENT(/\{/,/\}/,{relevance:0}),hljs.COMMENT(/\(\*/,/\*\)/,{relevance:10})],STRING={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},CHAR_STRING={ className:"string",begin:/(#\d+)+/},DATE2={className:"number",begin:"\\b\\d+(\\.\\d+)?(DT|D|T)",relevance:0},DBL_QUOTED_VARIABLE={className:"string",begin:'"',end:'"'},PROCEDURE={match:[/procedure/,/\s+/,/[a-zA-Z_][\w@]*/,/\s*/],scope:{1:"keyword",3:"title.function"},contains:[{className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:[STRING,CHAR_STRING,hljs.NUMBER_MODE]},...COMMENT_MODES]},OBJECT_TYPES=["Table","Form","Report","Dataport","Codeunit","XMLport","MenuSuite","Page","Query"], OBJECT2={match:[/OBJECT/,/\s+/,regex.either(...OBJECT_TYPES),/\s+/,/\d+/,/\s+(?=[^\s])/,/.*/,/$/],relevance:3,scope:{1:"keyword",3:"type",5:"number",7:"title"}};return{name:"C/AL",case_insensitive:!0,keywords:{keyword:KEYWORDS2,literal:LITERALS2},illegal:/\/\*/,contains:[{match:/[\w]+(?=\=)/,scope:"attribute",relevance:0},STRING,CHAR_STRING,DATE2,DBL_QUOTED_VARIABLE,hljs.NUMBER_MODE,OBJECT2,PROCEDURE]}}return cal_1=cal2,cal_1}var capnproto_1,hasRequiredCapnproto;function requireCapnproto(){if(hasRequiredCapnproto) return capnproto_1;hasRequiredCapnproto=1;function capnproto2(hljs){const KEYWORDS2=["struct","enum","interface","union","group","import","using","const","annotation","extends","in","of","on","as","with","from","fixed"],TYPES2=["Void","Bool","Int8","Int16","Int32","Int64","UInt8","UInt16","UInt32","UInt64","Float32","Float64","Text","Data","AnyPointer","AnyStruct","Capability","List"],LITERALS2=["true","false"],CLASS_DEFINITION={variants:[{match:[/(struct|enum|interface)/,/\s+/,hljs.IDENT_RE]},{ match:[/extends/,/\s*\(/,hljs.IDENT_RE,/\s*\)/]}],scope:{1:"keyword",3:"title.class"}};return{name:"Cap’n Proto",aliases:["capnp"],keywords:{keyword:KEYWORDS2,type:TYPES2,literal:LITERALS2},contains:[hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE,hljs.HASH_COMMENT_MODE,{className:"meta",begin:/@0x[\w\d]{16};/,illegal:/\n/},{className:"symbol",begin:/@\d+\b/},CLASS_DEFINITION]}}return capnproto_1=capnproto2,capnproto_1}var ceylon_1,hasRequiredCeylon;function requireCeylon(){if(hasRequiredCeylon)return ceylon_1; hasRequiredCeylon=1;function ceylon2(hljs){const KEYWORDS2=["assembly","module","package","import","alias","class","interface","object","given","value","assign","void","function","new","of","extends","satisfies","abstracts","in","out","return","break","continue","throw","assert","dynamic","if","else","switch","case","for","while","try","catch","finally","then","let","this","outer","super","is","exists","nonempty"],DECLARATION_MODIFIERS=["shared","abstract","formal","default","actual","variable", "late","native","deprecated","final","sealed","annotation","suppressWarnings","small"],DOCUMENTATION=["doc","by","license","see","throws","tagged"],SUBST={className:"subst",excludeBegin:!0,excludeEnd:!0,begin:/``/,end:/``/,keywords:KEYWORDS2,relevance:10},EXPRESSIONS=[{className:"string",begin:'"""',end:'"""',relevance:10},{className:"string",begin:'"',end:'"',contains:[SUBST]},{className:"string",begin:"'",end:"'"},{className:"number",begin:"#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]\ ?\\d+)?)?[kMGTPmunpf]?",relevance:0}];return SUBST.contains=EXPRESSIONS,{name:"Ceylon",keywords:{keyword:KEYWORDS2.concat(DECLARATION_MODIFIERS),meta:DOCUMENTATION},illegal:"\\$[^01]|#[^0-9a-fA-F]",contains:[hljs.C_LINE_COMMENT_MODE,hljs.COMMENT("/\\*","\\*/",{contains:["self"]}),{className:"meta",begin:'@[a-z]\\w*(?::"[^"]*")?'}].concat(EXPRESSIONS)}}return ceylon_1=ceylon2,ceylon_1}var clean_1,hasRequiredClean;function requireClean(){if(hasRequiredClean)return clean_1;hasRequiredClean=1;function clean2(hljs){ return{name:"Clean",aliases:["icl","dcl"],keywords:{keyword:["if","let","in","with","where","case","of","class","instance","otherwise","implementation","definition","system","module","from","import","qualified","as","special","code","inline","foreign","export","ccall","stdcall","generic","derive","infix","infixl","infixr"],built_in:"Int Real Char Bool",literal:"True False"},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE, {begin:"->|<-[|:]?|#!?|>>=|\\{\\||\\|\\}|:==|=:|<>"}]}}return clean_1=clean2,clean_1}var clojure_1,hasRequiredClojure;function requireClojure(){if(hasRequiredClojure)return clojure_1;hasRequiredClojure=1;function clojure2(hljs){const SYMBOLSTART="a-zA-Z_\\-!.?+*=<>&'",SYMBOL_RE="[#]?["+SYMBOLSTART+"]["+SYMBOLSTART+"0-9/;:$#]*",globals="def defonce defprotocol defstruct defmulti defmethod defn- defn defmacro deftype defrecord",keywords2={$pattern:SYMBOL_RE,built_in:globals+" cond apply if-not if-\ let if not not= =|0 <|0 >|0 <=|0 >=|0 ==|0 +|0 /|0 *|0 -|0 rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while i\ ntern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit macroexpand macroexpand-1 for dosync and or when w\ hen-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy first rest cons cast coll last butlast sigs reify second ffirst fnext nfirst nnext meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in u\ pdate-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-se\ t sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym fo\ rce rationalize"},SYMBOL={begin:SYMBOL_RE,relevance:0},NUMBER={scope:"number",relevance:0,variants:[{match:/[-+]?0[xX][0-9a-fA-F]+N?/},{match:/[-+]?0[0-7]+N?/},{match:/[-+]?[1-9][0-9]?[rR][0-9a-zA-Z]+N?/},{match:/[-+]?[0-9]+\/[0-9]+N?/},{match:/[-+]?[0-9]+((\.[0-9]*([eE][+-]?[0-9]+)?M?)|([eE][+-]?[0-9]+M?|M))/},{match:/[-+]?([1-9][0-9]*|0)N?/}]},CHARACTER={scope:"character",variants:[{match:/\\o[0-3]?[0-7]{1,2}/},{match:/\\u[0-9a-fA-F]{4}/},{match:/\\(newline|space|tab|formfeed|backspace|return)/}, {match:/\\\S/,relevance:0}]},REGEX={scope:"regex",begin:/#"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE]},STRING=hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),COMMA={scope:"punctuation",match:/,/,relevance:0},COMMENT=hljs.COMMENT(";","$",{relevance:0}),LITERAL={className:"literal",begin:/\b(true|false|nil)\b/},COLLECTION={begin:"\\[|(#::?"+SYMBOL_RE+")?\\{",end:"[\\]\\}]",relevance:0},KEY={className:"symbol",begin:"[:]{1,2}"+SYMBOL_RE},LIST={begin:"\\(",end:"\\)"},BODY={endsWithParent:!0,relevance:0}, NAME={keywords:keywords2,className:"name",begin:SYMBOL_RE,relevance:0,starts:BODY},DEFAULT_CONTAINS=[COMMA,LIST,CHARACTER,REGEX,STRING,COMMENT,KEY,COLLECTION,NUMBER,LITERAL,SYMBOL],GLOBAL={beginKeywords:globals,keywords:{$pattern:SYMBOL_RE,keyword:globals},end:'(\\[|#|\\d|"|:|\\{|\\)|\\(|$)',contains:[{className:"title",begin:SYMBOL_RE,relevance:0,excludeEnd:!0,endsParent:!0}].concat(DEFAULT_CONTAINS)};return LIST.contains=[GLOBAL,NAME,BODY],BODY.contains=DEFAULT_CONTAINS,COLLECTION.contains=DEFAULT_CONTAINS, {name:"Clojure",aliases:["clj","edn"],illegal:/\S/,contains:[COMMA,LIST,CHARACTER,REGEX,STRING,COMMENT,KEY,COLLECTION,NUMBER,LITERAL]}}return clojure_1=clojure2,clojure_1}var clojureRepl_1,hasRequiredClojureRepl;function requireClojureRepl(){if(hasRequiredClojureRepl)return clojureRepl_1;hasRequiredClojureRepl=1;function clojureRepl2(hljs){return{name:"Clojure REPL",contains:[{className:"meta.prompt",begin:/^([\w.-]+|\s*#_)?=>/,starts:{end:/$/,subLanguage:"clojure"}}]}}return clojureRepl_1=clojureRepl2, clojureRepl_1}var cmake_1,hasRequiredCmake;function requireCmake(){if(hasRequiredCmake)return cmake_1;hasRequiredCmake=1;function cmake2(hljs){return{name:"CMake",aliases:["cmake.in"],case_insensitive:!0,keywords:{keyword:"break cmake_host_system_information cmake_minimum_required cmake_parse_arguments cmake_policy configure_file continue elseif else endforeach endfunction endif endmacro endwhile execute_process file find_file find_library find_package find_path find_program foreach function get\ _cmake_property get_directory_property get_filename_component get_property if include include_guard list macro mark_as_advanced math message option return separate_arguments set_directory_properties set_property set site_name string unset variable_watch while add_compile_definitions add_compile_options add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_link_options add_subdirectory add_test aux_source_directory build_command create_test_sourcelis\ t define_property enable_language enable_testing export fltk_wrap_ui get_source_file_property get_target_property get_test_property include_directories include_external_msproject include_regular_expression install link_directories link_libraries load_cache project qt_wrap_cpp qt_wrap_ui remove_definitions set_source_files_properties set_target_properties set_tests_properties source_group target_compile_definitions target_compile_features target_compile_options target_include_directories target_l\ ink_directories target_link_libraries target_link_options target_sources try_compile try_run ctest_build ctest_configure ctest_coverage ctest_empty_binary_directory ctest_memcheck ctest_read_custom_files ctest_run_script ctest_sleep ctest_start ctest_submit ctest_test ctest_update ctest_upload build_name exec_program export_library_dependencies install_files install_programs install_targets load_command make_directory output_required_files remove subdir_depends subdirs use_mangled_mesa utility_s\ ource variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or not command policy target test exists is_newer_than is_directory is_symlink is_absolute matches less greater equal less_equal greater_equal strless strgreater strequal strless_equal strgreater_equal version_less version_greater version_equal version_less_equal version_greater_equal in_list defined"},contains:[{className:"variable",begin:/\$\{/,end:/\}/},hljs.COMMENT(/#\[\[/,/]]/),hljs.HASH_COMMENT_MODE, hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE]}}return cmake_1=cmake2,cmake_1}var coffeescript_1,hasRequiredCoffeescript;function requireCoffeescript(){if(hasRequiredCoffeescript)return coffeescript_1;hasRequiredCoffeescript=1;const KEYWORDS2=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","stat\ ic","import","from","export","extends","using"],LITERALS2=["true","false","null","undefined","NaN","Infinity"],TYPES2=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","Gener\ atorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ERROR_TYPES2=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],BUILT_IN_GLOBALS2=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],BUILT_INS2=[].concat(BUILT_IN_GLOBALS2,TYPES2,ERROR_TYPES2);function coffeescript2(hljs){ const COFFEE_BUILT_INS=["npm","print"],COFFEE_LITERALS=["yes","no","on","off"],COFFEE_KEYWORDS=["then","unless","until","loop","by","when","and","or","is","isnt","not"],NOT_VALID_KEYWORDS=["var","const","let","function","static"],excluding=list2=>kw=>!list2.includes(kw),KEYWORDS$12={keyword:KEYWORDS2.concat(COFFEE_KEYWORDS).filter(excluding(NOT_VALID_KEYWORDS)),literal:LITERALS2.concat(COFFEE_LITERALS),built_in:BUILT_INS2.concat(COFFEE_BUILT_INS)},JS_IDENT_RE="[A-Za-z$_][0-9A-Za-z$_]*",SUBST={className:"\ subst",begin:/#\{/,end:/\}/,keywords:KEYWORDS$12},EXPRESSIONS=[hljs.BINARY_NUMBER_MODE,hljs.inherit(hljs.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[hljs.BACKSLASH_ESCAPE,SUBST]},{begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,SUBST]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[SUBST,hljs.HASH_COMMENT_MODE]}, {begin:"//[gim]{0,3}(?=\\W)",relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+JS_IDENT_RE},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{begin:"```",end:"```"},{begin:"`",end:"`"}]}];SUBST.contains=EXPRESSIONS;const TITLE=hljs.inherit(hljs.TITLE_MODE,{begin:JS_IDENT_RE}),POSSIBLE_PARAMS_RE="(\\(.*\\)\\s*)?\\B[-=]>",PARAMS={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:KEYWORDS$12,contains:["self"].concat( EXPRESSIONS)}]},CLASS_DEFINITION={variants:[{match:[/class\s+/,JS_IDENT_RE,/\s+extends\s+/,JS_IDENT_RE]},{match:[/class\s+/,JS_IDENT_RE]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:KEYWORDS$12};return{name:"CoffeeScript",aliases:["coffee","cson","iced"],keywords:KEYWORDS$12,illegal:/\/\*/,contains:[...EXPRESSIONS,hljs.COMMENT("###","###"),hljs.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+JS_IDENT_RE+"\\s*=\\s*"+POSSIBLE_PARAMS_RE,end:"[-=]>",returnBegin:!0,contains:[TITLE, PARAMS]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:POSSIBLE_PARAMS_RE,end:"[-=]>",returnBegin:!0,contains:[PARAMS]}]},CLASS_DEFINITION,{begin:JS_IDENT_RE+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}]}}return coffeescript_1=coffeescript2,coffeescript_1}var coq_1,hasRequiredCoq;function requireCoq(){if(hasRequiredCoq)return coq_1;hasRequiredCoq=1;function coq2(hljs){return{name:"Coq",keywords:{keyword:["_|0","as","at","cofix","else","end","exists","exists2","fix", "for","forall","fun","if","IF","in","let","match","mod","Prop","return","Set","then","Type","using","where","with","Abort","About","Add","Admit","Admitted","All","Arguments","Assumptions","Axiom","Back","BackTo","Backtrack","Bind","Blacklist","Canonical","Cd","Check","Class","Classes","Close","Coercion","Coercions","CoFixpoint","CoInductive","Collection","Combined","Compute","Conjecture","Conjectures","Constant","constr","Constraint","Constructors","Context","Corollary","CreateHintDb","Cut","Dec\ lare","Defined","Definition","Delimit","Dependencies","Dependent","Derive","Drop","eauto","End","Equality","Eval","Example","Existential","Existentials","Existing","Export","exporting","Extern","Extract","Extraction","Fact","Field","Fields","File","Fixpoint","Focus","for","From","Function","Functional","Generalizable","Global","Goal","Grab","Grammar","Graph","Guarded","Heap","Hint","HintDb","Hints","Hypotheses","Hypothesis","ident","Identity","If","Immediate","Implicit","Import","Include","Induc\ tive","Infix","Info","Initial","Inline","Inspect","Instance","Instances","Intro","Intros","Inversion","Inversion_clear","Language","Left","Lemma","Let","Libraries","Library","Load","LoadPath","Local","Locate","Ltac","ML","Mode","Module","Modules","Monomorphic","Morphism","Next","NoInline","Notation","Obligation","Obligations","Opaque","Open","Optimize","Options","Parameter","Parameters","Parametric","Path","Paths","pattern","Polymorphic","Preterm","Print","Printing","Program","Projections","Proo\ f","Proposition","Pwd","Qed","Quit","Rec","Record","Recursive","Redirect","Relation","Remark","Remove","Require","Reserved","Reset","Resolve","Restart","Rewrite","Right","Ring","Rings","Save","Scheme","Scope","Scopes","Script","Search","SearchAbout","SearchHead","SearchPattern","SearchRewrite","Section","Separate","Set","Setoid","Show","Solve","Sorted","Step","Strategies","Strategy","Structure","SubClass","Table","Tables","Tactic","Term","Test","Theorem","Time","Timeout","Transparent","Type","Ty\ peclasses","Types","Undelimit","Undo","Unfocus","Unfocused","Unfold","Universe","Universes","Unset","Unshelve","using","Variable","Variables","Variant","Verbose","Visibility","where","with"],built_in:["abstract","absurd","admit","after","apply","as","assert","assumption","at","auto","autorewrite","autounfold","before","bottom","btauto","by","case","case_eq","cbn","cbv","change","classical_left","classical_right","clear","clearbody","cofix","compare","compute","congruence","constr_eq","constructo\ r","contradict","contradiction","cut","cutrewrite","cycle","decide","decompose","dependent","destruct","destruction","dintuition","discriminate","discrR","do","double","dtauto","eapply","eassumption","eauto","ecase","econstructor","edestruct","ediscriminate","eelim","eexact","eexists","einduction","einjection","eleft","elim","elimtype","enough","equality","erewrite","eright","esimplify_eq","esplit","evar","exact","exactly_once","exfalso","exists","f_equal","fail","field","field_simplify","field_\ simplify_eq","first","firstorder","fix","fold","fourier","functional","generalize","generalizing","gfail","give_up","has_evar","hnf","idtac","in","induction","injection","instantiate","intro","intro_pattern","intros","intuition","inversion","inversion_clear","is_evar","is_var","lapply","lazy","left","lia","lra","move","native_compute","nia","nsatz","omega","once","pattern","pose","progress","proof","psatz","quote","record","red","refine","reflexivity","remember","rename","repeat","replace","reve\ rt","revgoals","rewrite","rewrite_strat","right","ring","ring_simplify","rtauto","set","setoid_reflexivity","setoid_replace","setoid_rewrite","setoid_symmetry","setoid_transitivity","shelve","shelve_unifiable","simpl","simple","simplify_eq","solve","specialize","split","split_Rabs","split_Rmult","stepl","stepr","subst","sum","swap","symmetry","tactic","tauto","time","timeout","top","transitivity","trivial","try","tryif","unfold","unify","until","using","vm_compute","with"]},contains:[hljs.QUOTE_STRING_MODE, hljs.COMMENT("\\(\\*","\\*\\)"),hljs.C_NUMBER_MODE,{className:"type",excludeBegin:!0,begin:"\\|\\s*",end:"\\w+"},{begin:/[-=]>/}]}}return coq_1=coq2,coq_1}var cos_1,hasRequiredCos;function requireCos(){if(hasRequiredCos)return cos_1;hasRequiredCos=1;function cos2(hljs){return{name:"Caché Object Script",case_insensitive:!0,aliases:["cls"],keywords:"property parameter class classmethod clientmethod extends as break catch close continue do d|0 else elseif for goto halt hang h|0 if job j|0 kill k|0\ lock l|0 merge new open quit q|0 read r|0 return set s|0 tcommit throw trollback try tstart use view while write w|0 xecute x|0 zkill znspace zn ztrap zwrite zw zzdump zzwrite print zbreak zinsert zload zprint zremove zsave zzprint mv mvcall mvcrt mvdim mvprint zquit zsync ascii",contains:[{className:"number",begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)",relevance:0},{className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]}]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE, {className:"comment",begin:/;/,end:"$",relevance:0},{className:"built_in",begin:/(?:\$\$?|\.\.)\^?[a-zA-Z]+/},{className:"built_in",begin:/\$\$\$[a-zA-Z]+/},{className:"built_in",begin:/%[a-z]+(?:\.[a-z]+)*/},{className:"symbol",begin:/\^%?[a-zA-Z][\w]*/},{className:"keyword",begin:/##class|##super|#define|#dim/},{begin:/&sql\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,subLanguage:"sql"},{begin:/&(js|jscript|javascript)/,excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"},{begin:/&html<\s*\s*>/,subLanguage:"xml"}]}}return cos_1=cos2,cos_1}var cpp_1,hasRequiredCpp;function requireCpp(){if(hasRequiredCpp)return cpp_1;hasRequiredCpp=1;function cpp2(hljs){const regex=hljs.regex,C_LINE_COMMENT_MODE=hljs.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),DECLTYPE_AUTO_RE="decltype\\(auto\\)",NAMESPACE_RE="[a-zA-Z_]\\w*::",FUNCTION_TYPE_RE="(?!struct)("+DECLTYPE_AUTO_RE+"|"+regex.optional(NAMESPACE_RE)+"[a-zA-Z_]\\w*"+regex.optional("<[^<>]+>")+")",CPP_PRIMITIVE_TYPES={className:"type", begin:"\\b[a-z\\d_]*_t\\b"},STRINGS={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},hljs.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},NUMBERS={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?\ :'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},PREPROCESSOR={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif d\ efine undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},hljs.inherit(STRINGS,{className:"string"}),{className:"string",begin:/<.*?>/},C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},TITLE_MODE={className:"title",begin:regex.optional(NAMESPACE_RE)+hljs.IDENT_RE,relevance:0},FUNCTION_TITLE=regex.optional(NAMESPACE_RE)+hljs.IDENT_RE+"\\s*\\(",RESERVED_KEYWORDS=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept", "auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret\ _cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],RESERVED_TYPES=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],TYPE_HINTS=["any","auto_ptr","barrier","binary_se\ maphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_vie\ w","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],FUNCTION_HINTS=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isal\ pha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk", "strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],CPP_KEYWORDS={type:RESERVED_TYPES,keyword:RESERVED_KEYWORDS,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:TYPE_HINTS},FUNCTION_DISPATCH={className:"function.dispatch",relevance:0,keywords:{_hint:FUNCTION_HINTS},begin:regex.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,hljs.IDENT_RE,regex.lookahead( /(<[^<>]+>|)\s*\(/))},EXPRESSION_CONTAINS=[FUNCTION_DISPATCH,PREPROCESSOR,CPP_PRIMITIVE_TYPES,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,NUMBERS,STRINGS],EXPRESSION_CONTEXT={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:CPP_KEYWORDS,contains:EXPRESSION_CONTAINS.concat([{begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,contains:EXPRESSION_CONTAINS.concat(["self"]),relevance:0}]),relevance:0},FUNCTION_DECLARATION={className:"function",begin:"\ ("+FUNCTION_TYPE_RE+"[\\*&\\s]+)+"+FUNCTION_TITLE,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:CPP_KEYWORDS,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:DECLTYPE_AUTO_RE,keywords:CPP_KEYWORDS,relevance:0},{begin:FUNCTION_TITLE,returnBegin:!0,contains:[TITLE_MODE],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[STRINGS,NUMBERS]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,relevance:0,contains:[C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE, STRINGS,NUMBERS,CPP_PRIMITIVE_TYPES,{begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,relevance:0,contains:["self",C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,CPP_PRIMITIVE_TYPES]}]},CPP_PRIMITIVE_TYPES,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,PREPROCESSOR]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:CPP_KEYWORDS,illegal:"",keywords:CPP_KEYWORDS,contains:["self",CPP_PRIMITIVE_TYPES]},{begin:hljs.IDENT_RE+"::",keywords:CPP_KEYWORDS},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}} return cpp_1=cpp2,cpp_1}var crmsh_1,hasRequiredCrmsh;function requireCrmsh(){if(hasRequiredCrmsh)return crmsh_1;hasRequiredCrmsh=1;function crmsh2(hljs){const RESOURCES="primitive rsc_template",COMMANDS="group clone ms master location colocation order fencing_topology rsc_ticket acl_target acl_group user role tag xml";return{name:"crmsh",aliases:["crm","pcmk"],case_insensitive:!0,keywords:{keyword:"params meta operations op rule attributes utilization"+" "+"read write deny defined not_defined in\ _range date spec in ref reference attribute type xpath version and or lt gt tag lte gte eq ne \\"+" "+"number string",literal:"Master Started Slave Stopped start promote demote stop monitor true false"},contains:[hljs.HASH_COMMENT_MODE,{beginKeywords:"node",starts:{end:"\\s*([\\w_-]+:)?",starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*"}}},{beginKeywords:RESOURCES,starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*",starts:{end:"\\s*@?[\\w_][\\w_\\.:-]*"}}},{begin:"\\b("+COMMANDS.split(" "). join("|")+")\\s+",keywords:COMMANDS,starts:{className:"title",end:"[\\$\\w_][\\w_-]*"}},{beginKeywords:"property rsc_defaults op_defaults",starts:{className:"title",end:"\\s*([\\w_-]+:)?"}},hljs.QUOTE_STRING_MODE,{className:"meta",begin:"(ocf|systemd|service|lsb):[\\w_:-]+",relevance:0},{className:"number",begin:"\\b\\d+(\\.\\d+)?(ms|s|h|m)?",relevance:0},{className:"literal",begin:"[-]?(infinity|inf)",relevance:0},{className:"attr",begin:/([A-Za-z$_#][\w_-]+)=/,relevance:0},{className:"tag",begin:"\ ",relevance:0}]}}return crmsh_1=crmsh2,crmsh_1}var crystal_1,hasRequiredCrystal;function requireCrystal(){if(hasRequiredCrystal)return crystal_1;hasRequiredCrystal=1;function crystal2(hljs){const INT_SUFFIX="(_?[ui](8|16|32|64|128))?",FLOAT_SUFFIX="(_?f(32|64))?",CRYSTAL_IDENT_RE="[a-zA-Z_]\\w*[!?=]?",CRYSTAL_METHOD_RE="[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|[=!]~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\*\\*|\\[\\][=?]?",CRYSTAL_PATH_RE="[A-Za-z_]\\w*(::\\w+)*(\\?|!)?",CRYSTAL_KEYWORDS={ $pattern:CRYSTAL_IDENT_RE,keyword:"abstract alias annotation as as? asm begin break case class def do else elsif end ensure enum extend for fun if include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? return require select self sizeof struct super then type typeof union uninitialized unless until verbatim when while with yield __DIR__ __END_LINE__ __FILE__ __LINE__",literal:"false nil true"},SUBST={className:"subst",begin:/#\{/,end:/\}/,keywords:CRYSTAL_KEYWORDS}, VARIABLE={className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},EXPANSION={className:"template-variable",variants:[{begin:"\\{\\{",end:"\\}\\}"},{begin:"\\{%",end:"%\\}"}],keywords:CRYSTAL_KEYWORDS};function recursiveParen(begin,end){const contains3=[{begin,end}];return contains3[0].contains=contains3,contains3}const STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE,SUBST],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[\ Qwi]?\\(",end:"\\)",contains:recursiveParen("\\(","\\)")},{begin:"%[Qwi]?\\[",end:"\\]",contains:recursiveParen("\\[","\\]")},{begin:"%[Qwi]?\\{",end:/\}/,contains:recursiveParen(/\{/,/\}/)},{begin:"%[Qwi]?<",end:">",contains:recursiveParen("<",">")},{begin:"%[Qwi]?\\|",end:"\\|"},{begin:/<<-\w+$/,end:/^\s*\w+$/}],relevance:0},Q_STRING={className:"string",variants:[{begin:"%q\\(",end:"\\)",contains:recursiveParen("\\(","\\)")},{begin:"%q\\[",end:"\\]",contains:recursiveParen("\\[","\\]")},{begin:"\ %q\\{",end:/\}/,contains:recursiveParen(/\{/,/\}/)},{begin:"%q<",end:">",contains:recursiveParen("<",">")},{begin:"%q\\|",end:"\\|"},{begin:/<<-'\w+'$/,end:/^\s*\w+$/}],relevance:0},REGEXP2={begin:"(?!%\\})("+hljs.RE_STARTERS_RE+"|\\n|\\b(case|if|select|unless|until|when|while)\\b)\\s*",keywords:"case if select unless until when while",contains:[{className:"regexp",contains:[hljs.BACKSLASH_ESCAPE,SUBST],variants:[{begin:"//[a-z]*",relevance:0},{begin:"/(?!\\/)",end:"/[a-z]*"}]}],relevance:0},REGEXP22={ className:"regexp",contains:[hljs.BACKSLASH_ESCAPE,SUBST],variants:[{begin:"%r\\(",end:"\\)",contains:recursiveParen("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:recursiveParen("\\[","\\]")},{begin:"%r\\{",end:/\}/,contains:recursiveParen(/\{/,/\}/)},{begin:"%r<",end:">",contains:recursiveParen("<",">")},{begin:"%r\\|",end:"\\|"}],relevance:0},ATTRIBUTE={className:"meta",begin:"@\\[",end:"\\]",contains:[hljs.inherit(hljs.QUOTE_STRING_MODE,{className:"string"})]},CRYSTAL_DEFAULT_CONTAINS=[EXPANSION, STRING,Q_STRING,REGEXP22,REGEXP2,ATTRIBUTE,VARIABLE,hljs.HASH_COMMENT_MODE,{className:"class",beginKeywords:"class module struct",end:"$|;",illegal:/=/,contains:[hljs.HASH_COMMENT_MODE,hljs.inherit(hljs.TITLE_MODE,{begin:CRYSTAL_PATH_RE}),{begin:"<"}]},{className:"class",beginKeywords:"lib enum union",end:"$|;",illegal:/=/,contains:[hljs.HASH_COMMENT_MODE,hljs.inherit(hljs.TITLE_MODE,{begin:CRYSTAL_PATH_RE})]},{beginKeywords:"annotation",end:"$|;",illegal:/=/,contains:[hljs.HASH_COMMENT_MODE,hljs. inherit(hljs.TITLE_MODE,{begin:CRYSTAL_PATH_RE})],relevance:2},{className:"function",beginKeywords:"def",end:/\B\b/,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:CRYSTAL_METHOD_RE,endsParent:!0})]},{className:"function",beginKeywords:"fun macro",end:/\B\b/,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:CRYSTAL_METHOD_RE,endsParent:!0})],relevance:2},{className:"symbol",begin:hljs.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[STRING,{begin:CRYSTAL_METHOD_RE}], relevance:0},{className:"number",variants:[{begin:"\\b0b([01_]+)"+INT_SUFFIX},{begin:"\\b0o([0-7_]+)"+INT_SUFFIX},{begin:"\\b0x([A-Fa-f0-9_]+)"+INT_SUFFIX},{begin:"\\b([1-9][0-9_]*[0-9]|[0-9])(\\.[0-9][0-9_]*)?([eE]_?[-+]?[0-9_]*)?"+FLOAT_SUFFIX+"(?!_)"},{begin:"\\b([1-9][0-9_]*|0)"+INT_SUFFIX}],relevance:0}];return SUBST.contains=CRYSTAL_DEFAULT_CONTAINS,EXPANSION.contains=CRYSTAL_DEFAULT_CONTAINS.slice(1),{name:"Crystal",aliases:["cr"],keywords:CRYSTAL_KEYWORDS,contains:CRYSTAL_DEFAULT_CONTAINS}} return crystal_1=crystal2,crystal_1}var csharp_1,hasRequiredCsharp;function requireCsharp(){if(hasRequiredCsharp)return csharp_1;hasRequiredCsharp=1;function csharp2(hljs){const BUILT_IN_KEYWORDS=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],FUNCTION_MODIFIERS=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual", "new","sealed","partial"],LITERAL_KEYWORDS=["default","false","null","true"],NORMAL_KEYWORDS=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","\ throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],CONTEXTUAL_KEYWORDS=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],KEYWORDS2={keyword:NORMAL_KEYWORDS.concat(CONTEXTUAL_KEYWORDS),built_in:BUILT_IN_KEYWORDS, literal:LITERAL_KEYWORDS},TITLE_MODE=hljs.inherit(hljs.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),NUMBERS={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},RAW_STRING={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},VERBATIM_STRING={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},VERBATIM_STRING_NO_LF=hljs. inherit(VERBATIM_STRING,{illegal:/\n/}),SUBST={className:"subst",begin:/\{/,end:/\}/,keywords:KEYWORDS2},SUBST_NO_LF=hljs.inherit(SUBST,{illegal:/\n/}),INTERPOLATED_STRING={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},hljs.BACKSLASH_ESCAPE,SUBST_NO_LF]},INTERPOLATED_VERBATIM_STRING={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},SUBST]},INTERPOLATED_VERBATIM_STRING_NO_LF=hljs.inherit(INTERPOLATED_VERBATIM_STRING, {illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},SUBST_NO_LF]});SUBST.contains=[INTERPOLATED_VERBATIM_STRING,INTERPOLATED_STRING,VERBATIM_STRING,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,NUMBERS,hljs.C_BLOCK_COMMENT_MODE],SUBST_NO_LF.contains=[INTERPOLATED_VERBATIM_STRING_NO_LF,INTERPOLATED_STRING,VERBATIM_STRING_NO_LF,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,NUMBERS,hljs.inherit(hljs.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const STRING={variants:[RAW_STRING,INTERPOLATED_VERBATIM_STRING, INTERPOLATED_STRING,VERBATIM_STRING,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},GENERIC_MODIFIER={begin:"<",end:">",contains:[{beginKeywords:"in out"},TITLE_MODE]},TYPE_IDENT_RE=hljs.IDENT_RE+"(<"+hljs.IDENT_RE+"(\\s*,\\s*"+hljs.IDENT_RE+")*>)?(\\[\\])?",AT_IDENTIFIER={begin:"@"+hljs.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:KEYWORDS2,illegal:/::/,contains:[hljs.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\ "},{begin:""}]}]}),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},STRING,NUMBERS,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},TITLE_MODE,GENERIC_MODIFIER,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/, contains:[TITLE_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[TITLE_MODE,GENERIC_MODIFIER,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+TYPE_IDENT_RE+"\\s+)+"+hljs.IDENT_RE+"\\s*(<[^\ =]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:KEYWORDS2,contains:[{beginKeywords:FUNCTION_MODIFIERS.join(" "),relevance:0},{begin:hljs.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[hljs.TITLE_MODE,GENERIC_MODIFIER],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS2,relevance:0,contains:[STRING,NUMBERS,hljs.C_BLOCK_COMMENT_MODE]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},AT_IDENTIFIER]}} return csharp_1=csharp2,csharp_1}var csp_1,hasRequiredCsp;function requireCsp(){if(hasRequiredCsp)return csp_1;hasRequiredCsp=1;function csp2(hljs){return{name:"CSP",case_insensitive:!1,keywords:{$pattern:"[a-zA-Z][a-zA-Z0-9_-]*",keyword:["base-uri","child-src","connect-src","default-src","font-src","form-action","frame-ancestors","frame-src","img-src","manifest-src","media-src","object-src","plugin-types","report-uri","sandbox","script-src","style-src","trusted-types","unsafe-hashes","worker-sr\ c"]},contains:[{className:"string",begin:"'",end:"'"},{className:"attribute",begin:"^Content",end:":",excludeEnd:!0}]}}return csp_1=csp2,csp_1}var css_1,hasRequiredCss;function requireCss(){if(hasRequiredCss)return css_1;hasRequiredCss=1;const MODES2=hljs=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:hljs.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{ scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:hljs.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),HTML_TAGS2=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div", "dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],SVG_TAGS2=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend", "feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],TAGS2=[...HTML_TAGS2,...SVG_TAGS2],MEDIA_FEATURES2=["any-hover","any-pointer","aspect-ratio","color", "color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),PSEUDO_CLASSES2=["active","any-link","blank","checked","cur\ rent","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-w\ rite","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),PSEUDO_ELEMENTS2=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ATTRIBUTES2=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-dir\ ection","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-posit\ ion-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","bo\ rder-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-lef\ t","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","\ box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contai\ n-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flo\ od-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","fo\ nt-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-li\ mit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-styl\ e-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat", "mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style", "outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","\ page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margi\ n-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scr\ oll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decorat\ ion-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","\ transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume", "white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function css2(hljs){const regex=hljs.regex,modes2=MODES2(hljs),VENDOR_PREFIX={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},AT_MODIFIERS="and or not only",AT_PROPERTY_RE=/@-?\w[\w]*(-\w+)*/,IDENT_RE2="[a-zA-Z-][a-zA-Z0-9_-]*",STRINGS=[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{ keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[modes2.BLOCK_COMMENT,VENDOR_PREFIX,modes2.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+IDENT_RE2,relevance:0},modes2.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+PSEUDO_CLASSES2.join("|")+")"},{begin:":(:)?("+PSEUDO_ELEMENTS2.join("|")+")"}]},modes2.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ATTRIBUTES2. join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[modes2.BLOCK_COMMENT,modes2.HEXCOLOR,modes2.IMPORTANT,modes2.CSS_NUMBER_MODE,...STRINGS,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...STRINGS,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},modes2.FUNCTION_DISPATCH]},{begin:regex.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:AT_PROPERTY_RE},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0, keywords:{$pattern:/[a-z-]+/,keyword:AT_MODIFIERS,attribute:MEDIA_FEATURES2.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...STRINGS,modes2.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+TAGS2.join("|")+")\\b"}]}}return css_1=css2,css_1}var d_1,hasRequiredD;function requireD(){if(hasRequiredD)return d_1;hasRequiredD=1;function d2(hljs){const D_KEYWORDS={$pattern:hljs.UNDERSCORE_IDENT_RE,keyword:"abstract alias align asm assert auto body break byte case cast catch \ class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EO\ F__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},decimal_integer_re="(0|[1-9][\\d_]*)",decimal_integer_nosus_re="(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)",binary_integer_re="0[bB][01_]+",hexadecimal_digits_re="([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)",hexadecimal_integer_re="0[xX\ ]"+hexadecimal_digits_re,decimal_exponent_re="([eE][+-]?"+decimal_integer_nosus_re+")",decimal_float_re="("+decimal_integer_nosus_re+"(\\.\\d*|"+decimal_exponent_re+")|\\d+\\."+decimal_integer_nosus_re+"|\\."+decimal_integer_re+decimal_exponent_re+"?)",hexadecimal_float_re="(0[xX]("+hexadecimal_digits_re+"\\."+hexadecimal_digits_re+"|\\.?"+hexadecimal_digits_re+")[pP][+-]?"+decimal_integer_nosus_re+")",integer_re="("+decimal_integer_re+"|"+binary_integer_re+"|"+hexadecimal_integer_re+")",float_re="\ ("+hexadecimal_float_re+"|"+decimal_float_re+")",escape_sequence_re=`\\\\(['"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};`,D_INTEGER_MODE={className:"number",begin:"\\b"+integer_re+"(L|u|U|Lu|LU|uL|UL)?",relevance:0},D_FLOAT_MODE={className:"number",begin:"\\b("+float_re+"([fF]|L|i|[fF]i|Li)?|"+integer_re+"(i|[fF]i|Li))",relevance:0},D_CHARACTER_MODE={className:"string",begin:"'("+escape_sequence_re+"|.)",end:"'",illegal:"."},D_STRING_MODE={className:"\ string",begin:'"',contains:[{begin:escape_sequence_re,relevance:0}],end:'"[cwd]?'},D_WYSIWYG_DELIMITED_STRING_MODE={className:"string",begin:'[rq]"',end:'"[cwd]?',relevance:5},D_ALTERNATE_WYSIWYG_STRING_MODE={className:"string",begin:"`",end:"`[cwd]?"},D_HEX_STRING_MODE={className:"string",begin:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',relevance:10},D_TOKEN_STRING_MODE={className:"string",begin:'q"\\{',end:'\\}"'},D_HASHBANG_MODE={className:"meta",begin:"^#!",end:"$",relevance:5},D_SPECIAL_TOKEN_SEQUENCE_MODE={ className:"meta",begin:"#(line)",end:"$",relevance:5},D_ATTRIBUTE_MODE={className:"keyword",begin:"@[a-zA-Z_][a-zA-Z_\\d]*"},D_NESTING_COMMENT_MODE=hljs.COMMENT("\\/\\+","\\+\\/",{contains:["self"],relevance:10});return{name:"D",keywords:D_KEYWORDS,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,D_NESTING_COMMENT_MODE,D_HEX_STRING_MODE,D_STRING_MODE,D_WYSIWYG_DELIMITED_STRING_MODE,D_ALTERNATE_WYSIWYG_STRING_MODE,D_TOKEN_STRING_MODE,D_FLOAT_MODE,D_INTEGER_MODE,D_CHARACTER_MODE,D_HASHBANG_MODE, D_SPECIAL_TOKEN_SEQUENCE_MODE,D_ATTRIBUTE_MODE]}}return d_1=d2,d_1}var markdown_1,hasRequiredMarkdown;function requireMarkdown(){if(hasRequiredMarkdown)return markdown_1;hasRequiredMarkdown=1;function markdown2(hljs){const regex=hljs.regex,INLINE_HTML={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},HORIZONTAL_RULE={begin:"^[-\\*]{3,}",end:"$"},CODE={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"}, {begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},LIST={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},LINK_REFERENCE={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},URL_SCHEME=/[A-Za-z][A-Za-z0-9+.-]*/,LINK={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0}, {begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:regex.concat(/\[.+?\]\(/,URL_SCHEME,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\ \\]",excludeBegin:!0,excludeEnd:!0}]},BOLD={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},ITALIC={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},BOLD_WITHOUT_ITALIC=hljs.inherit(BOLD,{contains:[]}),ITALIC_WITHOUT_BOLD=hljs.inherit(ITALIC,{contains:[]});BOLD.contains.push(ITALIC_WITHOUT_BOLD),ITALIC.contains.push(BOLD_WITHOUT_ITALIC);let CONTAINABLE=[INLINE_HTML,LINK]; return[BOLD,ITALIC,BOLD_WITHOUT_ITALIC,ITALIC_WITHOUT_BOLD].forEach(m=>{m.contains=m.contains.concat(CONTAINABLE)}),CONTAINABLE=CONTAINABLE.concat(BOLD,ITALIC),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:CONTAINABLE},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:CONTAINABLE}]}]},INLINE_HTML,LIST,BOLD,ITALIC,{className:"quote",begin:"^>\\s+",contains:CONTAINABLE,end:"$"},CODE,HORIZONTAL_RULE, LINK,LINK_REFERENCE,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return markdown_1=markdown2,markdown_1}var dart_1,hasRequiredDart;function requireDart(){if(hasRequiredDart)return dart_1;hasRequiredDart=1;function dart2(hljs){const SUBST={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"}]},BRACED_SUBST={className:"subst",variants:[{begin:/\$\{/,end:/\}/}],keywords:"true false null this is new super"},NUMBER={className:"number",relevance:0,variants:[{match:/\b[0-9][0-9_]*(\.[0-9][0-9_]*)?([eE][+-]?[0-9][0-9_]*)?\b/}, {match:/\b0[xX][0-9A-Fa-f][0-9A-Fa-f_]*\b/}]},STRING={className:"string",variants:[{begin:"r'''",end:"'''"},{begin:'r"""',end:'"""'},{begin:"r'",end:"'",illegal:"\\n"},{begin:'r"',end:'"',illegal:"\\n"},{begin:"'''",end:"'''",contains:[hljs.BACKSLASH_ESCAPE,SUBST,BRACED_SUBST]},{begin:'"""',end:'"""',contains:[hljs.BACKSLASH_ESCAPE,SUBST,BRACED_SUBST]},{begin:"'",end:"'",illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE,SUBST,BRACED_SUBST]},{begin:'"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE, SUBST,BRACED_SUBST]}]};BRACED_SUBST.contains=[NUMBER,STRING];const BUILT_IN_TYPES=["Comparable","DateTime","Duration","Function","Iterable","Iterator","List","Map","Match","Object","Pattern","RegExp","Set","Stopwatch","String","StringBuffer","StringSink","Symbol","Type","Uri","bool","double","int","num","Element","ElementList"],NULLABLE_BUILT_IN_TYPES=BUILT_IN_TYPES.map(e=>`${e}?`);return{name:"Dart",keywords:{keyword:["abstract","as","assert","async","await","base","break","case","catch","class", "const","continue","covariant","default","deferred","do","dynamic","else","enum","export","extends","extension","external","factory","false","final","finally","for","Function","get","hide","if","implements","import","in","interface","is","late","library","mixin","new","null","on","operator","part","required","rethrow","return","sealed","set","show","static","super","switch","sync","this","throw","true","try","typedef","var","void","when","while","with","yield"],built_in:BUILT_IN_TYPES.concat(NULLABLE_BUILT_IN_TYPES). concat(["Never","Null","dynamic","print","document","querySelector","querySelectorAll","window"]),$pattern:/[A-Za-z][A-Za-z0-9_]*\??/},contains:[STRING,hljs.COMMENT(/\/\*\*(?!\/)/,/\*\//,{subLanguage:"markdown",relevance:0}),hljs.COMMENT(/\/{3,} ?/,/$/,{contains:[{subLanguage:"markdown",begin:".",end:"$",relevance:0}]}),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},hljs.UNDERSCORE_TITLE_MODE]}, NUMBER,{className:"meta",begin:"@[A-Za-z]+"},{begin:"=>"}]}}return dart_1=dart2,dart_1}var delphi_1,hasRequiredDelphi;function requireDelphi(){if(hasRequiredDelphi)return delphi_1;hasRequiredDelphi=1;function delphi2(hljs){const KEYWORDS2=["exports","register","file","shl","array","record","property","for","mod","while","set","ally","label","uses","raise","not","stored","class","safecall","var","interface","or","private","static","exit","index","inherited","to","else","stdcall","override","shr", "asm","far","resourcestring","finalization","packed","virtual","out","and","protected","library","do","xorwrite","goto","near","function","end","div","overload","object","unit","begin","string","on","inline","repeat","until","destructor","write","message","program","with","read","initialization","except","default","nil","if","case","cdecl","in","downto","threadvar","of","try","pascal","const","external","constructor","type","public","then","implementation","finally","published","procedure","abso\ lute","reintroduce","operator","as","is","abstract","alias","assembler","bitpacked","break","continue","cppdecl","cvar","enumerator","experimental","platform","deprecated","unimplemented","dynamic","export","far16","forward","generic","helper","implements","interrupt","iochecks","local","name","nodefault","noreturn","nostackframe","oldfpccall","otherwise","saveregisters","softfloat","specialize","strict","unaligned","varargs"],COMMENT_MODES=[hljs.C_LINE_COMMENT_MODE,hljs.COMMENT(/\{/,/\}/,{relevance:0}), hljs.COMMENT(/\(\*/,/\*\)/,{relevance:10})],DIRECTIVE={className:"meta",variants:[{begin:/\{\$/,end:/\}/},{begin:/\(\*\$/,end:/\*\)/}]},STRING={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},NUMBER={className:"number",relevance:0,variants:[{match:/\b\d[\d_]*(\.\d[\d_]*)?/},{match:/\$[\dA-Fa-f_]+/},{match:/\$/,relevance:0},{match:/&[0-7][0-7_]*/},{match:/%[01_]+/},{match:/%/,relevance:0}]},CHAR_STRING={className:"string",variants:[{match:/#\d[\d_]*/},{match:/#\$[\dA-Fa-f][\dA-Fa-f_]*/}, {match:/#&[0-7][0-7_]*/},{match:/#%[01][01_]*/}]},CLASS2={begin:hljs.IDENT_RE+"\\s*=\\s*class\\s*\\(",returnBegin:!0,contains:[hljs.TITLE_MODE]},FUNCTION={className:"function",beginKeywords:"function constructor destructor procedure",end:/[:;]/,keywords:"function constructor|10 destructor|10 procedure|10",contains:[hljs.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:[STRING,CHAR_STRING,DIRECTIVE].concat(COMMENT_MODES)},DIRECTIVE].concat(COMMENT_MODES)};return{name:"\ Delphi",aliases:["dpr","dfm","pas","pascal"],case_insensitive:!0,keywords:KEYWORDS2,illegal:/"|\$[G-Zg-z]|\/\*|<\/|\|/,contains:[STRING,CHAR_STRING,NUMBER,CLASS2,FUNCTION,DIRECTIVE].concat(COMMENT_MODES)}}return delphi_1=delphi2,delphi_1}var diff_1,hasRequiredDiff;function requireDiff(){if(hasRequiredDiff)return diff_1;hasRequiredDiff=1;function diff2(hljs){const regex=hljs.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:regex.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/, /^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:regex.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}return diff_1=diff2,diff_1}var django_1,hasRequiredDjango;function requireDjango(){if(hasRequiredDjango)return django_1;hasRequiredDjango=1;function django2(hljs){const FILTER={ begin:/\|[A-Za-z]+:?/,keywords:{name:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashe\ s slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone"},contains:[hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE]};return{name:"Django",aliases:["jinja"],case_insensitive:!0,subLanguage:"xml",contains:[hljs.COMMENT(/\{%\s*comment\s*%\}/,/\{%\s*endcomment\s*%\}/),hljs.COMMENT(/\{#/,/#\}/),{className:"template-tag",begin:/\{%/,end:/%\}/,contains:[{className:"name",begin:/\w+/,keywords:{name:"comment endcomment load templatetag ifch\ anged endifchanged if endif firstof for endfor ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtim\ e endlocaltime timezone endtimezone get_current_timezone verbatim"},starts:{endsWithParent:!0,keywords:"in by as",contains:[FILTER],relevance:0}}]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:[FILTER]}]}}return django_1=django2,django_1}var dns_1,hasRequiredDns;function requireDns(){if(hasRequiredDns)return dns_1;hasRequiredDns=1;function dns2(hljs){return{name:"DNS Zone",aliases:["bind","zone"],keywords:["IN","A","AAAA","AFSDB","APL","CAA","CDNSKEY","CDS","CERT","CNAME","DHC\ ID","DLV","DNAME","DNSKEY","DS","HIP","IPSECKEY","KEY","KX","LOC","MX","NAPTR","NS","NSEC","NSEC3","NSEC3PARAM","PTR","RRSIG","RP","SIG","SOA","SRV","SSHFP","TA","TKEY","TLSA","TSIG","TXT"],contains:[hljs.COMMENT(";","$",{relevance:0}),{className:"meta",begin:/^\$(TTL|GENERATE|INCLUDE|ORIGIN)\b/},{className:"number",begin:"((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A\ -Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-\ f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))\\b"},{className:"number",begin:"((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(2\ 5[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\b"},hljs.inherit(hljs.NUMBER_MODE,{begin:/\b\d+[dhwm]?/})]}}return dns_1=dns2,dns_1}var dockerfile_1,hasRequiredDockerfile;function requireDockerfile(){if(hasRequiredDockerfile)return dockerfile_1;hasRequiredDockerfile=1;function dockerfile2(hljs){return{name:"Dockerfile",aliases:["docker"],case_insensitive:!0,keywords:["from","maintainer","expose","env","arg","user","onbuild","stopsignal"],contains:[hljs.HASH_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE, hljs.NUMBER_MODE,{beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck shell",starts:{end:/[^\\]$/,subLanguage:"bash"}}],illegal:"",illegal:"\\n"}]},STRINGS,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},REFERENCE={className:"variable",begin:/&[a-z\d_]*\b/},KEYWORD={className:"keyword",begin:"/[a-z][a-z\\d-]*/"},LABEL={className:"symbol",begin:"^\\s*[a-zA-Z_][a-zA-Z\\d_]*:"},CELL_PROPERTY={className:"params",relevance:0,begin:"<",end:">",contains:[NUMBERS,REFERENCE]},NODE={className:"title.class",begin:/[a-zA-Z_][a-zA-Z\d_@-]*(?=\s\{)/, relevance:.2},ROOT_NODE={className:"title.class",begin:/^\/(?=\s*\{)/,relevance:10},ATTR_NO_VALUE={match:/[a-z][a-z-,]+(?=;)/,relevance:0,scope:"attr"},ATTR={relevance:0,match:[/[a-z][a-z-,]+/,/\s*/,/=/],scope:{1:"attr",3:"operator"}},PUNC={scope:"punctuation",relevance:0,match:/\};|[;{}]/};return{name:"Device Tree",contains:[ROOT_NODE,REFERENCE,KEYWORD,LABEL,NODE,ATTR,ATTR_NO_VALUE,CELL_PROPERTY,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,NUMBERS,STRINGS,PREPROCESSOR,PUNC,{begin:hljs.IDENT_RE+ "::",keywords:""}]}}return dts_1=dts2,dts_1}var dust_1,hasRequiredDust;function requireDust(){if(hasRequiredDust)return dust_1;hasRequiredDust=1;function dust2(hljs){return{name:"Dust",aliases:["dst"],case_insensitive:!0,subLanguage:"xml",contains:[{className:"template-tag",begin:/\{[#\/]/,end:/\}/,illegal:/;/,contains:[{className:"name",begin:/[a-zA-Z\.-]+/,starts:{endsWithParent:!0,relevance:0,contains:[hljs.QUOTE_STRING_MODE]}}]},{className:"template-variable",begin:/\{/,end:/\}/,illegal:/;/, keywords:"if eq ne lt lte gt gte select default math sep"}]}}return dust_1=dust2,dust_1}var ebnf_1,hasRequiredEbnf;function requireEbnf(){if(hasRequiredEbnf)return ebnf_1;hasRequiredEbnf=1;function ebnf2(hljs){const commentMode=hljs.COMMENT(/\(\*/,/\*\)/),nonTerminalMode={className:"attribute",begin:/^[ ]*[a-zA-Z]+([\s_-]+[a-zA-Z]+)*/},ruleBodyMode={begin:/=/,end:/[.;]/,contains:[commentMode,{className:"meta",begin:/\?.*\?/},{className:"string",variants:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE, {begin:"`",end:"`"}]}]};return{name:"Extended Backus-Naur Form",illegal:/\S/,contains:[commentMode,nonTerminalMode,ruleBodyMode]}}return ebnf_1=ebnf2,ebnf_1}var elixir_1,hasRequiredElixir;function requireElixir(){if(hasRequiredElixir)return elixir_1;hasRequiredElixir=1;function elixir2(hljs){const regex=hljs.regex,ELIXIR_IDENT_RE="[a-zA-Z_][a-zA-Z0-9_.]*(!|\\?)?",ELIXIR_METHOD_RE="[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",KWS={$pattern:ELIXIR_IDENT_RE,keyword:[ "after","alias","and","case","catch","cond","defstruct","defguard","do","else","end","fn","for","if","import","in","not","or","quote","raise","receive","require","reraise","rescue","try","unless","unquote","unquote_splicing","use","when","with|0"],literal:["false","nil","true"]},SUBST={className:"subst",begin:/#\{/,end:/\}/,keywords:KWS},NUMBER={className:"number",begin:"(\\b0o[0-7_]+)|(\\b0b[01_]+)|(\\b0x[0-9a-fA-F_]+)|(-?\\b[0-9][0-9_]*(\\.[0-9_]+([eE][-+]?[0-9]+)?)?)",relevance:0},BACKSLASH_ESCAPE={ match:/\\[\s\S]/,scope:"char.escape",relevance:0},SIGIL_DELIMITERS=`[/|([{<"']`,SIGIL_DELIMITER_MODES=[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/\//,end:/\//},{begin:/\|/,end:/\|/},{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/},{begin:/\{/,end:/\}/},{begin://}],escapeSigilEnd=end=>({scope:"char.escape",begin:regex.concat(/\\/,end),relevance:0}),LOWERCASE_SIGIL={className:"string",begin:"~[a-z](?="+SIGIL_DELIMITERS+")",contains:SIGIL_DELIMITER_MODES.map(x=>hljs.inherit(x,{contains:[escapeSigilEnd( x.end),BACKSLASH_ESCAPE,SUBST]}))},UPCASE_SIGIL={className:"string",begin:"~[A-Z](?="+SIGIL_DELIMITERS+")",contains:SIGIL_DELIMITER_MODES.map(x=>hljs.inherit(x,{contains:[escapeSigilEnd(x.end)]}))},REGEX_SIGIL={className:"regex",variants:[{begin:"~r(?="+SIGIL_DELIMITERS+")",contains:SIGIL_DELIMITER_MODES.map(x=>hljs.inherit(x,{end:regex.concat(x.end,/[uismxfU]{0,7}/),contains:[escapeSigilEnd(x.end),BACKSLASH_ESCAPE,SUBST]}))},{begin:"~R(?="+SIGIL_DELIMITERS+")",contains:SIGIL_DELIMITER_MODES.map( x=>hljs.inherit(x,{end:regex.concat(x.end,/[uismxfU]{0,7}/),contains:[escapeSigilEnd(x.end)]}))}]},STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE,SUBST],variants:[{begin:/"""/,end:/"""/},{begin:/'''/,end:/'''/},{begin:/~S"""/,end:/"""/,contains:[]},{begin:/~S"/,end:/"/,contains:[]},{begin:/~S'''/,end:/'''/,contains:[]},{begin:/~S'/,end:/'/,contains:[]},{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},FUNCTION={className:"function",beginKeywords:"def defp defmacro defmacrop",end:/\B\b/,contains:[ hljs.inherit(hljs.TITLE_MODE,{begin:ELIXIR_IDENT_RE,endsParent:!0})]},CLASS2=hljs.inherit(FUNCTION,{className:"class",beginKeywords:"defimpl defmodule defprotocol defrecord",end:/\bdo\b|$|;/}),ELIXIR_DEFAULT_CONTAINS=[STRING,REGEX_SIGIL,UPCASE_SIGIL,LOWERCASE_SIGIL,hljs.HASH_COMMENT_MODE,CLASS2,FUNCTION,{begin:"::"},{className:"symbol",begin:":(?![\\s:])",contains:[STRING,{begin:ELIXIR_METHOD_RE}],relevance:0},{className:"symbol",begin:ELIXIR_IDENT_RE+":(?!:)",relevance:0},{className:"title.clas\ s",begin:/(\b[A-Z][a-zA-Z0-9_]+)/,relevance:0},NUMBER,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))"}];return SUBST.contains=ELIXIR_DEFAULT_CONTAINS,{name:"Elixir",aliases:["ex","exs"],keywords:KWS,contains:ELIXIR_DEFAULT_CONTAINS}}return elixir_1=elixir2,elixir_1}var elm_1,hasRequiredElm;function requireElm(){if(hasRequiredElm)return elm_1;hasRequiredElm=1;function elm2(hljs){const COMMENT={variants:[hljs.COMMENT("--","$"),hljs.COMMENT(/\{-/,/-\}/,{contains:["self"]})]},CONSTRUCTOR={className:"\ type",begin:"\\b[A-Z][\\w']*",relevance:0},LIST={begin:"\\(",end:"\\)",illegal:'"',contains:[{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},COMMENT]},RECORD={begin:/\{/,end:/\}/,contains:LIST.contains},CHARACTER={className:"string",begin:"'\\\\?.",end:"'",illegal:"."};return{name:"Elm",keywords:["let","in","if","then","else","case","of","where","module","import","exposing","type","alias","as","infix","infixl","infixr","port","effect","command","subscription"],contains:[{beginKeywords:"\ port effect module",end:"exposing",keywords:"port effect module where command subscription exposing",contains:[LIST,COMMENT],illegal:"\\W\\.|;"},{begin:"import",end:"$",keywords:"import as exposing",contains:[LIST,COMMENT],illegal:"\\W\\.|;"},{begin:"type",end:"$",keywords:"type alias",contains:[CONSTRUCTOR,LIST,RECORD,COMMENT]},{beginKeywords:"infix infixl infixr",end:"$",contains:[hljs.C_NUMBER_MODE,COMMENT]},{begin:"port",end:"$",keywords:"port",contains:[COMMENT]},CHARACTER,hljs.QUOTE_STRING_MODE, hljs.C_NUMBER_MODE,CONSTRUCTOR,hljs.inherit(hljs.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),COMMENT,{begin:"->|<-"}],illegal:/;/}}return elm_1=elm2,elm_1}var ruby_1,hasRequiredRuby;function requireRuby(){if(hasRequiredRuby)return ruby_1;hasRequiredRuby=1;function ruby2(hljs){const regex=hljs.regex,RUBY_METHOD_RE="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",CLASS_NAME_RE=regex.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),CLASS_NAME_WITH_NAMESPACE_RE=regex. concat(CLASS_NAME_RE,/(::\w+)*/),RUBY_KEYWORDS={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","la\ mbda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},YARDOCTAG={className:"doctag",begin:"@[A-Za-z]+"},IRB_OBJECT={begin:"#<",end:">"},COMMENT_MODES=[hljs.COMMENT("#","$",{contains:[YARDOCTAG]}),hljs.COMMENT("^=begin","^=end",{contains:[YARDOCTAG],relevance:10}),hljs.COMMENT("^__END__",hljs.MATCH_NOTHING_RE)],SUBST={className:"subst",begin:/#\{/,end:/\}/,keywords:RUBY_KEYWORDS},STRING={className:"string",contains:[ hljs.BACKSLASH_ESCAPE,SUBST],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/}, {begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:regex.concat(/<<[-~]?'?/,regex.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[hljs.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[hljs.BACKSLASH_ESCAPE,SUBST]})]}]},decimal="[1-9](_?[0-9])*|0",digits="[0-9](_?[0-9])*",NUMBER={className:"number",relevance:0,variants:[{begin:`\\b(${decimal})(\\.(${digits}))?([eE][+-]?(${digits})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?\ i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},PARAMS={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:RUBY_KEYWORDS}]},RUBY_DEFAULT_CONTAINS=[STRING,{variants:[{match:[/class\s+/,CLASS_NAME_WITH_NAMESPACE_RE,/\s+<\s+/,CLASS_NAME_WITH_NAMESPACE_RE]},{match:[/\b(class|module)\s+/,CLASS_NAME_WITH_NAMESPACE_RE]}],scope:{2:"title.class",4:"title.class.i\ nherited"},keywords:RUBY_KEYWORDS},{match:[/(include|extend)\s+/,CLASS_NAME_WITH_NAMESPACE_RE],scope:{2:"title.class"},keywords:RUBY_KEYWORDS},{relevance:0,match:[CLASS_NAME_WITH_NAMESPACE_RE,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:CLASS_NAME_RE,scope:"title.class"},{match:[/def/,/\s+/,RUBY_METHOD_RE],scope:{1:"keyword",3:"title.function"},contains:[PARAMS]},{begin:hljs.IDENT_RE+"::"},{className:"symbol",begin:hljs. UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[STRING,{begin:RUBY_METHOD_RE}],relevance:0},NUMBER,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:RUBY_KEYWORDS},{begin:"("+hljs.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[hljs.BACKSLASH_ESCAPE,SUBST],illegal:/\n/,variants:[ {begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(IRB_OBJECT,COMMENT_MODES),relevance:0}].concat(IRB_OBJECT,COMMENT_MODES);SUBST.contains=RUBY_DEFAULT_CONTAINS,PARAMS.contains=RUBY_DEFAULT_CONTAINS;const IRB_DEFAULT=[{begin:/^\s*=>/,starts:{end:"$",contains:RUBY_DEFAULT_CONTAINS}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\\ d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:RUBY_KEYWORDS,contains:RUBY_DEFAULT_CONTAINS}}];return COMMENT_MODES.unshift(IRB_OBJECT),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:RUBY_KEYWORDS,illegal:/\/\*/,contains:[hljs.SHEBANG({binary:"ruby"})].concat(IRB_DEFAULT).concat(COMMENT_MODES).concat(RUBY_DEFAULT_CONTAINS)}}return ruby_1=ruby2,ruby_1}var erb_1,hasRequiredErb;function requireErb(){if(hasRequiredErb)return erb_1;hasRequiredErb=1;function erb2(hljs){return{ name:"ERB",subLanguage:"xml",contains:[hljs.COMMENT("<%#","%>"),{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}return erb_1=erb2,erb_1}var erlangRepl_1,hasRequiredErlangRepl;function requireErlangRepl(){if(hasRequiredErlangRepl)return erlangRepl_1;hasRequiredErlangRepl=1;function erlangRepl2(hljs){const regex=hljs.regex;return{name:"Erlang REPL",keywords:{built_in:"spawn spawn_link self",keyword:"after and andalso|10 band begin bnot bor bsl bsr bxor case catc\ h cond div end fun if let not of or orelse|10 query receive rem try when xor"},contains:[{className:"meta.prompt",begin:"^[0-9]+> ",relevance:10},hljs.COMMENT("%","$"),{className:"number",begin:"\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)",relevance:0},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{begin:regex.concat(/\?(::)?/,/([A-Z]\w*)/,/((::)[A-Z]\w*)*/)},{begin:"->"},{begin:"ok"},{begin:"!"},{begin:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']\ *)|(\\b[a-z'][a-zA-Z0-9_']*)",relevance:0},{begin:"[A-Z][a-zA-Z0-9_']*",relevance:0}]}}return erlangRepl_1=erlangRepl2,erlangRepl_1}var erlang_1,hasRequiredErlang;function requireErlang(){if(hasRequiredErlang)return erlang_1;hasRequiredErlang=1;function erlang2(hljs){const BASIC_ATOM_RE="[a-z'][a-zA-Z0-9_']*",FUNCTION_NAME_RE="("+BASIC_ATOM_RE+":"+BASIC_ATOM_RE+"|"+BASIC_ATOM_RE+")",ERLANG_RESERVED={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let\ not of orelse|10 query receive rem try when xor maybe else",literal:"false true"},COMMENT=hljs.COMMENT("%","$"),NUMBER={className:"number",begin:"\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)",relevance:0},NAMED_FUN={begin:"fun\\s+"+BASIC_ATOM_RE+"/\\d+"},FUNCTION_CALL={begin:FUNCTION_NAME_RE+"\\(",end:"\\)",returnBegin:!0,relevance:0,contains:[{begin:FUNCTION_NAME_RE,relevance:0},{begin:"\\(",end:"\\)",endsWithParent:!0,returnEnd:!0,relevance:0}]}, TUPLE={begin:/\{/,end:/\}/,relevance:0},VAR1={begin:"\\b_([A-Z][A-Za-z0-9_]*)?",relevance:0},VAR2={begin:"[A-Z][a-zA-Z0-9_]*",relevance:0},RECORD_ACCESS={begin:"#"+hljs.UNDERSCORE_IDENT_RE,relevance:0,returnBegin:!0,contains:[{begin:"#"+hljs.UNDERSCORE_IDENT_RE,relevance:0},{begin:/\{/,end:/\}/,relevance:0}]},CHAR_LITERAL={scope:"string",match:/\$(\\([^0-9]|[0-9]{1,3}|)|.)/},TRIPLE_QUOTE={scope:"string",match:/"""("*)(?!")[\s\S]*?"""\1/},SIGIL={scope:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[ {match:/~\w?"""("*)(?!")[\s\S]*?"""\1/},{begin:/~\w?\(/,end:/\)/},{begin:/~\w?\[/,end:/\]/},{begin:/~\w?{/,end:/}/},{begin:/~\w?/},{begin:/~\w?\//,end:/\//},{begin:/~\w?\|/,end:/\|/},{begin:/~\w?'/,end:/'/},{begin:/~\w?"/,end:/"/},{begin:/~\w?`/,end:/`/},{begin:/~\w?#/,end:/#/}]},BLOCK_STATEMENTS={beginKeywords:"fun receive if try case maybe",end:"end",keywords:ERLANG_RESERVED};BLOCK_STATEMENTS.contains=[COMMENT,NAMED_FUN,hljs.inherit(hljs.APOS_STRING_MODE,{className:""}),BLOCK_STATEMENTS, FUNCTION_CALL,SIGIL,TRIPLE_QUOTE,hljs.QUOTE_STRING_MODE,NUMBER,TUPLE,VAR1,VAR2,RECORD_ACCESS,CHAR_LITERAL];const BASIC_MODES=[COMMENT,NAMED_FUN,BLOCK_STATEMENTS,FUNCTION_CALL,SIGIL,TRIPLE_QUOTE,hljs.QUOTE_STRING_MODE,NUMBER,TUPLE,VAR1,VAR2,RECORD_ACCESS,CHAR_LITERAL];FUNCTION_CALL.contains[1].contains=BASIC_MODES,TUPLE.contains=BASIC_MODES,RECORD_ACCESS.contains[1].contains=BASIC_MODES;const DIRECTIVES=["-module","-record","-undef","-export","-ifdef","-ifndef","-author","-copyright","-doc","-mod\ uledoc","-vsn","-import","-include","-include_lib","-compile","-define","-else","-endif","-file","-behaviour","-behavior","-spec","-on_load","-nifs"],PARAMS={className:"params",begin:"\\(",end:"\\)",contains:BASIC_MODES};return{name:"Erlang",aliases:["erl"],keywords:ERLANG_RESERVED,illegal:"(",returnBegin:!0,illegal:"\\(|#|//|/\\*|\\\\|:|;",contains:[PARAMS,hljs.inherit(hljs.TITLE_MODE, {begin:BASIC_ATOM_RE})],starts:{end:";|\\.",keywords:ERLANG_RESERVED,contains:BASIC_MODES}},COMMENT,{begin:"^-",end:"\\.",relevance:0,excludeEnd:!0,returnBegin:!0,keywords:{$pattern:"-"+hljs.IDENT_RE,keyword:DIRECTIVES.map(x=>`${x}|1.5`).join(" ")},contains:[PARAMS,SIGIL,TRIPLE_QUOTE,hljs.QUOTE_STRING_MODE]},NUMBER,SIGIL,TRIPLE_QUOTE,hljs.QUOTE_STRING_MODE,RECORD_ACCESS,VAR1,VAR2,TUPLE,CHAR_LITERAL,{begin:/\.$/}]}}return erlang_1=erlang2,erlang_1}var excel_1,hasRequiredExcel;function requireExcel(){ if(hasRequiredExcel)return excel_1;hasRequiredExcel=1;function excel2(hljs){return{name:"Excel formulae",aliases:["xlsx","xls"],case_insensitive:!0,keywords:{$pattern:/[a-zA-Z][\w\.]*/,built_in:["ABS","ACCRINT","ACCRINTM","ACOS","ACOSH","ACOT","ACOTH","AGGREGATE","ADDRESS","AMORDEGRC","AMORLINC","AND","ARABIC","AREAS","ARRAYTOTEXT","ASC","ASIN","ASINH","ATAN","ATAN2","ATANH","AVEDEV","AVERAGE","AVERAGEA","AVERAGEIF","AVERAGEIFS","BAHTTEXT","BASE","BESSELI","BESSELJ","BESSELK","BESSELY","BETADIST", "BETA.DIST","BETAINV","BETA.INV","BIN2DEC","BIN2HEX","BIN2OCT","BINOMDIST","BINOM.DIST","BINOM.DIST.RANGE","BINOM.INV","BITAND","BITLSHIFT","BITOR","BITRSHIFT","BITXOR","BYCOL","BYROW","CALL","CEILING","CEILING.MATH","CEILING.PRECISE","CELL","CHAR","CHIDIST","CHIINV","CHITEST","CHISQ.DIST","CHISQ.DIST.RT","CHISQ.INV","CHISQ.INV.RT","CHISQ.TEST","CHOOSE","CHOOSECOLS","CHOOSEROWS","CLEAN","CODE","COLUMN","COLUMNS","COMBIN","COMBINA","COMPLEX","CONCAT","CONCATENATE","CONFIDENCE","CONFIDENCE.NORM","\ CONFIDENCE.T","CONVERT","CORREL","COS","COSH","COT","COTH","COUNT","COUNTA","COUNTBLANK","COUNTIF","COUNTIFS","COUPDAYBS","COUPDAYS","COUPDAYSNC","COUPNCD","COUPNUM","COUPPCD","COVAR","COVARIANCE.P","COVARIANCE.S","CRITBINOM","CSC","CSCH","CUBEKPIMEMBER","CUBEMEMBER","CUBEMEMBERPROPERTY","CUBERANKEDMEMBER","CUBESET","CUBESETCOUNT","CUBEVALUE","CUMIPMT","CUMPRINC","DATE","DATEDIF","DATEVALUE","DAVERAGE","DAY","DAYS","DAYS360","DB","DBCS","DCOUNT","DCOUNTA","DDB","DEC2BIN","DEC2HEX","DEC2OCT","DEC\ IMAL","DEGREES","DELTA","DEVSQ","DGET","DISC","DMAX","DMIN","DOLLAR","DOLLARDE","DOLLARFR","DPRODUCT","DROP","DSTDEV","DSTDEVP","DSUM","DURATION","DVAR","DVARP","EDATE","EFFECT","ENCODEURL","EOMONTH","ERF","ERF.PRECISE","ERFC","ERFC.PRECISE","ERROR.TYPE","EUROCONVERT","EVEN","EXACT","EXP","EXPAND","EXPON.DIST","EXPONDIST","FACT","FACTDOUBLE","FALSE","F.DIST","FDIST","F.DIST.RT","FILTER","FILTERXML","FIND","FINDB","F.INV","F.INV.RT","FINV","FISHER","FISHERINV","FIXED","FLOOR","FLOOR.MATH","FLOOR.\ PRECISE","FORECAST","FORECAST.ETS","FORECAST.ETS.CONFINT","FORECAST.ETS.SEASONALITY","FORECAST.ETS.STAT","FORECAST.LINEAR","FORMULATEXT","FREQUENCY","F.TEST","FTEST","FV","FVSCHEDULE","GAMMA","GAMMA.DIST","GAMMADIST","GAMMA.INV","GAMMAINV","GAMMALN","GAMMALN.PRECISE","GAUSS","GCD","GEOMEAN","GESTEP","GETPIVOTDATA","GROWTH","HARMEAN","HEX2BIN","HEX2DEC","HEX2OCT","HLOOKUP","HOUR","HSTACK","HYPERLINK","HYPGEOM.DIST","HYPGEOMDIST","IF","IFERROR","IFNA","IFS","IMABS","IMAGE","IMAGINARY","IMARGUMENT", "IMCONJUGATE","IMCOS","IMCOSH","IMCOT","IMCSC","IMCSCH","IMDIV","IMEXP","IMLN","IMLOG10","IMLOG2","IMPOWER","IMPRODUCT","IMREAL","IMSEC","IMSECH","IMSIN","IMSINH","IMSQRT","IMSUB","IMSUM","IMTAN","INDEX","INDIRECT","INFO","INT","INTERCEPT","INTRATE","IPMT","IRR","ISBLANK","ISERR","ISERROR","ISEVEN","ISFORMULA","ISLOGICAL","ISNA","ISNONTEXT","ISNUMBER","ISODD","ISOMITTED","ISREF","ISTEXT","ISO.CEILING","ISOWEEKNUM","ISPMT","JIS","KURT","LAMBDA","LARGE","LCM","LEFT","LEFTB","LEN","LENB","LET","LIN\ EST","LN","LOG","LOG10","LOGEST","LOGINV","LOGNORM.DIST","LOGNORMDIST","LOGNORM.INV","LOOKUP","LOWER","MAKEARRAY","MAP","MATCH","MAX","MAXA","MAXIFS","MDETERM","MDURATION","MEDIAN","MID","MIDB","MIN","MINIFS","MINA","MINUTE","MINVERSE","MIRR","MMULT","MOD","MODE","MODE.MULT","MODE.SNGL","MONTH","MROUND","MULTINOMIAL","MUNIT","N","NA","NEGBINOM.DIST","NEGBINOMDIST","NETWORKDAYS","NETWORKDAYS.INTL","NOMINAL","NORM.DIST","NORMDIST","NORMINV","NORM.INV","NORM.S.DIST","NORMSDIST","NORM.S.INV","NORMSI\ NV","NOT","NOW","NPER","NPV","NUMBERVALUE","OCT2BIN","OCT2DEC","OCT2HEX","ODD","ODDFPRICE","ODDFYIELD","ODDLPRICE","ODDLYIELD","OFFSET","OR","PDURATION","PEARSON","PERCENTILE.EXC","PERCENTILE.INC","PERCENTILE","PERCENTRANK.EXC","PERCENTRANK.INC","PERCENTRANK","PERMUT","PERMUTATIONA","PHI","PHONETIC","PI","PMT","POISSON.DIST","POISSON","POWER","PPMT","PRICE","PRICEDISC","PRICEMAT","PROB","PRODUCT","PROPER","PV","QUARTILE","QUARTILE.EXC","QUARTILE.INC","QUOTIENT","RADIANS","RAND","RANDARRAY","RAND\ BETWEEN","RANK.AVG","RANK.EQ","RANK","RATE","RECEIVED","REDUCE","REGISTER.ID","REPLACE","REPLACEB","REPT","RIGHT","RIGHTB","ROMAN","ROUND","ROUNDDOWN","ROUNDUP","ROW","ROWS","RRI","RSQ","RTD","SCAN","SEARCH","SEARCHB","SEC","SECH","SECOND","SEQUENCE","SERIESSUM","SHEET","SHEETS","SIGN","SIN","SINH","SKEW","SKEW.P","SLN","SLOPE","SMALL","SORT","SORTBY","SQRT","SQRTPI","SQL.REQUEST","STANDARDIZE","STOCKHISTORY","STDEV","STDEV.P","STDEV.S","STDEVA","STDEVP","STDEVPA","STEYX","SUBSTITUTE","SUBTOTAL", "SUM","SUMIF","SUMIFS","SUMPRODUCT","SUMSQ","SUMX2MY2","SUMX2PY2","SUMXMY2","SWITCH","SYD","T","TAN","TANH","TAKE","TBILLEQ","TBILLPRICE","TBILLYIELD","T.DIST","T.DIST.2T","T.DIST.RT","TDIST","TEXT","TEXTAFTER","TEXTBEFORE","TEXTJOIN","TEXTSPLIT","TIME","TIMEVALUE","T.INV","T.INV.2T","TINV","TOCOL","TOROW","TODAY","TRANSPOSE","TREND","TRIM","TRIMMEAN","TRUE","TRUNC","T.TEST","TTEST","TYPE","UNICHAR","UNICODE","UNIQUE","UPPER","VALUE","VALUETOTEXT","VAR","VAR.P","VAR.S","VARA","VARP","VARPA","VDB", "VLOOKUP","VSTACK","WEBSERVICE","WEEKDAY","WEEKNUM","WEIBULL","WEIBULL.DIST","WORKDAY","WORKDAY.INTL","WRAPCOLS","WRAPROWS","XIRR","XLOOKUP","XMATCH","XNPV","XOR","YEAR","YEARFRAC","YIELD","YIELDDISC","YIELDMAT","Z.TEST","ZTEST"]},contains:[{begin:/^=/,end:/[^=]/,returnEnd:!0,illegal:/=/,relevance:10},{className:"symbol",begin:/\b[A-Z]{1,2}\d+\b/,end:/[^\d]/,excludeEnd:!0,relevance:0},{className:"symbol",begin:/[A-Z]{0,2}\d*:[A-Z]{0,2}\d*/,relevance:0},hljs.BACKSLASH_ESCAPE,hljs.QUOTE_STRING_MODE, {className:"number",begin:hljs.NUMBER_RE+"(%)?",relevance:0},hljs.COMMENT(/\bN\(/,/\)/,{excludeBegin:!0,excludeEnd:!0,illegal:/\n/})]}}return excel_1=excel2,excel_1}var fix_1,hasRequiredFix;function requireFix(){if(hasRequiredFix)return fix_1;hasRequiredFix=1;function fix2(hljs){return{name:"FIX",contains:[{begin:/[^\u2401\u0001]+/,end:/[\u2401\u0001]/,excludeEnd:!0,returnBegin:!0,returnEnd:!1,contains:[{begin:/([^\u2401\u0001=]+)/,end:/=([^\u2401\u0001=]+)/,returnEnd:!0,returnBegin:!1,className:"\ attr"},{begin:/=/,end:/([\u2401\u0001])/,excludeEnd:!0,excludeBegin:!0,className:"string"}]}],case_insensitive:!0}}return fix_1=fix2,fix_1}var flix_1,hasRequiredFlix;function requireFlix(){if(hasRequiredFlix)return flix_1;hasRequiredFlix=1;function flix2(hljs){const CHAR={className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},STRING={className:"string",variants:[{begin:'"',end:'"'}]},METHOD={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,excludeEnd:!0,contains:[{className:"title",relevance:0, begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/}]};return{name:"Flix",keywords:{keyword:["case","class","def","else","enum","if","impl","import","in","lat","rel","index","let","match","namespace","switch","type","yield","with"],literal:["true","false"]},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,CHAR,STRING,METHOD,hljs.C_NUMBER_MODE]}}return flix_1=flix2,flix_1}var fortran_1,hasRequiredFortran;function requireFortran(){if(hasRequiredFortran) return fortran_1;hasRequiredFortran=1;function fortran2(hljs){const regex=hljs.regex,PARAMS={className:"params",begin:"\\(",end:"\\)"},COMMENT={variants:[hljs.COMMENT("!","$",{relevance:0}),hljs.COMMENT("^C[ ]","$",{relevance:0}),hljs.COMMENT("^C$","$",{relevance:0})]},OPTIONAL_NUMBER_SUFFIX=/(_[a-z_\d]+)?/,OPTIONAL_NUMBER_EXP=/([de][+-]?\d+)?/,NUMBER={className:"number",variants:[{begin:regex.concat(/\b\d+/,/\.(\d*)/,OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)},{begin:regex.concat(/\b\d+/,OPTIONAL_NUMBER_EXP, OPTIONAL_NUMBER_SUFFIX)},{begin:regex.concat(/\.\d+/,OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)}],relevance:0},FUNCTION_DEF={className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[hljs.UNDERSCORE_TITLE_MODE,PARAMS]},STRING={className:"string",relevance:0,variants:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]};return{name:"Fortran",case_insensitive:!0,aliases:["f90","f95"],keywords:{$pattern:/\b[a-z][a-z0-9_]+\b|\.[a-z][a-z0-9_]+\./,keyword:["kind","do","c\ oncurrent","local","shared","while","private","call","intrinsic","where","elsewhere","type","endtype","endmodule","endselect","endinterface","end","enddo","endif","if","forall","endforall","only","contains","default","return","stop","then","block","endblock","endassociate","public","subroutine|10","function","program",".and.",".or.",".not.",".le.",".eq.",".ge.",".gt.",".lt.","goto","save","else","use","module","select","case","access","blank","direct","exist","file","fmt","form","formatted","ios\ tat","name","named","nextrec","number","opened","rec","recl","sequential","status","unformatted","unit","continue","format","pause","cycle","exit","c_null_char","c_alert","c_backspace","c_form_feed","flush","wait","decimal","round","iomsg","synchronous","nopass","non_overridable","pass","protected","volatile","abstract","extends","import","non_intrinsic","value","deferred","generic","final","enumerator","class","associate","bind","enum","c_int","c_short","c_long","c_long_long","c_signed_char","c\ _size_t","c_int8_t","c_int16_t","c_int32_t","c_int64_t","c_int_least8_t","c_int_least16_t","c_int_least32_t","c_int_least64_t","c_int_fast8_t","c_int_fast16_t","c_int_fast32_t","c_int_fast64_t","c_intmax_t","C_intptr_t","c_float","c_double","c_long_double","c_float_complex","c_double_complex","c_long_double_complex","c_bool","c_char","c_null_ptr","c_null_funptr","c_new_line","c_carriage_return","c_horizontal_tab","c_vertical_tab","iso_c_binding","c_loc","c_funloc","c_associated","c_f_pointer","c\ _ptr","c_funptr","iso_fortran_env","character_storage_size","error_unit","file_storage_size","input_unit","iostat_end","iostat_eor","numeric_storage_size","output_unit","c_f_procpointer","ieee_arithmetic","ieee_support_underflow_control","ieee_get_underflow_mode","ieee_set_underflow_mode","newunit","contiguous","recursive","pad","position","action","delim","readwrite","eor","advance","nml","interface","procedure","namelist","include","sequence","elemental","pure","impure","integer","real","chara\ cter","complex","logical","codimension","dimension","allocatable|10","parameter","external","implicit|10","none","double","precision","assign","intent","optional","pointer","target","in","out","common","equivalence","data"],literal:[".False.",".True."],built_in:["alog","alog10","amax0","amax1","amin0","amin1","amod","cabs","ccos","cexp","clog","csin","csqrt","dabs","dacos","dasin","datan","datan2","dcos","dcosh","ddim","dexp","dint","dlog","dlog10","dmax1","dmin1","dmod","dnint","dsign","dsin","\ dsinh","dsqrt","dtan","dtanh","float","iabs","idim","idint","idnint","ifix","isign","max0","max1","min0","min1","sngl","algama","cdabs","cdcos","cdexp","cdlog","cdsin","cdsqrt","cqabs","cqcos","cqexp","cqlog","cqsin","cqsqrt","dcmplx","dconjg","derf","derfc","dfloat","dgamma","dimag","dlgama","iqint","qabs","qacos","qasin","qatan","qatan2","qcmplx","qconjg","qcos","qcosh","qdim","qerf","qerfc","qexp","qgamma","qimag","qlgama","qlog","qlog10","qmax1","qmin1","qmod","qnint","qsign","qsin","qsinh", "qsqrt","qtan","qtanh","abs","acos","aimag","aint","anint","asin","atan","atan2","char","cmplx","conjg","cos","cosh","exp","ichar","index","int","log","log10","max","min","nint","sign","sin","sinh","sqrt","tan","tanh","print","write","dim","lge","lgt","lle","llt","mod","nullify","allocate","deallocate","adjustl","adjustr","all","allocated","any","associated","bit_size","btest","ceiling","count","cshift","date_and_time","digits","dot_product","eoshift","epsilon","exponent","floor","fraction","hug\ e","iand","ibclr","ibits","ibset","ieor","ior","ishft","ishftc","lbound","len_trim","matmul","maxexponent","maxloc","maxval","merge","minexponent","minloc","minval","modulo","mvbits","nearest","pack","present","product","radix","random_number","random_seed","range","repeat","reshape","rrspacing","scale","scan","selected_int_kind","selected_real_kind","set_exponent","shape","size","spacing","spread","sum","system_clock","tiny","transpose","trim","ubound","unpack","verify","achar","iachar","transf\ er","dble","entry","dprod","cpu_time","command_argument_count","get_command","get_command_argument","get_environment_variable","is_iostat_end","ieee_arithmetic","ieee_support_underflow_control","ieee_get_underflow_mode","ieee_set_underflow_mode","is_iostat_eor","move_alloc","new_line","selected_char_kind","same_type_as","extends_type_of","acosh","asinh","atanh","bessel_j0","bessel_j1","bessel_jn","bessel_y0","bessel_y1","bessel_yn","erf","erfc","erfc_scaled","gamma","log_gamma","hypot","norm2","\ atomic_define","atomic_ref","execute_command_line","leadz","trailz","storage_size","merge_bits","bge","bgt","ble","blt","dshiftl","dshiftr","findloc","iall","iany","iparity","image_index","lcobound","ucobound","maskl","maskr","num_images","parity","popcnt","poppar","shifta","shiftl","shiftr","this_image","sync","change","team","co_broadcast","co_max","co_min","co_sum","co_reduce"]},illegal:/\/\*/,contains:[STRING,FUNCTION_DEF,{begin:/^C\s*=(?!=)/,relevance:0},COMMENT,NUMBER]}}return fortran_1=fortran2, fortran_1}var fsharp_1,hasRequiredFsharp;function requireFsharp(){if(hasRequiredFsharp)return fsharp_1;hasRequiredFsharp=1;function escape2(value){return new RegExp(value.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}function source2(re2){return re2?typeof re2=="string"?re2:re2.source:null}function lookahead2(re2){return concat2("(?=",re2,")")}function concat2(...args){return args.map(x=>source2(x)).join("")}function stripOptionsFromArgs2(args){const opts=args[args.length-1];return typeof opts=="\ object"&&opts.constructor===Object?(args.splice(args.length-1,1),opts):{}}function either2(...args){return"("+(stripOptionsFromArgs2(args).capture?"":"?:")+args.map(x=>source2(x)).join("|")+")"}function fsharp2(hljs){const KEYWORDS2=["abstract","and","as","assert","base","begin","class","default","delegate","do","done","downcast","downto","elif","else","end","exception","extern","finally","fixed","for","fun","function","global","if","in","inherit","inline","interface","internal","lazy","let","ma\ tch","member","module","mutable","namespace","new","of","open","or","override","private","public","rec","return","static","struct","then","to","try","type","upcast","use","val","void","when","while","with","yield"],BANG_KEYWORD_MODE={scope:"keyword",match:/\b(yield|return|let|do|match|use)!/},PREPROCESSOR_KEYWORDS=["if","else","endif","line","nowarn","light","r","i","I","load","time","help","quit"],LITERALS2=["true","false","null","Some","None","Ok","Error","infinity","infinityf","nan","nanf"],SPECIAL_IDENTIFIERS=[ "__LINE__","__SOURCE_DIRECTORY__","__SOURCE_FILE__"],KNOWN_TYPES=["bool","byte","sbyte","int8","int16","int32","uint8","uint16","uint32","int","uint","int64","uint64","nativeint","unativeint","decimal","float","double","float32","single","char","string","unit","bigint","option","voption","list","array","seq","byref","exn","inref","nativeptr","obj","outref","voidptr","Result"],ALL_KEYWORDS={keyword:KEYWORDS2,literal:LITERALS2,built_in:["not","ref","raise","reraise","dict","readOnlyDict","set","ge\ t","enum","sizeof","typeof","typedefof","nameof","nullArg","invalidArg","invalidOp","id","fst","snd","ignore","lock","using","box","unbox","tryUnbox","printf","printfn","sprintf","eprintf","eprintfn","fprintf","fprintfn","failwith","failwithf"],"variable.constant":SPECIAL_IDENTIFIERS},COMMENT={variants:[hljs.COMMENT(/\(\*(?!\))/,/\*\)/,{contains:["self"]}),hljs.C_LINE_COMMENT_MODE]},IDENTIFIER_RE=/[a-zA-Z_](\w|')*/,QUOTED_IDENTIFIER={scope:"variable",begin:/``/,end:/``/},BEGIN_GENERIC_TYPE_SYMBOL_RE=/\B('|\^)/, GENERIC_TYPE_SYMBOL={scope:"symbol",variants:[{match:concat2(BEGIN_GENERIC_TYPE_SYMBOL_RE,/``.*?``/)},{match:concat2(BEGIN_GENERIC_TYPE_SYMBOL_RE,hljs.UNDERSCORE_IDENT_RE)}],relevance:0},makeOperatorMode=function({includeEqual}){let allOperatorChars;includeEqual?allOperatorChars="!%&*+-/<=>@^|~?":allOperatorChars="!%&*+-/<>@^|~?";const OPERATOR_CHARS=Array.from(allOperatorChars),OPERATOR_CHAR_RE=concat2("[",...OPERATOR_CHARS.map(escape2),"]"),OPERATOR_CHAR_OR_DOT_RE=either2(OPERATOR_CHAR_RE,/\./), OPERATOR_FIRST_CHAR_OF_MULTIPLE_RE=concat2(OPERATOR_CHAR_OR_DOT_RE,lookahead2(OPERATOR_CHAR_OR_DOT_RE)),SYMBOLIC_OPERATOR_RE=either2(concat2(OPERATOR_FIRST_CHAR_OF_MULTIPLE_RE,OPERATOR_CHAR_OR_DOT_RE,"*"),concat2(OPERATOR_CHAR_RE,"+"));return{scope:"operator",match:either2(SYMBOLIC_OPERATOR_RE,/:\?>/,/:\?/,/:>/,/:=/,/::?/,/\$/),relevance:0}},OPERATOR=makeOperatorMode({includeEqual:!0}),OPERATOR_WITHOUT_EQUAL=makeOperatorMode({includeEqual:!1}),makeTypeAnnotationMode=function(prefix,prefixScope){ return{begin:concat2(prefix,lookahead2(concat2(/\s*/,either2(/\w/,/'/,/\^/,/#/,/``/,/\(/,/{\|/)))),beginScope:prefixScope,end:lookahead2(either2(/\n/,/=/)),relevance:0,keywords:hljs.inherit(ALL_KEYWORDS,{type:KNOWN_TYPES}),contains:[COMMENT,GENERIC_TYPE_SYMBOL,hljs.inherit(QUOTED_IDENTIFIER,{scope:null}),OPERATOR_WITHOUT_EQUAL]}},TYPE_ANNOTATION=makeTypeAnnotationMode(/:/,"operator"),DISCRIMINATED_UNION_TYPE_ANNOTATION=makeTypeAnnotationMode(/\bof\b/,"keyword"),TYPE_DECLARATION={begin:[/(^|\s+)/, /type/,/\s+/,IDENTIFIER_RE],beginScope:{2:"keyword",4:"title.class"},end:lookahead2(/\(|=|$/),keywords:ALL_KEYWORDS,contains:[COMMENT,hljs.inherit(QUOTED_IDENTIFIER,{scope:null}),GENERIC_TYPE_SYMBOL,{scope:"operator",match:/<|>/},TYPE_ANNOTATION]},COMPUTATION_EXPRESSION={scope:"computation-expression",match:/\b[_a-z]\w*(?=\s*\{)/},PREPROCESSOR={begin:[/^\s*/,concat2(/#/,either2(...PREPROCESSOR_KEYWORDS)),/\b/],beginScope:{2:"meta"},end:lookahead2(/\s|$/)},NUMBER={variants:[hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]},QUOTED_STRING={scope:"string",begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE]},VERBATIM_STRING={scope:"string",begin:/@"/,end:/"/,contains:[{match:/""/},hljs.BACKSLASH_ESCAPE]},TRIPLE_QUOTED_STRING={scope:"string",begin:/"""/,end:/"""/,relevance:2},SUBST={scope:"subst",begin:/\{/,end:/\}/,keywords:ALL_KEYWORDS},INTERPOLATED_STRING={scope:"string",begin:/\$"/,end:/"/,contains:[{match:/\{\{/},{match:/\}\}/},hljs.BACKSLASH_ESCAPE,SUBST]},INTERPOLATED_VERBATIM_STRING={scope:"\ string",begin:/(\$@|@\$)"/,end:/"/,contains:[{match:/\{\{/},{match:/\}\}/},{match:/""/},hljs.BACKSLASH_ESCAPE,SUBST]},INTERPOLATED_TRIPLE_QUOTED_STRING={scope:"string",begin:/\$"""/,end:/"""/,contains:[{match:/\{\{/},{match:/\}\}/},SUBST],relevance:2},CHAR_LITERAL={scope:"string",match:concat2(/'/,either2(/[^\\']/,/\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8})/),/'/)};return SUBST.contains=[INTERPOLATED_VERBATIM_STRING,INTERPOLATED_STRING,VERBATIM_STRING,QUOTED_STRING,CHAR_LITERAL,BANG_KEYWORD_MODE, COMMENT,QUOTED_IDENTIFIER,TYPE_ANNOTATION,COMPUTATION_EXPRESSION,PREPROCESSOR,NUMBER,GENERIC_TYPE_SYMBOL,OPERATOR],{name:"F#",aliases:["fs","f#"],keywords:ALL_KEYWORDS,illegal:/\/\*/,classNameAliases:{"computation-expression":"keyword"},contains:[BANG_KEYWORD_MODE,{variants:[INTERPOLATED_TRIPLE_QUOTED_STRING,INTERPOLATED_VERBATIM_STRING,INTERPOLATED_STRING,TRIPLE_QUOTED_STRING,VERBATIM_STRING,QUOTED_STRING,CHAR_LITERAL]},COMMENT,QUOTED_IDENTIFIER,TYPE_DECLARATION,{scope:"meta",begin:/\[\]/, relevance:2,contains:[QUOTED_IDENTIFIER,TRIPLE_QUOTED_STRING,VERBATIM_STRING,QUOTED_STRING,CHAR_LITERAL,NUMBER]},DISCRIMINATED_UNION_TYPE_ANNOTATION,TYPE_ANNOTATION,COMPUTATION_EXPRESSION,PREPROCESSOR,NUMBER,GENERIC_TYPE_SYMBOL,OPERATOR]}}return fsharp_1=fsharp2,fsharp_1}var gams_1,hasRequiredGams;function requireGams(){if(hasRequiredGams)return gams_1;hasRequiredGams=1;function gams2(hljs){const regex=hljs.regex,KEYWORDS2={keyword:"abort acronym acronyms alias all and assign binary card diag di\ splay else eq file files for free ge gt if integer le loop lt maximizing minimizing model models ne negative no not option options or ord positive prod put putpage puttl repeat sameas semicont semiint smax smin solve sos1 sos2 sum system table then until using while xor yes",literal:"eps inf na",built_in:"abs arccos arcsin arctan arctan2 Beta betaReg binomial ceil centropy cos cosh cvPower div div0 eDist entropy errorf execSeed exp fact floor frac gamma gammaReg log logBeta logGamma log10 log2 m\ apVal max min mod ncpCM ncpF ncpVUpow ncpVUsin normal pi poly power randBinomial randLinear randTriangle round rPower sigmoid sign signPower sin sinh slexp sllog10 slrec sqexp sqlog10 sqr sqrec sqrt tan tanh trunc uniform uniformInt vcPower bool_and bool_eqv bool_imp bool_not bool_or bool_xor ifThen rel_eq rel_ge rel_gt rel_le rel_lt rel_ne gday gdow ghour gleap gmillisec gminute gmonth gsecond gyear jdate jnow jstart jtime errorLevel execError gamsRelease gamsVersion handleCollect handleDelete \ handleStatus handleSubmit heapFree heapLimit heapSize jobHandle jobKill jobStatus jobTerminate licenseLevel licenseStatus maxExecError sleep timeClose timeComp timeElapsed timeExec timeStart"},PARAMS={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0},SYMBOLS={className:"symbol",variants:[{begin:/=[lgenxc]=/},{begin:/\$/}]},QSTR={className:"comment",variants:[{begin:"'",end:"'"},{begin:'"',end:'"'}],illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]},ASSIGNMENT={begin:"/",end:"/", keywords:KEYWORDS2,contains:[QSTR,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,hljs.C_NUMBER_MODE]},COMMENT_WORD=/[a-z0-9&#*=?@\\><:,()$[\]_.{}!+%^-]+/,DESCTEXT={begin:/[a-z][a-z0-9_]*(\([a-z0-9_, ]*\))?[ \t]+/,excludeBegin:!0,end:"$",endsWithParent:!0,contains:[QSTR,ASSIGNMENT,{className:"comment",begin:regex.concat(COMMENT_WORD,regex.anyNumberOfTimes(regex.concat(/[ ]+/,COMMENT_WORD))),relevance:0}]};return{name:"GAMS",aliases:["gms"],case_insensitive:!0, keywords:KEYWORDS2,contains:[hljs.COMMENT(/^\$ontext/,/^\$offtext/),{className:"meta",begin:"^\\$[a-z0-9]+",end:"$",returnBegin:!0,contains:[{className:"keyword",begin:"^\\$[a-z0-9]+"}]},hljs.COMMENT("^\\*","$"),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,{beginKeywords:"set sets parameter parameters variable variables scalar scalars equation equations",end:";",contains:[hljs.COMMENT("^\\*","$"),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE, hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,ASSIGNMENT,DESCTEXT]},{beginKeywords:"table",end:";",returnBegin:!0,contains:[{beginKeywords:"table",end:"$",contains:[DESCTEXT]},hljs.COMMENT("^\\*","$"),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,hljs.C_NUMBER_MODE]},{className:"function",begin:/^[a-z][a-z0-9_,\-+' ()$]+\.{2}/,returnBegin:!0,contains:[{className:"title",begin:/^[a-z0-9_]+/},PARAMS,SYMBOLS]},hljs.C_NUMBER_MODE,SYMBOLS]}}return gams_1= gams2,gams_1}var gauss_1,hasRequiredGauss;function requireGauss(){if(hasRequiredGauss)return gauss_1;hasRequiredGauss=1;function gauss2(hljs){const KEYWORDS2={keyword:"bool break call callexe checkinterrupt clear clearg closeall cls comlog compile continue create debug declare delete disable dlibrary dllcall do dos ed edit else elseif enable end endfor endif endp endo errorlog errorlogat expr external fn for format goto gosub graph if keyword let lib library line load loadarray loadexe loadf loa\ dk loadm loadp loads loadx local locate loopnextindex lprint lpwidth lshow matrix msym ndpclex new open output outwidth plot plotsym pop prcsn print printdos proc push retp return rndcon rndmod rndmult rndseed run save saveall screen scroll setarray show sparse stop string struct system trace trap threadfor threadendfor threadbegin threadjoin threadstat threadend until use while winprint ne ge le gt lt and xor or not eq eqv",built_in:"abs acf aconcat aeye amax amean AmericanBinomCall AmericanBin\ omCall_Greeks AmericanBinomCall_ImpVol AmericanBinomPut AmericanBinomPut_Greeks AmericanBinomPut_ImpVol AmericanBSCall AmericanBSCall_Greeks AmericanBSCall_ImpVol AmericanBSPut AmericanBSPut_Greeks AmericanBSPut_ImpVol amin amult annotationGetDefaults annotationSetBkd annotationSetFont annotationSetLineColor annotationSetLineStyle annotationSetLineThickness annualTradingDays arccos arcsin areshape arrayalloc arrayindex arrayinit arraytomat asciiload asclabel astd astds asum atan atan2 atranspose\ axmargin balance band bandchol bandcholsol bandltsol bandrv bandsolpd bar base10 begwind besselj bessely beta box boxcox cdfBeta cdfBetaInv cdfBinomial cdfBinomialInv cdfBvn cdfBvn2 cdfBvn2e cdfCauchy cdfCauchyInv cdfChic cdfChii cdfChinc cdfChincInv cdfExp cdfExpInv cdfFc cdfFnc cdfFncInv cdfGam cdfGenPareto cdfHyperGeo cdfLaplace cdfLaplaceInv cdfLogistic cdfLogisticInv cdfmControlCreate cdfMvn cdfMvn2e cdfMvnce cdfMvne cdfMvt2e cdfMvtce cdfMvte cdfN cdfN2 cdfNc cdfNegBinomial cdfNegBinomialI\ nv cdfNi cdfPoisson cdfPoissonInv cdfRayleigh cdfRayleighInv cdfTc cdfTci cdfTnc cdfTvn cdfWeibull cdfWeibullInv cdir ceil ChangeDir chdir chiBarSquare chol choldn cholsol cholup chrs close code cols colsf combinate combinated complex con cond conj cons ConScore contour conv convertsatostr convertstrtosa corrm corrms corrvc corrx corrxs cos cosh counts countwts crossprd crout croutp csrcol csrlin csvReadM csvReadSA cumprodc cumsumc curve cvtos datacreate datacreatecomplex datalist dataload datal\ oop dataopen datasave date datestr datestring datestrymd dayinyr dayofweek dbAddDatabase dbClose dbCommit dbCreateQuery dbExecQuery dbGetConnectOptions dbGetDatabaseName dbGetDriverName dbGetDrivers dbGetHostName dbGetLastErrorNum dbGetLastErrorText dbGetNumericalPrecPolicy dbGetPassword dbGetPort dbGetTableHeaders dbGetTables dbGetUserName dbHasFeature dbIsDriverAvailable dbIsOpen dbIsOpenError dbOpen dbQueryBindValue dbQueryClear dbQueryCols dbQueryExecPrepared dbQueryFetchAllM dbQueryFetchAll\ SA dbQueryFetchOneM dbQueryFetchOneSA dbQueryFinish dbQueryGetBoundValue dbQueryGetBoundValues dbQueryGetField dbQueryGetLastErrorNum dbQueryGetLastErrorText dbQueryGetLastInsertID dbQueryGetLastQuery dbQueryGetPosition dbQueryIsActive dbQueryIsForwardOnly dbQueryIsNull dbQueryIsSelect dbQueryIsValid dbQueryPrepare dbQueryRows dbQuerySeek dbQuerySeekFirst dbQuerySeekLast dbQuerySeekNext dbQuerySeekPrevious dbQuerySetForwardOnly dbRemoveDatabase dbRollback dbSetConnectOptions dbSetDatabaseName db\ SetHostName dbSetNumericalPrecPolicy dbSetPort dbSetUserName dbTransaction DeleteFile delif delrows denseToSp denseToSpRE denToZero design det detl dfft dffti diag diagrv digamma doswin DOSWinCloseall DOSWinOpen dotfeq dotfeqmt dotfge dotfgemt dotfgt dotfgtmt dotfle dotflemt dotflt dotfltmt dotfne dotfnemt draw drop dsCreate dstat dstatmt dstatmtControlCreate dtdate dtday dttime dttodtv dttostr dttoutc dtvnormal dtvtodt dtvtoutc dummy dummybr dummydn eig eigh eighv eigv elapsedTradingDays endwin\ d envget eof eqSolve eqSolvemt eqSolvemtControlCreate eqSolvemtOutCreate eqSolveset erf erfc erfccplx erfcplx error etdays ethsec etstr EuropeanBinomCall EuropeanBinomCall_Greeks EuropeanBinomCall_ImpVol EuropeanBinomPut EuropeanBinomPut_Greeks EuropeanBinomPut_ImpVol EuropeanBSCall EuropeanBSCall_Greeks EuropeanBSCall_ImpVol EuropeanBSPut EuropeanBSPut_Greeks EuropeanBSPut_ImpVol exctsmpl exec execbg exp extern eye fcheckerr fclearerr feq feqmt fflush fft ffti fftm fftmi fftn fge fgemt fgets fg\ etsa fgetsat fgetst fgt fgtmt fileinfo filesa fle flemt floor flt fltmt fmod fne fnemt fonts fopen formatcv formatnv fputs fputst fseek fstrerror ftell ftocv ftos ftostrC gamma gammacplx gammaii gausset gdaAppend gdaCreate gdaDStat gdaDStatMat gdaGetIndex gdaGetName gdaGetNames gdaGetOrders gdaGetType gdaGetTypes gdaGetVarInfo gdaIsCplx gdaLoad gdaPack gdaRead gdaReadByIndex gdaReadSome gdaReadSparse gdaReadStruct gdaReportVarInfo gdaSave gdaUpdate gdaUpdateAndPack gdaVars gdaWrite gdaWrite32 gd\ aWriteSome getarray getdims getf getGAUSShome getmatrix getmatrix4D getname getnamef getNextTradingDay getNextWeekDay getnr getorders getpath getPreviousTradingDay getPreviousWeekDay getRow getscalar3D getscalar4D getTrRow getwind glm gradcplx gradMT gradMTm gradMTT gradMTTm gradp graphprt graphset hasimag header headermt hess hessMT hessMTg hessMTgw hessMTm hessMTmw hessMTT hessMTTg hessMTTgw hessMTTm hessMTw hessp hist histf histp hsec imag indcv indexcat indices indices2 indicesf indicesfn in\ dnv indsav integrate1d integrateControlCreate intgrat2 intgrat3 inthp1 inthp2 inthp3 inthp4 inthpControlCreate intquad1 intquad2 intquad3 intrleav intrleavsa intrsect intsimp inv invpd invswp iscplx iscplxf isden isinfnanmiss ismiss key keyav keyw lag lag1 lagn lapEighb lapEighi lapEighvb lapEighvi lapgEig lapgEigh lapgEighv lapgEigv lapgSchur lapgSvdcst lapgSvds lapgSvdst lapSvdcusv lapSvds lapSvdusv ldlp ldlsol linSolve listwise ln lncdfbvn lncdfbvn2 lncdfmvn lncdfn lncdfn2 lncdfnc lnfact lnga\ mmacplx lnpdfmvn lnpdfmvt lnpdfn lnpdft loadd loadstruct loadwind loess loessmt loessmtControlCreate log loglog logx logy lower lowmat lowmat1 ltrisol lu lusol machEpsilon make makevars makewind margin matalloc matinit mattoarray maxbytes maxc maxindc maxv maxvec mbesselei mbesselei0 mbesselei1 mbesseli mbesseli0 mbesseli1 meanc median mergeby mergevar minc minindc minv miss missex missrv moment momentd movingave movingaveExpwgt movingaveWgt nextindex nextn nextnevn nextwind ntos null null1 numC\ ombinations ols olsmt olsmtControlCreate olsqr olsqr2 olsqrmt ones optn optnevn orth outtyp pacf packedToSp packr parse pause pdfCauchy pdfChi pdfExp pdfGenPareto pdfHyperGeo pdfLaplace pdfLogistic pdfn pdfPoisson pdfRayleigh pdfWeibull pi pinv pinvmt plotAddArrow plotAddBar plotAddBox plotAddHist plotAddHistF plotAddHistP plotAddPolar plotAddScatter plotAddShape plotAddTextbox plotAddTS plotAddXY plotArea plotBar plotBox plotClearLayout plotContour plotCustomLayout plotGetDefaults plotHist plot\ HistF plotHistP plotLayout plotLogLog plotLogX plotLogY plotOpenWindow plotPolar plotSave plotScatter plotSetAxesPen plotSetBar plotSetBarFill plotSetBarStacked plotSetBkdColor plotSetFill plotSetGrid plotSetLegend plotSetLineColor plotSetLineStyle plotSetLineSymbol plotSetLineThickness plotSetNewWindow plotSetTitle plotSetWhichYAxis plotSetXAxisShow plotSetXLabel plotSetXRange plotSetXTicInterval plotSetXTicLabel plotSetYAxisShow plotSetYLabel plotSetYRange plotSetZAxisShow plotSetZLabel plotSu\ rface plotTS plotXY polar polychar polyeval polygamma polyint polymake polymat polymroot polymult polyroot pqgwin previousindex princomp printfm printfmt prodc psi putarray putf putvals pvCreate pvGetIndex pvGetParNames pvGetParVector pvLength pvList pvPack pvPacki pvPackm pvPackmi pvPacks pvPacksi pvPacksm pvPacksmi pvPutParVector pvTest pvUnpack QNewton QNewtonmt QNewtonmtControlCreate QNewtonmtOutCreate QNewtonSet QProg QProgmt QProgmtInCreate qqr qqre qqrep qr qre qrep qrsol qrtsol qtyr qtyr\ e qtyrep quantile quantiled qyr qyre qyrep qz rank rankindx readr real reclassify reclassifyCuts recode recserar recsercp recserrc rerun rescale reshape rets rev rfft rffti rfftip rfftn rfftnp rfftp rndBernoulli rndBeta rndBinomial rndCauchy rndChiSquare rndCon rndCreateState rndExp rndGamma rndGeo rndGumbel rndHyperGeo rndi rndKMbeta rndKMgam rndKMi rndKMn rndKMnb rndKMp rndKMu rndKMvm rndLaplace rndLCbeta rndLCgam rndLCi rndLCn rndLCnb rndLCp rndLCu rndLCvm rndLogNorm rndMTu rndMVn rndMVt rndn\ rndnb rndNegBinomial rndp rndPoisson rndRayleigh rndStateSkip rndu rndvm rndWeibull rndWishart rotater round rows rowsf rref sampleData satostrC saved saveStruct savewind scale scale3d scalerr scalinfnanmiss scalmiss schtoc schur searchsourcepath seekr select selif seqa seqm setdif setdifsa setvars setvwrmode setwind shell shiftr sin singleindex sinh sleep solpd sortc sortcc sortd sorthc sorthcc sortind sortindc sortmc sortr sortrc spBiconjGradSol spChol spConjGradSol spCreate spDenseSubmat spD\ iagRvMat spEigv spEye spLDL spline spLU spNumNZE spOnes spreadSheetReadM spreadSheetReadSA spreadSheetWrite spScale spSubmat spToDense spTrTDense spTScalar spZeros sqpSolve sqpSolveMT sqpSolveMTControlCreate sqpSolveMTlagrangeCreate sqpSolveMToutCreate sqpSolveSet sqrt statements stdc stdsc stocv stof strcombine strindx strlen strput strrindx strsect strsplit strsplitPad strtodt strtof strtofcplx strtriml strtrimr strtrunc strtruncl strtruncpad strtruncr submat subscat substute subvec sumc sumr \ surface svd svd1 svd2 svdcusv svds svdusv sysstate tab tan tanh tempname time timedt timestr timeutc title tkf2eps tkf2ps tocart todaydt toeplitz token topolar trapchk trigamma trimr trunc type typecv typef union unionsa uniqindx uniqindxsa unique uniquesa upmat upmat1 upper utctodt utctodtv utrisol vals varCovMS varCovXS varget vargetl varmall varmares varput varputl vartypef vcm vcms vcx vcxs vec vech vecr vector vget view viewxyz vlist vnamecv volume vput vread vtypecv wait waitc walkindex wh\ ere window writer xlabel xlsGetSheetCount xlsGetSheetSize xlsGetSheetTypes xlsMakeRange xlsReadM xlsReadSA xlsWrite xlsWriteM xlsWriteSA xpnd xtics xy xyz ylabel ytics zeros zeta zlabel ztics cdfEmpirical dot h5create h5open h5read h5readAttribute h5write h5writeAttribute ldl plotAddErrorBar plotAddSurface plotCDFEmpirical plotSetColormap plotSetContourLabels plotSetLegendFont plotSetTextInterpreter plotSetXTicCount plotSetYTicCount plotSetZLevels powerm strjoin sylvester strtrim",literal:"DB_AF\ TER_LAST_ROW DB_ALL_TABLES DB_BATCH_OPERATIONS DB_BEFORE_FIRST_ROW DB_BLOB DB_EVENT_NOTIFICATIONS DB_FINISH_QUERY DB_HIGH_PRECISION DB_LAST_INSERT_ID DB_LOW_PRECISION_DOUBLE DB_LOW_PRECISION_INT32 DB_LOW_PRECISION_INT64 DB_LOW_PRECISION_NUMBERS DB_MULTIPLE_RESULT_SETS DB_NAMED_PLACEHOLDERS DB_POSITIONAL_PLACEHOLDERS DB_PREPARED_QUERIES DB_QUERY_SIZE DB_SIMPLE_LOCKING DB_SYSTEM_TABLES DB_TABLES DB_TRANSACTIONS DB_UNICODE DB_VIEWS __STDIN __STDOUT __STDERR __FILE_DIR"},AT_COMMENT_MODE=hljs.COMMENT( "@","@"),PREPROCESSOR={className:"meta",begin:"#",end:"$",keywords:{keyword:"define definecs|10 undef ifdef ifndef iflight ifdllcall ifmac ifos2win ifunix else endif lineson linesoff srcfile srcline"},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",keywords:{keyword:"include"},contains:[{className:"string",begin:'"',end:'"',illegal:"\\n"}]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,AT_COMMENT_MODE]},STRUCT_TYPE={begin:/\bstruct\s+/,end:/\s/,keywords:"struct",contains:[ {className:"type",begin:hljs.UNDERSCORE_IDENT_RE,relevance:0}]},PARSE_PARAMS=[{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,endsWithParent:!0,relevance:0,contains:[{className:"literal",begin:/\.\.\./},hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE,AT_COMMENT_MODE,STRUCT_TYPE]}],FUNCTION_DEF={className:"title",begin:hljs.UNDERSCORE_IDENT_RE,relevance:0},DEFINITION=function(beginKeywords,end,inherits){const mode=hljs.inherit({className:"function",beginKeywords,end,excludeEnd:!0, contains:[].concat(PARSE_PARAMS)},{});return mode.contains.push(FUNCTION_DEF),mode.contains.push(hljs.C_NUMBER_MODE),mode.contains.push(hljs.C_BLOCK_COMMENT_MODE),mode.contains.push(AT_COMMENT_MODE),mode},BUILT_IN_REF={className:"built_in",begin:"\\b("+KEYWORDS2.built_in.split(" ").join("|")+")\\b"},STRING_REF={className:"string",begin:'"',end:'"',contains:[hljs.BACKSLASH_ESCAPE],relevance:0},FUNCTION_REF={begin:hljs.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,keywords:KEYWORDS2,relevance:0,contains:[ {beginKeywords:KEYWORDS2.keyword},BUILT_IN_REF,{className:"built_in",begin:hljs.UNDERSCORE_IDENT_RE,relevance:0}]},FUNCTION_REF_PARAMS={begin:/\(/,end:/\)/,relevance:0,keywords:{built_in:KEYWORDS2.built_in,literal:KEYWORDS2.literal},contains:[hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE,AT_COMMENT_MODE,BUILT_IN_REF,FUNCTION_REF,STRING_REF,"self"]};return FUNCTION_REF.contains.push(FUNCTION_REF_PARAMS),{name:"GAUSS",aliases:["gss"],case_insensitive:!0,keywords:KEYWORDS2,illegal:/(\{[%#]|[%#]\}| <- )/, contains:[hljs.C_NUMBER_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,AT_COMMENT_MODE,STRING_REF,PREPROCESSOR,{className:"keyword",begin:/\bexternal (matrix|string|array|sparse matrix|struct|proc|keyword|fn)/},DEFINITION("proc keyword",";"),DEFINITION("fn","="),{beginKeywords:"for threadfor",end:/;/,relevance:0,contains:[hljs.C_BLOCK_COMMENT_MODE,AT_COMMENT_MODE,FUNCTION_REF_PARAMS]},{variants:[{begin:hljs.UNDERSCORE_IDENT_RE+"\\."+hljs.UNDERSCORE_IDENT_RE},{begin:hljs.UNDERSCORE_IDENT_RE+ "\\s*="}],relevance:0},FUNCTION_REF,STRUCT_TYPE]}}return gauss_1=gauss2,gauss_1}var gcode_1,hasRequiredGcode;function requireGcode(){if(hasRequiredGcode)return gcode_1;hasRequiredGcode=1;function gcode2(hljs){const regex=hljs.regex,GCODE_KEYWORDS={$pattern:/[A-Z]+|%/,keyword:["THEN","ELSE","ENDIF","IF","GOTO","DO","WHILE","WH","END","CALL","SUB","ENDSUB","EQ","NE","LT","GT","LE","GE","AND","OR","XOR","%"],built_in:["ATAN","ABS","ACOS","ASIN","COS","EXP","FIX","FUP","ROUND","LN","SIN","SQRT","TAN", "EXISTS"]},LETTER_BOUNDARY_RE=/\b/;function LETTER_BOUNDARY_CALLBACK(matchdata,response){if(matchdata.index===0)return;const charBeforeMatch=matchdata.input[matchdata.index-1];charBeforeMatch>="0"&&charBeforeMatch<="9"||charBeforeMatch!=="_"&&response.ignoreMatch()}const NUMBER_RE=/[+-]?((\.\d+)|(\d+)(\.\d*)?)/,GENERAL_MISC_FUNCTION_RE=/[GM]\s*\d+(\.\d+)?/,TOOLS_RE=/T\s*\d+/,SUBROUTINE_RE=/O\s*\d+/,SUBROUTINE_NAMED_RE=/O<.+>/,AXES_RE=/[ABCUVWXYZ]\s*/,PARAMETERS_RE=/[FHIJKPQRS]\s*/,GCODE_CODE=[hljs. COMMENT(/\(/,/\)/),hljs.COMMENT(/;/,/$/),hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,{scope:"title.function",variants:[{match:regex.concat(LETTER_BOUNDARY_RE,GENERAL_MISC_FUNCTION_RE)},{begin:GENERAL_MISC_FUNCTION_RE,"on:begin":LETTER_BOUNDARY_CALLBACK},{match:regex.concat(LETTER_BOUNDARY_RE,TOOLS_RE)},{begin:TOOLS_RE,"on:begin":LETTER_BOUNDARY_CALLBACK}]},{scope:"symbol",variants:[{match:regex.concat(LETTER_BOUNDARY_RE,SUBROUTINE_RE)},{begin:SUBROUTINE_RE,"on:begin":LETTER_BOUNDARY_CALLBACK}, {match:regex.concat(LETTER_BOUNDARY_RE,SUBROUTINE_NAMED_RE)},{begin:SUBROUTINE_NAMED_RE,"on:begin":LETTER_BOUNDARY_CALLBACK},{match:/\*\s*\d+\s*$/}]},{scope:"operator",match:/^N\s*\d+/},{scope:"variable",match:/-?#\s*\d+/},{scope:"property",variants:[{match:regex.concat(LETTER_BOUNDARY_RE,AXES_RE,NUMBER_RE)},{begin:regex.concat(AXES_RE,NUMBER_RE),"on:begin":LETTER_BOUNDARY_CALLBACK}]},{scope:"params",variants:[{match:regex.concat(LETTER_BOUNDARY_RE,PARAMETERS_RE,NUMBER_RE)},{begin:regex.concat(PARAMETERS_RE, NUMBER_RE),"on:begin":LETTER_BOUNDARY_CALLBACK}]}];return{name:"G-code (ISO 6983)",aliases:["nc"],case_insensitive:!0,disableAutodetect:!0,keywords:GCODE_KEYWORDS,contains:GCODE_CODE}}return gcode_1=gcode2,gcode_1}var gherkin_1,hasRequiredGherkin;function requireGherkin(){if(hasRequiredGherkin)return gherkin_1;hasRequiredGherkin=1;function gherkin2(hljs){return{name:"Gherkin",aliases:["feature"],keywords:"Feature Background Ability Business Need Scenario Scenarios Scenario Outline Scenario Templ\ ate Examples Given And Then But When",contains:[{className:"symbol",begin:"\\*",relevance:0},{className:"meta",begin:"@[^@\\s]+"},{begin:"\\|",end:"\\|\\w*$",contains:[{className:"string",begin:"[^|]+"}]},{className:"variable",begin:"<",end:">"},hljs.HASH_COMMENT_MODE,{className:"string",begin:'"""',end:'"""'},hljs.QUOTE_STRING_MODE]}}return gherkin_1=gherkin2,gherkin_1}var glsl_1,hasRequiredGlsl;function requireGlsl(){if(hasRequiredGlsl)return glsl_1;hasRequiredGlsl=1;function glsl2(hljs){return{ name:"GLSL",keywords:{keyword:"break continue discard do else for if return while switch case default attribute binding buffer ccw centroid centroid varying coherent column_major const cw depth_any depth_greater depth_less depth_unchanged early_fragment_tests equal_spacing flat fractional_even_spacing fractional_odd_spacing highp in index inout invariant invocations isolines layout line_strip lines lines_adjacency local_size_x local_size_y local_size_z location lowp max_vertices mediump noperspe\ ctive offset origin_upper_left out packed patch pixel_center_integer point_mode points precise precision quads r11f_g11f_b10f r16 r16_snorm r16f r16i r16ui r32f r32i r32ui r8 r8_snorm r8i r8ui readonly restrict rg16 rg16_snorm rg16f rg16i rg16ui rg32f rg32i rg32ui rg8 rg8_snorm rg8i rg8ui rgb10_a2 rgb10_a2ui rgba16 rgba16_snorm rgba16f rgba16i rgba16ui rgba32f rgba32i rgba32ui rgba8 rgba8_snorm rgba8i rgba8ui row_major sample shared smooth std140 std430 stream triangle_strip triangles triangles_\ adjacency uniform varying vertices volatile writeonly",type:"atomic_uint bool bvec2 bvec3 bvec4 dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 double dvec2 dvec3 dvec4 float iimage1D iimage1DArray iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer iimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect image3D imageBuffer imageCube imageCubeArray int isampler1D isampler1\ DArray isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samp\ lerCubeShadow image1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint usampler1D usampler1DArray usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D samplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 vec2 vec3 vec4 void",built_in:"gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers gl_MaxCombin\ edAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxComputeAtomicCounterBuffers gl_MaxComputeAtomicCounters gl_MaxComputeImageUniforms gl_MaxComputeTextureImageUnits gl_MaxComputeUniformComponents gl_MaxComputeWorkGroupCount gl_MaxComputeWorkGroupSize gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentInputVectors gl_MaxF\ ragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset gl_MaxTessControlAtomicCounterBuffers \ gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl\ _MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexOutputVectors gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffset gl_BackColor gl_BackLightModelProduct gl\ _BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_GlobalInvocationID gl_InstanceID gl_InvocationID gl_Layer gl_LightModel gl_LightSource gl_LocalInvocationID gl_LocalInvoc\ ationIndex gl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_NumSamples gl_NumWorkGroups gl_ObjectPlaneQ g\ l_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor gl_TextureMatrix gl_TextureMatrixInverse gl_TextureMatrixInverseTranspose gl_Texture\ MatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_WorkGroupID gl_WorkGroupSize gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin asinh atan atanh atomicAdd atomicAnd atomicCompSwap atomicCounter atomicCounterDecrement atomicCounterIncrement atomicExchange atomicMax atomicMin atomicOr atomicXor barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp\ 2 faceforward findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan greaterThanEqual groupMemoryBarrier imageAtomicAdd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageSize imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memor\ yBarrier memoryBarrierAtomicCounter memoryBarrierBuffer memoryBarrierImage memoryBarrierShared min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1\ DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod textureProjLodOffset textureProjOffset textureQueryLevels textureQueryLod textureSize transpose trunc uaddCarry uintBitsToFloat umulExten\ ded unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow",literal:"true false"},illegal:'"',contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$"}]}}return glsl_1=glsl2,glsl_1}var gml_1,hasRequiredGml;function requireGml(){if(hasRequiredGml)return gml_1;hasRequiredGml=1;function gml2(hljs){return{name:"GML",case_insensitive:!1,keywords:{keyword:["#endregion","#macro","#region","and", "begin","break","case","constructor","continue","default","delete","div","do","else","end","enum","exit","for","function","globalvar","if","mod","new","not","or","repeat","return","static","switch","then","until","var","while","with","xor"],built_in:["abs","alarm_get","alarm_set","angle_difference","animcurve_channel_evaluate","animcurve_channel_new","animcurve_create","animcurve_destroy","animcurve_exists","animcurve_get","animcurve_get_channel","animcurve_get_channel_index","animcurve_point_ne\ w","ansi_char","application_get_position","application_surface_draw_enable","application_surface_enable","application_surface_is_enabled","arccos","arcsin","arctan","arctan2","array_all","array_any","array_concat","array_contains","array_contains_ext","array_copy","array_copy_while","array_create","array_create_ext","array_delete","array_equals","array_filter","array_filter_ext","array_find_index","array_first","array_foreach","array_get","array_get_index","array_insert","array_intersection","ar\ ray_last","array_length","array_map","array_map_ext","array_pop","array_push","array_reduce","array_resize","array_reverse","array_reverse_ext","array_set","array_shuffle","array_shuffle_ext","array_sort","array_union","array_unique","array_unique_ext","asset_add_tags","asset_clear_tags","asset_get_ids","asset_get_index","asset_get_tags","asset_get_type","asset_has_any_tag","asset_has_tags","asset_remove_tags","audio_bus_clear_emitters","audio_bus_create","audio_bus_get_emitters","audio_channel_\ num","audio_create_buffer_sound","audio_create_play_queue","audio_create_stream","audio_create_sync_group","audio_debug","audio_destroy_stream","audio_destroy_sync_group","audio_effect_create","audio_emitter_bus","audio_emitter_create","audio_emitter_exists","audio_emitter_falloff","audio_emitter_free","audio_emitter_gain","audio_emitter_get_bus","audio_emitter_get_gain","audio_emitter_get_listener_mask","audio_emitter_get_pitch","audio_emitter_get_vx","audio_emitter_get_vy","audio_emitter_get_v\ z","audio_emitter_get_x","audio_emitter_get_y","audio_emitter_get_z","audio_emitter_pitch","audio_emitter_position","audio_emitter_set_listener_mask","audio_emitter_velocity","audio_exists","audio_falloff_set_model","audio_free_buffer_sound","audio_free_play_queue","audio_get_listener_count","audio_get_listener_info","audio_get_listener_mask","audio_get_master_gain","audio_get_name","audio_get_recorder_count","audio_get_recorder_info","audio_get_type","audio_group_get_assets","audio_group_get_ga\ in","audio_group_is_loaded","audio_group_load","audio_group_load_progress","audio_group_name","audio_group_set_gain","audio_group_stop_all","audio_group_unload","audio_is_paused","audio_is_playing","audio_listener_get_data","audio_listener_orientation","audio_listener_position","audio_listener_set_orientation","audio_listener_set_position","audio_listener_set_velocity","audio_listener_velocity","audio_master_gain","audio_pause_all","audio_pause_sound","audio_pause_sync_group","audio_play_in_sync\ _group","audio_play_sound","audio_play_sound_at","audio_play_sound_ext","audio_play_sound_on","audio_queue_sound","audio_resume_all","audio_resume_sound","audio_resume_sync_group","audio_set_listener_mask","audio_set_master_gain","audio_sound_gain","audio_sound_get_audio_group","audio_sound_get_gain","audio_sound_get_listener_mask","audio_sound_get_loop","audio_sound_get_loop_end","audio_sound_get_loop_start","audio_sound_get_pitch","audio_sound_get_track_position","audio_sound_is_playable","aud\ io_sound_length","audio_sound_loop","audio_sound_loop_end","audio_sound_loop_start","audio_sound_pitch","audio_sound_set_listener_mask","audio_sound_set_track_position","audio_start_recording","audio_start_sync_group","audio_stop_all","audio_stop_recording","audio_stop_sound","audio_stop_sync_group","audio_sync_group_debug","audio_sync_group_get_track_pos","audio_sync_group_is_paused","audio_sync_group_is_playing","audio_system_is_available","audio_system_is_initialised","base64_decode","base64_\ encode","bool","browser_input_capture","buffer_async_group_begin","buffer_async_group_end","buffer_async_group_option","buffer_base64_decode","buffer_base64_decode_ext","buffer_base64_encode","buffer_compress","buffer_copy","buffer_copy_from_vertex_buffer","buffer_copy_stride","buffer_crc32","buffer_create","buffer_create_from_vertex_buffer","buffer_create_from_vertex_buffer_ext","buffer_decompress","buffer_delete","buffer_exists","buffer_fill","buffer_get_address","buffer_get_alignment","buffer\ _get_size","buffer_get_surface","buffer_get_type","buffer_load","buffer_load_async","buffer_load_ext","buffer_load_partial","buffer_md5","buffer_peek","buffer_poke","buffer_read","buffer_resize","buffer_save","buffer_save_async","buffer_save_ext","buffer_seek","buffer_set_surface","buffer_set_used_size","buffer_sha1","buffer_sizeof","buffer_tell","buffer_write","call_cancel","call_later","camera_apply","camera_copy_transforms","camera_create","camera_create_view","camera_destroy","camera_get_act\ ive","camera_get_begin_script","camera_get_default","camera_get_end_script","camera_get_proj_mat","camera_get_update_script","camera_get_view_angle","camera_get_view_border_x","camera_get_view_border_y","camera_get_view_height","camera_get_view_mat","camera_get_view_speed_x","camera_get_view_speed_y","camera_get_view_target","camera_get_view_width","camera_get_view_x","camera_get_view_y","camera_set_begin_script","camera_set_default","camera_set_end_script","camera_set_proj_mat","camera_set_upda\ te_script","camera_set_view_angle","camera_set_view_border","camera_set_view_mat","camera_set_view_pos","camera_set_view_size","camera_set_view_speed","camera_set_view_target","ceil","choose","chr","clamp","clickable_add","clickable_add_ext","clickable_change","clickable_change_ext","clickable_delete","clickable_exists","clickable_set_style","clipboard_get_text","clipboard_has_text","clipboard_set_text","cloud_file_save","cloud_string_save","cloud_synchronise","code_is_compiled","collision_circl\ e","collision_circle_list","collision_ellipse","collision_ellipse_list","collision_line","collision_line_list","collision_point","collision_point_list","collision_rectangle","collision_rectangle_list","color_get_blue","color_get_green","color_get_hue","color_get_red","color_get_saturation","color_get_value","colour_get_blue","colour_get_green","colour_get_hue","colour_get_red","colour_get_saturation","colour_get_value","cos","darccos","darcsin","darctan","darctan2","date_compare_date","date_comp\ are_datetime","date_compare_time","date_create_datetime","date_current_datetime","date_date_of","date_date_string","date_datetime_string","date_day_span","date_days_in_month","date_days_in_year","date_get_day","date_get_day_of_year","date_get_hour","date_get_hour_of_year","date_get_minute","date_get_minute_of_year","date_get_month","date_get_second","date_get_second_of_year","date_get_timezone","date_get_week","date_get_weekday","date_get_year","date_hour_span","date_inc_day","date_inc_hour","da\ te_inc_minute","date_inc_month","date_inc_second","date_inc_week","date_inc_year","date_is_today","date_leap_year","date_minute_span","date_month_span","date_second_span","date_set_timezone","date_time_of","date_time_string","date_valid_datetime","date_week_span","date_year_span","db_to_lin","dbg_add_font_glyphs","dbg_button","dbg_checkbox","dbg_color","dbg_colour","dbg_drop_down","dbg_same_line","dbg_section","dbg_section_delete","dbg_section_exists","dbg_slider","dbg_slider_int","dbg_sprite","\ dbg_text","dbg_text_input","dbg_view","dbg_view_delete","dbg_view_exists","dbg_watch","dcos","debug_event","debug_get_callstack","degtorad","device_get_tilt_x","device_get_tilt_y","device_get_tilt_z","device_is_keypad_open","device_mouse_check_button","device_mouse_check_button_pressed","device_mouse_check_button_released","device_mouse_dbclick_enable","device_mouse_raw_x","device_mouse_raw_y","device_mouse_x","device_mouse_x_to_gui","device_mouse_y","device_mouse_y_to_gui","directory_create","d\ irectory_destroy","directory_exists","display_get_dpi_x","display_get_dpi_y","display_get_frequency","display_get_gui_height","display_get_gui_width","display_get_height","display_get_orientation","display_get_sleep_margin","display_get_timing_method","display_get_width","display_mouse_get_x","display_mouse_get_y","display_mouse_set","display_reset","display_set_gui_maximise","display_set_gui_maximize","display_set_gui_size","display_set_sleep_margin","display_set_timing_method","display_set_ui_\ visibility","distance_to_object","distance_to_point","dot_product","dot_product_3d","dot_product_3d_normalised","dot_product_3d_normalized","dot_product_normalised","dot_product_normalized","draw_arrow","draw_button","draw_circle","draw_circle_color","draw_circle_colour","draw_clear","draw_clear_alpha","draw_ellipse","draw_ellipse_color","draw_ellipse_colour","draw_enable_drawevent","draw_enable_skeleton_blendmodes","draw_enable_swf_aa","draw_flush","draw_get_alpha","draw_get_color","draw_get_co\ lour","draw_get_enable_skeleton_blendmodes","draw_get_font","draw_get_halign","draw_get_lighting","draw_get_swf_aa_level","draw_get_valign","draw_getpixel","draw_getpixel_ext","draw_healthbar","draw_highscore","draw_light_define_ambient","draw_light_define_direction","draw_light_define_point","draw_light_enable","draw_light_get","draw_light_get_ambient","draw_line","draw_line_color","draw_line_colour","draw_line_width","draw_line_width_color","draw_line_width_colour","draw_path","draw_point","dr\ aw_point_color","draw_point_colour","draw_primitive_begin","draw_primitive_begin_texture","draw_primitive_end","draw_rectangle","draw_rectangle_color","draw_rectangle_colour","draw_roundrect","draw_roundrect_color","draw_roundrect_color_ext","draw_roundrect_colour","draw_roundrect_colour_ext","draw_roundrect_ext","draw_self","draw_set_alpha","draw_set_circle_precision","draw_set_color","draw_set_colour","draw_set_font","draw_set_halign","draw_set_lighting","draw_set_swf_aa_level","draw_set_valig\ n","draw_skeleton","draw_skeleton_collision","draw_skeleton_instance","draw_skeleton_time","draw_sprite","draw_sprite_ext","draw_sprite_general","draw_sprite_part","draw_sprite_part_ext","draw_sprite_pos","draw_sprite_stretched","draw_sprite_stretched_ext","draw_sprite_tiled","draw_sprite_tiled_ext","draw_surface","draw_surface_ext","draw_surface_general","draw_surface_part","draw_surface_part_ext","draw_surface_stretched","draw_surface_stretched_ext","draw_surface_tiled","draw_surface_tiled_ext", "draw_text","draw_text_color","draw_text_colour","draw_text_ext","draw_text_ext_color","draw_text_ext_colour","draw_text_ext_transformed","draw_text_ext_transformed_color","draw_text_ext_transformed_colour","draw_text_transformed","draw_text_transformed_color","draw_text_transformed_colour","draw_texture_flush","draw_tile","draw_tilemap","draw_triangle","draw_triangle_color","draw_triangle_colour","draw_vertex","draw_vertex_color","draw_vertex_colour","draw_vertex_texture","draw_vertex_texture_c\ olor","draw_vertex_texture_colour","ds_exists","ds_grid_add","ds_grid_add_disk","ds_grid_add_grid_region","ds_grid_add_region","ds_grid_clear","ds_grid_copy","ds_grid_create","ds_grid_destroy","ds_grid_get","ds_grid_get_disk_max","ds_grid_get_disk_mean","ds_grid_get_disk_min","ds_grid_get_disk_sum","ds_grid_get_max","ds_grid_get_mean","ds_grid_get_min","ds_grid_get_sum","ds_grid_height","ds_grid_multiply","ds_grid_multiply_disk","ds_grid_multiply_grid_region","ds_grid_multiply_region","ds_grid_r\ ead","ds_grid_resize","ds_grid_set","ds_grid_set_disk","ds_grid_set_grid_region","ds_grid_set_region","ds_grid_shuffle","ds_grid_sort","ds_grid_to_mp_grid","ds_grid_value_disk_exists","ds_grid_value_disk_x","ds_grid_value_disk_y","ds_grid_value_exists","ds_grid_value_x","ds_grid_value_y","ds_grid_width","ds_grid_write","ds_list_add","ds_list_clear","ds_list_copy","ds_list_create","ds_list_delete","ds_list_destroy","ds_list_empty","ds_list_find_index","ds_list_find_value","ds_list_insert","ds_lis\ t_is_list","ds_list_is_map","ds_list_mark_as_list","ds_list_mark_as_map","ds_list_read","ds_list_replace","ds_list_set","ds_list_shuffle","ds_list_size","ds_list_sort","ds_list_write","ds_map_add","ds_map_add_list","ds_map_add_map","ds_map_clear","ds_map_copy","ds_map_create","ds_map_delete","ds_map_destroy","ds_map_empty","ds_map_exists","ds_map_find_first","ds_map_find_last","ds_map_find_next","ds_map_find_previous","ds_map_find_value","ds_map_is_list","ds_map_is_map","ds_map_keys_to_array","d\ s_map_read","ds_map_replace","ds_map_replace_list","ds_map_replace_map","ds_map_secure_load","ds_map_secure_load_buffer","ds_map_secure_save","ds_map_secure_save_buffer","ds_map_set","ds_map_size","ds_map_values_to_array","ds_map_write","ds_priority_add","ds_priority_change_priority","ds_priority_clear","ds_priority_copy","ds_priority_create","ds_priority_delete_max","ds_priority_delete_min","ds_priority_delete_value","ds_priority_destroy","ds_priority_empty","ds_priority_find_max","ds_priority_\ find_min","ds_priority_find_priority","ds_priority_read","ds_priority_size","ds_priority_write","ds_queue_clear","ds_queue_copy","ds_queue_create","ds_queue_dequeue","ds_queue_destroy","ds_queue_empty","ds_queue_enqueue","ds_queue_head","ds_queue_read","ds_queue_size","ds_queue_tail","ds_queue_write","ds_set_precision","ds_stack_clear","ds_stack_copy","ds_stack_create","ds_stack_destroy","ds_stack_empty","ds_stack_pop","ds_stack_push","ds_stack_read","ds_stack_size","ds_stack_top","ds_stack_writ\ e","dsin","dtan","effect_clear","effect_create_above","effect_create_below","effect_create_depth","effect_create_layer","environment_get_variable","event_inherited","event_perform","event_perform_async","event_perform_object","event_user","exception_unhandled_handler","exp","extension_exists","extension_get_option_count","extension_get_option_names","extension_get_option_value","extension_get_options","extension_get_version","external_call","external_define","external_free","file_attributes","fi\ le_bin_close","file_bin_open","file_bin_position","file_bin_read_byte","file_bin_rewrite","file_bin_seek","file_bin_size","file_bin_write_byte","file_copy","file_delete","file_exists","file_find_close","file_find_first","file_find_next","file_rename","file_text_close","file_text_eof","file_text_eoln","file_text_open_append","file_text_open_from_string","file_text_open_read","file_text_open_write","file_text_read_real","file_text_read_string","file_text_readln","file_text_write_real","file_text_w\ rite_string","file_text_writeln","filename_change_ext","filename_dir","filename_drive","filename_ext","filename_name","filename_path","floor","font_add","font_add_enable_aa","font_add_get_enable_aa","font_add_sprite","font_add_sprite_ext","font_cache_glyph","font_delete","font_enable_effects","font_enable_sdf","font_exists","font_get_bold","font_get_first","font_get_fontname","font_get_info","font_get_italic","font_get_last","font_get_name","font_get_sdf_enabled","font_get_sdf_spread","font_get_\ size","font_get_texture","font_get_uvs","font_replace_sprite","font_replace_sprite_ext","font_sdf_spread","font_set_cache_size","frac","fx_create","fx_get_name","fx_get_parameter","fx_get_parameter_names","fx_get_parameters","fx_get_single_layer","fx_set_parameter","fx_set_parameters","fx_set_single_layer","game_change","game_end","game_get_speed","game_load","game_load_buffer","game_restart","game_save","game_save_buffer","game_set_speed","gamepad_axis_count","gamepad_axis_value","gamepad_butto\ n_check","gamepad_button_check_pressed","gamepad_button_check_released","gamepad_button_count","gamepad_button_value","gamepad_get_axis_deadzone","gamepad_get_button_threshold","gamepad_get_description","gamepad_get_device_count","gamepad_get_guid","gamepad_get_mapping","gamepad_get_option","gamepad_hat_count","gamepad_hat_value","gamepad_is_connected","gamepad_is_supported","gamepad_remove_mapping","gamepad_set_axis_deadzone","gamepad_set_button_threshold","gamepad_set_color","gamepad_set_colou\ r","gamepad_set_option","gamepad_set_vibration","gamepad_test_mapping","gc_collect","gc_enable","gc_get_stats","gc_get_target_frame_time","gc_is_enabled","gc_target_frame_time","gesture_double_tap_distance","gesture_double_tap_time","gesture_drag_distance","gesture_drag_time","gesture_flick_speed","gesture_get_double_tap_distance","gesture_get_double_tap_time","gesture_get_drag_distance","gesture_get_drag_time","gesture_get_flick_speed","gesture_get_pinch_angle_away","gesture_get_pinch_angle_tow\ ards","gesture_get_pinch_distance","gesture_get_rotate_angle","gesture_get_rotate_time","gesture_get_tap_count","gesture_pinch_angle_away","gesture_pinch_angle_towards","gesture_pinch_distance","gesture_rotate_angle","gesture_rotate_time","gesture_tap_count","get_integer","get_integer_async","get_login_async","get_open_filename","get_open_filename_ext","get_save_filename","get_save_filename_ext","get_string","get_string_async","get_timer","gif_add_surface","gif_open","gif_save","gif_save_buffer", "gml_pragma","gml_release_mode","gpu_get_alphatestenable","gpu_get_alphatestref","gpu_get_blendenable","gpu_get_blendmode","gpu_get_blendmode_dest","gpu_get_blendmode_destalpha","gpu_get_blendmode_ext","gpu_get_blendmode_ext_sepalpha","gpu_get_blendmode_src","gpu_get_blendmode_srcalpha","gpu_get_colorwriteenable","gpu_get_colourwriteenable","gpu_get_cullmode","gpu_get_depth","gpu_get_fog","gpu_get_state","gpu_get_tex_filter","gpu_get_tex_filter_ext","gpu_get_tex_max_aniso","gpu_get_tex_max_aniso\ _ext","gpu_get_tex_max_mip","gpu_get_tex_max_mip_ext","gpu_get_tex_min_mip","gpu_get_tex_min_mip_ext","gpu_get_tex_mip_bias","gpu_get_tex_mip_bias_ext","gpu_get_tex_mip_enable","gpu_get_tex_mip_enable_ext","gpu_get_tex_mip_filter","gpu_get_tex_mip_filter_ext","gpu_get_tex_repeat","gpu_get_tex_repeat_ext","gpu_get_texfilter","gpu_get_texfilter_ext","gpu_get_texrepeat","gpu_get_texrepeat_ext","gpu_get_zfunc","gpu_get_ztestenable","gpu_get_zwriteenable","gpu_pop_state","gpu_push_state","gpu_set_alp\ hatestenable","gpu_set_alphatestref","gpu_set_blendenable","gpu_set_blendmode","gpu_set_blendmode_ext","gpu_set_blendmode_ext_sepalpha","gpu_set_colorwriteenable","gpu_set_colourwriteenable","gpu_set_cullmode","gpu_set_depth","gpu_set_fog","gpu_set_state","gpu_set_tex_filter","gpu_set_tex_filter_ext","gpu_set_tex_max_aniso","gpu_set_tex_max_aniso_ext","gpu_set_tex_max_mip","gpu_set_tex_max_mip_ext","gpu_set_tex_min_mip","gpu_set_tex_min_mip_ext","gpu_set_tex_mip_bias","gpu_set_tex_mip_bias_ext", "gpu_set_tex_mip_enable","gpu_set_tex_mip_enable_ext","gpu_set_tex_mip_filter","gpu_set_tex_mip_filter_ext","gpu_set_tex_repeat","gpu_set_tex_repeat_ext","gpu_set_texfilter","gpu_set_texfilter_ext","gpu_set_texrepeat","gpu_set_texrepeat_ext","gpu_set_zfunc","gpu_set_ztestenable","gpu_set_zwriteenable","handle_parse","highscore_add","highscore_clear","highscore_name","highscore_value","http_get","http_get_file","http_get_request_crossorigin","http_post_string","http_request","http_set_request_cro\ ssorigin","iap_acquire","iap_activate","iap_consume","iap_enumerate_products","iap_product_details","iap_purchase_details","iap_restore_all","iap_status","ini_close","ini_key_delete","ini_key_exists","ini_open","ini_open_from_string","ini_read_real","ini_read_string","ini_section_delete","ini_section_exists","ini_write_real","ini_write_string","instance_activate_all","instance_activate_layer","instance_activate_object","instance_activate_region","instance_change","instance_copy","instance_create\ _depth","instance_create_layer","instance_deactivate_all","instance_deactivate_layer","instance_deactivate_object","instance_deactivate_region","instance_destroy","instance_exists","instance_find","instance_furthest","instance_id_get","instance_nearest","instance_number","instance_place","instance_place_list","instance_position","instance_position_list","instanceof","int64","io_clear","irandom","irandom_range","is_array","is_bool","is_callable","is_debug_overlay_open","is_handle","is_infinity","\ is_instanceof","is_int32","is_int64","is_keyboard_used_debug_overlay","is_method","is_mouse_over_debug_overlay","is_nan","is_numeric","is_ptr","is_real","is_string","is_struct","is_undefined","json_decode","json_encode","json_parse","json_stringify","keyboard_check","keyboard_check_direct","keyboard_check_pressed","keyboard_check_released","keyboard_clear","keyboard_get_map","keyboard_get_numlock","keyboard_key_press","keyboard_key_release","keyboard_set_map","keyboard_set_numlock","keyboard_uns\ et_map","keyboard_virtual_height","keyboard_virtual_hide","keyboard_virtual_show","keyboard_virtual_status","layer_add_instance","layer_background_alpha","layer_background_blend","layer_background_change","layer_background_create","layer_background_destroy","layer_background_exists","layer_background_get_alpha","layer_background_get_blend","layer_background_get_htiled","layer_background_get_id","layer_background_get_index","layer_background_get_speed","layer_background_get_sprite","layer_backgro\ und_get_stretch","layer_background_get_visible","layer_background_get_vtiled","layer_background_get_xscale","layer_background_get_yscale","layer_background_htiled","layer_background_index","layer_background_speed","layer_background_sprite","layer_background_stretch","layer_background_visible","layer_background_vtiled","layer_background_xscale","layer_background_yscale","layer_clear_fx","layer_create","layer_depth","layer_destroy","layer_destroy_instances","layer_element_move","layer_enable_fx","\ layer_exists","layer_force_draw_depth","layer_fx_is_enabled","layer_get_all","layer_get_all_elements","layer_get_depth","layer_get_element_layer","layer_get_element_type","layer_get_forced_depth","layer_get_fx","layer_get_hspeed","layer_get_id","layer_get_id_at_depth","layer_get_name","layer_get_script_begin","layer_get_script_end","layer_get_shader","layer_get_target_room","layer_get_visible","layer_get_vspeed","layer_get_x","layer_get_y","layer_has_instance","layer_hspeed","layer_instance_get_\ instance","layer_is_draw_depth_forced","layer_reset_target_room","layer_script_begin","layer_script_end","layer_sequence_angle","layer_sequence_create","layer_sequence_destroy","layer_sequence_exists","layer_sequence_get_angle","layer_sequence_get_headdir","layer_sequence_get_headpos","layer_sequence_get_instance","layer_sequence_get_length","layer_sequence_get_sequence","layer_sequence_get_speedscale","layer_sequence_get_x","layer_sequence_get_xscale","layer_sequence_get_y","layer_sequence_get_\ yscale","layer_sequence_headdir","layer_sequence_headpos","layer_sequence_is_finished","layer_sequence_is_paused","layer_sequence_pause","layer_sequence_play","layer_sequence_speedscale","layer_sequence_x","layer_sequence_xscale","layer_sequence_y","layer_sequence_yscale","layer_set_fx","layer_set_target_room","layer_set_visible","layer_shader","layer_sprite_alpha","layer_sprite_angle","layer_sprite_blend","layer_sprite_change","layer_sprite_create","layer_sprite_destroy","layer_sprite_exists","\ layer_sprite_get_alpha","layer_sprite_get_angle","layer_sprite_get_blend","layer_sprite_get_id","layer_sprite_get_index","layer_sprite_get_speed","layer_sprite_get_sprite","layer_sprite_get_x","layer_sprite_get_xscale","layer_sprite_get_y","layer_sprite_get_yscale","layer_sprite_index","layer_sprite_speed","layer_sprite_x","layer_sprite_xscale","layer_sprite_y","layer_sprite_yscale","layer_tile_alpha","layer_tile_blend","layer_tile_change","layer_tile_create","layer_tile_destroy","layer_tile_exi\ sts","layer_tile_get_alpha","layer_tile_get_blend","layer_tile_get_region","layer_tile_get_sprite","layer_tile_get_visible","layer_tile_get_x","layer_tile_get_xscale","layer_tile_get_y","layer_tile_get_yscale","layer_tile_region","layer_tile_visible","layer_tile_x","layer_tile_xscale","layer_tile_y","layer_tile_yscale","layer_tilemap_create","layer_tilemap_destroy","layer_tilemap_exists","layer_tilemap_get_id","layer_vspeed","layer_x","layer_y","lengthdir_x","lengthdir_y","lerp","lin_to_db","ln", "load_csv","log10","log2","logn","make_color_hsv","make_color_rgb","make_colour_hsv","make_colour_rgb","math_get_epsilon","math_set_epsilon","matrix_build","matrix_build_identity","matrix_build_lookat","matrix_build_projection_ortho","matrix_build_projection_perspective","matrix_build_projection_perspective_fov","matrix_get","matrix_multiply","matrix_set","matrix_stack_clear","matrix_stack_is_empty","matrix_stack_pop","matrix_stack_push","matrix_stack_set","matrix_stack_top","matrix_transform_ve\ rtex","max","md5_file","md5_string_unicode","md5_string_utf8","mean","median","merge_color","merge_colour","method","method_call","method_get_index","method_get_self","min","motion_add","motion_set","mouse_check_button","mouse_check_button_pressed","mouse_check_button_released","mouse_clear","mouse_wheel_down","mouse_wheel_up","move_and_collide","move_bounce_all","move_bounce_solid","move_contact_all","move_contact_solid","move_outside_all","move_outside_solid","move_random","move_snap","move_to\ wards_point","move_wrap","mp_grid_add_cell","mp_grid_add_instances","mp_grid_add_rectangle","mp_grid_clear_all","mp_grid_clear_cell","mp_grid_clear_rectangle","mp_grid_create","mp_grid_destroy","mp_grid_draw","mp_grid_get_cell","mp_grid_path","mp_grid_to_ds_grid","mp_linear_path","mp_linear_path_object","mp_linear_step","mp_linear_step_object","mp_potential_path","mp_potential_path_object","mp_potential_settings","mp_potential_step","mp_potential_step_object","nameof","network_connect","network_\ connect_async","network_connect_raw","network_connect_raw_async","network_create_server","network_create_server_raw","network_create_socket","network_create_socket_ext","network_destroy","network_resolve","network_send_broadcast","network_send_packet","network_send_raw","network_send_udp","network_send_udp_raw","network_set_config","network_set_timeout","object_exists","object_get_mask","object_get_name","object_get_parent","object_get_persistent","object_get_physics","object_get_solid","object_\ get_sprite","object_get_visible","object_is_ancestor","object_set_mask","object_set_persistent","object_set_solid","object_set_sprite","object_set_visible","ord","os_check_permission","os_get_config","os_get_info","os_get_language","os_get_region","os_is_network_connected","os_is_paused","os_lock_orientation","os_powersave_enable","os_request_permission","os_set_orientation_lock","parameter_count","parameter_string","part_emitter_burst","part_emitter_clear","part_emitter_create","part_emitter_de\ lay","part_emitter_destroy","part_emitter_destroy_all","part_emitter_enable","part_emitter_exists","part_emitter_interval","part_emitter_region","part_emitter_relative","part_emitter_stream","part_particles_burst","part_particles_clear","part_particles_count","part_particles_create","part_particles_create_color","part_particles_create_colour","part_system_angle","part_system_automatic_draw","part_system_automatic_update","part_system_clear","part_system_color","part_system_colour","part_system_c\ reate","part_system_create_layer","part_system_depth","part_system_destroy","part_system_draw_order","part_system_drawit","part_system_exists","part_system_get_info","part_system_get_layer","part_system_global_space","part_system_layer","part_system_position","part_system_update","part_type_alpha1","part_type_alpha2","part_type_alpha3","part_type_blend","part_type_clear","part_type_color1","part_type_color2","part_type_color3","part_type_color_hsv","part_type_color_mix","part_type_color_rgb","pa\ rt_type_colour1","part_type_colour2","part_type_colour3","part_type_colour_hsv","part_type_colour_mix","part_type_colour_rgb","part_type_create","part_type_death","part_type_destroy","part_type_direction","part_type_exists","part_type_gravity","part_type_life","part_type_orientation","part_type_scale","part_type_shape","part_type_size","part_type_size_x","part_type_size_y","part_type_speed","part_type_sprite","part_type_step","part_type_subimage","particle_exists","particle_get_info","path_add", "path_add_point","path_append","path_assign","path_change_point","path_clear_points","path_delete","path_delete_point","path_duplicate","path_end","path_exists","path_flip","path_get_closed","path_get_kind","path_get_length","path_get_name","path_get_number","path_get_point_speed","path_get_point_x","path_get_point_y","path_get_precision","path_get_speed","path_get_x","path_get_y","path_insert_point","path_mirror","path_rescale","path_reverse","path_rotate","path_set_closed","path_set_kind","pat\ h_set_precision","path_shift","path_start","physics_apply_angular_impulse","physics_apply_force","physics_apply_impulse","physics_apply_local_force","physics_apply_local_impulse","physics_apply_torque","physics_draw_debug","physics_fixture_add_point","physics_fixture_bind","physics_fixture_bind_ext","physics_fixture_create","physics_fixture_delete","physics_fixture_set_angular_damping","physics_fixture_set_awake","physics_fixture_set_box_shape","physics_fixture_set_chain_shape","physics_fixture_\ set_circle_shape","physics_fixture_set_collision_group","physics_fixture_set_density","physics_fixture_set_edge_shape","physics_fixture_set_friction","physics_fixture_set_kinematic","physics_fixture_set_linear_damping","physics_fixture_set_polygon_shape","physics_fixture_set_restitution","physics_fixture_set_sensor","physics_get_density","physics_get_friction","physics_get_restitution","physics_joint_delete","physics_joint_distance_create","physics_joint_enable_motor","physics_joint_friction_cre\ ate","physics_joint_gear_create","physics_joint_get_value","physics_joint_prismatic_create","physics_joint_pulley_create","physics_joint_revolute_create","physics_joint_rope_create","physics_joint_set_value","physics_joint_weld_create","physics_joint_wheel_create","physics_mass_properties","physics_particle_count","physics_particle_create","physics_particle_delete","physics_particle_delete_region_box","physics_particle_delete_region_circle","physics_particle_delete_region_poly","physics_particle\ _draw","physics_particle_draw_ext","physics_particle_get_damping","physics_particle_get_data","physics_particle_get_data_particle","physics_particle_get_density","physics_particle_get_gravity_scale","physics_particle_get_group_flags","physics_particle_get_max_count","physics_particle_get_radius","physics_particle_group_add_point","physics_particle_group_begin","physics_particle_group_box","physics_particle_group_circle","physics_particle_group_count","physics_particle_group_delete","physics_part\ icle_group_end","physics_particle_group_get_ang_vel","physics_particle_group_get_angle","physics_particle_group_get_centre_x","physics_particle_group_get_centre_y","physics_particle_group_get_data","physics_particle_group_get_inertia","physics_particle_group_get_mass","physics_particle_group_get_vel_x","physics_particle_group_get_vel_y","physics_particle_group_get_x","physics_particle_group_get_y","physics_particle_group_join","physics_particle_group_polygon","physics_particle_set_category_flags", "physics_particle_set_damping","physics_particle_set_density","physics_particle_set_flags","physics_particle_set_gravity_scale","physics_particle_set_group_flags","physics_particle_set_max_count","physics_particle_set_radius","physics_pause_enable","physics_remove_fixture","physics_set_density","physics_set_friction","physics_set_restitution","physics_test_overlap","physics_world_create","physics_world_draw_debug","physics_world_gravity","physics_world_update_iterations","physics_world_update_sp\ eed","place_empty","place_free","place_meeting","place_snapped","point_direction","point_distance","point_distance_3d","point_in_circle","point_in_rectangle","point_in_triangle","position_change","position_destroy","position_empty","position_meeting","power","ptr","radtodeg","random","random_get_seed","random_range","random_set_seed","randomise","randomize","real","rectangle_in_circle","rectangle_in_rectangle","rectangle_in_triangle","ref_create","rollback_chat","rollback_create_game","rollback_\ define_extra_network_latency","rollback_define_input","rollback_define_input_frame_delay","rollback_define_mock_input","rollback_define_player","rollback_display_events","rollback_get_info","rollback_get_input","rollback_get_player_prefs","rollback_join_game","rollback_leave_game","rollback_set_player_prefs","rollback_start_game","rollback_sync_on_frame","rollback_use_late_join","rollback_use_manual_start","rollback_use_player_prefs","rollback_use_random_input","room_add","room_assign","room_dup\ licate","room_exists","room_get_camera","room_get_info","room_get_name","room_get_viewport","room_goto","room_goto_next","room_goto_previous","room_instance_add","room_instance_clear","room_next","room_previous","room_restart","room_set_camera","room_set_height","room_set_persistent","room_set_view_enabled","room_set_viewport","room_set_width","round","scheduler_resolution_get","scheduler_resolution_set","screen_save","screen_save_part","script_execute","script_execute_ext","script_exists","scri\ pt_get_name","sequence_create","sequence_destroy","sequence_exists","sequence_get","sequence_get_objects","sequence_instance_override_object","sequence_keyframe_new","sequence_keyframedata_new","sequence_track_new","sha1_file","sha1_string_unicode","sha1_string_utf8","shader_current","shader_enable_corner_id","shader_get_name","shader_get_sampler_index","shader_get_uniform","shader_is_compiled","shader_reset","shader_set","shader_set_uniform_f","shader_set_uniform_f_array","shader_set_uniform_f_\ buffer","shader_set_uniform_i","shader_set_uniform_i_array","shader_set_uniform_matrix","shader_set_uniform_matrix_array","shaders_are_supported","shop_leave_rating","show_debug_message","show_debug_message_ext","show_debug_overlay","show_error","show_message","show_message_async","show_question","show_question_async","sign","sin","skeleton_animation_clear","skeleton_animation_get","skeleton_animation_get_duration","skeleton_animation_get_event_frames","skeleton_animation_get_ext","skeleton_anim\ ation_get_frame","skeleton_animation_get_frames","skeleton_animation_get_position","skeleton_animation_is_finished","skeleton_animation_is_looping","skeleton_animation_list","skeleton_animation_mix","skeleton_animation_set","skeleton_animation_set_ext","skeleton_animation_set_frame","skeleton_animation_set_position","skeleton_attachment_create","skeleton_attachment_create_color","skeleton_attachment_create_colour","skeleton_attachment_destroy","skeleton_attachment_exists","skeleton_attachment_ge\ t","skeleton_attachment_replace","skeleton_attachment_replace_color","skeleton_attachment_replace_colour","skeleton_attachment_set","skeleton_bone_data_get","skeleton_bone_data_set","skeleton_bone_list","skeleton_bone_state_get","skeleton_bone_state_set","skeleton_collision_draw_set","skeleton_find_slot","skeleton_get_bounds","skeleton_get_minmax","skeleton_get_num_bounds","skeleton_skin_create","skeleton_skin_get","skeleton_skin_list","skeleton_skin_set","skeleton_slot_alpha_get","skeleton_slot\ _color_get","skeleton_slot_color_set","skeleton_slot_colour_get","skeleton_slot_colour_set","skeleton_slot_data","skeleton_slot_data_instance","skeleton_slot_list","sprite_add","sprite_add_ext","sprite_add_from_surface","sprite_assign","sprite_collision_mask","sprite_create_from_surface","sprite_delete","sprite_duplicate","sprite_exists","sprite_flush","sprite_flush_multi","sprite_get_bbox_bottom","sprite_get_bbox_left","sprite_get_bbox_mode","sprite_get_bbox_right","sprite_get_bbox_top","sprite\ _get_height","sprite_get_info","sprite_get_name","sprite_get_nineslice","sprite_get_number","sprite_get_speed","sprite_get_speed_type","sprite_get_texture","sprite_get_tpe","sprite_get_uvs","sprite_get_width","sprite_get_xoffset","sprite_get_yoffset","sprite_merge","sprite_nineslice_create","sprite_prefetch","sprite_prefetch_multi","sprite_replace","sprite_save","sprite_save_strip","sprite_set_alpha_from_sprite","sprite_set_bbox","sprite_set_bbox_mode","sprite_set_cache_size","sprite_set_cache_s\ ize_ext","sprite_set_nineslice","sprite_set_offset","sprite_set_speed","sqr","sqrt","static_get","static_set","string","string_byte_at","string_byte_length","string_char_at","string_concat","string_concat_ext","string_copy","string_count","string_delete","string_digits","string_ends_with","string_ext","string_foreach","string_format","string_hash_to_newline","string_height","string_height_ext","string_insert","string_join","string_join_ext","string_last_pos","string_last_pos_ext","string_length", "string_letters","string_lettersdigits","string_lower","string_ord_at","string_pos","string_pos_ext","string_repeat","string_replace","string_replace_all","string_set_byte_at","string_split","string_split_ext","string_starts_with","string_trim","string_trim_end","string_trim_start","string_upper","string_width","string_width_ext","struct_exists","struct_foreach","struct_get","struct_get_from_hash","struct_get_names","struct_names_count","struct_remove","struct_set","struct_set_from_hash","surfac\ e_copy","surface_copy_part","surface_create","surface_create_ext","surface_depth_disable","surface_exists","surface_format_is_supported","surface_free","surface_get_depth_disable","surface_get_format","surface_get_height","surface_get_target","surface_get_target_ext","surface_get_texture","surface_get_width","surface_getpixel","surface_getpixel_ext","surface_reset_target","surface_resize","surface_save","surface_save_part","surface_set_target","surface_set_target_ext","tag_get_asset_ids","tag_ge\ t_assets","tan","texture_debug_messages","texture_flush","texture_get_height","texture_get_texel_height","texture_get_texel_width","texture_get_uvs","texture_get_width","texture_global_scale","texture_is_ready","texture_prefetch","texture_set_stage","texturegroup_get_fonts","texturegroup_get_names","texturegroup_get_sprites","texturegroup_get_status","texturegroup_get_textures","texturegroup_get_tilesets","texturegroup_load","texturegroup_set_mode","texturegroup_unload","tile_get_empty","tile_ge\ t_flip","tile_get_index","tile_get_mirror","tile_get_rotate","tile_set_empty","tile_set_flip","tile_set_index","tile_set_mirror","tile_set_rotate","tilemap_clear","tilemap_get","tilemap_get_at_pixel","tilemap_get_cell_x_at_pixel","tilemap_get_cell_y_at_pixel","tilemap_get_frame","tilemap_get_global_mask","tilemap_get_height","tilemap_get_mask","tilemap_get_tile_height","tilemap_get_tile_width","tilemap_get_tileset","tilemap_get_width","tilemap_get_x","tilemap_get_y","tilemap_set","tilemap_set_at\ _pixel","tilemap_set_global_mask","tilemap_set_height","tilemap_set_mask","tilemap_set_width","tilemap_tileset","tilemap_x","tilemap_y","tileset_get_info","tileset_get_name","tileset_get_texture","tileset_get_uvs","time_bpm_to_seconds","time_seconds_to_bpm","time_source_create","time_source_destroy","time_source_exists","time_source_get_children","time_source_get_parent","time_source_get_period","time_source_get_reps_completed","time_source_get_reps_remaining","time_source_get_state","time_sourc\ e_get_time_remaining","time_source_get_units","time_source_pause","time_source_reconfigure","time_source_reset","time_source_resume","time_source_start","time_source_stop","timeline_add","timeline_clear","timeline_delete","timeline_exists","timeline_get_name","timeline_max_moment","timeline_moment_add_script","timeline_moment_clear","timeline_size","typeof","url_get_domain","url_open","url_open_ext","url_open_full","uwp_device_touchscreen_available","uwp_livetile_badge_clear","uwp_livetile_badge\ _notification","uwp_livetile_notification_begin","uwp_livetile_notification_end","uwp_livetile_notification_expiry","uwp_livetile_notification_image_add","uwp_livetile_notification_secondary_begin","uwp_livetile_notification_tag","uwp_livetile_notification_template_add","uwp_livetile_notification_text_add","uwp_livetile_queue_enable","uwp_livetile_tile_clear","uwp_secondarytile_badge_clear","uwp_secondarytile_badge_notification","uwp_secondarytile_delete","uwp_secondarytile_pin","uwp_secondaryti\ le_tile_clear","variable_clone","variable_get_hash","variable_global_exists","variable_global_get","variable_global_set","variable_instance_exists","variable_instance_get","variable_instance_get_names","variable_instance_names_count","variable_instance_set","variable_struct_exists","variable_struct_get","variable_struct_get_names","variable_struct_names_count","variable_struct_remove","variable_struct_set","vertex_argb","vertex_begin","vertex_color","vertex_colour","vertex_create_buffer","vertex\ _create_buffer_ext","vertex_create_buffer_from_buffer","vertex_create_buffer_from_buffer_ext","vertex_delete_buffer","vertex_end","vertex_float1","vertex_float2","vertex_float3","vertex_float4","vertex_format_add_color","vertex_format_add_colour","vertex_format_add_custom","vertex_format_add_normal","vertex_format_add_position","vertex_format_add_position_3d","vertex_format_add_texcoord","vertex_format_begin","vertex_format_delete","vertex_format_end","vertex_format_get_info","vertex_freeze","ve\ rtex_get_buffer_size","vertex_get_number","vertex_normal","vertex_position","vertex_position_3d","vertex_submit","vertex_submit_ext","vertex_texcoord","vertex_ubyte4","vertex_update_buffer_from_buffer","vertex_update_buffer_from_vertex","video_close","video_draw","video_enable_loop","video_get_duration","video_get_format","video_get_position","video_get_status","video_get_volume","video_is_looping","video_open","video_pause","video_resume","video_seek_to","video_set_volume","view_get_camera","vi\ ew_get_hport","view_get_surface_id","view_get_visible","view_get_wport","view_get_xport","view_get_yport","view_set_camera","view_set_hport","view_set_surface_id","view_set_visible","view_set_wport","view_set_xport","view_set_yport","virtual_key_add","virtual_key_delete","virtual_key_hide","virtual_key_show","wallpaper_set_config","wallpaper_set_subscriptions","weak_ref_alive","weak_ref_any_alive","weak_ref_create","window_center","window_device","window_enable_borderless_fullscreen","window_get\ _borderless_fullscreen","window_get_caption","window_get_color","window_get_colour","window_get_cursor","window_get_fullscreen","window_get_height","window_get_showborder","window_get_visible_rects","window_get_width","window_get_x","window_get_y","window_handle","window_has_focus","window_mouse_get_delta_x","window_mouse_get_delta_y","window_mouse_get_locked","window_mouse_get_x","window_mouse_get_y","window_mouse_set","window_mouse_set_locked","window_set_caption","window_set_color","window_se\ t_colour","window_set_cursor","window_set_fullscreen","window_set_max_height","window_set_max_width","window_set_min_height","window_set_min_width","window_set_position","window_set_rectangle","window_set_showborder","window_set_size","window_view_mouse_get_x","window_view_mouse_get_y","window_views_mouse_get_x","window_views_mouse_get_y","winphone_tile_background_color","winphone_tile_background_colour","zip_add_file","zip_create","zip_save","zip_unzip","zip_unzip_async"],symbol:["AudioEffect", "AudioEffectType","AudioLFOType","GM_build_date","GM_build_type","GM_is_sandboxed","GM_project_filename","GM_runtime_version","GM_version","NaN","_GMFILE_","_GMFUNCTION_","_GMLINE_","alignmentH","alignmentV","all","animcurvetype_bezier","animcurvetype_catmullrom","animcurvetype_linear","asset_animationcurve","asset_font","asset_object","asset_path","asset_room","asset_script","asset_sequence","asset_shader","asset_sound","asset_sprite","asset_tiles","asset_timeline","asset_unknown","audio_3D","a\ udio_bus_main","audio_falloff_exponent_distance","audio_falloff_exponent_distance_clamped","audio_falloff_exponent_distance_scaled","audio_falloff_inverse_distance","audio_falloff_inverse_distance_clamped","audio_falloff_inverse_distance_scaled","audio_falloff_linear_distance","audio_falloff_linear_distance_clamped","audio_falloff_none","audio_mono","audio_stereo","bboxkind_diamond","bboxkind_ellipse","bboxkind_precise","bboxkind_rectangular","bboxmode_automatic","bboxmode_fullimage","bboxmode_m\ anual","bm_add","bm_dest_alpha","bm_dest_color","bm_dest_colour","bm_inv_dest_alpha","bm_inv_dest_color","bm_inv_dest_colour","bm_inv_src_alpha","bm_inv_src_color","bm_inv_src_colour","bm_max","bm_normal","bm_one","bm_src_alpha","bm_src_alpha_sat","bm_src_color","bm_src_colour","bm_subtract","bm_zero","browser_chrome","browser_edge","browser_firefox","browser_ie","browser_ie_mobile","browser_not_a_browser","browser_opera","browser_safari","browser_safari_mobile","browser_tizen","browser_unknown", "browser_windows_store","buffer_bool","buffer_f16","buffer_f32","buffer_f64","buffer_fast","buffer_fixed","buffer_grow","buffer_s16","buffer_s32","buffer_s8","buffer_seek_end","buffer_seek_relative","buffer_seek_start","buffer_string","buffer_text","buffer_u16","buffer_u32","buffer_u64","buffer_u8","buffer_vbuffer","buffer_wrap","c_aqua","c_black","c_blue","c_dkgray","c_dkgrey","c_fuchsia","c_gray","c_green","c_grey","c_lime","c_ltgray","c_ltgrey","c_maroon","c_navy","c_olive","c_orange","c_purp\ le","c_red","c_silver","c_teal","c_white","c_yellow","cache_directory","characterSpacing","cmpfunc_always","cmpfunc_equal","cmpfunc_greater","cmpfunc_greaterequal","cmpfunc_less","cmpfunc_lessequal","cmpfunc_never","cmpfunc_notequal","coreColor","coreColour","cr_appstart","cr_arrow","cr_beam","cr_cross","cr_default","cr_drag","cr_handpoint","cr_hourglass","cr_none","cr_size_all","cr_size_nesw","cr_size_ns","cr_size_nwse","cr_size_we","cr_uparrow","cull_clockwise","cull_counterclockwise","cull_no\ culling","device_emulator","device_ios_ipad","device_ios_ipad_retina","device_ios_iphone","device_ios_iphone5","device_ios_iphone6","device_ios_iphone6plus","device_ios_iphone_retina","device_ios_unknown","device_tablet","display_landscape","display_landscape_flipped","display_portrait","display_portrait_flipped","dll_cdecl","dll_stdcall","dropShadowEnabled","dropShadowEnabled","ds_type_grid","ds_type_list","ds_type_map","ds_type_priority","ds_type_queue","ds_type_stack","ef_cloud","ef_ellipse", "ef_explosion","ef_firework","ef_flare","ef_rain","ef_ring","ef_smoke","ef_smokeup","ef_snow","ef_spark","ef_star","effectsEnabled","effectsEnabled","ev_alarm","ev_animation_end","ev_animation_event","ev_animation_update","ev_async_audio_playback","ev_async_audio_playback_ended","ev_async_audio_recording","ev_async_dialog","ev_async_push_notification","ev_async_save_load","ev_async_save_load","ev_async_social","ev_async_system_event","ev_async_web","ev_async_web_cloud","ev_async_web_iap","ev_asy\ nc_web_image_load","ev_async_web_networking","ev_async_web_steam","ev_audio_playback","ev_audio_playback_ended","ev_audio_recording","ev_boundary","ev_boundary_view0","ev_boundary_view1","ev_boundary_view2","ev_boundary_view3","ev_boundary_view4","ev_boundary_view5","ev_boundary_view6","ev_boundary_view7","ev_broadcast_message","ev_cleanup","ev_collision","ev_create","ev_destroy","ev_dialog_async","ev_draw","ev_draw_begin","ev_draw_end","ev_draw_normal","ev_draw_post","ev_draw_pre","ev_end_of_pa\ th","ev_game_end","ev_game_start","ev_gesture","ev_gesture_double_tap","ev_gesture_drag_end","ev_gesture_drag_start","ev_gesture_dragging","ev_gesture_flick","ev_gesture_pinch_end","ev_gesture_pinch_in","ev_gesture_pinch_out","ev_gesture_pinch_start","ev_gesture_rotate_end","ev_gesture_rotate_start","ev_gesture_rotating","ev_gesture_tap","ev_global_gesture_double_tap","ev_global_gesture_drag_end","ev_global_gesture_drag_start","ev_global_gesture_dragging","ev_global_gesture_flick","ev_global_ges\ ture_pinch_end","ev_global_gesture_pinch_in","ev_global_gesture_pinch_out","ev_global_gesture_pinch_start","ev_global_gesture_rotate_end","ev_global_gesture_rotate_start","ev_global_gesture_rotating","ev_global_gesture_tap","ev_global_left_button","ev_global_left_press","ev_global_left_release","ev_global_middle_button","ev_global_middle_press","ev_global_middle_release","ev_global_right_button","ev_global_right_press","ev_global_right_release","ev_gui","ev_gui_begin","ev_gui_end","ev_joystick1_\ button1","ev_joystick1_button2","ev_joystick1_button3","ev_joystick1_button4","ev_joystick1_button5","ev_joystick1_button6","ev_joystick1_button7","ev_joystick1_button8","ev_joystick1_down","ev_joystick1_left","ev_joystick1_right","ev_joystick1_up","ev_joystick2_button1","ev_joystick2_button2","ev_joystick2_button3","ev_joystick2_button4","ev_joystick2_button5","ev_joystick2_button6","ev_joystick2_button7","ev_joystick2_button8","ev_joystick2_down","ev_joystick2_left","ev_joystick2_right","ev_jo\ ystick2_up","ev_keyboard","ev_keypress","ev_keyrelease","ev_left_button","ev_left_press","ev_left_release","ev_middle_button","ev_middle_press","ev_middle_release","ev_mouse","ev_mouse_enter","ev_mouse_leave","ev_mouse_wheel_down","ev_mouse_wheel_up","ev_no_button","ev_no_more_health","ev_no_more_lives","ev_other","ev_outside","ev_outside_view0","ev_outside_view1","ev_outside_view2","ev_outside_view3","ev_outside_view4","ev_outside_view5","ev_outside_view6","ev_outside_view7","ev_pre_create","ev\ _push_notification","ev_right_button","ev_right_press","ev_right_release","ev_room_end","ev_room_start","ev_social","ev_step","ev_step_begin","ev_step_end","ev_step_normal","ev_system_event","ev_trigger","ev_user0","ev_user1","ev_user10","ev_user11","ev_user12","ev_user13","ev_user14","ev_user15","ev_user2","ev_user3","ev_user4","ev_user5","ev_user6","ev_user7","ev_user8","ev_user9","ev_web_async","ev_web_cloud","ev_web_iap","ev_web_image_load","ev_web_networking","ev_web_sound_load","ev_web_ste\ am","fa_archive","fa_bottom","fa_center","fa_directory","fa_hidden","fa_left","fa_middle","fa_none","fa_readonly","fa_right","fa_sysfile","fa_top","fa_volumeid","false","frameSizeX","frameSizeY","gamespeed_fps","gamespeed_microseconds","global","glowColor","glowColour","glowEnabled","glowEnabled","glowEnd","glowStart","gp_axis_acceleration_x","gp_axis_acceleration_y","gp_axis_acceleration_z","gp_axis_angular_velocity_x","gp_axis_angular_velocity_y","gp_axis_angular_velocity_z","gp_axis_orientati\ on_w","gp_axis_orientation_x","gp_axis_orientation_y","gp_axis_orientation_z","gp_axislh","gp_axislv","gp_axisrh","gp_axisrv","gp_face1","gp_face2","gp_face3","gp_face4","gp_padd","gp_padl","gp_padr","gp_padu","gp_select","gp_shoulderl","gp_shoulderlb","gp_shoulderr","gp_shoulderrb","gp_start","gp_stickl","gp_stickr","iap_available","iap_canceled","iap_ev_consume","iap_ev_product","iap_ev_purchase","iap_ev_restore","iap_ev_storeload","iap_failed","iap_purchased","iap_refunded","iap_status_availa\ ble","iap_status_loading","iap_status_processing","iap_status_restoring","iap_status_unavailable","iap_status_uninitialised","iap_storeload_failed","iap_storeload_ok","iap_unavailable","infinity","kbv_autocapitalize_characters","kbv_autocapitalize_none","kbv_autocapitalize_sentences","kbv_autocapitalize_words","kbv_returnkey_continue","kbv_returnkey_default","kbv_returnkey_done","kbv_returnkey_emergency","kbv_returnkey_go","kbv_returnkey_google","kbv_returnkey_join","kbv_returnkey_next","kbv_ret\ urnkey_route","kbv_returnkey_search","kbv_returnkey_send","kbv_returnkey_yahoo","kbv_type_ascii","kbv_type_default","kbv_type_email","kbv_type_numbers","kbv_type_phone","kbv_type_phone_name","kbv_type_url","layerelementtype_background","layerelementtype_instance","layerelementtype_oldtilemap","layerelementtype_particlesystem","layerelementtype_sequence","layerelementtype_sprite","layerelementtype_tile","layerelementtype_tilemap","layerelementtype_undefined","leaderboard_type_number","leaderboard\ _type_time_mins_secs","lighttype_dir","lighttype_point","lineSpacing","m_axisx","m_axisx_gui","m_axisy","m_axisy_gui","m_scroll_down","m_scroll_up","matrix_projection","matrix_view","matrix_world","mb_any","mb_left","mb_middle","mb_none","mb_right","mb_side1","mb_side2","mip_markedonly","mip_off","mip_on","network_config_avoid_time_wait","network_config_connect_timeout","network_config_disable_multicast","network_config_disable_reliable_udp","network_config_enable_multicast","network_config_enab\ le_reliable_udp","network_config_use_non_blocking_socket","network_config_websocket_protocol","network_connect_active","network_connect_blocking","network_connect_nonblocking","network_connect_none","network_connect_passive","network_send_binary","network_send_text","network_socket_bluetooth","network_socket_tcp","network_socket_udp","network_socket_ws","network_socket_wss","network_type_connect","network_type_data","network_type_disconnect","network_type_down","network_type_non_blocking_connect", "network_type_up","network_type_up_failed","nineslice_blank","nineslice_bottom","nineslice_center","nineslice_centre","nineslice_hide","nineslice_left","nineslice_mirror","nineslice_repeat","nineslice_right","nineslice_stretch","nineslice_top","noone","of_challenge_lose","of_challenge_tie","of_challenge_win","os_android","os_gdk","os_gxgames","os_ios","os_linux","os_macosx","os_operagx","os_permission_denied","os_permission_denied_dont_request","os_permission_granted","os_ps3","os_ps4","os_ps5", "os_psvita","os_switch","os_tvos","os_unknown","os_uwp","os_win8native","os_windows","os_winphone","os_xboxone","os_xboxseriesxs","other","outlineColor","outlineColour","outlineDist","outlineEnabled","outlineEnabled","paragraphSpacing","path_action_continue","path_action_restart","path_action_reverse","path_action_stop","phy_debug_render_aabb","phy_debug_render_collision_pairs","phy_debug_render_coms","phy_debug_render_core_shapes","phy_debug_render_joints","phy_debug_render_obb","phy_debug_rend\ er_shapes","phy_joint_anchor_1_x","phy_joint_anchor_1_y","phy_joint_anchor_2_x","phy_joint_anchor_2_y","phy_joint_angle","phy_joint_angle_limits","phy_joint_damping_ratio","phy_joint_frequency","phy_joint_length_1","phy_joint_length_2","phy_joint_lower_angle_limit","phy_joint_max_force","phy_joint_max_length","phy_joint_max_motor_force","phy_joint_max_motor_torque","phy_joint_max_torque","phy_joint_motor_force","phy_joint_motor_speed","phy_joint_motor_torque","phy_joint_reaction_force_x","phy_jo\ int_reaction_force_y","phy_joint_reaction_torque","phy_joint_speed","phy_joint_translation","phy_joint_upper_angle_limit","phy_particle_data_flag_category","phy_particle_data_flag_color","phy_particle_data_flag_colour","phy_particle_data_flag_position","phy_particle_data_flag_typeflags","phy_particle_data_flag_velocity","phy_particle_flag_colormixing","phy_particle_flag_colourmixing","phy_particle_flag_elastic","phy_particle_flag_powder","phy_particle_flag_spring","phy_particle_flag_tensile","ph\ y_particle_flag_viscous","phy_particle_flag_wall","phy_particle_flag_water","phy_particle_flag_zombie","phy_particle_group_flag_rigid","phy_particle_group_flag_solid","pi","pointer_invalid","pointer_null","pr_linelist","pr_linestrip","pr_pointlist","pr_trianglefan","pr_trianglelist","pr_trianglestrip","ps_distr_gaussian","ps_distr_invgaussian","ps_distr_linear","ps_mode_burst","ps_mode_stream","ps_shape_diamond","ps_shape_ellipse","ps_shape_line","ps_shape_rectangle","pt_shape_circle","pt_shape_\ cloud","pt_shape_disk","pt_shape_explosion","pt_shape_flare","pt_shape_line","pt_shape_pixel","pt_shape_ring","pt_shape_smoke","pt_shape_snow","pt_shape_spark","pt_shape_sphere","pt_shape_square","pt_shape_star","rollback_chat_message","rollback_connect_error","rollback_connect_info","rollback_connected_to_peer","rollback_connection_rejected","rollback_disconnected_from_peer","rollback_end_game","rollback_game_full","rollback_game_info","rollback_game_interrupted","rollback_game_resumed","rollba\ ck_high_latency","rollback_player_prefs","rollback_protocol_rejected","rollback_synchronized_with_peer","rollback_synchronizing_with_peer","self","seqaudiokey_loop","seqaudiokey_oneshot","seqdir_left","seqdir_right","seqinterpolation_assign","seqinterpolation_lerp","seqplay_loop","seqplay_oneshot","seqplay_pingpong","seqtextkey_bottom","seqtextkey_center","seqtextkey_justify","seqtextkey_left","seqtextkey_middle","seqtextkey_right","seqtextkey_top","seqtracktype_audio","seqtracktype_bool","seqtr\ acktype_clipmask","seqtracktype_clipmask_mask","seqtracktype_clipmask_subject","seqtracktype_color","seqtracktype_colour","seqtracktype_empty","seqtracktype_graphic","seqtracktype_group","seqtracktype_instance","seqtracktype_message","seqtracktype_moment","seqtracktype_particlesystem","seqtracktype_real","seqtracktype_sequence","seqtracktype_spriteframes","seqtracktype_string","seqtracktype_text","shadowColor","shadowColour","shadowOffsetX","shadowOffsetY","shadowSoftness","sprite_add_ext_error_\ cancelled","sprite_add_ext_error_decompressfailed","sprite_add_ext_error_loadfailed","sprite_add_ext_error_setupfailed","sprite_add_ext_error_spritenotfound","sprite_add_ext_error_unknown","spritespeed_framespergameframe","spritespeed_framespersecond","surface_r16float","surface_r32float","surface_r8unorm","surface_rg8unorm","surface_rgba16float","surface_rgba32float","surface_rgba4unorm","surface_rgba8unorm","texturegroup_status_fetched","texturegroup_status_loaded","texturegroup_status_loading", "texturegroup_status_unloaded","tf_anisotropic","tf_linear","tf_point","thickness","tile_flip","tile_index_mask","tile_mirror","tile_rotate","time_source_expire_after","time_source_expire_nearest","time_source_game","time_source_global","time_source_state_active","time_source_state_initial","time_source_state_paused","time_source_state_stopped","time_source_units_frames","time_source_units_seconds","timezone_local","timezone_utc","tm_countvsyncs","tm_sleep","tm_systemtiming","true","ty_real","ty\ _string","undefined","vertex_type_color","vertex_type_colour","vertex_type_float1","vertex_type_float2","vertex_type_float3","vertex_type_float4","vertex_type_ubyte4","vertex_usage_binormal","vertex_usage_blendindices","vertex_usage_blendweight","vertex_usage_color","vertex_usage_colour","vertex_usage_depth","vertex_usage_fog","vertex_usage_normal","vertex_usage_position","vertex_usage_psize","vertex_usage_sample","vertex_usage_tangent","vertex_usage_texcoord","video_format_rgba","video_format_y\ uv","video_status_closed","video_status_paused","video_status_playing","video_status_preparing","vk_add","vk_alt","vk_anykey","vk_backspace","vk_control","vk_decimal","vk_delete","vk_divide","vk_down","vk_end","vk_enter","vk_escape","vk_f1","vk_f10","vk_f11","vk_f12","vk_f2","vk_f3","vk_f4","vk_f5","vk_f6","vk_f7","vk_f8","vk_f9","vk_home","vk_insert","vk_lalt","vk_lcontrol","vk_left","vk_lshift","vk_multiply","vk_nokey","vk_numpad0","vk_numpad1","vk_numpad2","vk_numpad3","vk_numpad4","vk_numpad\ 5","vk_numpad6","vk_numpad7","vk_numpad8","vk_numpad9","vk_pagedown","vk_pageup","vk_pause","vk_printscreen","vk_ralt","vk_rcontrol","vk_return","vk_right","vk_rshift","vk_shift","vk_space","vk_subtract","vk_tab","vk_up","wallpaper_config","wallpaper_subscription_data","wrap"],"variable.language":["alarm","application_surface","argument","argument0","argument1","argument2","argument3","argument4","argument5","argument6","argument7","argument8","argument9","argument10","argument11","argument12","\ argument13","argument14","argument15","argument_count","async_load","background_color","background_colour","background_showcolor","background_showcolour","bbox_bottom","bbox_left","bbox_right","bbox_top","browser_height","browser_width","colour?ColourTrack","current_day","current_hour","current_minute","current_month","current_second","current_time","current_weekday","current_year","cursor_sprite","debug_mode","delta_time","depth","direction","display_aa","drawn_by_sequence","event_action","even\ t_data","event_number","event_object","event_type","font_texture_page_size","fps","fps_real","friction","game_display_name","game_id","game_project_name","game_save_id","gravity","gravity_direction","health","hspeed","iap_data","id","image_alpha","image_angle","image_blend","image_index","image_number","image_speed","image_xscale","image_yscale","in_collision_tree","in_sequence","instance_count","instance_id","keyboard_key","keyboard_lastchar","keyboard_lastkey","keyboard_string","layer","lives", "longMessage","managed","mask_index","message","mouse_button","mouse_lastbutton","mouse_x","mouse_y","object_index","os_browser","os_device","os_type","os_version","path_endaction","path_index","path_orientation","path_position","path_positionprevious","path_scale","path_speed","persistent","phy_active","phy_angular_damping","phy_angular_velocity","phy_bullet","phy_col_normal_x","phy_col_normal_y","phy_collision_points","phy_collision_x","phy_collision_y","phy_com_x","phy_com_y","phy_dynamic","p\ hy_fixed_rotation","phy_inertia","phy_kinematic","phy_linear_damping","phy_linear_velocity_x","phy_linear_velocity_y","phy_mass","phy_position_x","phy_position_xprevious","phy_position_y","phy_position_yprevious","phy_rotation","phy_sleeping","phy_speed","phy_speed_x","phy_speed_y","player_avatar_sprite","player_avatar_url","player_id","player_local","player_type","player_user_id","program_directory","rollback_api_server","rollback_confirmed_frame","rollback_current_frame","rollback_event_id","r\ ollback_event_param","rollback_game_running","room","room_first","room_height","room_last","room_persistent","room_speed","room_width","score","script","sequence_instance","solid","speed","sprite_height","sprite_index","sprite_width","sprite_xoffset","sprite_yoffset","stacktrace","temp_directory","timeline_index","timeline_loop","timeline_position","timeline_running","timeline_speed","view_camera","view_current","view_enabled","view_hport","view_surface_id","view_visible","view_wport","view_xpor\ t","view_yport","visible","vspeed","webgl_enabled","working_directory","x","xprevious","xstart","y","yprevious","ystart"]},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE]}}return gml_1=gml2,gml_1}var go_1,hasRequiredGo;function requireGo(){if(hasRequiredGo)return go_1;hasRequiredGo=1;function go2(hljs){const KEYWORDS2={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func", "go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:KEYWORDS2, illegal:"",end:",\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:":\\w+"},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{begin:"\ \\w+",relevance:0}]}]},{begin:"\\(\\s*",end:"\\s*\\)",excludeEnd:!0,contains:[{begin:"\\w+\\s*=",end:"\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:"\\w+",relevance:0},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]}]},{begin:"^\\s*[=~]\\s*"},{begin:/#\{/,end:/\}/,subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}return haml_1=haml2,haml_1}var handlebars_1,hasRequiredHandlebars;function requireHandlebars(){if(hasRequiredHandlebars)return handlebars_1; hasRequiredHandlebars=1;function handlebars2(hljs){const regex=hljs.regex,BUILT_INS2={$pattern:/[\w.\/]+/,built_in:["action","bindattr","collection","component","concat","debugger","each","each-in","get","hash","if","in","input","link-to","loc","log","lookup","mut","outlet","partial","query-params","render","template","textarea","unbound","unless","view","with","yield"]},LITERALS2={$pattern:/[\w.\/]+/,literal:["true","false","undefined","null"]},DOUBLE_QUOTED_ID_REGEX=/""|"[^"]+"/,SINGLE_QUOTED_ID_REGEX=/''|'[^']+'/, BRACKET_QUOTED_ID_REGEX=/\[\]|\[[^\]]+\]/,PLAIN_ID_REGEX=/[^\s!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/,PATH_DELIMITER_REGEX=/(\.|\/)/,ANY_ID=regex.either(DOUBLE_QUOTED_ID_REGEX,SINGLE_QUOTED_ID_REGEX,BRACKET_QUOTED_ID_REGEX,PLAIN_ID_REGEX),IDENTIFIER_REGEX=regex.concat(regex.optional(/\.|\.\/|\//),ANY_ID,regex.anyNumberOfTimes(regex.concat(PATH_DELIMITER_REGEX,ANY_ID))),HASH_PARAM_REGEX=regex.concat("(",BRACKET_QUOTED_ID_REGEX,"|",PLAIN_ID_REGEX,")(?==)"),HELPER_NAME_OR_PATH_EXPRESSION={begin:IDENTIFIER_REGEX}, HELPER_PARAMETER=hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION,{keywords:LITERALS2}),SUB_EXPRESSION={begin:/\(/,end:/\)/},HASH={className:"attr",begin:HASH_PARAM_REGEX,relevance:0,starts:{begin:/=/,end:/=/,starts:{contains:[hljs.NUMBER_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,HELPER_PARAMETER,SUB_EXPRESSION]}}},BLOCK_PARAMS={begin:/as\s+\|/,keywords:{keyword:"as"},end:/\|/,contains:[{begin:/\w+/}]},HELPER_PARAMETERS={contains:[hljs.NUMBER_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE, BLOCK_PARAMS,HASH,HELPER_PARAMETER,SUB_EXPRESSION],returnEnd:!0},SUB_EXPRESSION_CONTENTS=hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION,{className:"name",keywords:BUILT_INS2,starts:hljs.inherit(HELPER_PARAMETERS,{end:/\)/})});SUB_EXPRESSION.contains=[SUB_EXPRESSION_CONTENTS];const OPENING_BLOCK_MUSTACHE_CONTENTS=hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION,{keywords:BUILT_INS2,className:"name",starts:hljs.inherit(HELPER_PARAMETERS,{end:/\}\}/})}),CLOSING_BLOCK_MUSTACHE_CONTENTS=hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, {keywords:BUILT_INS2,className:"name"}),BASIC_MUSTACHE_CONTENTS=hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION,{className:"name",keywords:BUILT_INS2,starts:hljs.inherit(HELPER_PARAMETERS,{end:/\}\}/})});return{name:"Handlebars",aliases:["hbs","html.hbs","html.handlebars","htmlbars"],case_insensitive:!0,subLanguage:"xml",contains:[{begin:/\\\{\{/,skip:!0},{begin:/\\\\(?=\{\{)/,skip:!0},hljs.COMMENT(/\{\{!--/,/--\}\}/),hljs.COMMENT(/\{\{!/,/\}\}/),{className:"template-tag",begin:/\{\{\{\{(?!\/)/,end:/\}\}\}\}/, contains:[OPENING_BLOCK_MUSTACHE_CONTENTS],starts:{end:/\{\{\{\{\//,returnEnd:!0,subLanguage:"xml"}},{className:"template-tag",begin:/\{\{\{\{\//,end:/\}\}\}\}/,contains:[CLOSING_BLOCK_MUSTACHE_CONTENTS]},{className:"template-tag",begin:/\{\{#/,end:/\}\}/,contains:[OPENING_BLOCK_MUSTACHE_CONTENTS]},{className:"template-tag",begin:/\{\{(?=else\}\})/,end:/\}\}/,keywords:"else"},{className:"template-tag",begin:/\{\{(?=else if)/,end:/\}\}/,keywords:"else if"},{className:"template-tag",begin:/\{\{\//, end:/\}\}/,contains:[CLOSING_BLOCK_MUSTACHE_CONTENTS]},{className:"template-variable",begin:/\{\{\{/,end:/\}\}\}/,contains:[BASIC_MUSTACHE_CONTENTS]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:[BASIC_MUSTACHE_CONTENTS]}]}}return handlebars_1=handlebars2,handlebars_1}var haskell_1,hasRequiredHaskell;function requireHaskell(){if(hasRequiredHaskell)return haskell_1;hasRequiredHaskell=1;function haskell2(hljs){const decimalDigits2="([0-9]_*)+",hexDigits2="([0-9a-fA-F]_*)+",binaryDigits="\ ([01]_*)+",octalDigits="([0-7]_*)+",symbol="([!#$%&*+.\\/<=>?@\\\\^~-]|(?!([(),;\\[\\]`|{}]|[_:\"']))(\\p{S}|\\p{P}))",COMMENT={variants:[hljs.COMMENT("--+","$"),hljs.COMMENT(/\{-/,/-\}/,{contains:["self"]})]},PRAGMA={className:"meta",begin:/\{-#/,end:/#-\}/},PREPROCESSOR={className:"meta",begin:"^#",end:"$"},CONSTRUCTOR={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},LIST={begin:"\\(",end:"\\)",illegal:'"',contains:[PRAGMA,PREPROCESSOR,{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\ \\))?"},hljs.inherit(hljs.TITLE_MODE,{begin:"[_a-z][\\w']*"}),COMMENT]},RECORD={begin:/\{/,end:/\}/,contains:LIST.contains},NUMBER={className:"number",relevance:0,variants:[{match:`\\b(${decimalDigits2})(\\.(${decimalDigits2}))?([eE][+-]?(${decimalDigits2}))?\\b`},{match:`\\b0[xX]_*(${hexDigits2})(\\.(${hexDigits2}))?([pP][+-]?(${decimalDigits2}))?\\b`},{match:`\\b0[oO](${octalDigits})\\b`},{match:`\\b0[bB](${binaryDigits})\\b`}]};return{name:"Haskell",aliases:["hs"],keywords:"let in if then els\ e case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",unicodeRegex:!0,contains:[{beginKeywords:"module",end:"where",keywords:"module where",contains:[LIST,COMMENT],illegal:"\\W\\.|;"},{begin:"\\bimport\\b",end:"$",keywords:"import qualified as hiding",contains:[LIST,COMMENT],illegal:"\\W\\.|;"},{className:"class",begin:"^(\\s*)?(class|insta\ nce)\\b",end:"where",keywords:"class family instance where",contains:[CONSTRUCTOR,LIST,COMMENT]},{className:"class",begin:"\\b(data|(new)?type)\\b",end:"$",keywords:"data family type newtype deriving",contains:[PRAGMA,CONSTRUCTOR,LIST,RECORD,COMMENT]},{beginKeywords:"default",end:"$",contains:[CONSTRUCTOR,LIST,COMMENT]},{beginKeywords:"infix infixl infixr",end:"$",contains:[hljs.C_NUMBER_MODE,COMMENT]},{begin:"\\bforeign\\b",end:"$",keywords:"foreign import export ccall stdcall cplusplus jvm dot\ net safe unsafe",contains:[CONSTRUCTOR,hljs.QUOTE_STRING_MODE,COMMENT]},{className:"meta",begin:"#!\\/usr\\/bin\\/env runhaskell",end:"$"},PRAGMA,PREPROCESSOR,{scope:"string",begin:/'(?=\\?.')/,end:/'/,contains:[{scope:"char.escape",match:/\\./}]},hljs.QUOTE_STRING_MODE,NUMBER,CONSTRUCTOR,hljs.inherit(hljs.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),{begin:`(?!-)${symbol}--+|--+(?!-)${symbol}`},COMMENT,{begin:"->|<-"}]}}return haskell_1=haskell2,haskell_1}var haxe_1,hasRequiredHaxe;function requireHaxe(){ if(hasRequiredHaxe)return haxe_1;hasRequiredHaxe=1;function haxe2(hljs){const IDENT_RE2="[a-zA-Z_$][a-zA-Z0-9_$]*",HAXE_NUMBER_RE=/(-?)(\b0[xX][a-fA-F0-9_]+|(\b\d+(\.[\d_]*)?|\.[\d_]+)(([eE][-+]?\d+)|i32|u32|i64|f64)?)/;return{name:"Haxe",aliases:["hx"],keywords:{keyword:"abstract break case cast catch continue default do dynamic else enum extern final for function here if import in inline is macro never new override package private get set public return static super switch this throw trace try \ typedef untyped using var while "+"Int Float String Bool Dynamic Void Array ",built_in:"trace this",literal:"true false null _"},contains:[{className:"string",begin:"'",end:"'",contains:[hljs.BACKSLASH_ESCAPE,{className:"subst",begin:/\$\{/,end:/\}/},{className:"subst",begin:/\$/,end:/\W\}/}]},hljs.QUOTE_STRING_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"number",begin:HAXE_NUMBER_RE,relevance:0},{className:"variable",begin:"\\$"+IDENT_RE2},{className:"meta",begin:/@:?/,end:/\(|$/, excludeEnd:!0},{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elseif end error"}},{className:"type",begin:/:[ \t]*/,end:/[^A-Za-z0-9_ \t\->]/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/:[ \t]*/,end:/\W/,excludeBegin:!0,excludeEnd:!0},{className:"type",beginKeywords:"new",end:/\W/,excludeBegin:!0,excludeEnd:!0},{className:"title.class",beginKeywords:"enum",end:/\{/,contains:[hljs.TITLE_MODE]},{className:"title.class",begin:"\\babstract\\b(?=\\s*"+hljs.IDENT_RE+ "\\s*\\()",end:/[\{$]/,contains:[{className:"type",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0},{className:"type",begin:/from +/,end:/\W/,excludeBegin:!0,excludeEnd:!0},{className:"type",begin:/to +/,end:/\W/,excludeBegin:!0,excludeEnd:!0},hljs.TITLE_MODE],keywords:{keyword:"abstract from to"}},{className:"title.class",begin:/\b(class|interface) +/,end:/[\{$]/,excludeEnd:!0,keywords:"class interface",contains:[{className:"keyword",begin:/\b(extends|implements) +/,keywords:"extends implemen\ ts",contains:[{className:"type",begin:hljs.IDENT_RE,relevance:0}]},hljs.TITLE_MODE]},{className:"title.function",beginKeywords:"function",end:/\(/,excludeEnd:!0,illegal:/\S/,contains:[hljs.TITLE_MODE]}],illegal:/<\//}}return haxe_1=haxe2,haxe_1}var hsp_1,hasRequiredHsp;function requireHsp(){if(hasRequiredHsp)return hsp_1;hasRequiredHsp=1;function hsp2(hljs){return{name:"HSP",case_insensitive:!0,keywords:{$pattern:/[\w._]+/,keyword:"goto gosub return break repeat loop continue wait await dim sdim\ foreach dimtype dup dupptr end stop newmod delmod mref run exgoto on mcall assert logmes newlab resume yield onexit onerror onkey onclick oncmd exist delete mkdir chdir dirlist bload bsave bcopy memfile if else poke wpoke lpoke getstr chdpm memexpand memcpy memset notesel noteadd notedel noteload notesave randomize noteunsel noteget split strrep setease button chgdisp exec dialog mmload mmplay mmstop mci pset pget syscolor mes print title pos circle cls font sysfont objsize picload color palcol\ or palette redraw width gsel gcopy gzoom gmode bmpsave hsvcolor getkey listbox chkbox combox input mesbox buffer screen bgscr mouse objsel groll line clrobj boxf objprm objmode stick grect grotate gsquare gradf objimage objskip objenable celload celdiv celput newcom querycom delcom cnvstow comres axobj winobj sendmsg comevent comevarg sarrayconv callfunc cnvwtos comevdisp libptr system hspstat hspver stat cnt err strsize looplev sublev iparam wparam lparam refstr refdval int rnd strlen length le\ ngth2 length3 length4 vartype gettime peek wpeek lpeek varptr varuse noteinfo instr abs limit getease str strmid strf getpath strtrim sin cos tan atan sqrt double absf expf logf limitf powf geteasef mousex mousey mousew hwnd hinstance hdc ginfo objinfo dirinfo sysinfo thismod __hspver__ __hsp30__ __date__ __time__ __line__ __file__ _debug __hspdef__ and or xor not screen_normal screen_palette screen_hide screen_fixedsize screen_tool screen_frame gmode_gdi gmode_mem gmode_rgb0 gmode_alpha gmode_r\ gb0alpha gmode_add gmode_sub gmode_pixela ginfo_mx ginfo_my ginfo_act ginfo_sel ginfo_wx1 ginfo_wy1 ginfo_wx2 ginfo_wy2 ginfo_vx ginfo_vy ginfo_sizex ginfo_sizey ginfo_winx ginfo_winy ginfo_mesx ginfo_mesy ginfo_r ginfo_g ginfo_b ginfo_paluse ginfo_dispx ginfo_dispy ginfo_cx ginfo_cy ginfo_intid ginfo_newid ginfo_sx ginfo_sy objinfo_mode objinfo_bmscr objinfo_hwnd notemax notesize dir_cur dir_exe dir_win dir_sys dir_cmdline dir_desktop dir_mydoc dir_tv font_normal font_bold font_italic font_unde\ rline font_strikeout font_antialias objmode_normal objmode_guifont objmode_usefont gsquare_grad msgothic msmincho do until while wend for next _break _continue switch case default swbreak swend ddim ldim alloc m_pi rad2deg deg2rad ease_linear ease_quad_in ease_quad_out ease_quad_inout ease_cubic_in ease_cubic_out ease_cubic_inout ease_quartic_in ease_quartic_out ease_quartic_inout ease_bounce_in ease_bounce_out ease_bounce_inout ease_shake_in ease_shake_out ease_shake_inout ease_loop"},contains:[ hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,{className:"string",begin:/\{"/,end:/"\}/,contains:[hljs.BACKSLASH_ESCAPE]},hljs.COMMENT(";","$",{relevance:0}),{className:"meta",begin:"#",end:"$",keywords:{keyword:"addion cfunc cmd cmpopt comfunc const defcfunc deffunc define else endif enum epack func global if ifdef ifndef include modcfunc modfunc modinit modterm module pack packopt regcmd runtime undef usecom uselib"},contains:[hljs.inherit(hljs. QUOTE_STRING_MODE,{className:"string"}),hljs.NUMBER_MODE,hljs.C_NUMBER_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{className:"symbol",begin:"^\\*(\\w+|@)"},hljs.NUMBER_MODE,hljs.C_NUMBER_MODE]}}return hsp_1=hsp2,hsp_1}var http_1,hasRequiredHttp;function requireHttp(){if(hasRequiredHttp)return http_1;hasRequiredHttp=1;function http2(hljs){const regex=hljs.regex,VERSION="HTTP/([32]|1\\.[01])",HEADER_NAME=/[A-Za-z][A-Za-z0-9-]*/,HEADER={className:"attribute",begin:regex.concat("^",HEADER_NAME, "(?=\\:\\s)"),starts:{contains:[{className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]}},HEADERS_AND_BODY=[HEADER,{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+VERSION+" \\d{3})",end:/$/,contains:[{className:"meta",begin:VERSION},{className:"number",begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:HEADERS_AND_BODY}},{begin:"(?=^[A-Z]+ (.*?) "+VERSION+"$)",end:/$/,contains:[ {className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:VERSION},{className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:HEADERS_AND_BODY}},hljs.inherit(HEADER,{relevance:0})]}}return http_1=http2,http_1}var hy_1,hasRequiredHy;function requireHy(){if(hasRequiredHy)return hy_1;hasRequiredHy=1;function hy2(hljs){const SYMBOLSTART="a-zA-Z_\\-!.?+*=<>&#'",SYMBOL_RE="["+SYMBOLSTART+"]["+SYMBOLSTART+"0-9/;:]*",keywords2={$pattern:SYMBOL_RE,built_in:"\ != % %= & &= * ** **= *= *map + += , --build-class-- --import-- -= . / // //= /= < << <<= <= = > >= >> >>= @ @= ^ ^= abs accumulate all and any ap-compose ap-dotimes ap-each ap-each-while ap-filter ap-first ap-if ap-last ap-map ap-map-when ap-pipe ap-reduce ap-reject apply as-> ascii assert assoc bin break butlast callable calling-module-name car case cdr chain chr coll? combinations compile compress cond cons cons? continue count curry cut cycle dec def default-method defclass defmacro defmacro\ -alias defmacro/g! defmain defmethod defmulti defn defn-alias defnc defnr defreader defseq del delattr delete-route dict-comp dir disassemble dispatch-reader-macro distinct divmod do doto drop drop-last drop-while empty? end-sequence eval eval-and-compile eval-when-compile even? every? except exec filter first flatten float? fn fnc fnr for for* format fraction genexpr gensym get getattr global globals group-by hasattr hash hex id identity if if* if-not if-python2 import in inc input instance? in\ teger integer-char? integer? interleave interpose is is-coll is-cons is-empty is-even is-every is-float is-instance is-integer is-integer-char is-iterable is-iterator is-keyword is-neg is-none is-not is-numeric is-odd is-pos is-string is-symbol is-zero isinstance islice issubclass iter iterable? iterate iterator? keyword keyword? lambda last len let lif lif-not list* list-comp locals loop macro-error macroexpand macroexpand-1 macroexpand-all map max merge-with method-decorator min multi-decorato\ r multicombinations name neg? next none? nonlocal not not-in not? nth numeric? oct odd? open or ord partition permutations pos? post-route postwalk pow prewalk print product profile/calls profile/cpu put-route quasiquote quote raise range read read-str recursive-replace reduce remove repeat repeatedly repr require rest round route route-with-methods rwm second seq set-comp setattr setv some sorted string string? sum switch symbol? take take-nth take-while tee try unless unquote unquote-splicing \ vars walk when while with with* with-decorator with-gensyms xi xor yield yield-from zero? zip zip-longest | |= ~"},SIMPLE_NUMBER_RE="[-+]?\\d+(\\.\\d+)?",SYMBOL={begin:SYMBOL_RE,relevance:0},NUMBER={className:"number",begin:SIMPLE_NUMBER_RE,relevance:0},STRING=hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),COMMENT=hljs.COMMENT(";","$",{relevance:0}),LITERAL={className:"literal",begin:/\b([Tt]rue|[Ff]alse|nil|None)\b/},COLLECTION={begin:"[\\[\\{]",end:"[\\]\\}]",relevance:0},HINT={className:"\ comment",begin:"\\^"+SYMBOL_RE},HINT_COL=hljs.COMMENT("\\^\\{","\\}"),KEY={className:"symbol",begin:"[:]{1,2}"+SYMBOL_RE},LIST={begin:"\\(",end:"\\)"},BODY={endsWithParent:!0,relevance:0},NAME={className:"name",relevance:0,keywords:keywords2,begin:SYMBOL_RE,starts:BODY},DEFAULT_CONTAINS=[LIST,STRING,HINT,HINT_COL,COMMENT,KEY,COLLECTION,NUMBER,LITERAL,SYMBOL];return LIST.contains=[hljs.COMMENT("comment",""),NAME,BODY],BODY.contains=DEFAULT_CONTAINS,COLLECTION.contains=DEFAULT_CONTAINS,{name:"Hy", aliases:["hylang"],illegal:/\S/,contains:[hljs.SHEBANG(),LIST,STRING,HINT,HINT_COL,COMMENT,KEY,COLLECTION,NUMBER,LITERAL]}}return hy_1=hy2,hy_1}var inform7_1,hasRequiredInform7;function requireInform7(){if(hasRequiredInform7)return inform7_1;hasRequiredInform7=1;function inform72(hljs){return{name:"Inform 7",aliases:["i7"],case_insensitive:!0,keywords:{keyword:"thing room person man woman animal container supporter backdrop door scenery open closed locked inside gender is are say understand kind\ of rule"},contains:[{className:"string",begin:'"',end:'"',relevance:0,contains:[{className:"subst",begin:"\\[",end:"\\]"}]},{className:"section",begin:/^(Volume|Book|Part|Chapter|Section|Table)\b/,end:"$"},{begin:/^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/,end:":",contains:[{begin:"\\(This",end:"\\)"}]},{className:"comment",begin:"\\[",end:"\\]",contains:["self"]}]}}return inform7_1=inform72,inform7_1}var ini_1,hasRequiredIni;function requireIni(){if(hasRequiredIni)return ini_1; hasRequiredIni=1;function ini2(hljs){const regex=hljs.regex,NUMBERS={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:hljs.NUMBER_RE}]},COMMENTS=hljs.COMMENT();COMMENTS.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const VARIABLES={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},LITERALS2={className:"literal",begin:/\bon|off|true|false|yes|no\b/},STRINGS={className:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[{begin:"''\ '",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},ARRAY2={begin:/\[/,end:/\]/,contains:[COMMENTS,LITERALS2,VARIABLES,STRINGS,NUMBERS,"self"],relevance:0},BARE_KEY=/[A-Za-z0-9_-]+/,QUOTED_KEY_DOUBLE_QUOTE=/"(\\"|[^"])*"/,QUOTED_KEY_SINGLE_QUOTE=/'[^']*'/,ANY_KEY=regex.either(BARE_KEY,QUOTED_KEY_DOUBLE_QUOTE,QUOTED_KEY_SINGLE_QUOTE),DOTTED_KEY=regex.concat(ANY_KEY,"(\\s*\\.\\s*",ANY_KEY,")*",regex.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML\ , also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[COMMENTS,{className:"section",begin:/\[+/,end:/\]+/},{begin:DOTTED_KEY,className:"attr",starts:{end:/$/,contains:[COMMENTS,ARRAY2,LITERALS2,VARIABLES,STRINGS,NUMBERS]}}]}}return ini_1=ini2,ini_1}var irpf90_1,hasRequiredIrpf90;function requireIrpf90(){if(hasRequiredIrpf90)return irpf90_1;hasRequiredIrpf90=1;function irpf902(hljs){const regex=hljs.regex,PARAMS={className:"params",begin:"\\(",end:"\\)"},OPTIONAL_NUMBER_SUFFIX=/(_[a-z_\d]+)?/, OPTIONAL_NUMBER_EXP=/([de][+-]?\d+)?/,NUMBER={className:"number",variants:[{begin:regex.concat(/\b\d+/,/\.(\d*)/,OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)},{begin:regex.concat(/\b\d+/,OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)},{begin:regex.concat(/\.\d+/,OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)}],relevance:0};return{name:"IRPF90",case_insensitive:!0,keywords:{literal:".False. .True.",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterfac\ e end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abst\ ract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horiz\ ontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure integer real chara\ cter complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data begin_provider &begin_provider end_provider begin_shell end_shell begin_template end_template subst assert touch soft_touch provide no_dep free irp_if irp_else irp_endif irp_write irp_read",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog\ dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cos\ h exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed ran\ ge repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of acosh a\ sinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image IRP_ALIGN irp_here"},illegal:/\/\*/,contains:[hljs.inherit(hljs.APOS_STRING_MODE,{className:"string",relevance:0}),hljs.inherit(hljs. QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[hljs.UNDERSCORE_TITLE_MODE,PARAMS]},hljs.COMMENT("!","$",{relevance:0}),hljs.COMMENT("begin_doc","end_doc",{relevance:10}),NUMBER]}}return irpf90_1=irpf902,irpf90_1}var isbl_1,hasRequiredIsbl;function requireIsbl(){if(hasRequiredIsbl)return isbl_1;hasRequiredIsbl=1;function isbl2(hljs){const UNDERSCORE_IDENT_RE="[A-Za-zА-Яа-яёЁ_!][A-Za-zА-Яа-яёЁ_0-9]*", FUNCTION_NAME_IDENT_RE="[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]*",KEYWORD="and и else иначе endexcept endfinally endforeach конецвсе endif конецесли endwhile конецпока except exitfor finally foreach все if если in в not не or или try while пока ",CONSTANTS="SYSRES_CONST_ACCES_RIGHT_TYPE_EDIT SYSRES_CONST_ACCES_RIGHT_TYPE_FULL SYSRES_CONST_ACCES_RIGHT_TYPE_VIEW SYSRES_CONST_ACCESS_MODE_REQUISITE_CODE SYSRES_CONST_ACCESS_NO_ACCESS_VIEW SYS\ RES_CONST_ACCESS_NO_ACCESS_VIEW_CODE SYSRES_CONST_ACCESS_RIGHTS_ADD_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_ADD_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_CHANGE_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_CHANGE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_DELETE_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_DELETE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_EXECUTE_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_EXECUTE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_NO_ACCESS_REQUISITE_CODE SYSRES_\ CONST_ACCESS_RIGHTS_NO_ACCESS_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_RATIFY_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_RATIFY_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW SYSRES_CONST_ACCESS_RIGHTS_VIEW_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_TYPE_CHANGE SYSRES_CONST_ACCESS_TYPE_CHANGE_CODE SYSRES_CONST_ACCESS_TYPE_EXISTS SYSRES_CONST_ACCESS_TYPE_EXISTS_CODE SY\ SRES_CONST_ACCESS_TYPE_FULL SYSRES_CONST_ACCESS_TYPE_FULL_CODE SYSRES_CONST_ACCESS_TYPE_VIEW SYSRES_CONST_ACCESS_TYPE_VIEW_CODE SYSRES_CONST_ACTION_TYPE_ABORT SYSRES_CONST_ACTION_TYPE_ACCEPT SYSRES_CONST_ACTION_TYPE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ADD_ATTACHMENT SYSRES_CONST_ACTION_TYPE_CHANGE_CARD SYSRES_CONST_ACTION_TYPE_CHANGE_KIND SYSRES_CONST_ACTION_TYPE_CHANGE_STORAGE SYSRES_CONST_ACTION_TYPE_CONTINUE SYSRES_CONST_ACTION_TYPE_COPY SYSRES_CONST_ACTION_TYPE_CREATE SYSRES_CONST_ACTION_\ TYPE_CREATE_VERSION SYSRES_CONST_ACTION_TYPE_DELETE SYSRES_CONST_ACTION_TYPE_DELETE_ATTACHMENT SYSRES_CONST_ACTION_TYPE_DELETE_VERSION SYSRES_CONST_ACTION_TYPE_DISABLE_DELEGATE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ENABLE_DELEGATE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_CERTIFICATE SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_CERTIFICATE_AND_PASSWORD SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_PASSWORD SYSRES_CONST_ACTION_TYPE_EXPORT_WITH_LOCK SYSRES_CONST_ACTION_TYPE_EXPORT_WITHOUT_LOCK SYSR\ ES_CONST_ACTION_TYPE_IMPORT_WITH_UNLOCK SYSRES_CONST_ACTION_TYPE_IMPORT_WITHOUT_UNLOCK SYSRES_CONST_ACTION_TYPE_LIFE_CYCLE_STAGE SYSRES_CONST_ACTION_TYPE_LOCK SYSRES_CONST_ACTION_TYPE_LOCK_FOR_SERVER SYSRES_CONST_ACTION_TYPE_LOCK_MODIFY SYSRES_CONST_ACTION_TYPE_MARK_AS_READED SYSRES_CONST_ACTION_TYPE_MARK_AS_UNREADED SYSRES_CONST_ACTION_TYPE_MODIFY SYSRES_CONST_ACTION_TYPE_MODIFY_CARD SYSRES_CONST_ACTION_TYPE_MOVE_TO_ARCHIVE SYSRES_CONST_ACTION_TYPE_OFF_ENCRYPTION SYSRES_CONST_ACTION_TYPE_PASSWO\ RD_CHANGE SYSRES_CONST_ACTION_TYPE_PERFORM SYSRES_CONST_ACTION_TYPE_RECOVER_FROM_LOCAL_COPY SYSRES_CONST_ACTION_TYPE_RESTART SYSRES_CONST_ACTION_TYPE_RESTORE_FROM_ARCHIVE SYSRES_CONST_ACTION_TYPE_REVISION SYSRES_CONST_ACTION_TYPE_SEND_BY_MAIL SYSRES_CONST_ACTION_TYPE_SIGN SYSRES_CONST_ACTION_TYPE_START SYSRES_CONST_ACTION_TYPE_UNLOCK SYSRES_CONST_ACTION_TYPE_UNLOCK_FROM_SERVER SYSRES_CONST_ACTION_TYPE_VERSION_STATE SYSRES_CONST_ACTION_TYPE_VERSION_VISIBILITY SYSRES_CONST_ACTION_TYPE_VIEW SYSRES_\ CONST_ACTION_TYPE_VIEW_SHADOW_COPY SYSRES_CONST_ACTION_TYPE_WORKFLOW_DESCRIPTION_MODIFY SYSRES_CONST_ACTION_TYPE_WRITE_HISTORY SYSRES_CONST_ACTIVE_VERSION_STATE_PICK_VALUE SYSRES_CONST_ADD_REFERENCE_MODE_NAME SYSRES_CONST_ADDITION_REQUISITE_CODE SYSRES_CONST_ADDITIONAL_PARAMS_REQUISITE_CODE SYSRES_CONST_ADITIONAL_JOB_END_DATE_REQUISITE_NAME SYSRES_CONST_ADITIONAL_JOB_READ_REQUISITE_NAME SYSRES_CONST_ADITIONAL_JOB_START_DATE_REQUISITE_NAME SYSRES_CONST_ADITIONAL_JOB_STATE_REQUISITE_NAME SYSRES_CO\ NST_ADMINISTRATION_HISTORY_ADDING_USER_TO_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_ADDING_USER_TO_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_COMP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_COMP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_USER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_USER_ACTION_CODE SYSRES_CONST_ADMI\ NISTRATION_HISTORY_DATABASE_USER_CREATION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_CREATION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_DELETION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_DELETION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_COMP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_COMP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION\ _HISTORY_DELETION_USER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_FROM_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_FROM_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_RESTRICTION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_RESTRICTION_A\ CTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_PRIVILEGE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_PRIVILEGE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_RIGHTS_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_RIGHTS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_IS_MAIN_SERVER_CHANGED_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_IS_MAIN_SERVER_CHANGED_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_IS_PUBLIC_CHANGED_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_IS_\ PUBLIC_CHANGED_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_RESTRICTION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_RESTRICTION_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_PRIVILEGE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_PRIVILEGE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_RIGHTS_ACTION SYSRES_\ CONST_ADMINISTRATION_HISTORY_REMOVING_RIGHTS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_CREATION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_CREATION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_DELETION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_DELETION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_CATEGORY_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_CATEGORY_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_COMP_TITLE_ACTION SYSRES_\ CONST_ADMINISTRATION_HISTORY_UPDATING_COMP_TITLE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_FULL_NAME_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_FULL_NAME_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_PARENT_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_PARENT_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_AUTH\ _TYPE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_AUTH_TYPE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_LOGIN_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_LOGIN_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_STATUS_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_STATUS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_USER_PASSWORD_CHANGE SYSRES_CONST_ADMINISTRATION_HISTORY_USER_PASSWORD_CHANGE_ACTION SYSRES_CONST_ALL_ACCEPT_CONDIT\ ION_RUS SYSRES_CONST_ALL_USERS_GROUP SYSRES_CONST_ALL_USERS_GROUP_NAME SYSRES_CONST_ALL_USERS_SERVER_GROUP_NAME SYSRES_CONST_ALLOWED_ACCESS_TYPE_CODE SYSRES_CONST_ALLOWED_ACCESS_TYPE_NAME SYSRES_CONST_APP_VIEWER_TYPE_REQUISITE_CODE SYSRES_CONST_APPROVING_SIGNATURE_NAME SYSRES_CONST_APPROVING_SIGNATURE_REQUISITE_CODE SYSRES_CONST_ASSISTANT_SUBSTITUE_TYPE SYSRES_CONST_ASSISTANT_SUBSTITUE_TYPE_CODE SYSRES_CONST_ATTACH_TYPE_COMPONENT_TOKEN SYSRES_CONST_ATTACH_TYPE_DOC SYSRES_CONST_ATTACH_TYPE_EDOC S\ YSRES_CONST_ATTACH_TYPE_FOLDER SYSRES_CONST_ATTACH_TYPE_JOB SYSRES_CONST_ATTACH_TYPE_REFERENCE SYSRES_CONST_ATTACH_TYPE_TASK SYSRES_CONST_AUTH_ENCODED_PASSWORD SYSRES_CONST_AUTH_ENCODED_PASSWORD_CODE SYSRES_CONST_AUTH_NOVELL SYSRES_CONST_AUTH_PASSWORD SYSRES_CONST_AUTH_PASSWORD_CODE SYSRES_CONST_AUTH_WINDOWS SYSRES_CONST_AUTHENTICATING_SIGNATURE_NAME SYSRES_CONST_AUTHENTICATING_SIGNATURE_REQUISITE_CODE SYSRES_CONST_AUTO_ENUM_METHOD_FLAG SYSRES_CONST_AUTO_NUMERATION_CODE SYSRES_CONST_AUTO_STRONG_\ ENUM_METHOD_FLAG SYSRES_CONST_AUTOTEXT_NAME_REQUISITE_CODE SYSRES_CONST_AUTOTEXT_TEXT_REQUISITE_CODE SYSRES_CONST_AUTOTEXT_USAGE_ALL SYSRES_CONST_AUTOTEXT_USAGE_ALL_CODE SYSRES_CONST_AUTOTEXT_USAGE_SIGN SYSRES_CONST_AUTOTEXT_USAGE_SIGN_CODE SYSRES_CONST_AUTOTEXT_USAGE_WORK SYSRES_CONST_AUTOTEXT_USAGE_WORK_CODE SYSRES_CONST_AUTOTEXT_USE_ANYWHERE_CODE SYSRES_CONST_AUTOTEXT_USE_ON_SIGNING_CODE SYSRES_CONST_AUTOTEXT_USE_ON_WORK_CODE SYSRES_CONST_BEGIN_DATE_REQUISITE_CODE SYSRES_CONST_BLACK_LIFE_CYCL\ E_STAGE_FONT_COLOR SYSRES_CONST_BLUE_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_BTN_PART SYSRES_CONST_CALCULATED_ROLE_TYPE_CODE SYSRES_CONST_CALL_TYPE_VARIABLE_BUTTON_VALUE SYSRES_CONST_CALL_TYPE_VARIABLE_PROGRAM_VALUE SYSRES_CONST_CANCEL_MESSAGE_FUNCTION_RESULT SYSRES_CONST_CARD_PART SYSRES_CONST_CARD_REFERENCE_MODE_NAME SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_ENCRYPT_VALUE SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_SIGN_AND_ENCRYPT_VALUE SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_SIGN_VALUE SYSRES_CON\ ST_CHECK_PARAM_VALUE_DATE_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_FLOAT_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_INTEGER_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_PICK_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_REEFRENCE_PARAM_TYPE SYSRES_CONST_CLOSED_RECORD_FLAG_VALUE_FEMININE SYSRES_CONST_CLOSED_RECORD_FLAG_VALUE_MASCULINE SYSRES_CONST_CODE_COMPONENT_TYPE_ADMIN SYSRES_CONST_CODE_COMPONENT_TYPE_DEVELOPER SYSRES_CONST_CODE_COMPONENT_TYPE_DOCS SYSRES_CONST_CODE_COMPONENT_TYPE_EDOC_CARDS SYSRES_\ CONST_CODE_COMPONENT_TYPE_EXTERNAL_EXECUTABLE SYSRES_CONST_CODE_COMPONENT_TYPE_OTHER SYSRES_CONST_CODE_COMPONENT_TYPE_REFERENCE SYSRES_CONST_CODE_COMPONENT_TYPE_REPORT SYSRES_CONST_CODE_COMPONENT_TYPE_SCRIPT SYSRES_CONST_CODE_COMPONENT_TYPE_URL SYSRES_CONST_CODE_REQUISITE_ACCESS SYSRES_CONST_CODE_REQUISITE_CODE SYSRES_CONST_CODE_REQUISITE_COMPONENT SYSRES_CONST_CODE_REQUISITE_DESCRIPTION SYSRES_CONST_CODE_REQUISITE_EXCLUDE_COMPONENT SYSRES_CONST_CODE_REQUISITE_RECORD SYSRES_CONST_COMMENT_REQ_COD\ E SYSRES_CONST_COMMON_SETTINGS_REQUISITE_CODE SYSRES_CONST_COMP_CODE_GRD SYSRES_CONST_COMPONENT_GROUP_TYPE_REQUISITE_CODE SYSRES_CONST_COMPONENT_TYPE_ADMIN_COMPONENTS SYSRES_CONST_COMPONENT_TYPE_DEVELOPER_COMPONENTS SYSRES_CONST_COMPONENT_TYPE_DOCS SYSRES_CONST_COMPONENT_TYPE_EDOC_CARDS SYSRES_CONST_COMPONENT_TYPE_EDOCS SYSRES_CONST_COMPONENT_TYPE_EXTERNAL_EXECUTABLE SYSRES_CONST_COMPONENT_TYPE_OTHER SYSRES_CONST_COMPONENT_TYPE_REFERENCE_TYPES SYSRES_CONST_COMPONENT_TYPE_REFERENCES SYSRES_CONST_\ COMPONENT_TYPE_REPORTS SYSRES_CONST_COMPONENT_TYPE_SCRIPTS SYSRES_CONST_COMPONENT_TYPE_URL SYSRES_CONST_COMPONENTS_REMOTE_SERVERS_VIEW_CODE SYSRES_CONST_CONDITION_BLOCK_DESCRIPTION SYSRES_CONST_CONST_FIRM_STATUS_COMMON SYSRES_CONST_CONST_FIRM_STATUS_INDIVIDUAL SYSRES_CONST_CONST_NEGATIVE_VALUE SYSRES_CONST_CONST_POSITIVE_VALUE SYSRES_CONST_CONST_SERVER_STATUS_DONT_REPLICATE SYSRES_CONST_CONST_SERVER_STATUS_REPLICATE SYSRES_CONST_CONTENTS_REQUISITE_CODE SYSRES_CONST_DATA_TYPE_BOOLEAN SYSRES_CONST\ _DATA_TYPE_DATE SYSRES_CONST_DATA_TYPE_FLOAT SYSRES_CONST_DATA_TYPE_INTEGER SYSRES_CONST_DATA_TYPE_PICK SYSRES_CONST_DATA_TYPE_REFERENCE SYSRES_CONST_DATA_TYPE_STRING SYSRES_CONST_DATA_TYPE_TEXT SYSRES_CONST_DATA_TYPE_VARIANT SYSRES_CONST_DATE_CLOSE_REQ_CODE SYSRES_CONST_DATE_FORMAT_DATE_ONLY_CHAR SYSRES_CONST_DATE_OPEN_REQ_CODE SYSRES_CONST_DATE_REQUISITE SYSRES_CONST_DATE_REQUISITE_CODE SYSRES_CONST_DATE_REQUISITE_NAME SYSRES_CONST_DATE_REQUISITE_TYPE SYSRES_CONST_DATE_TYPE_CHAR SYSRES_CONST_D\ ATETIME_FORMAT_VALUE SYSRES_CONST_DEA_ACCESS_RIGHTS_ACTION_CODE SYSRES_CONST_DESCRIPTION_LOCALIZE_ID_REQUISITE_CODE SYSRES_CONST_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_DET1_PART SYSRES_CONST_DET2_PART SYSRES_CONST_DET3_PART SYSRES_CONST_DET4_PART SYSRES_CONST_DET5_PART SYSRES_CONST_DET6_PART SYSRES_CONST_DETAIL_DATASET_KEY_REQUISITE_CODE SYSRES_CONST_DETAIL_PICK_REQUISITE_CODE SYSRES_CONST_DETAIL_REQ_CODE SYSRES_CONST_DO_NOT_USE_ACCESS_TYPE_CODE SYSRES_CONST_DO_NOT_USE_ACCESS_TYPE_NAME SYSRES_C\ ONST_DO_NOT_USE_ON_VIEW_ACCESS_TYPE_CODE SYSRES_CONST_DO_NOT_USE_ON_VIEW_ACCESS_TYPE_NAME SYSRES_CONST_DOCUMENT_STORAGES_CODE SYSRES_CONST_DOCUMENT_TEMPLATES_TYPE_NAME SYSRES_CONST_DOUBLE_REQUISITE_CODE SYSRES_CONST_EDITOR_CLOSE_FILE_OBSERV_TYPE_CODE SYSRES_CONST_EDITOR_CLOSE_PROCESS_OBSERV_TYPE_CODE SYSRES_CONST_EDITOR_TYPE_REQUISITE_CODE SYSRES_CONST_EDITORS_APPLICATION_NAME_REQUISITE_CODE SYSRES_CONST_EDITORS_CREATE_SEVERAL_PROCESSES_REQUISITE_CODE SYSRES_CONST_EDITORS_EXTENSION_REQUISITE_COD\ E SYSRES_CONST_EDITORS_OBSERVER_BY_PROCESS_TYPE SYSRES_CONST_EDITORS_REFERENCE_CODE SYSRES_CONST_EDITORS_REPLACE_SPEC_CHARS_REQUISITE_CODE SYSRES_CONST_EDITORS_USE_PLUGINS_REQUISITE_CODE SYSRES_CONST_EDITORS_VIEW_DOCUMENT_OPENED_TO_EDIT_CODE SYSRES_CONST_EDOC_CARD_TYPE_REQUISITE_CODE SYSRES_CONST_EDOC_CARD_TYPES_LINK_REQUISITE_CODE SYSRES_CONST_EDOC_CERTIFICATE_AND_PASSWORD_ENCODE_CODE SYSRES_CONST_EDOC_CERTIFICATE_ENCODE_CODE SYSRES_CONST_EDOC_DATE_REQUISITE_CODE SYSRES_CONST_EDOC_KIND_REFERENC\ E_CODE SYSRES_CONST_EDOC_KINDS_BY_TEMPLATE_ACTION_CODE SYSRES_CONST_EDOC_MANAGE_ACCESS_CODE SYSRES_CONST_EDOC_NONE_ENCODE_CODE SYSRES_CONST_EDOC_NUMBER_REQUISITE_CODE SYSRES_CONST_EDOC_PASSWORD_ENCODE_CODE SYSRES_CONST_EDOC_READONLY_ACCESS_CODE SYSRES_CONST_EDOC_SHELL_LIFE_TYPE_VIEW_VALUE SYSRES_CONST_EDOC_SIZE_RESTRICTION_PRIORITY_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_CHECK_ACCESS_RIGHTS_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_COMPUTER_NAME_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_DATABASE_\ NAME_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_EDIT_IN_STORAGE_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_LOCAL_PATH_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_SHARED_SOURCE_NAME_REQUISITE_CODE SYSRES_CONST_EDOC_TEMPLATE_REQUISITE_CODE SYSRES_CONST_EDOC_TYPES_REFERENCE_CODE SYSRES_CONST_EDOC_VERSION_ACTIVE_STAGE_CODE SYSRES_CONST_EDOC_VERSION_DESIGN_STAGE_CODE SYSRES_CONST_EDOC_VERSION_OBSOLETE_STAGE_CODE SYSRES_CONST_EDOC_WRITE_ACCES_CODE SYSRES_CONST_EDOCUMENT_CARD_REQUISITES_REFERENCE_CODE_SELECTE\ D_REQUISITE SYSRES_CONST_ENCODE_CERTIFICATE_TYPE_CODE SYSRES_CONST_END_DATE_REQUISITE_CODE SYSRES_CONST_ENUMERATION_TYPE_REQUISITE_CODE SYSRES_CONST_EXECUTE_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_EXECUTIVE_FILE_STORAGE_TYPE SYSRES_CONST_EXIST_CONST SYSRES_CONST_EXIST_VALUE SYSRES_CONST_EXPORT_LOCK_TYPE_ASK SYSRES_CONST_EXPORT_LOCK_TYPE_WITH_LOCK SYSRES_CONST_EXPORT_LOCK_TYPE_WITHOUT_LOCK SYSRES_CONST_EXPORT_VERSION_TYPE_ASK SYSRES_CONST_EXPORT_VERSION_TYPE_LAST SYSRES_CONST_EXPORT_VERSION_TYPE_LAS\ T_ACTIVE SYSRES_CONST_EXTENSION_REQUISITE_CODE SYSRES_CONST_FILTER_NAME_REQUISITE_CODE SYSRES_CONST_FILTER_REQUISITE_CODE SYSRES_CONST_FILTER_TYPE_COMMON_CODE SYSRES_CONST_FILTER_TYPE_COMMON_NAME SYSRES_CONST_FILTER_TYPE_USER_CODE SYSRES_CONST_FILTER_TYPE_USER_NAME SYSRES_CONST_FILTER_VALUE_REQUISITE_NAME SYSRES_CONST_FLOAT_NUMBER_FORMAT_CHAR SYSRES_CONST_FLOAT_REQUISITE_TYPE SYSRES_CONST_FOLDER_AUTHOR_VALUE SYSRES_CONST_FOLDER_KIND_ANY_OBJECTS SYSRES_CONST_FOLDER_KIND_COMPONENTS SYSRES_CONST_FO\ LDER_KIND_EDOCS SYSRES_CONST_FOLDER_KIND_JOBS SYSRES_CONST_FOLDER_KIND_TASKS SYSRES_CONST_FOLDER_TYPE_COMMON SYSRES_CONST_FOLDER_TYPE_COMPONENT SYSRES_CONST_FOLDER_TYPE_FAVORITES SYSRES_CONST_FOLDER_TYPE_INBOX SYSRES_CONST_FOLDER_TYPE_OUTBOX SYSRES_CONST_FOLDER_TYPE_QUICK_LAUNCH SYSRES_CONST_FOLDER_TYPE_SEARCH SYSRES_CONST_FOLDER_TYPE_SHORTCUTS SYSRES_CONST_FOLDER_TYPE_USER SYSRES_CONST_FROM_DICTIONARY_ENUM_METHOD_FLAG SYSRES_CONST_FULL_SUBSTITUTE_TYPE SYSRES_CONST_FULL_SUBSTITUTE_TYPE_CODE SYSR\ ES_CONST_FUNCTION_CANCEL_RESULT SYSRES_CONST_FUNCTION_CATEGORY_SYSTEM SYSRES_CONST_FUNCTION_CATEGORY_USER SYSRES_CONST_FUNCTION_FAILURE_RESULT SYSRES_CONST_FUNCTION_SAVE_RESULT SYSRES_CONST_GENERATED_REQUISITE SYSRES_CONST_GREEN_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_GROUP_ACCOUNT_TYPE_VALUE_CODE SYSRES_CONST_GROUP_CATEGORY_NORMAL_CODE SYSRES_CONST_GROUP_CATEGORY_NORMAL_NAME SYSRES_CONST_GROUP_CATEGORY_SERVICE_CODE SYSRES_CONST_GROUP_CATEGORY_SERVICE_NAME SYSRES_CONST_GROUP_COMMON_CATEGORY_FIE\ LD_VALUE SYSRES_CONST_GROUP_FULL_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_RIGHTS_T_REQUISITE_CODE SYSRES_CONST_GROUP_SERVER_CODES_REQUISITE_CODE SYSRES_CONST_GROUP_SERVER_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_SERVICE_CATEGORY_FIELD_VALUE SYSRES_CONST_GROUP_USER_REQUISITE_CODE SYSRES_CONST_GROUPS_REFERENCE_CODE SYSRES_CONST_GROUPS_REQUISITE_CODE SYSRES_CONST_HIDDEN_MODE_NAME SYSRES_CONST_HIGH_LVL_REQUISITE_CODE SYSRES_CONST_HISTORY_ACTION_CREATE_CODE SYSRES_C\ ONST_HISTORY_ACTION_DELETE_CODE SYSRES_CONST_HISTORY_ACTION_EDIT_CODE SYSRES_CONST_HOUR_CHAR SYSRES_CONST_ID_REQUISITE_CODE SYSRES_CONST_IDSPS_REQUISITE_CODE SYSRES_CONST_IMAGE_MODE_COLOR SYSRES_CONST_IMAGE_MODE_GREYSCALE SYSRES_CONST_IMAGE_MODE_MONOCHROME SYSRES_CONST_IMPORTANCE_HIGH SYSRES_CONST_IMPORTANCE_LOW SYSRES_CONST_IMPORTANCE_NORMAL SYSRES_CONST_IN_DESIGN_VERSION_STATE_PICK_VALUE SYSRES_CONST_INCOMING_WORK_RULE_TYPE_CODE SYSRES_CONST_INT_REQUISITE SYSRES_CONST_INT_REQUISITE_TYPE SYSRES\ _CONST_INTEGER_NUMBER_FORMAT_CHAR SYSRES_CONST_INTEGER_TYPE_CHAR SYSRES_CONST_IS_GENERATED_REQUISITE_NEGATIVE_VALUE SYSRES_CONST_IS_PUBLIC_ROLE_REQUISITE_CODE SYSRES_CONST_IS_REMOTE_USER_NEGATIVE_VALUE SYSRES_CONST_IS_REMOTE_USER_POSITIVE_VALUE SYSRES_CONST_IS_STORED_REQUISITE_NEGATIVE_VALUE SYSRES_CONST_IS_STORED_REQUISITE_STORED_VALUE SYSRES_CONST_ITALIC_LIFE_CYCLE_STAGE_DRAW_STYLE SYSRES_CONST_JOB_BLOCK_DESCRIPTION SYSRES_CONST_JOB_KIND_CONTROL_JOB SYSRES_CONST_JOB_KIND_JOB SYSRES_CONST_JOB_K\ IND_NOTICE SYSRES_CONST_JOB_STATE_ABORTED SYSRES_CONST_JOB_STATE_COMPLETE SYSRES_CONST_JOB_STATE_WORKING SYSRES_CONST_KIND_REQUISITE_CODE SYSRES_CONST_KIND_REQUISITE_NAME SYSRES_CONST_KINDS_CREATE_SHADOW_COPIES_REQUISITE_CODE SYSRES_CONST_KINDS_DEFAULT_EDOC_LIFE_STAGE_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALL_TEPLATES_ALLOWED_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALLOW_LIFE_CYCLE_STAGE_CHANGING_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALLOW_MULTIPLE_ACTIVE_VERSIONS_REQUISITE_CODE SYSRES_CONST_KI\ NDS_EDOC_SHARE_ACCES_RIGHTS_BY_DEFAULT_CODE SYSRES_CONST_KINDS_EDOC_TEMPLATE_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_TYPE_REQUISITE_CODE SYSRES_CONST_KINDS_SIGNERS_REQUISITES_CODE SYSRES_CONST_KOD_INPUT_TYPE SYSRES_CONST_LAST_UPDATE_DATE_REQUISITE_CODE SYSRES_CONST_LIFE_CYCLE_START_STAGE_REQUISITE_CODE SYSRES_CONST_LILAC_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_LINK_OBJECT_KIND_COMPONENT SYSRES_CONST_LINK_OBJECT_KIND_DOCUMENT SYSRES_CONST_LINK_OBJECT_KIND_EDOC SYSRES_CONST_LINK_OBJECT_KIND_FOLDER\ SYSRES_CONST_LINK_OBJECT_KIND_JOB SYSRES_CONST_LINK_OBJECT_KIND_REFERENCE SYSRES_CONST_LINK_OBJECT_KIND_TASK SYSRES_CONST_LINK_REF_TYPE_REQUISITE_CODE SYSRES_CONST_LIST_REFERENCE_MODE_NAME SYSRES_CONST_LOCALIZATION_DICTIONARY_MAIN_VIEW_CODE SYSRES_CONST_MAIN_VIEW_CODE SYSRES_CONST_MANUAL_ENUM_METHOD_FLAG SYSRES_CONST_MASTER_COMP_TYPE_REQUISITE_CODE SYSRES_CONST_MASTER_TABLE_REC_ID_REQUISITE_CODE SYSRES_CONST_MAXIMIZED_MODE_NAME SYSRES_CONST_ME_VALUE SYSRES_CONST_MESSAGE_ATTENTION_CAPTION SYSRES\ _CONST_MESSAGE_CONFIRMATION_CAPTION SYSRES_CONST_MESSAGE_ERROR_CAPTION SYSRES_CONST_MESSAGE_INFORMATION_CAPTION SYSRES_CONST_MINIMIZED_MODE_NAME SYSRES_CONST_MINUTE_CHAR SYSRES_CONST_MODULE_REQUISITE_CODE SYSRES_CONST_MONITORING_BLOCK_DESCRIPTION SYSRES_CONST_MONTH_FORMAT_VALUE SYSRES_CONST_NAME_LOCALIZE_ID_REQUISITE_CODE SYSRES_CONST_NAME_REQUISITE_CODE SYSRES_CONST_NAME_SINGULAR_REQUISITE_CODE SYSRES_CONST_NAMEAN_INPUT_TYPE SYSRES_CONST_NEGATIVE_PICK_VALUE SYSRES_CONST_NEGATIVE_VALUE SYSRES_CO\ NST_NO SYSRES_CONST_NO_PICK_VALUE SYSRES_CONST_NO_SIGNATURE_REQUISITE_CODE SYSRES_CONST_NO_VALUE SYSRES_CONST_NONE_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_NONOPERATING_RECORD_FLAG_VALUE SYSRES_CONST_NONOPERATING_RECORD_FLAG_VALUE_MASCULINE SYSRES_CONST_NORMAL_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_NORMAL_LIFE_CYCLE_STAGE_DRAW_STYLE SYSRES_CONST_NORMAL_MODE_NAME SYSRES_CONST_NOT_ALLOWED_ACCESS_TYPE_CODE SYSRES_CONST_NOT_ALLOWED_ACCESS_TYPE_NAME SYSRES_CONST_NOTE_REQUISITE_CODE SYSRES_CONST_NOTICE_BLOC\ K_DESCRIPTION SYSRES_CONST_NUM_REQUISITE SYSRES_CONST_NUM_STR_REQUISITE_CODE SYSRES_CONST_NUMERATION_AUTO_NOT_STRONG SYSRES_CONST_NUMERATION_AUTO_STRONG SYSRES_CONST_NUMERATION_FROM_DICTONARY SYSRES_CONST_NUMERATION_MANUAL SYSRES_CONST_NUMERIC_TYPE_CHAR SYSRES_CONST_NUMREQ_REQUISITE_CODE SYSRES_CONST_OBSOLETE_VERSION_STATE_PICK_VALUE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_CODE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_FEMININE SYSRES_CONST_OPERATING_RECO\ RD_FLAG_VALUE_MASCULINE SYSRES_CONST_OPTIONAL_FORM_COMP_REQCODE_PREFIX SYSRES_CONST_ORANGE_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_ORIGINALREF_REQUISITE_CODE SYSRES_CONST_OURFIRM_REF_CODE SYSRES_CONST_OURFIRM_REQUISITE_CODE SYSRES_CONST_OURFIRM_VAR SYSRES_CONST_OUTGOING_WORK_RULE_TYPE_CODE SYSRES_CONST_PICK_NEGATIVE_RESULT SYSRES_CONST_PICK_POSITIVE_RESULT SYSRES_CONST_PICK_REQUISITE SYSRES_CONST_PICK_REQUISITE_TYPE SYSRES_CONST_PICK_TYPE_CHAR SYSRES_CONST_PLAN_STATUS_REQUISITE_CODE SYSRES_CONS\ T_PLATFORM_VERSION_COMMENT SYSRES_CONST_PLUGINS_SETTINGS_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_POSITIVE_PICK_VALUE SYSRES_CONST_POWER_TO_CREATE_ACTION_CODE SYSRES_CONST_POWER_TO_SIGN_ACTION_CODE SYSRES_CONST_PRIORITY_REQUISITE_CODE SYSRES_CONST_QUALIFIED_TASK_TYPE SYSRES_CONST_QUALIFIED_TASK_TYPE_CODE SYSRES_CONST_RECSTAT_REQUISITE_CODE SYSRES_CONST_RED_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_REF_ID_T_REF_TYPE_REQUISITE_CODE SYSRES_CONST_REF_REQUISITE SYSRES_CONST_REF_REQUISITE_TYPE SYSRES_CO\ NST_REF_REQUISITES_REFERENCE_CODE_SELECTED_REQUISITE SYSRES_CONST_REFERENCE_RECORD_HISTORY_CREATE_ACTION_CODE SYSRES_CONST_REFERENCE_RECORD_HISTORY_DELETE_ACTION_CODE SYSRES_CONST_REFERENCE_RECORD_HISTORY_MODIFY_ACTION_CODE SYSRES_CONST_REFERENCE_TYPE_CHAR SYSRES_CONST_REFERENCE_TYPE_REQUISITE_NAME SYSRES_CONST_REFERENCES_ADD_PARAMS_REQUISITE_CODE SYSRES_CONST_REFERENCES_DISPLAY_REQUISITE_REQUISITE_CODE SYSRES_CONST_REMOTE_SERVER_STATUS_WORKING SYSRES_CONST_REMOTE_SERVER_TYPE_MAIN SYSRES_CONST_R\ EMOTE_SERVER_TYPE_SECONDARY SYSRES_CONST_REMOTE_USER_FLAG_VALUE_CODE SYSRES_CONST_REPORT_APP_EDITOR_INTERNAL SYSRES_CONST_REPORT_BASE_REPORT_ID_REQUISITE_CODE SYSRES_CONST_REPORT_BASE_REPORT_REQUISITE_CODE SYSRES_CONST_REPORT_SCRIPT_REQUISITE_CODE SYSRES_CONST_REPORT_TEMPLATE_REQUISITE_CODE SYSRES_CONST_REPORT_VIEWER_CODE_REQUISITE_CODE SYSRES_CONST_REQ_ALLOW_COMPONENT_DEFAULT_VALUE SYSRES_CONST_REQ_ALLOW_RECORD_DEFAULT_VALUE SYSRES_CONST_REQ_ALLOW_SERVER_COMPONENT_DEFAULT_VALUE SYSRES_CONST_REQ\ _MODE_AVAILABLE_CODE SYSRES_CONST_REQ_MODE_EDIT_CODE SYSRES_CONST_REQ_MODE_HIDDEN_CODE SYSRES_CONST_REQ_MODE_NOT_AVAILABLE_CODE SYSRES_CONST_REQ_MODE_VIEW_CODE SYSRES_CONST_REQ_NUMBER_REQUISITE_CODE SYSRES_CONST_REQ_SECTION_VALUE SYSRES_CONST_REQ_TYPE_VALUE SYSRES_CONST_REQUISITE_FORMAT_BY_UNIT SYSRES_CONST_REQUISITE_FORMAT_DATE_FULL SYSRES_CONST_REQUISITE_FORMAT_DATE_TIME SYSRES_CONST_REQUISITE_FORMAT_LEFT SYSRES_CONST_REQUISITE_FORMAT_RIGHT SYSRES_CONST_REQUISITE_FORMAT_WITHOUT_UNIT SYSRES_CON\ ST_REQUISITE_NUMBER_REQUISITE_CODE SYSRES_CONST_REQUISITE_SECTION_ACTIONS SYSRES_CONST_REQUISITE_SECTION_BUTTON SYSRES_CONST_REQUISITE_SECTION_BUTTONS SYSRES_CONST_REQUISITE_SECTION_CARD SYSRES_CONST_REQUISITE_SECTION_TABLE SYSRES_CONST_REQUISITE_SECTION_TABLE10 SYSRES_CONST_REQUISITE_SECTION_TABLE11 SYSRES_CONST_REQUISITE_SECTION_TABLE12 SYSRES_CONST_REQUISITE_SECTION_TABLE13 SYSRES_CONST_REQUISITE_SECTION_TABLE14 SYSRES_CONST_REQUISITE_SECTION_TABLE15 SYSRES_CONST_REQUISITE_SECTION_TABLE16 SYS\ RES_CONST_REQUISITE_SECTION_TABLE17 SYSRES_CONST_REQUISITE_SECTION_TABLE18 SYSRES_CONST_REQUISITE_SECTION_TABLE19 SYSRES_CONST_REQUISITE_SECTION_TABLE2 SYSRES_CONST_REQUISITE_SECTION_TABLE20 SYSRES_CONST_REQUISITE_SECTION_TABLE21 SYSRES_CONST_REQUISITE_SECTION_TABLE22 SYSRES_CONST_REQUISITE_SECTION_TABLE23 SYSRES_CONST_REQUISITE_SECTION_TABLE24 SYSRES_CONST_REQUISITE_SECTION_TABLE3 SYSRES_CONST_REQUISITE_SECTION_TABLE4 SYSRES_CONST_REQUISITE_SECTION_TABLE5 SYSRES_CONST_REQUISITE_SECTION_TABLE6 S\ YSRES_CONST_REQUISITE_SECTION_TABLE7 SYSRES_CONST_REQUISITE_SECTION_TABLE8 SYSRES_CONST_REQUISITE_SECTION_TABLE9 SYSRES_CONST_REQUISITES_PSEUDOREFERENCE_REQUISITE_NUMBER_REQUISITE_CODE SYSRES_CONST_RIGHT_ALIGNMENT_CODE SYSRES_CONST_ROLES_REFERENCE_CODE SYSRES_CONST_ROUTE_STEP_AFTER_RUS SYSRES_CONST_ROUTE_STEP_AND_CONDITION_RUS SYSRES_CONST_ROUTE_STEP_OR_CONDITION_RUS SYSRES_CONST_ROUTE_TYPE_COMPLEX SYSRES_CONST_ROUTE_TYPE_PARALLEL SYSRES_CONST_ROUTE_TYPE_SERIAL SYSRES_CONST_SBDATASETDESC_NEGATIV\ E_VALUE SYSRES_CONST_SBDATASETDESC_POSITIVE_VALUE SYSRES_CONST_SBVIEWSDESC_POSITIVE_VALUE SYSRES_CONST_SCRIPT_BLOCK_DESCRIPTION SYSRES_CONST_SEARCH_BY_TEXT_REQUISITE_CODE SYSRES_CONST_SEARCHES_COMPONENT_CONTENT SYSRES_CONST_SEARCHES_CRITERIA_ACTION_NAME SYSRES_CONST_SEARCHES_EDOC_CONTENT SYSRES_CONST_SEARCHES_FOLDER_CONTENT SYSRES_CONST_SEARCHES_JOB_CONTENT SYSRES_CONST_SEARCHES_REFERENCE_CODE SYSRES_CONST_SEARCHES_TASK_CONTENT SYSRES_CONST_SECOND_CHAR SYSRES_CONST_SECTION_REQUISITE_ACTIONS_VALU\ E SYSRES_CONST_SECTION_REQUISITE_CARD_VALUE SYSRES_CONST_SECTION_REQUISITE_CODE SYSRES_CONST_SECTION_REQUISITE_DETAIL_1_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_2_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_3_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_4_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_5_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_6_VALUE SYSRES_CONST_SELECT_REFERENCE_MODE_NAME SYSRES_CONST_SELECT_TYPE_SELECTABLE SYSRES_CONST_SELECT_TYPE_SELECTABLE_ONLY_CHILD SYSRES_CONST_SELECT_T\ YPE_SELECTABLE_WITH_CHILD SYSRES_CONST_SELECT_TYPE_UNSLECTABLE SYSRES_CONST_SERVER_TYPE_MAIN SYSRES_CONST_SERVICE_USER_CATEGORY_FIELD_VALUE SYSRES_CONST_SETTINGS_USER_REQUISITE_CODE SYSRES_CONST_SIGNATURE_AND_ENCODE_CERTIFICATE_TYPE_CODE SYSRES_CONST_SIGNATURE_CERTIFICATE_TYPE_CODE SYSRES_CONST_SINGULAR_TITLE_REQUISITE_CODE SYSRES_CONST_SQL_SERVER_AUTHENTIFICATION_FLAG_VALUE_CODE SYSRES_CONST_SQL_SERVER_ENCODE_AUTHENTIFICATION_FLAG_VALUE_CODE SYSRES_CONST_STANDART_ROUTE_REFERENCE_CODE SYSRES_CON\ ST_STANDART_ROUTE_REFERENCE_COMMENT_REQUISITE_CODE SYSRES_CONST_STANDART_ROUTES_GROUPS_REFERENCE_CODE SYSRES_CONST_STATE_REQ_NAME SYSRES_CONST_STATE_REQUISITE_ACTIVE_VALUE SYSRES_CONST_STATE_REQUISITE_CLOSED_VALUE SYSRES_CONST_STATE_REQUISITE_CODE SYSRES_CONST_STATIC_ROLE_TYPE_CODE SYSRES_CONST_STATUS_PLAN_DEFAULT_VALUE SYSRES_CONST_STATUS_VALUE_AUTOCLEANING SYSRES_CONST_STATUS_VALUE_BLUE_SQUARE SYSRES_CONST_STATUS_VALUE_COMPLETE SYSRES_CONST_STATUS_VALUE_GREEN_SQUARE SYSRES_CONST_STATUS_VALUE_O\ RANGE_SQUARE SYSRES_CONST_STATUS_VALUE_PURPLE_SQUARE SYSRES_CONST_STATUS_VALUE_RED_SQUARE SYSRES_CONST_STATUS_VALUE_SUSPEND SYSRES_CONST_STATUS_VALUE_YELLOW_SQUARE SYSRES_CONST_STDROUTE_SHOW_TO_USERS_REQUISITE_CODE SYSRES_CONST_STORAGE_TYPE_FILE SYSRES_CONST_STORAGE_TYPE_SQL_SERVER SYSRES_CONST_STR_REQUISITE SYSRES_CONST_STRIKEOUT_LIFE_CYCLE_STAGE_DRAW_STYLE SYSRES_CONST_STRING_FORMAT_LEFT_ALIGN_CHAR SYSRES_CONST_STRING_FORMAT_RIGHT_ALIGN_CHAR SYSRES_CONST_STRING_REQUISITE_CODE SYSRES_CONST_STRI\ NG_REQUISITE_TYPE SYSRES_CONST_STRING_TYPE_CHAR SYSRES_CONST_SUBSTITUTES_PSEUDOREFERENCE_CODE SYSRES_CONST_SUBTASK_BLOCK_DESCRIPTION SYSRES_CONST_SYSTEM_SETTING_CURRENT_USER_PARAM_VALUE SYSRES_CONST_SYSTEM_SETTING_EMPTY_VALUE_PARAM_VALUE SYSRES_CONST_SYSTEM_VERSION_COMMENT SYSRES_CONST_TASK_ACCESS_TYPE_ALL SYSRES_CONST_TASK_ACCESS_TYPE_ALL_MEMBERS SYSRES_CONST_TASK_ACCESS_TYPE_MANUAL SYSRES_CONST_TASK_ENCODE_TYPE_CERTIFICATION SYSRES_CONST_TASK_ENCODE_TYPE_CERTIFICATION_AND_PASSWORD SYSRES_CONST\ _TASK_ENCODE_TYPE_NONE SYSRES_CONST_TASK_ENCODE_TYPE_PASSWORD SYSRES_CONST_TASK_ROUTE_ALL_CONDITION SYSRES_CONST_TASK_ROUTE_AND_CONDITION SYSRES_CONST_TASK_ROUTE_OR_CONDITION SYSRES_CONST_TASK_STATE_ABORTED SYSRES_CONST_TASK_STATE_COMPLETE SYSRES_CONST_TASK_STATE_CONTINUED SYSRES_CONST_TASK_STATE_CONTROL SYSRES_CONST_TASK_STATE_INIT SYSRES_CONST_TASK_STATE_WORKING SYSRES_CONST_TASK_TITLE SYSRES_CONST_TASK_TYPES_GROUPS_REFERENCE_CODE SYSRES_CONST_TASK_TYPES_REFERENCE_CODE SYSRES_CONST_TEMPLATES_R\ EFERENCE_CODE SYSRES_CONST_TEST_DATE_REQUISITE_NAME SYSRES_CONST_TEST_DEV_DATABASE_NAME SYSRES_CONST_TEST_DEV_SYSTEM_CODE SYSRES_CONST_TEST_EDMS_DATABASE_NAME SYSRES_CONST_TEST_EDMS_MAIN_CODE SYSRES_CONST_TEST_EDMS_MAIN_DB_NAME SYSRES_CONST_TEST_EDMS_SECOND_CODE SYSRES_CONST_TEST_EDMS_SECOND_DB_NAME SYSRES_CONST_TEST_EDMS_SYSTEM_CODE SYSRES_CONST_TEST_NUMERIC_REQUISITE_NAME SYSRES_CONST_TEXT_REQUISITE SYSRES_CONST_TEXT_REQUISITE_CODE SYSRES_CONST_TEXT_REQUISITE_TYPE SYSRES_CONST_TEXT_TYPE_CHAR S\ YSRES_CONST_TYPE_CODE_REQUISITE_CODE SYSRES_CONST_TYPE_REQUISITE_CODE SYSRES_CONST_UNDEFINED_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_UNITS_SECTION_ID_REQUISITE_CODE SYSRES_CONST_UNITS_SECTION_REQUISITE_CODE SYSRES_CONST_UNOPERATING_RECORD_FLAG_VALUE_CODE SYSRES_CONST_UNSTORED_DATA_REQUISITE_CODE SYSRES_CONST_UNSTORED_DATA_REQUISITE_NAME SYSRES_CONST_USE_ACCESS_TYPE_CODE SYSRES_CONST_USE_ACCESS_TYPE_NAME SYSRES_CONST_USER_ACCOUNT_TYPE_VALUE_CODE SYSRES_CONST_USER_ADDITIONAL_INFORMATION_REQUISITE\ _CODE SYSRES_CONST_USER_AND_GROUP_ID_FROM_PSEUDOREFERENCE_REQUISITE_CODE SYSRES_CONST_USER_CATEGORY_NORMAL SYSRES_CONST_USER_CERTIFICATE_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_STATE_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_SUBJECT_NAME_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_THUMBPRINT_REQUISITE_CODE SYSRES_CONST_USER_COMMON_CATEGORY SYSRES_CONST_USER_COMMON_CATEGORY_CODE SYSRES_CONST_USER_FULL_NAME_REQUISITE_CODE SYSRES_CONST_USER_GROUP_TYPE_REQUISITE_CODE SYSRES_CONST_USER_LOGIN\ _REQUISITE_CODE SYSRES_CONST_USER_REMOTE_CONTROLLER_REQUISITE_CODE SYSRES_CONST_USER_REMOTE_SYSTEM_REQUISITE_CODE SYSRES_CONST_USER_RIGHTS_T_REQUISITE_CODE SYSRES_CONST_USER_SERVER_NAME_REQUISITE_CODE SYSRES_CONST_USER_SERVICE_CATEGORY SYSRES_CONST_USER_SERVICE_CATEGORY_CODE SYSRES_CONST_USER_STATUS_ADMINISTRATOR_CODE SYSRES_CONST_USER_STATUS_ADMINISTRATOR_NAME SYSRES_CONST_USER_STATUS_DEVELOPER_CODE SYSRES_CONST_USER_STATUS_DEVELOPER_NAME SYSRES_CONST_USER_STATUS_DISABLED_CODE SYSRES_CONST_USER\ _STATUS_DISABLED_NAME SYSRES_CONST_USER_STATUS_SYSTEM_DEVELOPER_CODE SYSRES_CONST_USER_STATUS_USER_CODE SYSRES_CONST_USER_STATUS_USER_NAME SYSRES_CONST_USER_STATUS_USER_NAME_DEPRECATED SYSRES_CONST_USER_TYPE_FIELD_VALUE_USER SYSRES_CONST_USER_TYPE_REQUISITE_CODE SYSRES_CONST_USERS_CONTROLLER_REQUISITE_CODE SYSRES_CONST_USERS_IS_MAIN_SERVER_REQUISITE_CODE SYSRES_CONST_USERS_REFERENCE_CODE SYSRES_CONST_USERS_REGISTRATION_CERTIFICATES_ACTION_NAME SYSRES_CONST_USERS_REQUISITE_CODE SYSRES_CONST_USERS\ _SYSTEM_REQUISITE_CODE SYSRES_CONST_USERS_USER_ACCESS_RIGHTS_TYPR_REQUISITE_CODE SYSRES_CONST_USERS_USER_AUTHENTICATION_REQUISITE_CODE SYSRES_CONST_USERS_USER_COMPONENT_REQUISITE_CODE SYSRES_CONST_USERS_USER_GROUP_REQUISITE_CODE SYSRES_CONST_USERS_VIEW_CERTIFICATES_ACTION_NAME SYSRES_CONST_VIEW_DEFAULT_CODE SYSRES_CONST_VIEW_DEFAULT_NAME SYSRES_CONST_VIEWER_REQUISITE_CODE SYSRES_CONST_WAITING_BLOCK_DESCRIPTION SYSRES_CONST_WIZARD_FORM_LABEL_TEST_STRING SYSRES_CONST_WIZARD_QUERY_PARAM_HEIGHT_ETA\ LON_STRING SYSRES_CONST_WIZARD_REFERENCE_COMMENT_REQUISITE_CODE SYSRES_CONST_WORK_RULES_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_WORK_TIME_CALENDAR_REFERENCE_CODE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE_CODE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE_CODE_RUS SYSRES_CONST_WORK_WORKFLOW_SOFT_ROUTE_TYPE_VALUE_CODE_RUS SYSRES_CONST_WORKFLOW_ROUTE_TYPR_HARD SYSRES_CONST_WORKFLOW_ROUTE_TYPR_SOFT SYSRES_CONST_XML_ENCODING SYSRES_CONST_XREC\ _STAT_REQUISITE_CODE SYSRES_CONST_XRECID_FIELD_NAME SYSRES_CONST_YES SYSRES_CONST_YES_NO_2_REQUISITE_CODE SYSRES_CONST_YES_NO_REQUISITE_CODE SYSRES_CONST_YES_NO_T_REF_TYPE_REQUISITE_CODE SYSRES_CONST_YES_PICK_VALUE SYSRES_CONST_YES_VALUE "+"CR FALSE nil NO_VALUE NULL TAB TRUE YES_VALUE "+"ADMINISTRATORS_GROUP_NAME CUSTOMIZERS_GROUP_NAME DEVELOPERS_GROUP_NAME SERVICE_USERS_GROUP_NAME "+"DECISION_BLOCK_FIRST_OPERAND_PROPERTY DECISION_BLOCK_NAME_PROPERTY DECISION_BLOCK_OPERATION_PROPERTY DECISION_B\ LOCK_RESULT_TYPE_PROPERTY DECISION_BLOCK_SECOND_OPERAND_PROPERTY "+"ANY_FILE_EXTENTION COMPRESSED_DOCUMENT_EXTENSION EXTENDED_DOCUMENT_EXTENSION SHORT_COMPRESSED_DOCUMENT_EXTENSION SHORT_EXTENDED_DOCUMENT_EXTENSION "+"JOB_BLOCK_ABORT_DEADLINE_PROPERTY JOB_BLOCK_AFTER_FINISH_EVENT JOB_BLOCK_AFTER_QUERY_PARAMETERS_EVENT JOB_BLOCK_ATTACHMENT_PROPERTY JOB_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY JOB_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY JOB_BLOCK_BEFORE_QUERY_PARAMETERS_EVENT JOB_BLOCK_BEFORE_START_\ EVENT JOB_BLOCK_CREATED_JOBS_PROPERTY JOB_BLOCK_DEADLINE_PROPERTY JOB_BLOCK_EXECUTION_RESULTS_PROPERTY JOB_BLOCK_IS_PARALLEL_PROPERTY JOB_BLOCK_IS_RELATIVE_ABORT_DEADLINE_PROPERTY JOB_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY JOB_BLOCK_JOB_TEXT_PROPERTY JOB_BLOCK_NAME_PROPERTY JOB_BLOCK_NEED_SIGN_ON_PERFORM_PROPERTY JOB_BLOCK_PERFORMER_PROPERTY JOB_BLOCK_RELATIVE_ABORT_DEADLINE_TYPE_PROPERTY JOB_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY JOB_BLOCK_SUBJECT_PROPERTY "+"ENGLISH_LANGUAGE_CODE RUSSIAN_LANGUAGE_\ CODE "+"smHidden smMaximized smMinimized smNormal wmNo wmYes "+"COMPONENT_TOKEN_LINK_KIND DOCUMENT_LINK_KIND EDOCUMENT_LINK_KIND FOLDER_LINK_KIND JOB_LINK_KIND REFERENCE_LINK_KIND TASK_LINK_KIND "+"COMPONENT_TOKEN_LOCK_TYPE EDOCUMENT_VERSION_LOCK_TYPE "+"MONITOR_BLOCK_AFTER_FINISH_EVENT MONITOR_BLOCK_BEFORE_START_EVENT MONITOR_BLOCK_DEADLINE_PROPERTY MONITOR_BLOCK_INTERVAL_PROPERTY MONITOR_BLOCK_INTERVAL_TYPE_PROPERTY MONITOR_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY MONITOR_BLOCK_NAME_PROPERTY MONITO\ R_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY MONITOR_BLOCK_SEARCH_SCRIPT_PROPERTY "+"NOTICE_BLOCK_AFTER_FINISH_EVENT NOTICE_BLOCK_ATTACHMENT_PROPERTY NOTICE_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY NOTICE_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY NOTICE_BLOCK_BEFORE_START_EVENT NOTICE_BLOCK_CREATED_NOTICES_PROPERTY NOTICE_BLOCK_DEADLINE_PROPERTY NOTICE_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY NOTICE_BLOCK_NAME_PROPERTY NOTICE_BLOCK_NOTICE_TEXT_PROPERTY NOTICE_BLOCK_PERFORMER_PROPERTY NOTICE_BLOCK_RELATIVE_DEA\ DLINE_TYPE_PROPERTY NOTICE_BLOCK_SUBJECT_PROPERTY "+"dseAfterCancel dseAfterClose dseAfterDelete dseAfterDeleteOutOfTransaction dseAfterInsert dseAfterOpen dseAfterScroll dseAfterUpdate dseAfterUpdateOutOfTransaction dseBeforeCancel dseBeforeClose dseBeforeDelete dseBeforeDetailUpdate dseBeforeInsert dseBeforeOpen dseBeforeUpdate dseOnAnyRequisiteChange dseOnCloseRecord dseOnDeleteError dseOnOpenRecord dseOnPrepareUpdate dseOnUpdateError dseOnUpdateRatifiedRecord dseOnValidDelete dseOnValidUpdat\ e reOnChange reOnChangeValues SELECTION_BEGIN_ROUTE_EVENT SELECTION_END_ROUTE_EVENT "+"CURRENT_PERIOD_IS_REQUIRED PREVIOUS_CARD_TYPE_NAME SHOW_RECORD_PROPERTIES_FORM "+"ACCESS_RIGHTS_SETTING_DIALOG_CODE ADMINISTRATOR_USER_CODE ANALYTIC_REPORT_TYPE asrtHideLocal asrtHideRemote CALCULATED_ROLE_TYPE_CODE COMPONENTS_REFERENCE_DEVELOPER_VIEW_CODE DCTS_TEST_PROTOCOLS_FOLDER_PATH E_EDOC_VERSION_ALREADY_APPROVINGLY_SIGNED E_EDOC_VERSION_ALREADY_APPROVINGLY_SIGNED_BY_USER E_EDOC_VERSION_ALREDY_SIGNED E_E\ DOC_VERSION_ALREDY_SIGNED_BY_USER EDOC_TYPES_CODE_REQUISITE_FIELD_NAME EDOCUMENTS_ALIAS_NAME FILES_FOLDER_PATH FILTER_OPERANDS_DELIMITER FILTER_OPERATIONS_DELIMITER FORMCARD_NAME FORMLIST_NAME GET_EXTENDED_DOCUMENT_EXTENSION_CREATION_MODE GET_EXTENDED_DOCUMENT_EXTENSION_IMPORT_MODE INTEGRATED_REPORT_TYPE IS_BUILDER_APPLICATION_ROLE IS_BUILDER_APPLICATION_ROLE2 IS_BUILDER_USERS ISBSYSDEV LOG_FOLDER_PATH mbCancel mbNo mbNoToAll mbOK mbYes mbYesToAll MEMORY_DATASET_DESRIPTIONS_FILENAME mrNo mrNoToA\ ll mrYes mrYesToAll MULTIPLE_SELECT_DIALOG_CODE NONOPERATING_RECORD_FLAG_FEMININE NONOPERATING_RECORD_FLAG_MASCULINE OPERATING_RECORD_FLAG_FEMININE OPERATING_RECORD_FLAG_MASCULINE PROFILING_SETTINGS_COMMON_SETTINGS_CODE_VALUE PROGRAM_INITIATED_LOOKUP_ACTION ratDelete ratEdit ratInsert REPORT_TYPE REQUIRED_PICK_VALUES_VARIABLE rmCard rmList SBRTE_PROGID_DEV SBRTE_PROGID_RELEASE STATIC_ROLE_TYPE_CODE SUPPRESS_EMPTY_TEMPLATE_CREATION SYSTEM_USER_CODE UPDATE_DIALOG_DATASET USED_IN_OBJECT_HINT_PARAM \ USER_INITIATED_LOOKUP_ACTION USER_NAME_FORMAT USER_SELECTION_RESTRICTIONS WORKFLOW_TEST_PROTOCOLS_FOLDER_PATH ELS_SUBTYPE_CONTROL_NAME ELS_FOLDER_KIND_CONTROL_NAME REPEAT_PROCESS_CURRENT_OBJECT_EXCEPTION_NAME "+"PRIVILEGE_COMPONENT_FULL_ACCESS PRIVILEGE_DEVELOPMENT_EXPORT PRIVILEGE_DEVELOPMENT_IMPORT PRIVILEGE_DOCUMENT_DELETE PRIVILEGE_ESD PRIVILEGE_FOLDER_DELETE PRIVILEGE_MANAGE_ACCESS_RIGHTS PRIVILEGE_MANAGE_REPLICATION PRIVILEGE_MANAGE_SESSION_SERVER PRIVILEGE_OBJECT_FULL_ACCESS PRIVILEGE_OBJ\ ECT_VIEW PRIVILEGE_RESERVE_LICENSE PRIVILEGE_SYSTEM_CUSTOMIZE PRIVILEGE_SYSTEM_DEVELOP PRIVILEGE_SYSTEM_INSTALL PRIVILEGE_TASK_DELETE PRIVILEGE_USER_PLUGIN_SETTINGS_CUSTOMIZE PRIVILEGES_PSEUDOREFERENCE_CODE "+"ACCESS_TYPES_PSEUDOREFERENCE_CODE ALL_AVAILABLE_COMPONENTS_PSEUDOREFERENCE_CODE ALL_AVAILABLE_PRIVILEGES_PSEUDOREFERENCE_CODE ALL_REPLICATE_COMPONENTS_PSEUDOREFERENCE_CODE AVAILABLE_DEVELOPERS_COMPONENTS_PSEUDOREFERENCE_CODE COMPONENTS_PSEUDOREFERENCE_CODE FILTRATER_SETTINGS_CONFLICTS_PSEU\ DOREFERENCE_CODE GROUPS_PSEUDOREFERENCE_CODE RECEIVE_PROTOCOL_PSEUDOREFERENCE_CODE REFERENCE_REQUISITE_PSEUDOREFERENCE_CODE REFERENCE_REQUISITES_PSEUDOREFERENCE_CODE REFTYPES_PSEUDOREFERENCE_CODE REPLICATION_SEANCES_DIARY_PSEUDOREFERENCE_CODE SEND_PROTOCOL_PSEUDOREFERENCE_CODE SUBSTITUTES_PSEUDOREFERENCE_CODE SYSTEM_SETTINGS_PSEUDOREFERENCE_CODE UNITS_PSEUDOREFERENCE_CODE USERS_PSEUDOREFERENCE_CODE VIEWERS_PSEUDOREFERENCE_CODE "+"CERTIFICATE_TYPE_ENCRYPT CERTIFICATE_TYPE_SIGN CERTIFICATE_TYPE_SI\ GN_AND_ENCRYPT "+"STORAGE_TYPE_FILE STORAGE_TYPE_NAS_CIFS STORAGE_TYPE_SAPERION STORAGE_TYPE_SQL_SERVER "+"COMPTYPE2_REQUISITE_DOCUMENTS_VALUE COMPTYPE2_REQUISITE_TASKS_VALUE COMPTYPE2_REQUISITE_FOLDERS_VALUE COMPTYPE2_REQUISITE_REFERENCES_VALUE "+"SYSREQ_CODE SYSREQ_COMPTYPE2 SYSREQ_CONST_AVAILABLE_FOR_WEB SYSREQ_CONST_COMMON_CODE SYSREQ_CONST_COMMON_VALUE SYSREQ_CONST_FIRM_CODE SYSREQ_CONST_FIRM_STATUS SYSREQ_CONST_FIRM_VALUE SYSREQ_CONST_SERVER_STATUS SYSREQ_CONTENTS SYSREQ_DATE_OPEN SYSREQ_D\ ATE_CLOSE SYSREQ_DESCRIPTION SYSREQ_DESCRIPTION_LOCALIZE_ID SYSREQ_DOUBLE SYSREQ_EDOC_ACCESS_TYPE SYSREQ_EDOC_AUTHOR SYSREQ_EDOC_CREATED SYSREQ_EDOC_DELEGATE_RIGHTS_REQUISITE_CODE SYSREQ_EDOC_EDITOR SYSREQ_EDOC_ENCODE_TYPE SYSREQ_EDOC_ENCRYPTION_PLUGIN_NAME SYSREQ_EDOC_ENCRYPTION_PLUGIN_VERSION SYSREQ_EDOC_EXPORT_DATE SYSREQ_EDOC_EXPORTER SYSREQ_EDOC_KIND SYSREQ_EDOC_LIFE_STAGE_NAME SYSREQ_EDOC_LOCKED_FOR_SERVER_CODE SYSREQ_EDOC_MODIFIED SYSREQ_EDOC_NAME SYSREQ_EDOC_NOTE SYSREQ_EDOC_QUALIFIED_ID\ SYSREQ_EDOC_SESSION_KEY SYSREQ_EDOC_SESSION_KEY_ENCRYPTION_PLUGIN_NAME SYSREQ_EDOC_SESSION_KEY_ENCRYPTION_PLUGIN_VERSION SYSREQ_EDOC_SIGNATURE_TYPE SYSREQ_EDOC_SIGNED SYSREQ_EDOC_STORAGE SYSREQ_EDOC_STORAGES_ARCHIVE_STORAGE SYSREQ_EDOC_STORAGES_CHECK_RIGHTS SYSREQ_EDOC_STORAGES_COMPUTER_NAME SYSREQ_EDOC_STORAGES_EDIT_IN_STORAGE SYSREQ_EDOC_STORAGES_EXECUTIVE_STORAGE SYSREQ_EDOC_STORAGES_FUNCTION SYSREQ_EDOC_STORAGES_INITIALIZED SYSREQ_EDOC_STORAGES_LOCAL_PATH SYSREQ_EDOC_STORAGES_SAPERION_DATAB\ ASE_NAME SYSREQ_EDOC_STORAGES_SEARCH_BY_TEXT SYSREQ_EDOC_STORAGES_SERVER_NAME SYSREQ_EDOC_STORAGES_SHARED_SOURCE_NAME SYSREQ_EDOC_STORAGES_TYPE SYSREQ_EDOC_TEXT_MODIFIED SYSREQ_EDOC_TYPE_ACT_CODE SYSREQ_EDOC_TYPE_ACT_DESCRIPTION SYSREQ_EDOC_TYPE_ACT_DESCRIPTION_LOCALIZE_ID SYSREQ_EDOC_TYPE_ACT_ON_EXECUTE SYSREQ_EDOC_TYPE_ACT_ON_EXECUTE_EXISTS SYSREQ_EDOC_TYPE_ACT_SECTION SYSREQ_EDOC_TYPE_ADD_PARAMS SYSREQ_EDOC_TYPE_COMMENT SYSREQ_EDOC_TYPE_EVENT_TEXT SYSREQ_EDOC_TYPE_NAME_IN_SINGULAR SYSREQ_EDOC\ _TYPE_NAME_IN_SINGULAR_LOCALIZE_ID SYSREQ_EDOC_TYPE_NAME_LOCALIZE_ID SYSREQ_EDOC_TYPE_NUMERATION_METHOD SYSREQ_EDOC_TYPE_PSEUDO_REQUISITE_CODE SYSREQ_EDOC_TYPE_REQ_CODE SYSREQ_EDOC_TYPE_REQ_DESCRIPTION SYSREQ_EDOC_TYPE_REQ_DESCRIPTION_LOCALIZE_ID SYSREQ_EDOC_TYPE_REQ_IS_LEADING SYSREQ_EDOC_TYPE_REQ_IS_REQUIRED SYSREQ_EDOC_TYPE_REQ_NUMBER SYSREQ_EDOC_TYPE_REQ_ON_CHANGE SYSREQ_EDOC_TYPE_REQ_ON_CHANGE_EXISTS SYSREQ_EDOC_TYPE_REQ_ON_SELECT SYSREQ_EDOC_TYPE_REQ_ON_SELECT_KIND SYSREQ_EDOC_TYPE_REQ_SEC\ TION SYSREQ_EDOC_TYPE_VIEW_CARD SYSREQ_EDOC_TYPE_VIEW_CODE SYSREQ_EDOC_TYPE_VIEW_COMMENT SYSREQ_EDOC_TYPE_VIEW_IS_MAIN SYSREQ_EDOC_TYPE_VIEW_NAME SYSREQ_EDOC_TYPE_VIEW_NAME_LOCALIZE_ID SYSREQ_EDOC_VERSION_AUTHOR SYSREQ_EDOC_VERSION_CRC SYSREQ_EDOC_VERSION_DATA SYSREQ_EDOC_VERSION_EDITOR SYSREQ_EDOC_VERSION_EXPORT_DATE SYSREQ_EDOC_VERSION_EXPORTER SYSREQ_EDOC_VERSION_HIDDEN SYSREQ_EDOC_VERSION_LIFE_STAGE SYSREQ_EDOC_VERSION_MODIFIED SYSREQ_EDOC_VERSION_NOTE SYSREQ_EDOC_VERSION_SIGNATURE_TYPE SYSR\ EQ_EDOC_VERSION_SIGNED SYSREQ_EDOC_VERSION_SIZE SYSREQ_EDOC_VERSION_SOURCE SYSREQ_EDOC_VERSION_TEXT_MODIFIED SYSREQ_EDOCKIND_DEFAULT_VERSION_STATE_CODE SYSREQ_FOLDER_KIND SYSREQ_FUNC_CATEGORY SYSREQ_FUNC_COMMENT SYSREQ_FUNC_GROUP SYSREQ_FUNC_GROUP_COMMENT SYSREQ_FUNC_GROUP_NUMBER SYSREQ_FUNC_HELP SYSREQ_FUNC_PARAM_DEF_VALUE SYSREQ_FUNC_PARAM_IDENT SYSREQ_FUNC_PARAM_NUMBER SYSREQ_FUNC_PARAM_TYPE SYSREQ_FUNC_TEXT SYSREQ_GROUP_CATEGORY SYSREQ_ID SYSREQ_LAST_UPDATE SYSREQ_LEADER_REFERENCE SYSREQ_LIN\ E_NUMBER SYSREQ_MAIN_RECORD_ID SYSREQ_NAME SYSREQ_NAME_LOCALIZE_ID SYSREQ_NOTE SYSREQ_ORIGINAL_RECORD SYSREQ_OUR_FIRM SYSREQ_PROFILING_SETTINGS_BATCH_LOGING SYSREQ_PROFILING_SETTINGS_BATCH_SIZE SYSREQ_PROFILING_SETTINGS_PROFILING_ENABLED SYSREQ_PROFILING_SETTINGS_SQL_PROFILING_ENABLED SYSREQ_PROFILING_SETTINGS_START_LOGGED SYSREQ_RECORD_STATUS SYSREQ_REF_REQ_FIELD_NAME SYSREQ_REF_REQ_FORMAT SYSREQ_REF_REQ_GENERATED SYSREQ_REF_REQ_LENGTH SYSREQ_REF_REQ_PRECISION SYSREQ_REF_REQ_REFERENCE SYSREQ_RE\ F_REQ_SECTION SYSREQ_REF_REQ_STORED SYSREQ_REF_REQ_TOKENS SYSREQ_REF_REQ_TYPE SYSREQ_REF_REQ_VIEW SYSREQ_REF_TYPE_ACT_CODE SYSREQ_REF_TYPE_ACT_DESCRIPTION SYSREQ_REF_TYPE_ACT_DESCRIPTION_LOCALIZE_ID SYSREQ_REF_TYPE_ACT_ON_EXECUTE SYSREQ_REF_TYPE_ACT_ON_EXECUTE_EXISTS SYSREQ_REF_TYPE_ACT_SECTION SYSREQ_REF_TYPE_ADD_PARAMS SYSREQ_REF_TYPE_COMMENT SYSREQ_REF_TYPE_COMMON_SETTINGS SYSREQ_REF_TYPE_DISPLAY_REQUISITE_NAME SYSREQ_REF_TYPE_EVENT_TEXT SYSREQ_REF_TYPE_MAIN_LEADING_REF SYSREQ_REF_TYPE_NAME_I\ N_SINGULAR SYSREQ_REF_TYPE_NAME_IN_SINGULAR_LOCALIZE_ID SYSREQ_REF_TYPE_NAME_LOCALIZE_ID SYSREQ_REF_TYPE_NUMERATION_METHOD SYSREQ_REF_TYPE_REQ_CODE SYSREQ_REF_TYPE_REQ_DESCRIPTION SYSREQ_REF_TYPE_REQ_DESCRIPTION_LOCALIZE_ID SYSREQ_REF_TYPE_REQ_IS_CONTROL SYSREQ_REF_TYPE_REQ_IS_FILTER SYSREQ_REF_TYPE_REQ_IS_LEADING SYSREQ_REF_TYPE_REQ_IS_REQUIRED SYSREQ_REF_TYPE_REQ_NUMBER SYSREQ_REF_TYPE_REQ_ON_CHANGE SYSREQ_REF_TYPE_REQ_ON_CHANGE_EXISTS SYSREQ_REF_TYPE_REQ_ON_SELECT SYSREQ_REF_TYPE_REQ_ON_SELEC\ T_KIND SYSREQ_REF_TYPE_REQ_SECTION SYSREQ_REF_TYPE_VIEW_CARD SYSREQ_REF_TYPE_VIEW_CODE SYSREQ_REF_TYPE_VIEW_COMMENT SYSREQ_REF_TYPE_VIEW_IS_MAIN SYSREQ_REF_TYPE_VIEW_NAME SYSREQ_REF_TYPE_VIEW_NAME_LOCALIZE_ID SYSREQ_REFERENCE_TYPE_ID SYSREQ_STATE SYSREQ_STATЕ SYSREQ_SYSTEM_SETTINGS_VALUE SYSREQ_TYPE SYSREQ_UNIT SYSREQ_UNIT_ID SYSREQ_USER_GROUPS_GROUP_FULL_NAME SYSREQ_USER_GROUPS_GROUP_NAME SYSREQ_USER_GROUPS_GROUP_SERVER_NAME SYSREQ_USERS_ACCESS_RIGHTS SYSREQ_USERS_AUTHENTICATION SYSREQ_USERS_CA\ TEGORY SYSREQ_USERS_COMPONENT SYSREQ_USERS_COMPONENT_USER_IS_PUBLIC SYSREQ_USERS_DOMAIN SYSREQ_USERS_FULL_USER_NAME SYSREQ_USERS_GROUP SYSREQ_USERS_IS_MAIN_SERVER SYSREQ_USERS_LOGIN SYSREQ_USERS_REFERENCE_USER_IS_PUBLIC SYSREQ_USERS_STATUS SYSREQ_USERS_USER_CERTIFICATE SYSREQ_USERS_USER_CERTIFICATE_INFO SYSREQ_USERS_USER_CERTIFICATE_PLUGIN_NAME SYSREQ_USERS_USER_CERTIFICATE_PLUGIN_VERSION SYSREQ_USERS_USER_CERTIFICATE_STATE SYSREQ_USERS_USER_CERTIFICATE_SUBJECT_NAME SYSREQ_USERS_USER_CERTIFICATE\ _THUMBPRINT SYSREQ_USERS_USER_DEFAULT_CERTIFICATE SYSREQ_USERS_USER_DESCRIPTION SYSREQ_USERS_USER_GLOBAL_NAME SYSREQ_USERS_USER_LOGIN SYSREQ_USERS_USER_MAIN_SERVER SYSREQ_USERS_USER_TYPE SYSREQ_WORK_RULES_FOLDER_ID "+"RESULT_VAR_NAME RESULT_VAR_NAME_ENG "+"AUTO_NUMERATION_RULE_ID CANT_CHANGE_ID_REQUISITE_RULE_ID CANT_CHANGE_OURFIRM_REQUISITE_RULE_ID CHECK_CHANGING_REFERENCE_RECORD_USE_RULE_ID CHECK_CODE_REQUISITE_RULE_ID CHECK_DELETING_REFERENCE_RECORD_USE_RULE_ID CHECK_FILTRATER_CHANGES_RULE_ID\ CHECK_RECORD_INTERVAL_RULE_ID CHECK_REFERENCE_INTERVAL_RULE_ID CHECK_REQUIRED_DATA_FULLNESS_RULE_ID CHECK_REQUIRED_REQUISITES_FULLNESS_RULE_ID MAKE_RECORD_UNRATIFIED_RULE_ID RESTORE_AUTO_NUMERATION_RULE_ID SET_FIRM_CONTEXT_FROM_RECORD_RULE_ID SET_FIRST_RECORD_IN_LIST_FORM_RULE_ID SET_IDSPS_VALUE_RULE_ID SET_NEXT_CODE_VALUE_RULE_ID SET_OURFIRM_BOUNDS_RULE_ID SET_OURFIRM_REQUISITE_RULE_ID "+"SCRIPT_BLOCK_AFTER_FINISH_EVENT SCRIPT_BLOCK_BEFORE_START_EVENT SCRIPT_BLOCK_EXECUTION_RESULTS_PROPERTY SC\ RIPT_BLOCK_NAME_PROPERTY SCRIPT_BLOCK_SCRIPT_PROPERTY "+"SUBTASK_BLOCK_ABORT_DEADLINE_PROPERTY SUBTASK_BLOCK_AFTER_FINISH_EVENT SUBTASK_BLOCK_ASSIGN_PARAMS_EVENT SUBTASK_BLOCK_ATTACHMENTS_PROPERTY SUBTASK_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY SUBTASK_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY SUBTASK_BLOCK_BEFORE_START_EVENT SUBTASK_BLOCK_CREATED_TASK_PROPERTY SUBTASK_BLOCK_CREATION_EVENT SUBTASK_BLOCK_DEADLINE_PROPERTY SUBTASK_BLOCK_IMPORTANCE_PROPERTY SUBTASK_BLOCK_INITIATOR_PROPERTY SUBTASK_BLO\ CK_IS_RELATIVE_ABORT_DEADLINE_PROPERTY SUBTASK_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY SUBTASK_BLOCK_JOBS_TYPE_PROPERTY SUBTASK_BLOCK_NAME_PROPERTY SUBTASK_BLOCK_PARALLEL_ROUTE_PROPERTY SUBTASK_BLOCK_PERFORMERS_PROPERTY SUBTASK_BLOCK_RELATIVE_ABORT_DEADLINE_TYPE_PROPERTY SUBTASK_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY SUBTASK_BLOCK_REQUIRE_SIGN_PROPERTY SUBTASK_BLOCK_STANDARD_ROUTE_PROPERTY SUBTASK_BLOCK_START_EVENT SUBTASK_BLOCK_STEP_CONTROL_PROPERTY SUBTASK_BLOCK_SUBJECT_PROPERTY SUBTASK_BLOCK_TASK_\ CONTROL_PROPERTY SUBTASK_BLOCK_TEXT_PROPERTY SUBTASK_BLOCK_UNLOCK_ATTACHMENTS_ON_STOP_PROPERTY SUBTASK_BLOCK_USE_STANDARD_ROUTE_PROPERTY SUBTASK_BLOCK_WAIT_FOR_TASK_COMPLETE_PROPERTY "+"SYSCOMP_CONTROL_JOBS SYSCOMP_FOLDERS SYSCOMP_JOBS SYSCOMP_NOTICES SYSCOMP_TASKS "+"SYSDLG_CREATE_EDOCUMENT SYSDLG_CREATE_EDOCUMENT_VERSION SYSDLG_CURRENT_PERIOD SYSDLG_EDIT_FUNCTION_HELP SYSDLG_EDOCUMENT_KINDS_FOR_TEMPLATE SYSDLG_EXPORT_MULTIPLE_EDOCUMENTS SYSDLG_EXPORT_SINGLE_EDOCUMENT SYSDLG_IMPORT_EDOCUMENT SY\ SDLG_MULTIPLE_SELECT SYSDLG_SETUP_ACCESS_RIGHTS SYSDLG_SETUP_DEFAULT_RIGHTS SYSDLG_SETUP_FILTER_CONDITION SYSDLG_SETUP_SIGN_RIGHTS SYSDLG_SETUP_TASK_OBSERVERS SYSDLG_SETUP_TASK_ROUTE SYSDLG_SETUP_USERS_LIST SYSDLG_SIGN_EDOCUMENT SYSDLG_SIGN_MULTIPLE_EDOCUMENTS "+"SYSREF_ACCESS_RIGHTS_TYPES SYSREF_ADMINISTRATION_HISTORY SYSREF_ALL_AVAILABLE_COMPONENTS SYSREF_ALL_AVAILABLE_PRIVILEGES SYSREF_ALL_REPLICATING_COMPONENTS SYSREF_AVAILABLE_DEVELOPERS_COMPONENTS SYSREF_CALENDAR_EVENTS SYSREF_COMPONENT_TO\ KEN_HISTORY SYSREF_COMPONENT_TOKENS SYSREF_COMPONENTS SYSREF_CONSTANTS SYSREF_DATA_RECEIVE_PROTOCOL SYSREF_DATA_SEND_PROTOCOL SYSREF_DIALOGS SYSREF_DIALOGS_REQUISITES SYSREF_EDITORS SYSREF_EDOC_CARDS SYSREF_EDOC_TYPES SYSREF_EDOCUMENT_CARD_REQUISITES SYSREF_EDOCUMENT_CARD_TYPES SYSREF_EDOCUMENT_CARD_TYPES_REFERENCE SYSREF_EDOCUMENT_CARDS SYSREF_EDOCUMENT_HISTORY SYSREF_EDOCUMENT_KINDS SYSREF_EDOCUMENT_REQUISITES SYSREF_EDOCUMENT_SIGNATURES SYSREF_EDOCUMENT_TEMPLATES SYSREF_EDOCUMENT_TEXT_STORAGE\ S SYSREF_EDOCUMENT_VIEWS SYSREF_FILTERER_SETUP_CONFLICTS SYSREF_FILTRATER_SETTING_CONFLICTS SYSREF_FOLDER_HISTORY SYSREF_FOLDERS SYSREF_FUNCTION_GROUPS SYSREF_FUNCTION_PARAMS SYSREF_FUNCTIONS SYSREF_JOB_HISTORY SYSREF_LINKS SYSREF_LOCALIZATION_DICTIONARY SYSREF_LOCALIZATION_LANGUAGES SYSREF_MODULES SYSREF_PRIVILEGES SYSREF_RECORD_HISTORY SYSREF_REFERENCE_REQUISITES SYSREF_REFERENCE_TYPE_VIEWS SYSREF_REFERENCE_TYPES SYSREF_REFERENCES SYSREF_REFERENCES_REQUISITES SYSREF_REMOTE_SERVERS SYSREF_REPLI\ CATION_SESSIONS_LOG SYSREF_REPLICATION_SESSIONS_PROTOCOL SYSREF_REPORTS SYSREF_ROLES SYSREF_ROUTE_BLOCK_GROUPS SYSREF_ROUTE_BLOCKS SYSREF_SCRIPTS SYSREF_SEARCHES SYSREF_SERVER_EVENTS SYSREF_SERVER_EVENTS_HISTORY SYSREF_STANDARD_ROUTE_GROUPS SYSREF_STANDARD_ROUTES SYSREF_STATUSES SYSREF_SYSTEM_SETTINGS SYSREF_TASK_HISTORY SYSREF_TASK_KIND_GROUPS SYSREF_TASK_KINDS SYSREF_TASK_RIGHTS SYSREF_TASK_SIGNATURES SYSREF_TASKS SYSREF_UNITS SYSREF_USER_GROUPS SYSREF_USER_GROUPS_REFERENCE SYSREF_USER_SUBSTIT\ UTION SYSREF_USERS SYSREF_USERS_REFERENCE SYSREF_VIEWERS SYSREF_WORKING_TIME_CALENDARS "+"ACCESS_RIGHTS_TABLE_NAME EDMS_ACCESS_TABLE_NAME EDOC_TYPES_TABLE_NAME "+"TEST_DEV_DB_NAME TEST_DEV_SYSTEM_CODE TEST_EDMS_DB_NAME TEST_EDMS_MAIN_CODE TEST_EDMS_MAIN_DB_NAME TEST_EDMS_SECOND_CODE TEST_EDMS_SECOND_DB_NAME TEST_EDMS_SYSTEM_CODE TEST_ISB5_MAIN_CODE TEST_ISB5_SECOND_CODE TEST_SQL_SERVER_2005_NAME TEST_SQL_SERVER_NAME "+"ATTENTION_CAPTION cbsCommandLinks cbsDefault CONFIRMATION_CAPTION ERROR_CAPTI\ ON INFORMATION_CAPTION mrCancel mrOk "+"EDOC_VERSION_ACTIVE_STAGE_CODE EDOC_VERSION_DESIGN_STAGE_CODE EDOC_VERSION_OBSOLETE_STAGE_CODE "+"cpDataEnciphermentEnabled cpDigitalSignatureEnabled cpID cpIssuer cpPluginVersion cpSerial cpSubjectName cpSubjSimpleName cpValidFromDate cpValidToDate "+"ISBL_SYNTAX NO_SYNTAX XML_SYNTAX "+"WAIT_BLOCK_AFTER_FINISH_EVENT WAIT_BLOCK_BEFORE_START_EVENT WAIT_BLOCK_DEADLINE_PROPERTY WAIT_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY WAIT_BLOCK_NAME_PROPERTY WAIT_BLOCK_RELAT\ IVE_DEADLINE_TYPE_PROPERTY "+"SYSRES_COMMON SYSRES_CONST SYSRES_MBFUNC SYSRES_SBDATA SYSRES_SBGUI SYSRES_SBINTF SYSRES_SBREFDSC SYSRES_SQLERRORS SYSRES_SYSCOMP ",ENUMS="atUser atGroup atRole "+"aemEnabledAlways aemDisabledAlways aemEnabledOnBrowse aemEnabledOnEdit aemDisabledOnBrowseEmpty "+"apBegin apEnd "+"alLeft alRight "+"asmNever asmNoButCustomize asmAsLastTime asmYesButCustomize asmAlways "+"cirCommon cirRevoked "+"ctSignature ctEncode ctSignatureEncode "+"clbUnchecked clbChecked clbGrayed\ "+"ceISB ceAlways ceNever "+"ctDocument ctReference ctScript ctUnknown ctReport ctDialog ctFunction ctFolder ctEDocument ctTask ctJob ctNotice ctControlJob "+"cfInternal cfDisplay "+"ciUnspecified ciWrite ciRead "+"ckFolder ckEDocument ckTask ckJob ckComponentToken ckAny ckReference ckScript ckReport ckDialog "+"ctISBLEditor ctBevel ctButton ctCheckListBox ctComboBox ctComboEdit ctGrid ctDBCheckBox ctDBComboBox ctDBEdit ctDBEllipsis ctDBMemo ctDBNavigator ctDBRadioGroup ctDBStatusLabel ctEdit c\ tGroupBox ctInplaceHint ctMemo ctPanel ctListBox ctRadioButton ctRichEdit ctTabSheet ctWebBrowser ctImage ctHyperLink ctLabel ctDBMultiEllipsis ctRibbon ctRichView ctInnerPanel ctPanelGroup ctBitButton "+"cctDate cctInteger cctNumeric cctPick cctReference cctString cctText "+"cltInternal cltPrimary cltGUI "+"dseBeforeOpen dseAfterOpen dseBeforeClose dseAfterClose dseOnValidDelete dseBeforeDelete dseAfterDelete dseAfterDeleteOutOfTransaction dseOnDeleteError dseBeforeInsert dseAfterInsert dseOnVa\ lidUpdate dseBeforeUpdate dseOnUpdateRatifiedRecord dseAfterUpdate dseAfterUpdateOutOfTransaction dseOnUpdateError dseAfterScroll dseOnOpenRecord dseOnCloseRecord dseBeforeCancel dseAfterCancel dseOnUpdateDeadlockError dseBeforeDetailUpdate dseOnPrepareUpdate dseOnAnyRequisiteChange "+"dssEdit dssInsert dssBrowse dssInActive "+"dftDate dftShortDate dftDateTime dftTimeStamp "+"dotDays dotHours dotMinutes dotSeconds "+"dtkndLocal dtkndUTC "+"arNone arView arEdit arFull "+"ddaView ddaEdit "+"emLock\ emEdit emSign emExportWithLock emImportWithUnlock emChangeVersionNote emOpenForModify emChangeLifeStage emDelete emCreateVersion emImport emUnlockExportedWithLock emStart emAbort emReInit emMarkAsReaded emMarkAsUnreaded emPerform emAccept emResume emChangeRights emEditRoute emEditObserver emRecoveryFromLocalCopy emChangeWorkAccessType emChangeEncodeTypeToCertificate emChangeEncodeTypeToPassword emChangeEncodeTypeToNone emChangeEncodeTypeToCertificatePassword emChangeStandardRoute emGetText emOp\ enForView emMoveToStorage emCreateObject emChangeVersionHidden emDeleteVersion emChangeLifeCycleStage emApprovingSign emExport emContinue emLockFromEdit emUnLockForEdit emLockForServer emUnlockFromServer emDelegateAccessRights emReEncode "+"ecotFile ecotProcess "+"eaGet eaCopy eaCreate eaCreateStandardRoute "+"edltAll edltNothing edltQuery "+"essmText essmCard "+"esvtLast esvtLastActive esvtSpecified "+"edsfExecutive edsfArchive "+"edstSQLServer edstFile "+"edvstNone edvstEDocumentVersionCopy ed\ vstFile edvstTemplate edvstScannedFile "+"vsDefault vsDesign vsActive vsObsolete "+"etNone etCertificate etPassword etCertificatePassword "+"ecException ecWarning ecInformation "+"estAll estApprovingOnly "+"evtLast evtLastActive evtQuery "+"fdtString fdtNumeric fdtInteger fdtDate fdtText fdtUnknown fdtWideString fdtLargeInteger "+"ftInbox ftOutbox ftFavorites ftCommonFolder ftUserFolder ftComponents ftQuickLaunch ftShortcuts ftSearch "+"grhAuto grhX1 grhX2 grhX3 "+"hltText hltRTF hltHTML "+"iffB\ MP iffJPEG iffMultiPageTIFF iffSinglePageTIFF iffTIFF iffPNG "+"im8bGrayscale im24bRGB im1bMonochrome "+"itBMP itJPEG itWMF itPNG "+"ikhInformation ikhWarning ikhError ikhNoIcon "+"icUnknown icScript icFunction icIntegratedReport icAnalyticReport icDataSetEventHandler icActionHandler icFormEventHandler icLookUpEventHandler icRequisiteChangeEventHandler icBeforeSearchEventHandler icRoleCalculation icSelectRouteEventHandler icBlockPropertyCalculation icBlockQueryParamsEventHandler icChangeSearchRe\ sultEventHandler icBlockEventHandler icSubTaskInitEventHandler icEDocDataSetEventHandler icEDocLookUpEventHandler icEDocActionHandler icEDocFormEventHandler icEDocRequisiteChangeEventHandler icStructuredConversionRule icStructuredConversionEventBefore icStructuredConversionEventAfter icWizardEventHandler icWizardFinishEventHandler icWizardStepEventHandler icWizardStepFinishEventHandler icWizardActionEnableEventHandler icWizardActionExecuteEventHandler icCreateJobsHandler icCreateNoticesHandler i\ cBeforeLookUpEventHandler icAfterLookUpEventHandler icTaskAbortEventHandler icWorkflowBlockActionHandler icDialogDataSetEventHandler icDialogActionHandler icDialogLookUpEventHandler icDialogRequisiteChangeEventHandler icDialogFormEventHandler icDialogValidCloseEventHandler icBlockFormEventHandler icTaskFormEventHandler icReferenceMethod icEDocMethod icDialogMethod icProcessMessageHandler "+"isShow isHide isByUserSettings "+"jkJob jkNotice jkControlJob "+"jtInner jtLeft jtRight jtFull jtCross "+"\ lbpAbove lbpBelow lbpLeft lbpRight "+"eltPerConnection eltPerUser "+"sfcUndefined sfcBlack sfcGreen sfcRed sfcBlue sfcOrange sfcLilac "+"sfsItalic sfsStrikeout sfsNormal "+"ldctStandardRoute ldctWizard ldctScript ldctFunction ldctRouteBlock ldctIntegratedReport ldctAnalyticReport ldctReferenceType ldctEDocumentType ldctDialog ldctServerEvents "+"mrcrtNone mrcrtUser mrcrtMaximal mrcrtCustom "+"vtEqual vtGreaterOrEqual vtLessOrEqual vtRange "+"rdYesterday rdToday rdTomorrow rdThisWeek rdThisMonth \ rdThisYear rdNextMonth rdNextWeek rdLastWeek rdLastMonth "+"rdWindow rdFile rdPrinter "+"rdtString rdtNumeric rdtInteger rdtDate rdtReference rdtAccount rdtText rdtPick rdtUnknown rdtLargeInteger rdtDocument "+"reOnChange reOnChangeValues "+"ttGlobal ttLocal ttUser ttSystem "+"ssmBrowse ssmSelect ssmMultiSelect ssmBrowseModal "+"smSelect smLike smCard "+"stNone stAuthenticating stApproving "+"sctString sctStream "+"sstAnsiSort sstNaturalSort "+"svtEqual svtContain "+"soatString soatNumeric soatI\ nteger soatDatetime soatReferenceRecord soatText soatPick soatBoolean soatEDocument soatAccount soatIntegerCollection soatNumericCollection soatStringCollection soatPickCollection soatDatetimeCollection soatBooleanCollection soatReferenceRecordCollection soatEDocumentCollection soatAccountCollection soatContents soatUnknown "+"tarAbortByUser tarAbortByWorkflowException "+"tvtAllWords tvtExactPhrase tvtAnyWord "+"usNone usCompleted usRedSquare usBlueSquare usYellowSquare usGreenSquare usOrangeSqu\ are usPurpleSquare usFollowUp "+"utUnknown utUser utDeveloper utAdministrator utSystemDeveloper utDisconnected "+"btAnd btDetailAnd btOr btNotOr btOnly "+"vmView vmSelect vmNavigation "+"vsmSingle vsmMultiple vsmMultipleCheck vsmNoSelection "+"wfatPrevious wfatNext wfatCancel wfatFinish "+"wfepUndefined wfepText3 wfepText6 wfepText9 wfepSpinEdit wfepDropDown wfepRadioGroup wfepFlag wfepText12 wfepText15 wfepText18 wfepText21 wfepText24 wfepText27 wfepText30 wfepRadioGroupColumn1 wfepRadioGroupCo\ lumn2 wfepRadioGroupColumn3 "+"wfetQueryParameter wfetText wfetDelimiter wfetLabel "+"wptString wptInteger wptNumeric wptBoolean wptDateTime wptPick wptText wptUser wptUserList wptEDocumentInfo wptEDocumentInfoList wptReferenceRecordInfo wptReferenceRecordInfoList wptFolderInfo wptTaskInfo wptContents wptFileName wptDate "+"wsrComplete wsrGoNext wsrGoPrevious wsrCustom wsrCancel wsrGoFinal "+"wstForm wstEDocument wstTaskCard wstReferenceRecordCard wstFinal "+"waAll waPerformers waManual "+"wsbSt\ art wsbFinish wsbNotice wsbStep wsbDecision wsbWait wsbMonitor wsbScript wsbConnector wsbSubTask wsbLifeCycleStage wsbPause "+"wdtInteger wdtFloat wdtString wdtPick wdtDateTime wdtBoolean wdtTask wdtJob wdtFolder wdtEDocument wdtReferenceRecord wdtUser wdtGroup wdtRole wdtIntegerCollection wdtFloatCollection wdtStringCollection wdtPickCollection wdtDateTimeCollection wdtBooleanCollection wdtTaskCollection wdtJobCollection wdtFolderCollection wdtEDocumentCollection wdtReferenceRecordCollection wd\ tUserCollection wdtGroupCollection wdtRoleCollection wdtContents wdtUserList wdtSearchDescription wdtDeadLine wdtPickSet wdtAccountCollection "+"wiLow wiNormal wiHigh "+"wrtSoft wrtHard "+"wsInit wsRunning wsDone wsControlled wsAborted wsContinued "+"wtmFull wtmFromCurrent wtmOnlyCurrent ",system_functions="AddSubString AdjustLineBreaks AmountInWords Analysis ArrayDimCount ArrayHighBound ArrayLowBound ArrayOf ArrayReDim Assert Assigned BeginOfMonth BeginOfPeriod BuildProfilingOperationAnalysis C\ allProcedure CanReadFile CArrayElement CDataSetRequisite ChangeDate ChangeReferenceDataset Char CharPos CheckParam CheckParamValue CompareStrings ConstantExists ControlState ConvertDateStr Copy CopyFile CreateArray CreateCachedReference CreateConnection CreateDialog CreateDualListDialog CreateEditor CreateException CreateFile CreateFolderDialog CreateInputDialog CreateLinkFile CreateList CreateLock CreateMemoryDataSet CreateObject CreateOpenDialog CreateProgress CreateQuery CreateReference Creat\ eReport CreateSaveDialog CreateScript CreateSQLPivotFunction CreateStringList CreateTreeListSelectDialog CSelectSQL CSQL CSubString CurrentUserID CurrentUserName CurrentVersion DataSetLocateEx DateDiff DateTimeDiff DateToStr DayOfWeek DeleteFile DirectoryExists DisableCheckAccessRights DisableCheckFullShowingRestriction DisableMassTaskSendingRestrictions DropTable DupeString EditText EnableCheckAccessRights EnableCheckFullShowingRestriction EnableMassTaskSendingRestrictions EndOfMonth EndOfPerio\ d ExceptionExists ExceptionsOff ExceptionsOn Execute ExecuteProcess Exit ExpandEnvironmentVariables ExtractFileDrive ExtractFileExt ExtractFileName ExtractFilePath ExtractParams FileExists FileSize FindFile FindSubString FirmContext ForceDirectories Format FormatDate FormatNumeric FormatSQLDate FormatString FreeException GetComponent GetComponentLaunchParam GetConstant GetLastException GetReferenceRecord GetRefTypeByRefID GetTableID GetTempFolder IfThen In IndexOf InputDialog InputDialogEx Inter\ activeMode IsFileLocked IsGraphicFile IsNumeric Length LoadString LoadStringFmt LocalTimeToUTC LowerCase Max MessageBox MessageBoxEx MimeDecodeBinary MimeDecodeString MimeEncodeBinary MimeEncodeString Min MoneyInWords MoveFile NewID Now OpenFile Ord Precision Raise ReadCertificateFromFile ReadFile ReferenceCodeByID ReferenceNumber ReferenceRequisiteMode ReferenceRequisiteValue RegionDateSettings RegionNumberSettings RegionTimeSettings RegRead RegWrite RenameFile Replace Round SelectServerCode Se\ lectSQL ServerDateTime SetConstant SetManagedFolderFieldsState ShowConstantsInputDialog ShowMessage Sleep Split SQL SQL2XLSTAB SQLProfilingSendReport StrToDate SubString SubStringCount SystemSetting Time TimeDiff Today Transliterate Trim UpperCase UserStatus UTCToLocalTime ValidateXML VarIsClear VarIsEmpty VarIsNull WorkTimeDiff WriteFile WriteFileEx WriteObjectHistory Анализ БазаДанных БлокЕсть БлокЕстьРасш БлокИнфо БлокСнять БлокСнятьРасш БлокУстановить Ввод ВводМеню ВедС ВедСпр ВерхняяГраница\ Массива ВнешПрогр Восст ВременнаяПапка Время ВыборSQL ВыбратьЗапись ВыделитьСтр Вызвать Выполнить ВыпПрогр ГрафическийФайл ГруппаДополнительно ДатаВремяСерв ДеньНедели ДиалогДаНет ДлинаСтр ДобПодстр ЕПусто ЕслиТо ЕЧисло ЗамПодстр ЗаписьСправочника ЗначПоляСпр ИДТипСпр ИзвлечьДиск ИзвлечьИмяФайла ИзвлечьПуть ИзвлечьРасширение ИзмДат ИзменитьРазмерМассива ИзмеренийМассива ИмяОрг ИмяПоляСпр Индекс ИндикаторЗакрыть ИндикаторОткрыть ИндикаторШаг ИнтерактивныйРежим ИтогТблСпр КодВидВедСпр КодВидСпрПоИ\ Д КодПоAnalit КодСимвола КодСпр КолПодстр КолПроп КонМес Конст КонстЕсть КонстЗнач КонТран КопироватьФайл КопияСтр КПериод КСтрТблСпр Макс МаксСтрТблСпр Массив Меню МенюРасш Мин НаборДанныхНайтиРасш НаимВидСпр НаимПоAnalit НаимСпр НастроитьПереводыСтрок НачМес НачТран НижняяГраницаМассива НомерСпр НПериод Окно Окр Окружение ОтлИнфДобавить ОтлИнфУдалить Отчет ОтчетАнал ОтчетИнт ПапкаСуществует Пауза ПВыборSQL ПереименоватьФайл Переменные ПереместитьФайл Подстр ПоискПодстр ПоискСтр ПолучитьИДТабли\ цы ПользовательДополнительно ПользовательИД ПользовательИмя ПользовательСтатус Прервать ПроверитьПараметр ПроверитьПараметрЗнач ПроверитьУсловие РазбСтр РазнВремя РазнДат РазнДатаВремя РазнРабВремя РегУстВрем РегУстДат РегУстЧсл РедТекст РеестрЗапись РеестрСписокИменПарам РеестрЧтение РеквСпр РеквСпрПр Сегодня Сейчас Сервер СерверПроцессИД СертификатФайлСчитать СжПроб Символ СистемаДиректумКод СистемаИнформация СистемаКод Содержит СоединениеЗакрыть СоединениеОткрыть СоздатьДиалог СоздатьДиалогВы\ бораИзДвухСписков СоздатьДиалогВыбораПапки СоздатьДиалогОткрытияФайла СоздатьДиалогСохраненияФайла СоздатьЗапрос СоздатьИндикатор СоздатьИсключение СоздатьКэшированныйСправочник СоздатьМассив СоздатьНаборДанных СоздатьОбъект СоздатьОтчет СоздатьПапку СоздатьРедактор СоздатьСоединение СоздатьСписок СоздатьСписокСтрок СоздатьСправочник СоздатьСценарий СоздСпр СостСпр Сохр СохрСпр СписокСистем Спр Справочник СпрБлокЕсть СпрБлокСнять СпрБлокСнятьРасш СпрБлокУстановить СпрИзмНабДан СпрКод СпрНомер Сп\ рОбновить СпрОткрыть СпрОтменить СпрПарам СпрПолеЗнач СпрПолеИмя СпрРекв СпрРеквВведЗн СпрРеквНовые СпрРеквПр СпрРеквПредЗн СпрРеквРежим СпрРеквТипТекст СпрСоздать СпрСост СпрСохранить СпрТблИтог СпрТблСтр СпрТблСтрКол СпрТблСтрМакс СпрТблСтрМин СпрТблСтрПред СпрТблСтрСлед СпрТблСтрСозд СпрТблСтрУд СпрТекПредст СпрУдалить СравнитьСтр СтрВерхРегистр СтрНижнРегистр СтрТблСпр СумПроп Сценарий СценарийПарам ТекВерсия ТекОрг Точн Тран Транслитерация УдалитьТаблицу УдалитьФайл УдСпр УдСтрТблСпр Уст Ус\ тановкиКонстант ФайлАтрибутСчитать ФайлАтрибутУстановить ФайлВремя ФайлВремяУстановить ФайлВыбрать ФайлЗанят ФайлЗаписать ФайлИскать ФайлКопировать ФайлМожноЧитать ФайлОткрыть ФайлПереименовать ФайлПерекодировать ФайлПереместить ФайлПросмотреть ФайлРазмер ФайлСоздать ФайлСсылкаСоздать ФайлСуществует ФайлСчитать ФайлУдалить ФмтSQLДат ФмтДат ФмтСтр ФмтЧсл Формат ЦМассивЭлемент ЦНаборДанныхРеквизит ЦПодстр ", predefined_variables="AltState Application CallType ComponentTokens CreatedJobs CreatedNotices ControlState DialogResult Dialogs EDocuments EDocumentVersionSource Folders GlobalIDs Job Jobs InputValue LookUpReference LookUpRequisiteNames LookUpSearch Object ParentComponent Processes References Requisite ReportName Reports Result Scripts Searches SelectedAttachments SelectedItems SelectMode Sender ServerEvents ServiceFactory ShiftState SubTask SystemDialogs Tasks Wizard Wizards Work ВызовСпособ И\ мяОтчета РеквЗнач ",interfaces="IApplication IAccessRights IAccountRepository IAccountSelectionRestrictions IAction IActionList IAdministrationHistoryDescription IAnchors IApplication IArchiveInfo IAttachment IAttachmentList ICheckListBox ICheckPointedList IColumn IComponent IComponentDescription IComponentToken IComponentTokenFactory IComponentTokenInfo ICompRecordInfo IConnection IContents IControl IControlJob IControlJobInfo IControlList ICrypto ICrypto2 ICustomJob ICustomJobI\ nfo ICustomListBox ICustomObjectWizardStep ICustomWork ICustomWorkInfo IDataSet IDataSetAccessInfo IDataSigner IDateCriterion IDateRequisite IDateRequisiteDescription IDateValue IDeaAccessRights IDeaObjectInfo IDevelopmentComponentLock IDialog IDialogFactory IDialogPickRequisiteItems IDialogsFactory IDICSFactory IDocRequisite IDocumentInfo IDualListDialog IECertificate IECertificateInfo IECertificates IEditControl IEditorForm IEdmsExplorer IEdmsObject IEdmsObjectDescription IEdmsObjectFactory IE\ dmsObjectInfo IEDocument IEDocumentAccessRights IEDocumentDescription IEDocumentEditor IEDocumentFactory IEDocumentInfo IEDocumentStorage IEDocumentVersion IEDocumentVersionListDialog IEDocumentVersionSource IEDocumentWizardStep IEDocVerSignature IEDocVersionState IEnabledMode IEncodeProvider IEncrypter IEvent IEventList IException IExternalEvents IExternalHandler IFactory IField IFileDialog IFolder IFolderDescription IFolderDialog IFolderFactory IFolderInfo IForEach IForm IFormTitle IFormWizard\ Step IGlobalIDFactory IGlobalIDInfo IGrid IHasher IHistoryDescription IHyperLinkControl IImageButton IImageControl IInnerPanel IInplaceHint IIntegerCriterion IIntegerList IIntegerRequisite IIntegerValue IISBLEditorForm IJob IJobDescription IJobFactory IJobForm IJobInfo ILabelControl ILargeIntegerCriterion ILargeIntegerRequisite ILargeIntegerValue ILicenseInfo ILifeCycleStage IList IListBox ILocalIDInfo ILocalization ILock IMemoryDataSet IMessagingFactory IMetadataRepository INotice INoticeInfo I\ NumericCriterion INumericRequisite INumericValue IObject IObjectDescription IObjectImporter IObjectInfo IObserver IPanelGroup IPickCriterion IPickProperty IPickRequisite IPickRequisiteDescription IPickRequisiteItem IPickRequisiteItems IPickValue IPrivilege IPrivilegeList IProcess IProcessFactory IProcessMessage IProgress IProperty IPropertyChangeEvent IQuery IReference IReferenceCriterion IReferenceEnabledMode IReferenceFactory IReferenceHistoryDescription IReferenceInfo IReferenceRecordCardWiza\ rdStep IReferenceRequisiteDescription IReferencesFactory IReferenceValue IRefRequisite IReport IReportFactory IRequisite IRequisiteDescription IRequisiteDescriptionList IRequisiteFactory IRichEdit IRouteStep IRule IRuleList ISchemeBlock IScript IScriptFactory ISearchCriteria ISearchCriterion ISearchDescription ISearchFactory ISearchFolderInfo ISearchForObjectDescription ISearchResultRestrictions ISecuredContext ISelectDialog IServerEvent IServerEventFactory IServiceDialog IServiceFactory ISignat\ ure ISignProvider ISignProvider2 ISignProvider3 ISimpleCriterion IStringCriterion IStringList IStringRequisite IStringRequisiteDescription IStringValue ISystemDialogsFactory ISystemInfo ITabSheet ITask ITaskAbortReasonInfo ITaskCardWizardStep ITaskDescription ITaskFactory ITaskInfo ITaskRoute ITextCriterion ITextRequisite ITextValue ITreeListSelectDialog IUser IUserList IValue IView IWebBrowserControl IWizard IWizardAction IWizardFactory IWizardFormElement IWizardParam IWizardPickParam IWizardRe\ ferenceParam IWizardStep IWorkAccessRights IWorkDescription IWorkflowAskableParam IWorkflowAskableParams IWorkflowBlock IWorkflowBlockResult IWorkflowEnabledMode IWorkflowParam IWorkflowPickParam IWorkflowReferenceParam IWorkState IWorkTreeCustomNode IWorkTreeJobNode IWorkTreeTaskNode IXMLEditorForm SBCrypto ",BUILTIN=CONSTANTS+ENUMS,CLASS2=predefined_variables,LITERAL="null true false nil ",NUMBERS={className:"number",begin:hljs.NUMBER_RE,relevance:0},STRINGS={className:"string",variants:[{begin:'\ "',end:'"'},{begin:"'",end:"'"}]},DOCTAGS={className:"doctag",begin:"\\b(?:TODO|DONE|BEGIN|END|STUB|CHG|FIXME|NOTE|BUG|XXX)\\b",relevance:0},ISBL_LINE_COMMENT_MODE={className:"comment",begin:"//",end:"$",relevance:0,contains:[hljs.PHRASAL_WORDS_MODE,DOCTAGS]},ISBL_BLOCK_COMMENT_MODE={className:"comment",begin:"/\\*",end:"\\*/",relevance:0,contains:[hljs.PHRASAL_WORDS_MODE,DOCTAGS]},COMMENTS={variants:[ISBL_LINE_COMMENT_MODE,ISBL_BLOCK_COMMENT_MODE]},KEYWORDS2={$pattern:UNDERSCORE_IDENT_RE,keyword:KEYWORD, built_in:BUILTIN,class:CLASS2,literal:LITERAL},METHODS={begin:"\\.\\s*"+hljs.UNDERSCORE_IDENT_RE,keywords:KEYWORDS2,relevance:0},TYPES2={className:"type",begin:":[ \\t]*("+interfaces.trim().replace(/\s/g,"|")+")",end:"[ \\t]*=",excludeEnd:!0},VARIABLES={className:"variable",keywords:KEYWORDS2,begin:UNDERSCORE_IDENT_RE,relevance:0,contains:[TYPES2,METHODS]},FUNCTION_TITLE=FUNCTION_NAME_IDENT_RE+"\\(";return{name:"ISBL",case_insensitive:!0,keywords:KEYWORDS2,illegal:"\\$|\\?|%|,|;$|~|#|@|recurRegex2(re2,substitution,depth-1))}function java2(hljs){const regex=hljs.regex,JAVA_IDENT_RE="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",GENERIC_IDENT_RE=JAVA_IDENT_RE+recurRegex2("(?:<"+JAVA_IDENT_RE+"~~~(?:\\s*,\\s*"+JAVA_IDENT_RE+ "~~~)*>)?",/~~~/g,2),KEYWORDS2={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long", "float","int","byte","short","double"],built_in:["super","this"]},ANNOTATION={className:"meta",begin:"@"+JAVA_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},PARAMS={className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,relevance:0,contains:[hljs.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:KEYWORDS2,illegal:/<\/|#/,contains:[hljs.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}), {begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[hljs.BACKSLASH_ESCAPE]},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,JAVA_IDENT_RE],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[regex.concat(/(?!else)/,JAVA_IDENT_RE),/\s+/,JAVA_IDENT_RE,/\s+/,/=(?!=)/],className:{1:"type",3:"v\ ariable",5:"operator"}},{begin:[/record/,/\s+/,JAVA_IDENT_RE],className:{1:"keyword",3:"title.class"},contains:[PARAMS,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+GENERIC_IDENT_RE+"\\s+)",hljs.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:KEYWORDS2,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,relevance:0,contains:[ANNOTATION,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,NUMERIC2, hljs.C_BLOCK_COMMENT_MODE]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},NUMERIC2,ANNOTATION]}}return java_1=java2,java_1}var javascript_1,hasRequiredJavascript;function requireJavascript(){if(hasRequiredJavascript)return javascript_1;hasRequiredJavascript=1;const IDENT_RE2="[A-Za-z$_][0-9A-Za-z$_]*",KEYWORDS2=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continu\ e","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],LITERALS2=["true","false","null","undefined","NaN","Infinity"],TYPES2=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayB\ uffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ERROR_TYPES2=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],BUILT_IN_GLOBALS2=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unesca\ pe"],BUILT_IN_VARIABLES2=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],BUILT_INS2=[].concat(BUILT_IN_GLOBALS2,TYPES2,ERROR_TYPES2);function javascript2(hljs){const regex=hljs.regex,hasClosingTag=(match,{after})=>{const tag="",end:""},XML_SELF_CLOSING=/<[A-Za-z0-9\\._:-]+\s*\/>/,XML_TAG={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/, isTrulyOpeningTag:(match,response)=>{const afterMatchIndex=match[0].length+match.index,nextChar=match.input[afterMatchIndex];if(nextChar==="<"||nextChar===","){response.ignoreMatch();return}nextChar===">"&&(hasClosingTag(match,{after:afterMatchIndex})||response.ignoreMatch());let m;const afterMatch=match.input.substring(afterMatchIndex);if(m=afterMatch.match(/^\s*=/)){response.ignoreMatch();return}if((m=afterMatch.match(/^\s+extends\s+/))&&m.index===0){response.ignoreMatch();return}}},KEYWORDS$12={ $pattern:IDENT_RE2,keyword:KEYWORDS2,literal:LITERALS2,built_in:BUILT_INS2,"variable.language":BUILT_IN_VARIABLES2},decimalDigits2="[0-9](_?[0-9])*",frac2=`\\.(${decimalDigits2})`,decimalInteger="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",NUMBER={className:"number",variants:[{begin:`(\\b(${decimalInteger})((${frac2})|\\.)?|(${frac2}))[eE][+-]?(${decimalDigits2})\\b`},{begin:`\\b(${decimalInteger})\\b((${frac2})\\b|\\.)?|(${frac2})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?\ [0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},SUBST={className:"subst",begin:"\\$\\{",end:"\\}",keywords:KEYWORDS$12,contains:[]},HTML_TEMPLATE={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"xml"}},CSS_TEMPLATE={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"css"}},GRAPHQL_TEMPLATE={begin:".?\ gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"graphql"}},TEMPLATE_STRING={className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE,SUBST]},COMMENT={className:"comment",variants:[hljs.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:IDENT_RE$12+ "(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),hljs.C_BLOCK_COMMENT_MODE,hljs.C_LINE_COMMENT_MODE]},SUBST_INTERNALS=[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,HTML_TEMPLATE,CSS_TEMPLATE,GRAPHQL_TEMPLATE,TEMPLATE_STRING,{match:/\$\d+/},NUMBER];SUBST.contains=SUBST_INTERNALS.concat({begin:/\{/,end:/\}/,keywords:KEYWORDS$12,contains:["self"].concat(SUBST_INTERNALS)});const SUBST_AND_COMMENTS=[].concat(COMMENT,SUBST.contains),PARAMS_CONTAINS=SUBST_AND_COMMENTS.concat( [{begin:/(\s*)\(/,end:/\)/,keywords:KEYWORDS$12,contains:["self"].concat(SUBST_AND_COMMENTS)}]),PARAMS={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS$12,contains:PARAMS_CONTAINS},CLASS_OR_EXTENDS={variants:[{match:[/class/,/\s+/,IDENT_RE$12,/\s+/,/extends/,/\s+/,regex.concat(IDENT_RE$12,"(",regex.concat(/\./,IDENT_RE$12),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,IDENT_RE$12],scope:{1:"keyw\ ord",3:"title.class"}}]},CLASS_REFERENCE={relevance:0,match:regex.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...TYPES2,...ERROR_TYPES2]}},USE_STRICT={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},FUNCTION_DEFINITION={variants:[{match:[/function/,/\s+/,IDENT_RE$12,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{ 1:"keyword",3:"title.function"},label:"func.def",contains:[PARAMS],illegal:/%/},UPPER_CASE_CONSTANT={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function noneOf(list2){return regex.concat("(?!",list2.join("|"),")")}const FUNCTION_CALL={match:regex.concat(/\b/,noneOf([...BUILT_IN_GLOBALS2,"super","import"].map(x=>`${x}\\s*\\(`)),IDENT_RE$12,regex.lookahead(/\s*\(/)),className:"title.function",relevance:0},PROPERTY_ACCESS={begin:regex.concat(/\./,regex.lookahead(regex.concat( IDENT_RE$12,/(?![0-9A-Za-z$_(])/))),end:IDENT_RE$12,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},GETTER_OR_SETTER={match:[/get|set/,/\s+/,IDENT_RE$12,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},PARAMS]},FUNC_LEAD_IN_RE="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+hljs.UNDERSCORE_IDENT_RE+")\\s*=>",FUNCTION_VARIABLE={match:[/const|var|let/,/\s+/,IDENT_RE$12,/\s*/,/=\s*/,/(async\s*)?/,regex.lookahead(FUNC_LEAD_IN_RE)],keywords:"\ async",className:{1:"keyword",3:"title.function"},contains:[PARAMS]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:KEYWORDS$12,exports:{PARAMS_CONTAINS,CLASS_REFERENCE},illegal:/#(?![$_A-z])/,contains:[hljs.SHEBANG({label:"shebang",binary:"node",relevance:5}),USE_STRICT,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,HTML_TEMPLATE,CSS_TEMPLATE,GRAPHQL_TEMPLATE,TEMPLATE_STRING,COMMENT,{match:/\$\d+/},NUMBER,CLASS_REFERENCE,{scope:"attr",match:IDENT_RE$12+regex.lookahead(":"),relevance:0}, FUNCTION_VARIABLE,{begin:"("+hljs.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[COMMENT,hljs.REGEXP_MODE,{className:"function",begin:FUNC_LEAD_IN_RE,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:hljs.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS$12,contains:PARAMS_CONTAINS}]}]},{begin:/,/,relevance:0},{match:/\s+/, relevance:0},{variants:[{begin:FRAGMENT.begin,end:FRAGMENT.end},{match:XML_SELF_CLOSING},{begin:XML_TAG.begin,"on:begin":XML_TAG.isTrulyOpeningTag,end:XML_TAG.end}],subLanguage:"xml",contains:[{begin:XML_TAG.begin,end:XML_TAG.end,skip:!0,contains:["self"]}]}]},FUNCTION_DEFINITION,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+hljs.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[PARAMS,hljs.inherit( hljs.TITLE_MODE,{begin:IDENT_RE$12,className:"title.function"})]},{match:/\.\.\./,relevance:0},PROPERTY_ACCESS,{match:"\\$"+IDENT_RE$12,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[PARAMS]},FUNCTION_CALL,UPPER_CASE_CONSTANT,CLASS_OR_EXTENDS,GETTER_OR_SETTER,{match:/\$[(.]/}]}}return javascript_1=javascript2,javascript_1}var jbossCli_1,hasRequiredJbossCli;function requireJbossCli(){if(hasRequiredJbossCli)return jbossCli_1;hasRequiredJbossCli=1;function jbossCli2(hljs){ const PARAMSBLOCK={className:"params",begin:/\(/,end:/\)/,contains:[{begin:/[\w-]+ *=/,returnBegin:!0,relevance:0,contains:[{className:"attr",begin:/[\w-]+/}]}],relevance:0},OPERATION={className:"function",begin:/:[\w\-.]+/,relevance:0},PATH={className:"string",begin:/\B([\/.])[\w\-.\/=]+/},COMMAND_PARAMS={className:"params",begin:/--[\w\-=\/]+/};return{name:"JBoss CLI",aliases:["wildfly-cli"],keywords:{$pattern:"[a-z-]+",keyword:"alias batch cd clear command connect connection-factory connectio\ n-info data-source deploy deployment-info deployment-overlay echo echo-dmr help history if jdbc-driver-info jms-queue|20 jms-topic|20 ls patch pwd quit read-attribute read-operation reload rollout-plan run-batch set shutdown try unalias undeploy unset version xa-data-source",literal:"true false"},contains:[hljs.HASH_COMMENT_MODE,hljs.QUOTE_STRING_MODE,COMMAND_PARAMS,OPERATION,PATH,PARAMSBLOCK]}}return jbossCli_1=jbossCli2,jbossCli_1}var json_1,hasRequiredJson;function requireJson(){if(hasRequiredJson) return json_1;hasRequiredJson=1;function json2(hljs){const ATTRIBUTE={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},PUNCTUATION={match:/[{}[\],:]/,className:"punctuation",relevance:0},LITERALS2=["true","false","null"],LITERALS_MODE={scope:"literal",beginKeywords:LITERALS2.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:LITERALS2},contains:[ATTRIBUTE,PUNCTUATION,hljs.QUOTE_STRING_MODE,LITERALS_MODE,hljs.C_NUMBER_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE], illegal:"\\S"}}return json_1=json2,json_1}var julia_1,hasRequiredJulia;function requireJulia(){if(hasRequiredJulia)return julia_1;hasRequiredJulia=1;function julia2(hljs){const VARIABLE_NAME_RE="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",KEYWORDS2={$pattern:VARIABLE_NAME_RE,keyword:["baremodule","begin","break","catch","ccall","const","continue","do","else","elseif","end","export","false","finally","for","function","global","if","import","in","isa","let","local","macro","module","quot\ e","return","true","try","using","where","while"],literal:["ARGS","C_NULL","DEPOT_PATH","ENDIAN_BOM","ENV","Inf","Inf16","Inf32","Inf64","InsertionSort","LOAD_PATH","MergeSort","NaN","NaN16","NaN32","NaN64","PROGRAM_FILE","QuickSort","RoundDown","RoundFromZero","RoundNearest","RoundNearestTiesAway","RoundNearestTiesUp","RoundToZero","RoundUp","VERSION|0","devnull","false","im","missing","nothing","pi","stderr","stdin","stdout","true","undef","π","ℯ"],built_in:["AbstractArray","AbstractChannel", "AbstractChar","AbstractDict","AbstractDisplay","AbstractFloat","AbstractIrrational","AbstractMatrix","AbstractRange","AbstractSet","AbstractString","AbstractUnitRange","AbstractVecOrMat","AbstractVector","Any","ArgumentError","Array","AssertionError","BigFloat","BigInt","BitArray","BitMatrix","BitSet","BitVector","Bool","BoundsError","CapturedException","CartesianIndex","CartesianIndices","Cchar","Cdouble","Cfloat","Channel","Char","Cint","Cintmax_t","Clong","Clonglong","Cmd","Colon","Complex", "ComplexF16","ComplexF32","ComplexF64","CompositeException","Condition","Cptrdiff_t","Cshort","Csize_t","Cssize_t","Cstring","Cuchar","Cuint","Cuintmax_t","Culong","Culonglong","Cushort","Cvoid","Cwchar_t","Cwstring","DataType","DenseArray","DenseMatrix","DenseVecOrMat","DenseVector","Dict","DimensionMismatch","Dims","DivideError","DomainError","EOFError","Enum","ErrorException","Exception","ExponentialBackOff","Expr","Float16","Float32","Float64","Function","GlobalRef","HTML","IO","IOBuffer","I\ OContext","IOStream","IdDict","IndexCartesian","IndexLinear","IndexStyle","InexactError","InitError","Int","Int128","Int16","Int32","Int64","Int8","Integer","InterruptException","InvalidStateException","Irrational","KeyError","LinRange","LineNumberNode","LinearIndices","LoadError","MIME","Matrix","Method","MethodError","Missing","MissingException","Module","NTuple","NamedTuple","Nothing","Number","OrdinalRange","OutOfMemoryError","OverflowError","Pair","PartialQuickSort","PermutedDimsArray","Pip\ e","ProcessFailedException","Ptr","QuoteNode","Rational","RawFD","ReadOnlyMemoryError","Real","ReentrantLock","Ref","Regex","RegexMatch","RoundingMode","SegmentationFault","Set","Signed","Some","StackOverflowError","StepRange","StepRangeLen","StridedArray","StridedMatrix","StridedVecOrMat","StridedVector","String","StringIndexError","SubArray","SubString","SubstitutionString","Symbol","SystemError","Task","TaskFailedException","Text","TextDisplay","Timer","Tuple","Type","TypeError","TypeVar","UI\ nt","UInt128","UInt16","UInt32","UInt64","UInt8","UndefInitializer","UndefKeywordError","UndefRefError","UndefVarError","Union","UnionAll","UnitRange","Unsigned","Val","Vararg","VecElement","VecOrMat","Vector","VersionNumber","WeakKeyDict","WeakRef"]},DEFAULT={keywords:KEYWORDS2,illegal:/<\//},NUMBER={className:"number",begin:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,relevance:0},CHAR={className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/}, INTERPOLATION={className:"subst",begin:/\$\(/,end:/\)/,keywords:KEYWORDS2},INTERPOLATED_VARIABLE={className:"variable",begin:"\\$"+VARIABLE_NAME_RE},STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE,INTERPOLATION,INTERPOLATED_VARIABLE],variants:[{begin:/\w*"""/,end:/"""\w*/,relevance:10},{begin:/\w*"/,end:/"\w*/}]},COMMAND={className:"string",contains:[hljs.BACKSLASH_ESCAPE,INTERPOLATION,INTERPOLATED_VARIABLE],begin:"`",end:"`"},MACROCALL={className:"meta",begin:"@"+VARIABLE_NAME_RE},COMMENT={ className:"comment",variants:[{begin:"#=",end:"=#",relevance:10},{begin:"#",end:"$"}]};return DEFAULT.name="Julia",DEFAULT.contains=[NUMBER,CHAR,STRING,COMMAND,MACROCALL,COMMENT,hljs.HASH_COMMENT_MODE,{className:"keyword",begin:"\\b(((abstract|primitive)\\s+)type|(mutable\\s+)?struct)\\b"},{begin:/<:/}],INTERPOLATION.contains=DEFAULT.contains,DEFAULT}return julia_1=julia2,julia_1}var juliaRepl_1,hasRequiredJuliaRepl;function requireJuliaRepl(){if(hasRequiredJuliaRepl)return juliaRepl_1;hasRequiredJuliaRepl= 1;function juliaRepl2(hljs){return{name:"Julia REPL",contains:[{className:"meta.prompt",begin:/^julia>/,relevance:10,starts:{end:/^(?![ ]{6})/,subLanguage:"julia"}}],aliases:["jldoctest"]}}return juliaRepl_1=juliaRepl2,juliaRepl_1}var kotlin_1,hasRequiredKotlin;function requireKotlin(){if(hasRequiredKotlin)return kotlin_1;hasRequiredKotlin=1;var decimalDigits2="[0-9](_*[0-9])*",frac2=`\\.(${decimalDigits2})`,hexDigits2="[0-9a-fA-F](_*[0-9a-fA-F])*",NUMERIC2={className:"number",variants:[{begin:`\ (\\b(${decimalDigits2})((${frac2})|\\.)?|(${frac2}))[eE][+-]?(${decimalDigits2})[fFdD]?\\b`},{begin:`\\b(${decimalDigits2})((${frac2})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${frac2})[fFdD]?\\b`},{begin:`\\b(${decimalDigits2})[fFdD]\\b`},{begin:`\\b0[xX]((${hexDigits2})\\.?|(${hexDigits2})?\\.(${hexDigits2}))[pP][+-]?(${decimalDigits2})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${hexDigits2})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\\ b"}],relevance:0};function kotlin2(hljs){const KEYWORDS2={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean\ Float Double Void Unit Nothing",literal:"true false null"},KEYWORDS_WITH_LABEL={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},LABEL={className:"symbol",begin:hljs.UNDERSCORE_IDENT_RE+"@"},SUBST={className:"subst",begin:/\$\{/,end:/\}/,contains:[hljs.C_NUMBER_MODE]},VARIABLE={className:"variable",begin:"\\$"+hljs.UNDERSCORE_IDENT_RE},STRING={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[VARIABLE,SUBST]}, {begin:"'",end:"'",illegal:/\n/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[hljs.BACKSLASH_ESCAPE,VARIABLE,SUBST]}]};SUBST.contains.push(STRING);const ANNOTATION_USE_SITE={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+hljs.UNDERSCORE_IDENT_RE+")?"},ANNOTATION={className:"meta",begin:"@"+hljs.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[hljs.inherit(STRING,{className:"string"}),"self"]}]},KOTLIN_NUMBER_MODE=NUMERIC2, KOTLIN_NESTED_COMMENT=hljs.COMMENT("/\\*","\\*/",{contains:[hljs.C_BLOCK_COMMENT_MODE]}),KOTLIN_PAREN_TYPE={variants:[{className:"type",begin:hljs.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},KOTLIN_PAREN_TYPE2=KOTLIN_PAREN_TYPE;return KOTLIN_PAREN_TYPE2.variants[1].contains=[KOTLIN_PAREN_TYPE],KOTLIN_PAREN_TYPE.variants[1].contains=[KOTLIN_PAREN_TYPE2],{name:"Kotlin",aliases:["kt","kts"],keywords:KEYWORDS2,contains:[hljs.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"do\ ctag",begin:"@[A-Za-z]+"}]}),hljs.C_LINE_COMMENT_MODE,KOTLIN_NESTED_COMMENT,KEYWORDS_WITH_LABEL,LABEL,ANNOTATION_USE_SITE,ANNOTATION,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:KEYWORDS2,relevance:5,contains:[{begin:hljs.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[hljs.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:KEYWORDS2, relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[KOTLIN_PAREN_TYPE,hljs.C_LINE_COMMENT_MODE,KOTLIN_NESTED_COMMENT],relevance:0},hljs.C_LINE_COMMENT_MODE,KOTLIN_NESTED_COMMENT,ANNOTATION_USE_SITE,ANNOTATION,STRING,hljs.C_NUMBER_MODE]},KOTLIN_NESTED_COMMENT]},{begin:[/class|interface|trait/,/\s+/,hljs.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public \ protected internal private constructor"},hljs.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},ANNOTATION_USE_SITE,ANNOTATION]},STRING,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` `},KOTLIN_NUMBER_MODE]}}return kotlin_1=kotlin2,kotlin_1}var lasso_1,hasRequiredLasso;function requireLasso(){if(hasRequiredLasso)return lasso_1;hasRequiredLasso=1;function lasso2(hljs){const LASSO_IDENT_RE="[a-zA-Z_][\\w.]*",LASSO_ANGLE_RE="<\\?(lasso(script)?|=)",LASSO_CLOSE_RE="\\]|\\?>",LASSO_KEYWORDS={$pattern:LASSO_IDENT_RE+"|&[lg]t;",literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer \ map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgro\ up link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else fail_if fail_ifnot fail if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define d\ escending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},HTML_COMMENT=hljs.COMMENT("",{relevance:0}),LASSO_NOPROCESS={className:"meta",begin:"\\[noprocess\\]",starts:{end:"\\[/noprocess\\]",returnEnd:!0,contains:[HTML_COMMENT]}},LASSO_START={className:"meta",begin:"\\[/noprocess|"+LASSO_ANGLE_RE},LASSO_DATAMEMBER={className:"\ symbol",begin:"'"+LASSO_IDENT_RE+"'"},LASSO_CODE=[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.inherit(hljs.C_NUMBER_MODE,{begin:hljs.C_NUMBER_RE+"|(-?infinity|NaN)\\b"}),hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"`",end:"`"},{variants:[{begin:"[#$]"+LASSO_IDENT_RE},{begin:"#",end:"\\d+",illegal:"\\W"}]},{className:"type",begin:"::\\s*",end:LASSO_IDENT_RE,illegal:"\\W"},{className:"params",variants:[ {begin:"-(?!infinity)"+LASSO_IDENT_RE,relevance:0},{begin:"(\\.\\.\\.)"}]},{begin:/(->|\.)\s*/,relevance:0,contains:[LASSO_DATAMEMBER]},{className:"class",beginKeywords:"define",returnEnd:!0,end:"\\(|=>",contains:[hljs.inherit(hljs.TITLE_MODE,{begin:LASSO_IDENT_RE+"(=(?!>))?|[-+*/%](?!>)"})]}];return{name:"Lasso",aliases:["ls","lassoscript"],case_insensitive:!0,keywords:LASSO_KEYWORDS,contains:[{className:"meta",begin:LASSO_CLOSE_RE,relevance:0,starts:{end:"\\[|"+LASSO_ANGLE_RE,returnEnd:!0,relevance:0, contains:[HTML_COMMENT]}},LASSO_NOPROCESS,LASSO_START,{className:"meta",begin:"\\[no_square_brackets",starts:{end:"\\[/no_square_brackets\\]",keywords:LASSO_KEYWORDS,contains:[{className:"meta",begin:LASSO_CLOSE_RE,relevance:0,starts:{end:"\\[noprocess\\]|"+LASSO_ANGLE_RE,returnEnd:!0,contains:[HTML_COMMENT]}},LASSO_NOPROCESS,LASSO_START].concat(LASSO_CODE)}},{className:"meta",begin:"\\[",relevance:0},{className:"meta",begin:"^#!",end:"lasso9$",relevance:10}].concat(LASSO_CODE)}}return lasso_1=lasso2, lasso_1}var latex_1,hasRequiredLatex;function requireLatex(){if(hasRequiredLatex)return latex_1;hasRequiredLatex=1;function latex2(hljs){const KNOWN_CONTROL_WORDS=hljs.regex.either(...["(?:NeedsTeXFormat|RequirePackage|GetIdInfo)","Provides(?:Expl)?(?:Package|Class|File)","(?:DeclareOption|ProcessOptions)","(?:documentclass|usepackage|input|include)","makeat(?:letter|other)","ExplSyntax(?:On|Off)","(?:new|renew|provide)?command","(?:re)newenvironment","(?:New|Renew|Provide|Declare)(?:Expandable)\ ?DocumentCommand","(?:New|Renew|Provide|Declare)DocumentEnvironment","(?:(?:e|g|x)?def|let)","(?:begin|end)","(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph)","caption","(?:label|(?:eq|page|name)?ref|(?:paren|foot|super)?cite)","(?:alpha|beta|[Gg]amma|[Dd]elta|(?:var)?epsilon|zeta|eta|[Tt]heta|vartheta)","(?:iota|(?:var)?kappa|[Ll]ambda|mu|nu|[Xx]i|[Pp]i|varpi|(?:var)rho)","(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)","(?:frac|sum|prod|lim|infty|times|sqrt|leq|g\ eq|left|right|middle|[bB]igg?)","(?:[lr]angle|q?quad|[lcvdi]?dots|d?dot|hat|tilde|bar)"].map(word=>word+"(?![a-zA-Z@:_])")),L3_REGEX=new RegExp(["(?:__)?[a-zA-Z]{2,}_[a-zA-Z](?:_?[a-zA-Z])+:[a-zA-Z]*","[lgc]__?[a-zA-Z](?:_?[a-zA-Z])*_[a-zA-Z]{2,}","[qs]__?[a-zA-Z](?:_?[a-zA-Z])+","use(?:_i)?:[a-zA-Z]*","(?:else|fi|or):","(?:if|cs|exp):w","(?:hbox|vbox):n","::[a-zA-Z]_unbraced","::[a-zA-Z:]"].map(pattern2=>pattern2+"(?![a-zA-Z:_])").join("|")),L2_VARIANTS=[{begin:/[a-zA-Z@]+/},{begin:/[^a-zA-Z@]?/}], DOUBLE_CARET_VARIANTS=[{begin:/\^{6}[0-9a-f]{6}/},{begin:/\^{5}[0-9a-f]{5}/},{begin:/\^{4}[0-9a-f]{4}/},{begin:/\^{3}[0-9a-f]{3}/},{begin:/\^{2}[0-9a-f]{2}/},{begin:/\^{2}[\u0000-\u007f]/}],CONTROL_SEQUENCE={className:"keyword",begin:/\\/,relevance:0,contains:[{endsParent:!0,begin:KNOWN_CONTROL_WORDS},{endsParent:!0,begin:L3_REGEX},{endsParent:!0,variants:DOUBLE_CARET_VARIANTS},{endsParent:!0,relevance:0,variants:L2_VARIANTS}]},MACRO_PARAM={className:"params",relevance:0,begin:/#+\d?/},DOUBLE_CARET_CHAR={ variants:DOUBLE_CARET_VARIANTS},SPECIAL_CATCODE={className:"built_in",relevance:0,begin:/[$&^_]/},MAGIC_COMMENT={className:"meta",begin:/% ?!(T[eE]X|tex|BIB|bib)/,end:"$",relevance:10},COMMENT=hljs.COMMENT("%","$",{relevance:0}),EVERYTHING_BUT_VERBATIM=[CONTROL_SEQUENCE,MACRO_PARAM,DOUBLE_CARET_CHAR,SPECIAL_CATCODE,MAGIC_COMMENT,COMMENT],BRACE_GROUP_NO_VERBATIM={begin:/\{/,end:/\}/,relevance:0,contains:["self",...EVERYTHING_BUT_VERBATIM]},ARGUMENT_BRACES=hljs.inherit(BRACE_GROUP_NO_VERBATIM,{relevance:0, endsParent:!0,contains:[BRACE_GROUP_NO_VERBATIM,...EVERYTHING_BUT_VERBATIM]}),ARGUMENT_BRACKETS={begin:/\[/,end:/\]/,endsParent:!0,relevance:0,contains:[BRACE_GROUP_NO_VERBATIM,...EVERYTHING_BUT_VERBATIM]},SPACE_GOBBLER={begin:/\s+/,relevance:0},ARGUMENT_M=[ARGUMENT_BRACES],ARGUMENT_O=[ARGUMENT_BRACKETS],ARGUMENT_AND_THEN=function(arg,starts_mode){return{contains:[SPACE_GOBBLER],starts:{relevance:0,contains:arg,starts:starts_mode}}},CSNAME=function(csname,starts_mode){return{begin:"\\\\"+csname+ "(?![a-zA-Z@:_])",keywords:{$pattern:/\\[a-zA-Z]+/,keyword:"\\"+csname},relevance:0,contains:[SPACE_GOBBLER],starts:starts_mode}},BEGIN_ENV=function(envname,starts_mode){return hljs.inherit({begin:"\\\\begin(?=[ ]*(\\r?\\n[ ]*)?\\{"+envname+"\\})",keywords:{$pattern:/\\[a-zA-Z]+/,keyword:"\\begin"},relevance:0},ARGUMENT_AND_THEN(ARGUMENT_M,starts_mode))},VERBATIM_DELIMITED_EQUAL=(innerName="string")=>hljs.END_SAME_AS_BEGIN({className:innerName,begin:/(.|\r?\n)/,end:/(.|\r?\n)/,excludeBegin:!0, excludeEnd:!0,endsParent:!0}),VERBATIM_DELIMITED_ENV=function(envname){return{className:"string",end:"(?=\\\\end\\{"+envname+"\\})"}},VERBATIM_DELIMITED_BRACES=(innerName="string")=>({relevance:0,begin:/\{/,starts:{endsParent:!0,contains:[{className:innerName,end:/(?=\})/,endsParent:!0,contains:[{begin:/\{/,end:/\}/,relevance:0,contains:["self"]}]}]}}),VERBATIM=[...["verb","lstinline"].map(csname=>CSNAME(csname,{contains:[VERBATIM_DELIMITED_EQUAL()]})),CSNAME("mint",ARGUMENT_AND_THEN(ARGUMENT_M, {contains:[VERBATIM_DELIMITED_EQUAL()]})),CSNAME("mintinline",ARGUMENT_AND_THEN(ARGUMENT_M,{contains:[VERBATIM_DELIMITED_BRACES(),VERBATIM_DELIMITED_EQUAL()]})),CSNAME("url",{contains:[VERBATIM_DELIMITED_BRACES("link"),VERBATIM_DELIMITED_BRACES("link")]}),CSNAME("hyperref",{contains:[VERBATIM_DELIMITED_BRACES("link")]}),CSNAME("href",ARGUMENT_AND_THEN(ARGUMENT_O,{contains:[VERBATIM_DELIMITED_BRACES("link")]})),...[].concat(...["","\\*"].map(suffix=>[BEGIN_ENV("verbatim"+suffix,VERBATIM_DELIMITED_ENV( "verbatim"+suffix)),BEGIN_ENV("filecontents"+suffix,ARGUMENT_AND_THEN(ARGUMENT_M,VERBATIM_DELIMITED_ENV("filecontents"+suffix))),...["","B","L"].map(prefix=>BEGIN_ENV(prefix+"Verbatim"+suffix,ARGUMENT_AND_THEN(ARGUMENT_O,VERBATIM_DELIMITED_ENV(prefix+"Verbatim"+suffix))))])),BEGIN_ENV("minted",ARGUMENT_AND_THEN(ARGUMENT_O,ARGUMENT_AND_THEN(ARGUMENT_M,VERBATIM_DELIMITED_ENV("minted"))))];return{name:"LaTeX",aliases:["tex"],contains:[...VERBATIM,...EVERYTHING_BUT_VERBATIM]}}return latex_1=latex2,latex_1} var ldif_1,hasRequiredLdif;function requireLdif(){if(hasRequiredLdif)return ldif_1;hasRequiredLdif=1;function ldif2(hljs){return{name:"LDIF",contains:[{className:"attribute",match:"^dn(?=:)",relevance:10},{className:"attribute",match:"^\\w+(?=:)"},{className:"literal",match:"^-"},hljs.HASH_COMMENT_MODE]}}return ldif_1=ldif2,ldif_1}var leaf_1,hasRequiredLeaf;function requireLeaf(){if(hasRequiredLeaf)return leaf_1;hasRequiredLeaf=1;function leaf2(hljs){const IDENT=/([A-Za-z_][A-Za-z_0-9]*)?/,PARAMS={ scope:"params",begin:/\(/,end:/\)(?=\:?)/,endsParent:!0,relevance:7,contains:[{scope:"string",begin:'"',end:'"'},{scope:"keyword",match:["true","false","in"].join("|")},{scope:"variable",match:/[A-Za-z_][A-Za-z_0-9]*/},{scope:"operator",match:/\+|\-|\*|\/|\%|\=\=|\=|\!|\>|\<|\&\&|\|\|/}]},INSIDE_DISPATCH={match:[IDENT,/(?=\()/],scope:{1:"keyword"},contains:[PARAMS]};return PARAMS.contains.unshift(INSIDE_DISPATCH),{name:"Leaf",contains:[{match:[/#+/,IDENT,/(?=\()/],scope:{1:"punctuation",2:"keywo\ rd"},starts:{contains:[{match:/\:/,scope:"punctuation"}]},contains:[PARAMS]},{match:[/#+/,IDENT,/:?/],scope:{1:"punctuation",2:"keyword",3:"punctuation"}}]}}return leaf_1=leaf2,leaf_1}var less_1,hasRequiredLess;function requireLess(){if(hasRequiredLess)return less_1;hasRequiredLess=1;const MODES2=hljs=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:hljs.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"\ built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:hljs.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),HTML_TAGS2=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas", "caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],SVG_TAGS2=["defs","g","m\ arker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],TAGS2=[...HTML_TAGS2,...SVG_TAGS2],MEDIA_FEATURES2=[ "any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),PSEUDO_CLASSES2=[ "active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","pas\ t","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),PSEUDO_ELEMENTS2=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ATTRIBUTES2=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-com\ position","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position", "background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","borde\ r-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline\ -style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex\ -group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block\ -size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrin\ k","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-va\ riant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","he\ ight","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-styl\ e-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","m\ ask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outlin\ e-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right", "padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end", "scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop", "scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine\ -upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-\ scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range", "voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),PSEUDO_SELECTORS2=PSEUDO_CLASSES2.concat(PSEUDO_ELEMENTS2).sort().reverse();function less2(hljs){const modes2=MODES2(hljs),PSEUDO_SELECTORS$1=PSEUDO_SELECTORS2,AT_MODIFIERS="and or not only",IDENT_RE2="[\\w-]+",INTERP_IDENT_RE="("+IDENT_RE2+"|@\\{"+IDENT_RE2+"\\})",RULES=[],VALUE_MODES=[],STRING_MODE=function(c2){ return{className:"string",begin:"~?"+c2+".*?"+c2}},IDENT_MODE=function(name,begin,relevance){return{className:name,begin,relevance}},AT_KEYWORDS={$pattern:/[a-z-]+/,keyword:AT_MODIFIERS,attribute:MEDIA_FEATURES2.join(" ")},PARENS_MODE={begin:"\\(",end:"\\)",contains:VALUE_MODES,keywords:AT_KEYWORDS,relevance:0};VALUE_MODES.push(hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRING_MODE("'"),STRING_MODE('"'),modes2.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\ \\n]",excludeEnd:!0}},modes2.HEXCOLOR,PARENS_MODE,IDENT_MODE("variable","@@?"+IDENT_RE2,10),IDENT_MODE("variable","@\\{"+IDENT_RE2+"\\}"),IDENT_MODE("built_in","~?`[^`]*?`"),{className:"attribute",begin:IDENT_RE2+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},modes2.IMPORTANT,{beginKeywords:"and not"},modes2.FUNCTION_DISPATCH);const VALUE_WITH_RULESETS=VALUE_MODES.concat({begin:/\{/,end:/\}/,contains:RULES}),MIXIN_GUARD_MODE={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and no\ t"}].concat(VALUE_MODES)},RULE_MODE={begin:INTERP_IDENT_RE+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},modes2.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ATTRIBUTES2.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:VALUE_MODES}}]},AT_RULE_MODE={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:AT_KEYWORDS, returnEnd:!0,contains:VALUE_MODES,relevance:0}},VAR_RULE_MODE={className:"variable",variants:[{begin:"@"+IDENT_RE2+"\\s*:",relevance:15},{begin:"@"+IDENT_RE2}],starts:{end:"[;}]",returnEnd:!0,contains:VALUE_WITH_RULESETS}},SELECTOR_MODE={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:INTERP_IDENT_RE,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,MIXIN_GUARD_MODE,IDENT_MODE("keyword","all\\b"),IDENT_MODE("vari\ able","@\\{"+IDENT_RE2+"\\}"),{begin:"\\b("+TAGS2.join("|")+")\\b",className:"selector-tag"},modes2.CSS_NUMBER_MODE,IDENT_MODE("selector-tag",INTERP_IDENT_RE,0),IDENT_MODE("selector-id","#"+INTERP_IDENT_RE),IDENT_MODE("selector-class","\\."+INTERP_IDENT_RE,0),IDENT_MODE("selector-tag","&",0),modes2.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+PSEUDO_CLASSES2.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+PSEUDO_ELEMENTS2.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0, contains:VALUE_WITH_RULESETS},{begin:"!important"},modes2.FUNCTION_DISPATCH]},PSEUDO_SELECTOR_MODE={begin:IDENT_RE2+`:(:)?(${PSEUDO_SELECTORS$1.join("|")})`,returnBegin:!0,contains:[SELECTOR_MODE]};return RULES.push(hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,AT_RULE_MODE,VAR_RULE_MODE,PSEUDO_SELECTOR_MODE,RULE_MODE,SELECTOR_MODE,MIXIN_GUARD_MODE,modes2.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:RULES}}return less_1=less2,less_1}var lisp_1,hasRequiredLisp; function requireLisp(){if(hasRequiredLisp)return lisp_1;hasRequiredLisp=1;function lisp2(hljs){const LISP_IDENT_RE="[a-zA-Z_\\-+\\*\\/<=>&#][a-zA-Z0-9_\\-+*\\/<=>&#!]*",MEC_RE="\\|[^]*?\\|",LISP_SIMPLE_NUMBER_RE="(-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|-)?\\d+)?",LITERAL={className:"literal",begin:"\\b(t{1}|nil)\\b"},NUMBER={className:"number",variants:[{begin:LISP_SIMPLE_NUMBER_RE,relevance:0},{begin:"#(b|B)[0-1]+(/[0-1]+)?"},{begin:"#(o|O)[0-7]+(/[0-7]+)?"},{begin:"#(x|X)[0-9a\ -fA-F]+(/[0-9a-fA-F]+)?"},{begin:"#(c|C)\\("+LISP_SIMPLE_NUMBER_RE+" +"+LISP_SIMPLE_NUMBER_RE,end:"\\)"}]},STRING=hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),COMMENT=hljs.COMMENT(";","$",{relevance:0}),VARIABLE={begin:"\\*",end:"\\*"},KEYWORD={className:"symbol",begin:"[:&]"+LISP_IDENT_RE},IDENT={begin:LISP_IDENT_RE,relevance:0},MEC={begin:MEC_RE},QUOTED={contains:[NUMBER,STRING,VARIABLE,KEYWORD,{begin:"\\(",end:"\\)",contains:["self",LITERAL,STRING,NUMBER,IDENT]},IDENT],variants:[{begin:"\ ['`]\\(",end:"\\)"},{begin:"\\(quote ",end:"\\)",keywords:{name:"quote"}},{begin:"'"+MEC_RE}]},QUOTED_ATOM={variants:[{begin:"'"+LISP_IDENT_RE},{begin:"#'"+LISP_IDENT_RE+"(::"+LISP_IDENT_RE+")*"}]},LIST={begin:"\\(\\s*",end:"\\)"},BODY={endsWithParent:!0,relevance:0};return LIST.contains=[{className:"name",variants:[{begin:LISP_IDENT_RE,relevance:0},{begin:MEC_RE}]},BODY],BODY.contains=[QUOTED,QUOTED_ATOM,LIST,LITERAL,NUMBER,STRING,COMMENT,VARIABLE,KEYWORD,MEC,IDENT],{name:"Lisp",illegal:/\S/,contains:[ NUMBER,hljs.SHEBANG(),LITERAL,STRING,COMMENT,QUOTED,QUOTED_ATOM,LIST,IDENT]}}return lisp_1=lisp2,lisp_1}var livecodeserver_1,hasRequiredLivecodeserver;function requireLivecodeserver(){if(hasRequiredLivecodeserver)return livecodeserver_1;hasRequiredLivecodeserver=1;function livecodeserver2(hljs){const VARIABLE={className:"variable",variants:[{begin:"\\b([gtps][A-Z]{1}[a-zA-Z0-9]*)(\\[.+\\])?(?:\\s*?)"},{begin:"\\$_[A-Z]+"}],relevance:0},COMMENT_MODES=[hljs.C_BLOCK_COMMENT_MODE,hljs.HASH_COMMENT_MODE, hljs.COMMENT("--","$"),hljs.COMMENT("[^:]//","$")],TITLE1=hljs.inherit(hljs.TITLE_MODE,{variants:[{begin:"\\b_*rig[A-Z][A-Za-z0-9_\\-]*"},{begin:"\\b_[a-z0-9\\-]+"}]}),TITLE2=hljs.inherit(hljs.TITLE_MODE,{begin:"\\b([A-Za-z0-9_\\-]+)\\b"});return{name:"LiveCode",case_insensitive:!1,keywords:{keyword:"$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER codepoint codepoints segment segments codeunit codeunits sentence sentences trueWord trueWords paragr\ aph after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word words fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat end repeat URL in try into switch to words\ https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within contains ends with begins the keys of keys",literal:"SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE\ TWO six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five quote empty one true return cr linefeed right backslash null seven tab three two RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK",built_in:"put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg avgDev base64Decode base64Encode baseConvert binaryDecode binaryEncode byteOf\ fset byteToNum cachedURL cachedURLs charToNum cipherNames codepointOffset codepointProperty codepointToNum codeunitOffset commandNames compound compress constantNames cos date dateFormat decompress difference directories diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames geometricMean global globals hasMemory harmonicMean hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset keys len length libURLErrorData libUrlFormDat\ a libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge messageAuthenticationCode messageDigest millisec millisecs millisecond milliseconds min monthNames nativeCharToNum normalizeText num number numToByte numToChar numToCodepoint numToNativeChar offset open openfiles openProcesses openProcessI\ Ds openSockets paragraphOffset paramCount param params peerAddress pendingMessages platform popStdDev populationStandardDeviation populationVariance popVariance processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered revDatabaseColumnTypes revDatabaseConnect\ Result revDatabaseCursors revDatabaseID revDatabaseTableNames revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext revdb_moveprev revdb_\ query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLCreateTreeFromFileWithNamespaces revXMLCreateTreeWithNamespaces revXMLDataFromXPathQuery revXMLEvaluateXPath revXMLFirstChild revXMLMatchingNode re\ vXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_Execute revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree revXMLTrees revXMLValidateDTD revZipDescribe\ Item revZipEnumerateItems revZipOpenArchives round sampVariance sec secs seconds sentenceOffset sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound stdDev sum sysError systemVersion tan tempName textDecode textEncode tick ticks time to tokenOffset toLower toUpper transpose truewordOffset trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus uuid value variableNames variance version waitDepth weekdayNames wordOffset xsltApplyStylesheet xsltApplyStylesheet\ FromFile xsltLoadStylesheet xsltLoadStylesheetFromFile add breakpoint cancel clear local variable file word line folder directory URL close socket process combine constant convert create new alias folder directory decrypt delete variable word line folder directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback libURLSetDriver libURLSetCustomHTTPHeaders libUrlS\ etExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime libURLSetStatusCallback load extension loadedExtensions multiply socket prepare process post seek rel relative read from process rename replace require resetAll resolve revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirst\ Record revMoveToLastRecord revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData revZipAddItemWithFile revZipAddUncompressedItemWithData\ revZipAddUncompressedItemWithFile revZipCancel revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split start stop subtract symmetric union unload vectorDotProduct wait write"},contains:[VARIABLE,{className:"keyword",begin:"\\bend\\sif\\b"},{className:"function",beginKeywords:"function",end:"$",contains:[VARIABLE,TITLE2,hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE,hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE,TITLE1]},{className:"function",begin:"\\bend\\s+",end:"$",keywords:"end",contains:[TITLE2,TITLE1],relevance:0},{beginKeywords:"command on",end:"$",contains:[VARIABLE,TITLE2,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE,TITLE1]},{className:"meta",variants:[{begin:"<\\?(rev|lc|livecode)",relevance:10},{begin:"<\\?"},{begin:"\\?>"}]},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE,TITLE1].concat(COMMENT_MODES),illegal:";$|^\\[|^=|&|\\{"}}return livecodeserver_1=livecodeserver2,livecodeserver_1}var livescript_1,hasRequiredLivescript;function requireLivescript(){if(hasRequiredLivescript)return livescript_1;hasRequiredLivescript=1;const KEYWORDS2=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield", "const","class","debugger","async","await","static","import","from","export","extends","using"],LITERALS2=["true","false","null","undefined","NaN","Infinity"],TYPES2=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics", "DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ERROR_TYPES2=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],BUILT_IN_GLOBALS2=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],BUILT_INS2=[].concat(BUILT_IN_GLOBALS2, TYPES2,ERROR_TYPES2);function livescript2(hljs){const LIVESCRIPT_BUILT_INS=["npm","print"],LIVESCRIPT_LITERALS=["yes","no","on","off","it","that","void"],LIVESCRIPT_KEYWORDS=["then","unless","until","loop","of","by","when","and","or","is","isnt","not","it","that","otherwise","from","to","til","fallthrough","case","enum","native","list","map","__hasProp","__extends","__slice","__bind","__indexOf"],KEYWORDS$12={keyword:KEYWORDS2.concat(LIVESCRIPT_KEYWORDS),literal:LITERALS2.concat(LIVESCRIPT_LITERALS), built_in:BUILT_INS2.concat(LIVESCRIPT_BUILT_INS)},JS_IDENT_RE="[A-Za-z$_](?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*",TITLE=hljs.inherit(hljs.TITLE_MODE,{begin:JS_IDENT_RE}),SUBST={className:"subst",begin:/#\{/,end:/\}/,keywords:KEYWORDS$12},SUBST_SIMPLE={className:"subst",begin:/#[A-Za-z$_]/,end:/(?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,keywords:KEYWORDS$12},EXPRESSIONS=[hljs.BINARY_NUMBER_MODE,{className:"number",begin:"(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*\ )",relevance:0,starts:{end:"(\\s*/)?",relevance:0}},{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[hljs.BACKSLASH_ESCAPE,SUBST,SUBST_SIMPLE]},{begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,SUBST,SUBST_SIMPLE]},{begin:/\\/,end:/(\s|$)/,excludeEnd:!0}]},{className:"regexp",variants:[{begin:"//",end:"//[gim]*",contains:[SUBST,hljs.HASH_COMMENT_MODE]},{begin:/\/(?![ *])(\\.|[^\\\n])*?\/[gim]*(?=\W)/}]}, {begin:"@"+JS_IDENT_RE},{begin:"``",end:"``",excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"}];SUBST.contains=EXPRESSIONS;const PARAMS={className:"params",begin:"\\(",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:KEYWORDS$12,contains:["self"].concat(EXPRESSIONS)}]},SYMBOLS={begin:"(#=>|=>|\\|>>|-?->|!->)"},CLASS_DEFINITION={variants:[{match:[/class\s+/,JS_IDENT_RE,/\s+extends\s+/,JS_IDENT_RE]},{match:[/class\s+/,JS_IDENT_RE]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:KEYWORDS$12}; return{name:"LiveScript",aliases:["ls"],keywords:KEYWORDS$12,illegal:/\/\*/,contains:EXPRESSIONS.concat([hljs.COMMENT("\\/\\*","\\*\\/"),hljs.HASH_COMMENT_MODE,SYMBOLS,{className:"function",contains:[TITLE,PARAMS],returnBegin:!0,variants:[{begin:"("+JS_IDENT_RE+"\\s*(?:=|:=)\\s*)?(\\(.*\\)\\s*)?\\B->\\*?",end:"->\\*?"},{begin:"("+JS_IDENT_RE+"\\s*(?:=|:=)\\s*)?!?(\\(.*\\)\\s*)?\\B[-~]{1,2}>\\*?",end:"[-~]{1,2}>\\*?"},{begin:"("+JS_IDENT_RE+"\\s*(?:=|:=)\\s*)?(\\(.*\\)\\s*)?\\B!?[-~]{1,2}>\\*?",end:"\ !?[-~]{1,2}>\\*?"}]},CLASS_DEFINITION,{begin:JS_IDENT_RE+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}return livescript_1=livescript2,livescript_1}var llvm_1,hasRequiredLlvm;function requireLlvm(){if(hasRequiredLlvm)return llvm_1;hasRequiredLlvm=1;function llvm2(hljs){const regex=hljs.regex,IDENT_RE2=/([-a-zA-Z$._][\w$.-]*)/,TYPE={className:"type",begin:/\bi\d+(?=\s|\b)/},OPERATOR={className:"operator",relevance:0,begin:/=/},PUNCTUATION={className:"punctuation",relevance:0,begin:/,/}, NUMBER={className:"number",variants:[{begin:/[su]?0[xX][KMLHR]?[a-fA-F0-9]+/},{begin:/[-+]?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?/}],relevance:0},LABEL={className:"symbol",variants:[{begin:/^\s*[a-z]+:/}],relevance:0},VARIABLE={className:"variable",variants:[{begin:regex.concat(/%/,IDENT_RE2)},{begin:/%\d+/},{begin:/#\d+/}]},FUNCTION={className:"title",variants:[{begin:regex.concat(/@/,IDENT_RE2)},{begin:/@\d+/},{begin:regex.concat(/!/,IDENT_RE2)},{begin:regex.concat(/!\d+/,IDENT_RE2)},{begin:/!\d+/}]}; return{name:"LLVM IR",keywords:{keyword:"begin end true false declare define global constant private linker_private internal available_externally linkonce linkonce_odr weak weak_odr appending dllimport dllexport common default hidden protected extern_weak external thread_local zeroinitializer undef null to tail target triple datalayout volatile nuw nsw nnan ninf nsz arcp fast exact inbounds align addrspace section alias module asm sideeffect gc dbg linker_private_weak attributes blockaddress ini\ tialexec localdynamic localexec prefix unnamed_addr ccc fastcc coldcc x86_stdcallcc x86_fastcallcc arm_apcscc arm_aapcscc arm_aapcs_vfpcc ptx_device ptx_kernel intel_ocl_bicc msp430_intrcc spir_func spir_kernel x86_64_sysvcc x86_64_win64cc x86_thiscallcc cc c signext zeroext inreg sret nounwind noreturn noalias nocapture byval nest readnone readonly inlinehint noinline alwaysinline optsize ssp sspreq noredzone noimplicitfloat naked builtin cold nobuiltin noduplicate nonlazybind optnone returns_t\ wice sanitize_address sanitize_memory sanitize_thread sspstrong uwtable returned type opaque eq ne slt sgt sle sge ult ugt ule uge oeq one olt ogt ole oge ord uno ueq une x acq_rel acquire alignstack atomic catch cleanup filter inteldialect max min monotonic nand personality release seq_cst singlethread umax umin unordered xchg add fadd sub fsub mul fmul udiv sdiv fdiv urem srem frem shl lshr ashr and or xor icmp fcmp phi call trunc zext sext fptrunc fpext uitofp sitofp fptoui fptosi inttoptr pt\ rtoint bitcast addrspacecast select va_arg ret br switch invoke unwind unreachable indirectbr landingpad resume malloc alloca free load store getelementptr extractelement insertelement shufflevector getresult extractvalue insertvalue atomicrmw cmpxchg fence argmemonly",type:"void half bfloat float double fp128 x86_fp80 ppc_fp128 x86_amx x86_mmx ptr label token metadata opaque"},contains:[TYPE,hljs.COMMENT(/;\s*$/,null,{relevance:0}),hljs.COMMENT(/;/,/$/),{className:"string",begin:/"/,end:/"/,contains:[ {className:"char.escape",match:/\\\d\d/}]},FUNCTION,PUNCTUATION,OPERATOR,VARIABLE,LABEL,NUMBER]}}return llvm_1=llvm2,llvm_1}var lsl_1,hasRequiredLsl;function requireLsl(){if(hasRequiredLsl)return lsl_1;hasRequiredLsl=1;function lsl2(hljs){const LSL_STRINGS={className:"string",begin:'"',end:'"',contains:[{className:"subst",begin:/\\[tn"\\]/}]},LSL_NUMBERS={className:"number",relevance:0,begin:hljs.C_NUMBER_RE},LSL_CONSTANTS={className:"literal",variants:[{begin:"\\b(PI|TWO_PI|PI_BY_TWO|DEG_TO_RAD|\ RAD_TO_DEG|SQRT2)\\b"},{begin:"\\b(XP_ERROR_(EXPERIENCES_DISABLED|EXPERIENCE_(DISABLED|SUSPENDED)|INVALID_(EXPERIENCE|PARAMETERS)|KEY_NOT_FOUND|MATURITY_EXCEEDED|NONE|NOT_(FOUND|PERMITTED(_LAND)?)|NO_EXPERIENCE|QUOTA_EXCEEDED|RETRY_UPDATE|STORAGE_EXCEPTION|STORE_DISABLED|THROTTLED|UNKNOWN_ERROR)|JSON_APPEND|STATUS_(PHYSICS|ROTATE_[XYZ]|PHANTOM|SANDBOX|BLOCK_GRAB(_OBJECT)?|(DIE|RETURN)_AT_EDGE|CAST_SHADOWS|OK|MALFORMED_PARAMS|TYPE_MISMATCH|BOUNDS_ERROR|NOT_(FOUND|SUPPORTED)|INTERNAL_ERROR|WHITELIS\ T_FAILED)|AGENT(_(BY_(LEGACY_|USER)NAME|FLYING|ATTACHMENTS|SCRIPTED|MOUSELOOK|SITTING|ON_OBJECT|AWAY|WALKING|IN_AIR|TYPING|CROUCHING|BUSY|ALWAYS_RUN|AUTOPILOT|LIST_(PARCEL(_OWNER)?|REGION)))?|CAMERA_(PITCH|DISTANCE|BEHINDNESS_(ANGLE|LAG)|(FOCUS|POSITION)(_(THRESHOLD|LOCKED|LAG))?|FOCUS_OFFSET|ACTIVE)|ANIM_ON|LOOP|REVERSE|PING_PONG|SMOOTH|ROTATE|SCALE|ALL_SIDES|LINK_(ROOT|SET|ALL_(OTHERS|CHILDREN)|THIS)|ACTIVE|PASS(IVE|_(ALWAYS|IF_NOT_HANDLED|NEVER))|SCRIPTED|CONTROL_(FWD|BACK|(ROT_)?(LEFT|RIGHT)\ |UP|DOWN|(ML_)?LBUTTON)|PERMISSION_(RETURN_OBJECTS|DEBIT|OVERRIDE_ANIMATIONS|SILENT_ESTATE_MANAGEMENT|TAKE_CONTROLS|TRIGGER_ANIMATION|ATTACH|CHANGE_LINKS|(CONTROL|TRACK)_CAMERA|TELEPORT)|INVENTORY_(TEXTURE|SOUND|OBJECT|SCRIPT|LANDMARK|CLOTHING|NOTECARD|BODYPART|ANIMATION|GESTURE|ALL|NONE)|CHANGED_(INVENTORY|COLOR|SHAPE|SCALE|TEXTURE|LINK|ALLOWED_DROP|OWNER|REGION(_START)?|TELEPORT|MEDIA)|OBJECT_(CLICK_ACTION|HOVER_HEIGHT|LAST_OWNER_ID|(PHYSICS|SERVER|STREAMING)_COST|UNKNOWN_DETAIL|CHARACTER_TIME\ |PHANTOM|PHYSICS|TEMP_(ATTACHED|ON_REZ)|NAME|DESC|POS|PRIM_(COUNT|EQUIVALENCE)|RETURN_(PARCEL(_OWNER)?|REGION)|REZZER_KEY|ROO?T|VELOCITY|OMEGA|OWNER|GROUP(_TAG)?|CREATOR|ATTACHED_(POINT|SLOTS_AVAILABLE)|RENDER_WEIGHT|(BODY_SHAPE|PATHFINDING)_TYPE|(RUNNING|TOTAL)_SCRIPT_COUNT|TOTAL_INVENTORY_COUNT|SCRIPT_(MEMORY|TIME))|TYPE_(INTEGER|FLOAT|STRING|KEY|VECTOR|ROTATION|INVALID)|(DEBUG|PUBLIC)_CHANNEL|ATTACH_(AVATAR_CENTER|CHEST|HEAD|BACK|PELVIS|MOUTH|CHIN|NECK|NOSE|BELLY|[LR](SHOULDER|HAND|FOOT|EAR|E\ YE|[UL](ARM|LEG)|HIP)|(LEFT|RIGHT)_PEC|HUD_(CENTER_[12]|TOP_(RIGHT|CENTER|LEFT)|BOTTOM(_(RIGHT|LEFT))?)|[LR]HAND_RING1|TAIL_(BASE|TIP)|[LR]WING|FACE_(JAW|[LR]EAR|[LR]EYE|TOUNGE)|GROIN|HIND_[LR]FOOT)|LAND_(LEVEL|RAISE|LOWER|SMOOTH|NOISE|REVERT)|DATA_(ONLINE|NAME|BORN|SIM_(POS|STATUS|RATING)|PAYINFO)|PAYMENT_INFO_(ON_FILE|USED)|REMOTE_DATA_(CHANNEL|REQUEST|REPLY)|PSYS_(PART_(BF_(ZERO|ONE(_MINUS_(DEST_COLOR|SOURCE_(ALPHA|COLOR)))?|DEST_COLOR|SOURCE_(ALPHA|COLOR))|BLEND_FUNC_(DEST|SOURCE)|FLAGS|(STA\ RT|END)_(COLOR|ALPHA|SCALE|GLOW)|MAX_AGE|(RIBBON|WIND|INTERP_(COLOR|SCALE)|BOUNCE|FOLLOW_(SRC|VELOCITY)|TARGET_(POS|LINEAR)|EMISSIVE)_MASK)|SRC_(MAX_AGE|PATTERN|ANGLE_(BEGIN|END)|BURST_(RATE|PART_COUNT|RADIUS|SPEED_(MIN|MAX))|ACCEL|TEXTURE|TARGET_KEY|OMEGA|PATTERN_(DROP|EXPLODE|ANGLE(_CONE(_EMPTY)?)?)))|VEHICLE_(REFERENCE_FRAME|TYPE_(NONE|SLED|CAR|BOAT|AIRPLANE|BALLOON)|(LINEAR|ANGULAR)_(FRICTION_TIMESCALE|MOTOR_DIRECTION)|LINEAR_MOTOR_OFFSET|HOVER_(HEIGHT|EFFICIENCY|TIMESCALE)|BUOYANCY|(LINEAR|\ ANGULAR)_(DEFLECTION_(EFFICIENCY|TIMESCALE)|MOTOR_(DECAY_)?TIMESCALE)|VERTICAL_ATTRACTION_(EFFICIENCY|TIMESCALE)|BANKING_(EFFICIENCY|MIX|TIMESCALE)|FLAG_(NO_DEFLECTION_UP|LIMIT_(ROLL_ONLY|MOTOR_UP)|HOVER_((WATER|TERRAIN|UP)_ONLY|GLOBAL_HEIGHT)|MOUSELOOK_(STEER|BANK)|CAMERA_DECOUPLED))|PRIM_(ALLOW_UNSIT|ALPHA_MODE(_(BLEND|EMISSIVE|MASK|NONE))?|NORMAL|SPECULAR|TYPE(_(BOX|CYLINDER|PRISM|SPHERE|TORUS|TUBE|RING|SCULPT))?|HOLE_(DEFAULT|CIRCLE|SQUARE|TRIANGLE)|MATERIAL(_(STONE|METAL|GLASS|WOOD|FLESH|PL\ ASTIC|RUBBER))?|SHINY_(NONE|LOW|MEDIUM|HIGH)|BUMP_(NONE|BRIGHT|DARK|WOOD|BARK|BRICKS|CHECKER|CONCRETE|TILE|STONE|DISKS|GRAVEL|BLOBS|SIDING|LARGETILE|STUCCO|SUCTION|WEAVE)|TEXGEN_(DEFAULT|PLANAR)|SCRIPTED_SIT_ONLY|SCULPT_(TYPE_(SPHERE|TORUS|PLANE|CYLINDER|MASK)|FLAG_(MIRROR|INVERT))|PHYSICS(_(SHAPE_(CONVEX|NONE|PRIM|TYPE)))?|(POS|ROT)_LOCAL|SLICE|TEXT|FLEXIBLE|POINT_LIGHT|TEMP_ON_REZ|PHANTOM|POSITION|SIT_TARGET|SIZE|ROTATION|TEXTURE|NAME|OMEGA|DESC|LINK_TARGET|COLOR|BUMP_SHINY|FULLBRIGHT|TEXGEN|G\ LOW|MEDIA_(ALT_IMAGE_ENABLE|CONTROLS|(CURRENT|HOME)_URL|AUTO_(LOOP|PLAY|SCALE|ZOOM)|FIRST_CLICK_INTERACT|(WIDTH|HEIGHT)_PIXELS|WHITELIST(_ENABLE)?|PERMS_(INTERACT|CONTROL)|PARAM_MAX|CONTROLS_(STANDARD|MINI)|PERM_(NONE|OWNER|GROUP|ANYONE)|MAX_(URL_LENGTH|WHITELIST_(SIZE|COUNT)|(WIDTH|HEIGHT)_PIXELS)))|MASK_(BASE|OWNER|GROUP|EVERYONE|NEXT)|PERM_(TRANSFER|MODIFY|COPY|MOVE|ALL)|PARCEL_(MEDIA_COMMAND_(STOP|PAUSE|PLAY|LOOP|TEXTURE|URL|TIME|AGENT|UNLOAD|AUTO_ALIGN|TYPE|SIZE|DESC|LOOP_SET)|FLAG_(ALLOW_(\ FLY|(GROUP_)?SCRIPTS|LANDMARK|TERRAFORM|DAMAGE|CREATE_(GROUP_)?OBJECTS)|USE_(ACCESS_(GROUP|LIST)|BAN_LIST|LAND_PASS_LIST)|LOCAL_SOUND_ONLY|RESTRICT_PUSHOBJECT|ALLOW_(GROUP|ALL)_OBJECT_ENTRY)|COUNT_(TOTAL|OWNER|GROUP|OTHER|SELECTED|TEMP)|DETAILS_(NAME|DESC|OWNER|GROUP|AREA|ID|SEE_AVATARS))|LIST_STAT_(MAX|MIN|MEAN|MEDIAN|STD_DEV|SUM(_SQUARES)?|NUM_COUNT|GEOMETRIC_MEAN|RANGE)|PAY_(HIDE|DEFAULT)|REGION_FLAG_(ALLOW_DAMAGE|FIXED_SUN|BLOCK_TERRAFORM|SANDBOX|DISABLE_(COLLISIONS|PHYSICS)|BLOCK_FLY|ALLOW_\ DIRECT_TELEPORT|RESTRICT_PUSHOBJECT)|HTTP_(METHOD|MIMETYPE|BODY_(MAXLENGTH|TRUNCATED)|CUSTOM_HEADER|PRAGMA_NO_CACHE|VERBOSE_THROTTLE|VERIFY_CERT)|SIT_(INVALID_(AGENT|LINK_OBJECT)|NO(T_EXPERIENCE|_(ACCESS|EXPERIENCE_PERMISSION|SIT_TARGET)))|STRING_(TRIM(_(HEAD|TAIL))?)|CLICK_ACTION_(NONE|TOUCH|SIT|BUY|PAY|OPEN(_MEDIA)?|PLAY|ZOOM)|TOUCH_INVALID_FACE|PROFILE_(NONE|SCRIPT_MEMORY)|RC_(DATA_FLAGS|DETECT_PHANTOM|GET_(LINK_NUM|NORMAL|ROOT_KEY)|MAX_HITS|REJECT_(TYPES|AGENTS|(NON)?PHYSICAL|LAND))|RCERR_(C\ AST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN)|ESTATE_ACCESS_(ALLOWED_(AGENT|GROUP)_(ADD|REMOVE)|BANNED_AGENT_(ADD|REMOVE))|DENSITY|FRICTION|RESTITUTION|GRAVITY_MULTIPLIER|KFM_(COMMAND|CMD_(PLAY|STOP|PAUSE)|MODE|FORWARD|LOOP|PING_PONG|REVERSE|DATA|ROTATION|TRANSLATION)|ERR_(GENERIC|PARCEL_PERMISSIONS|MALFORMED_PARAMS|RUNTIME_PERMISSIONS|THROTTLED)|CHARACTER_(CMD_((SMOOTH_)?STOP|JUMP)|DESIRED_(TURN_)?SPEED|RADIUS|STAY_WITHIN_PARCEL|LENGTH|ORIENTATION|ACCOUNT_FOR_SKIPPED_FRAMES|AVOIDANCE_MODE|TYPE(_([ABC\ D]|NONE))?|MAX_(DECEL|TURN_RADIUS|(ACCEL|SPEED)))|PURSUIT_(OFFSET|FUZZ_FACTOR|GOAL_TOLERANCE|INTERCEPT)|REQUIRE_LINE_OF_SIGHT|FORCE_DIRECT_PATH|VERTICAL|HORIZONTAL|AVOID_(CHARACTERS|DYNAMIC_OBSTACLES|NONE)|PU_(EVADE_(HIDDEN|SPOTTED)|FAILURE_(DYNAMIC_PATHFINDING_DISABLED|INVALID_(GOAL|START)|NO_(NAVMESH|VALID_DESTINATION)|OTHER|TARGET_GONE|(PARCEL_)?UNREACHABLE)|(GOAL|SLOWDOWN_DISTANCE)_REACHED)|TRAVERSAL_TYPE(_(FAST|NONE|SLOW))?|CONTENT_TYPE_(ATOM|FORM|HTML|JSON|LLSD|RSS|TEXT|XHTML|XML)|GCNP_(RA\ DIUS|STATIC)|(PATROL|WANDER)_PAUSE_AT_WAYPOINTS|OPT_(AVATAR|CHARACTER|EXCLUSION_VOLUME|LEGACY_LINKSET|MATERIAL_VOLUME|OTHER|STATIC_OBSTACLE|WALKABLE)|SIM_STAT_PCT_CHARS_STEPPED)\\b"},{begin:"\\b(FALSE|TRUE)\\b"},{begin:"\\b(ZERO_ROTATION)\\b"},{begin:"\\b(EOF|JSON_(ARRAY|DELETE|FALSE|INVALID|NULL|NUMBER|OBJECT|STRING|TRUE)|NULL_KEY|TEXTURE_(BLANK|DEFAULT|MEDIA|PLYWOOD|TRANSPARENT)|URL_REQUEST_(GRANTED|DENIED))\\b"},{begin:"\\b(ZERO_VECTOR|TOUCH_INVALID_(TEXCOORD|VECTOR))\\b"}]},LSL_FUNCTIONS={className:"\ built_in",begin:"\\b(ll(AgentInExperience|(Create|DataSize|Delete|KeyCount|Keys|Read|Update)KeyValue|GetExperience(Details|ErrorMessage)|ReturnObjectsBy(ID|Owner)|Json(2List|[GS]etValue|ValueType)|Sin|Cos|Tan|Atan2|Sqrt|Pow|Abs|Fabs|Frand|Floor|Ceil|Round|Vec(Mag|Norm|Dist)|Rot(Between|2(Euler|Fwd|Left|Up))|(Euler|Axes)2Rot|Whisper|(Region|Owner)?Say|Shout|Listen(Control|Remove)?|Sensor(Repeat|Remove)?|Detected(Name|Key|Owner|Type|Pos|Vel|Grab|Rot|Group|LinkNumber)|Die|Ground|Wind|([GS]et)(Animat\ ionOverride|MemoryLimit|PrimMediaParams|ParcelMusicURL|Object(Desc|Name)|PhysicsMaterial|Status|Scale|Color|Alpha|Texture|Pos|Rot|Force|Torque)|ResetAnimationOverride|(Scale|Offset|Rotate)Texture|(Rot)?Target(Remove)?|(Stop)?MoveToTarget|Apply(Rotational)?Impulse|Set(KeyframedMotion|ContentType|RegionPos|(Angular)?Velocity|Buoyancy|HoverHeight|ForceAndTorque|TimerEvent|ScriptState|Damage|TextureAnim|Sound(Queueing|Radius)|Vehicle(Type|(Float|Vector|Rotation)Param)|(Touch|Sit)?Text|Camera(Eye|At)\ Offset|PrimitiveParams|ClickAction|Link(Alpha|Color|PrimitiveParams(Fast)?|Texture(Anim)?|Camera|Media)|RemoteScriptAccessPin|PayPrice|LocalRot)|ScaleByFactor|Get((Max|Min)ScaleFactor|ClosestNavPoint|StaticPath|SimStats|Env|PrimitiveParams|Link(PrimitiveParams|Number(OfSides)?|Key|Name|Media)|HTTPHeader|FreeURLs|Object(Details|PermMask|PrimCount)|Parcel(MaxPrims|Details|Prim(Count|Owners))|Attached(List)?|(SPMax|Free|Used)Memory|Region(Name|TimeDilation|FPS|Corner|AgentCount)|Root(Position|Rotat\ ion)|UnixTime|(Parcel|Region)Flags|(Wall|GMT)clock|SimulatorHostname|BoundingBox|GeometricCenter|Creator|NumberOf(Prims|NotecardLines|Sides)|Animation(List)?|(Camera|Local)(Pos|Rot)|Vel|Accel|Omega|Time(stamp|OfDay)|(Object|CenterOf)?Mass|MassMKS|Energy|Owner|(Owner)?Key|SunDirection|Texture(Offset|Scale|Rot)|Inventory(Number|Name|Key|Type|Creator|PermMask)|Permissions(Key)?|StartParameter|List(Length|EntryType)|Date|Agent(Size|Info|Language|List)|LandOwnerAt|NotecardLine|Script(Name|State))|(Ge\ t|Reset|GetAndReset)Time|PlaySound(Slave)?|LoopSound(Master|Slave)?|(Trigger|Stop|Preload)Sound|((Get|Delete)Sub|Insert)String|To(Upper|Lower)|Give(InventoryList|Money)|RezObject|(Stop)?LookAt|Sleep|CollisionFilter|(Take|Release)Controls|DetachFromAvatar|AttachToAvatar(Temp)?|InstantMessage|(GetNext)?Email|StopHover|MinEventDelay|RotLookAt|String(Length|Trim)|(Start|Stop)Animation|TargetOmega|Request(Experience)?Permissions|(Create|Break)Link|BreakAllLinks|(Give|Remove)Inventory|Water|PassTouche\ s|Request(Agent|Inventory)Data|TeleportAgent(Home|GlobalCoords)?|ModifyLand|CollisionSound|ResetScript|MessageLinked|PushObject|PassCollisions|AxisAngle2Rot|Rot2(Axis|Angle)|A(cos|sin)|AngleBetween|AllowInventoryDrop|SubStringIndex|List2(CSV|Integer|Json|Float|String|Key|Vector|Rot|List(Strided)?)|DeleteSubList|List(Statistics|Sort|Randomize|(Insert|Find|Replace)List)|EdgeOfWorld|AdjustSoundVolume|Key2Name|TriggerSoundLimited|EjectFromLand|(CSV|ParseString)2List|OverMyLand|SameGroup|UnSit|Ground\ (Slope|Normal|Contour)|GroundRepel|(Set|Remove)VehicleFlags|SitOnLink|(AvatarOn)?(Link)?SitTarget|Script(Danger|Profiler)|Dialog|VolumeDetect|ResetOtherScript|RemoteLoadScriptPin|(Open|Close)RemoteDataChannel|SendRemoteData|RemoteDataReply|(Integer|String)ToBase64|XorBase64|Log(10)?|Base64To(String|Integer)|ParseStringKeepNulls|RezAtRoot|RequestSimulatorData|ForceMouselook|(Load|Release|(E|Une)scape)URL|ParcelMedia(CommandList|Query)|ModPow|MapDestination|(RemoveFrom|AddTo|Reset)Land(Pass|Ban)Li\ st|(Set|Clear)CameraParams|HTTP(Request|Response)|TextBox|DetectedTouch(UV|Face|Pos|(N|Bin)ormal|ST)|(MD5|SHA1|DumpList2)String|Request(Secure)?URL|Clear(Prim|Link)Media|(Link)?ParticleSystem|(Get|Request)(Username|DisplayName)|RegionSayTo|CastRay|GenerateKey|TransferLindenDollars|ManageEstateAccess|(Create|Delete)Character|ExecCharacterCmd|Evade|FleeFrom|NavigateTo|PatrolPoints|Pursue|UpdateCharacter|WanderWithin))\\b"};return{name:"LSL (Linden Scripting Language)",illegal:":",contains:[LSL_STRINGS, {className:"comment",variants:[hljs.COMMENT("//","$"),hljs.COMMENT("/\\*","\\*/")],relevance:0},LSL_NUMBERS,{className:"section",variants:[{begin:"\\b(state|default)\\b"},{begin:"\\b(state_(entry|exit)|touch(_(start|end))?|(land_)?collision(_(start|end))?|timer|listen|(no_)?sensor|control|(not_)?at_(rot_)?target|money|email|experience_permissions(_denied)?|run_time_permissions|changed|attach|dataserver|moving_(start|end)|link_message|(on|object)_rez|remote_data|http_re(sponse|quest)|path_update|t\ ransaction_result)\\b"}]},LSL_FUNCTIONS,LSL_CONSTANTS,{className:"type",begin:"\\b(integer|float|string|key|vector|quaternion|rotation|list)\\b"}]}}return lsl_1=lsl2,lsl_1}var lua_1,hasRequiredLua;function requireLua(){if(hasRequiredLua)return lua_1;hasRequiredLua=1;function lua2(hljs){const OPENING_LONG_BRACKET="\\[=*\\[",CLOSING_LONG_BRACKET="\\]=*\\]",LONG_BRACKETS={begin:OPENING_LONG_BRACKET,end:CLOSING_LONG_BRACKET,contains:["self"]},COMMENTS=[hljs.COMMENT("--(?!"+OPENING_LONG_BRACKET+")","\ $"),hljs.COMMENT("--"+OPENING_LONG_BRACKET,CLOSING_LONG_BRACKET,{contains:[LONG_BRACKETS],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:hljs.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile er\ ror getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp \ pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:COMMENTS.concat([{className:"function",beginKeywords:"functio\ n",end:"\\)",contains:[hljs.inherit(hljs.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:COMMENTS}].concat(COMMENTS)},hljs.C_NUMBER_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{className:"string",begin:OPENING_LONG_BRACKET,end:CLOSING_LONG_BRACKET,contains:[LONG_BRACKETS],relevance:5}])}}return lua_1=lua2,lua_1}var makefile_1,hasRequiredMakefile;function requireMakefile(){if(hasRequiredMakefile)return makefile_1; hasRequiredMakefile=1;function makefile2(hljs){const VARIABLE={className:"variable",variants:[{begin:"\\$\\("+hljs.UNDERSCORE_IDENT_RE+"\\)",contains:[hljs.BACKSLASH_ESCAPE]},{begin:/\$[@%{SYSTEM_SYMBOLS_SET.has(match[0])||response.ignoreMatch()}},{className:"symbol",relevance:0,begin:SYMBOL_RE}]},NAMED_CHARACTER={className:"named-character",begin:/\\\[[$a-zA-Z][$a-zA-Z0-9]+\]/},OPERATORS={className:"operator",relevance:0,begin:/[+\-*/,;.:@~=><&|_`'^?!%]+/},PATTERNS={className:"pattern",relevance:0,begin:/([a-zA-Z$][a-zA-Z0-9$]*)?_+([a-zA-Z$][a-zA-Z0-9$]*)?/},SLOTS={className:"\ slot",relevance:0,begin:/#[a-zA-Z$][a-zA-Z0-9$]*|#+[0-9]?/},BRACES={className:"brace",relevance:0,begin:/[[\](){}]/},MESSAGES={className:"message-name",relevance:0,begin:regex.concat("::",SYMBOL_RE)};return{name:"Mathematica",aliases:["mma","wl"],classNameAliases:{brace:"punctuation",pattern:"type",slot:"type",symbol:"variable","named-character":"variable","builtin-symbol":"built_in","message-name":"string"},contains:[hljs.COMMENT(/\(\*/,/\*\)/,{contains:["self"]}),PATTERNS,SLOTS,MESSAGES,SYMBOLS, NAMED_CHARACTER,hljs.QUOTE_STRING_MODE,NUMBERS,OPERATORS,BRACES]}}return mathematica_1=mathematica2,mathematica_1}var matlab_1,hasRequiredMatlab;function requireMatlab(){if(hasRequiredMatlab)return matlab_1;hasRequiredMatlab=1;function matlab2(hljs){const TRANSPOSE_RE="('|\\.')+",TRANSPOSE={relevance:0,contains:[{begin:TRANSPOSE_RE}]};return{name:"Matlab",keywords:{keyword:"arguments break case catch classdef continue else elseif end enumeration events for function global if methods otherwise pa\ rfor persistent properties return spmd switch try while",built_in:"sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc beta\ ln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze is\ scalar isvector ans eps realmax realmin pi i|0 inf nan isnan isinf isfinite j|0 why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson max min nanmax nanmin mean nanmean type table readtable writetable sortrows sort figure plot plot3 scatter scatter3 cellfun legend intersect ismember procrustes hold num2cell "},illegal:'(//|"|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[hljs.UNDERSCORE_TITLE_MODE,{className:"\ params",variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}]}]},{className:"built_in",begin:/true|false/,relevance:0,starts:TRANSPOSE},{begin:"[a-zA-Z][a-zA-Z_0-9]*"+TRANSPOSE_RE,relevance:0},{className:"number",begin:hljs.C_NUMBER_RE,relevance:0,starts:TRANSPOSE},{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},{begin:/\]|\}|\)/,relevance:0,starts:TRANSPOSE},{className:"string",begin:'"',end:'"',contains:[{begin:'""'}],starts:TRANSPOSE},hljs.COMMENT("^\\s*%\\{\\s*$","^\\s*%\\}\ \\s*$"),hljs.COMMENT("%","$")]}}return matlab_1=matlab2,matlab_1}var maxima_1,hasRequiredMaxima;function requireMaxima(){if(hasRequiredMaxima)return maxima_1;hasRequiredMaxima=1;function maxima2(hljs){return{name:"Maxima",keywords:{$pattern:"[A-Za-z_%][0-9A-Za-z_%]*",keyword:"if then else elseif for thru do while unless step in and or not",literal:"true false unknown inf minf ind und %e %i %pi %phi %gamma",built_in:" abasep abs absint absolute_real_time acos acosh acot acoth acsc acsch activate \ addcol add_edge add_edges addmatrices addrow add_vertex add_vertices adjacency_matrix adjoin adjoint af agd airy airy_ai airy_bi airy_dai airy_dbi algsys alg_type alias allroots alphacharp alphanumericp amortization %and annuity_fv annuity_pv antid antidiff AntiDifference append appendfile apply apply1 apply2 applyb1 apropos args arit_amortization arithmetic arithsum array arrayapply arrayinfo arraymake arraysetapply ascii asec asech asin asinh askinteger asksign assoc assoc_legendre_p assoc_leg\ endre_q assume assume_external_byte_order asympa at atan atan2 atanh atensimp atom atvalue augcoefmatrix augmented_lagrangian_method av average_degree backtrace bars barsplot barsplot_description base64 base64_decode bashindices batch batchload bc2 bdvac belln benefit_cost bern bernpoly bernstein_approx bernstein_expand bernstein_poly bessel bessel_i bessel_j bessel_k bessel_simplify bessel_y beta beta_incomplete beta_incomplete_generalized beta_incomplete_regularized bezout bfallroots bffac bf_\ find_root bf_fmin_cobyla bfhzeta bfloat bfloatp bfpsi bfpsi0 bfzeta biconnected_components bimetric binomial bipartition block blockmatrixp bode_gain bode_phase bothcoef box boxplot boxplot_description break bug_report build_info|10 buildq build_sample burn cabs canform canten cardinality carg cartan cartesian_product catch cauchy_matrix cbffac cdf_bernoulli cdf_beta cdf_binomial cdf_cauchy cdf_chi2 cdf_continuous_uniform cdf_discrete_uniform cdf_exp cdf_f cdf_gamma cdf_general_finite_discrete c\ df_geometric cdf_gumbel cdf_hypergeometric cdf_laplace cdf_logistic cdf_lognormal cdf_negative_binomial cdf_noncentral_chi2 cdf_noncentral_student_t cdf_normal cdf_pareto cdf_poisson cdf_rank_sum cdf_rayleigh cdf_signed_rank cdf_student_t cdf_weibull cdisplay ceiling central_moment cequal cequalignore cf cfdisrep cfexpand cgeodesic cgreaterp cgreaterpignore changename changevar chaosgame charat charfun charfun2 charlist charp charpoly chdir chebyshev_t chebyshev_u checkdiv check_overlaps chinese\ cholesky christof chromatic_index chromatic_number cint circulant_graph clear_edge_weight clear_rules clear_vertex_label clebsch_gordan clebsch_graph clessp clesspignore close closefile cmetric coeff coefmatrix cograd col collapse collectterms columnop columnspace columnswap columnvector combination combine comp2pui compare compfile compile compile_file complement_graph complete_bipartite_graph complete_graph complex_number_p components compose_functions concan concat conjugate conmetderiv conn\ ected_components connect_vertices cons constant constantp constituent constvalue cont2part content continuous_freq contortion contour_plot contract contract_edge contragrad contrib_ode convert coord copy copy_file copy_graph copylist copymatrix cor cos cosh cot coth cov cov1 covdiff covect covers crc24sum create_graph create_list csc csch csetup cspline ctaylor ct_coordsys ctransform ctranspose cube_graph cuboctahedron_graph cunlisp cv cycle_digraph cycle_graph cylindrical days360 dblint deactiv\ ate declare declare_constvalue declare_dimensions declare_fundamental_dimensions declare_fundamental_units declare_qty declare_translated declare_unit_conversion declare_units declare_weights decsym defcon define define_alt_display define_variable defint defmatch defrule defstruct deftaylor degree_sequence del delete deleten delta demo demoivre denom depends derivdegree derivlist describe desolve determinant dfloat dgauss_a dgauss_b dgeev dgemm dgeqrf dgesv dgesvd diag diagmatrix diag_matrix dia\ gmatrixp diameter diff digitcharp dimacs_export dimacs_import dimension dimensionless dimensions dimensions_as_list direct directory discrete_freq disjoin disjointp disolate disp dispcon dispform dispfun dispJordan display disprule dispterms distrib divide divisors divsum dkummer_m dkummer_u dlange dodecahedron_graph dotproduct dotsimp dpart draw draw2d draw3d drawdf draw_file draw_graph dscalar echelon edge_coloring edge_connectivity edges eigens_by_jacobi eigenvalues eigenvectors eighth einste\ in eivals eivects elapsed_real_time elapsed_run_time ele2comp ele2polynome ele2pui elem elementp elevation_grid elim elim_allbut eliminate eliminate_using ellipse elliptic_e elliptic_ec elliptic_eu elliptic_f elliptic_kc elliptic_pi ematrix empty_graph emptyp endcons entermatrix entertensor entier equal equalp equiv_classes erf erfc erf_generalized erfi errcatch error errormsg errors euler ev eval_string evenp every evolution evolution2d evundiff example exp expand expandwrt expandwrt_factored e\ xpint expintegral_chi expintegral_ci expintegral_e expintegral_e1 expintegral_ei expintegral_e_simplify expintegral_li expintegral_shi expintegral_si explicit explose exponentialize express expt exsec extdiff extract_linear_equations extremal_subset ezgcd %f f90 facsum factcomb factor factorfacsum factorial factorout factorsum facts fast_central_elements fast_linsolve fasttimes featurep fernfale fft fib fibtophi fifth filename_merge file_search file_type fillarray findde find_root find_root_abs \ find_root_error find_root_rel first fix flatten flength float floatnump floor flower_snark flush flush1deriv flushd flushnd flush_output fmin_cobyla forget fortran fourcos fourexpand fourier fourier_elim fourint fourintcos fourintsin foursimp foursin fourth fposition frame_bracket freeof freshline fresnel_c fresnel_s from_adjacency_matrix frucht_graph full_listify fullmap fullmapl fullratsimp fullratsubst fullsetify funcsolve fundamental_dimensions fundamental_units fundef funmake funp fv g0 g1 \ gamma gamma_greek gamma_incomplete gamma_incomplete_generalized gamma_incomplete_regularized gauss gauss_a gauss_b gaussprob gcd gcdex gcdivide gcfac gcfactor gd generalized_lambert_w genfact gen_laguerre genmatrix gensym geo_amortization geo_annuity_fv geo_annuity_pv geomap geometric geometric_mean geosum get getcurrentdirectory get_edge_weight getenv get_lu_factors get_output_stream_string get_pixel get_plot_option get_tex_environment get_tex_environment_default get_vertex_label gfactor gfacto\ rsum ggf girth global_variances gn gnuplot_close gnuplot_replot gnuplot_reset gnuplot_restart gnuplot_start go Gosper GosperSum gr2d gr3d gradef gramschmidt graph6_decode graph6_encode graph6_export graph6_import graph_center graph_charpoly graph_eigenvalues graph_flow graph_order graph_periphery graph_product graph_size graph_union great_rhombicosidodecahedron_graph great_rhombicuboctahedron_graph grid_graph grind grobner_basis grotzch_graph hamilton_cycle hamilton_path hankel hankel_1 hankel_2\ harmonic harmonic_mean hav heawood_graph hermite hessian hgfred hilbertmap hilbert_matrix hipow histogram histogram_description hodge horner hypergeometric i0 i1 %ibes ic1 ic2 ic_convert ichr1 ichr2 icosahedron_graph icosidodecahedron_graph icurvature ident identfor identity idiff idim idummy ieqn %if ifactors iframes ifs igcdex igeodesic_coords ilt image imagpart imetric implicit implicit_derivative implicit_plot indexed_tensor indices induced_subgraph inferencep inference_result infix info_di\ splay init_atensor init_ctensor in_neighbors innerproduct inpart inprod inrt integerp integer_partitions integrate intersect intersection intervalp intopois intosum invariant1 invariant2 inverse_fft inverse_jacobi_cd inverse_jacobi_cn inverse_jacobi_cs inverse_jacobi_dc inverse_jacobi_dn inverse_jacobi_ds inverse_jacobi_nc inverse_jacobi_nd inverse_jacobi_ns inverse_jacobi_sc inverse_jacobi_sd inverse_jacobi_sn invert invert_by_adjoint invert_by_lu inv_mod irr is is_biconnected is_bipartite is_c\ onnected is_digraph is_edge_in_graph is_graph is_graph_or_digraph ishow is_isomorphic isolate isomorphism is_planar isqrt isreal_p is_sconnected is_tree is_vertex_in_graph items_inference %j j0 j1 jacobi jacobian jacobi_cd jacobi_cn jacobi_cs jacobi_dc jacobi_dn jacobi_ds jacobi_nc jacobi_nd jacobi_ns jacobi_p jacobi_sc jacobi_sd jacobi_sn JF jn join jordan julia julia_set julia_sin %k kdels kdelta kill killcontext kostka kron_delta kronecker_product kummer_m kummer_u kurtosis kurtosis_bernoulli\ kurtosis_beta kurtosis_binomial kurtosis_chi2 kurtosis_continuous_uniform kurtosis_discrete_uniform kurtosis_exp kurtosis_f kurtosis_gamma kurtosis_general_finite_discrete kurtosis_geometric kurtosis_gumbel kurtosis_hypergeometric kurtosis_laplace kurtosis_logistic kurtosis_lognormal kurtosis_negative_binomial kurtosis_noncentral_chi2 kurtosis_noncentral_student_t kurtosis_normal kurtosis_pareto kurtosis_poisson kurtosis_rayleigh kurtosis_student_t kurtosis_weibull label labels lagrange laguerr\ e lambda lambert_w laplace laplacian_matrix last lbfgs lc2kdt lcharp lc_l lcm lc_u ldefint ldisp ldisplay legendre_p legendre_q leinstein length let letrules letsimp levi_civita lfreeof lgtreillis lhs li liediff limit Lindstedt linear linearinterpol linear_program linear_regression line_graph linsolve listarray list_correlations listify list_matrix_entries list_nc_monomials listoftens listofvars listp lmax lmin load loadfile local locate_matrix_entry log logcontract log_gamma lopow lorentz_gauge\ lowercasep lpart lratsubst lreduce lriemann lsquares_estimates lsquares_estimates_approximate lsquares_estimates_exact lsquares_mse lsquares_residual_mse lsquares_residuals lsum ltreillis lu_backsub lucas lu_factor %m macroexpand macroexpand1 make_array makebox makefact makegamma make_graph make_level_picture makelist makeOrders make_poly_continent make_poly_country make_polygon make_random_state make_rgb_picture makeset make_string_input_stream make_string_output_stream make_transform mandelbr\ ot mandelbrot_set map mapatom maplist matchdeclare matchfix mat_cond mat_fullunblocker mat_function mathml_display mat_norm matrix matrixmap matrixp matrix_size mattrace mat_trace mat_unblocker max max_clique max_degree max_flow maximize_lp max_independent_set max_matching maybe md5sum mean mean_bernoulli mean_beta mean_binomial mean_chi2 mean_continuous_uniform mean_deviation mean_discrete_uniform mean_exp mean_f mean_gamma mean_general_finite_discrete mean_geometric mean_gumbel mean_hypergeome\ tric mean_laplace mean_logistic mean_lognormal mean_negative_binomial mean_noncentral_chi2 mean_noncentral_student_t mean_normal mean_pareto mean_poisson mean_rayleigh mean_student_t mean_weibull median median_deviation member mesh metricexpandall mgf1_sha1 min min_degree min_edge_cut minfactorial minimalPoly minimize_lp minimum_spanning_tree minor minpack_lsquares minpack_solve min_vertex_cover min_vertex_cut mkdir mnewton mod mode_declare mode_identity ModeMatrix moebius mon2schur mono monomia\ l_dimensions multibernstein_poly multi_display_for_texinfo multi_elem multinomial multinomial_coeff multi_orbit multiplot_mode multi_pui multsym multthru mycielski_graph nary natural_unit nc_degree ncexpt ncharpoly negative_picture neighbors new newcontext newdet new_graph newline newton new_variable next_prime nicedummies niceindices ninth nofix nonarray noncentral_moment nonmetricity nonnegintegerp nonscalarp nonzeroandfreeof notequal nounify nptetrad npv nroots nterms ntermst nthroot nullity \ nullspace num numbered_boundaries numberp number_to_octets num_distinct_partitions numerval numfactor num_partitions nusum nzeta nzetai nzetar octets_to_number octets_to_oid odd_girth oddp ode2 ode_check odelin oid_to_octets op opena opena_binary openr openr_binary openw openw_binary operatorp opsubst optimize %or orbit orbits ordergreat ordergreatp orderless orderlessp orthogonal_complement orthopoly_recur orthopoly_weight outermap out_neighbors outofpois pade parabolic_cylinder_d parametric pa\ rametric_surface parg parGosper parse_string parse_timedate part part2cont partfrac partition partition_set partpol path_digraph path_graph pathname_directory pathname_name pathname_type pdf_bernoulli pdf_beta pdf_binomial pdf_cauchy pdf_chi2 pdf_continuous_uniform pdf_discrete_uniform pdf_exp pdf_f pdf_gamma pdf_general_finite_discrete pdf_geometric pdf_gumbel pdf_hypergeometric pdf_laplace pdf_logistic pdf_lognormal pdf_negative_binomial pdf_noncentral_chi2 pdf_noncentral_student_t pdf_normal \ pdf_pareto pdf_poisson pdf_rank_sum pdf_rayleigh pdf_signed_rank pdf_student_t pdf_weibull pearson_skewness permanent permut permutation permutations petersen_graph petrov pickapart picture_equalp picturep piechart piechart_description planar_embedding playback plog plot2d plot3d plotdf ploteq plsquares pochhammer points poisdiff poisexpt poisint poismap poisplus poissimp poissubst poistimes poistrim polar polarform polartorect polar_to_xy poly_add poly_buchberger poly_buchberger_criterion poly_\ colon_ideal poly_content polydecomp poly_depends_p poly_elimination_ideal poly_exact_divide poly_expand poly_expt poly_gcd polygon poly_grobner poly_grobner_equal poly_grobner_member poly_grobner_subsetp poly_ideal_intersection poly_ideal_polysaturation poly_ideal_polysaturation1 poly_ideal_saturation poly_ideal_saturation1 poly_lcm poly_minimization polymod poly_multiply polynome2ele polynomialp poly_normal_form poly_normalize poly_normalize_list poly_polysaturation_extension poly_primitive_par\ t poly_pseudo_divide poly_reduced_grobner poly_reduction poly_saturation_extension poly_s_polynomial poly_subtract polytocompanion pop postfix potential power_mod powerseries powerset prefix prev_prime primep primes principal_components print printf printfile print_graph printpois printprops prodrac product properties propvars psi psubst ptriangularize pui pui2comp pui2ele pui2polynome pui_direct puireduc push put pv qput qrange qty quad_control quad_qag quad_qagi quad_qagp quad_qags quad_qawc q\ uad_qawf quad_qawo quad_qaws quadrilateral quantile quantile_bernoulli quantile_beta quantile_binomial quantile_cauchy quantile_chi2 quantile_continuous_uniform quantile_discrete_uniform quantile_exp quantile_f quantile_gamma quantile_general_finite_discrete quantile_geometric quantile_gumbel quantile_hypergeometric quantile_laplace quantile_logistic quantile_lognormal quantile_negative_binomial quantile_noncentral_chi2 quantile_noncentral_student_t quantile_normal quantile_pareto quantile_poiss\ on quantile_rayleigh quantile_student_t quantile_weibull quartile_skewness quit qunit quotient racah_v racah_w radcan radius random random_bernoulli random_beta random_binomial random_bipartite_graph random_cauchy random_chi2 random_continuous_uniform random_digraph random_discrete_uniform random_exp random_f random_gamma random_general_finite_discrete random_geometric random_graph random_graph1 random_gumbel random_hypergeometric random_laplace random_logistic random_lognormal random_negative_b\ inomial random_network random_noncentral_chi2 random_noncentral_student_t random_normal random_pareto random_permutation random_poisson random_rayleigh random_regular_graph random_student_t random_tournament random_tree random_weibull range rank rat ratcoef ratdenom ratdiff ratdisrep ratexpand ratinterpol rational rationalize ratnumer ratnump ratp ratsimp ratsubst ratvars ratweight read read_array read_binary_array read_binary_list read_binary_matrix readbyte readchar read_hashed_array readline \ read_list read_matrix read_nested_list readonly read_xpm real_imagpart_to_conjugate realpart realroots rearray rectangle rectform rectform_log_if_constant recttopolar rediff reduce_consts reduce_order region region_boundaries region_boundaries_plus rem remainder remarray rembox remcomps remcon remcoord remfun remfunction remlet remove remove_constvalue remove_dimensions remove_edge remove_fundamental_dimensions remove_fundamental_units remove_plot_option remove_vertex rempart remrule remsym remv\ alue rename rename_file reset reset_displays residue resolvante resolvante_alternee1 resolvante_bipartite resolvante_diedrale resolvante_klein resolvante_klein3 resolvante_produit_sym resolvante_unitaire resolvante_vierer rest resultant return reveal reverse revert revert2 rgb2level rhs ricci riemann rinvariant risch rk rmdir rncombine romberg room rootscontract round row rowop rowswap rreduce run_testsuite %s save saving scalarp scaled_bessel_i scaled_bessel_i0 scaled_bessel_i1 scalefactors sca\ nmap scatterplot scatterplot_description scene schur2comp sconcat scopy scsimp scurvature sdowncase sec sech second sequal sequalignore set_alt_display setdifference set_draw_defaults set_edge_weight setelmx setequalp setify setp set_partitions set_plot_option set_prompt set_random_state set_tex_environment set_tex_environment_default setunits setup_autoload set_up_dot_simplifications set_vertex_label seventh sexplode sf sha1sum sha256sum shortest_path shortest_weighted_path show showcomps showr\ atvars sierpinskiale sierpinskimap sign signum similaritytransform simp_inequality simplify_sum simplode simpmetderiv simtran sin sinh sinsert sinvertcase sixth skewness skewness_bernoulli skewness_beta skewness_binomial skewness_chi2 skewness_continuous_uniform skewness_discrete_uniform skewness_exp skewness_f skewness_gamma skewness_general_finite_discrete skewness_geometric skewness_gumbel skewness_hypergeometric skewness_laplace skewness_logistic skewness_lognormal skewness_negative_binomial\ skewness_noncentral_chi2 skewness_noncentral_student_t skewness_normal skewness_pareto skewness_poisson skewness_rayleigh skewness_student_t skewness_weibull slength smake small_rhombicosidodecahedron_graph small_rhombicuboctahedron_graph smax smin smismatch snowmap snub_cube_graph snub_dodecahedron_graph solve solve_rec solve_rec_rat some somrac sort sparse6_decode sparse6_encode sparse6_export sparse6_import specint spherical spherical_bessel_j spherical_bessel_y spherical_hankel1 spherical_h\ ankel2 spherical_harmonic spherical_to_xyz splice split sposition sprint sqfr sqrt sqrtdenest sremove sremovefirst sreverse ssearch ssort sstatus ssubst ssubstfirst staircase standardize standardize_inverse_trig starplot starplot_description status std std1 std_bernoulli std_beta std_binomial std_chi2 std_continuous_uniform std_discrete_uniform std_exp std_f std_gamma std_general_finite_discrete std_geometric std_gumbel std_hypergeometric std_laplace std_logistic std_lognormal std_negative_binom\ ial std_noncentral_chi2 std_noncentral_student_t std_normal std_pareto std_poisson std_rayleigh std_student_t std_weibull stemplot stirling stirling1 stirling2 strim striml strimr string stringout stringp strong_components struve_h struve_l sublis sublist sublist_indices submatrix subsample subset subsetp subst substinpart subst_parallel substpart substring subvar subvarp sum sumcontract summand_to_rec supcase supcontext symbolp symmdifference symmetricp system take_channel take_inference tan ta\ nh taylor taylorinfo taylorp taylor_simplifier taytorat tcl_output tcontract tellrat tellsimp tellsimpafter tentex tenth test_mean test_means_difference test_normality test_proportion test_proportions_difference test_rank_sum test_sign test_signed_rank test_variance test_variance_ratio tex tex1 tex_display texput %th third throw time timedate timer timer_info tldefint tlimit todd_coxeter toeplitz tokens to_lisp topological_sort to_poly to_poly_solve totaldisrep totalfourier totient tpartpol trac\ e tracematrix trace_options transform_sample translate translate_file transpose treefale tree_reduce treillis treinat triangle triangularize trigexpand trigrat trigreduce trigsimp trunc truncate truncated_cube_graph truncated_dodecahedron_graph truncated_icosahedron_graph truncated_tetrahedron_graph tr_warnings_get tube tutte_graph ueivects uforget ultraspherical underlying_graph undiff union unique uniteigenvectors unitp units unit_step unitvector unorder unsum untellrat untimer untrace upperca\ sep uricci uriemann uvect vandermonde_matrix var var1 var_bernoulli var_beta var_binomial var_chi2 var_continuous_uniform var_discrete_uniform var_exp var_f var_gamma var_general_finite_discrete var_geometric var_gumbel var_hypergeometric var_laplace var_logistic var_lognormal var_negative_binomial var_noncentral_chi2 var_noncentral_student_t var_normal var_pareto var_poisson var_rayleigh var_student_t var_weibull vector vectorpotential vectorsimp verbify vers vertex_coloring vertex_connectivity\ vertex_degree vertex_distance vertex_eccentricity vertex_in_degree vertex_out_degree vertices vertices_to_cycle vertices_to_path %w weyl wheel_graph wiener_index wigner_3j wigner_6j wigner_9j with_stdout write_binary_data writebyte write_data writefile wronskian xreduce xthru %y Zeilberger zeroequiv zerofor zeromatrix zeromatrixp zeta zgeev zheev zlange zn_add_table zn_carmichael_lambda zn_characteristic_factors zn_determinant zn_factor_generators zn_invert_by_lu zn_log zn_mult_table absboxchar\ activecontexts adapt_depth additive adim aform algebraic algepsilon algexact aliases allbut all_dotsimp_denoms allocation allsym alphabetic animation antisymmetric arrays askexp assume_pos assume_pos_pred assumescalar asymbol atomgrad atrig1 axes axis_3d axis_bottom axis_left axis_right axis_top azimuth background background_color backsubst berlefact bernstein_explicit besselexpand beta_args_sum_to_integer beta_expand bftorat bftrunc bindtest border boundaries_array box boxchar breakup %c cappi\ ng cauchysum cbrange cbtics center cflength cframe_flag cnonmet_flag color color_bar color_bar_tics colorbox columns commutative complex cone context contexts contour contour_levels cosnpiflag ctaypov ctaypt ctayswitch ctayvar ct_coords ctorsion_flag ctrgsimp cube current_let_rule_package cylinder data_file_name debugmode decreasing default_let_rule_package delay dependencies derivabbrev derivsubst detout diagmetric diff dim dimensions dispflag display2d|10 display_format_internal distribute_ove\ r doallmxops domain domxexpt domxmxops domxnctimes dontfactor doscmxops doscmxplus dot0nscsimp dot0simp dot1simp dotassoc dotconstrules dotdistrib dotexptsimp dotident dotscrules draw_graph_program draw_realpart edge_color edge_coloring edge_partition edge_type edge_width %edispflag elevation %emode endphi endtheta engineering_format_floats enhanced3d %enumer epsilon_lp erfflag erf_representation errormsg error_size error_syms error_type %e_to_numlog eval even evenfun evflag evfun ev_point expan\ dwrt_denom expintexpand expintrep expon expop exptdispflag exptisolate exptsubst facexpand facsum_combine factlim factorflag factorial_expand factors_only fb feature features file_name file_output_append file_search_demo file_search_lisp file_search_maxima|10 file_search_tests file_search_usage file_type_lisp file_type_maxima|10 fill_color fill_density filled_func fixed_vertices flipflag float2bf font font_size fortindent fortspaces fpprec fpprintprec functions gamma_expand gammalim gdet geninde\ x gensumnum GGFCFMAX GGFINFINITY globalsolve gnuplot_command gnuplot_curve_styles gnuplot_curve_titles gnuplot_default_term_command gnuplot_dumb_term_command gnuplot_file_args gnuplot_file_name gnuplot_out_file gnuplot_pdf_term_command gnuplot_pm3d gnuplot_png_term_command gnuplot_postamble gnuplot_preamble gnuplot_ps_term_command gnuplot_svg_term_command gnuplot_term gnuplot_view_args Gosper_in_Zeilberger gradefs grid grid2d grind halfangles head_angle head_both head_length head_type height hyp\ ergeometric_representation %iargs ibase icc1 icc2 icounter idummyx ieqnprint ifb ifc1 ifc2 ifg ifgi ifr iframe_bracket_form ifri igeowedge_flag ikt1 ikt2 imaginary inchar increasing infeval infinity inflag infolists inm inmc1 inmc2 intanalysis integer integervalued integrate_use_rootsof integration_constant integration_constant_counter interpolate_color intfaclim ip_grid ip_grid_in irrational isolate_wrt_times iterations itr julia_parameter %k1 %k2 keepfloat key key_pos kinvariant kt label label\ _alignment label_orientation labels lassociative lbfgs_ncorrections lbfgs_nfeval_max leftjust legend letrat let_rule_packages lfg lg lhospitallim limsubst linear linear_solver linechar linel|10 linenum line_type linewidth line_width linsolve_params linsolvewarn lispdisp listarith listconstvars listdummyvars lmxchar load_pathname loadprint logabs logarc logcb logconcoeffp logexpand lognegint logsimp logx logx_secondary logy logy_secondary logz lriem m1pbranch macroexpansion macros mainvar manual_\ demo maperror mapprint matrix_element_add matrix_element_mult matrix_element_transpose maxapplydepth maxapplyheight maxima_tempdir|10 maxima_userdir|10 maxnegex MAX_ORD maxposex maxpsifracdenom maxpsifracnum maxpsinegint maxpsiposint maxtayorder mesh_lines_color method mod_big_prime mode_check_errorp mode_checkp mode_check_warnp mod_test mod_threshold modular_linear_solver modulus multiplicative multiplicities myoptions nary negdistrib negsumdispflag newline newtonepsilon newtonmaxiter nextlayer\ factor niceindicespref nm nmc noeval nolabels nonegative_lp noninteger nonscalar noun noundisp nouns np npi nticks ntrig numer numer_pbranch obase odd oddfun opacity opproperties opsubst optimprefix optionset orientation origin orthopoly_returns_intervals outative outchar packagefile palette partswitch pdf_file pfeformat phiresolution %piargs piece pivot_count_sx pivot_max_sx plot_format plot_options plot_realpart png_file pochhammer_max_index points pointsize point_size points_joined point_type\ poislim poisson poly_coefficient_ring poly_elimination_order polyfactor poly_grobner_algorithm poly_grobner_debug poly_monomial_order poly_primary_elimination_order poly_return_term_list poly_secondary_elimination_order poly_top_reduction_only posfun position powerdisp pred prederror primep_number_of_tests product_use_gamma program programmode promote_float_to_bigfloat prompt proportional_axes props psexpand ps_file radexpand radius radsubstflag rassociative ratalgdenom ratchristof ratdenomdivi\ de rateinstein ratepsilon ratfac rational ratmx ratprint ratriemann ratsimpexpons ratvarswitch ratweights ratweyl ratwtlvl real realonly redraw refcheck resolution restart resultant ric riem rmxchar %rnum_list rombergabs rombergit rombergmin rombergtol rootsconmode rootsepsilon run_viewer same_xy same_xyz savedef savefactors scalar scalarmatrixp scale scale_lp setcheck setcheckbreak setval show_edge_color show_edges show_edge_type show_edge_width show_id show_label showtime show_vertex_color sho\ w_vertex_size show_vertex_type show_vertices show_weight simp simplified_output simplify_products simpproduct simpsum sinnpiflag solvedecomposes solveexplicit solvefactors solvenullwarn solveradcan solvetrigwarn space sparse sphere spring_embedding_depth sqrtdispflag stardisp startphi starttheta stats_numer stringdisp structures style sublis_apply_lambda subnumsimp sumexpand sumsplitfact surface surface_hide svg_file symmetric tab taylordepth taylor_logexpand taylor_order_coefficients taylor_tru\ ncate_polynomials tensorkill terminal testsuite_files thetaresolution timer_devalue title tlimswitch tr track transcompile transform transform_xy translate_fast_arrays transparent transrun tr_array_as_ref tr_bound_function_applyp tr_file_tty_messagesp tr_float_can_branch_complex tr_function_call_default trigexpandplus trigexpandtimes triginverses trigsign trivial_solutions tr_numer tr_optimize_max_loop tr_semicompile tr_state_vars tr_warn_bad_function_calls tr_warn_fexpr tr_warn_meval tr_warn_mo\ de tr_warn_undeclared tr_warn_undefined_variable tstep ttyoff tube_extremes ufg ug %unitexpand unit_vectors uric uriem use_fast_arrays user_preamble usersetunits values vect_cross verbose vertex_color vertex_coloring vertex_partition vertex_size vertex_type view warnings weyl width windowname windowtitle wired_surface wireframe xaxis xaxis_color xaxis_secondary xaxis_type xaxis_width xlabel xlabel_secondary xlength xrange xrange_secondary xtics xtics_axis xtics_rotate xtics_rotate_secondary xtic\ s_secondary xtics_secondary_axis xu_grid x_voxel xy_file xyplane xy_scale yaxis yaxis_color yaxis_secondary yaxis_type yaxis_width ylabel ylabel_secondary ylength yrange yrange_secondary ytics ytics_axis ytics_rotate ytics_rotate_secondary ytics_secondary ytics_secondary_axis yv_grid y_voxel yx_ratio zaxis zaxis_color zaxis_type zaxis_width zeroa zerob zerobern zeta%pi zlabel zlabel_rotate zlength zmin zn_primroot_limit zn_primroot_pretest",symbol:"_ __ %|0 %%|0"},contains:[{className:"comment", begin:"/\\*",end:"\\*/",contains:["self"]},hljs.QUOTE_STRING_MODE,{className:"number",relevance:0,variants:[{begin:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Ee][-+]?\\d+\\b"},{begin:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Bb][-+]?\\d+\\b",relevance:10},{begin:"\\b(\\.\\d+|\\d+\\.\\d+)\\b"},{begin:"\\b(\\d+|0[0-9A-Za-z]+)\\.?\\b"}]}],illegal:/@/}}return maxima_1=maxima2,maxima_1}var mel_1,hasRequiredMel;function requireMel(){if(hasRequiredMel)return mel_1;hasRequiredMel=1;function mel2(hljs){return{name:"\ MEL",keywords:"int float string vector matrix if else switch case default while do for in break continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor animDisplay animView annotate appendStringArray applicationName applyAttrPreset ap\ plyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp attrPresetEditWin a\ ttributeExists attributeInfo attributeMenu attributeQuery autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge cacheFileTrack camera cameraView c\ anCreateManip canvas capitalizeString catch catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter cmdScrollFieldReporter cmdShell coarsenSubdivSelecti\ onList collision color colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem componentEditor compositingInterop computePolysetVolume condition cone confirmDialog connectAttr connectControl connectDynamic connectJoint connectionInfo constrain constrainValue constructionHistory container containsMultibyte contextInfo control convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx co\ nvertTessellation convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode c\ txTraverse currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo dg\ dirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected displayColor displayCull displayLevelOfDetail displayPref displayRGBColor displaySmoothness displayStats displayString displaySurface distanceDimContext distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator duplicate duplicateCurve duplicateSurfac\ e dynCache dynControl dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor editorTemplate effector emit emitter enableDevice encodeString endString endsWith env equivalent equivalentTol erf error eval evalDeferred evalEcho event exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject\ exists exp expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo filetest filletCurve filter filterCurve filterExpand filterStudioImport findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow flu\ idCacheInfo fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss geometryConstraint getApplicationVersionAsFloat getAttr getClassification getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl gradientControlNo\ Attr graphDollyCtx graphSelectContext graphTrackCtx gravity grid gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey hotkeyCheck hsv_to_rgb hudButto\ n hudSlider hudSliderButton hwReflectionMap hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance instanceable instancer intField intF\ ieldGrp intScrollBar intSlider intSliderGrp interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyfra\ meRegionScaleKeyCtx keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation \ listNodeTypes listPanelCategories listRelatives listSets listTransforms listUnselected listerEditor loadFluid loadNewShelf loadPlugin loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx manipScaleContext manipScaleLimitsCtx marker matc\ h max memory menu menuBarLayout menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV \ nurbsPlane nurbsSelect nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration pan\ elHistory paramDimContext paramDimension paramLocator parent parentConstraint particle particleExists particleInstancer particleRenderInfo partition pasteKey pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend polyAppendFacetCt\ x polyAppendVertex polyAutoProjection polyAverageNormal polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection polyDelEdge polyDelFacet polyDelVe\ rtex polyDuplicateAndConnect polyDuplicateEdge polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNorma\ l polyNormalPerVertex polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing poly\ SplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection ra\ dioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE registerPluginResource rehash reloadImage removeJoint removeMultiInstance removePanelCategory rename renameAttr renameSelectionList renameUI render renderGlobalsNode renderInfo renderLayerButton renderLayerParent renderLayerPostProcess renderLayerUnparent renderManip \ renderPartition renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor renderWindowSelectContext renderer reorder reorderDeformers requires reroot resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage saveIn\ itialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType select\ edNodes selectionConnection separator setAttr setAttrEnumResource setAttrMapping setAttrNiceNameResource setConstraintRestPosition setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject setStampDensity setStartupMessage setState setTool\ To setUITemplate setXformManip sets shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField shortNameOf showHelp showHidden showManipCtx showSelectionInTitle showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx s\ ort sound soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString stringToStringArray strip stripPrefixFro\ mName stroke subdAutoProjection subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext\ texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList textToShelf textureDisplacePlane textureHairColor texturePlacementContext textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower toolButton toolC\ ollection toolDropped toolHasOptions toolPropertyWindow torus toupper trace track trackCtx transferAttributes transformCompare transformLimits translator trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane viewFit viewHeadOn viewLoo\ kAt viewManip viewPlace viewSet visor volumeAxis vortex waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform",illegal:""},{begin:"<=",relevance:0},{begin:"\ =>",relevance:0},{begin:"/\\\\"},{begin:"\\\\/"}]},{className:"built_in",variants:[{begin:":-\\|-->"},{begin:"=",relevance:0}]},COMMENT,hljs.C_BLOCK_COMMENT_MODE,NUMCODE,hljs.NUMBER_MODE,ATOM,STRING,{begin:/:-/},{begin:/\.$/}]}}return mercury_1=mercury2,mercury_1}var mipsasm_1,hasRequiredMipsasm;function requireMipsasm(){if(hasRequiredMipsasm)return mipsasm_1;hasRequiredMipsasm=1;function mipsasm2(hljs){return{name:"MIPS Assembly",case_insensitive:!0,aliases:["mips"],keywords:{$pattern:"\\.?"+hljs. IDENT_RE,meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .ltorg ",built_in:"$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 $31 zero at v0 v1 a0 a1 a2 a3 a4 a5 a6 a7 t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 s0 s1 s2 s3 s4 s5 s6 s7 s8 k0 k1 gp sp fp ra $f0 $f1 \ $f2 $f2 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15 $f16 $f17 $f18 $f19 $f20 $f21 $f22 $f23 $f24 $f25 $f26 $f27 $f28 $f29 $f30 $f31 Context Random EntryLo0 EntryLo1 Context PageMask Wired EntryHi HWREna BadVAddr Count Compare SR IntCtl SRSCtl SRSMap Cause EPC PRId EBase Config Config1 Config2 Config3 LLAddr Debug DEPC DESAVE CacheErr ECC ErrorEPC TagLo DataLo TagHi DataHi WatchLo WatchHi PerfCtl PerfCnt "},contains:[{className:"keyword",begin:"\\b(addi?u?|andi?|b(al)?|beql?|bgez(al)?l?|\ bgtzl?|blezl?|bltz(al)?l?|bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(\\.hb)?|jr(\\.hb)?|lbu?|lhu?|ll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|move|msubu?|mthi|mtlo|mul|multu?|nop|nor|ori?|rotrv?|sb|sc|se[bh]|sh|sllv?|slti?u?|srav?|srlv?|subu?|sw[lr]?|xori?|wsbh|abs\\.[sd]|add\\.[sd]|alnv.ps|bc1[ft]l?|c\\.(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et])\\.[sd]|(ceil|floor|round|trunc)\\.[lw]\\.[sd]|cfc1|cvt\\.d\\.[lsw]|cvt\\.l\\.[dsw]|cvt\\.ps\\.s|cvt\\.s\\.[dlw]|cvt\\.s\\.p[lu]|cvt\\.w\\.[dls]|div\\.[ds]|ldx?c1|luxc1|lw\ x?c1|madd\\.[sd]|mfc1|mov[fntz]?\\.[ds]|msub\\.[sd]|mth?c1|mul\\.[ds]|neg\\.[ds]|nmadd\\.[ds]|nmsub\\.[ds]|p[lu][lu]\\.ps|recip\\.fmt|r?sqrt\\.[ds]|sdx?c1|sub\\.[ds]|suxc1|swx?c1|break|cache|d?eret|[de]i|ehb|mfc0|mtc0|pause|prefx?|rdhwr|rdpgpr|sdbbp|ssnop|synci?|syscall|teqi?|tgei?u?|tlb(p|r|w[ir])|tlti?u?|tnei?|wait|wrpgpr)",end:"\\s"},hljs.COMMENT("[;#](?!\\s*$)","$"),hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\ \\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"0x[0-9a-f]+"},{begin:"\\b-?\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^\\s*[0-9]+:"},{begin:"[0-9]+[bf]"}],relevance:0}],illegal:/\//}}return mipsasm_1=mipsasm2,mipsasm_1}var mizar_1,hasRequiredMizar;function requireMizar(){if(hasRequiredMizar)return mizar_1;hasRequiredMizar=1;function mizar2(hljs){return{name:"Mizar",keywords:"environ vocabularies notation\ s constructors definitions registrations theorems schemes requirements begin end definition registration cluster existence pred func defpred deffunc theorem proof let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from be being by means equals implies iff redefine define now not or attr is mode suppose per cases set thesis contradiction scheme reserve struct correctness compatibility coherence symmetry assymetry reflexivity irreflexivity connected\ ness uniqueness commutativity idempotence involutiveness projectivity",contains:[hljs.COMMENT("::","$")]}}return mizar_1=mizar2,mizar_1}var perl_1,hasRequiredPerl;function requirePerl(){if(hasRequiredPerl)return perl_1;hasRequiredPerl=1;function perl2(hljs){const regex=hljs.regex,KEYWORDS2=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","d\ bmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","get\ pwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta", "qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","st\ ate","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],REGEX_MODIFIERS=/[dualxmsipngr]{0,12}/,PERL_KEYWORDS={$pattern:/[\w.]+/,keyword:KEYWORDS2.join(" ")},SUBST={className:"subst",begin:"[$@]\\{",end:"\\}", keywords:PERL_KEYWORDS},METHOD={begin:/->\{/,end:/\}/},ATTR={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},VAR={scope:"variable",variants:[{begin:/\$\d/},{begin:regex.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[ATTR]},NUMBER={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/}, {match:/\b0b[0-1][0-1_]*\b/}],relevance:0},STRING_CONTAINS=[hljs.BACKSLASH_ESCAPE,SUBST,VAR],REGEX_DELIMS=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],PAIRED_DOUBLE_RE=(prefix,open2,close2="\\1")=>{const middle=close2==="\\1"?close2:regex.concat(close2,open2);return regex.concat(regex.concat("(?:",prefix,")"),open2,/(?:\\.|[^\\\/])*?/,middle,/(?:\\.|[^\\\/])*?/,close2,REGEX_MODIFIERS)},PAIRED_RE=(prefix,open2,close2)=>regex.concat(regex.concat("(?:",prefix,")"),open2,/(?:\\.|[^\\\/])*?/,close2,REGEX_MODIFIERS), PERL_DEFAULT_CONTAINS=[VAR,hljs.HASH_COMMENT_MODE,hljs.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),METHOD,{className:"string",contains:STRING_CONTAINS,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[hljs.BACKSLASH_ESCAPE]},{begin:'"',end:'\ "'},{begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},NUMBER,{begin:"(\\/\\/|"+hljs.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[hljs.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:PAIRED_DOUBLE_RE("s|tr|y",regex.either(...REGEX_DELIMS,{capture:!0}))},{begin:PAIRED_DOUBLE_RE("s|tr|y","\\(","\\)")},{begin:PAIRED_DOUBLE_RE("s|tr|y","\\[","\ \\]")},{begin:PAIRED_DOUBLE_RE("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:PAIRED_RE("(?:m|qr)?",/\//,/\//)},{begin:PAIRED_RE("m|qr",regex.either(...REGEX_DELIMS,{capture:!0}),/\1/)},{begin:PAIRED_RE("m|qr",/\(/,/\)/)},{begin:PAIRED_RE("m|qr",/\[/,/\]/)},{begin:PAIRED_RE("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[hljs.TITLE_MODE,ATTR]},{className:"\ class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[hljs.TITLE_MODE,ATTR,NUMBER]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return SUBST.contains=PERL_DEFAULT_CONTAINS,METHOD.contains=PERL_DEFAULT_CONTAINS,{name:"Perl",aliases:["pl","pm"],keywords:PERL_KEYWORDS,contains:PERL_DEFAULT_CONTAINS}}return perl_1=perl2,perl_1}var mojolicious_1,hasRequiredMojolicious;function requireMojolicious(){ if(hasRequiredMojolicious)return mojolicious_1;hasRequiredMojolicious=1;function mojolicious2(hljs){return{name:"Mojolicious",subLanguage:"xml",contains:[{className:"meta",begin:"^__(END|DATA)__$"},{begin:"^\\s*%{1,2}={0,2}",end:"$",subLanguage:"perl"},{begin:"<%{1,2}={0,2}",end:"={0,1}%>",subLanguage:"perl",excludeBegin:!0,excludeEnd:!0}]}}return mojolicious_1=mojolicious2,mojolicious_1}var monkey_1,hasRequiredMonkey;function requireMonkey(){if(hasRequiredMonkey)return monkey_1;hasRequiredMonkey= 1;function monkey2(hljs){const NUMBER={className:"number",relevance:0,variants:[{begin:"[$][a-fA-F0-9]+"},hljs.NUMBER_MODE]},FUNC_DEFINITION={variants:[{match:[/(function|method)/,/\s+/,hljs.UNDERSCORE_IDENT_RE]}],scope:{1:"keyword",3:"title.function"}},CLASS_DEFINITION={variants:[{match:[/(class|interface|extends|implements)/,/\s+/,hljs.UNDERSCORE_IDENT_RE]}],scope:{1:"keyword",3:"title.class"}};return{name:"Monkey",case_insensitive:!0,keywords:{keyword:["public","private","property","continue", "exit","extern","new","try","catch","eachin","not","abstract","final","select","case","default","const","local","global","field","end","if","then","else","elseif","endif","while","wend","repeat","until","forever","for","to","step","next","return","module","inline","throw","import","and","or","shl","shr","mod"],built_in:["DebugLog","DebugStop","Error","Print","ACos","ACosr","ASin","ASinr","ATan","ATan2","ATan2r","ATanr","Abs","Abs","Ceil","Clamp","Clamp","Cos","Cosr","Exp","Floor","Log","Max","Ma\ x","Min","Min","Pow","Sgn","Sgn","Sin","Sinr","Sqrt","Tan","Tanr","Seed","PI","HALFPI","TWOPI"],literal:["true","false","null"]},illegal:/\/\*/,contains:[hljs.COMMENT("#rem","#end"),hljs.COMMENT("'","$",{relevance:0}),FUNC_DEFINITION,CLASS_DEFINITION,{className:"variable.language",begin:/\b(self|super)\b/},{className:"meta",begin:/\s*#/,end:"$",keywords:{keyword:"if else elseif endif end then"}},{match:[/^\s*/,/strict\b/],scope:{2:"meta"}},{beginKeywords:"alias",end:"=",contains:[hljs.UNDERSCORE_TITLE_MODE]}, hljs.QUOTE_STRING_MODE,NUMBER]}}return monkey_1=monkey2,monkey_1}var moonscript_1,hasRequiredMoonscript;function requireMoonscript(){if(hasRequiredMoonscript)return moonscript_1;hasRequiredMoonscript=1;function moonscript2(hljs){const KEYWORDS2={keyword:"if then not for in while do return else elseif break continue switch and or unless when class extends super local import export from using",literal:"true false nil",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ip\ airs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},JS_IDENT_RE="[A-Za-z$_][0-9A-Za-z$_]*",SUBST={className:"subst",begin:/#\{/,end:/\}/,keywords:KEYWORDS2},EXPRESSIONS=[hljs.inherit(hljs.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'/,end:/'/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:/"/,end:/"/,contains:[ hljs.BACKSLASH_ESCAPE,SUBST]}]},{className:"built_in",begin:"@__"+hljs.IDENT_RE},{begin:"@"+hljs.IDENT_RE},{begin:hljs.IDENT_RE+"\\\\"+hljs.IDENT_RE}];SUBST.contains=EXPRESSIONS;const TITLE=hljs.inherit(hljs.TITLE_MODE,{begin:JS_IDENT_RE}),POSSIBLE_PARAMS_RE="(\\(.*\\)\\s*)?\\B[-=]>",PARAMS={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:["self"].concat(EXPRESSIONS)}]};return{name:"MoonScript",aliases:["moon"],keywords:KEYWORDS2,illegal:/\/\*/, contains:EXPRESSIONS.concat([hljs.COMMENT("--","$"),{className:"function",begin:"^\\s*"+JS_IDENT_RE+"\\s*=\\s*"+POSSIBLE_PARAMS_RE,end:"[-=]>",returnBegin:!0,contains:[TITLE,PARAMS]},{begin:/[\(,:=]\s*/,relevance:0,contains:[{className:"function",begin:POSSIBLE_PARAMS_RE,end:"[-=]>",returnBegin:!0,contains:[PARAMS]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[TITLE]},TITLE]},{className:"\ name",begin:JS_IDENT_RE+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}return moonscript_1=moonscript2,moonscript_1}var n1ql_1,hasRequiredN1ql;function requireN1ql(){if(hasRequiredN1ql)return n1ql_1;hasRequiredN1ql=1;function n1ql2(hljs){return{name:"N1QL",case_insensitive:!0,contains:[{beginKeywords:"build create index delete drop explain infer|10 insert merge prepare select update upsert|10",end:/;/,keywords:{keyword:["all","alter","analyze","and","any","array","as","asc","begin","bet\ ween","binary","boolean","break","bucket","build","by","call","case","cast","cluster","collate","collection","commit","connect","continue","correlate","cover","create","database","dataset","datastore","declare","decrement","delete","derived","desc","describe","distinct","do","drop","each","element","else","end","every","except","exclude","execute","exists","explain","fetch","first","flatten","for","force","from","function","grant","group","gsi","having","if","ignore","ilike","in","include","incr\ ement","index","infer","inline","inner","insert","intersect","into","is","join","key","keys","keyspace","known","last","left","let","letting","like","limit","lsm","map","mapping","matched","materialized","merge","minus","namespace","nest","not","number","object","offset","on","option","or","order","outer","over","parse","partition","password","path","pool","prepare","primary","private","privilege","procedure","public","raw","realm","reduce","rename","return","returning","revoke","right","role","\ rollback","satisfies","schema","select","self","semi","set","show","some","start","statistics","string","system","then","to","transaction","trigger","truncate","under","union","unique","unknown","unnest","unset","update","upsert","use","user","using","validate","value","valued","values","via","view","when","where","while","with","within","work","xor"],literal:["true","false","null","missing|5"],built_in:["array_agg","array_append","array_concat","array_contains","array_count","array_distinct","a\ rray_ifnull","array_length","array_max","array_min","array_position","array_prepend","array_put","array_range","array_remove","array_repeat","array_replace","array_reverse","array_sort","array_sum","avg","count","max","min","sum","greatest","least","ifmissing","ifmissingornull","ifnull","missingif","nullif","ifinf","ifnan","ifnanorinf","naninf","neginfif","posinfif","clock_millis","clock_str","date_add_millis","date_add_str","date_diff_millis","date_diff_str","date_part_millis","date_part_str","\ date_trunc_millis","date_trunc_str","duration_to_str","millis","str_to_millis","millis_to_str","millis_to_utc","millis_to_zone_name","now_millis","now_str","str_to_duration","str_to_utc","str_to_zone_name","decode_json","encode_json","encoded_size","poly_length","base64","base64_encode","base64_decode","meta","uuid","abs","acos","asin","atan","atan2","ceil","cos","degrees","e","exp","ln","log","floor","pi","power","radians","random","round","sign","sin","sqrt","tan","trunc","object_length","obje\ ct_names","object_pairs","object_inner_pairs","object_values","object_inner_values","object_add","object_put","object_remove","object_unwrap","regexp_contains","regexp_like","regexp_position","regexp_replace","contains","initcap","length","lower","ltrim","position","repeat","replace","rtrim","split","substr","title","trim","upper","isarray","isatom","isboolean","isnumber","isobject","isstring","type","toarray","toatom","toboolean","tonumber","toobject","tostring"]},contains:[{className:"string", begin:"'",end:"'",contains:[hljs.BACKSLASH_ESCAPE]},{className:"string",begin:'"',end:'"',contains:[hljs.BACKSLASH_ESCAPE]},{className:"symbol",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE]},hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE]},hljs.C_BLOCK_COMMENT_MODE]}}return n1ql_1=n1ql2,n1ql_1}var nestedtext_1,hasRequiredNestedtext;function requireNestedtext(){if(hasRequiredNestedtext)return nestedtext_1;hasRequiredNestedtext=1;function nestedtext2(hljs){const NESTED={match:[/^\s*(?=\S)/,/[^:]+/, /:\s*/,/$/],className:{2:"attribute",3:"punctuation"}},DICTIONARY_ITEM={match:[/^\s*(?=\S)/,/[^:]*[^: ]/,/[ ]*:/,/[ ]/,/.*$/],className:{2:"attribute",3:"punctuation",5:"string"}},STRING={match:[/^\s*/,/>/,/[ ]/,/.*$/],className:{2:"punctuation",4:"string"}},LIST_ITEM={variants:[{match:[/^\s*/,/-/,/[ ]/,/.*$/]},{match:[/^\s*/,/-$/]}],className:{2:"bullet",4:"string"}};return{name:"Nested Text",aliases:["nt"],contains:[hljs.inherit(hljs.HASH_COMMENT_MODE,{begin:/^\s*(?=#)/,excludeBegin:!0}),LIST_ITEM, STRING,NESTED,DICTIONARY_ITEM]}}return nestedtext_1=nestedtext2,nestedtext_1}var nginx_1,hasRequiredNginx;function requireNginx(){if(hasRequiredNginx)return nginx_1;hasRequiredNginx=1;function nginx2(hljs){const regex=hljs.regex,VAR={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{\w+\}/},{begin:regex.concat(/[$@]/,hljs.UNDERSCORE_IDENT_RE)}]},DEFAULT={endsWithParent:!0,keywords:{$pattern:/[a-z_]{2,}|\/dev\/poll/,literal:["on","off","yes","no","true","false","none","blocked","debug","\ info","notice","warn","error","crit","select","break","last","permanent","redirect","kqueue","rtsig","epoll","poll","/dev/poll"]},relevance:0,illegal:"=>",contains:[hljs.HASH_COMMENT_MODE,{className:"string",contains:[hljs.BACKSLASH_ESCAPE,VAR],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[VAR]},{className:"regexp",contains:[hljs.BACKSLASH_ESCAPE,VAR],variants:[{begin:"\\s\\^",end:"\\s|\\{|;",returnEnd:!0},{begin:"~\\*?\ \\s+",end:"\\s|\\{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]?\\b",relevance:0},VAR]};return{name:"Nginx config",aliases:["nginxconf"],contains:[hljs.HASH_COMMENT_MODE,{beginKeywords:"upstream location",end:/;|\{/,contains:DEFAULT.contains,keywords:{section:"upstream location"}},{className:"section",begin:regex.concat(hljs.UNDERSCORE_IDENT_RE+ regex.lookahead(/\s+\{/)),relevance:0},{begin:regex.lookahead(hljs.UNDERSCORE_IDENT_RE+"\\s"),end:";|\\{",contains:[{className:"attribute",begin:hljs.UNDERSCORE_IDENT_RE,starts:DEFAULT}],relevance:0}],illegal:"[^\\s\\}\\{]"}}return nginx_1=nginx2,nginx_1}var nim_1,hasRequiredNim;function requireNim(){if(hasRequiredNim)return nim_1;hasRequiredNim=1;function nim2(hljs){return{name:"Nim",keywords:{keyword:["addr","and","as","asm","bind","block","break","case","cast","concept","const","continue","co\ nverter","defer","discard","distinct","div","do","elif","else","end","enum","except","export","finally","for","from","func","generic","guarded","if","import","in","include","interface","is","isnot","iterator","let","macro","method","mixin","mod","nil","not","notin","object","of","or","out","proc","ptr","raise","ref","return","shared","shl","shr","static","template","try","tuple","type","using","var","when","while","with","without","xor","yield"],literal:["true","false"],type:["int","int8","int16", "int32","int64","uint","uint8","uint16","uint32","uint64","float","float32","float64","bool","char","string","cstring","pointer","expr","stmt","void","auto","any","range","array","openarray","varargs","seq","set","clong","culong","cchar","cschar","cshort","cint","csize","clonglong","cfloat","cdouble","clongdouble","cuchar","cushort","cuint","culonglong","cstringarray","semistatic"],built_in:["stdin","stdout","stderr","result"]},contains:[{className:"meta",begin:/\{\./,end:/\.\}/,relevance:10},{className:"\ string",begin:/[a-zA-Z]\w*"/,end:/"/,contains:[{begin:/""/}]},{className:"string",begin:/([a-zA-Z]\w*)?"""/,end:/"""/},hljs.QUOTE_STRING_MODE,{className:"type",begin:/\b[A-Z]\w+\b/,relevance:0},{className:"number",relevance:0,variants:[{begin:/\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/},{begin:/\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/}]},hljs.HASH_COMMENT_MODE]}}return nim_1= nim2,nim_1}var nix_1,hasRequiredNix;function requireNix(){if(hasRequiredNix)return nix_1;hasRequiredNix=1;function nix2(hljs){const regex=hljs.regex,KEYWORDS2={keyword:["assert","else","if","in","inherit","let","or","rec","then","with"],literal:["true","false","null"],built_in:["abort","baseNameOf","builtins","derivation","derivationStrict","dirOf","fetchGit","fetchMercurial","fetchTarball","fetchTree","fromTOML","import","isNull","map","placeholder","removeAttrs","scopedImport","throw","toStrin\ g"]},BUILTINS={scope:"built_in",match:regex.either(...["abort","add","addDrvOutputDependencies","addErrorContext","all","any","appendContext","attrNames","attrValues","baseNameOf","bitAnd","bitOr","bitXor","break","builtins","catAttrs","ceil","compareVersions","concatLists","concatMap","concatStringsSep","convertHash","currentSystem","currentTime","deepSeq","derivation","derivationStrict","dirOf","div","elem","elemAt","false","fetchGit","fetchMercurial","fetchTarball","fetchTree","fetchurl","fil\ ter","filterSource","findFile","flakeRefToString","floor","foldl'","fromJSON","fromTOML","functionArgs","genList","genericClosure","getAttr","getContext","getEnv","getFlake","groupBy","hasAttr","hasContext","hashFile","hashString","head","import","intersectAttrs","isAttrs","isBool","isFloat","isFunction","isInt","isList","isNull","isPath","isString","langVersion","length","lessThan","listToAttrs","map","mapAttrs","match","mul","nixPath","nixVersion","null","parseDrvName","parseFlakeRef","partiti\ on","path","pathExists","placeholder","readDir","readFile","readFileType","removeAttrs","replaceStrings","scopedImport","seq","sort","split","splitVersion","storeDir","storePath","stringLength","sub","substring","tail","throw","toFile","toJSON","toPath","toString","toXML","trace","traceVerbose","true","tryEval","typeOf","unsafeDiscardOutputDependency","unsafeDiscardStringContext","unsafeGetAttrPos","warn","zipAttrsWith"].map(b=>`builtins\\.${b}`)),relevance:10},IDENTIFIER_REGEX="[A-Za-z_][A-Za-z\ 0-9_'-]*",LOOKUP_PATH={scope:"symbol",match:new RegExp(`<${IDENTIFIER_REGEX}(/${IDENTIFIER_REGEX})*>`)},PATH_PIECE="[A-Za-z0-9_\\+\\.-]+",PATH={scope:"symbol",match:new RegExp(`(\\.\\.|\\.|~)?/(${PATH_PIECE})?(/${PATH_PIECE})*(?=[\\s;])`)},OPERATOR_WITHOUT_MINUS_REGEX=regex.either("==","=","\\+\\+","\\+","<=","<\\|","<",">=",">","->","//","/","!=","!","\\|\\|","\\|>","\\?","\\*","&&"),OPERATOR={scope:"operator",match:regex.concat(OPERATOR_WITHOUT_MINUS_REGEX,/(?!-)/),relevance:0},NUMBER={scope:"\ number",match:new RegExp(`${hljs.NUMBER_RE}(?!-)`),relevance:0},MINUS_OPERATOR={variants:[{scope:"operator",beforeMatch:/\s/,begin:/-(?!>)/},{begin:[new RegExp(`${hljs.NUMBER_RE}`),/-/,/(?!>)/],beginScope:{1:"number",2:"operator"}},{begin:[OPERATOR_WITHOUT_MINUS_REGEX,/-/,/(?!>)/],beginScope:{1:"operator",2:"operator"}}],relevance:0},ATTRS={beforeMatch:/(^|\{|;)\s*/,begin:new RegExp(`${IDENTIFIER_REGEX}(\\.${IDENTIFIER_REGEX})*\\s*=(?!=)`),returnBegin:!0,relevance:0,contains:[{scope:"attr",match:new RegExp( `${IDENTIFIER_REGEX}(\\.${IDENTIFIER_REGEX})*(?=\\s*=)`),relevance:.2}]},NORMAL_ESCAPED_DOLLAR={scope:"char.escape",match:/\\\$/},INDENTED_ESCAPED_DOLLAR={scope:"char.escape",match:/''\$/},ANTIQUOTE={scope:"subst",begin:/\$\{/,end:/\}/,keywords:KEYWORDS2},ESCAPED_DOUBLEQUOTE={scope:"char.escape",match:/'''/},ESCAPED_LITERAL={scope:"char.escape",match:/\\(?!\$)./},STRING={scope:"string",variants:[{begin:"''",end:"''",contains:[INDENTED_ESCAPED_DOLLAR,ANTIQUOTE,ESCAPED_DOUBLEQUOTE,ESCAPED_LITERAL]}, {begin:'"',end:'"',contains:[NORMAL_ESCAPED_DOLLAR,ANTIQUOTE,ESCAPED_LITERAL]}]},FUNCTION_PARAMS={scope:"params",match:new RegExp(`${IDENTIFIER_REGEX}\\s*:(?=\\s)`)},EXPRESSIONS=[NUMBER,hljs.HASH_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT(/\/\*\*(?!\/)/,/\*\//,{subLanguage:"markdown",relevance:0}),BUILTINS,STRING,LOOKUP_PATH,PATH,FUNCTION_PARAMS,ATTRS,MINUS_OPERATOR,OPERATOR];ANTIQUOTE.contains=EXPRESSIONS;const REPL=[{scope:"meta.prompt",match:/^nix-repl>(?=\s)/,relevance:10},{scope:"m\ eta",beforeMatch:/\s+/,begin:/:([a-z]+|\?)/}];return{name:"Nix",aliases:["nixos"],keywords:KEYWORDS2,contains:EXPRESSIONS.concat(REPL)}}return nix_1=nix2,nix_1}var nodeRepl_1,hasRequiredNodeRepl;function requireNodeRepl(){if(hasRequiredNodeRepl)return nodeRepl_1;hasRequiredNodeRepl=1;function nodeRepl2(hljs){return{name:"Node REPL",contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"javascript"}},variants:[{begin:/^>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return nodeRepl_1= nodeRepl2,nodeRepl_1}var nsis_1,hasRequiredNsis;function requireNsis(){if(hasRequiredNsis)return nsis_1;hasRequiredNsis=1;function nsis2(hljs){const regex=hljs.regex,LANGUAGE_CONSTANTS=["ADMINTOOLS","APPDATA","CDBURN_AREA","CMDLINE","COMMONFILES32","COMMONFILES64","COMMONFILES","COOKIES","DESKTOP","DOCUMENTS","EXEDIR","EXEFILE","EXEPATH","FAVORITES","FONTS","HISTORY","HWNDPARENT","INSTDIR","INTERNET_CACHE","LANGUAGE","LOCALAPPDATA","MUSIC","NETHOOD","OUTDIR","PICTURES","PLUGINSDIR","PRINTHOOD","\ PROFILE","PROGRAMFILES32","PROGRAMFILES64","PROGRAMFILES","QUICKLAUNCH","RECENT","RESOURCES_LOCALIZED","RESOURCES","SENDTO","SMPROGRAMS","SMSTARTUP","STARTMENU","SYSDIR","TEMP","TEMPLATES","VIDEOS","WINDIR"],PARAM_NAMES=["ARCHIVE","FILE_ATTRIBUTE_ARCHIVE","FILE_ATTRIBUTE_NORMAL","FILE_ATTRIBUTE_OFFLINE","FILE_ATTRIBUTE_READONLY","FILE_ATTRIBUTE_SYSTEM","FILE_ATTRIBUTE_TEMPORARY","HKCR","HKCU","HKDD","HKEY_CLASSES_ROOT","HKEY_CURRENT_CONFIG","HKEY_CURRENT_USER","HKEY_DYN_DATA","HKEY_LOCAL_MACHINE", "HKEY_PERFORMANCE_DATA","HKEY_USERS","HKLM","HKPD","HKU","IDABORT","IDCANCEL","IDIGNORE","IDNO","IDOK","IDRETRY","IDYES","MB_ABORTRETRYIGNORE","MB_DEFBUTTON1","MB_DEFBUTTON2","MB_DEFBUTTON3","MB_DEFBUTTON4","MB_ICONEXCLAMATION","MB_ICONINFORMATION","MB_ICONQUESTION","MB_ICONSTOP","MB_OK","MB_OKCANCEL","MB_RETRYCANCEL","MB_RIGHT","MB_RTLREADING","MB_SETFOREGROUND","MB_TOPMOST","MB_USERICON","MB_YESNO","NORMAL","OFFLINE","READONLY","SHCTX","SHELL_CONTEXT","SYSTEM|TEMPORARY"],COMPILER_FLAGS=["addin\ cludedir","addplugindir","appendfile","assert","cd","define","delfile","echo","else","endif","error","execute","finalize","getdllversion","gettlbversion","if","ifdef","ifmacrodef","ifmacrondef","ifndef","include","insertmacro","macro","macroend","makensis","packhdr","searchparse","searchreplace","system","tempfile","undef","uninstfinalize","verbose","warning"],CONSTANTS={className:"variable.constant",begin:regex.concat(/\$/,regex.either(...LANGUAGE_CONSTANTS))},DEFINES={className:"variable",begin:/\$+\{[\!\w.:-]+\}/}, VARIABLES={className:"variable",begin:/\$+\w[\w\.]*/,illegal:/\(\)\{\}/},LANGUAGES={className:"variable",begin:/\$+\([\w^.:!-]+\)/},PARAMETERS={className:"params",begin:regex.either(...PARAM_NAMES)},COMPILER={className:"keyword",begin:regex.concat(/!/,regex.either(...COMPILER_FLAGS))},ESCAPE_CHARS={className:"char.escape",begin:/\$(\\[nrt]|\$)/},PLUGINS={className:"title.function",begin:/\w+::\w+/},STRING={className:"string",variants:[{begin:'"',end:'"'},{begin:"'",end:"'"},{begin:"`",end:"`"}], illegal:/\n/,contains:[ESCAPE_CHARS,CONSTANTS,DEFINES,VARIABLES,LANGUAGES]},KEYWORDS2=["Abort","AddBrandingImage","AddSize","AllowRootDirInstall","AllowSkipFiles","AutoCloseWindow","BGFont","BGGradient","BrandingText","BringToFront","Call","CallInstDLL","Caption","ChangeUI","CheckBitmap","ClearErrors","CompletedText","ComponentText","CopyFiles","CRCCheck","CreateDirectory","CreateFont","CreateShortCut","Delete","DeleteINISec","DeleteINIStr","DeleteRegKey","DeleteRegValue","DetailPrint","DetailsB\ uttonText","DirText","DirVar","DirVerify","EnableWindow","EnumRegKey","EnumRegValue","Exch","Exec","ExecShell","ExecShellWait","ExecWait","ExpandEnvStrings","File","FileBufSize","FileClose","FileErrorText","FileOpen","FileRead","FileReadByte","FileReadUTF16LE","FileReadWord","FileWriteUTF16LE","FileSeek","FileWrite","FileWriteByte","FileWriteWord","FindClose","FindFirst","FindNext","FindWindow","FlushINI","GetCurInstType","GetCurrentAddress","GetDlgItem","GetDLLVersion","GetDLLVersionLocal","Get\ ErrorLevel","GetFileTime","GetFileTimeLocal","GetFullPathName","GetFunctionAddress","GetInstDirError","GetKnownFolderPath","GetLabelAddress","GetTempFileName","GetWinVer","Goto","HideWindow","Icon","IfAbort","IfErrors","IfFileExists","IfRebootFlag","IfRtlLanguage","IfShellVarContextAll","IfSilent","InitPluginsDir","InstallButtonText","InstallColors","InstallDir","InstallDirRegKey","InstProgressFlags","InstType","InstTypeGetText","InstTypeSetText","Int64Cmp","Int64CmpU","Int64Fmt","IntCmp","IntCm\ pU","IntFmt","IntOp","IntPtrCmp","IntPtrCmpU","IntPtrOp","IsWindow","LangString","LicenseBkColor","LicenseData","LicenseForceSelection","LicenseLangString","LicenseText","LoadAndSetImage","LoadLanguageFile","LockWindow","LogSet","LogText","ManifestDPIAware","ManifestLongPathAware","ManifestMaxVersionTested","ManifestSupportedOS","MessageBox","MiscButtonText","Name|0","Nop","OutFile","Page","PageCallbacks","PEAddResource","PEDllCharacteristics","PERemoveResource","PESubsysVer","Pop","Push","Quit", "ReadEnvStr","ReadINIStr","ReadRegDWORD","ReadRegStr","Reboot","RegDLL","Rename","RequestExecutionLevel","ReserveFile","Return","RMDir","SearchPath","SectionGetFlags","SectionGetInstTypes","SectionGetSize","SectionGetText","SectionIn","SectionSetFlags","SectionSetInstTypes","SectionSetSize","SectionSetText","SendMessage","SetAutoClose","SetBrandingImage","SetCompress","SetCompressor","SetCompressorDictSize","SetCtlColors","SetCurInstType","SetDatablockOptimize","SetDateSave","SetDetailsPrint","S\ etDetailsView","SetErrorLevel","SetErrors","SetFileAttributes","SetFont","SetOutPath","SetOverwrite","SetRebootFlag","SetRegView","SetShellVarContext","SetSilent","ShowInstDetails","ShowUninstDetails","ShowWindow","SilentInstall","SilentUnInstall","Sleep","SpaceTexts","StrCmp","StrCmpS","StrCpy","StrLen","SubCaption","Unicode","UninstallButtonText","UninstallCaption","UninstallIcon","UninstallSubCaption","UninstallText","UninstPage","UnRegDLL","Var","VIAddVersionKey","VIFileVersion","VIProductVe\ rsion","WindowIcon","WriteINIStr","WriteRegBin","WriteRegDWORD","WriteRegExpandStr","WriteRegMultiStr","WriteRegNone","WriteRegStr","WriteUninstaller","XPStyle"],LITERALS2=["admin","all","auto","both","bottom","bzip2","colored","components","current","custom","directory","false","force","hide","highest","ifdiff","ifnewer","instfiles","lastused","leave","left","license","listonly","lzma","nevershow","none","normal","notset","off","on","open","print","right","show","silent","silentlog","smooth","t\ extonly","top","true","try","un.components","un.custom","un.directory","un.instfiles","un.license","uninstConfirm","user","Win10","Win7","Win8","WinVista","zlib"],FUNCTION_DEFINITION={match:[/Function/,/\s+/,regex.concat(/(\.)?/,hljs.IDENT_RE)],scope:{1:"keyword",3:"title.function"}},VARIABLE_DEFINITION={match:[/Var/,/\s+/,/(?:\/GLOBAL\s+)?/,/[A-Za-z][\w.]*/],scope:{1:"keyword",3:"params",4:"variable"}};return{name:"NSIS",case_insensitive:!0,keywords:{keyword:KEYWORDS2,literal:LITERALS2},contains:[ hljs.HASH_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT(";","$",{relevance:0}),VARIABLE_DEFINITION,FUNCTION_DEFINITION,{beginKeywords:"Function PageEx Section SectionGroup FunctionEnd SectionEnd"},STRING,COMPILER,DEFINES,VARIABLES,LANGUAGES,PARAMETERS,PLUGINS,hljs.NUMBER_MODE]}}return nsis_1=nsis2,nsis_1}var objectivec_1,hasRequiredObjectivec;function requireObjectivec(){if(hasRequiredObjectivec)return objectivec_1;hasRequiredObjectivec=1;function objectivec2(hljs){const API_CLASS={className:"\ built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},IDENTIFIER_RE=/[a-zA-Z@][a-zA-Z0-9_]*/,KEYWORDS2={"variable.language":["this","super"],$pattern:IDENTIFIER_RE,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized", "id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__k\ indof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME", "NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},CLASS_KEYWORDS={$pattern:IDENTIFIER_RE,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"O\ bjective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:KEYWORDS2,illegal:"/,end:/$/,illegal:"\\n"},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+CLASS_KEYWORDS.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:CLASS_KEYWORDS,contains:[hljs.UNDERSCORE_TITLE_MODE]},{begin:"\\."+hljs.UNDERSCORE_IDENT_RE,relevance:0}]}}return objectivec_1=objectivec2,objectivec_1}var ocaml_1,hasRequiredOcaml;function requireOcaml(){if(hasRequiredOcaml) return ocaml_1;hasRequiredOcaml=1;function ocaml2(hljs){return{name:"OCaml",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",built_in:"array bool byte\ s char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref",literal:"true false"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},hljs.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*",relevance:0},hljs.inherit(hljs.APOS_STRING_MODE,{className:"\ string",relevance:0}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/->/}]}}return ocaml_1=ocaml2,ocaml_1}var openscad_1,hasRequiredOpenscad;function requireOpenscad(){if(hasRequiredOpenscad)return openscad_1;hasRequiredOpenscad=1;function openscad2(hljs){const SPECIAL_VARS={className:"keyword",begin:"\\$(f[asn]|t|vp[rtd]|ch\ ildren)"},LITERALS2={className:"literal",begin:"false|true|PI|undef"},NUMBERS={className:"number",begin:"\\b\\d+(\\.\\d+)?(e-?\\d+)?",relevance:0},STRING=hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),PREPRO={className:"meta",keywords:{keyword:"include use"},begin:"include|use <",end:">"},PARAMS={className:"params",begin:"\\(",end:"\\)",contains:["self",NUMBERS,STRING,SPECIAL_VARS,LITERALS2]},MODIFIERS={begin:"[*!#%]",relevance:0},FUNCTIONS={className:"function",beginKeywords:"module functi\ on",end:/=|\{/,contains:[PARAMS,hljs.UNDERSCORE_TITLE_MODE]};return{name:"OpenSCAD",aliases:["scad"],keywords:{keyword:"function module include use for intersection_for if else \\%",literal:"false true PI undef",built_in:"circle square polygon text sphere cube cylinder polyhedron translate rotate scale resize mirror multmatrix color offset hull minkowski union difference intersection abs sign sin cos tan acos asin atan atan2 floor round ceil ln log pow sqrt exp rands min max concat lookup str ch\ r search version version_num norm cross parent_module echo import import_dxf dxf_linear_extrude linear_extrude rotate_extrude surface projection render children dxf_cross dxf_dim let assign"},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,NUMBERS,PREPRO,STRING,SPECIAL_VARS,MODIFIERS,FUNCTIONS]}}return openscad_1=openscad2,openscad_1}var oxygene_1,hasRequiredOxygene;function requireOxygene(){if(hasRequiredOxygene)return oxygene_1;hasRequiredOxygene=1;function oxygene2(hljs){const OXYGENE_KEYWORDS={ $pattern:/\.?\w+/,keyword:"abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited inline interface into invariants is iterator join locked lockin\ g loop matching method mod module namespace nested new nil not notify nullable of old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdc\ all cdecl pascal register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained"},CURLY_COMMENT=hljs.COMMENT(/\{/,/\}/,{relevance:0}),PAREN_COMMENT=hljs.COMMENT("\\(\\*","\\*\\)",{relevance:10}),STRING={className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},CHAR_STRING={className:"string",begin:"(#\\d+)+"},FUNCTION={beginKeywords:"function constructor destructor procedure method",end:"[:;]",keywords:"function constructor|10 de\ structor|10 procedure|10 method|10",contains:[hljs.inherit(hljs.TITLE_MODE,{scope:"title.function"}),{className:"params",begin:"\\(",end:"\\)",keywords:OXYGENE_KEYWORDS,contains:[STRING,CHAR_STRING]},CURLY_COMMENT,PAREN_COMMENT]},SEMICOLON={scope:"punctuation",match:/;/,relevance:0};return{name:"Oxygene",case_insensitive:!0,keywords:OXYGENE_KEYWORDS,illegal:'("|\\$[G-Zg-z]|\\/\\*||->)',contains:[CURLY_COMMENT,PAREN_COMMENT,hljs.C_LINE_COMMENT_MODE,STRING,CHAR_STRING,hljs.NUMBER_MODE,FUNCTION, SEMICOLON]}}return oxygene_1=oxygene2,oxygene_1}var parser3_1,hasRequiredParser3;function requireParser3(){if(hasRequiredParser3)return parser3_1;hasRequiredParser3=1;function parser32(hljs){const CURLY_SUBCOMMENT=hljs.COMMENT(/\{/,/\}/,{contains:["self"]});return{name:"Parser3",subLanguage:"xml",relevance:0,contains:[hljs.COMMENT("^#","$"),hljs.COMMENT(/\^rem\{/,/\}/,{relevance:10,contains:[CURLY_SUBCOMMENT]}),{className:"meta",begin:"^@(?:BASE|USE|CLASS|OPTIONS)$",relevance:10},{className:"tit\ le",begin:"@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$"},{className:"variable",begin:/\$\{?[\w\-.:]+\}?/},{className:"keyword",begin:/\^[\w\-.:]+/},{className:"number",begin:"\\^#[0-9a-fA-F]+"},hljs.C_NUMBER_MODE]}}return parser3_1=parser32,parser3_1}var pf_1,hasRequiredPf;function requirePf(){if(hasRequiredPf)return pf_1;hasRequiredPf=1;function pf2(hljs){const MACRO={className:"variable",begin:/\$[\w\d#@][\w\d_]*/,relevance:0},TABLE={className:"variable",begin:/<(?!\/)/,end:/>/};return{ name:"Packet Filter config",aliases:["pf.conf"],keywords:{$pattern:/[a-z0-9_<>-]+/,built_in:"block match pass load anchor|5 antispoof|10 set table",keyword:"in out log quick on rdomain inet inet6 proto from port os to route allow-opts divert-packet divert-reply divert-to flags group icmp-type icmp6-type label once probability recieved-on rtable prio queue tos tag tagged user keep fragment for os drop af-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robin source-hash stat\ ic-port dup-to reply-to route-to parent bandwidth default min max qlimit block-policy debug fingerprints hostid limit loginterface optimization reassemble ruleset-optimization basic none profile skip state-defaults state-policy timeout const counters persist no modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppy source-track global rule max-src-nodes max-src-states max-src-conn max-src-conn-rate overload flush scrub|5 max-mss min-ttl no-df|10 random-id",literal:"all any no-route \ self urpf-failed egress|5 unknown"},contains:[hljs.HASH_COMMENT_MODE,hljs.NUMBER_MODE,hljs.QUOTE_STRING_MODE,MACRO,TABLE]}}return pf_1=pf2,pf_1}var pgsql_1,hasRequiredPgsql;function requirePgsql(){if(hasRequiredPgsql)return pgsql_1;hasRequiredPgsql=1;function pgsql2(hljs){const COMMENT_MODE=hljs.COMMENT("--","$"),UNQUOTED_IDENT="[a-zA-Z_][a-zA-Z_0-9$]*",DOLLAR_STRING="\\$([a-zA-Z_]?|[a-zA-Z_][a-zA-Z_0-9]*)\\$",LABEL="<<\\s*"+UNQUOTED_IDENT+"\\s*>>",SQL_KW="ABORT ALTER ANALYZE BEGIN CALL CHECKPOI\ NT|10 CLOSE CLUSTER COMMENT COMMIT COPY CREATE DEALLOCATE DECLARE DELETE DISCARD DO DROP END EXECUTE EXPLAIN FETCH GRANT IMPORT INSERT LISTEN LOAD LOCK MOVE NOTIFY PREPARE REASSIGN|10 REFRESH REINDEX RELEASE RESET REVOKE ROLLBACK SAVEPOINT SECURITY SELECT SET SHOW START TRUNCATE UNLISTEN|10 UPDATE VACUUM|10 VALUES AGGREGATE COLLATION CONVERSION|10 DATABASE DEFAULT PRIVILEGES DOMAIN TRIGGER EXTENSION FOREIGN WRAPPER|10 TABLE FUNCTION GROUP LANGUAGE LARGE OBJECT MATERIALIZED VIEW OPERATOR CLASS FA\ MILY POLICY PUBLICATION|10 ROLE RULE SCHEMA SEQUENCE SERVER STATISTICS SUBSCRIPTION SYSTEM TABLESPACE CONFIGURATION DICTIONARY PARSER TEMPLATE TYPE USER MAPPING PREPARED ACCESS METHOD CAST AS TRANSFORM TRANSACTION OWNED TO INTO SESSION AUTHORIZATION INDEX PROCEDURE ASSERTION ALL ANALYSE AND ANY ARRAY ASC ASYMMETRIC|10 BOTH CASE CHECK COLLATE COLUMN CONCURRENTLY|10 CONSTRAINT CROSS DEFERRABLE RANGE DESC DISTINCT ELSE EXCEPT FOR FREEZE|10 FROM FULL HAVING ILIKE IN INITIALLY INNER INTERSECT IS ISNU\ LL JOIN LATERAL LEADING LIKE LIMIT NATURAL NOT NOTNULL NULL OFFSET ON ONLY OR ORDER OUTER OVERLAPS PLACING PRIMARY REFERENCES RETURNING SIMILAR SOME SYMMETRIC TABLESAMPLE THEN TRAILING UNION UNIQUE USING VARIADIC|10 VERBOSE WHEN WHERE WINDOW WITH BY RETURNS INOUT OUT SETOF|10 IF STRICT CURRENT CONTINUE OWNER LOCATION OVER PARTITION WITHIN BETWEEN ESCAPE EXTERNAL INVOKER DEFINER WORK RENAME VERSION CONNECTION CONNECT TABLES TEMP TEMPORARY FUNCTIONS SEQUENCES TYPES SCHEMAS OPTION CASCADE RESTRICT \ ADD ADMIN EXISTS VALID VALIDATE ENABLE DISABLE REPLICA|10 ALWAYS PASSING COLUMNS PATH REF VALUE OVERRIDING IMMUTABLE STABLE VOLATILE BEFORE AFTER EACH ROW PROCEDURAL ROUTINE NO HANDLER VALIDATOR OPTIONS STORAGE OIDS|10 WITHOUT INHERIT DEPENDS CALLED INPUT LEAKPROOF|10 COST ROWS NOWAIT SEARCH UNTIL ENCRYPTED|10 PASSWORD CONFLICT|10 INSTEAD INHERITS CHARACTERISTICS WRITE CURSOR ALSO STATEMENT SHARE EXCLUSIVE INLINE ISOLATION REPEATABLE READ COMMITTED SERIALIZABLE UNCOMMITTED LOCAL GLOBAL SQL PROCE\ DURES RECURSIVE SNAPSHOT ROLLUP CUBE TRUSTED|10 INCLUDE FOLLOWING PRECEDING UNBOUNDED RANGE GROUPS UNENCRYPTED|10 SYSID FORMAT DELIMITER HEADER QUOTE ENCODING FILTER OFF FORCE_QUOTE FORCE_NOT_NULL FORCE_NULL COSTS BUFFERS TIMING SUMMARY DISABLE_PAGE_SKIPPING RESTART CYCLE GENERATED IDENTITY DEFERRED IMMEDIATE LEVEL LOGGED UNLOGGED OF NOTHING NONE EXCLUDE ATTRIBUTE USAGE ROUTINES TRUE FALSE NAN INFINITY ",ROLE_ATTRS="SUPERUSER NOSUPERUSER CREATEDB NOCREATEDB CREATEROLE NOCREATEROLE INHERIT NOINHE\ RIT LOGIN NOLOGIN REPLICATION NOREPLICATION BYPASSRLS NOBYPASSRLS ",PLPGSQL_KW="ALIAS BEGIN CONSTANT DECLARE END EXCEPTION RETURN PERFORM|10 RAISE GET DIAGNOSTICS STACKED|10 FOREACH LOOP ELSIF EXIT WHILE REVERSE SLICE DEBUG LOG INFO NOTICE WARNING ASSERT OPEN ",TYPES2="BIGINT INT8 BIGSERIAL SERIAL8 BIT VARYING VARBIT BOOLEAN BOOL BOX BYTEA CHARACTER CHAR VARCHAR CIDR CIRCLE DATE DOUBLE PRECISION FLOAT8 FLOAT INET INTEGER INT INT4 INTERVAL JSON JSONB LINE LSEG|10 MACADDR MACADDR8 MONEY NUMERIC DE\ C DECIMAL PATH POINT POLYGON REAL FLOAT4 SMALLINT INT2 SMALLSERIAL|10 SERIAL2|10 SERIAL|10 SERIAL4|10 TEXT TIME ZONE TIMETZ|10 TIMESTAMP TIMESTAMPTZ|10 TSQUERY|10 TSVECTOR|10 TXID_SNAPSHOT|10 UUID XML NATIONAL NCHAR INT4RANGE|10 INT8RANGE|10 NUMRANGE|10 TSRANGE|10 TSTZRANGE|10 DATERANGE|10 ANYELEMENT ANYARRAY ANYNONARRAY ANYENUM ANYRANGE CSTRING INTERNAL RECORD PG_DDL_COMMAND VOID UNKNOWN OPAQUE REFCURSOR NAME OID REGPROC|10 REGPROCEDURE|10 REGOPER|10 REGOPERATOR|10 REGCLASS|10 REGTYPE|10 REGROL\ E|10 REGNAMESPACE|10 REGCONFIG|10 REGDICTIONARY|10 ",TYPES_RE=TYPES2.trim().split(" ").map(function(val){return val.split("|")[0]}).join("|"),SQL_BI="CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER CURRENT_CATALOG|10 CURRENT_DATE LOCALTIME LOCALTIMESTAMP CURRENT_ROLE|10 CURRENT_SCHEMA|10 SESSION_USER PUBLIC ",PLPGSQL_BI="FOUND NEW OLD TG_NAME|10 TG_WHEN|10 TG_LEVEL|10 TG_OP|10 TG_RELID|10 TG_RELNAME|10 TG_TABLE_NAME|10 TG_TABLE_SCHEMA|10 TG_NARGS|10 TG_ARGV|10 TG_EVENT|10 TG_TAG|10 ROW_COUNT RESULT_\ OID|10 PG_CONTEXT|10 RETURNED_SQLSTATE COLUMN_NAME CONSTRAINT_NAME PG_DATATYPE_NAME|10 MESSAGE_TEXT TABLE_NAME SCHEMA_NAME PG_EXCEPTION_DETAIL|10 PG_EXCEPTION_HINT|10 PG_EXCEPTION_CONTEXT|10 ",PLPGSQL_EXCEPTIONS="SQLSTATE SQLERRM|10 SUCCESSFUL_COMPLETION WARNING DYNAMIC_RESULT_SETS_RETURNED IMPLICIT_ZERO_BIT_PADDING NULL_VALUE_ELIMINATED_IN_SET_FUNCTION PRIVILEGE_NOT_GRANTED PRIVILEGE_NOT_REVOKED STRING_DATA_RIGHT_TRUNCATION DEPRECATED_FEATURE NO_DATA NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED S\ QL_STATEMENT_NOT_YET_COMPLETE CONNECTION_EXCEPTION CONNECTION_DOES_NOT_EXIST CONNECTION_FAILURE SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION TRANSACTION_RESOLUTION_UNKNOWN PROTOCOL_VIOLATION TRIGGERED_ACTION_EXCEPTION FEATURE_NOT_SUPPORTED INVALID_TRANSACTION_INITIATION LOCATOR_EXCEPTION INVALID_LOCATOR_SPECIFICATION INVALID_GRANTOR INVALID_GRANT_OPERATION INVALID_ROLE_SPECIFICATION DIAGNOSTICS_EXCEPTION STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE\ _HANDLER CASE_NOT_FOUND CARDINALITY_VIOLATION DATA_EXCEPTION ARRAY_SUBSCRIPT_ERROR CHARACTER_NOT_IN_REPERTOIRE DATETIME_FIELD_OVERFLOW DIVISION_BY_ZERO ERROR_IN_ASSIGNMENT ESCAPE_CHARACTER_CONFLICT INDICATOR_OVERFLOW INTERVAL_FIELD_OVERFLOW INVALID_ARGUMENT_FOR_LOGARITHM INVALID_ARGUMENT_FOR_NTILE_FUNCTION INVALID_ARGUMENT_FOR_NTH_VALUE_FUNCTION INVALID_ARGUMENT_FOR_POWER_FUNCTION INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION INVALID_CHARACTER_VALUE_FOR_CAST INVALID_DATETIME_FORMAT INVALID_ESCAPE_C\ HARACTER INVALID_ESCAPE_OCTET INVALID_ESCAPE_SEQUENCE NONSTANDARD_USE_OF_ESCAPE_CHARACTER INVALID_INDICATOR_PARAMETER_VALUE INVALID_PARAMETER_VALUE INVALID_REGULAR_EXPRESSION INVALID_ROW_COUNT_IN_LIMIT_CLAUSE INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE INVALID_TABLESAMPLE_ARGUMENT INVALID_TABLESAMPLE_REPEAT INVALID_TIME_ZONE_DISPLACEMENT_VALUE INVALID_USE_OF_ESCAPE_CHARACTER MOST_SPECIFIC_TYPE_MISMATCH NULL_VALUE_NOT_ALLOWED NULL_VALUE_NO_INDICATOR_PARAMETER NUMERIC_VALUE_OUT_OF_RANGE SEQUENCE_GEN\ ERATOR_LIMIT_EXCEEDED STRING_DATA_LENGTH_MISMATCH STRING_DATA_RIGHT_TRUNCATION SUBSTRING_ERROR TRIM_ERROR UNTERMINATED_C_STRING ZERO_LENGTH_CHARACTER_STRING FLOATING_POINT_EXCEPTION INVALID_TEXT_REPRESENTATION INVALID_BINARY_REPRESENTATION BAD_COPY_FILE_FORMAT UNTRANSLATABLE_CHARACTER NOT_AN_XML_DOCUMENT INVALID_XML_DOCUMENT INVALID_XML_CONTENT INVALID_XML_COMMENT INVALID_XML_PROCESSING_INSTRUCTION INTEGRITY_CONSTRAINT_VIOLATION RESTRICT_VIOLATION NOT_NULL_VIOLATION FOREIGN_KEY_VIOLATION UNIQUE_\ VIOLATION CHECK_VIOLATION EXCLUSION_VIOLATION INVALID_CURSOR_STATE INVALID_TRANSACTION_STATE ACTIVE_SQL_TRANSACTION BRANCH_TRANSACTION_ALREADY_ACTIVE HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION READ_ONLY_SQL_TRANSACTION SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED NO_ACTIVE_SQL_TRANSACTION IN_FAILED_SQL_TRANSACTION IDLE_IN_TRANSACTION_SESSION_TIME\ OUT INVALID_SQL_STATEMENT_NAME TRIGGERED_DATA_CHANGE_VIOLATION INVALID_AUTHORIZATION_SPECIFICATION INVALID_PASSWORD DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST DEPENDENT_OBJECTS_STILL_EXIST INVALID_TRANSACTION_TERMINATION SQL_ROUTINE_EXCEPTION FUNCTION_EXECUTED_NO_RETURN_STATEMENT MODIFYING_SQL_DATA_NOT_PERMITTED PROHIBITED_SQL_STATEMENT_ATTEMPTED READING_SQL_DATA_NOT_PERMITTED INVALID_CURSOR_NAME EXTERNAL_ROUTINE_EXCEPTION CONTAINING_SQL_NOT_PERMITTED MODIFYING_SQL_DATA_NOT_PERMITTED PROHIBITED\ _SQL_STATEMENT_ATTEMPTED READING_SQL_DATA_NOT_PERMITTED EXTERNAL_ROUTINE_INVOCATION_EXCEPTION INVALID_SQLSTATE_RETURNED NULL_VALUE_NOT_ALLOWED TRIGGER_PROTOCOL_VIOLATED SRF_PROTOCOL_VIOLATED EVENT_TRIGGER_PROTOCOL_VIOLATED SAVEPOINT_EXCEPTION INVALID_SAVEPOINT_SPECIFICATION INVALID_CATALOG_NAME INVALID_SCHEMA_NAME TRANSACTION_ROLLBACK TRANSACTION_INTEGRITY_CONSTRAINT_VIOLATION SERIALIZATION_FAILURE STATEMENT_COMPLETION_UNKNOWN DEADLOCK_DETECTED SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION SYNTAX_ERROR \ INSUFFICIENT_PRIVILEGE CANNOT_COERCE GROUPING_ERROR WINDOWING_ERROR INVALID_RECURSION INVALID_FOREIGN_KEY INVALID_NAME NAME_TOO_LONG RESERVED_NAME DATATYPE_MISMATCH INDETERMINATE_DATATYPE COLLATION_MISMATCH INDETERMINATE_COLLATION WRONG_OBJECT_TYPE GENERATED_ALWAYS UNDEFINED_COLUMN UNDEFINED_FUNCTION UNDEFINED_TABLE UNDEFINED_PARAMETER UNDEFINED_OBJECT DUPLICATE_COLUMN DUPLICATE_CURSOR DUPLICATE_DATABASE DUPLICATE_FUNCTION DUPLICATE_PREPARED_STATEMENT DUPLICATE_SCHEMA DUPLICATE_TABLE DUPLICATE_A\ LIAS DUPLICATE_OBJECT AMBIGUOUS_COLUMN AMBIGUOUS_FUNCTION AMBIGUOUS_PARAMETER AMBIGUOUS_ALIAS INVALID_COLUMN_REFERENCE INVALID_COLUMN_DEFINITION INVALID_CURSOR_DEFINITION INVALID_DATABASE_DEFINITION INVALID_FUNCTION_DEFINITION INVALID_PREPARED_STATEMENT_DEFINITION INVALID_SCHEMA_DEFINITION INVALID_TABLE_DEFINITION INVALID_OBJECT_DEFINITION WITH_CHECK_OPTION_VIOLATION INSUFFICIENT_RESOURCES DISK_FULL OUT_OF_MEMORY TOO_MANY_CONNECTIONS CONFIGURATION_LIMIT_EXCEEDED PROGRAM_LIMIT_EXCEEDED STATEMENT_\ TOO_COMPLEX TOO_MANY_COLUMNS TOO_MANY_ARGUMENTS OBJECT_NOT_IN_PREREQUISITE_STATE OBJECT_IN_USE CANT_CHANGE_RUNTIME_PARAM LOCK_NOT_AVAILABLE OPERATOR_INTERVENTION QUERY_CANCELED ADMIN_SHUTDOWN CRASH_SHUTDOWN CANNOT_CONNECT_NOW DATABASE_DROPPED SYSTEM_ERROR IO_ERROR UNDEFINED_FILE DUPLICATE_FILE SNAPSHOT_TOO_OLD CONFIG_FILE_ERROR LOCK_FILE_EXISTS FDW_ERROR FDW_COLUMN_NAME_NOT_FOUND FDW_DYNAMIC_PARAMETER_VALUE_NEEDED FDW_FUNCTION_SEQUENCE_ERROR FDW_INCONSISTENT_DESCRIPTOR_INFORMATION FDW_INVALID_AT\ TRIBUTE_VALUE FDW_INVALID_COLUMN_NAME FDW_INVALID_COLUMN_NUMBER FDW_INVALID_DATA_TYPE FDW_INVALID_DATA_TYPE_DESCRIPTORS FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER FDW_INVALID_HANDLE FDW_INVALID_OPTION_INDEX FDW_INVALID_OPTION_NAME FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH FDW_INVALID_STRING_FORMAT FDW_INVALID_USE_OF_NULL_POINTER FDW_TOO_MANY_HANDLES FDW_OUT_OF_MEMORY FDW_NO_SCHEMAS FDW_OPTION_NAME_NOT_FOUND FDW_REPLY_HANDLE FDW_SCHEMA_NOT_FOUND FDW_TABLE_NOT_FOUND FDW_UNABLE_TO_CREATE_EXECUTION FD\ W_UNABLE_TO_CREATE_REPLY FDW_UNABLE_TO_ESTABLISH_CONNECTION PLPGSQL_ERROR RAISE_EXCEPTION NO_DATA_FOUND TOO_MANY_ROWS ASSERT_FAILURE INTERNAL_ERROR DATA_CORRUPTED INDEX_CORRUPTED ",FUNCTIONS_RE="ARRAY_AGG AVG BIT_AND BIT_OR BOOL_AND BOOL_OR COUNT EVERY JSON_AGG JSONB_AGG JSON_OBJECT_AGG JSONB_OBJECT_AGG MAX MIN MODE STRING_AGG SUM XMLAGG CORR COVAR_POP COVAR_SAMP REGR_AVGX REGR_AVGY REGR_COUNT REGR_INTERCEPT REGR_R2 REGR_SLOPE REGR_SXX REGR_SXY REGR_SYY STDDEV STDDEV_POP STDDEV_SAMP VARIANCE VAR\ _POP VAR_SAMP PERCENTILE_CONT PERCENTILE_DISC ROW_NUMBER RANK DENSE_RANK PERCENT_RANK CUME_DIST NTILE LAG LEAD FIRST_VALUE LAST_VALUE NTH_VALUE NUM_NONNULLS NUM_NULLS ABS CBRT CEIL CEILING DEGREES DIV EXP FLOOR LN LOG MOD PI POWER RADIANS ROUND SCALE SIGN SQRT TRUNC WIDTH_BUCKET RANDOM SETSEED ACOS ACOSD ASIN ASIND ATAN ATAND ATAN2 ATAN2D COS COSD COT COTD SIN SIND TAN TAND BIT_LENGTH CHAR_LENGTH CHARACTER_LENGTH LOWER OCTET_LENGTH OVERLAY POSITION SUBSTRING TREAT TRIM UPPER ASCII BTRIM CHR CONC\ AT CONCAT_WS CONVERT CONVERT_FROM CONVERT_TO DECODE ENCODE INITCAP LEFT LENGTH LPAD LTRIM MD5 PARSE_IDENT PG_CLIENT_ENCODING QUOTE_IDENT|10 QUOTE_LITERAL|10 QUOTE_NULLABLE|10 REGEXP_MATCH REGEXP_MATCHES REGEXP_REPLACE REGEXP_SPLIT_TO_ARRAY REGEXP_SPLIT_TO_TABLE REPEAT REPLACE REVERSE RIGHT RPAD RTRIM SPLIT_PART STRPOS SUBSTR TO_ASCII TO_HEX TRANSLATE OCTET_LENGTH GET_BIT GET_BYTE SET_BIT SET_BYTE TO_CHAR TO_DATE TO_NUMBER TO_TIMESTAMP AGE CLOCK_TIMESTAMP|10 DATE_PART DATE_TRUNC ISFINITE JUSTIFY_\ DAYS JUSTIFY_HOURS JUSTIFY_INTERVAL MAKE_DATE MAKE_INTERVAL|10 MAKE_TIME MAKE_TIMESTAMP|10 MAKE_TIMESTAMPTZ|10 NOW STATEMENT_TIMESTAMP|10 TIMEOFDAY TRANSACTION_TIMESTAMP|10 ENUM_FIRST ENUM_LAST ENUM_RANGE AREA CENTER DIAMETER HEIGHT ISCLOSED ISOPEN NPOINTS PCLOSE POPEN RADIUS WIDTH BOX BOUND_BOX CIRCLE LINE LSEG PATH POLYGON ABBREV BROADCAST HOST HOSTMASK MASKLEN NETMASK NETWORK SET_MASKLEN TEXT INET_SAME_FAMILY INET_MERGE MACADDR8_SET7BIT ARRAY_TO_TSVECTOR GET_CURRENT_TS_CONFIG NUMNODE PLAINTO_\ TSQUERY PHRASETO_TSQUERY WEBSEARCH_TO_TSQUERY QUERYTREE SETWEIGHT STRIP TO_TSQUERY TO_TSVECTOR JSON_TO_TSVECTOR JSONB_TO_TSVECTOR TS_DELETE TS_FILTER TS_HEADLINE TS_RANK TS_RANK_CD TS_REWRITE TSQUERY_PHRASE TSVECTOR_TO_ARRAY TSVECTOR_UPDATE_TRIGGER TSVECTOR_UPDATE_TRIGGER_COLUMN XMLCOMMENT XMLCONCAT XMLELEMENT XMLFOREST XMLPI XMLROOT XMLEXISTS XML_IS_WELL_FORMED XML_IS_WELL_FORMED_DOCUMENT XML_IS_WELL_FORMED_CONTENT XPATH XPATH_EXISTS XMLTABLE XMLNAMESPACES TABLE_TO_XML TABLE_TO_XMLSCHEMA TABLE_\ TO_XML_AND_XMLSCHEMA QUERY_TO_XML QUERY_TO_XMLSCHEMA QUERY_TO_XML_AND_XMLSCHEMA CURSOR_TO_XML CURSOR_TO_XMLSCHEMA SCHEMA_TO_XML SCHEMA_TO_XMLSCHEMA SCHEMA_TO_XML_AND_XMLSCHEMA DATABASE_TO_XML DATABASE_TO_XMLSCHEMA DATABASE_TO_XML_AND_XMLSCHEMA XMLATTRIBUTES TO_JSON TO_JSONB ARRAY_TO_JSON ROW_TO_JSON JSON_BUILD_ARRAY JSONB_BUILD_ARRAY JSON_BUILD_OBJECT JSONB_BUILD_OBJECT JSON_OBJECT JSONB_OBJECT JSON_ARRAY_LENGTH JSONB_ARRAY_LENGTH JSON_EACH JSONB_EACH JSON_EACH_TEXT JSONB_EACH_TEXT JSON_EXTRACT_\ PATH JSONB_EXTRACT_PATH JSON_OBJECT_KEYS JSONB_OBJECT_KEYS JSON_POPULATE_RECORD JSONB_POPULATE_RECORD JSON_POPULATE_RECORDSET JSONB_POPULATE_RECORDSET JSON_ARRAY_ELEMENTS JSONB_ARRAY_ELEMENTS JSON_ARRAY_ELEMENTS_TEXT JSONB_ARRAY_ELEMENTS_TEXT JSON_TYPEOF JSONB_TYPEOF JSON_TO_RECORD JSONB_TO_RECORD JSON_TO_RECORDSET JSONB_TO_RECORDSET JSON_STRIP_NULLS JSONB_STRIP_NULLS JSONB_SET JSONB_INSERT JSONB_PRETTY CURRVAL LASTVAL NEXTVAL SETVAL COALESCE NULLIF GREATEST LEAST ARRAY_APPEND ARRAY_CAT ARRAY_ND\ IMS ARRAY_DIMS ARRAY_FILL ARRAY_LENGTH ARRAY_LOWER ARRAY_POSITION ARRAY_POSITIONS ARRAY_PREPEND ARRAY_REMOVE ARRAY_REPLACE ARRAY_TO_STRING ARRAY_UPPER CARDINALITY STRING_TO_ARRAY UNNEST ISEMPTY LOWER_INC UPPER_INC LOWER_INF UPPER_INF RANGE_MERGE GENERATE_SERIES GENERATE_SUBSCRIPTS CURRENT_DATABASE CURRENT_QUERY CURRENT_SCHEMA|10 CURRENT_SCHEMAS|10 INET_CLIENT_ADDR INET_CLIENT_PORT INET_SERVER_ADDR INET_SERVER_PORT ROW_SECURITY_ACTIVE FORMAT_TYPE TO_REGCLASS TO_REGPROC TO_REGPROCEDURE TO_REGOPER \ TO_REGOPERATOR TO_REGTYPE TO_REGNAMESPACE TO_REGROLE COL_DESCRIPTION OBJ_DESCRIPTION SHOBJ_DESCRIPTION TXID_CURRENT TXID_CURRENT_IF_ASSIGNED TXID_CURRENT_SNAPSHOT TXID_SNAPSHOT_XIP TXID_SNAPSHOT_XMAX TXID_SNAPSHOT_XMIN TXID_VISIBLE_IN_SNAPSHOT TXID_STATUS CURRENT_SETTING SET_CONFIG BRIN_SUMMARIZE_NEW_VALUES BRIN_SUMMARIZE_RANGE BRIN_DESUMMARIZE_RANGE GIN_CLEAN_PENDING_LIST SUPPRESS_REDUNDANT_UPDATES_TRIGGER LO_FROM_BYTEA LO_PUT LO_GET LO_CREAT LO_CREATE LO_UNLINK LO_IMPORT LO_EXPORT LOREAD LOWRI\ TE GROUPING CAST ".trim().split(" ").map(function(val){return val.split("|")[0]}).join("|");return{name:"PostgreSQL",aliases:["postgres","postgresql"],supersetOf:"sql",case_insensitive:!0,keywords:{keyword:SQL_KW+PLPGSQL_KW+ROLE_ATTRS,built_in:SQL_BI+PLPGSQL_BI+PLPGSQL_EXCEPTIONS},illegal:/:==|\W\s*\(\*|(^|\s)\$[a-z]|\{\{|[a-z]:\s*$|\.\.\.|TO:|DO:/,contains:[{className:"keyword",variants:[{begin:/\bTEXT\s*SEARCH\b/},{begin:/\b(PRIMARY|FOREIGN|FOR(\s+NO)?)\s+KEY\b/},{begin:/\bPARALLEL\s+(UNSAFE|RESTRICTED|SAFE)\b/}, {begin:/\bSTORAGE\s+(PLAIN|EXTERNAL|EXTENDED|MAIN)\b/},{begin:/\bMATCH\s+(FULL|PARTIAL|SIMPLE)\b/},{begin:/\bNULLS\s+(FIRST|LAST)\b/},{begin:/\bEVENT\s+TRIGGER\b/},{begin:/\b(MAPPING|OR)\s+REPLACE\b/},{begin:/\b(FROM|TO)\s+(PROGRAM|STDIN|STDOUT)\b/},{begin:/\b(SHARE|EXCLUSIVE)\s+MODE\b/},{begin:/\b(LEFT|RIGHT)\s+(OUTER\s+)?JOIN\b/},{begin:/\b(FETCH|MOVE)\s+(NEXT|PRIOR|FIRST|LAST|ABSOLUTE|RELATIVE|FORWARD|BACKWARD)\b/},{begin:/\bPRESERVE\s+ROWS\b/},{begin:/\bDISCARD\s+PLANS\b/},{begin:/\bREFERENCING\s+(OLD|NEW)\b/}, {begin:/\bSKIP\s+LOCKED\b/},{begin:/\bGROUPING\s+SETS\b/},{begin:/\b(BINARY|INSENSITIVE|SCROLL|NO\s+SCROLL)\s+(CURSOR|FOR)\b/},{begin:/\b(WITH|WITHOUT)\s+HOLD\b/},{begin:/\bWITH\s+(CASCADED|LOCAL)\s+CHECK\s+OPTION\b/},{begin:/\bEXCLUDE\s+(TIES|NO\s+OTHERS)\b/},{begin:/\bFORMAT\s+(TEXT|XML|JSON|YAML)\b/},{begin:/\bSET\s+((SESSION|LOCAL)\s+)?NAMES\b/},{begin:/\bIS\s+(NOT\s+)?UNKNOWN\b/},{begin:/\bSECURITY\s+LABEL\b/},{begin:/\bSTANDALONE\s+(YES|NO|NO\s+VALUE)\b/},{begin:/\bWITH\s+(NO\s+)?DATA\b/}, {begin:/\b(FOREIGN|SET)\s+DATA\b/},{begin:/\bSET\s+(CATALOG|CONSTRAINTS)\b/},{begin:/\b(WITH|FOR)\s+ORDINALITY\b/},{begin:/\bIS\s+(NOT\s+)?DOCUMENT\b/},{begin:/\bXML\s+OPTION\s+(DOCUMENT|CONTENT)\b/},{begin:/\b(STRIP|PRESERVE)\s+WHITESPACE\b/},{begin:/\bNO\s+(ACTION|MAXVALUE|MINVALUE)\b/},{begin:/\bPARTITION\s+BY\s+(RANGE|LIST|HASH)\b/},{begin:/\bAT\s+TIME\s+ZONE\b/},{begin:/\bGRANTED\s+BY\b/},{begin:/\bRETURN\s+(QUERY|NEXT)\b/},{begin:/\b(ATTACH|DETACH)\s+PARTITION\b/},{begin:/\bFORCE\s+ROW\s+LEVEL\s+SECURITY\b/}, {begin:/\b(INCLUDING|EXCLUDING)\s+(COMMENTS|CONSTRAINTS|DEFAULTS|IDENTITY|INDEXES|STATISTICS|STORAGE|ALL)\b/},{begin:/\bAS\s+(ASSIGNMENT|IMPLICIT|PERMISSIVE|RESTRICTIVE|ENUM|RANGE)\b/}]},{begin:/\b(FORMAT|FAMILY|VERSION)\s*\(/},{begin:/\bINCLUDE\s*\(/,keywords:"INCLUDE"},{begin:/\bRANGE(?!\s*(BETWEEN|UNBOUNDED|CURRENT|[-0-9]+))/},{begin:/\b(VERSION|OWNER|TEMPLATE|TABLESPACE|CONNECTION\s+LIMIT|PROCEDURE|RESTRICT|JOIN|PARSER|COPY|START|END|COLLATION|INPUT|ANALYZE|STORAGE|LIKE|DEFAULT|DELIMITER|ENCODING|COLUMN|CONSTRAINT|TABLE|SCHEMA)\s*=/}, {begin:/\b(PG_\w+?|HAS_[A-Z_]+_PRIVILEGE)\b/,relevance:10},{begin:/\bEXTRACT\s*\(/,end:/\bFROM\b/,returnEnd:!0,keywords:{type:"CENTURY DAY DECADE DOW DOY EPOCH HOUR ISODOW ISOYEAR MICROSECONDS MILLENNIUM MILLISECONDS MINUTE MONTH QUARTER SECOND TIMEZONE TIMEZONE_HOUR TIMEZONE_MINUTE WEEK YEAR"}},{begin:/\b(XMLELEMENT|XMLPI)\s*\(\s*NAME/,keywords:{keyword:"NAME"}},{begin:/\b(XMLPARSE|XMLSERIALIZE)\s*\(\s*(DOCUMENT|CONTENT)/,keywords:{keyword:"DOCUMENT CONTENT"}},{beginKeywords:"CACHE INCREMENT MA\ XVALUE MINVALUE",end:hljs.C_NUMBER_RE,returnEnd:!0,keywords:"BY CACHE INCREMENT MAXVALUE MINVALUE"},{className:"type",begin:/\b(WITH|WITHOUT)\s+TIME\s+ZONE\b/},{className:"type",begin:/\bINTERVAL\s+(YEAR|MONTH|DAY|HOUR|MINUTE|SECOND)(\s+TO\s+(MONTH|HOUR|MINUTE|SECOND))?\b/},{begin:/\bRETURNS\s+(LANGUAGE_HANDLER|TRIGGER|EVENT_TRIGGER|FDW_HANDLER|INDEX_AM_HANDLER|TSM_HANDLER)\b/,keywords:{keyword:"RETURNS",type:"LANGUAGE_HANDLER TRIGGER EVENT_TRIGGER FDW_HANDLER INDEX_AM_HANDLER TSM_HANDLER"}},{begin:"\ \\b("+FUNCTIONS_RE+")\\s*\\("},{begin:"\\.("+TYPES_RE+")\\b"},{begin:"\\b("+TYPES_RE+")\\s+PATH\\b",keywords:{keyword:"PATH",type:TYPES2.replace("PATH ","")}},{className:"type",begin:"\\b("+TYPES_RE+")\\b"},{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},{className:"string",begin:"(e|E|u&|U&)'",end:"'",contains:[{begin:"\\\\."}],relevance:10},hljs.END_SAME_AS_BEGIN({begin:DOLLAR_STRING,end:DOLLAR_STRING,contains:[{subLanguage:["pgsql","perl","python","tcl","r","lua","java","php","\ ruby","bash","scheme","xml","json"],endsWithParent:!0}]}),{begin:'"',end:'"',contains:[{begin:'""'}]},hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE,COMMENT_MODE,{className:"meta",variants:[{begin:"%(ROW)?TYPE",relevance:10},{begin:"\\$\\d+"},{begin:"^#\\w",end:"$"}]},{className:"symbol",begin:LABEL,relevance:10}]}}return pgsql_1=pgsql2,pgsql_1}var php_1,hasRequiredPhp;function requirePhp(){if(hasRequiredPhp)return php_1;hasRequiredPhp=1;function php2(hljs){const regex=hljs.regex,NOT_PERL_ETC=/(?![A-Za-z0-9])(?![$])/, IDENT_RE2=regex.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,NOT_PERL_ETC),PASCAL_CASE_CLASS_NAME_RE=regex.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,NOT_PERL_ETC),UPCASE_NAME_RE=regex.concat(/[A-Z]+/,NOT_PERL_ETC),VARIABLE={scope:"variable",match:"\\$+"+IDENT_RE2},PREPROCESSOR={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},SUBST={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]}, SINGLE_QUOTED=hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null}),DOUBLE_QUOTED=hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null,contains:hljs.QUOTE_STRING_MODE.contains.concat(SUBST)}),HEREDOC={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:hljs.QUOTE_STRING_MODE.contains.concat(SUBST),"on:begin":(m,resp)=>{resp.data._beginMatch=m[1]||m[2]},"on:end":(m,resp)=>{resp.data._beginMatch!==m[1]&&resp.ignoreMatch()}},NOWDOC=hljs.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}), WHITESPACE=`[ ]`,STRING={scope:"string",variants:[DOUBLE_QUOTED,SINGLE_QUOTED,HEREDOC,NOWDOC]},NUMBER={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},LITERALS2=["false","null","true"],KWS=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__\ TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","iss\ et","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],BUILT_INS2=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroEr\ ror","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveD\ irectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess", "BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],KEYWORDS2={keyword:KWS,literal:(items2=>{const result=[];return items2.forEach(item=>{result.push(item),item.toLowerCase()===item?result.push(item.toUpperCase()):result.push(item.toLowerCase())}),result})(LITERALS2),built_in:BUILT_INS2},normalizeKeywords=items2=>items2. map(item=>item.replace(/\|\d+$/,"")),CONSTRUCTOR_CALL={variants:[{match:[/new/,regex.concat(WHITESPACE,"+"),regex.concat("(?!",normalizeKeywords(BUILT_INS2).join("\\b|"),"\\b)"),PASCAL_CASE_CLASS_NAME_RE],scope:{1:"keyword",4:"title.class"}}]},CONSTANT_REFERENCE=regex.concat(IDENT_RE2,"\\b(?!\\()"),LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON={variants:[{match:[regex.concat(/::/,regex.lookahead(/(?!class\b)/)),CONSTANT_REFERENCE],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.lan\ guage"}},{match:[PASCAL_CASE_CLASS_NAME_RE,regex.concat(/::/,regex.lookahead(/(?!class\b)/)),CONSTANT_REFERENCE],scope:{1:"title.class",3:"variable.constant"}},{match:[PASCAL_CASE_CLASS_NAME_RE,regex.concat("::",regex.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[PASCAL_CASE_CLASS_NAME_RE,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},NAMED_ARGUMENT={scope:"attr",match:regex.concat(IDENT_RE2,regex.lookahead(":"),regex.lookahead(/(?!::)/))},PARAMS_MODE={relevance:0,begin:/\(/, end:/\)/,keywords:KEYWORDS2,contains:[NAMED_ARGUMENT,VARIABLE,LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,hljs.C_BLOCK_COMMENT_MODE,STRING,NUMBER,CONSTRUCTOR_CALL]},FUNCTION_INVOKE={relevance:0,match:[/\b/,regex.concat("(?!fn\\b|function\\b|",normalizeKeywords(KWS).join("\\b|"),"|",normalizeKeywords(BUILT_INS2).join("\\b|"),"\\b)"),IDENT_RE2,regex.concat(WHITESPACE,"*"),regex.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[PARAMS_MODE]};PARAMS_MODE.contains.push(FUNCTION_INVOKE);const ATTRIBUTE_CONTAINS=[ NAMED_ARGUMENT,LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,hljs.C_BLOCK_COMMENT_MODE,STRING,NUMBER,CONSTRUCTOR_CALL],ATTRIBUTES2={begin:regex.concat(/#\[\s*\\?/,regex.either(PASCAL_CASE_CLASS_NAME_RE,UPCASE_NAME_RE)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:LITERALS2,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:LITERALS2,keyword:["new","array"]},contains:["self",...ATTRIBUTE_CONTAINS]},...ATTRIBUTE_CONTAINS,{scope:"meta",variants:[{match:PASCAL_CASE_CLASS_NAME_RE}, {match:UPCASE_NAME_RE}]}]};return{case_insensitive:!1,keywords:KEYWORDS2,contains:[ATTRIBUTES2,hljs.HASH_COMMENT_MODE,hljs.COMMENT("//","$"),hljs.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:hljs.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},PREPROCESSOR,{scope:"variable.language",match:/\$this\b/},VARIABLE,FUNCTION_INVOKE,LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,{match:[ /const/,/\s/,IDENT_RE2],scope:{1:"keyword",3:"variable.constant"}},CONSTRUCTOR_CALL,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},hljs.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS2,contains:["self",ATTRIBUTES2,VARIABLE,LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,hljs.C_BLOCK_COMMENT_MODE,STRING,NUMBER]}]},{scope:"class",variants:[ {beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},hljs.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[hljs.inherit(hljs.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},hljs.UNDERSCORE_TITLE_MODE]},STRING,NUMBER]}}return php_1= php2,php_1}var phpTemplate_1,hasRequiredPhpTemplate;function requirePhpTemplate(){if(hasRequiredPhpTemplate)return phpTemplate_1;hasRequiredPhpTemplate=1;function phpTemplate2(hljs){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal:null,className:null,contains:null,skip:!0})]}]}}return phpTemplate_1=phpTemplate2,phpTemplate_1}var plaintext_1,hasRequiredPlaintext;function requirePlaintext(){if(hasRequiredPlaintext)return plaintext_1;hasRequiredPlaintext=1;function plaintext2(hljs){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return plaintext_1=plaintext2,plaintext_1}var pony_1,hasRequiredPony;function requirePony(){if(hasRequiredPony)return pony_1;hasRequiredPony=1;function pony2(hljs){const KEYWORDS2={ keyword:"actor addressof and as be break class compile_error compile_intrinsic consume continue delegate digestof do else elseif embed end error for fun if ifdef in interface is isnt lambda let match new not object or primitive recover repeat return struct then trait try type until use var where while with xor",meta:"iso val tag trn box ref",literal:"this false true"},TRIPLE_QUOTE_STRING_MODE={className:"string",begin:'"""',end:'"""',relevance:10},QUOTE_STRING_MODE={className:"string",begin:'"', end:'"',contains:[hljs.BACKSLASH_ESCAPE]},SINGLE_QUOTE_CHAR_MODE={className:"string",begin:"'",end:"'",contains:[hljs.BACKSLASH_ESCAPE],relevance:0},TYPE_NAME={className:"type",begin:"\\b_?[A-Z][\\w]*",relevance:0},PRIMED_NAME={begin:hljs.IDENT_RE+"'",relevance:0};return{name:"Pony",keywords:KEYWORDS2,contains:[TYPE_NAME,TRIPLE_QUOTE_STRING_MODE,QUOTE_STRING_MODE,SINGLE_QUOTE_CHAR_MODE,PRIMED_NAME,{className:"number",begin:"(-?)(\\b0[xX][a-fA-F0-9]+|\\b0[bB][01]+|(\\b\\d+(_\\d+)?(\\.\\d*)?|\\.\\d+)([eE][\ -+]?\\d+)?)",relevance:0},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]}}return pony_1=pony2,pony_1}var powershell_1,hasRequiredPowershell;function requirePowershell(){if(hasRequiredPowershell)return powershell_1;hasRequiredPowershell=1;function powershell2(hljs){const TYPES2=["string","char","byte","int","long","bool","decimal","single","double","DateTime","xml","array","hashtable","void"],VALID_VERBS="Add|Clear|Close|Copy|Enter|Exit|Find|Format|Get|Hide|Join|Lock|Move|New|Open|Optimize|P\ op|Push|Redo|Remove|Rename|Reset|Resize|Search|Select|Set|Show|Skip|Split|Step|Switch|Undo|Unlock|Watch|Backup|Checkpoint|Compare|Compress|Convert|ConvertFrom|ConvertTo|Dismount|Edit|Expand|Export|Group|Import|Initialize|Limit|Merge|Mount|Out|Publish|Restore|Save|Sync|Unpublish|Update|Approve|Assert|Build|Complete|Confirm|Deny|Deploy|Disable|Enable|Install|Invoke|Register|Request|Restart|Resume|Start|Stop|Submit|Suspend|Uninstall|Unregister|Wait|Debug|Measure|Ping|Repair|Resolve|Test|Trace|Conne\ ct|Disconnect|Read|Receive|Send|Write|Block|Grant|Protect|Revoke|Unblock|Unprotect|Use|ForEach|Sort|Tee|Where",COMPARISON_OPERATORS="-and|-as|-band|-bnot|-bor|-bxor|-casesensitive|-ccontains|-ceq|-cge|-cgt|-cle|-clike|-clt|-cmatch|-cne|-cnotcontains|-cnotlike|-cnotmatch|-contains|-creplace|-csplit|-eq|-exact|-f|-file|-ge|-gt|-icontains|-ieq|-ige|-igt|-ile|-ilike|-ilt|-imatch|-in|-ine|-inotcontains|-inotlike|-inotmatch|-ireplace|-is|-isnot|-isplit|-join|-le|-like|-lt|-match|-ne|-not|-notcontains|\ -notin|-notlike|-notmatch|-or|-regex|-replace|-shl|-shr|-split|-wildcard|-xor",KEYWORDS2={$pattern:/-?[A-z\.\-]+\b/,keyword:"if else foreach return do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch hidden static parameter",built_in:"ac asnp cat cd CFS chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo|0 epal epcsv epsn erase etsn exsn fc fhx fl ft fw gal gbp\ gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group gsn gsnp gsv gtz gu gv gwmi h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp spjb spps spsv start stz sujb sv swmi tee trcm type wget where wjb write"},TITLE_NAME_RE=/\w[\w\d]*((-)[\w\d]+)*/, BACKTICK_ESCAPE={begin:"`[\\s\\S]",relevance:0},VAR={className:"variable",variants:[{begin:/\$\B/},{className:"keyword",begin:/\$this/},{begin:/\$[\w\d][\w\d_:]*/}]},LITERAL={className:"literal",begin:/\$(null|true|false)\b/},QUOTE_STRING={className:"string",variants:[{begin:/"/,end:/"/},{begin:/@"/,end:/^"@/}],contains:[BACKTICK_ESCAPE,VAR,{className:"variable",begin:/\$[A-z]/,end:/[^A-z]/}]},APOS_STRING={className:"string",variants:[{begin:/'/,end:/'/},{begin:/@'/,end:/^'@/}]},PS_HELPTAGS={className:"\ doctag",variants:[{begin:/\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/},{begin:/\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/}]},PS_COMMENT=hljs.inherit(hljs.COMMENT(null,null),{variants:[{begin:/#/,end:/$/},{begin:/<#/,end:/#>/}],contains:[PS_HELPTAGS]}),CMDLETS={className:"built_in",variants:[{begin:"(".concat(VALID_VERBS,")+(-)[\\w\\d]+")}]},PS_CLASS={className:"class",beginKeywords:"class enum",end:/\s*[{]/, excludeEnd:!0,relevance:0,contains:[hljs.TITLE_MODE]},PS_FUNCTION={className:"function",begin:/function\s+/,end:/\s*\{|$/,excludeEnd:!0,returnBegin:!0,relevance:0,contains:[{begin:"function",relevance:0,className:"keyword"},{className:"title",begin:TITLE_NAME_RE,relevance:0},{begin:/\(/,end:/\)/,className:"params",relevance:0,contains:[VAR]}]},PS_USING={begin:/using\s/,end:/$/,returnBegin:!0,contains:[QUOTE_STRING,APOS_STRING,{className:"keyword",begin:/(using|assembly|command|module|namespace|type)/}]}, PS_ARGUMENTS={variants:[{className:"operator",begin:"(".concat(COMPARISON_OPERATORS,")\\b")},{className:"literal",begin:/(-){1,2}[\w\d-]+/,relevance:0}]},HASH_SIGNS={className:"selector-tag",begin:/@\B/,relevance:0},PS_METHODS={className:"function",begin:/\[.*\]\s*[\w]+[ ]??\(/,end:/$/,returnBegin:!0,relevance:0,contains:[{className:"keyword",begin:"(".concat(KEYWORDS2.keyword.toString().replace(/\s/g,"|"),")\\b"),endsParent:!0,relevance:0},hljs.inherit(hljs.TITLE_MODE,{endsParent:!0})]},GENTLEMANS_SET=[ PS_METHODS,PS_COMMENT,BACKTICK_ESCAPE,hljs.NUMBER_MODE,QUOTE_STRING,APOS_STRING,CMDLETS,VAR,LITERAL,HASH_SIGNS],PS_TYPE={begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[].concat("self",GENTLEMANS_SET,{begin:"("+TYPES2.join("|")+")",className:"built_in",relevance:0},{className:"type",begin:/[\.\w\d]+/,relevance:0})};return PS_METHODS.contains.unshift(PS_TYPE),{name:"PowerShell",aliases:["pwsh","ps","ps1"],case_insensitive:!0,keywords:KEYWORDS2,contains:GENTLEMANS_SET.concat( PS_CLASS,PS_FUNCTION,PS_USING,PS_ARGUMENTS,PS_TYPE)}}return powershell_1=powershell2,powershell_1}var processing_1,hasRequiredProcessing;function requireProcessing(){if(hasRequiredProcessing)return processing_1;hasRequiredProcessing=1;function processing2(hljs){const regex=hljs.regex,BUILT_INS2=["displayHeight","displayWidth","mouseY","mouseX","mousePressed","pmouseX","pmouseY","key","keyCode","pixels","focused","frameCount","frameRate","height","width","size","createGraphics","beginDraw","creat\ eShape","loadShape","PShape","arc","ellipse","line","point","quad","rect","triangle","bezier","bezierDetail","bezierPoint","bezierTangent","curve","curveDetail","curvePoint","curveTangent","curveTightness","shape","shapeMode","beginContour","beginShape","bezierVertex","curveVertex","endContour","endShape","quadraticVertex","vertex","ellipseMode","noSmooth","rectMode","smooth","strokeCap","strokeJoin","strokeWeight","mouseClicked","mouseDragged","mouseMoved","mousePressed","mouseReleased","mouseW\ heel","keyPressed","keyPressedkeyReleased","keyTyped","print","println","save","saveFrame","day","hour","millis","minute","month","second","year","background","clear","colorMode","fill","noFill","noStroke","stroke","alpha","blue","brightness","color","green","hue","lerpColor","red","saturation","modelX","modelY","modelZ","screenX","screenY","screenZ","ambient","emissive","shininess","specular","add","createImage","beginCamera","camera","endCamera","frustum","ortho","perspective","printCamera","p\ rintProjection","cursor","frameRate","noCursor","exit","loop","noLoop","popStyle","pushStyle","redraw","binary","boolean","byte","char","float","hex","int","str","unbinary","unhex","join","match","matchAll","nf","nfc","nfp","nfs","split","splitTokens","trim","append","arrayCopy","concat","expand","reverse","shorten","sort","splice","subset","box","sphere","sphereDetail","createInput","createReader","loadBytes","loadJSONArray","loadJSONObject","loadStrings","loadTable","loadXML","open","parseXML", "saveTable","selectFolder","selectInput","beginRaw","beginRecord","createOutput","createWriter","endRaw","endRecord","PrintWritersaveBytes","saveJSONArray","saveJSONObject","saveStream","saveStrings","saveXML","selectOutput","popMatrix","printMatrix","pushMatrix","resetMatrix","rotate","rotateX","rotateY","rotateZ","scale","shearX","shearY","translate","ambientLight","directionalLight","lightFalloff","lights","lightSpecular","noLights","normal","pointLight","spotLight","image","imageMode","loadI\ mage","noTint","requestImage","tint","texture","textureMode","textureWrap","blend","copy","filter","get","loadPixels","set","updatePixels","blendMode","loadShader","PShaderresetShader","shader","createFont","loadFont","text","textFont","textAlign","textLeading","textMode","textSize","textWidth","textAscent","textDescent","abs","ceil","constrain","dist","exp","floor","lerp","log","mag","map","max","min","norm","pow","round","sq","sqrt","acos","asin","atan","atan2","cos","degrees","radians","sin", "tan","noise","noiseDetail","noiseSeed","random","randomGaussian","randomSeed"],IDENT=hljs.IDENT_RE,FUNC_NAME={variants:[{match:regex.concat(regex.either(...BUILT_INS2),regex.lookahead(/\s*\(/)),className:"built_in"},{relevance:0,match:regex.concat(/\b(?!for|if|while)/,IDENT,regex.lookahead(/\s*\(/)),className:"title.function"}]},NEW_CLASS={match:[/new\s+/,IDENT],className:{1:"keyword",2:"class.title"}},PROPERTY={relevance:0,match:[/\./,IDENT],className:{2:"property"}},CLASS2={variants:[{match:[ /class/,/\s+/,IDENT,/\s+/,/extends/,/\s+/,IDENT]},{match:[/class/,/\s+/,IDENT]}],className:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},TYPES2=["boolean","byte","char","color","double","float","int","long","short"],CLASSES=["BufferedReader","PVector","PFont","PImage","PGraphics","HashMap","String","Array","FloatDict","ArrayList","FloatList","IntDict","IntList","JSONArray","JSONObject","Object","StringDict","StringList","Table","TableRow","XML"];return{name:"Processing",aliases:[ "pde"],keywords:{keyword:[...["abstract","assert","break","case","catch","const","continue","default","else","enum","final","finally","for","if","import","instanceof","long","native","new","package","private","private","protected","protected","public","public","return","static","strictfp","switch","synchronized","throw","throws","transient","try","void","volatile","while"]],literal:"P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI null true false",title:"setup draw",variable:"super this",built_in:[...BUILT_INS2, ...CLASSES],type:TYPES2},contains:[CLASS2,NEW_CLASS,FUNC_NAME,PROPERTY,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE]}}return processing_1=processing2,processing_1}var profile_1,hasRequiredProfile;function requireProfile(){if(hasRequiredProfile)return profile_1;hasRequiredProfile=1;function profile2(hljs){return{name:"Python profiler",contains:[hljs.C_NUMBER_MODE,{begin:"[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}",end:":",excludeEnd:!0}, {begin:"(ncalls|tottime|cumtime)",end:"$",keywords:"ncalls tottime|10 cumtime|10 filename",relevance:10},{begin:"function calls",end:"$",contains:[hljs.C_NUMBER_MODE],relevance:10},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{className:"string",begin:"\\(",end:"\\)$",excludeBegin:!0,excludeEnd:!0,relevance:0}]}}return profile_1=profile2,profile_1}var prolog_1,hasRequiredProlog;function requireProlog(){if(hasRequiredProlog)return prolog_1;hasRequiredProlog=1;function prolog2(hljs){const ATOM={begin:/[a-z][A-Za-z0-9_]*/, relevance:0},VAR={className:"symbol",variants:[{begin:/[A-Z][a-zA-Z0-9_]*/},{begin:/_[A-Za-z0-9_]*/}],relevance:0},PARENTED={begin:/\(/,end:/\)/,relevance:0},LIST={begin:/\[/,end:/\]/},LINE_COMMENT={className:"comment",begin:/%/,end:/$/,contains:[hljs.PHRASAL_WORDS_MODE]},BACKTICK_STRING={className:"string",begin:/`/,end:/`/,contains:[hljs.BACKSLASH_ESCAPE]},CHAR_CODE={className:"string",begin:/0'(\\'|.)/},SPACE_CODE={className:"string",begin:/0'\\s/},inner2=[ATOM,VAR,PARENTED,{begin:/:-/},LIST, LINE_COMMENT,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,BACKTICK_STRING,CHAR_CODE,SPACE_CODE,hljs.C_NUMBER_MODE];return PARENTED.contains=inner2,LIST.contains=inner2,{name:"Prolog",contains:inner2.concat([{begin:/\.$/}])}}return prolog_1=prolog2,prolog_1}var properties_1,hasRequiredProperties$2;function requireProperties$2(){if(hasRequiredProperties$2)return properties_1;hasRequiredProperties$2=1;function properties2(hljs){const WS0="[ \\t\\f]*",WS1="[ \\t\\f]+",EQUAL_DELIM=WS0+ "[:=]"+WS0,WS_DELIM=WS1,DELIM="("+EQUAL_DELIM+"|"+WS_DELIM+")",KEY="([^\\\\:= \\t\\f\\n]|\\\\.)+",DELIM_AND_VALUE={end:DELIM,relevance:0,starts:{className:"string",end:/$/,relevance:0,contains:[{begin:"\\\\\\\\"},{begin:"\\\\\\n"}]}};return{name:".properties",disableAutodetect:!0,case_insensitive:!0,illegal:/\S/,contains:[hljs.COMMENT("^\\s*[!#]","$"),{returnBegin:!0,variants:[{begin:KEY+EQUAL_DELIM},{begin:KEY+WS_DELIM}],contains:[{className:"attr",begin:KEY,endsParent:!0}],starts:DELIM_AND_VALUE}, {className:"attr",begin:KEY+WS0+"$"}]}}return properties_1=properties2,properties_1}var protobuf_1,hasRequiredProtobuf;function requireProtobuf(){if(hasRequiredProtobuf)return protobuf_1;hasRequiredProtobuf=1;function protobuf2(hljs){const KEYWORDS2=["package","import","option","optional","required","repeated","group","oneof"],TYPES2=["double","float","int32","int64","uint32","uint64","sint32","sint64","fixed32","fixed64","sfixed32","sfixed64","bool","string","bytes"],CLASS_DEFINITION={match:[/(message|enum|service)\s+/, hljs.IDENT_RE],scope:{1:"keyword",2:"title.class"}};return{name:"Protocol Buffers",aliases:["proto"],keywords:{keyword:KEYWORDS2,type:TYPES2,literal:["true","false"]},contains:[hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,CLASS_DEFINITION,{className:"function",beginKeywords:"rpc",end:/[{;]/,excludeEnd:!0,keywords:"rpc returns"},{begin:/^\s*[A-Z_]+(?=\s*=[^\n]+;$)/}]}}return protobuf_1=protobuf2,protobuf_1}var puppet_1,hasRequiredPuppet;function requirePuppet(){ if(hasRequiredPuppet)return puppet_1;hasRequiredPuppet=1;function puppet2(hljs){const PUPPET_KEYWORDS={keyword:"and case default else elsif false if in import enherits node or true undef unless main settings $string ",literal:"alias audit before loglevel noop require subscribe tag owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check en_address ip_address realname command environment hour monute month monthday special target we\ ekday creates cwd ogoutput refresh refreshonly tries try_sleep umask backup checksum content ctime force ignore links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel native_vlan speed princip\ als allow_root auth_class auth_type authenticate_user k_of_n mechanisms rule session_owner shared options device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running st\ art stop allowdupe auths expiry gid groups home iterations key_membership keys managehome membership password password_max_age password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert ss\ lclientcert sslclientkey sslverify mounted",built_in:"architecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdist\ release lsbminordistrelease lsbrelease macaddress macaddress_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode\ selinux_current_mode selinux_enforced selinux_policyversion serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version"},COMMENT=hljs.COMMENT("#","$"),IDENT_RE2="([A-Za-z_]|::)(\\w|::)*",TITLE=hljs.inherit(hljs.TITLE_MODE,{begin:IDENT_RE2}),VARIABLE={className:"variable",begin:"\\$"+IDENT_RE2},STRING={className:"string",contains:[hljs. BACKSLASH_ESCAPE,VARIABLE],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]};return{name:"Puppet",aliases:["pp"],contains:[COMMENT,VARIABLE,STRING,{beginKeywords:"class",end:"\\{|;",illegal:/=/,contains:[TITLE,COMMENT]},{beginKeywords:"define",end:/\{/,contains:[{className:"section",begin:hljs.IDENT_RE,endsParent:!0}]},{begin:hljs.IDENT_RE+"\\s+\\{",returnBegin:!0,end:/\S/,contains:[{className:"keyword",begin:hljs.IDENT_RE,relevance:.2},{begin:/\{/,end:/\}/,keywords:PUPPET_KEYWORDS,relevance:0, contains:[STRING,COMMENT,{begin:"[a-zA-Z_]+\\s*=>",returnBegin:!0,end:"=>",contains:[{className:"attr",begin:hljs.IDENT_RE}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},VARIABLE]}],relevance:0}]}}return puppet_1=puppet2,puppet_1}var purebasic_1,hasRequiredPurebasic;function requirePurebasic(){if(hasRequiredPurebasic)return purebasic_1;hasRequiredPurebasic=1;function purebasic2(hljs){const STRINGS={className:"string",begin:'(\ ~)?"',end:'"',illegal:"\\n"},CONSTANTS={className:"symbol",begin:"#[a-zA-Z_]\\w*\\$?"};return{name:"PureBASIC",aliases:["pb","pbi"],keywords:"Align And Array As Break CallDebugger Case CompilerCase CompilerDefault CompilerElse CompilerElseIf CompilerEndIf CompilerEndSelect CompilerError CompilerIf CompilerSelect CompilerWarning Continue Data DataSection Debug DebugLevel Declare DeclareC DeclareCDLL DeclareDLL DeclareModule Default Define Dim DisableASM DisableDebugger DisableExplicit Else ElseIf\ EnableASM EnableDebugger EnableExplicit End EndDataSection EndDeclareModule EndEnumeration EndIf EndImport EndInterface EndMacro EndModule EndProcedure EndSelect EndStructure EndStructureUnion EndWith Enumeration EnumerationBinary Extends FakeReturn For ForEach ForEver Global Gosub Goto If Import ImportC IncludeBinary IncludeFile IncludePath Interface List Macro MacroExpandedCount Map Module NewList NewMap Next Not Or Procedure ProcedureC ProcedureCDLL ProcedureDLL ProcedureReturn Protected Pro\ totype PrototypeC ReDim Read Repeat Restore Return Runtime Select Shared Static Step Structure StructureUnion Swap Threaded To UndefineMacro Until Until UnuseModule UseModule Wend While With XIncludeFile XOr",contains:[hljs.COMMENT(";","$",{relevance:0}),{className:"function",begin:"\\b(Procedure|Declare)(C|CDLL|DLL)?\\b",end:"\\(",excludeEnd:!0,returnBegin:!0,contains:[{className:"keyword",begin:"(Procedure|Declare)(C|CDLL|DLL)?",excludeEnd:!0},{className:"type",begin:"\\.\\w*"},hljs.UNDERSCORE_TITLE_MODE]}, STRINGS,CONSTANTS]}}return purebasic_1=purebasic2,purebasic_1}var python_1,hasRequiredPython;function requirePython(){if(hasRequiredPython)return python_1;hasRequiredPython=1;function python2(hljs){const regex=hljs.regex,IDENT_RE2=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),RESERVED_WORDS=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","\ or","pass","raise","return","try","while","with","yield"],KEYWORDS2={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:RESERVED_WORDS,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max", "memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},PROMPT={className:"meta",begin:/^(>>>|\.\.\.) /},SUBST={className:"subst",begin:/\{/,end:/\}/,keywords:KEYWORDS2, illegal:/#/},LITERAL_BRACKET={begin:/\{\{/,relevance:0},STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[hljs.BACKSLASH_ESCAPE,PROMPT],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[hljs.BACKSLASH_ESCAPE,PROMPT],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[hljs.BACKSLASH_ESCAPE,PROMPT,LITERAL_BRACKET,SUBST]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/, contains:[hljs.BACKSLASH_ESCAPE,PROMPT,LITERAL_BRACKET,SUBST]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[hljs.BACKSLASH_ESCAPE,LITERAL_BRACKET,SUBST]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,LITERAL_BRACKET,SUBST]},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},digitpart="[0-9]\ (_?[0-9])*",pointfloat=`(\\b(${digitpart}))?\\.(${digitpart})|\\b(${digitpart})\\.`,lookahead2=`\\b|${RESERVED_WORDS.join("|")}`,NUMBER={className:"number",relevance:0,variants:[{begin:`(\\b(${digitpart})|(${pointfloat}))[eE][+-]?(${digitpart})[jJ]?(?=${lookahead2})`},{begin:`(${pointfloat})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${lookahead2})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${lookahead2})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${lookahead2})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]\ ?(?=${lookahead2})`},{begin:`\\b(${digitpart})[jJ](?=${lookahead2})`}]},COMMENT_TYPE={className:"comment",begin:regex.lookahead(/# type:/),end:/$/,keywords:KEYWORDS2,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},PARAMS={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS2,contains:["self",PROMPT,NUMBER,STRING,hljs.HASH_COMMENT_MODE]}]};return SUBST.contains=[STRING,NUMBER,PROMPT],{name:"\ Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:KEYWORDS2,illegal:/(<\/|\?)|=>/,contains:[PROMPT,NUMBER,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},STRING,COMMENT_TYPE,hljs.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,IDENT_RE2],scope:{1:"keyword",3:"title.function"},contains:[PARAMS]},{variants:[{match:[/\bclass/,/\s+/,IDENT_RE2,/\s*/,/\(\s*/,IDENT_RE2,/\s*\)/]},{match:[/\bclass/,/\s+/,IDENT_RE2]}],scope:{1:"keyword", 3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[NUMBER,PARAMS,STRING]}]}}return python_1=python2,python_1}var pythonRepl_1,hasRequiredPythonRepl;function requirePythonRepl(){if(hasRequiredPythonRepl)return pythonRepl_1;hasRequiredPythonRepl=1;function pythonRepl2(hljs){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}} return pythonRepl_1=pythonRepl2,pythonRepl_1}var q_1,hasRequiredQ;function requireQ(){if(hasRequiredQ)return q_1;hasRequiredQ=1;function q2(hljs){return{name:"Q",aliases:["k","kdb"],keywords:{$pattern:/(`?)[A-Za-z0-9_]+\b/,keyword:"do while select delete by update from",literal:"0b 1b",built_in:"neg not null string reciprocal floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas rat\ ios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tables views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg w\ sum sin cos tan sum",type:"`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid"},contains:[hljs.C_LINE_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE]}}return q_1=q2,q_1}var qml_1,hasRequiredQml;function requireQml(){if(hasRequiredQml)return qml_1;hasRequiredQml=1;function qml2(hljs){const regex=hljs.regex,KEYWORDS2={keyword:"in of on if for while finally var new function do return void else break catc\ h instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await import",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array In\ t16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Behavior bool color coordinate date double enumeration font geocircle georectangle geoshape int list matrix4x4 parent point quaternion real rect size string url variant vector2d vector3d vector4d Promise"},QML_IDENT_RE="[a-zA-Z_][a-zA-Z0-9\\._]*",PROPERTY={className:"keyword",begin:"\\bproper\ ty\\b",starts:{className:"string",end:"(:|=|;|,|//|/\\*|$)",returnEnd:!0}},SIGNAL={className:"keyword",begin:"\\bsignal\\b",starts:{className:"string",end:"(\\(|:|=|;|,|//|/\\*|$)",returnEnd:!0}},ID_ID={className:"attribute",begin:"\\bid\\s*:",starts:{className:"string",end:QML_IDENT_RE,returnEnd:!1}},QML_ATTRIBUTE={begin:QML_IDENT_RE+"\\s*:",returnBegin:!0,contains:[{className:"attribute",begin:QML_IDENT_RE,end:"\\s*:",excludeEnd:!0,relevance:0}],relevance:0},QML_OBJECT={begin:regex.concat(QML_IDENT_RE, /\s*\{/),end:/\{/,returnBegin:!0,relevance:0,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:QML_IDENT_RE})]};return{name:"QML",aliases:["qt"],case_insensitive:!1,keywords:KEYWORDS2,contains:[{className:"meta",begin:/^\s*['"]use (strict|asm)['"]/},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"}]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{begin:"\\b(\ 0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:hljs.C_NUMBER_RE}],relevance:0},{begin:"("+hljs.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.REGEXP_MODE,{begin:/\s*[);\]]/,relevance:0,subLanguage:"xml"}],relevance:0},SIGNAL,PROPERTY,{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"pa\ rams",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]}],illegal:/\[|%/},{begin:"\\."+hljs.IDENT_RE,relevance:0},ID_ID,QML_ATTRIBUTE,QML_OBJECT],illegal:/#/}}return qml_1=qml2,qml_1}var r_1,hasRequiredR;function requireR(){if(hasRequiredR)return r_1;hasRequiredR=1;function r2(hljs){const regex=hljs.regex,IDENT_RE2=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,NUMBER_TYPES_RE=regex.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/, /0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),OPERATORS_RE=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,PUNCTUATION_RE=regex.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:IDENT_RE2,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos \ acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is\ .integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[hljs. COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:regex.lookahead(regex.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:IDENT_RE2},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),hljs.HASH_COMMENT_MODE,{scope:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[hljs.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/, end:/\)(-*)"/}),hljs.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),hljs.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),hljs.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),hljs.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),hljs.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[OPERATORS_RE,NUMBER_TYPES_RE]},{scope:{1:"operator",2:"\ number"},match:[/%[^%]*%/,NUMBER_TYPES_RE]},{scope:{1:"punctuation",2:"number"},match:[PUNCTUATION_RE,NUMBER_TYPES_RE]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,NUMBER_TYPES_RE]}]},{scope:{3:"operator"},match:[IDENT_RE2,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:OPERATORS_RE},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:PUNCTUATION_RE},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}return r_1=r2,r_1}var reasonml_1,hasRequiredReasonml;function requireReasonml(){ if(hasRequiredReasonml)return reasonml_1;hasRequiredReasonml=1;function reasonml2(hljs){return{name:"ReasonML",aliases:["re"],keywords:{$pattern:/[a-z_]\w*!?/,keyword:["and","as","asr","assert","begin","class","constraint","do","done","downto","else","end","esfun","exception","external","for","fun","function","functor","if","in","include","inherit","initializer","land","lazy","let","lor","lsl","lsr","lxor","mod","module","mutable","new","nonrec","object","of","open","or","pri","pub","rec","sig", "struct","switch","then","to","try","type","val","virtual","when","while","with"],built_in:["array","bool","bytes","char","exn|5","float","int","int32","int64","list","lazy_t|5","nativeint|5","ref","string","unit"],literal:["true","false"]},illegal:/(:-|:=|\$\{|\+=)/,contains:[{scope:"literal",match:/\[(\|\|)?\]|\(\)/,relevance:0},hljs.C_LINE_COMMENT_MODE,hljs.COMMENT(/\/\*/,/\*\//,{illegal:/^(#,\/\/)/}),{scope:"symbol",match:/\'[A-Za-z_](?!\')[\w\']*/},{scope:"type",match:/`[A-Z][\w\']*/},{scope:"\ type",match:/\b[A-Z][\w\']*/,relevance:0},{match:/[a-z_]\w*\'[\w\']*/,relevance:0},{scope:"operator",match:/\s+(\|\||\+[\+\.]?|\*[\*\/\.]?|\/[\.]?|\.\.\.|\|>|&&|===?)\s+/,relevance:0},hljs.inherit(hljs.APOS_STRING_MODE,{scope:"string",relevance:0}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{scope:"number",variants:[{match:/\b0[xX][a-fA-F0-9_]+[Lln]?/},{match:/\b0[oO][0-7_]+[Lln]?/},{match:/\b0[bB][01_]+[Lln]?/},{match:/\b[0-9][0-9_]*([Lln]|(\.[0-9_]*)?([eE][-+]?[0-9_]+)?)/}],relevance:0}]}} return reasonml_1=reasonml2,reasonml_1}var rib_1,hasRequiredRib;function requireRib(){if(hasRequiredRib)return rib_1;hasRequiredRib=1;function rib2(hljs){return{name:"RenderMan RIB",keywords:"ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail DetailRange Disk Displacement Display End ErrorHandler Expo\ sure Exterior Format FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry Hider Hyperboloid Identity Illuminate Imager Interior LightSource MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection Quantiz\ e ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd TransformPoints Translate TrimCurve WorldBegin WorldEnd",illegal:"/}],illegal:/./},hljs.COMMENT("^#","$"),QUOTE_STRING, APOS_STRING,VAR,{begin:/[\w-]+=([^\s{}[\]()>]+)/,relevance:0,returnBegin:!0,contains:[{className:"attribute",begin:/[^=]+/},{begin:/=/,endsWithParent:!0,relevance:0,contains:[QUOTE_STRING,APOS_STRING,VAR,{className:"literal",begin:"\\b("+LITERALS2.split(" ").join("|")+")\\b"},{begin:/("[^"]*"|[^\s{}[\]]+)/}]}]},{className:"number",begin:/\*[0-9a-fA-F]+/},{begin:"\\b("+COMMON_COMMANDS.split(" ").join("|")+")([\\s[(\\]|])",returnBegin:!0,contains:[{className:"built_in",begin:/\w+/}]},{className:"b\ uilt_in",variants:[{begin:"(\\.\\./|/|\\s)(("+OBJECTS.split(" ").join("|")+");?\\s)+"},{begin:/\.\./,relevance:0}]}]}}return routeros_1=routeros2,routeros_1}var rsl_1,hasRequiredRsl;function requireRsl(){if(hasRequiredRsl)return rsl_1;hasRequiredRsl=1;function rsl2(hljs){const BUILT_INS2=["abs","acos","ambient","area","asin","atan","atmosphere","attribute","calculatenormal","ceil","cellnoise","clamp","comp","concat","cos","degrees","depth","Deriv","diffuse","distance","Du","Dv","environment","ex\ p","faceforward","filterstep","floor","format","fresnel","incident","length","lightsource","log","match","max","min","mod","noise","normalize","ntransform","opposite","option","phong","pnoise","pow","printf","ptlined","radians","random","reflect","refract","renderinfo","round","setcomp","setxcomp","setycomp","setzcomp","shadow","sign","sin","smoothstep","specular","specularbrdf","spline","sqrt","step","tan","texture","textureinfo","trace","transform","vtransform","xcomp","ycomp","zcomp"],TYPES2=[ "matrix","float","color","point","normal","vector"],KEYWORDS2=["while","for","if","do","return","else","break","extern","continue"],CLASS_DEFINITION={match:[/(surface|displacement|light|volume|imager)/,/\s+/,hljs.IDENT_RE],scope:{1:"keyword",3:"title.class"}};return{name:"RenderMan RSL",keywords:{keyword:KEYWORDS2,built_in:BUILT_INS2,type:TYPES2},illegal:""},FUNCTION_INVOKE]}}return rust_1=rust2,rust_1} var sas_1,hasRequiredSas;function requireSas(){if(hasRequiredSas)return sas_1;hasRequiredSas=1;function sas2(hljs){const regex=hljs.regex,SAS_KEYWORDS=["do","if","then","else","end","until","while","abort","array","attrib","by","call","cards","cards4","catname","continue","datalines","datalines4","delete","delim","delimiter","display","dm","drop","endsas","error","file","filename","footnote","format","goto","in","infile","informat","input","keep","label","leave","length","libname","link","list", "lostcard","merge","missing","modify","options","output","out","page","put","redirect","remove","rename","replace","retain","return","select","set","skip","startsas","stop","title","update","waitsas","where","window","x|0","systask","add","and","alter","as","cascade","check","create","delete","describe","distinct","drop","foreign","from","group","having","index","insert","into","in","key","like","message","modify","msgtype","not","null","on","or","order","primary","references","reset","restrict", "select","set","table","unique","update","validate","view","where"],FUNCTIONS=["abs","addr","airy","arcos","arsin","atan","attrc","attrn","band","betainv","blshift","bnot","bor","brshift","bxor","byte","cdf","ceil","cexist","cinv","close","cnonct","collate","compbl","compound","compress","cos","cosh","css","curobs","cv","daccdb","daccdbsl","daccsl","daccsyd","dacctab","dairy","date","datejul","datepart","datetime","day","dclose","depdb","depdbsl","depdbsl","depsl","depsl","depsyd","depsyd","dept\ ab","deptab","dequote","dhms","dif","digamma","dim","dinfo","dnum","dopen","doptname","doptnum","dread","dropnote","dsname","erf","erfc","exist","exp","fappend","fclose","fcol","fdelete","fetch","fetchobs","fexist","fget","fileexist","filename","fileref","finfo","finv","fipname","fipnamel","fipstate","floor","fnonct","fnote","fopen","foptname","foptnum","fpoint","fpos","fput","fread","frewind","frlen","fsep","fuzz","fwrite","gaminv","gamma","getoption","getvarc","getvarn","hbound","hms","hosthel\ p","hour","ibessel","index","indexc","indexw","input","inputc","inputn","int","intck","intnx","intrr","irr","jbessel","juldate","kurtosis","lag","lbound","left","length","lgamma","libname","libref","log","log10","log2","logpdf","logpmf","logsdf","lowcase","max","mdy","mean","min","minute","mod","month","mopen","mort","n","netpv","nmiss","normal","note","npv","open","ordinal","pathname","pdf","peek","peekc","pmf","point","poisson","poke","probbeta","probbnml","probchi","probf","probgam","probhypr", "probit","probnegb","probnorm","probt","put","putc","putn","qtr","quote","ranbin","rancau","ranexp","rangam","range","rank","rannor","ranpoi","rantbl","rantri","ranuni","repeat","resolve","reverse","rewind","right","round","saving","scan","sdf","second","sign","sin","sinh","skewness","soundex","spedis","sqrt","std","stderr","stfips","stname","stnamel","substr","sum","symget","sysget","sysmsg","sysprod","sysrc","system","tan","tanh","time","timepart","tinv","tnonct","today","translate","tranwrd", "trigamma","trim","trimn","trunc","uniform","upcase","uss","var","varfmt","varinfmt","varlabel","varlen","varname","varnum","varray","varrayx","vartype","verify","vformat","vformatd","vformatdx","vformatn","vformatnx","vformatw","vformatwx","vformatx","vinarray","vinarrayx","vinformat","vinformatd","vinformatdx","vinformatn","vinformatnx","vinformatw","vinformatwx","vinformatx","vlabel","vlabelx","vlength","vlengthx","vname","vnamex","vtype","vtypex","weekday","year","yyq","zipfips","zipname","z\ ipnamel","zipstate"],MACRO_FUNCTIONS=["bquote","nrbquote","cmpres","qcmpres","compstor","datatyp","display","do","else","end","eval","global","goto","if","index","input","keydef","label","left","length","let","local","lowcase","macro","mend","nrbquote","nrquote","nrstr","put","qcmpres","qleft","qlowcase","qscan","qsubstr","qsysfunc","qtrim","quote","qupcase","scan","str","substr","superq","syscall","sysevalf","sysexec","sysfunc","sysget","syslput","sysprod","sysrc","sysrput","then","to","trim","\ unquote","until","upcase","verify","while","window"];return{name:"SAS",case_insensitive:!0,keywords:{literal:["null","missing","_all_","_automatic_","_character_","_infile_","_n_","_name_","_null_","_numeric_","_user_","_webout_"],keyword:SAS_KEYWORDS},contains:[{className:"keyword",begin:/^\s*(proc [\w\d_]+|data|run|quit)[\s;]/},{className:"variable",begin:/&[a-zA-Z_&][a-zA-Z0-9_]*\.?/},{begin:[/^\s*/,/datalines;|cards;/,/(?:.*\n)+/,/^\s*;\s*$/],className:{2:"keyword",3:"string"}},{begin:[/%mend|%macro/, /\s+/,/[a-zA-Z_&][a-zA-Z0-9_]*/],className:{1:"built_in",3:"title.function"}},{className:"built_in",begin:"%"+regex.either(...MACRO_FUNCTIONS)},{className:"title.function",begin:/%[a-zA-Z_][a-zA-Z_0-9]*/},{className:"meta",begin:regex.either(...FUNCTIONS)+"(?=\\()"},{className:"string",variants:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},hljs.COMMENT("\\*",";"),hljs.C_BLOCK_COMMENT_MODE]}}return sas_1=sas2,sas_1}var scala_1,hasRequiredScala;function requireScala(){if(hasRequiredScala)return scala_1; hasRequiredScala=1;function scala2(hljs){const regex=hljs.regex,ANNOTATION={className:"meta",begin:"@[A-Za-z]+"},SUBST={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"},{begin:/\$\{/,end:/\}/}]},STRING={className:"string",variants:[{begin:'"""',end:'"""'},{begin:'"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]},{begin:'[a-z]+"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE,SUBST]},{className:"string",begin:'[a-z]+"""',end:'"""',contains:[SUBST],relevance:10}]},TYPE={className:"\ type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},NAME={className:"title",begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,relevance:0},CLASS2={className:"class",beginKeywords:"class object trait type",end:/[:={\[\n;]/,excludeEnd:!0,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{beginKeywords:"extends with",relevance:10},{begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[TYPE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]}, {className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[TYPE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},NAME]},METHOD={className:"function",beginKeywords:"def",end:regex.lookahead(/[:={\[(\n;]/),contains:[NAME]},EXTENSION={begin:[/^\s*/,"extension",/\s+(?=[[(])/],beginScope:{2:"keyword"}},END2={begin:[/^\s*/,/end/,/\s+/,/(extension\b)?/],beginScope:{2:"keyword",4:"keyword"}},INLINE_MODES=[{match:/\.inline\b/},{begin:/\binline(?=\s)/,keywords:"inline"}], USING_PARAM_CLAUSE={begin:[/\(\s*/,/using/,/\s+(?!\))/],beginScope:{2:"keyword"}};return{name:"Scala",keywords:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if then forSome for while do throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit export enum given transparent"},contains:[{begin:["//>",/\s+/,/using/,/\s+/,/\S+/],beginScope:{1:"c\ omment",3:"keyword",5:"type"},end:/$/,contains:[{className:"string",begin:/\S+/}]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRING,TYPE,METHOD,CLASS2,hljs.C_NUMBER_MODE,EXTENSION,END2,...INLINE_MODES,USING_PARAM_CLAUSE,ANNOTATION]}}return scala_1=scala2,scala_1}var scheme_1,hasRequiredScheme;function requireScheme(){if(hasRequiredScheme)return scheme_1;hasRequiredScheme=1;function scheme2(hljs){const SCHEME_IDENT_RE="[^\\(\\)\\[\\]\\{\\}\",'`;#|\\\\\\s]+",SCHEME_SIMPLE_NUMBER_RE="(-|\\+\ )?\\d+([./]\\d+)?",SCHEME_COMPLEX_NUMBER_RE=SCHEME_SIMPLE_NUMBER_RE+"[+\\-]"+SCHEME_SIMPLE_NUMBER_RE+"i",KEYWORDS2={$pattern:SCHEME_IDENT_RE,built_in:"case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-outpu\ t-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules ' * + , ,@ - ... / ; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase ch\ ar-upper-case? char-whitespace? char<=? char=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vec\ tor max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci=? string-ci>? strin\ g-copy string-fill! string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string symbol? tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"},LITERAL={className:"literal",begin:"(#t|#f|#\\\\"+SCHEME_IDENT_RE+"|#\\\\.)"},NUMBER={className:"number",variants:[{begin:SCHEME_SIMPLE_NUMBER_RE,relevance:0},{begin:SCHEME_COMPLEX_NUMBER_RE, relevance:0},{begin:"#b[0-1]+(/[0-1]+)?"},{begin:"#o[0-7]+(/[0-7]+)?"},{begin:"#x[0-9a-f]+(/[0-9a-f]+)?"}]},STRING=hljs.QUOTE_STRING_MODE,COMMENT_MODES=[hljs.COMMENT(";","$",{relevance:0}),hljs.COMMENT("#\\|","\\|#")],IDENT={begin:SCHEME_IDENT_RE,relevance:0},QUOTED_IDENT={className:"symbol",begin:"'"+SCHEME_IDENT_RE},BODY={endsWithParent:!0,relevance:0},QUOTED_LIST={variants:[{begin:/'/},{begin:"`"}],contains:[{begin:"\\(",end:"\\)",contains:["self",LITERAL,STRING,NUMBER,IDENT,QUOTED_IDENT]}]}, NAME={className:"name",relevance:0,begin:SCHEME_IDENT_RE,keywords:KEYWORDS2},LIST={variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}],contains:[{begin:/lambda/,endsWithParent:!0,returnBegin:!0,contains:[NAME,{endsParent:!0,variants:[{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/}],contains:[IDENT]}]},NAME,BODY]};return BODY.contains=[LITERAL,NUMBER,STRING,IDENT,QUOTED_IDENT,QUOTED_LIST,LIST].concat(COMMENT_MODES),{name:"Scheme",aliases:["scm"],illegal:/\S/,contains:[hljs.SHEBANG(),NUMBER,STRING, QUOTED_IDENT,QUOTED_LIST,LIST].concat(COMMENT_MODES)}}return scheme_1=scheme2,scheme_1}var scilab_1,hasRequiredScilab;function requireScilab(){if(hasRequiredScilab)return scilab_1;hasRequiredScilab=1;function scilab2(hljs){const COMMON_CONTAINS=[hljs.C_NUMBER_MODE,{className:"string",begin:`'|"`,end:`'|"`,contains:[hljs.BACKSLASH_ESCAPE,{begin:"''"}]}];return{name:"Scilab",aliases:["sci"],keywords:{$pattern:/%?\w+/,keyword:"abort break case clear catch continue do elseif else endfunction end for\ function global if pause return resume select try then while",literal:"%f %F %t %T %pi %eps %inf %nan %e %i %z %s",built_in:"abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp error exec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isempty isinfisnan isvector lasterror length load linspace list listfiles log10 log2 log max min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand real round sinh sin size gsort sprintf sqrt strcat st\ rcmps tring sum system tanh tan type typename warning zeros matrix"},illegal:'("|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[hljs.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},{begin:"[a-zA-Z_][a-zA-Z_0-9]*[\\.']+",relevance:0},{begin:"\\[",end:"\\][\\.']*",relevance:0,contains:COMMON_CONTAINS},hljs.COMMENT("//","$")].concat(COMMON_CONTAINS)}}return scilab_1=scilab2,scilab_1}var scss_1,hasRequiredScss;function requireScss(){if(hasRequiredScss) return scss_1;hasRequiredScss=1;const MODES2=hljs=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:hljs.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:hljs.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vm\ ax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),HTML_TAGS2=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark", "menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],SVG_TAGS2=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecul\ arLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],TAGS2=[...HTML_TAGS2,...SVG_TAGS2],MEDIA_FEATURES2=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-bl\ ock","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),PSEUDO_CLASSES2=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context", "hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),PSEUDO_ELEMENTS2=["after","backdrop","before","cue","cue-region","first\ -letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ATTRIBUTES2=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-t\ imeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","borde\ r-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image\ -width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-rad\ ius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","col\ or-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","count\ er-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-sm\ ooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","gri\ d-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-blo\ ck-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin\ -trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","mi\ n-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behav\ ior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position", "position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scr\ oll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","\ stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-positio\ n","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unic\ ode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function scss2(hljs){const modes2=MODES2( hljs),PSEUDO_ELEMENTS$12=PSEUDO_ELEMENTS2,PSEUDO_CLASSES$12=PSEUDO_CLASSES2,AT_IDENTIFIER="@[a-z-]+",AT_MODIFIERS="and or not only",VARIABLE={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,modes2.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},modes2.ATTRIBUTE_SELECTOR_MODE, {className:"selector-tag",begin:"\\b("+TAGS2.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+PSEUDO_CLASSES$12.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+PSEUDO_ELEMENTS$12.join("|")+")"},VARIABLE,{begin:/\(/,end:/\)/,contains:[modes2.CSS_NUMBER_MODE]},modes2.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ATTRIBUTES2.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|\ transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|l\ eft|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|a\ lways|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[modes2.BLOCK_COMMENT,VARIABLE,modes2.HEXCOLOR,modes2.CSS_NUMBER_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,modes2.IMPORTANT,modes2.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:AT_IDENTIFIER,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:AT_MODIFIERS,attribute:MEDIA_FEATURES2.join(" ")},contains:[{begin:AT_IDENTIFIER,className:"\ keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},VARIABLE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,modes2.HEXCOLOR,modes2.CSS_NUMBER_MODE]},modes2.FUNCTION_DISPATCH]}}return scss_1=scss2,scss_1}var shell_1,hasRequiredShell;function requireShell(){if(hasRequiredShell)return shell_1;hasRequiredShell=1;function shell2(hljs){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/, subLanguage:"bash"}}]}}return shell_1=shell2,shell_1}var smali_1,hasRequiredSmali;function requireSmali(){if(hasRequiredSmali)return smali_1;hasRequiredSmali=1;function smali2(hljs){const smali_instr_low_prio=["add","and","cmp","cmpg","cmpl","const","div","double","float","goto","if","int","long","move","mul","neg","new","nop","not","or","rem","return","shl","shr","sput","sub","throw","ushr","xor"],smali_instr_high_prio=["aget","aput","array","check","execute","fill","filled","goto/16","goto/32", "iget","instance","invoke","iput","monitor","packed","sget","sparse"],smali_keywords=["transient","constructor","abstract","final","synthetic","public","private","protected","static","bridge","system"];return{name:"Smali",contains:[{className:"string",begin:'"',end:'"',relevance:0},hljs.COMMENT("#","$",{relevance:0}),{className:"keyword",variants:[{begin:"\\s*\\.end\\s[a-zA-Z0-9]*"},{begin:"^[ ]*\\.[a-zA-Z]*",relevance:0},{begin:"\\s:[a-zA-Z_0-9]*",relevance:0},{begin:"\\s("+smali_keywords.join( "|")+")"}]},{className:"built_in",variants:[{begin:"\\s("+smali_instr_low_prio.join("|")+")\\s"},{begin:"\\s("+smali_instr_low_prio.join("|")+")((-|/)[a-zA-Z0-9]+)+\\s",relevance:10},{begin:"\\s("+smali_instr_high_prio.join("|")+")((-|/)[a-zA-Z0-9]+)*\\s",relevance:10}]},{className:"class",begin:`L[^(;: ]*;`,relevance:0},{begin:"[vp][0-9]+"}]}}return smali_1=smali2,smali_1}var smalltalk_1,hasRequiredSmalltalk;function requireSmalltalk(){if(hasRequiredSmalltalk)return smalltalk_1;hasRequiredSmalltalk=1;function smalltalk2(hljs){const VAR_IDENT_RE="[a-z][a-zA-Z0-9_]*",CHAR={className:"string",begin:"\\$.{1}"},SYMBOL={className:"symbol",begin:"#"+hljs.UNDERSCORE_IDENT_RE};return{name:"Smalltalk",aliases:["st"],keywords:["self","super","nil","true","false","thisContext"],contains:[hljs.COMMENT('"', '"'),hljs.APOS_STRING_MODE,{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:VAR_IDENT_RE+":",relevance:0},hljs.C_NUMBER_MODE,SYMBOL,CHAR,{begin:"\\|[ ]*"+VAR_IDENT_RE+"([ ]+"+VAR_IDENT_RE+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+VAR_IDENT_RE}]},{begin:"#\\(",end:"\\)",contains:[hljs.APOS_STRING_MODE,CHAR,hljs.C_NUMBER_MODE,SYMBOL]}]}}return smalltalk_1=smalltalk2,smalltalk_1}var sml_1,hasRequiredSml;function requireSml(){if(hasRequiredSml) return sml_1;hasRequiredSml=1;function sml2(hljs){return{name:"SML (Standard ML)",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE\ SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0},hljs.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},hljs.inherit(hljs.APOS_STRING_MODE,{className:"string",relevance:0}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[\ xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}return sml_1=sml2,sml_1}var sqf_1,hasRequiredSqf;function requireSqf(){if(hasRequiredSqf)return sqf_1;hasRequiredSqf=1;function sqf2(hljs){const VARIABLE={className:"variable",begin:/\b_+[a-zA-Z]\w*/},FUNCTION={className:"title",begin:/[a-zA-Z][a-zA-Z_0-9]*_fnc_[a-zA-Z_0-9]+/},STRINGS={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'\ ""',relevance:0}]},{begin:"'",end:"'",contains:[{begin:"''",relevance:0}]}]},KEYWORDS2=["break","breakWith","breakOut","breakTo","case","catch","continue","continueWith","default","do","else","exit","exitWith","for","forEach","from","if","local","private","switch","step","then","throw","to","try","waitUntil","while","with"],LITERAL=["blufor","civilian","configNull","controlNull","displayNull","diaryRecordNull","east","endl","false","grpNull","independent","lineBreak","locationNull","nil","objNul\ l","opfor","pi","resistance","scriptNull","sideAmbientLife","sideEmpty","sideEnemy","sideFriendly","sideLogic","sideUnknown","taskNull","teamMemberNull","true","west"],BUILT_IN=["abs","accTime","acos","action","actionIDs","actionKeys","actionKeysEx","actionKeysImages","actionKeysNames","actionKeysNamesArray","actionName","actionParams","activateAddons","activatedAddons","activateKey","activeTitleEffectParams","add3DENConnection","add3DENEventHandler","add3DENLayer","addAction","addBackpack","add\ BackpackCargo","addBackpackCargoGlobal","addBackpackGlobal","addBinocularItem","addCamShake","addCuratorAddons","addCuratorCameraArea","addCuratorEditableObjects","addCuratorEditingArea","addCuratorPoints","addEditorObject","addEventHandler","addForce","addForceGeneratorRTD","addGoggles","addGroupIcon","addHandgunItem","addHeadgear","addItem","addItemCargo","addItemCargoGlobal","addItemPool","addItemToBackpack","addItemToUniform","addItemToVest","addLiveStats","addMagazine","addMagazineAmmoCargo", "addMagazineCargo","addMagazineCargoGlobal","addMagazineGlobal","addMagazinePool","addMagazines","addMagazineTurret","addMenu","addMenuItem","addMissionEventHandler","addMPEventHandler","addMusicEventHandler","addonFiles","addOwnedMine","addPlayerScores","addPrimaryWeaponItem","addPublicVariableEventHandler","addRating","addResources","addScore","addScoreSide","addSecondaryWeaponItem","addSwitchableUnit","addTeamMember","addToRemainsCollector","addTorque","addUniform","addUserActionEventHandler", "addVehicle","addVest","addWaypoint","addWeapon","addWeaponCargo","addWeaponCargoGlobal","addWeaponGlobal","addWeaponItem","addWeaponPool","addWeaponTurret","addWeaponWithAttachmentsCargo","addWeaponWithAttachmentsCargoGlobal","admin","agent","agents","AGLToASL","aimedAtTarget","aimPos","airDensityCurveRTD","airDensityRTD","airplaneThrottle","airportSide","AISFinishHeal","alive","all3DENEntities","allActiveTitleEffects","allAddonsInfo","allAirports","allControls","allCurators","allCutLayers","al\ lDead","allDeadMen","allDiaryRecords","allDiarySubjects","allDisplays","allEnv3DSoundSources","allGroups","allLODs","allMapMarkers","allMines","allMissionObjects","allObjects","allow3DMode","allowCrewInImmobile","allowCuratorLogicIgnoreAreas","allowDamage","allowDammage","allowedService","allowFileOperations","allowFleeing","allowGetIn","allowService","allowSprint","allPlayers","allSimpleObjects","allSites","allTurrets","allUnits","allUnitsUAV","allUsers","allVariables","ambientTemperature","amm\ o","ammoOnPylon","and","animate","animateBay","animateDoor","animatePylon","animateSource","animationNames","animationPhase","animationSourcePhase","animationState","apertureParams","append","apply","armoryPoints","arrayIntersect","asin","ASLToAGL","ASLToATL","assert","assignAsCargo","assignAsCargoIndex","assignAsCommander","assignAsDriver","assignAsGunner","assignAsTurret","assignCurator","assignedCargo","assignedCommander","assignedDriver","assignedGroup","assignedGunner","assignedItems","assi\ gnedTarget","assignedTeam","assignedVehicle","assignedVehicleRole","assignedVehicles","assignItem","assignTeam","assignToAirport","atan","atan2","atg","ATLToASL","attachedObject","attachedObjects","attachedTo","attachObject","attachTo","attackEnabled","awake","backpack","backpackCargo","backpackContainer","backpackItems","backpackMagazines","backpackSpaceFor","behaviour","benchmark","bezierInterpolation","binocular","binocularItems","binocularMagazine","boundingBox","boundingBoxReal","boundingCe\ nter","brakesDisabled","briefingName","buildingExit","buildingPos","buldozer_EnableRoadDiag","buldozer_IsEnabledRoadDiag","buldozer_LoadNewRoads","buldozer_reloadOperMap","buttonAction","buttonSetAction","cadetMode","calculatePath","calculatePlayerVisibilityByFriendly","call","callExtension","camCommand","camCommit","camCommitPrepared","camCommitted","camConstuctionSetParams","camCreate","camDestroy","cameraEffect","cameraEffectEnableHUD","cameraInterest","cameraOn","cameraView","campaignConfigF\ ile","camPreload","camPreloaded","camPrepareBank","camPrepareDir","camPrepareDive","camPrepareFocus","camPrepareFov","camPrepareFovRange","camPreparePos","camPrepareRelPos","camPrepareTarget","camSetBank","camSetDir","camSetDive","camSetFocus","camSetFov","camSetFovRange","camSetPos","camSetRelPos","camSetTarget","camTarget","camUseNVG","canAdd","canAddItemToBackpack","canAddItemToUniform","canAddItemToVest","cancelSimpleTaskDestination","canDeployWeapon","canFire","canMove","canSlingLoad","canS\ tand","canSuspend","canTriggerDynamicSimulation","canUnloadInCombat","canVehicleCargo","captive","captiveNum","cbChecked","cbSetChecked","ceil","channelEnabled","cheatsEnabled","checkAIFeature","checkVisibility","className","clear3DENAttribute","clear3DENInventory","clearAllItemsFromBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearForcesRTD","clearGroupIcons","clearItemCargo","clearItemCargoGlobal","clearItemPool","clearMagazineCargo","clearMagazineCargoGlobal","clearMagazinePool", "clearOverlay","clearRadio","clearWeaponCargo","clearWeaponCargoGlobal","clearWeaponPool","clientOwner","closeDialog","closeDisplay","closeOverlay","collapseObjectTree","collect3DENHistory","collectiveRTD","collisionDisabledWith","combatBehaviour","combatMode","commandArtilleryFire","commandChat","commander","commandFire","commandFollow","commandFSM","commandGetOut","commandingMenu","commandMove","commandRadio","commandStop","commandSuppressiveFire","commandTarget","commandWatch","comment","comm\ itOverlay","compatibleItems","compatibleMagazines","compile","compileFinal","compileScript","completedFSM","composeText","configClasses","configFile","configHierarchy","configName","configOf","configProperties","configSourceAddonList","configSourceMod","configSourceModList","confirmSensorTarget","connectTerminalToUAV","connectToServer","controlsGroupCtrl","conversationDisabled","copyFromClipboard","copyToClipboard","copyWaypoints","cos","count","countEnemy","countFriendly","countSide","countType", "countUnknown","create3DENComposition","create3DENEntity","createAgent","createCenter","createDialog","createDiaryLink","createDiaryRecord","createDiarySubject","createDisplay","createGearDialog","createGroup","createGuardedPoint","createHashMap","createHashMapFromArray","createLocation","createMarker","createMarkerLocal","createMenu","createMine","createMissionDisplay","createMPCampaignDisplay","createSimpleObject","createSimpleTask","createSite","createSoundSource","createTask","createTeam","c\ reateTrigger","createUnit","createVehicle","createVehicleCrew","createVehicleLocal","crew","ctAddHeader","ctAddRow","ctClear","ctCurSel","ctData","ctFindHeaderRows","ctFindRowHeader","ctHeaderControls","ctHeaderCount","ctRemoveHeaders","ctRemoveRows","ctrlActivate","ctrlAddEventHandler","ctrlAngle","ctrlAnimateModel","ctrlAnimationPhaseModel","ctrlAt","ctrlAutoScrollDelay","ctrlAutoScrollRewind","ctrlAutoScrollSpeed","ctrlBackgroundColor","ctrlChecked","ctrlClassName","ctrlCommit","ctrlCommitted", "ctrlCreate","ctrlDelete","ctrlEnable","ctrlEnabled","ctrlFade","ctrlFontHeight","ctrlForegroundColor","ctrlHTMLLoaded","ctrlIDC","ctrlIDD","ctrlMapAnimAdd","ctrlMapAnimClear","ctrlMapAnimCommit","ctrlMapAnimDone","ctrlMapCursor","ctrlMapMouseOver","ctrlMapPosition","ctrlMapScale","ctrlMapScreenToWorld","ctrlMapSetPosition","ctrlMapWorldToScreen","ctrlModel","ctrlModelDirAndUp","ctrlModelScale","ctrlMousePosition","ctrlParent","ctrlParentControlsGroup","ctrlPosition","ctrlRemoveAllEventHandlers", "ctrlRemoveEventHandler","ctrlScale","ctrlScrollValues","ctrlSetActiveColor","ctrlSetAngle","ctrlSetAutoScrollDelay","ctrlSetAutoScrollRewind","ctrlSetAutoScrollSpeed","ctrlSetBackgroundColor","ctrlSetChecked","ctrlSetDisabledColor","ctrlSetEventHandler","ctrlSetFade","ctrlSetFocus","ctrlSetFont","ctrlSetFontH1","ctrlSetFontH1B","ctrlSetFontH2","ctrlSetFontH2B","ctrlSetFontH3","ctrlSetFontH3B","ctrlSetFontH4","ctrlSetFontH4B","ctrlSetFontH5","ctrlSetFontH5B","ctrlSetFontH6","ctrlSetFontH6B","ctr\ lSetFontHeight","ctrlSetFontHeightH1","ctrlSetFontHeightH2","ctrlSetFontHeightH3","ctrlSetFontHeightH4","ctrlSetFontHeightH5","ctrlSetFontHeightH6","ctrlSetFontHeightSecondary","ctrlSetFontP","ctrlSetFontPB","ctrlSetFontSecondary","ctrlSetForegroundColor","ctrlSetModel","ctrlSetModelDirAndUp","ctrlSetModelScale","ctrlSetMousePosition","ctrlSetPixelPrecision","ctrlSetPosition","ctrlSetPositionH","ctrlSetPositionW","ctrlSetPositionX","ctrlSetPositionY","ctrlSetScale","ctrlSetScrollValues","ctrlSet\ Shadow","ctrlSetStructuredText","ctrlSetText","ctrlSetTextColor","ctrlSetTextColorSecondary","ctrlSetTextSecondary","ctrlSetTextSelection","ctrlSetTooltip","ctrlSetTooltipColorBox","ctrlSetTooltipColorShade","ctrlSetTooltipColorText","ctrlSetTooltipMaxWidth","ctrlSetURL","ctrlSetURLOverlayMode","ctrlShadow","ctrlShow","ctrlShown","ctrlStyle","ctrlText","ctrlTextColor","ctrlTextHeight","ctrlTextSecondary","ctrlTextSelection","ctrlTextWidth","ctrlTooltip","ctrlType","ctrlURL","ctrlURLOverlayMode", "ctrlVisible","ctRowControls","ctRowCount","ctSetCurSel","ctSetData","ctSetHeaderTemplate","ctSetRowTemplate","ctSetValue","ctValue","curatorAddons","curatorCamera","curatorCameraArea","curatorCameraAreaCeiling","curatorCoef","curatorEditableObjects","curatorEditingArea","curatorEditingAreaType","curatorMouseOver","curatorPoints","curatorRegisteredObjects","curatorSelected","curatorWaypointCost","current3DENOperation","currentChannel","currentCommand","currentMagazine","currentMagazineDetail","c\ urrentMagazineDetailTurret","currentMagazineTurret","currentMuzzle","currentNamespace","currentPilot","currentTask","currentTasks","currentThrowable","currentVisionMode","currentWaypoint","currentWeapon","currentWeaponMode","currentWeaponTurret","currentZeroing","cursorObject","cursorTarget","customChat","customRadio","customWaypointPosition","cutFadeOut","cutObj","cutRsc","cutText","damage","date","dateToNumber","dayTime","deActivateKey","debriefingText","debugFSM","debugLog","decayGraphValues", "deg","delete3DENEntities","deleteAt","deleteCenter","deleteCollection","deleteEditorObject","deleteGroup","deleteGroupWhenEmpty","deleteIdentity","deleteLocation","deleteMarker","deleteMarkerLocal","deleteRange","deleteResources","deleteSite","deleteStatus","deleteTeam","deleteVehicle","deleteVehicleCrew","deleteWaypoint","detach","detectedMines","diag_activeMissionFSMs","diag_activeScripts","diag_activeSQFScripts","diag_activeSQSScripts","diag_allMissionEventHandlers","diag_captureFrame","diag\ _captureFrameToFile","diag_captureSlowFrame","diag_codePerformance","diag_deltaTime","diag_drawmode","diag_dumpCalltraceToLog","diag_dumpScriptAssembly","diag_dumpTerrainSynth","diag_dynamicSimulationEnd","diag_enable","diag_enabled","diag_exportConfig","diag_exportTerrainSVG","diag_fps","diag_fpsmin","diag_frameno","diag_getTerrainSegmentOffset","diag_lightNewLoad","diag_list","diag_localized","diag_log","diag_logSlowFrame","diag_mergeConfigFile","diag_recordTurretLimits","diag_resetFSM","diag_\ resetshapes","diag_scope","diag_setLightNew","diag_stacktrace","diag_tickTime","diag_toggle","dialog","diarySubjectExists","didJIP","didJIPOwner","difficulty","difficultyEnabled","difficultyEnabledRTD","difficultyOption","direction","directionStabilizationEnabled","directSay","disableAI","disableBrakes","disableCollisionWith","disableConversation","disableDebriefingStats","disableMapIndicators","disableNVGEquipment","disableRemoteSensors","disableSerialization","disableTIEquipment","disableUAVCo\ nnectability","disableUserInput","displayAddEventHandler","displayChild","displayCtrl","displayParent","displayRemoveAllEventHandlers","displayRemoveEventHandler","displaySetEventHandler","displayUniqueName","displayUpdate","dissolveTeam","distance","distance2D","distanceSqr","distributionRegion","do3DENAction","doArtilleryFire","doFire","doFollow","doFSM","doGetOut","doMove","doorPhase","doStop","doSuppressiveFire","doTarget","doWatch","drawArrow","drawEllipse","drawIcon","drawIcon3D","drawLase\ r","drawLine","drawLine3D","drawLink","drawLocation","drawPolygon","drawRectangle","drawTriangle","driver","drop","dynamicSimulationDistance","dynamicSimulationDistanceCoef","dynamicSimulationEnabled","dynamicSimulationSystemEnabled","echo","edit3DENMissionAttributes","editObject","editorSetEventHandler","effectiveCommander","elevatePeriscope","emptyPositions","enableAI","enableAIFeature","enableAimPrecision","enableAttack","enableAudioFeature","enableAutoStartUpRTD","enableAutoTrimRTD","enableC\ amShake","enableCaustics","enableChannel","enableCollisionWith","enableCopilot","enableDebriefingStats","enableDiagLegend","enableDirectionStabilization","enableDynamicSimulation","enableDynamicSimulationSystem","enableEndDialog","enableEngineArtillery","enableEnvironment","enableFatigue","enableGunLights","enableInfoPanelComponent","enableIRLasers","enableMimics","enablePersonTurret","enableRadio","enableReload","enableRopeAttach","enableSatNormalOnDetail","enableSaving","enableSentences","enab\ leSimulation","enableSimulationGlobal","enableStamina","enableStressDamage","enableTeamSwitch","enableTraffic","enableUAVConnectability","enableUAVWaypoints","enableVehicleCargo","enableVehicleSensor","enableWeaponDisassembly","endLoadingScreen","endMission","engineOn","enginesIsOnRTD","enginesPowerRTD","enginesRpmRTD","enginesTorqueRTD","entities","environmentEnabled","environmentVolume","equipmentDisabled","estimatedEndServerTime","estimatedTimeLeft","evalObjectArgument","everyBackpack","every\ Container","exec","execEditorScript","execFSM","execVM","exp","expectedDestination","exportJIPMessages","eyeDirection","eyePos","face","faction","fadeEnvironment","fadeMusic","fadeRadio","fadeSound","fadeSpeech","failMission","fileExists","fillWeaponsFromPool","find","findAny","findCover","findDisplay","findEditorObject","findEmptyPosition","findEmptyPositionReady","findIf","findNearestEnemy","finishMissionInit","finite","fire","fireAtTarget","firstBackpack","flag","flagAnimationPhase","flagOwne\ r","flagSide","flagTexture","flatten","fleeing","floor","flyInHeight","flyInHeightASL","focusedCtrl","fog","fogForecast","fogParams","forceAddUniform","forceAtPositionRTD","forceCadetDifficulty","forcedMap","forceEnd","forceFlagTexture","forceFollowRoad","forceGeneratorRTD","forceMap","forceRespawn","forceSpeed","forceUnicode","forceWalk","forceWeaponFire","forceWeatherChange","forEachMember","forEachMemberAgent","forEachMemberTeam","forgetTarget","format","formation","formationDirection","forma\ tionLeader","formationMembers","formationPosition","formationTask","formatText","formLeader","freeExtension","freeLook","fromEditor","fuel","fullCrew","gearIDCAmmoCount","gearSlotAmmoCount","gearSlotData","gestureState","get","get3DENActionState","get3DENAttribute","get3DENCamera","get3DENConnections","get3DENEntity","get3DENEntityID","get3DENGrid","get3DENIconsVisible","get3DENLayerEntities","get3DENLinesVisible","get3DENMissionAttribute","get3DENMouseOver","get3DENSelected","getAimingCoef","ge\ tAllEnv3DSoundControllers","getAllEnvSoundControllers","getAllHitPointsDamage","getAllOwnedMines","getAllPylonsInfo","getAllSoundControllers","getAllUnitTraits","getAmmoCargo","getAnimAimPrecision","getAnimSpeedCoef","getArray","getArtilleryAmmo","getArtilleryComputerSettings","getArtilleryETA","getAssetDLCInfo","getAssignedCuratorLogic","getAssignedCuratorUnit","getAttackTarget","getAudioOptionVolumes","getBackpackCargo","getBleedingRemaining","getBurningValue","getCalculatePlayerVisibilityByFr\ iendly","getCameraViewDirection","getCargoIndex","getCenterOfMass","getClientState","getClientStateNumber","getCompatiblePylonMagazines","getConnectedUAV","getConnectedUAVUnit","getContainerMaxLoad","getCorpse","getCruiseControl","getCursorObjectParams","getCustomAimCoef","getCustomSoundController","getCustomSoundControllerCount","getDammage","getDebriefingText","getDescription","getDir","getDirVisual","getDiverState","getDLCAssetsUsage","getDLCAssetsUsageByName","getDLCs","getDLCUsageTime","get\ EditorCamera","getEditorMode","getEditorObjectScope","getElevationOffset","getEngineTargetRPMRTD","getEnv3DSoundController","getEnvSoundController","getEventHandlerInfo","getFatigue","getFieldManualStartPage","getForcedFlagTexture","getForcedSpeed","getFriend","getFSMVariable","getFuelCargo","getGraphValues","getGroupIcon","getGroupIconParams","getGroupIcons","getHideFrom","getHit","getHitIndex","getHitPointDamage","getItemCargo","getLighting","getLightingAt","getLoadedModsInfo","getMagazineCarg\ o","getMarkerColor","getMarkerPos","getMarkerSize","getMarkerType","getMass","getMissionConfig","getMissionConfigValue","getMissionDLCs","getMissionLayerEntities","getMissionLayers","getMissionPath","getModelInfo","getMousePosition","getMusicPlayedTime","getNumber","getObjectArgument","getObjectChildren","getObjectDLC","getObjectFOV","getObjectID","getObjectMaterials","getObjectProxy","getObjectScale","getObjectTextures","getObjectType","getObjectViewDistance","getOpticsMode","getOrDefault","get\ OrDefaultCall","getOxygenRemaining","getPersonUsedDLCs","getPilotCameraDirection","getPilotCameraPosition","getPilotCameraRotation","getPilotCameraTarget","getPiPViewDistance","getPlateNumber","getPlayerChannel","getPlayerID","getPlayerScores","getPlayerUID","getPlayerVoNVolume","getPos","getPosASL","getPosASLVisual","getPosASLW","getPosATL","getPosATLVisual","getPosVisual","getPosWorld","getPosWorldVisual","getPylonMagazines","getRelDir","getRelPos","getRemoteSensorsDisabled","getRepairCargo","\ getResolution","getRoadInfo","getRotorBrakeRTD","getSensorTargets","getSensorThreats","getShadowDistance","getShotParents","getSlingLoad","getSoundController","getSoundControllerResult","getSpeed","getStamina","getStatValue","getSteamFriendsServers","getSubtitleOptions","getSuppression","getTerrainGrid","getTerrainHeight","getTerrainHeightASL","getTerrainInfo","getText","getTextRaw","getTextureInfo","getTextWidth","getTiParameters","getTotalDLCUsageTime","getTrimOffsetRTD","getTurretLimits","get\ TurretOpticsMode","getUnitFreefallInfo","getUnitLoadout","getUnitTrait","getUnloadInCombat","getUserInfo","getUserMFDText","getUserMFDValue","getVariable","getVehicleCargo","getVehicleTiPars","getWeaponCargo","getWeaponSway","getWingsOrientationRTD","getWingsPositionRTD","getWPPos","glanceAt","globalChat","globalRadio","goggles","goto","group","groupChat","groupFromNetId","groupIconSelectable","groupIconsVisible","groupID","groupOwner","groupRadio","groups","groupSelectedUnits","groupSelectUnit", "gunner","gusts","halt","handgunItems","handgunMagazine","handgunWeapon","handsHit","hashValue","hasInterface","hasPilotCamera","hasWeapon","hcAllGroups","hcGroupParams","hcLeader","hcRemoveAllGroups","hcRemoveGroup","hcSelected","hcSelectGroup","hcSetGroup","hcShowBar","hcShownBar","headgear","hideBody","hideObject","hideObjectGlobal","hideSelection","hint","hintC","hintCadet","hintSilent","hmd","hostMission","htmlLoad","HUDMovementLevels","humidity","image","importAllGroups","importance","in", "inArea","inAreaArray","incapacitatedState","inflame","inflamed","infoPanel","infoPanelComponentEnabled","infoPanelComponents","infoPanels","inGameUISetEventHandler","inheritsFrom","initAmbientLife","inPolygon","inputAction","inputController","inputMouse","inRangeOfArtillery","insert","insertEditorObject","intersect","is3DEN","is3DENMultiplayer","is3DENPreview","isAbleToBreathe","isActionMenuVisible","isAgent","isAimPrecisionEnabled","isAllowedCrewInImmobile","isArray","isAutoHoverOn","isAutonom\ ous","isAutoStartUpEnabledRTD","isAutotest","isAutoTrimOnRTD","isAwake","isBleeding","isBurning","isClass","isCollisionLightOn","isCopilotEnabled","isDamageAllowed","isDedicated","isDLCAvailable","isEngineOn","isEqualRef","isEqualTo","isEqualType","isEqualTypeAll","isEqualTypeAny","isEqualTypeArray","isEqualTypeParams","isFilePatchingEnabled","isFinal","isFlashlightOn","isFlatEmpty","isForcedWalk","isFormationLeader","isGameFocused","isGamePaused","isGroupDeletedWhenEmpty","isHidden","isInRemain\ sCollector","isInstructorFigureEnabled","isIRLaserOn","isKeyActive","isKindOf","isLaserOn","isLightOn","isLocalized","isManualFire","isMarkedForCollection","isMissionProfileNamespaceLoaded","isMultiplayer","isMultiplayerSolo","isNil","isNotEqualRef","isNotEqualTo","isNull","isNumber","isObjectHidden","isObjectRTD","isOnRoad","isPiPEnabled","isPlayer","isRealTime","isRemoteExecuted","isRemoteExecutedJIP","isSaving","isSensorTargetConfirmed","isServer","isShowing3DIcons","isSimpleObject","isSprint\ Allowed","isStaminaEnabled","isSteamMission","isSteamOverlayEnabled","isStreamFriendlyUIEnabled","isStressDamageEnabled","isText","isTouchingGround","isTurnedOut","isTutHintsEnabled","isUAVConnectable","isUAVConnected","isUIContext","isUniformAllowed","isVehicleCargo","isVehicleRadarOn","isVehicleSensorEnabled","isWalking","isWeaponDeployed","isWeaponRested","itemCargo","items","itemsWithMagazines","join","joinAs","joinAsSilent","joinSilent","joinString","kbAddDatabase","kbAddDatabaseTargets","k\ bAddTopic","kbHasTopic","kbReact","kbRemoveTopic","kbTell","kbWasSaid","keyImage","keyName","keys","knowsAbout","land","landAt","landResult","language","laserTarget","lbAdd","lbClear","lbColor","lbColorRight","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbPictureRight","lbSelection","lbSetColor","lbSetColorRight","lbSetCurSel","lbSetData","lbSetPicture","lbSetPictureColor","lbSetPictureColorDisabled","lbSetPictureColorSelected","lbSetPictureRight","lbSetPictureRightColor","lbSetPic\ tureRightColorDisabled","lbSetPictureRightColorSelected","lbSetSelectColor","lbSetSelectColorRight","lbSetSelected","lbSetText","lbSetTextRight","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortBy","lbSortByValue","lbText","lbTextRight","lbTooltip","lbValue","leader","leaderboardDeInit","leaderboardGetRows","leaderboardInit","leaderboardRequestRowsFriends","leaderboardRequestRowsGlobal","leaderboardRequestRowsGlobalAroundUser","leaderboardsRequestUploadScore","leaderboardsRequestUploadScoreK\ eepBest","leaderboardState","leaveVehicle","libraryCredits","libraryDisclaimers","lifeState","lightAttachObject","lightDetachObject","lightIsOn","lightnings","limitSpeed","linearConversion","lineIntersects","lineIntersectsObjs","lineIntersectsSurfaces","lineIntersectsWith","linkItem","list","listObjects","listRemoteTargets","listVehicleSensors","ln","lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbColorRight","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColu\ mnsPosition","lnbPicture","lnbPictureRight","lnbSetColor","lnbSetColorRight","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetPictureColor","lnbSetPictureColorRight","lnbSetPictureColorSelected","lnbSetPictureColorSelectedRight","lnbSetPictureRight","lnbSetText","lnbSetTextRight","lnbSetTooltip","lnbSetValue","lnbSize","lnbSort","lnbSortBy","lnbSortByValue","lnbText","lnbTextRight","lnbValue","load","loadAbs","loadBackpack","loadConfig","loadFile","loadGame","loadIdentity", "loadMagazine","loadOverlay","loadStatus","loadUniform","loadVest","localize","localNamespace","locationPosition","lock","lockCameraTo","lockCargo","lockDriver","locked","lockedCameraTo","lockedCargo","lockedDriver","lockedInventory","lockedTurret","lockIdentity","lockInventory","lockTurret","lockWp","log","logEntities","logNetwork","logNetworkTerminate","lookAt","lookAtPos","magazineCargo","magazines","magazinesAllTurrets","magazinesAmmo","magazinesAmmoCargo","magazinesAmmoFull","magazinesDetai\ l","magazinesDetailBackpack","magazinesDetailUniform","magazinesDetailVest","magazinesTurret","magazineTurretAmmo","mapAnimAdd","mapAnimClear","mapAnimCommit","mapAnimDone","mapCenterOnCamera","mapGridPosition","markAsFinishedOnSteam","markerAlpha","markerBrush","markerChannel","markerColor","markerDir","markerPolyline","markerPos","markerShadow","markerShape","markerSize","markerText","markerType","matrixMultiply","matrixTranspose","max","maxLoad","members","menuAction","menuAdd","menuChecked", "menuClear","menuCollapse","menuData","menuDelete","menuEnable","menuEnabled","menuExpand","menuHover","menuPicture","menuSetAction","menuSetCheck","menuSetData","menuSetPicture","menuSetShortcut","menuSetText","menuSetURL","menuSetValue","menuShortcut","menuShortcutText","menuSize","menuSort","menuText","menuURL","menuValue","merge","min","mineActive","mineDetectedBy","missileTarget","missileTargetPos","missionConfigFile","missionDifficulty","missionEnd","missionName","missionNameSource","missi\ onNamespace","missionProfileNamespace","missionStart","missionVersion","mod","modelToWorld","modelToWorldVisual","modelToWorldVisualWorld","modelToWorldWorld","modParams","moonIntensity","moonPhase","morale","move","move3DENCamera","moveInAny","moveInCargo","moveInCommander","moveInDriver","moveInGunner","moveInTurret","moveObjectToEnd","moveOut","moveTime","moveTo","moveToCompleted","moveToFailed","musicVolume","name","namedProperties","nameSound","nearEntities","nearestBuilding","nearestLocati\ on","nearestLocations","nearestLocationWithDubbing","nearestMines","nearestObject","nearestObjects","nearestTerrainObjects","nearObjects","nearObjectsReady","nearRoads","nearSupplies","nearTargets","needReload","needService","netId","netObjNull","newOverlay","nextMenuItemIndex","nextWeatherChange","nMenuItems","not","numberOfEnginesRTD","numberToDate","objectCurators","objectFromNetId","objectParent","objStatus","onBriefingGroup","onBriefingNotes","onBriefingPlan","onBriefingTeamSwitch","onComma\ ndModeChanged","onDoubleClick","onEachFrame","onGroupIconClick","onGroupIconOverEnter","onGroupIconOverLeave","onHCGroupSelectionChanged","onMapSingleClick","onPlayerConnected","onPlayerDisconnected","onPreloadFinished","onPreloadStarted","onShowNewObject","onTeamSwitch","openCuratorInterface","openDLCPage","openGPS","openMap","openSteamApp","openYoutubeVideo","or","orderGetIn","overcast","overcastForecast","owner","param","params","parseNumber","parseSimpleArray","parseText","parsingNamespace", "particlesQuality","periscopeElevation","pickWeaponPool","pitch","pixelGrid","pixelGridBase","pixelGridNoUIScale","pixelH","pixelW","playableSlotsNumber","playableUnits","playAction","playActionNow","player","playerRespawnTime","playerSide","playersNumber","playGesture","playMission","playMove","playMoveNow","playMusic","playScriptedMission","playSound","playSound3D","playSoundUI","pose","position","positionCameraToWorld","posScreenToWorld","posWorldToScreen","ppEffectAdjust","ppEffectCommit","p\ pEffectCommitted","ppEffectCreate","ppEffectDestroy","ppEffectEnable","ppEffectEnabled","ppEffectForceInNVG","precision","preloadCamera","preloadObject","preloadSound","preloadTitleObj","preloadTitleRsc","preprocessFile","preprocessFileLineNumbers","primaryWeapon","primaryWeaponItems","primaryWeaponMagazine","priority","processDiaryLink","productVersion","profileName","profileNamespace","profileNameSteam","progressLoadingScreen","progressPosition","progressSetPosition","publicVariable","publicVa\ riableClient","publicVariableServer","pushBack","pushBackUnique","putWeaponPool","queryItemsPool","queryMagazinePool","queryWeaponPool","rad","radioChannelAdd","radioChannelCreate","radioChannelInfo","radioChannelRemove","radioChannelSetCallSign","radioChannelSetLabel","radioEnabled","radioVolume","rain","rainbow","rainParams","random","rank","rankId","rating","rectangular","regexFind","regexMatch","regexReplace","registeredTasks","registerTask","reload","reloadEnabled","remoteControl","remoteEx\ ec","remoteExecCall","remoteExecutedOwner","remove3DENConnection","remove3DENEventHandler","remove3DENLayer","removeAction","removeAll3DENEventHandlers","removeAllActions","removeAllAssignedItems","removeAllBinocularItems","removeAllContainers","removeAllCuratorAddons","removeAllCuratorCameraAreas","removeAllCuratorEditingAreas","removeAllEventHandlers","removeAllHandgunItems","removeAllItems","removeAllItemsWithMagazines","removeAllMissionEventHandlers","removeAllMPEventHandlers","removeAllMusi\ cEventHandlers","removeAllOwnedMines","removeAllPrimaryWeaponItems","removeAllSecondaryWeaponItems","removeAllUserActionEventHandlers","removeAllWeapons","removeBackpack","removeBackpackGlobal","removeBinocularItem","removeCuratorAddons","removeCuratorCameraArea","removeCuratorEditableObjects","removeCuratorEditingArea","removeDiaryRecord","removeDiarySubject","removeDrawIcon","removeDrawLinks","removeEventHandler","removeFromRemainsCollector","removeGoggles","removeGroupIcon","removeHandgunItem", "removeHeadgear","removeItem","removeItemFromBackpack","removeItemFromUniform","removeItemFromVest","removeItems","removeMagazine","removeMagazineGlobal","removeMagazines","removeMagazinesTurret","removeMagazineTurret","removeMenuItem","removeMissionEventHandler","removeMPEventHandler","removeMusicEventHandler","removeOwnedMine","removePrimaryWeaponItem","removeSecondaryWeaponItem","removeSimpleTask","removeSwitchableUnit","removeTeamMember","removeUniform","removeUserActionEventHandler","remove\ Vest","removeWeapon","removeWeaponAttachmentCargo","removeWeaponCargo","removeWeaponGlobal","removeWeaponTurret","reportRemoteTarget","requiredVersion","resetCamShake","resetSubgroupDirection","resize","resources","respawnVehicle","restartEditorCamera","reveal","revealMine","reverse","reversedMouseY","roadAt","roadsConnectedTo","roleDescription","ropeAttachedObjects","ropeAttachedTo","ropeAttachEnabled","ropeAttachTo","ropeCreate","ropeCut","ropeDestroy","ropeDetach","ropeEndPosition","ropeLengt\ h","ropes","ropesAttachedTo","ropeSegments","ropeUnwind","ropeUnwound","rotorsForcesRTD","rotorsRpmRTD","round","runInitScript","safeZoneH","safeZoneW","safeZoneWAbs","safeZoneX","safeZoneXAbs","safeZoneY","save3DENInventory","saveGame","saveIdentity","saveJoysticks","saveMissionProfileNamespace","saveOverlay","saveProfileNamespace","saveStatus","saveVar","savingEnabled","say","say2D","say3D","scopeName","score","scoreSide","screenshot","screenToWorld","scriptDone","scriptName","scudState","seco\ ndaryWeapon","secondaryWeaponItems","secondaryWeaponMagazine","select","selectBestPlaces","selectDiarySubject","selectedEditorObjects","selectEditorObject","selectionNames","selectionPosition","selectionVectorDirAndUp","selectLeader","selectMax","selectMin","selectNoPlayer","selectPlayer","selectRandom","selectRandomWeighted","selectWeapon","selectWeaponTurret","sendAUMessage","sendSimpleCommand","sendTask","sendTaskResult","sendUDPMessage","sentencesEnabled","serverCommand","serverCommandAvaila\ ble","serverCommandExecutable","serverName","serverNamespace","serverTime","set","set3DENAttribute","set3DENAttributes","set3DENGrid","set3DENIconsVisible","set3DENLayer","set3DENLinesVisible","set3DENLogicType","set3DENMissionAttribute","set3DENMissionAttributes","set3DENModelsVisible","set3DENObjectType","set3DENSelected","setAccTime","setActualCollectiveRTD","setAirplaneThrottle","setAirportSide","setAmmo","setAmmoCargo","setAmmoOnPylon","setAnimSpeedCoef","setAperture","setApertureNew","setA\ rmoryPoints","setAttributes","setAutonomous","setBehaviour","setBehaviourStrong","setBleedingRemaining","setBrakesRTD","setCameraInterest","setCamShakeDefParams","setCamShakeParams","setCamUseTi","setCaptive","setCenterOfMass","setCollisionLight","setCombatBehaviour","setCombatMode","setCompassOscillation","setConvoySeparation","setCruiseControl","setCuratorCameraAreaCeiling","setCuratorCoef","setCuratorEditingAreaType","setCuratorWaypointCost","setCurrentChannel","setCurrentTask","setCurrentWay\ point","setCustomAimCoef","SetCustomMissionData","setCustomSoundController","setCustomWeightRTD","setDamage","setDammage","setDate","setDebriefingText","setDefaultCamera","setDestination","setDetailMapBlendPars","setDiaryRecordText","setDiarySubjectPicture","setDir","setDirection","setDrawIcon","setDriveOnPath","setDropInterval","setDynamicSimulationDistance","setDynamicSimulationDistanceCoef","setEditorMode","setEditorObjectScope","setEffectCondition","setEffectiveCommander","setEngineRpmRTD","\ setFace","setFaceanimation","setFatigue","setFeatureType","setFlagAnimationPhase","setFlagOwner","setFlagSide","setFlagTexture","setFog","setForceGeneratorRTD","setFormation","setFormationTask","setFormDir","setFriend","setFromEditor","setFSMVariable","setFuel","setFuelCargo","setGroupIcon","setGroupIconParams","setGroupIconsSelectable","setGroupIconsVisible","setGroupid","setGroupIdGlobal","setGroupOwner","setGusts","setHideBehind","setHit","setHitIndex","setHitPointDamage","setHorizonParallaxC\ oef","setHUDMovementLevels","setHumidity","setIdentity","setImportance","setInfoPanel","setLeader","setLightAmbient","setLightAttenuation","setLightBrightness","setLightColor","setLightConePars","setLightDayLight","setLightFlareMaxDistance","setLightFlareSize","setLightIntensity","setLightIR","setLightnings","setLightUseFlare","setLightVolumeShape","setLocalWindParams","setMagazineTurretAmmo","setMarkerAlpha","setMarkerAlphaLocal","setMarkerBrush","setMarkerBrushLocal","setMarkerColor","setMarke\ rColorLocal","setMarkerDir","setMarkerDirLocal","setMarkerPolyline","setMarkerPolylineLocal","setMarkerPos","setMarkerPosLocal","setMarkerShadow","setMarkerShadowLocal","setMarkerShape","setMarkerShapeLocal","setMarkerSize","setMarkerSizeLocal","setMarkerText","setMarkerTextLocal","setMarkerType","setMarkerTypeLocal","setMass","setMaxLoad","setMimic","setMissileTarget","setMissileTargetPos","setMousePosition","setMusicEffect","setMusicEventHandler","setName","setNameSound","setObjectArguments","\ setObjectMaterial","setObjectMaterialGlobal","setObjectProxy","setObjectScale","setObjectTexture","setObjectTextureGlobal","setObjectViewDistance","setOpticsMode","setOvercast","setOwner","setOxygenRemaining","setParticleCircle","setParticleClass","setParticleFire","setParticleParams","setParticleRandom","setPilotCameraDirection","setPilotCameraRotation","setPilotCameraTarget","setPilotLight","setPiPEffect","setPiPViewDistance","setPitch","setPlateNumber","setPlayable","setPlayerRespawnTime","se\ tPlayerVoNVolume","setPos","setPosASL","setPosASL2","setPosASLW","setPosATL","setPosition","setPosWorld","setPylonLoadout","setPylonsPriority","setRadioMsg","setRain","setRainbow","setRandomLip","setRank","setRectangular","setRepairCargo","setRotorBrakeRTD","setShadowDistance","setShotParents","setSide","setSimpleTaskAlwaysVisible","setSimpleTaskCustomData","setSimpleTaskDescription","setSimpleTaskDestination","setSimpleTaskTarget","setSimpleTaskType","setSimulWeatherLayers","setSize","setSkill", "setSlingLoad","setSoundEffect","setSpeaker","setSpeech","setSpeedMode","setStamina","setStaminaScheme","setStatValue","setSuppression","setSystemOfUnits","setTargetAge","setTaskMarkerOffset","setTaskResult","setTaskState","setTerrainGrid","setTerrainHeight","setText","setTimeMultiplier","setTiParameter","setTitleEffect","setTowParent","setTrafficDensity","setTrafficDistance","setTrafficGap","setTrafficSpeed","setTriggerActivation","setTriggerArea","setTriggerInterval","setTriggerStatements","se\ tTriggerText","setTriggerTimeout","setTriggerType","setTurretLimits","setTurretOpticsMode","setType","setUnconscious","setUnitAbility","setUnitCombatMode","setUnitFreefallHeight","setUnitLoadout","setUnitPos","setUnitPosWeak","setUnitRank","setUnitRecoilCoefficient","setUnitTrait","setUnloadInCombat","setUserActionText","setUserMFDText","setUserMFDValue","setVariable","setVectorDir","setVectorDirAndUp","setVectorUp","setVehicleAmmo","setVehicleAmmoDef","setVehicleArmor","setVehicleCargo","setVeh\ icleId","setVehicleLock","setVehiclePosition","setVehicleRadar","setVehicleReceiveRemoteTargets","setVehicleReportOwnPosition","setVehicleReportRemoteTargets","setVehicleTiPars","setVehicleVarName","setVelocity","setVelocityModelSpace","setVelocityTransformation","setViewDistance","setVisibleIfTreeCollapsed","setWantedRPMRTD","setWaves","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointForceBehaviour","setWaypointFormation","setWayp\ ointHousePosition","setWaypointLoiterAltitude","setWaypointLoiterRadius","setWaypointLoiterType","setWaypointName","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","setWeaponReloadingTime","setWeaponZeroing","setWind","setWindDir","setWindForce","setWindStr","setWingForceScaleRTD","setWPPos","show3DIcons","showChat","showCinemaBorder","showCommandingMenu","showCompass","showCuratorCompass","showGps","\ showHUD","showLegend","showMap","shownArtilleryComputer","shownChat","shownCompass","shownCuratorCompass","showNewEditorObject","shownGps","shownHUD","shownMap","shownPad","shownRadio","shownScoretable","shownSubtitles","shownUAVFeed","shownWarrant","shownWatch","showPad","showRadio","showScoretable","showSubtitles","showUAVFeed","showWarrant","showWatch","showWaypoint","showWaypoints","side","sideChat","sideRadio","simpleTasks","simulationEnabled","simulCloudDensity","simulCloudOcclusion","simu\ lInClouds","simulWeatherSync","sin","size","sizeOf","skill","skillFinal","skipTime","sleep","sliderPosition","sliderRange","sliderSetPosition","sliderSetRange","sliderSetSpeed","sliderSpeed","slingLoadAssistantShown","soldierMagazines","someAmmo","sort","soundVolume","spawn","speaker","speechVolume","speed","speedMode","splitString","sqrt","squadParams","stance","startLoadingScreen","stop","stopEngineRTD","stopped","str","sunOrMoon","supportInfo","suppressFor","surfaceIsWater","surfaceNormal","s\ urfaceTexture","surfaceType","swimInDepth","switchableUnits","switchAction","switchCamera","switchGesture","switchLight","switchMove","synchronizedObjects","synchronizedTriggers","synchronizedWaypoints","synchronizeObjectsAdd","synchronizeObjectsRemove","synchronizeTrigger","synchronizeWaypoint","systemChat","systemOfUnits","systemTime","systemTimeUTC","tan","targetKnowledge","targets","targetsAggregate","targetsQuery","taskAlwaysVisible","taskChildren","taskCompleted","taskCustomData","taskDesc\ ription","taskDestination","taskHint","taskMarkerOffset","taskName","taskParent","taskResult","taskState","taskType","teamMember","teamName","teams","teamSwitch","teamSwitchEnabled","teamType","terminate","terrainIntersect","terrainIntersectASL","terrainIntersectAtASL","text","textLog","textLogFormat","tg","time","timeMultiplier","titleCut","titleFadeOut","titleObj","titleRsc","titleText","toArray","toFixed","toLower","toLowerANSI","toString","toUpper","toUpperANSI","triggerActivated","triggerAc\ tivation","triggerAmmo","triggerArea","triggerAttachedVehicle","triggerAttachObject","triggerAttachVehicle","triggerDynamicSimulation","triggerInterval","triggerStatements","triggerText","triggerTimeout","triggerTimeoutCurrent","triggerType","trim","turretLocal","turretOwner","turretUnit","tvAdd","tvClear","tvCollapse","tvCollapseAll","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvExpandAll","tvIsSelected","tvPicture","tvPictureRight","tvSelection","tvSetColor","tvSetCurSel","tvSetData", "tvSetPicture","tvSetPictureColor","tvSetPictureColorDisabled","tvSetPictureColorSelected","tvSetPictureRight","tvSetPictureRightColor","tvSetPictureRightColorDisabled","tvSetPictureRightColorSelected","tvSetSelectColor","tvSetSelected","tvSetText","tvSetTooltip","tvSetValue","tvSort","tvSortAll","tvSortByValue","tvSortByValueAll","tvText","tvTooltip","tvValue","type","typeName","typeOf","UAVControl","uiNamespace","uiSleep","unassignCurator","unassignItem","unassignTeam","unassignVehicle","under\ water","uniform","uniformContainer","uniformItems","uniformMagazines","uniqueUnitItems","unitAddons","unitAimPosition","unitAimPositionVisual","unitBackpack","unitCombatMode","unitIsUAV","unitPos","unitReady","unitRecoilCoefficient","units","unitsBelowHeight","unitTurret","unlinkItem","unlockAchievement","unregisterTask","updateDrawIcon","updateMenuItem","updateObjectTree","useAIOperMapObstructionTest","useAISteeringComponent","useAudioTimeForMoves","userInputDisabled","values","vectorAdd","vect\ orCos","vectorCrossProduct","vectorDiff","vectorDir","vectorDirVisual","vectorDistance","vectorDistanceSqr","vectorDotProduct","vectorFromTo","vectorLinearConversion","vectorMagnitude","vectorMagnitudeSqr","vectorModelToWorld","vectorModelToWorldVisual","vectorMultiply","vectorNormalized","vectorUp","vectorUpVisual","vectorWorldToModel","vectorWorldToModelVisual","vehicle","vehicleCargoEnabled","vehicleChat","vehicleMoveInfo","vehicleRadio","vehicleReceiveRemoteTargets","vehicleReportOwnPosition", "vehicleReportRemoteTargets","vehicles","vehicleVarName","velocity","velocityModelSpace","verifySignature","vest","vestContainer","vestItems","vestMagazines","viewDistance","visibleCompass","visibleGps","visibleMap","visiblePosition","visiblePositionASL","visibleScoretable","visibleWatch","waves","waypointAttachedObject","waypointAttachedVehicle","waypointAttachObject","waypointAttachVehicle","waypointBehaviour","waypointCombatMode","waypointCompletionRadius","waypointDescription","waypointForce\ Behaviour","waypointFormation","waypointHousePosition","waypointLoiterAltitude","waypointLoiterRadius","waypointLoiterType","waypointName","waypointPosition","waypoints","waypointScript","waypointsEnabledUAV","waypointShow","waypointSpeed","waypointStatements","waypointTimeout","waypointTimeoutCurrent","waypointType","waypointVisible","weaponAccessories","weaponAccessoriesCargo","weaponCargo","weaponDirection","weaponInertia","weaponLowered","weaponReloadingTime","weapons","weaponsInfo","weapons\ Items","weaponsItemsCargo","weaponState","weaponsTurret","weightRTD","WFSideText","wind","windDir","windRTD","windStr","wingsForcesRTD","worldName","worldSize","worldToModel","worldToModelVisual","worldToScreen"],PREPROCESSOR={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:"define undef ifdef ifndef else endif include if",contains:[{begin:/\\\n/,relevance:0},hljs.inherit(STRINGS,{className:"string"}),{begin:/<[^\n>]*>/,end:/$/,illegal:"\\n"},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]}; return{name:"SQF",case_insensitive:!0,keywords:{keyword:KEYWORDS2,built_in:BUILT_IN,literal:LITERAL},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.NUMBER_MODE,VARIABLE,FUNCTION,STRINGS,PREPROCESSOR],illegal:[/\$[^a-fA-F0-9]/,/\w\$/,/\?/,/@/,/ \| /,/[a-zA-Z_]\./,/\:\=/,/\[\:/]}}return sqf_1=sqf2,sqf_1}var sql_1,hasRequiredSql;function requireSql(){if(hasRequiredSql)return sql_1;hasRequiredSql=1;function sql2(hljs){const regex=hljs.regex,COMMENT_MODE=hljs.COMMENT("--","$"),STRING={ scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},QUOTED_IDENTIFIER={begin:/"/,end:/"/,contains:[{match:/""/}]},LITERALS2=["true","false","unknown"],MULTI_WORD_TYPES=["double precision","large object","with timezone","without timezone"],TYPES2=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","var\ binary"],NON_RESERVED_WORDS=["add","asc","collation","desc","final","first","last","view"],RESERVED_WORDS=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character\ _length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type", "current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function", "fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","loc\ altimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_ra\ nk","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","\ seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","\ treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],RESERVED_FUNCTIONS=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","el\ ement","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_\ number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],POSSIBLE_WITHOUT_PARENS=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_times\ tamp","localtimestamp"],COMBOS=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],FUNCTIONS=RESERVED_FUNCTIONS,KEYWORDS2=[...RESERVED_WORDS,...NON_RESERVED_WORDS].filter(keyword2=>!RESERVED_FUNCTIONS.includes(keyword2)),VARIABLE={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},OPERATOR={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/, relevance:0},FUNCTION_CALL={match:regex.concat(/\b/,regex.either(...FUNCTIONS),/\s*\(/),relevance:0,keywords:{built_in:FUNCTIONS}};function kws_to_regex(list2){return regex.concat(/\b/,regex.either(...list2.map(kw=>kw.replace(/\s+/,"\\s+"))),/\b/)}const MULTI_WORD_KEYWORDS={scope:"keyword",match:kws_to_regex(COMBOS),relevance:0};function reduceRelevancy(list2,{exceptions,when}={}){const qualifyFn=when;return exceptions=exceptions||[],list2.map(item=>item.match(/\|\d+$/)||exceptions.includes(item)? item:qualifyFn(item)?`${item}|0`:item)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:reduceRelevancy(KEYWORDS2,{when:x=>x.length<3}),literal:LITERALS2,type:TYPES2,built_in:POSSIBLE_WITHOUT_PARENS},contains:[{scope:"type",match:kws_to_regex(MULTI_WORD_TYPES)},MULTI_WORD_KEYWORDS,FUNCTION_CALL,VARIABLE,STRING,QUOTED_IDENTIFIER,hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE,COMMENT_MODE,OPERATOR]}}return sql_1=sql2,sql_1}var stan_1,hasRequiredStan;function requireStan(){ if(hasRequiredStan)return stan_1;hasRequiredStan=1;function stan2(hljs){const regex=hljs.regex,BLOCKS=["functions","model","data","parameters","quantities","transformed","generated"],STATEMENTS=["for","in","if","else","while","break","continue","return"],TYPES2=["array","tuple","complex","int","real","vector","complex_vector","ordered","positive_ordered","simplex","unit_vector","row_vector","complex_row_vector","matrix","complex_matrix","cholesky_factor_corr|10","cholesky_factor_cov|10","corr_ma\ trix|10","cov_matrix|10","void"],FUNCTIONS=["abs","acos","acosh","add_diag","algebra_solver","algebra_solver_newton","append_array","append_col","append_row","asin","asinh","atan","atan2","atanh","bessel_first_kind","bessel_second_kind","binary_log_loss","block","cbrt","ceil","chol2inv","cholesky_decompose","choose","col","cols","columns_dot_product","columns_dot_self","complex_schur_decompose","complex_schur_decompose_t","complex_schur_decompose_u","conj","cos","cosh","cov_exp_quad","crossprod", "csr_extract","csr_extract_u","csr_extract_v","csr_extract_w","csr_matrix_times_vector","csr_to_dense_matrix","cumulative_sum","dae","dae_tol","determinant","diag_matrix","diagonal","diag_post_multiply","diag_pre_multiply","digamma","dims","distance","dot_product","dot_self","eigendecompose","eigendecompose_sym","eigenvalues","eigenvalues_sym","eigenvectors","eigenvectors_sym","erf","erfc","exp","exp2","expm1","falling_factorial","fdim","fft","fft2","floor","fma","fmax","fmin","fmod","gamma_p","\ gamma_q","generalized_inverse","get_imag","get_real","head","hmm_hidden_state_prob","hmm_marginal","hypot","identity_matrix","inc_beta","integrate_1d","integrate_ode","integrate_ode_adams","integrate_ode_bdf","integrate_ode_rk45","int_step","inv","inv_cloglog","inv_erfc","inverse","inverse_spd","inv_fft","inv_fft2","inv_inc_beta","inv_logit","inv_Phi","inv_sqrt","inv_square","is_inf","is_nan","lambert_w0","lambert_wm1","lbeta","lchoose","ldexp","lgamma","linspaced_array","linspaced_int_array","l\ inspaced_row_vector","linspaced_vector","lmgamma","lmultiply","log","log1m","log1m_exp","log1m_inv_logit","log1p","log1p_exp","log_determinant","log_diff_exp","log_falling_factorial","log_inv_logit","log_inv_logit_diff","logit","log_mix","log_modified_bessel_first_kind","log_rising_factorial","log_softmax","log_sum_exp","machine_precision","map_rect","matrix_exp","matrix_exp_multiply","matrix_power","max","mdivide_left_spd","mdivide_left_tri_low","mdivide_right_spd","mdivide_right_tri_low","mean", "min","modified_bessel_first_kind","modified_bessel_second_kind","multiply_lower_tri_self_transpose","negative_infinity","norm","norm1","norm2","not_a_number","num_elements","ode_adams","ode_adams_tol","ode_adjoint_tol_ctl","ode_bdf","ode_bdf_tol","ode_ckrk","ode_ckrk_tol","ode_rk45","ode_rk45_tol","one_hot_array","one_hot_int_array","one_hot_row_vector","one_hot_vector","ones_array","ones_int_array","ones_row_vector","ones_vector","owens_t","Phi","Phi_approx","polar","positive_infinity","pow","\ print","prod","proj","qr","qr_Q","qr_R","qr_thin","qr_thin_Q","qr_thin_R","quad_form","quad_form_diag","quad_form_sym","quantile","rank","reduce_sum","reject","rep_array","rep_matrix","rep_row_vector","rep_vector","reverse","rising_factorial","round","row","rows","rows_dot_product","rows_dot_self","scale_matrix_exp_multiply","sd","segment","sin","singular_values","sinh","size","softmax","sort_asc","sort_desc","sort_indices_asc","sort_indices_desc","sqrt","square","squared_distance","step","sub_c\ ol","sub_row","sum","svd","svd_U","svd_V","symmetrize_from_lower_tri","tail","tan","tanh","target","tcrossprod","tgamma","to_array_1d","to_array_2d","to_complex","to_int","to_matrix","to_row_vector","to_vector","trace","trace_gen_quad_form","trace_quad_form","trigamma","trunc","uniform_simplex","variance","zeros_array","zeros_int_array","zeros_row_vector"],DISTRIBUTIONS=["bernoulli","bernoulli_logit","bernoulli_logit_glm","beta","beta_binomial","beta_proportion","binomial","binomial_logit","cate\ gorical","categorical_logit","categorical_logit_glm","cauchy","chi_square","dirichlet","discrete_range","double_exponential","exp_mod_normal","exponential","frechet","gamma","gaussian_dlm_obs","gumbel","hmm_latent","hypergeometric","inv_chi_square","inv_gamma","inv_wishart","inv_wishart_cholesky","lkj_corr","lkj_corr_cholesky","logistic","loglogistic","lognormal","multi_gp","multi_gp_cholesky","multinomial","multinomial_logit","multi_normal","multi_normal_cholesky","multi_normal_prec","multi_stu\ dent_cholesky_t","multi_student_t","multi_student_t_cholesky","neg_binomial","neg_binomial_2","neg_binomial_2_log","neg_binomial_2_log_glm","normal","normal_id_glm","ordered_logistic","ordered_logistic_glm","ordered_probit","pareto","pareto_type_2","poisson","poisson_log","poisson_log_glm","rayleigh","scaled_inv_chi_square","skew_double_exponential","skew_normal","std_normal","std_normal_log","student_t","uniform","von_mises","weibull","wiener","wishart","wishart_cholesky"],BLOCK_COMMENT=hljs.COMMENT( /\/\*/,/\*\//,{relevance:0,contains:[{scope:"doctag",match:/@(return|param)/}]}),INCLUDE={scope:"meta",begin:/#include\b/,end:/$/,contains:[{match:/[a-z][a-z-._]+/,scope:"string"},hljs.C_LINE_COMMENT_MODE]},RANGE_CONSTRAINTS=["lower","upper","offset","multiplier"];return{name:"Stan",aliases:["stanfuncs"],keywords:{$pattern:hljs.IDENT_RE,title:BLOCKS,type:TYPES2,keyword:STATEMENTS,built_in:FUNCTIONS},contains:[hljs.C_LINE_COMMENT_MODE,INCLUDE,hljs.HASH_COMMENT_MODE,BLOCK_COMMENT,{scope:"built_in", match:/\s(pi|e|sqrt2|log2|log10)(?=\()/,relevance:0},{match:regex.concat(/[<,]\s*/,regex.either(...RANGE_CONSTRAINTS),/\s*=/),keywords:RANGE_CONSTRAINTS},{scope:"keyword",match:/\btarget(?=\s*\+=)/},{match:[/~\s*/,regex.either(...DISTRIBUTIONS),/(?:\(\))/,/\s*T(?=\s*\[)/],scope:{2:"built_in",4:"keyword"}},{scope:"built_in",keywords:DISTRIBUTIONS,begin:regex.concat(/\w*/,regex.either(...DISTRIBUTIONS),/(_lpdf|_lupdf|_lpmf|_cdf|_lcdf|_lccdf|_qf)(?=\s*[\(.*\)])/)},{begin:[/~/,/\s*/,regex.concat(regex. either(...DISTRIBUTIONS),/(?=\s*[\(.*\)])/)],scope:{3:"built_in"}},{begin:[/~/,/\s*\w+(?=\s*[\(.*\)])/,"(?!.*/\b("+regex.either(...DISTRIBUTIONS)+")\b)"],scope:{2:"title.function"}},{scope:"title.function",begin:/\w*(_lpdf|_lupdf|_lpmf|_cdf|_lcdf|_lccdf|_qf)(?=\s*[\(.*\)])/},{scope:"number",match:regex.concat(/(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)/,/(?:[eE][+-]?\d+(?:_\d+)*)?i?(?!\w)/),relevance:0},{scope:"string",begin:/"/,end:/"/}]}}return stan_1=stan2,stan_1}var stata_1, hasRequiredStata;function requireStata(){if(hasRequiredStata)return stata_1;hasRequiredStata=1;function stata2(hljs){return{name:"Stata",aliases:["do","ado"],case_insensitive:!0,keywords:"if else in foreach for forv forva forval forvalu forvalue forvalues by bys bysort xi quietly qui capture about ac ac_7 acprplot acprplot_7 adjust ado adopath adoupdate alpha ameans an ano anov anova anova_estat anova_terms anovadef aorder ap app appe appen append arch arch_dr arch_estat arch_p archlm areg areg_\ p args arima arima_dr arima_estat arima_p as asmprobit asmprobit_estat asmprobit_lf asmprobit_mfx__dlg asmprobit_p ass asse asser assert avplot avplot_7 avplots avplots_7 bcskew0 bgodfrey bias binreg bip0_lf biplot bipp_lf bipr_lf bipr_p biprobit bitest bitesti bitowt blogit bmemsize boot bootsamp bootstrap bootstrap_8 boxco_l boxco_p boxcox boxcox_6 boxcox_p bprobit br break brier bro brow brows browse brr brrstat bs bs_7 bsampl_w bsample bsample_7 bsqreg bstat bstat_7 bstat_8 bstrap bstrap_7 b\ ubble bubbleplot ca ca_estat ca_p cabiplot camat canon canon_8 canon_8_p canon_estat canon_p cap caprojection capt captu captur capture cat cc cchart cchart_7 cci cd censobs_table centile cf char chdir checkdlgfiles checkestimationsample checkhlpfiles checksum chelp ci cii cl class classutil clear cli clis clist clo clog clog_lf clog_p clogi clogi_sw clogit clogit_lf clogit_p clogitp clogl_sw cloglog clonevar clslistarray cluster cluster_measures cluster_stop cluster_tree cluster_tree_8 clusterm\ at cmdlog cnr cnre cnreg cnreg_p cnreg_sw cnsreg codebook collaps4 collapse colormult_nb colormult_nw compare compress conf confi confir confirm conren cons const constr constra constrai constrain constraint continue contract copy copyright copysource cor corc corr corr2data corr_anti corr_kmo corr_smc corre correl correla correlat correlate corrgram cou coun count cox cox_p cox_sw coxbase coxhaz coxvar cprplot cprplot_7 crc cret cretu cretur creturn cross cs cscript cscript_log csi ct ct_is cts\ et ctst_5 ctst_st cttost cumsp cumsp_7 cumul cusum cusum_7 cutil d|0 datasig datasign datasigna datasignat datasignatu datasignatur datasignature datetof db dbeta de dec deco decod decode deff des desc descr descri describ describe destring dfbeta dfgls dfuller di di_g dir dirstats dis discard disp disp_res disp_s displ displa display distinct do doe doed doedi doedit dotplot dotplot_7 dprobit drawnorm drop ds ds_util dstdize duplicates durbina dwstat dydx e|0 ed edi edit egen eivreg emdef en en\ c enco encod encode eq erase ereg ereg_lf ereg_p ereg_sw ereghet ereghet_glf ereghet_glf_sh ereghet_gp ereghet_ilf ereghet_ilf_sh ereghet_ip eret eretu eretur ereturn err erro error esize est est_cfexist est_cfname est_clickable est_expand est_hold est_table est_unhold est_unholdok estat estat_default estat_summ estat_vce_only esti estimates etodow etof etomdy ex exi exit expand expandcl fac fact facto factor factor_estat factor_p factor_pca_rotated factor_rotate factormat fcast fcast_compute fc\ ast_graph fdades fdadesc fdadescr fdadescri fdadescrib fdadescribe fdasav fdasave fdause fh_st file open file read file close file filefilter fillin find_hlp_file findfile findit findit_7 fit fl fli flis flist for5_0 forest forestplot form forma format fpredict frac_154 frac_adj frac_chk frac_cox frac_ddp frac_dis frac_dv frac_in frac_mun frac_pp frac_pq frac_pv frac_wgt frac_xo fracgen fracplot fracplot_7 fracpoly fracpred fron_ex fron_hn fron_p fron_tn fron_tn2 frontier ftodate ftoe ftomdy fto\ wdate funnel funnelplot g|0 gamhet_glf gamhet_gp gamhet_ilf gamhet_ip gamma gamma_d2 gamma_p gamma_sw gammahet gdi_hexagon gdi_spokes ge gen gene gener genera generat generate genrank genstd genvmean gettoken gl gladder gladder_7 glim_l01 glim_l02 glim_l03 glim_l04 glim_l05 glim_l06 glim_l07 glim_l08 glim_l09 glim_l10 glim_l11 glim_l12 glim_lf glim_mu glim_nw1 glim_nw2 glim_nw3 glim_p glim_v1 glim_v2 glim_v3 glim_v4 glim_v5 glim_v6 glim_v7 glm glm_6 glm_p glm_sw glmpred glo glob globa global glo\ git glogit_8 glogit_p gmeans gnbre_lf gnbreg gnbreg_5 gnbreg_p gomp_lf gompe_sw gomper_p gompertz gompertzhet gomphet_glf gomphet_glf_sh gomphet_gp gomphet_ilf gomphet_ilf_sh gomphet_ip gphdot gphpen gphprint gprefs gprobi_p gprobit gprobit_8 gr gr7 gr_copy gr_current gr_db gr_describe gr_dir gr_draw gr_draw_replay gr_drop gr_edit gr_editviewopts gr_example gr_example2 gr_export gr_print gr_qscheme gr_query gr_read gr_rename gr_replay gr_save gr_set gr_setscheme gr_table gr_undo gr_use graph gra\ ph7 grebar greigen greigen_7 greigen_8 grmeanby grmeanby_7 gs_fileinfo gs_filetype gs_graphinfo gs_stat gsort gwood h|0 hadimvo hareg hausman haver he heck_d2 heckma_p heckman heckp_lf heckpr_p heckprob hel help hereg hetpr_lf hetpr_p hetprob hettest hexdump hilite hist hist_7 histogram hlogit hlu hmeans hotel hotelling hprobit hreg hsearch icd9 icd9_ff icd9p iis impute imtest inbase include inf infi infil infile infix inp inpu input ins insheet insp inspe inspec inspect integ inten intreg intre\ g_7 intreg_p intrg2_ll intrg_ll intrg_ll2 ipolate iqreg ir irf irf_create irfm iri is_svy is_svysum isid istdize ivprob_1_lf ivprob_lf ivprobit ivprobit_p ivreg ivreg_footnote ivtob_1_lf ivtob_lf ivtobit ivtobit_p jackknife jacknife jknife jknife_6 jknife_8 jkstat joinby kalarma1 kap kap_3 kapmeier kappa kapwgt kdensity kdensity_7 keep ksm ksmirnov ktau kwallis l|0 la lab labbe labbeplot labe label labelbook ladder levels levelsof leverage lfit lfit_p li lincom line linktest lis list lloghet_glf\ lloghet_glf_sh lloghet_gp lloghet_ilf lloghet_ilf_sh lloghet_ip llogi_sw llogis_p llogist llogistic llogistichet lnorm_lf lnorm_sw lnorma_p lnormal lnormalhet lnormhet_glf lnormhet_glf_sh lnormhet_gp lnormhet_ilf lnormhet_ilf_sh lnormhet_ip lnskew0 loadingplot loc loca local log logi logis_lf logistic logistic_p logit logit_estat logit_p loglogs logrank loneway lookfor lookup lowess lowess_7 lpredict lrecomp lroc lroc_7 lrtest ls lsens lsens_7 lsens_x lstat ltable ltable_7 ltriang lv lvr2plot l\ vr2plot_7 m|0 ma mac macr macro makecns man manova manova_estat manova_p manovatest mantel mark markin markout marksample mat mat_capp mat_order mat_put_rr mat_rapp mata mata_clear mata_describe mata_drop mata_matdescribe mata_matsave mata_matuse mata_memory mata_mlib mata_mosave mata_rename mata_which matalabel matcproc matlist matname matr matri matrix matrix_input__dlg matstrik mcc mcci md0_ md1_ md1debug_ md2_ md2debug_ mds mds_estat mds_p mdsconfig mdslong mdsmat mdsshepard mdytoe mdytof me\ _derd mean means median memory memsize menl meqparse mer merg merge meta mfp mfx mhelp mhodds minbound mixed_ll mixed_ll_reparm mkassert mkdir mkmat mkspline ml ml_5 ml_adjs ml_bhhhs ml_c_d ml_check ml_clear ml_cnt ml_debug ml_defd ml_e0 ml_e0_bfgs ml_e0_cycle ml_e0_dfp ml_e0i ml_e1 ml_e1_bfgs ml_e1_bhhh ml_e1_cycle ml_e1_dfp ml_e2 ml_e2_cycle ml_ebfg0 ml_ebfr0 ml_ebfr1 ml_ebh0q ml_ebhh0 ml_ebhr0 ml_ebr0i ml_ecr0i ml_edfp0 ml_edfr0 ml_edfr1 ml_edr0i ml_eds ml_eer0i ml_egr0i ml_elf ml_elf_bfgs ml\ _elf_bhhh ml_elf_cycle ml_elf_dfp ml_elfi ml_elfs ml_enr0i ml_enrr0 ml_erdu0 ml_erdu0_bfgs ml_erdu0_bhhh ml_erdu0_bhhhq ml_erdu0_cycle ml_erdu0_dfp ml_erdu0_nrbfgs ml_exde ml_footnote ml_geqnr ml_grad0 ml_graph ml_hbhhh ml_hd0 ml_hold ml_init ml_inv ml_log ml_max ml_mlout ml_mlout_8 ml_model ml_nb0 ml_opt ml_p ml_plot ml_query ml_rdgrd ml_repor ml_s_e ml_score ml_searc ml_technique ml_unhold mleval mlf_ mlmatbysum mlmatsum mlog mlogi mlogit mlogit_footnote mlogit_p mlopts mlsum mlvecsum mnl0_ mo\ r more mov move mprobit mprobit_lf mprobit_p mrdu0_ mrdu1_ mvdecode mvencode mvreg mvreg_estat n|0 nbreg nbreg_al nbreg_lf nbreg_p nbreg_sw nestreg net newey newey_7 newey_p news nl nl_7 nl_9 nl_9_p nl_p nl_p_7 nlcom nlcom_p nlexp2 nlexp2_7 nlexp2a nlexp2a_7 nlexp3 nlexp3_7 nlgom3 nlgom3_7 nlgom4 nlgom4_7 nlinit nllog3 nllog3_7 nllog4 nllog4_7 nlog_rd nlogit nlogit_p nlogitgen nlogittree nlpred no nobreak noi nois noisi noisil noisily note notes notes_dlg nptrend numlabel numlist odbc old_ver ol\ o olog ologi ologi_sw ologit ologit_p ologitp on one onew onewa oneway op_colnm op_comp op_diff op_inv op_str opr opro oprob oprob_sw oprobi oprobi_p oprobit oprobitp opts_exclusive order orthog orthpoly ou out outf outfi outfil outfile outs outsh outshe outshee outsheet ovtest pac pac_7 palette parse parse_dissim pause pca pca_8 pca_display pca_estat pca_p pca_rotate pcamat pchart pchart_7 pchi pchi_7 pcorr pctile pentium pergram pergram_7 permute permute_8 personal peto_st pkcollapse pkcross p\ kequiv pkexamine pkexamine_7 pkshape pksumm pksumm_7 pl plo plot plugin pnorm pnorm_7 poisgof poiss_lf poiss_sw poisso_p poisson poisson_estat post postclose postfile postutil pperron pr prais prais_e prais_e2 prais_p predict predictnl preserve print pro prob probi probit probit_estat probit_p proc_time procoverlay procrustes procrustes_estat procrustes_p profiler prog progr progra program prop proportion prtest prtesti pwcorr pwd q\\s qby qbys qchi qchi_7 qladder qladder_7 qnorm qnorm_7 qqplot q\ qplot_7 qreg qreg_c qreg_p qreg_sw qu quadchk quantile quantile_7 que quer query range ranksum ratio rchart rchart_7 rcof recast reclink recode reg reg3 reg3_p regdw regr regre regre_p2 regres regres_p regress regress_estat regriv_p remap ren rena renam rename renpfix repeat replace report reshape restore ret retu retur return rm rmdir robvar roccomp roccomp_7 roccomp_8 rocf_lf rocfit rocfit_8 rocgold rocplot rocplot_7 roctab roctab_7 rolling rologit rologit_p rot rota rotat rotate rotatemat rre\ g rreg_p ru run runtest rvfplot rvfplot_7 rvpplot rvpplot_7 sa safesum sample sampsi sav save savedresults saveold sc sca scal scala scalar scatter scm_mine sco scob_lf scob_p scobi_sw scobit scor score scoreplot scoreplot_help scree screeplot screeplot_help sdtest sdtesti se search separate seperate serrbar serrbar_7 serset set set_defaults sfrancia sh she shel shell shewhart shewhart_7 signestimationsample signrank signtest simul simul_7 simulate simulate_8 sktest sleep slogit slogit_d2 slogit\ _p smooth snapspan so sor sort spearman spikeplot spikeplot_7 spikeplt spline_x split sqreg sqreg_p sret sretu sretur sreturn ssc st st_ct st_hc st_hcd st_hcd_sh st_is st_issys st_note st_promo st_set st_show st_smpl st_subid stack statsby statsby_8 stbase stci stci_7 stcox stcox_estat stcox_fr stcox_fr_ll stcox_p stcox_sw stcoxkm stcoxkm_7 stcstat stcurv stcurve stcurve_7 stdes stem stepwise stereg stfill stgen stir stjoin stmc stmh stphplot stphplot_7 stphtest stphtest_7 stptime strate strate_\ 7 streg streg_sw streset sts sts_7 stset stsplit stsum sttocc sttoct stvary stweib su suest suest_8 sum summ summa summar summari summariz summarize sunflower sureg survcurv survsum svar svar_p svmat svy svy_disp svy_dreg svy_est svy_est_7 svy_estat svy_get svy_gnbreg_p svy_head svy_header svy_heckman_p svy_heckprob_p svy_intreg_p svy_ivreg_p svy_logistic_p svy_logit_p svy_mlogit_p svy_nbreg_p svy_ologit_p svy_oprobit_p svy_poisson_p svy_probit_p svy_regress_p svy_sub svy_sub_7 svy_x svy_x_7 svy\ _x_p svydes svydes_8 svygen svygnbreg svyheckman svyheckprob svyintreg svyintreg_7 svyintrg svyivreg svylc svylog_p svylogit svymarkout svymarkout_8 svymean svymlog svymlogit svynbreg svyolog svyologit svyoprob svyoprobit svyopts svypois svypois_7 svypoisson svyprobit svyprobt svyprop svyprop_7 svyratio svyreg svyreg_p svyregress svyset svyset_7 svyset_8 svytab svytab_7 svytest svytotal sw sw_8 swcnreg swcox swereg swilk swlogis swlogit swologit swoprbt swpois swprobit swqreg swtobit swweib symm\ etry symmi symplot symplot_7 syntax sysdescribe sysdir sysuse szroeter ta tab tab1 tab2 tab_or tabd tabdi tabdis tabdisp tabi table tabodds tabodds_7 tabstat tabu tabul tabula tabulat tabulate te tempfile tempname tempvar tes test testnl testparm teststd tetrachoric time_it timer tis tob tobi tobit tobit_p tobit_sw token tokeni tokeniz tokenize tostring total translate translator transmap treat_ll treatr_p treatreg trim trimfill trnb_cons trnb_mean trpoiss_d2 trunc_ll truncr_p truncreg tsappend \ tset tsfill tsline tsline_ex tsreport tsrevar tsrline tsset tssmooth tsunab ttest ttesti tut_chk tut_wait tutorial tw tware_st two twoway twoway__fpfit_serset twoway__function_gen twoway__histogram_gen twoway__ipoint_serset twoway__ipoints_serset twoway__kdensity_gen twoway__lfit_serset twoway__normgen_gen twoway__pci_serset twoway__qfit_serset twoway__scatteri_serset twoway__sunflower_gen twoway_ksm_serset ty typ type typeof u|0 unab unabbrev unabcmd update us use uselabel var var_mkcompanion v\ ar_p varbasic varfcast vargranger varirf varirf_add varirf_cgraph varirf_create varirf_ctable varirf_describe varirf_dir varirf_drop varirf_erase varirf_graph varirf_ograph varirf_rename varirf_set varirf_table varlist varlmar varnorm varsoc varstable varstable_w varstable_w2 varwle vce vec vec_fevd vec_mkphi vec_p vec_p_w vecirf_create veclmar veclmar_w vecnorm vecnorm_w vecrank vecstable verinst vers versi versio version view viewsource vif vwls wdatetof webdescribe webseek webuse weib1_lf wei\ b2_lf weib_lf weib_lf0 weibhet_glf weibhet_glf_sh weibhet_glfa weibhet_glfa_sh weibhet_gp weibhet_ilf weibhet_ilf_sh weibhet_ilfa weibhet_ilfa_sh weibhet_ip weibu_sw weibul_p weibull weibull_c weibull_s weibullhet wh whelp whi which whil while wilc_st wilcoxon win wind windo window winexec wntestb wntestb_7 wntestq xchart xchart_7 xcorr xcorr_7 xi xi_6 xmlsav xmlsave xmluse xpose xsh xshe xshel xshell xt_iis xt_tis xtab_p xtabond xtbin_p xtclog xtcloglog xtcloglog_8 xtcloglog_d2 xtcloglog_pa_p x\ tcloglog_re_p xtcnt_p xtcorr xtdata xtdes xtfront_p xtfrontier xtgee xtgee_elink xtgee_estat xtgee_makeivar xtgee_p xtgee_plink xtgls xtgls_p xthaus xthausman xtht_p xthtaylor xtile xtint_p xtintreg xtintreg_8 xtintreg_d2 xtintreg_p xtivp_1 xtivp_2 xtivreg xtline xtline_ex xtlogit xtlogit_8 xtlogit_d2 xtlogit_fe_p xtlogit_pa_p xtlogit_re_p xtmixed xtmixed_estat xtmixed_p xtnb_fe xtnb_lf xtnbreg xtnbreg_pa_p xtnbreg_refe_p xtpcse xtpcse_p xtpois xtpoisson xtpoisson_d2 xtpoisson_pa_p xtpoisson_ref\ e_p xtpred xtprobit xtprobit_8 xtprobit_d2 xtprobit_re_p xtps_fe xtps_lf xtps_ren xtps_ren_8 xtrar_p xtrc xtrc_p xtrchh xtrefe_p xtreg xtreg_be xtreg_fe xtreg_ml xtreg_pa_p xtreg_re xtregar xtrere_p xtset xtsf_ll xtsf_llti xtsum xttab xttest0 xttobit xttobit_8 xttobit_p xttrans yx yxview__barlike_draw yxview_area_draw yxview_bar_draw yxview_dot_draw yxview_dropline_draw yxview_function_draw yxview_iarrow_draw yxview_ilabels_draw yxview_normal_draw yxview_pcarrow_draw yxview_pcbarrow_draw yxview_\ pccapsym_draw yxview_pcscatter_draw yxview_pcspike_draw yxview_rarea_draw yxview_rbar_draw yxview_rbarm_draw yxview_rcap_draw yxview_rcapsym_draw yxview_rconnected_draw yxview_rline_draw yxview_rscatter_draw yxview_rspike_draw yxview_spike_draw yxview_sunflower_draw zap_s zinb zinb_llf zinb_plf zip zip_llf zip_p zip_plf zt_ct_5 zt_hc_5 zt_hcd_5 zt_is_5 zt_iss_5 zt_sho_5 zt_smp_5 ztbase_5 ztcox_5 ztdes_5 ztereg_5 ztfill_5 ztgen_5 ztir_5 ztjoin_5 ztnb ztnb_p ztp ztp_p zts_5 ztset_5 ztspli_5 ztsum_\ 5 zttoct_5 ztvary_5 ztweib_5",contains:[{className:"symbol",begin:/`[a-zA-Z0-9_]+'/},{className:"variable",begin:/\$\{?[a-zA-Z0-9_]+\}?/,relevance:0},{className:"string",variants:[{begin:`\`"[^\r ]*?"'`},{begin:`"[^\r "]*"`}]},{className:"built_in",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|\ invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlo\ ng|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\()"}]},hljs.COMMENT("^[ ]*\\*.*\ $",!1),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]}}return stata_1=stata2,stata_1}var step21_1,hasRequiredStep21;function requireStep21(){if(hasRequiredStep21)return step21_1;hasRequiredStep21=1;function step212(hljs){return{name:"STEP Part 21",aliases:["p21","step","stp"],case_insensitive:!0,keywords:{$pattern:"[A-Z_][A-Z0-9_.]*",keyword:["HEADER","ENDSEC","DATA"]},contains:[{className:"meta",begin:"ISO-10303-21;",relevance:10},{className:"meta",begin:"END-ISO-10303-21;",relevance:10},hljs. C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT("/\\*\\*!","\\*/"),hljs.C_NUMBER_MODE,hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}]}}return step21_1=step212,step21_1}var stylus_1,hasRequiredStylus;function requireStylus(){if(hasRequiredStylus)return stylus_1;hasRequiredStylus=1;const MODES2=hljs=>({IMPORTANT:{scope:"meta", begin:"!important"},BLOCK_COMMENT:hljs.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:hljs.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0}, CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),HTML_TAGS2=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp", "section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],SVG_TAGS2=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","ci\ rcle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],TAGS2=[...HTML_TAGS2,...SVG_TAGS2],MEDIA_FEATURES2=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","pref\ ers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),PSEUDO_CLASSES2=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of\ -type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),PSEUDO_ELEMENTS2=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection", "slotted","spelling-error"].sort().reverse(),ATTRIBUTES2=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filte\ r","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block\ -start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline\ -end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color", "border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","colu\ mn-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display", "dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthe\ sis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end", "grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start", "isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-borde\ r","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","n\ one","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavio\ r-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize", "rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll\ -padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-\ linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-over\ flow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeli\ ne","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function stylus2(hljs){const modes2=MODES2(hljs),AT_MODIFIERS="and or not only",VARIABLE={className:"variable", begin:"\\$"+hljs.IDENT_RE},AT_KEYWORDS=["charset","css","debug","extend","font-face","for","import","include","keyframes","media","mixin","page","warn","while"],LOOKAHEAD_TAG_END="(?=[.\\s\\n[:,(])";return{name:"Stylus",aliases:["styl"],case_insensitive:!1,keywords:"if else for in",illegal:"("+["\\?","(\\bReturn\\b)","(\\bEnd\\b)","(\\bend\\b)","(\\bdef\\b)",";","#\\s","\\*\\s","===\\s","\\|","%"].join("|")+")",contains:[hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,hljs.C_LINE_COMMENT_MODE,hljs. C_BLOCK_COMMENT_MODE,modes2.HEXCOLOR,{begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"+LOOKAHEAD_TAG_END,className:"selector-class"},{begin:"#[a-zA-Z][a-zA-Z0-9_-]*"+LOOKAHEAD_TAG_END,className:"selector-id"},{begin:"\\b("+TAGS2.join("|")+")"+LOOKAHEAD_TAG_END,className:"selector-tag"},{className:"selector-pseudo",begin:"&?:("+PSEUDO_CLASSES2.join("|")+")"+LOOKAHEAD_TAG_END},{className:"selector-pseudo",begin:"&?:(:)?("+PSEUDO_ELEMENTS2.join("|")+")"+LOOKAHEAD_TAG_END},modes2.ATTRIBUTE_SELECTOR_MODE,{className:"\ keyword",begin:/@media/,starts:{end:/[{;}]/,keywords:{$pattern:/[a-z-]+/,keyword:AT_MODIFIERS,attribute:MEDIA_FEATURES2.join(" ")},contains:[modes2.CSS_NUMBER_MODE]}},{className:"keyword",begin:"@((-(o|moz|ms|webkit)-)?("+AT_KEYWORDS.join("|")+"))\\b"},VARIABLE,modes2.CSS_NUMBER_MODE,{className:"function",begin:"^[a-zA-Z][a-zA-Z0-9_-]*\\(.*\\)",illegal:"[\\n]",returnBegin:!0,contains:[{className:"title",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"},{className:"params",begin:/\(/,end:/\)/,contains:[modes2.HEXCOLOR, VARIABLE,hljs.APOS_STRING_MODE,modes2.CSS_NUMBER_MODE,hljs.QUOTE_STRING_MODE]}]},modes2.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ATTRIBUTES2.join("|")+")\\b",starts:{end:/;|$/,contains:[modes2.HEXCOLOR,VARIABLE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,modes2.CSS_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE,modes2.IMPORTANT,modes2.FUNCTION_DISPATCH],illegal:/\./,relevance:0}},modes2.FUNCTION_DISPATCH]}}return stylus_1=stylus2,stylus_1}var subunit_1,hasRequiredSubunit;function requireSubunit(){ if(hasRequiredSubunit)return subunit_1;hasRequiredSubunit=1;function subunit2(hljs){return{name:"SubUnit",case_insensitive:!0,contains:[{className:"string",begin:`\\[ (multipart)?`,end:`\\] `},{className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},{className:"string",begin:"(\\+|-)\\d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}return subunit_1=subunit2,subunit_1}var swift_1,hasRequiredSwift;function requireSwift(){if(hasRequiredSwift)return swift_1;hasRequiredSwift=1;function source2(re2){ return re2?typeof re2=="string"?re2:re2.source:null}function lookahead2(re2){return concat2("(?=",re2,")")}function concat2(...args){return args.map(x=>source2(x)).join("")}function stripOptionsFromArgs2(args){const opts=args[args.length-1];return typeof opts=="object"&&opts.constructor===Object?(args.splice(args.length-1,1),opts):{}}function either2(...args){return"("+(stripOptionsFromArgs2(args).capture?"":"?:")+args.map(x=>source2(x)).join("|")+")"}const keywordWrapper2=keyword2=>concat2(/\b/, keyword2,/\w$/.test(keyword2)?/\b/:/\B/),dotKeywords2=["Protocol","Type"].map(keywordWrapper2),optionalDotKeywords2=["init","self"].map(keywordWrapper2),keywordTypes2=["Any","Self"],keywords2=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate", "final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"\ try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],literals2=["false","nil","true"],precedencegroupKeywords2=["assignment","associativity","higherThan","left","lowerThan","none","right"],numberSignKeywords2=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],builtIns2=["abs","all", "any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],operatorHead2=either2(/[/=\-+!*%<>&|^~?]/, /[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),operatorCharacter2=either2(operatorHead2,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),operator2=concat2(operatorHead2,operatorCharacter2,"*"), identifierHead2=either2(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/), identifierCharacter2=either2(identifierHead2,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),identifier2=concat2(identifierHead2,identifierCharacter2,"*"),typeIdentifier2=concat2(/[A-Z]/,identifierCharacter2,"*"),keywordAttributes2=["attached","autoclosure",concat2(/convention\(/,either2("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSe\ gueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",concat2(/objc\(/,identifier2,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],availabilityKeywords2=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvO\ S","tvOSApplicationExtension","swift"];function swift2(hljs){const WHITESPACE={match:/\s+/,relevance:0},BLOCK_COMMENT=hljs.COMMENT("/\\*","\\*/",{contains:["self"]}),COMMENTS=[hljs.C_LINE_COMMENT_MODE,BLOCK_COMMENT],DOT_KEYWORD={match:[/\./,either2(...dotKeywords2,...optionalDotKeywords2)],className:{2:"keyword"}},KEYWORD_GUARD={match:concat2(/\./,either2(...keywords2)),relevance:0},PLAIN_KEYWORDS=keywords2.filter(kw=>typeof kw=="string").concat(["_|0"]),REGEX_KEYWORDS=keywords2.filter(kw=>typeof kw!= "string").concat(keywordTypes2).map(keywordWrapper2),KEYWORD={variants:[{className:"keyword",match:either2(...REGEX_KEYWORDS,...optionalDotKeywords2)}]},KEYWORDS2={$pattern:either2(/\b\w+/,/#\w+/),keyword:PLAIN_KEYWORDS.concat(numberSignKeywords2),literal:literals2},KEYWORD_MODES=[DOT_KEYWORD,KEYWORD_GUARD,KEYWORD],BUILT_IN_GUARD={match:concat2(/\./,either2(...builtIns2)),relevance:0},BUILT_IN={className:"built_in",match:concat2(/\b/,either2(...builtIns2),/(?=\()/)},BUILT_INS2=[BUILT_IN_GUARD,BUILT_IN], OPERATOR_GUARD={match:/->/,relevance:0},OPERATOR={className:"operator",relevance:0,variants:[{match:operator2},{match:`\\.(\\.|${operatorCharacter2})+`}]},OPERATORS=[OPERATOR_GUARD,OPERATOR],decimalDigits2="([0-9]_*)+",hexDigits2="([0-9a-fA-F]_*)+",NUMBER={className:"number",relevance:0,variants:[{match:`\\b(${decimalDigits2})(\\.(${decimalDigits2}))?([eE][+-]?(${decimalDigits2}))?\\b`},{match:`\\b0x(${hexDigits2})(\\.(${hexDigits2}))?([pP][+-]?(${decimalDigits2}))?\\b`},{match:/\b0o([0-7]_*)+\b/}, {match:/\b0b([01]_*)+\b/}]},ESCAPED_CHARACTER=(rawDelimiter="")=>({className:"subst",variants:[{match:concat2(/\\/,rawDelimiter,/[0\\tnr"']/)},{match:concat2(/\\/,rawDelimiter,/u\{[0-9a-fA-F]{1,8}\}/)}]}),ESCAPED_NEWLINE=(rawDelimiter="")=>({className:"subst",match:concat2(/\\/,rawDelimiter,/[\t ]*(?:[\r\n]|\r\n)/)}),INTERPOLATION=(rawDelimiter="")=>({className:"subst",label:"interpol",begin:concat2(/\\/,rawDelimiter,/\(/),end:/\)/}),MULTILINE_STRING=(rawDelimiter="")=>({begin:concat2(rawDelimiter, /"""/),end:concat2(/"""/,rawDelimiter),contains:[ESCAPED_CHARACTER(rawDelimiter),ESCAPED_NEWLINE(rawDelimiter),INTERPOLATION(rawDelimiter)]}),SINGLE_LINE_STRING=(rawDelimiter="")=>({begin:concat2(rawDelimiter,/"/),end:concat2(/"/,rawDelimiter),contains:[ESCAPED_CHARACTER(rawDelimiter),INTERPOLATION(rawDelimiter)]}),STRING={className:"string",variants:[MULTILINE_STRING(),MULTILINE_STRING("#"),MULTILINE_STRING("##"),MULTILINE_STRING("###"),SINGLE_LINE_STRING(),SINGLE_LINE_STRING("#"),SINGLE_LINE_STRING( "##"),SINGLE_LINE_STRING("###")]},REGEXP_CONTENTS=[hljs.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[hljs.BACKSLASH_ESCAPE]}],BARE_REGEXP_LITERAL={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:REGEXP_CONTENTS},EXTENDED_REGEXP_LITERAL=rawDelimiter=>{const begin=concat2(rawDelimiter,/\//),end=concat2(/\//,rawDelimiter);return{begin,end,contains:[...REGEXP_CONTENTS,{scope:"comment",begin:`#(?!.*${end})`,end:/$/}]}},REGEXP2={scope:"regexp",variants:[EXTENDED_REGEXP_LITERAL("###"),EXTENDED_REGEXP_LITERAL( "##"),EXTENDED_REGEXP_LITERAL("#"),BARE_REGEXP_LITERAL]},QUOTED_IDENTIFIER={match:concat2(/`/,identifier2,/`/)},IMPLICIT_PARAMETER={className:"variable",match:/\$\d+/},PROPERTY_WRAPPER_PROJECTION={className:"variable",match:`\\$${identifierCharacter2}+`},IDENTIFIERS=[QUOTED_IDENTIFIER,IMPLICIT_PARAMETER,PROPERTY_WRAPPER_PROJECTION],AVAILABLE_ATTRIBUTE={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:availabilityKeywords2,contains:[...OPERATORS,NUMBER,STRING]}]}}, KEYWORD_ATTRIBUTE={scope:"keyword",match:concat2(/@/,either2(...keywordAttributes2),lookahead2(either2(/\(/,/\s+/)))},USER_DEFINED_ATTRIBUTE={scope:"meta",match:concat2(/@/,identifier2)},ATTRIBUTES2=[AVAILABLE_ATTRIBUTE,KEYWORD_ATTRIBUTE,USER_DEFINED_ATTRIBUTE],TYPE={match:lookahead2(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:concat2(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,identifierCharacter2,"+")},{className:"type",match:typeIdentifier2,relevance:0},{match:/[?!]+/, relevance:0},{match:/\.\.\./,relevance:0},{match:concat2(/\s+&\s+/,lookahead2(typeIdentifier2)),relevance:0}]},GENERIC_ARGUMENTS={begin://,keywords:KEYWORDS2,contains:[...COMMENTS,...KEYWORD_MODES,...ATTRIBUTES2,OPERATOR_GUARD,TYPE]};TYPE.contains.push(GENERIC_ARGUMENTS);const TUPLE_ELEMENT_NAME={match:concat2(identifier2,/\s*:/),keywords:"_|0",relevance:0},TUPLE={begin:/\(/,end:/\)/,relevance:0,keywords:KEYWORDS2,contains:["self",TUPLE_ELEMENT_NAME,...COMMENTS,REGEXP2,...KEYWORD_MODES, ...BUILT_INS2,...OPERATORS,NUMBER,STRING,...IDENTIFIERS,...ATTRIBUTES2,TYPE]},GENERIC_PARAMETERS={begin://,keywords:"repeat each",contains:[...COMMENTS,TYPE]},FUNCTION_PARAMETER_NAME={begin:either2(lookahead2(concat2(identifier2,/\s*:/)),lookahead2(concat2(identifier2,/\s+/,identifier2,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:identifier2}]},FUNCTION_PARAMETERS={begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:[FUNCTION_PARAMETER_NAME, ...COMMENTS,...KEYWORD_MODES,...OPERATORS,NUMBER,STRING,...ATTRIBUTES2,TYPE,TUPLE],endsParent:!0,illegal:/["']/},FUNCTION_OR_MACRO={match:[/(func|macro)/,/\s+/,either2(QUOTED_IDENTIFIER.match,identifier2,operator2)],className:{1:"keyword",3:"title.function"},contains:[GENERIC_PARAMETERS,FUNCTION_PARAMETERS,WHITESPACE],illegal:[/\[/,/%/]},INIT_SUBSCRIPT={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[GENERIC_PARAMETERS,FUNCTION_PARAMETERS,WHITESPACE],illegal:/\[|%/}, OPERATOR_DECLARATION={match:[/operator/,/\s+/,operator2],className:{1:"keyword",3:"title"}},PRECEDENCEGROUP={begin:[/precedencegroup/,/\s+/,typeIdentifier2],className:{1:"keyword",3:"title"},contains:[TYPE],keywords:[...precedencegroupKeywords2,...literals2],end:/}/},CLASS_FUNC_DECLARATION={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},CLASS_VAR_DECLARATION={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}}, TYPE_DECLARATION={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,identifier2,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:KEYWORDS2,contains:[GENERIC_PARAMETERS,...KEYWORD_MODES,{begin:/:/,end:/\{/,keywords:KEYWORDS2,contains:[{scope:"title.class.inherited",match:typeIdentifier2},...KEYWORD_MODES],relevance:0}]};for(const variant of STRING.variants){const interpolation=variant.contains.find(mode=>mode.label==="interpol");interpolation.keywords=KEYWORDS2;const submodes=[...KEYWORD_MODES, ...BUILT_INS2,...OPERATORS,NUMBER,STRING,...IDENTIFIERS];interpolation.contains=[...submodes,{begin:/\(/,end:/\)/,contains:["self",...submodes]}]}return{name:"Swift",keywords:KEYWORDS2,contains:[...COMMENTS,FUNCTION_OR_MACRO,INIT_SUBSCRIPT,CLASS_FUNC_DECLARATION,CLASS_VAR_DECLARATION,TYPE_DECLARATION,OPERATOR_DECLARATION,PRECEDENCEGROUP,{beginKeywords:"import",end:/$/,contains:[...COMMENTS],relevance:0},REGEXP2,...KEYWORD_MODES,...BUILT_INS2,...OPERATORS,NUMBER,STRING,...IDENTIFIERS,...ATTRIBUTES2, TYPE,TUPLE]}}return swift_1=swift2,swift_1}var taggerscript_1,hasRequiredTaggerscript;function requireTaggerscript(){if(hasRequiredTaggerscript)return taggerscript_1;hasRequiredTaggerscript=1;function taggerscript2(hljs){return{name:"Tagger Script",contains:[{className:"comment",begin:/\$noop\(/,end:/\)/,contains:[{begin:/\\[()]/},{begin:/\(/,end:/\)/,contains:[{begin:/\\[()]/},"self"]}],relevance:10},{className:"keyword",begin:/\$[_a-zA-Z0-9]+(?=\()/},{className:"variable",begin:/%[_a-zA-Z0-9:]+%/}, {className:"symbol",begin:/\\[\\nt$%,()]/},{className:"symbol",begin:/\\u[a-fA-F0-9]{4}/}]}}return taggerscript_1=taggerscript2,taggerscript_1}var yaml_1,hasRequiredYaml;function requireYaml(){if(hasRequiredYaml)return yaml_1;hasRequiredYaml=1;function yaml2(hljs){const LITERALS2="true false yes no null",URI_CHARACTERS="[\\w#;/?:@&=+$,.~*'()[\\]]+",KEY={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]}, TEMPLATE_VARIABLES={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},SINGLE_QUOTE_STRING={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},STRING={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[hljs.BACKSLASH_ESCAPE,TEMPLATE_VARIABLES]},CONTAINER_STRING=hljs.inherit(STRING,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{ begin:/[^\s,{}[\]]+/}]}),TIMESTAMP={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},VALUE_CONTAINER={end:",",endsWithParent:!0,excludeEnd:!0,keywords:LITERALS2,relevance:0},OBJECT2={begin:/\{/,end:/\}/,contains:[VALUE_CONTAINER],illegal:"\\n",relevance:0},ARRAY2={begin:"\\[",end:"\\]",contains:[VALUE_CONTAINER],illegal:"\\n",relevance:0},MODES2=[KEY,{className:"meta",begin:"^-\ --\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+URI_CHARACTERS},{className:"type",begin:"!<"+URI_CHARACTERS+">"},{className:"type",begin:"!"+URI_CHARACTERS},{className:"type",begin:"!!"+URI_CHARACTERS},{className:"meta",begin:"&"+hljs.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+hljs.UNDERSCORE_IDENT_RE+ "$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},hljs.HASH_COMMENT_MODE,{beginKeywords:LITERALS2,keywords:{literal:LITERALS2}},TIMESTAMP,{className:"number",begin:hljs.C_NUMBER_RE+"\\b",relevance:0},OBJECT2,ARRAY2,SINGLE_QUOTE_STRING,STRING],VALUE_MODES=[...MODES2];return VALUE_MODES.pop(),VALUE_MODES.push(CONTAINER_STRING),VALUE_CONTAINER.contains=VALUE_MODES,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:MODES2}}return yaml_1=yaml2,yaml_1}var tap_1,hasRequiredTap;function requireTap(){ if(hasRequiredTap)return tap_1;hasRequiredTap=1;function tap2(hljs){return{name:"Test Anything Protocol",case_insensitive:!0,contains:[hljs.HASH_COMMENT_MODE,{className:"meta",variants:[{begin:"^TAP version (\\d+)$"},{begin:"^1\\.\\.(\\d+)$"}]},{begin:/---$/,end:"\\.\\.\\.$",subLanguage:"yaml",relevance:0},{className:"number",begin:" (\\d+) "},{className:"symbol",variants:[{begin:"^ok"},{begin:"^not ok"}]}]}}return tap_1=tap2,tap_1}var tcl_1,hasRequiredTcl;function requireTcl(){if(hasRequiredTcl) return tcl_1;hasRequiredTcl=1;function tcl2(hljs){const regex=hljs.regex,TCL_IDENT=/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER={className:"number",variants:[hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE]};return{name:"Tcl",aliases:["tk"],keywords:["after","append","apply","array","auto_execok","auto_import","auto_load","auto_mkindex","auto_mkindex_old","auto_qualify","auto_reset","bgerror","binary","break","catch","cd","chan","clock","close","concat","continue","dde","dict","encoding","eof","error","eval","exe\ c","exit","expr","fblocked","fconfigure","fcopy","file","fileevent","filename","flush","for","foreach","format","gets","glob","global","history","http","if","incr","info","interp","join","lappend|10","lassign|10","lindex|10","linsert|10","list","llength|10","load","lrange|10","lrepeat|10","lreplace|10","lreverse|10","lsearch|10","lset|10","lsort|10","mathfunc","mathop","memory","msgcat","namespace","open","package","parray","pid","pkg::create","pkg_mkIndex","platform","platform::shell","proc","p\ uts","pwd","read","refchan","regexp","registry","regsub|10","rename","return","safe","scan","seek","set","socket","source","split","string","subst","switch","tcl_endOfWord","tcl_findLibrary","tcl_startOfNextWord","tcl_startOfPreviousWord","tcl_wordBreakAfter","tcl_wordBreakBefore","tcltest","tclvars","tell","time","tm","trace","unknown","unload","unset","update","uplevel","upvar","variable","vwait","while"],contains:[hljs.COMMENT(";[ \\t]*#","$"),hljs.COMMENT("^[ \\t]*#","$"),{beginKeywords:"pro\ c",end:"[\\{]",excludeEnd:!0,contains:[{className:"title",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",variants:[{begin:regex.concat(/\$/,regex.optional(/::/),TCL_IDENT,"(::",TCL_IDENT,")*")},{begin:"\\$\\{(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"\\}",contains:[NUMBER]}]},{className:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null})]},NUMBER]}}return tcl_1=tcl2, tcl_1}var thrift_1,hasRequiredThrift;function requireThrift(){if(hasRequiredThrift)return thrift_1;hasRequiredThrift=1;function thrift2(hljs){const TYPES2=["bool","byte","i16","i32","i64","double","string","binary"];return{name:"Thrift",keywords:{keyword:["namespace","const","typedef","struct","enum","service","exception","void","oneway","set","list","map","required","optional"],type:TYPES2,literal:"true false"},contains:[hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE, {className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[hljs.inherit(hljs.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",keywords:{type:[...TYPES2,"set","list","map"]},end:">",contains:["self"]}]}}return thrift_1=thrift2,thrift_1}var tp_1,hasRequiredTp;function requireTp(){if(hasRequiredTp)return tp_1;hasRequiredTp=1;function tp2(hljs){const TPID={className:"number",begin:"[1-9][0-9]*",relevance:0},TPLABEL={className:"\ symbol",begin:":[^\\]]+"},TPDATA={className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",TPID,TPLABEL]},TPIO={className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",TPID,hljs.QUOTE_STRING_MODE,TPLABEL]};return{name:"TP",keywords:{keyword:["ABORT","ACC","ADJUST","AND","AP_LD","BREAK","CALL","CNT","COL","CONDITION","CONFIG","DA","DB", "DIV","DETECT","ELSE","END","ENDFOR","ERR_NUM","ERROR_PROG","FINE","FOR","GP","GUARD","INC","IF","JMP","LINEAR_MAX_SPEED","LOCK","MOD","MONITOR","OFFSET","Offset","OR","OVERRIDE","PAUSE","PREG","PTH","RT_LD","RUN","SELECT","SKIP","Skip","TA","TB","TO","TOOL_OFFSET","Tool_Offset","UF","UT","UFRAME_NUM","UTOOL_NUM","UNLOCK","WAIT","X","Y","Z","W","P","R","STRLEN","SUBSTR","FINDSTR","VOFFSET","PROG","ATTR","MN","POS"],literal:["ON","OFF","max_speed","LPOS","JPOS","ENABLE","DISABLE","START","STOP","\ RESET"]},contains:[TPDATA,TPIO,{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},hljs.COMMENT("//","[;$]"),hljs.COMMENT("!","[;$]"),hljs.COMMENT("--eg:","$"),hljs.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"'"},hljs.C_NUMBER_MODE,{className:"\ variable",begin:"\\$[A-Za-z0-9_]+"}]}}return tp_1=tp2,tp_1}var twig_1,hasRequiredTwig;function requireTwig(){if(hasRequiredTwig)return twig_1;hasRequiredTwig=1;function twig2(hljs){const regex=hljs.regex,FUNCTION_NAMES=["absolute_url","asset|0","asset_version","attribute","block","constant","controller|0","country_timezones","csrf_token","cycle","date","dump","expression","form|0","form_end","form_errors","form_help","form_label","form_rest","form_row","form_start","form_widget","html_classes","\ include","is_granted","logout_path","logout_url","max","min","parent","path|0","random","range","relative_path","render","render_esi","source","template_from_string","url|0"],FILTERS=["abs","abbr_class","abbr_method","batch","capitalize","column","convert_encoding","country_name","currency_name","currency_symbol","data_uri","date","date_modify","default","escape","file_excerpt","file_link","file_relative","filter","first","format","format_args","format_args_as_text","format_currency","format_dat\ e","format_datetime","format_file","format_file_from_text","format_number","format_time","html_to_markdown","humanize","inky_to_html","inline_css","join","json_encode","keys","language_name","last","length","locale_name","lower","map","markdown","markdown_to_html","merge","nl2br","number_format","raw","reduce","replace","reverse","round","slice","slug","sort","spaceless","split","striptags","timezone_name","title","trans","transchoice","trim","u|0","upper","url_encode","yaml_dump","yaml_encode"]; let TAG_NAMES=["apply","autoescape","block","cache","deprecated","do","embed","extends","filter","flush","for","form_theme","from","if","import","include","macro","sandbox","set","stopwatch","trans","trans_default_domain","transchoice","use","verbatim","with"];TAG_NAMES=TAG_NAMES.concat(TAG_NAMES.map(t=>`end${t}`));const STRING={scope:"string",variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},NUMBER={scope:"number",match:/\d+/},PARAMS={begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[ STRING,NUMBER]},FUNCTIONS={beginKeywords:FUNCTION_NAMES.join(" "),keywords:{name:FUNCTION_NAMES},relevance:0,contains:[PARAMS]},FILTER={match:/\|(?=[A-Za-z_]+:?)/,beginScope:"punctuation",relevance:0,contains:[{match:/[A-Za-z_]+:?/,keywords:FILTERS}]},tagNamed=(tagnames,{relevance})=>({beginScope:{1:"template-tag",3:"name"},relevance:relevance||2,endScope:"template-tag",begin:[/\{%/,/\s*/,regex.either(...tagnames)],end:/%\}/,keywords:"in",contains:[FILTER,FUNCTIONS,STRING,NUMBER]}),CUSTOM_TAG_RE=/[a-z_]+/, TAG=tagNamed(TAG_NAMES,{relevance:2}),CUSTOM_TAG=tagNamed([CUSTOM_TAG_RE],{relevance:1});return{name:"Twig",aliases:["craftcms"],case_insensitive:!0,subLanguage:"xml",contains:[hljs.COMMENT(/\{#/,/#\}/),TAG,CUSTOM_TAG,{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:["self",FILTER,FUNCTIONS,STRING,NUMBER]}]}}return twig_1=twig2,twig_1}var typescript_1,hasRequiredTypescript;function requireTypescript(){if(hasRequiredTypescript)return typescript_1;hasRequiredTypescript=1;const IDENT_RE2="\ [A-Za-z$_][0-9A-Za-z$_]*",KEYWORDS2=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],LITERALS2=["true","false","null","undefined","NaN","Infinity"],TYPES2=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","R\ egExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ERROR_TYPES2=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],BUILT_IN_GLOBALS2=[ "setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],BUILT_IN_VARIABLES2=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],BUILT_INS2=[].concat(BUILT_IN_GLOBALS2,TYPES2,ERROR_TYPES2);function javascript2(hljs){const regex=hljs.regex,hasClosingTag=(match,{after})=>{const tag="",end:""},XML_SELF_CLOSING=/<[A-Za-z0-9\\._:-]+\s*\/>/,XML_TAG={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(match,response)=>{const afterMatchIndex=match[0].length+match.index,nextChar=match.input[afterMatchIndex];if(nextChar==="<"||nextChar===","){response.ignoreMatch();return}nextChar===">"&&(hasClosingTag(match,{after:afterMatchIndex})||response.ignoreMatch()); let m;const afterMatch=match.input.substring(afterMatchIndex);if(m=afterMatch.match(/^\s*=/)){response.ignoreMatch();return}if((m=afterMatch.match(/^\s+extends\s+/))&&m.index===0){response.ignoreMatch();return}}},KEYWORDS$12={$pattern:IDENT_RE2,keyword:KEYWORDS2,literal:LITERALS2,built_in:BUILT_INS2,"variable.language":BUILT_IN_VARIABLES2},decimalDigits2="[0-9](_?[0-9])*",frac2=`\\.(${decimalDigits2})`,decimalInteger="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",NUMBER={className:"number",variants:[{begin:`\ (\\b(${decimalInteger})((${frac2})|\\.)?|(${frac2}))[eE][+-]?(${decimalDigits2})\\b`},{begin:`\\b(${decimalInteger})\\b((${frac2})\\b|\\.)?|(${frac2})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},SUBST={className:"subst",begin:"\\$\\{",end:"\\}",keywords:KEYWORDS$12,contains:[]},HTML_TEMPLATE={begin:".?html`",end:"",starts:{end:"`", returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"xml"}},CSS_TEMPLATE={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"css"}},GRAPHQL_TEMPLATE={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"graphql"}},TEMPLATE_STRING={className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE,SUBST]},COMMENT={className:"comment",variants:[hljs.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0, contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:IDENT_RE$12+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),hljs.C_BLOCK_COMMENT_MODE,hljs.C_LINE_COMMENT_MODE]},SUBST_INTERNALS=[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,HTML_TEMPLATE,CSS_TEMPLATE,GRAPHQL_TEMPLATE,TEMPLATE_STRING,{match:/\$\d+/},NUMBER]; SUBST.contains=SUBST_INTERNALS.concat({begin:/\{/,end:/\}/,keywords:KEYWORDS$12,contains:["self"].concat(SUBST_INTERNALS)});const SUBST_AND_COMMENTS=[].concat(COMMENT,SUBST.contains),PARAMS_CONTAINS=SUBST_AND_COMMENTS.concat([{begin:/(\s*)\(/,end:/\)/,keywords:KEYWORDS$12,contains:["self"].concat(SUBST_AND_COMMENTS)}]),PARAMS={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS$12,contains:PARAMS_CONTAINS},CLASS_OR_EXTENDS={variants:[{match:[/class/,/\s+/, IDENT_RE$12,/\s+/,/extends/,/\s+/,regex.concat(IDENT_RE$12,"(",regex.concat(/\./,IDENT_RE$12),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,IDENT_RE$12],scope:{1:"keyword",3:"title.class"}}]},CLASS_REFERENCE={relevance:0,match:regex.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...TYPES2,...ERROR_TYPES2]}}, USE_STRICT={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},FUNCTION_DEFINITION={variants:[{match:[/function/,/\s+/,IDENT_RE$12,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[PARAMS],illegal:/%/},UPPER_CASE_CONSTANT={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function noneOf(list2){return regex.concat("(?!",list2.join("|"),")")}const FUNCTION_CALL={match:regex. concat(/\b/,noneOf([...BUILT_IN_GLOBALS2,"super","import"].map(x=>`${x}\\s*\\(`)),IDENT_RE$12,regex.lookahead(/\s*\(/)),className:"title.function",relevance:0},PROPERTY_ACCESS={begin:regex.concat(/\./,regex.lookahead(regex.concat(IDENT_RE$12,/(?![0-9A-Za-z$_(])/))),end:IDENT_RE$12,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},GETTER_OR_SETTER={match:[/get|set/,/\s+/,IDENT_RE$12,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},PARAMS]},FUNC_LEAD_IN_RE="\ (\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+hljs.UNDERSCORE_IDENT_RE+")\\s*=>",FUNCTION_VARIABLE={match:[/const|var|let/,/\s+/,IDENT_RE$12,/\s*/,/=\s*/,/(async\s*)?/,regex.lookahead(FUNC_LEAD_IN_RE)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[PARAMS]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:KEYWORDS$12,exports:{PARAMS_CONTAINS,CLASS_REFERENCE},illegal:/#(?![$_A-z])/,contains:[hljs.SHEBANG({label:"shebang",binary:"node",relevance:5}), USE_STRICT,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,HTML_TEMPLATE,CSS_TEMPLATE,GRAPHQL_TEMPLATE,TEMPLATE_STRING,COMMENT,{match:/\$\d+/},NUMBER,CLASS_REFERENCE,{scope:"attr",match:IDENT_RE$12+regex.lookahead(":"),relevance:0},FUNCTION_VARIABLE,{begin:"("+hljs.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[COMMENT,hljs.REGEXP_MODE,{className:"function",begin:FUNC_LEAD_IN_RE,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[ {begin:hljs.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS$12,contains:PARAMS_CONTAINS}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:FRAGMENT.begin,end:FRAGMENT.end},{match:XML_SELF_CLOSING},{begin:XML_TAG.begin,"on:begin":XML_TAG.isTrulyOpeningTag,end:XML_TAG.end}],subLanguage:"xml",contains:[{begin:XML_TAG.begin,end:XML_TAG.end,skip:!0,contains:["self"]}]}]},FUNCTION_DEFINITION, {beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+hljs.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[PARAMS,hljs.inherit(hljs.TITLE_MODE,{begin:IDENT_RE$12,className:"title.function"})]},{match:/\.\.\./,relevance:0},PROPERTY_ACCESS,{match:"\\$"+IDENT_RE$12,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[PARAMS]},FUNCTION_CALL,UPPER_CASE_CONSTANT,CLASS_OR_EXTENDS, GETTER_OR_SETTER,{match:/\$[(.]/}]}}function typescript2(hljs){const regex=hljs.regex,tsLanguage=javascript2(hljs),IDENT_RE$12=IDENT_RE2,TYPES3=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],NAMESPACE={begin:[/namespace/,/\s+/,hljs.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},INTERFACE={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:TYPES3},contains:[tsLanguage.exports.CLASS_REFERENCE]},USE_STRICT={className:"\ meta",relevance:10,begin:/^\s*['"]use strict['"]/},TS_SPECIFIC_KEYWORDS=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],KEYWORDS$12={$pattern:IDENT_RE2,keyword:KEYWORDS2.concat(TS_SPECIFIC_KEYWORDS),literal:LITERALS2,built_in:BUILT_INS2.concat(TYPES3),"variable.language":BUILT_IN_VARIABLES2},DECORATOR={className:"meta",begin:"@"+IDENT_RE$12},swapMode=(mode,label,replacement)=>{const indx=mode.contains.findIndex(m=>m.label=== label);if(indx===-1)throw new Error("can not find mode to replace");mode.contains.splice(indx,1,replacement)};Object.assign(tsLanguage.keywords,KEYWORDS$12),tsLanguage.exports.PARAMS_CONTAINS.push(DECORATOR);const ATTRIBUTE_HIGHLIGHT=tsLanguage.contains.find(c2=>c2.scope==="attr"),OPTIONAL_KEY_OR_ARGUMENT=Object.assign({},ATTRIBUTE_HIGHLIGHT,{match:regex.concat(IDENT_RE$12,regex.lookahead(/\s*\?:/))});tsLanguage.exports.PARAMS_CONTAINS.push([tsLanguage.exports.CLASS_REFERENCE,ATTRIBUTE_HIGHLIGHT, OPTIONAL_KEY_OR_ARGUMENT]),tsLanguage.contains=tsLanguage.contains.concat([DECORATOR,NAMESPACE,INTERFACE,OPTIONAL_KEY_OR_ARGUMENT]),swapMode(tsLanguage,"shebang",hljs.SHEBANG()),swapMode(tsLanguage,"use_strict",USE_STRICT);const functionDeclaration=tsLanguage.contains.find(m=>m.label==="func.def");return functionDeclaration.relevance=0,Object.assign(tsLanguage,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),tsLanguage}return typescript_1=typescript2,typescript_1}var vala_1,hasRequiredVala; function requireVala(){if(hasRequiredVala)return vala_1;hasRequiredVala=1;function vala2(hljs){return{name:"Vala",keywords:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override virtual delegate if while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdo\ ut stdin stderr var",built_in:"DBus GLib CCode Gee Object Gtk Posix",literal:"false true null"},contains:[{className:"class",beginKeywords:"class interface namespace",end:/\{/,excludeEnd:!0,illegal:"[^,:\\n\\s\\.]",contains:[hljs.UNDERSCORE_TITLE_MODE]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""',relevance:5},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,{className:"meta",begin:"^#",end:"$"}]}}return vala_1=vala2,vala_1}var vbnet_1, hasRequiredVbnet;function requireVbnet(){if(hasRequiredVbnet)return vbnet_1;hasRequiredVbnet=1;function vbnet2(hljs){const regex=hljs.regex,CHARACTER={className:"string",begin:/"(""|[^/n])"C\b/},STRING={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},MM_DD_YYYY=/\d{1,2}\/\d{1,2}\/\d{4}/,YYYY_MM_DD=/\d{4}-\d{1,2}-\d{1,2}/,TIME_12H=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,TIME_24H=/\d{1,2}(:\d{1,2}){1,2}/,DATE2={className:"literal",variants:[{begin:regex.concat(/# */,regex.either( YYYY_MM_DD,MM_DD_YYYY),/ *#/)},{begin:regex.concat(/# */,TIME_24H,/ *#/)},{begin:regex.concat(/# */,TIME_12H,/ *#/)},{begin:regex.concat(/# */,regex.either(YYYY_MM_DD,MM_DD_YYYY),/ +/,regex.either(TIME_12H,TIME_24H),/ *#/)}]},NUMBER={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},LABEL={ className:"label",begin:/^\w+:/},DOC_COMMENT=hljs.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),COMMENT=hljs.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do e\ ach equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resum\ e return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long objec\ t sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[CHARACTER,STRING,DATE2,NUMBER,LABEL,DOC_COMMENT,COMMENT,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[COMMENT]}]}}return vbnet_1=vbnet2,vbnet_1}var vbscript_1,hasRequiredVbscript;function requireVbscript(){ if(hasRequiredVbscript)return vbscript_1;hasRequiredVbscript=1;function vbscript2(hljs){const regex=hljs.regex,BUILT_IN_FUNCTIONS=["lcase","month","vartype","instrrev","ubound","setlocale","getobject","rgb","getref","string","weekdayname","rnd","dateadd","monthname","now","day","minute","isarray","cbool","round","formatcurrency","conversions","csng","timevalue","second","year","space","abs","clng","timeserial","fixs","len","asc","isempty","maths","dateserial","atn","timer","isobject","filter","w\ eekday","datevalue","ccur","isdate","instr","datediff","formatdatetime","replace","isnull","right","sgn","array","snumeric","log","cdbl","hex","chr","lbound","msgbox","ucase","getlocale","cos","cdate","cbyte","rtrim","join","hour","oct","typename","trim","strcomp","int","createobject","loadpicture","tan","formatnumber","mid","split","cint","sin","datepart","ltrim","sqr","time","derived","eval","date","formatpercent","exp","inputbox","left","ascw","chrw","regexp","cstr","err"],BUILT_IN_OBJECTS=["\ server","response","request","scriptengine","scriptenginebuildversion","scriptengineminorversion","scriptenginemajorversion"],BUILT_IN_CALL={begin:regex.concat(regex.either(...BUILT_IN_FUNCTIONS),"\\s*\\("),relevance:0,keywords:{built_in:BUILT_IN_FUNCTIONS}};return{name:"VBScript",aliases:["vbs"],case_insensitive:!0,keywords:{keyword:["call","class","const","dim","do","loop","erase","execute","executeglobal","exit","for","each","next","function","if","then","else","on","error","option","explicit", "new","private","property","let","get","public","randomize","redim","rem","select","case","set","stop","sub","while","wend","with","end","to","elseif","is","or","xor","and","not","class_initialize","class_terminate","default","preserve","in","me","byval","byref","step","resume","goto"],built_in:BUILT_IN_OBJECTS,literal:["true","false","null","nothing","empty"]},illegal:"//",contains:[BUILT_IN_CALL,hljs.inherit(hljs.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),hljs.COMMENT(/'/,/$/,{relevance:0}), hljs.C_NUMBER_MODE]}}return vbscript_1=vbscript2,vbscript_1}var vbscriptHtml_1,hasRequiredVbscriptHtml;function requireVbscriptHtml(){if(hasRequiredVbscriptHtml)return vbscriptHtml_1;hasRequiredVbscriptHtml=1;function vbscriptHtml2(hljs){return{name:"VBScript in HTML",subLanguage:"xml",contains:[{begin:"<%",end:"%>",subLanguage:"vbscript"}]}}return vbscriptHtml_1=vbscriptHtml2,vbscriptHtml_1}var verilog_1,hasRequiredVerilog;function requireVerilog(){if(hasRequiredVerilog)return verilog_1;hasRequiredVerilog= 1;function verilog2(hljs){const regex=hljs.regex,KEYWORDS2={$pattern:/\$?[\w]+(\$[\w]+)*/,keyword:["accept_on","alias","always","always_comb","always_ff","always_latch","and","assert","assign","assume","automatic","before","begin","bind","bins","binsof","bit","break","buf|0","bufif0","bufif1","byte","case","casex","casez","cell","chandle","checker","class","clocking","cmos","config","const","constraint","context","continue","cover","covergroup","coverpoint","cross","deassign","default","defparam", "design","disable","dist","do","edge","else","end","endcase","endchecker","endclass","endclocking","endconfig","endfunction","endgenerate","endgroup","endinterface","endmodule","endpackage","endprimitive","endprogram","endproperty","endspecify","endsequence","endtable","endtask","enum","event","eventually","expect","export","extends","extern","final","first_match","for","force","foreach","forever","fork","forkjoin","function","generate|5","genvar","global","highz0","highz1","if","iff","ifnone","\ ignore_bins","illegal_bins","implements","implies","import","incdir","include","initial","inout","input","inside","instance","int","integer","interconnect","interface","intersect","join","join_any","join_none","large","let","liblist","library","local","localparam","logic","longint","macromodule","matches","medium","modport","module","nand","negedge","nettype","new","nexttime","nmos","nor","noshowcancelled","not","notif0","notif1","or","output","package","packed","parameter","pmos","posedge","pri\ mitive","priority","program","property","protected","pull0","pull1","pulldown","pullup","pulsestyle_ondetect","pulsestyle_onevent","pure","rand","randc","randcase","randsequence","rcmos","real","realtime","ref","reg","reject_on","release","repeat","restrict","return","rnmos","rpmos","rtran","rtranif0","rtranif1","s_always","s_eventually","s_nexttime","s_until","s_until_with","scalared","sequence","shortint","shortreal","showcancelled","signed","small","soft","solve","specify","specparam","static", "string","strong","strong0","strong1","struct","super","supply0","supply1","sync_accept_on","sync_reject_on","table","tagged","task","this","throughout","time","timeprecision","timeunit","tran","tranif0","tranif1","tri","tri0","tri1","triand","trior","trireg","type","typedef","union","unique","unique0","unsigned","until","until_with","untyped","use","uwire","var","vectored","virtual","void","wait","wait_order","wand","weak","weak0","weak1","while","wildcard","wire","with","within","wor","xnor","\ xor"],literal:["null"],built_in:["$finish","$stop","$exit","$fatal","$error","$warning","$info","$realtime","$time","$printtimescale","$bitstoreal","$bitstoshortreal","$itor","$signed","$cast","$bits","$stime","$timeformat","$realtobits","$shortrealtobits","$rtoi","$unsigned","$asserton","$assertkill","$assertpasson","$assertfailon","$assertnonvacuouson","$assertoff","$assertcontrol","$assertpassoff","$assertfailoff","$assertvacuousoff","$isunbounded","$sampled","$fell","$changed","$past_gclk","\ $fell_gclk","$changed_gclk","$rising_gclk","$steady_gclk","$coverage_control","$coverage_get","$coverage_save","$set_coverage_db_name","$rose","$stable","$past","$rose_gclk","$stable_gclk","$future_gclk","$falling_gclk","$changing_gclk","$display","$coverage_get_max","$coverage_merge","$get_coverage","$load_coverage_db","$typename","$unpacked_dimensions","$left","$low","$increment","$clog2","$ln","$log10","$exp","$sqrt","$pow","$floor","$ceil","$sin","$cos","$tan","$countbits","$onehot","$isunkn\ own","$fatal","$warning","$dimensions","$right","$high","$size","$asin","$acos","$atan","$atan2","$hypot","$sinh","$cosh","$tanh","$asinh","$acosh","$atanh","$countones","$onehot0","$error","$info","$random","$dist_chi_square","$dist_erlang","$dist_exponential","$dist_normal","$dist_poisson","$dist_t","$dist_uniform","$q_initialize","$q_remove","$q_exam","$async$and$array","$async$nand$array","$async$or$array","$async$nor$array","$sync$and$array","$sync$nand$array","$sync$or$array","$sync$nor$ar\ ray","$q_add","$q_full","$psprintf","$async$and$plane","$async$nand$plane","$async$or$plane","$async$nor$plane","$sync$and$plane","$sync$nand$plane","$sync$or$plane","$sync$nor$plane","$system","$display","$displayb","$displayh","$displayo","$strobe","$strobeb","$strobeh","$strobeo","$write","$readmemb","$readmemh","$writememh","$value$plusargs","$dumpvars","$dumpon","$dumplimit","$dumpports","$dumpportson","$dumpportslimit","$writeb","$writeh","$writeo","$monitor","$monitorb","$monitorh","$moni\ toro","$writememb","$dumpfile","$dumpoff","$dumpall","$dumpflush","$dumpportsoff","$dumpportsall","$dumpportsflush","$fclose","$fdisplay","$fdisplayb","$fdisplayh","$fdisplayo","$fstrobe","$fstrobeb","$fstrobeh","$fstrobeo","$swrite","$swriteb","$swriteh","$swriteo","$fscanf","$fread","$fseek","$fflush","$feof","$fopen","$fwrite","$fwriteb","$fwriteh","$fwriteo","$fmonitor","$fmonitorb","$fmonitorh","$fmonitoro","$sformat","$sformatf","$fgetc","$ungetc","$fgets","$sscanf","$rewind","$ftell","$fe\ rror"]},BUILT_IN_CONSTANTS=["__FILE__","__LINE__"],DIRECTIVES=["begin_keywords","celldefine","default_nettype","default_decay_time","default_trireg_strength","define","delay_mode_distributed","delay_mode_path","delay_mode_unit","delay_mode_zero","else","elsif","end_keywords","endcelldefine","endif","ifdef","ifndef","include","line","nounconnected_drive","pragma","resetall","timescale","unconnected_drive","undef","undefineall"];return{name:"Verilog",aliases:["v","sv","svh"],case_insensitive:!1,keywords:KEYWORDS2, contains:[hljs.C_BLOCK_COMMENT_MODE,hljs.C_LINE_COMMENT_MODE,hljs.QUOTE_STRING_MODE,{scope:"number",contains:[hljs.BACKSLASH_ESCAPE],variants:[{begin:/\b((\d+'([bhodBHOD]))[0-9xzXZa-fA-F_]+)/},{begin:/\B(('([bhodBHOD]))[0-9xzXZa-fA-F_]+)/},{begin:/\b[0-9][0-9_]*/,relevance:0}]},{scope:"variable",variants:[{begin:"#\\((?!parameter).+\\)"},{begin:"\\.\\w+",relevance:0}]},{scope:"variable.constant",match:regex.concat(/`/,regex.either(...BUILT_IN_CONSTANTS))},{scope:"meta",begin:regex.concat(/`/,regex. either(...DIRECTIVES)),end:/$|\/\/|\/\*/,returnEnd:!0,keywords:DIRECTIVES}]}}return verilog_1=verilog2,verilog_1}var vhdl_1,hasRequiredVhdl;function requireVhdl(){if(hasRequiredVhdl)return vhdl_1;hasRequiredVhdl=1;function vhdl2(hljs){const INTEGER_RE="\\d(_|\\d)*",EXPONENT_RE="[eE][-+]?"+INTEGER_RE,DECIMAL_LITERAL_RE=INTEGER_RE+"(\\."+INTEGER_RE+")?("+EXPONENT_RE+")?",BASED_INTEGER_RE="\\w+",NUMBER_RE="\\b("+(INTEGER_RE+"#"+BASED_INTEGER_RE+"(\\."+BASED_INTEGER_RE+")?#("+EXPONENT_RE+")?")+"|"+DECIMAL_LITERAL_RE+ ")";return{name:"VHDL",case_insensitive:!0,keywords:{keyword:["abs","access","after","alias","all","and","architecture","array","assert","assume","assume_guarantee","attribute","begin","block","body","buffer","bus","case","component","configuration","constant","context","cover","disconnect","downto","default","else","elsif","end","entity","exit","fairness","file","for","force","function","generate","generic","group","guarded","if","impure","in","inertial","inout","is","label","library","linkage", "literal","loop","map","mod","nand","new","next","nor","not","null","of","on","open","or","others","out","package","parameter","port","postponed","procedure","process","property","protected","pure","range","record","register","reject","release","rem","report","restrict","restrict_guarantee","return","rol","ror","select","sequence","severity","shared","signal","sla","sll","sra","srl","strong","subtype","then","to","transport","type","unaffected","units","until","use","variable","view","vmode","vp\ rop","vunit","wait","when","while","with","xnor","xor"],built_in:["boolean","bit","character","integer","time","delay_length","natural","positive","string","bit_vector","file_open_kind","file_open_status","std_logic","std_logic_vector","unsigned","signed","boolean_vector","integer_vector","std_ulogic","std_ulogic_vector","unresolved_unsigned","u_unsigned","unresolved_signed","u_signed","real_vector","time_vector"],literal:["false","true","note","warning","error","failure","line","text","side","w\ idth"]},illegal:/\{/,contains:[hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT("--","$"),hljs.QUOTE_STRING_MODE,{className:"number",begin:NUMBER_RE,relevance:0},{className:"string",begin:"'(U|X|0|1|Z|W|L|H|-)'",contains:[hljs.BACKSLASH_ESCAPE]},{className:"symbol",begin:"'[A-Za-z](_?[A-Za-z0-9])*",contains:[hljs.BACKSLASH_ESCAPE]}]}}return vhdl_1=vhdl2,vhdl_1}var vim_1,hasRequiredVim;function requireVim(){if(hasRequiredVim)return vim_1;hasRequiredVim=1;function vim2(hljs){return{name:"Vim Script",keywords:{ $pattern:/[!#@\w]+/,keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo d\ iffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll \ lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws re\ g res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 \ undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd\ breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcomman\ d delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iab\ clear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado \ luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearc\ h ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silen\ t sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft t\ previous trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv com\ plete_check add getwinposx getqflist getwinposy screencol clearmatches empty extend getcmdpos mzeval garbagecollect setreg ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable shiftwidth max sinh isdirectory synID system inputrestore winline atan visualmode inputlist tabpagewinnr round getregtype mapcheck hasmapto histdel argidx findfile sha256 exists toupper getcmdline taglist string getmatches bufnr strftime winwidth bufexists strtrans tabpagebuflist setcmdpos remote_read printf se\ tloclist getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval resolve libcallnr foldclosedend reverse filter has_key bufname str2float strlen setline getcharmod setbufvar index searchpos shellescape undofile foldclosed setqflist buflisted strchars str2nr virtcol floor remove undotree remote_expr winheight gettabwinvar reltime cursor tabpagenr finddir localtime acos getloclist search tanh matchend rename gettabvar strdisplaywidth type abs py3eval setwinvar tolower wildmenumode log1\ 0 spellsuggest bufloaded synconcealed nextnonblank server2client complete settabwinvar executable input wincol setmatches getftype hlID inputsave searchpair or screenrow line settabvar histadd deepcopy strpart remote_peek and eval getftime submatch screenchar winsaveview matchadd mkdir screenattr getfontname libcall reltimestr getfsize winnr invert pow getbufline byte2line soundfold repeat fnameescape tagfiles sin strwidth spellbadword trunc maparg log lispindent hostname setpos globpath remote_\ foreground getchar synIDattr fnamemodify cscope_connection stridx winbufnr indent min complete_add nr2char searchpairpos inputdialog values matchlist items hlexists strridx browsedir expand fmod pathshorten line2byte argc count getwinvar glob foldtextresult getreg foreground cosh matchdelete has char2nr simplify histget searchdecl iconv winrestcmd pumvisible writefile foldlevel haslocaldir keys cos matchstr foldtext histnr tan tempname getcwd byteidx getbufvar islocked escape eventhandler remote\ _send serverlist winrestview synstack pyeval prevnonblank readfile cindent filereadable changenr exp"},illegal:/;/,contains:[hljs.NUMBER_MODE,{className:"string",begin:"'",end:"'",illegal:"\\n"},{className:"string",begin:/"(\\"|\n\\|[^"\n])*"/},hljs.COMMENT('"',"$"),{className:"variable",begin:/[bwtglsav]:[\w\d_]+/},{begin:[/\b(?:function|function!)/,/\s+/,hljs.IDENT_RE],className:{1:"keyword",3:"title"},end:"$",relevance:0,contains:[{className:"params",begin:"\\(",end:"\\)"}]},{className:"symbo\ l",begin:/<[\w-]+>/}]}}return vim_1=vim2,vim_1}var wasm_1,hasRequiredWasm;function requireWasm(){if(hasRequiredWasm)return wasm_1;hasRequiredWasm=1;function wasm2(hljs){hljs.regex;const BLOCK_COMMENT=hljs.COMMENT(/\(;/,/;\)/);BLOCK_COMMENT.contains.push("self");const LINE_COMMENT=hljs.COMMENT(/;;/,/$/),KWS=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","\ get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],FUNCTION_REFERENCE={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},ARGUMENT={className:"variable",begin:/\$[\w_]+/},PARENS={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},NUMBER={className:"number",relevance:0, match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},TYPE={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},MATH_OPERATIONS={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/}; return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:KWS},contains:[LINE_COMMENT,BLOCK_COMMENT,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},ARGUMENT,PARENS,FUNCTION_REFERENCE,hljs.QUOTE_STRING_MODE,TYPE,MATH_OPERATIONS,NUMBER]}}return wasm_1=wasm2,wasm_1}var wren_1,hasRequiredWren;function requireWren(){if(hasRequiredWren)return wren_1;hasRequiredWren=1;function wren2(hljs){const regex=hljs.regex,IDENT_RE2=/[a-zA-Z]\w*/,KEYWORDS2=["as","break","class","con\ struct","continue","else","for","foreign","if","import","in","is","return","static","var","while"],LITERALS2=["true","false","null"],LANGUAGE_VARS=["this","super"],CORE_CLASSES=["Bool","Class","Fiber","Fn","List","Map","Null","Num","Object","Range","Sequence","String","System"],OPERATORS=["-","~",/\*/,"%",/\.\.\./,/\.\./,/\+/,"<<",">>",">=","<=","<",">",/\^/,/!=/,/!/,/\bis\b/,"==","&&","&",/\|\|/,/\|/,/\?:/,"="],FUNCTION={relevance:0,match:regex.concat(/\b(?!(if|while|for|else|super)\b)/,IDENT_RE2, /(?=\s*[({])/),className:"title.function"},FUNCTION_DEFINITION={match:regex.concat(regex.either(regex.concat(/\b(?!(if|while|for|else|super)\b)/,IDENT_RE2),regex.either(...OPERATORS)),/(?=\s*\([^)]+\)\s*\{)/),className:"title.function",starts:{contains:[{begin:/\(/,end:/\)/,contains:[{relevance:0,scope:"params",match:IDENT_RE2}]}]}},CLASS_DEFINITION={variants:[{match:[/class\s+/,IDENT_RE2,/\s+is\s+/,IDENT_RE2]},{match:[/class\s+/,IDENT_RE2]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:KEYWORDS2}, OPERATOR={relevance:0,match:regex.either(...OPERATORS),className:"operator"},TRIPLE_STRING={className:"string",begin:/"""/,end:/"""/},PROPERTY={className:"property",begin:regex.concat(/\./,regex.lookahead(IDENT_RE2)),end:IDENT_RE2,excludeBegin:!0,relevance:0},FIELD={relevance:0,match:regex.concat(/\b_/,IDENT_RE2),scope:"variable"},CLASS_REFERENCE={relevance:0,match:/\b[A-Z]+[a-z]+([A-Z]+[a-z]+)*/,scope:"title.class",keywords:{_:CORE_CLASSES}},NUMBER=hljs.C_NUMBER_MODE,SETTER={match:[IDENT_RE2,/\s*/, /=/,/\s*/,/\(/,IDENT_RE2,/\)\s*\{/],scope:{1:"title.function",3:"operator",6:"params"}},COMMENT_DOCS=hljs.COMMENT(/\/\*\*/,/\*\//,{contains:[{match:/@[a-z]+/,scope:"doctag"},"self"]}),SUBST={scope:"subst",begin:/%\(/,end:/\)/,contains:[NUMBER,CLASS_REFERENCE,FUNCTION,FIELD,OPERATOR]},STRING={scope:"string",begin:/"/,end:/"/,contains:[SUBST,{scope:"char.escape",variants:[{match:/\\\\|\\["0%abefnrtv]/},{match:/\\x[0-9A-F]{2}/},{match:/\\u[0-9A-F]{4}/},{match:/\\U[0-9A-F]{8}/}]}]};SUBST.contains.push( STRING);const ALL_KWS=[...KEYWORDS2,...LANGUAGE_VARS,...LITERALS2],VARIABLE={relevance:0,match:regex.concat("\\b(?!",ALL_KWS.join("|"),"\\b)",/[a-zA-Z_]\w*(?:[?!]|\b)/),className:"variable"};return{name:"Wren",keywords:{keyword:KEYWORDS2,"variable.language":LANGUAGE_VARS,literal:LITERALS2},contains:[{scope:"comment",variants:[{begin:[/#!?/,/[A-Za-z_]+(?=\()/],beginScope:{},keywords:{literal:LITERALS2},contains:[],end:/\)/},{begin:[/#!?/,/[A-Za-z_]+/],beginScope:{},end:/$/}]},NUMBER,STRING,TRIPLE_STRING, COMMENT_DOCS,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,CLASS_REFERENCE,CLASS_DEFINITION,SETTER,FUNCTION_DEFINITION,FUNCTION,OPERATOR,FIELD,PROPERTY,VARIABLE]}}return wren_1=wren2,wren_1}var x86asm_1,hasRequiredX86asm;function requireX86asm(){if(hasRequiredX86asm)return x86asm_1;hasRequiredX86asm=1;function x86asm2(hljs){return{name:"Intel x86 Assembly",case_insensitive:!0,keywords:{$pattern:"[.%]?"+hljs.IDENT_RE,keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad \ aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fi\ ld fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg inv\ lpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfa\ cc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr r\ dshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl c\ movl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltp\ s cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 ma\ skmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi \ cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd \ palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundp\ s roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd\ vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcm\ punord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd \ vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oq\ sd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmp\ false_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmov\ d vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmp\ eqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmu\ lld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vu\ comisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vf\ maddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfn\ madd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd\ 312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmadd\ sd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpm\ acswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk \ blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss \ vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vp\ ermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps\ vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherp\ f0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 h\ int_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_n\ op63",built_in:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm1\ 8 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bn\ d2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr",meta:"%define %xdefine %+ %undef %defstr %deftok %assign %st\ rcat %strlen %substr %rotate %elif %else %endif %if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist __FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend align alignb sectalign daz n\ odaz up down zero default option assume public bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[hljs.COMMENT(";","$",{relevance:0}), {className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*(\\.[0-9_]*)?(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},hljs.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"\ [^\\\\]`"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"subst",begin:"%[0-9]+",relevance:0},{className:"subst",begin:"%!S+",relevance:0},{className:"meta",begin:/^\s*\.[\w_-]+/}]}}return x86asm_1=x86asm2,x86asm_1}var xl_1,hasRequiredXl;function requireXl(){if(hasRequiredXl)return xl_1;hasRequiredXl=1;function xl2(hljs){const KWS=["if","then","else","do","while","until","for", "loop","import","with","is","as","where","when","by","data","constant","integer","real","text","name","boolean","symbol","infix","prefix","postfix","block","tree"],BUILT_INS2=["in","mod","rem","and","or","xor","not","abs","sign","floor","ceil","sqrt","sin","cos","tan","asin","acos","atan","exp","expm1","log","log2","log10","log1p","pi","at","text_length","text_range","text_find","text_replace","contains","page","slide","basic_slide","title_slide","title","subtitle","fade_in","fade_out","fade_at", "clear_color","color","line_color","line_width","texture_wrap","texture_transform","texture","scale_?x","scale_?y","scale_?z?","translate_?x","translate_?y","translate_?z?","rotate_?x","rotate_?y","rotate_?z?","rectangle","circle","ellipse","sphere","path","line_to","move_to","quad_to","curve_to","theme","background","contents","locally","time","mouse_?x","mouse_?y","mouse_buttons"],BUILTIN_MODULES=["ObjectLoader","Animate","MovieCredits","Slides","Filters","Shading","Materials","LensFlare","Map\ ping","VLCAudioVideo","StereoDecoder","PointCloud","NetworkAccess","RemoteControl","RegExp","ChromaKey","Snowfall","NodeJS","Speech","Charts"],KEYWORDS2={$pattern:/[a-zA-Z][a-zA-Z0-9_?]*/,keyword:KWS,literal:["true","false","nil"],built_in:BUILT_INS2.concat(BUILTIN_MODULES)},DOUBLE_QUOTE_TEXT={className:"string",begin:'"',end:'"',illegal:"\\n"},SINGLE_QUOTE_TEXT={className:"string",begin:"'",end:"'",illegal:"\\n"},LONG_TEXT={className:"string",begin:"<<",end:">>"},BASED_NUMBER={className:"number", begin:"[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?"},IMPORT={beginKeywords:"import",end:"$",keywords:KEYWORDS2,contains:[DOUBLE_QUOTE_TEXT]},FUNCTION_DEFINITION={className:"function",begin:/[a-z][^\n]*->/,returnBegin:!0,end:/->/,contains:[hljs.inherit(hljs.TITLE_MODE,{starts:{endsWithParent:!0,keywords:KEYWORDS2}})]};return{name:"XL",aliases:["tao"],keywords:KEYWORDS2,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,DOUBLE_QUOTE_TEXT,SINGLE_QUOTE_TEXT,LONG_TEXT,FUNCTION_DEFINITION, IMPORT,BASED_NUMBER,hljs.NUMBER_MODE]}}return xl_1=xl2,xl_1}var xquery_1,hasRequiredXquery;function requireXquery(){if(hasRequiredXquery)return xquery_1;hasRequiredXquery=1;function xquery2(_hljs){return{name:"XQuery",aliases:["xpath","xq","xqm"],case_insensitive:!1,illegal:/(proc)|(abstract)|(extends)|(until)|(#)/,keywords:{$pattern:/[a-zA-Z$][a-zA-Z0-9_:-]*/,keyword:["module","schema","namespace","boundary-space","preserve","no-preserve","strip","default","collation","base-uri","ordering","con\ text","decimal-format","decimal-separator","copy-namespaces","empty-sequence","except","exponent-separator","external","grouping-separator","inherit","no-inherit","lax","minus-sign","per-mille","percent","schema-attribute","schema-element","strict","unordered","zero-digit","declare","import","option","function","validate","variable","for","at","in","let","where","order","group","by","return","if","then","else","tumbling","sliding","window","start","when","only","end","previous","next","stable","\ ascending","descending","allowing","empty","greatest","least","some","every","satisfies","switch","case","typeswitch","try","catch","and","or","to","union","intersect","instance","of","treat","as","castable","cast","map","array","delete","insert","into","replace","value","rename","copy","modify","update"],type:["item","document-node","node","attribute","document","element","comment","namespace","namespace-node","processing-instruction","text","construction","xs:anyAtomicType","xs:untypedAtomic", "xs:duration","xs:time","xs:decimal","xs:float","xs:double","xs:gYearMonth","xs:gYear","xs:gMonthDay","xs:gMonth","xs:gDay","xs:boolean","xs:base64Binary","xs:hexBinary","xs:anyURI","xs:QName","xs:NOTATION","xs:dateTime","xs:dateTimeStamp","xs:date","xs:string","xs:normalizedString","xs:token","xs:language","xs:NMTOKEN","xs:Name","xs:NCName","xs:ID","xs:IDREF","xs:ENTITY","xs:integer","xs:nonPositiveInteger","xs:negativeInteger","xs:long","xs:int","xs:short","xs:byte","xs:nonNegativeInteger","xs\ :unisignedLong","xs:unsignedInt","xs:unsignedShort","xs:unsignedByte","xs:positiveInteger","xs:yearMonthDuration","xs:dayTimeDuration"],literal:["eq","ne","lt","le","gt","ge","is","self::","child::","descendant::","descendant-or-self::","attribute::","following::","following-sibling::","parent::","ancestor::","ancestor-or-self::","preceding::","preceding-sibling::","NaN"]},contains:[{className:"variable",begin:/[$][\w\-:]+/},{className:"built_in",variants:[{begin:/\barray:/,end:/(?:append|filter|flatten|fold-(?:left|right)|for-each(?:-pair)?|get|head|insert-before|join|put|remove|reverse|size|sort|subarray|tail)\b/}, {begin:/\bmap:/,end:/(?:contains|entry|find|for-each|get|keys|merge|put|remove|size)\b/},{begin:/\bmath:/,end:/(?:a(?:cos|sin|tan[2]?)|cos|exp(?:10)?|log(?:10)?|pi|pow|sin|sqrt|tan)\b/},{begin:/\bop:/,end:/\(/,excludeEnd:!0},{begin:/\bfn:/,end:/\(/,excludeEnd:!0},{begin:/[^/,end:/(\/[\w._:-]+>)/,subLanguage:"xml",contains:[{begin:/\{/,end:/\}/,subLanguage:"xquery"},"self"]}]}}return xquery_1=xquery2,xquery_1}var zephir_1,hasRequiredZephir;function requireZephir(){ if(hasRequiredZephir)return zephir_1;hasRequiredZephir=1;function zephir2(hljs){const STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null})]},TITLE_MODE=hljs.UNDERSCORE_TITLE_MODE,NUMBER={variants:[hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE]},KEYWORDS2="namespace class interface use extends function return abstract final public protected private static deprecated throw try catch\ Exception echo empty isset instanceof unset let var new const self require if else elseif switch case default do while loop for continue break likely unlikely __LINE__ __FILE__ __DIR__ __FUNCTION__ __CLASS__ __TRAIT__ __METHOD__ __NAMESPACE__ array boolean float double integer object resource string char long unsigned bool int uint ulong uchar true false null undefined";return{name:"Zephir",aliases:["zep"],keywords:KEYWORDS2,contains:[hljs.C_LINE_COMMENT_MODE,hljs.COMMENT(/\/\*/,/\*\//,{contains:[ {className:"doctag",begin:/@[A-Za-z]+/}]}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function fn",end:/[;{]/,excludeEnd:!0,illegal:/\$|\[|%/,contains:[TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:["self",hljs.C_BLOCK_COMMENT_MODE,STRING,NUMBER]}]},{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0, illegal:/[:($"]/,contains:[{beginKeywords:"extends implements"},TITLE_MODE]},{beginKeywords:"namespace",end:/;/,illegal:/[.']/,contains:[TITLE_MODE]},{beginKeywords:"use",end:/;/,contains:[TITLE_MODE]},{begin:/=>/},STRING,NUMBER]}}return zephir_1=zephir2,zephir_1}var lib,hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1;var hljs=requireCore$4();return hljs.registerLanguage("1c",require_1c()),hljs.registerLanguage("abnf",requireAbnf()),hljs.registerLanguage("acces\ slog",requireAccesslog()),hljs.registerLanguage("actionscript",requireActionscript()),hljs.registerLanguage("ada",requireAda()),hljs.registerLanguage("angelscript",requireAngelscript()),hljs.registerLanguage("apache",requireApache()),hljs.registerLanguage("applescript",requireApplescript()),hljs.registerLanguage("arcade",requireArcade()),hljs.registerLanguage("arduino",requireArduino()),hljs.registerLanguage("armasm",requireArmasm()),hljs.registerLanguage("xml",requireXml()),hljs.registerLanguage( "asciidoc",requireAsciidoc()),hljs.registerLanguage("aspectj",requireAspectj()),hljs.registerLanguage("autohotkey",requireAutohotkey()),hljs.registerLanguage("autoit",requireAutoit()),hljs.registerLanguage("avrasm",requireAvrasm()),hljs.registerLanguage("awk",requireAwk()),hljs.registerLanguage("axapta",requireAxapta()),hljs.registerLanguage("bash",requireBash()),hljs.registerLanguage("basic",requireBasic()),hljs.registerLanguage("bnf",requireBnf()),hljs.registerLanguage("brainfuck",requireBrainfuck()), hljs.registerLanguage("c",requireC()),hljs.registerLanguage("cal",requireCal()),hljs.registerLanguage("capnproto",requireCapnproto()),hljs.registerLanguage("ceylon",requireCeylon()),hljs.registerLanguage("clean",requireClean()),hljs.registerLanguage("clojure",requireClojure()),hljs.registerLanguage("clojure-repl",requireClojureRepl()),hljs.registerLanguage("cmake",requireCmake()),hljs.registerLanguage("coffeescript",requireCoffeescript()),hljs.registerLanguage("coq",requireCoq()),hljs.registerLanguage( "cos",requireCos()),hljs.registerLanguage("cpp",requireCpp()),hljs.registerLanguage("crmsh",requireCrmsh()),hljs.registerLanguage("crystal",requireCrystal()),hljs.registerLanguage("csharp",requireCsharp()),hljs.registerLanguage("csp",requireCsp()),hljs.registerLanguage("css",requireCss()),hljs.registerLanguage("d",requireD()),hljs.registerLanguage("markdown",requireMarkdown()),hljs.registerLanguage("dart",requireDart()),hljs.registerLanguage("delphi",requireDelphi()),hljs.registerLanguage("diff", requireDiff()),hljs.registerLanguage("django",requireDjango()),hljs.registerLanguage("dns",requireDns()),hljs.registerLanguage("dockerfile",requireDockerfile()),hljs.registerLanguage("dos",requireDos()),hljs.registerLanguage("dsconfig",requireDsconfig()),hljs.registerLanguage("dts",requireDts()),hljs.registerLanguage("dust",requireDust()),hljs.registerLanguage("ebnf",requireEbnf()),hljs.registerLanguage("elixir",requireElixir()),hljs.registerLanguage("elm",requireElm()),hljs.registerLanguage("ru\ by",requireRuby()),hljs.registerLanguage("erb",requireErb()),hljs.registerLanguage("erlang-repl",requireErlangRepl()),hljs.registerLanguage("erlang",requireErlang()),hljs.registerLanguage("excel",requireExcel()),hljs.registerLanguage("fix",requireFix()),hljs.registerLanguage("flix",requireFlix()),hljs.registerLanguage("fortran",requireFortran()),hljs.registerLanguage("fsharp",requireFsharp()),hljs.registerLanguage("gams",requireGams()),hljs.registerLanguage("gauss",requireGauss()),hljs.registerLanguage( "gcode",requireGcode()),hljs.registerLanguage("gherkin",requireGherkin()),hljs.registerLanguage("glsl",requireGlsl()),hljs.registerLanguage("gml",requireGml()),hljs.registerLanguage("go",requireGo()),hljs.registerLanguage("golo",requireGolo()),hljs.registerLanguage("gradle",requireGradle()),hljs.registerLanguage("graphql",requireGraphql()),hljs.registerLanguage("groovy",requireGroovy()),hljs.registerLanguage("haml",requireHaml()),hljs.registerLanguage("handlebars",requireHandlebars()),hljs.registerLanguage( "haskell",requireHaskell()),hljs.registerLanguage("haxe",requireHaxe()),hljs.registerLanguage("hsp",requireHsp()),hljs.registerLanguage("http",requireHttp()),hljs.registerLanguage("hy",requireHy()),hljs.registerLanguage("inform7",requireInform7()),hljs.registerLanguage("ini",requireIni()),hljs.registerLanguage("irpf90",requireIrpf90()),hljs.registerLanguage("isbl",requireIsbl()),hljs.registerLanguage("java",requireJava()),hljs.registerLanguage("javascript",requireJavascript()),hljs.registerLanguage( "jboss-cli",requireJbossCli()),hljs.registerLanguage("json",requireJson()),hljs.registerLanguage("julia",requireJulia()),hljs.registerLanguage("julia-repl",requireJuliaRepl()),hljs.registerLanguage("kotlin",requireKotlin()),hljs.registerLanguage("lasso",requireLasso()),hljs.registerLanguage("latex",requireLatex()),hljs.registerLanguage("ldif",requireLdif()),hljs.registerLanguage("leaf",requireLeaf()),hljs.registerLanguage("less",requireLess()),hljs.registerLanguage("lisp",requireLisp()),hljs.registerLanguage( "livecodeserver",requireLivecodeserver()),hljs.registerLanguage("livescript",requireLivescript()),hljs.registerLanguage("llvm",requireLlvm()),hljs.registerLanguage("lsl",requireLsl()),hljs.registerLanguage("lua",requireLua()),hljs.registerLanguage("makefile",requireMakefile()),hljs.registerLanguage("mathematica",requireMathematica()),hljs.registerLanguage("matlab",requireMatlab()),hljs.registerLanguage("maxima",requireMaxima()),hljs.registerLanguage("mel",requireMel()),hljs.registerLanguage("mer\ cury",requireMercury()),hljs.registerLanguage("mipsasm",requireMipsasm()),hljs.registerLanguage("mizar",requireMizar()),hljs.registerLanguage("perl",requirePerl()),hljs.registerLanguage("mojolicious",requireMojolicious()),hljs.registerLanguage("monkey",requireMonkey()),hljs.registerLanguage("moonscript",requireMoonscript()),hljs.registerLanguage("n1ql",requireN1ql()),hljs.registerLanguage("nestedtext",requireNestedtext()),hljs.registerLanguage("nginx",requireNginx()),hljs.registerLanguage("nim", requireNim()),hljs.registerLanguage("nix",requireNix()),hljs.registerLanguage("node-repl",requireNodeRepl()),hljs.registerLanguage("nsis",requireNsis()),hljs.registerLanguage("objectivec",requireObjectivec()),hljs.registerLanguage("ocaml",requireOcaml()),hljs.registerLanguage("openscad",requireOpenscad()),hljs.registerLanguage("oxygene",requireOxygene()),hljs.registerLanguage("parser3",requireParser3()),hljs.registerLanguage("pf",requirePf()),hljs.registerLanguage("pgsql",requirePgsql()),hljs.registerLanguage( "php",requirePhp()),hljs.registerLanguage("php-template",requirePhpTemplate()),hljs.registerLanguage("plaintext",requirePlaintext()),hljs.registerLanguage("pony",requirePony()),hljs.registerLanguage("powershell",requirePowershell()),hljs.registerLanguage("processing",requireProcessing()),hljs.registerLanguage("profile",requireProfile()),hljs.registerLanguage("prolog",requireProlog()),hljs.registerLanguage("properties",requireProperties$2()),hljs.registerLanguage("protobuf",requireProtobuf()),hljs. registerLanguage("puppet",requirePuppet()),hljs.registerLanguage("purebasic",requirePurebasic()),hljs.registerLanguage("python",requirePython()),hljs.registerLanguage("python-repl",requirePythonRepl()),hljs.registerLanguage("q",requireQ()),hljs.registerLanguage("qml",requireQml()),hljs.registerLanguage("r",requireR()),hljs.registerLanguage("reasonml",requireReasonml()),hljs.registerLanguage("rib",requireRib()),hljs.registerLanguage("roboconf",requireRoboconf()),hljs.registerLanguage("routeros",requireRouteros()), hljs.registerLanguage("rsl",requireRsl()),hljs.registerLanguage("ruleslanguage",requireRuleslanguage()),hljs.registerLanguage("rust",requireRust()),hljs.registerLanguage("sas",requireSas()),hljs.registerLanguage("scala",requireScala()),hljs.registerLanguage("scheme",requireScheme()),hljs.registerLanguage("scilab",requireScilab()),hljs.registerLanguage("scss",requireScss()),hljs.registerLanguage("shell",requireShell()),hljs.registerLanguage("smali",requireSmali()),hljs.registerLanguage("smalltalk", requireSmalltalk()),hljs.registerLanguage("sml",requireSml()),hljs.registerLanguage("sqf",requireSqf()),hljs.registerLanguage("sql",requireSql()),hljs.registerLanguage("stan",requireStan()),hljs.registerLanguage("stata",requireStata()),hljs.registerLanguage("step21",requireStep21()),hljs.registerLanguage("stylus",requireStylus()),hljs.registerLanguage("subunit",requireSubunit()),hljs.registerLanguage("swift",requireSwift()),hljs.registerLanguage("taggerscript",requireTaggerscript()),hljs.registerLanguage( "yaml",requireYaml()),hljs.registerLanguage("tap",requireTap()),hljs.registerLanguage("tcl",requireTcl()),hljs.registerLanguage("thrift",requireThrift()),hljs.registerLanguage("tp",requireTp()),hljs.registerLanguage("twig",requireTwig()),hljs.registerLanguage("typescript",requireTypescript()),hljs.registerLanguage("vala",requireVala()),hljs.registerLanguage("vbnet",requireVbnet()),hljs.registerLanguage("vbscript",requireVbscript()),hljs.registerLanguage("vbscript-html",requireVbscriptHtml()),hljs. registerLanguage("verilog",requireVerilog()),hljs.registerLanguage("vhdl",requireVhdl()),hljs.registerLanguage("vim",requireVim()),hljs.registerLanguage("wasm",requireWasm()),hljs.registerLanguage("wren",requireWren()),hljs.registerLanguage("x86asm",requireX86asm()),hljs.registerLanguage("xl",requireXl()),hljs.registerLanguage("xquery",requireXquery()),hljs.registerLanguage("zephir",requireZephir()),hljs.HighlightJS=hljs,hljs.default=hljs,lib=hljs,lib}var libExports=requireLib();const HighlightJS$1=getDefaultExportFromCjs( libExports);function highlightCode(code2,language2){if(!code2)return"";try{const lang=language2.toLowerCase();return HighlightJS$1.getLanguage(lang)?HighlightJS$1.highlight(code2,{language:lang}).value:HighlightJS$1.highlightAuto(code2).value}catch{return code2.replace(AMPERSAND_REGEX,"&").replace(LT_REGEX,"<").replace(GT_REGEX,">")}}function detectIncompleteCodeBlock(markdown2){const fencePattern=new RegExp(FENCE_PATTERN.source,FENCE_PATTERN.flags),fences=[];let fenceMatch;for(;(fenceMatch= fencePattern.exec(markdown2))!==null;){const pos=fenceMatch[0].startsWith(NEWLINE)?fenceMatch.index+1:fenceMatch.index;fences.push(pos)}if(fences.length%2===0)return null;const openingIndex=fences[fences.length-1],langMatch=markdown2.slice(openingIndex+3).match(LANG_PATTERN),language2=langMatch?.[1]||DEFAULT_LANGUAGE,codeStartIndex=openingIndex+3+(langMatch?.[0]?.length??0),code2=markdown2.slice(codeStartIndex);return{language:language2,code:code2,openingIndex}}function setConfigValue(config2,key2,value){ key2 in config2&&(config2[key2]=value)}function getConfigValue(config2,key2){return config2[key2]}function configToParameterRecord(config2,keys2){const record2={};for(const key2 of keys2){const value=getConfigValue(config2,key2);value!==void 0&&(record2[key2]=value)}return record2}function buildProxiedUrl(targetUrl){const proxyPath=`${base}${CORS_PROXY_ENDPOINT}`,proxyUrl=new URL(proxyPath,window.location.origin);return proxyUrl.searchParams.set(CORS_PROXY_URL_PARAM,targetUrl),proxyUrl}function buildProxiedHeaders(headers){ const proxiedHeaders={};for(const[key2,value]of Object.entries(headers))proxiedHeaders[`x-proxy-header-${key2}`]=value;return proxiedHeaders}function getProxiedUrlString(targetUrl){return buildProxiedUrl(targetUrl).href}function createMessageCountMap(exportedData){const countMap=new Map;for(const item of exportedData)countMap.set(item.conv.id,item.messages.length);return countMap}const bars=Array(12).fill(0);var root_1$10=from_html('
    '),root$1E=from_html('
');function Loader($$anchor,$$props){push$1($$props,!0);var div=root$1E(),div_1=child(div);each(div_1,23,()=>bars,(_,i)=>`spinner-bar-${i}`,($$anchor2,_)=>{var div_2=root_1$10();append($$anchor2,div_2)}),reset(div_1),reset(div),template_effect($0=>{set_class(div,1,$0),set_attribute(div,"data-visible",$$props.visible)},[()=>clsx(["sonner-loading-wrapper",$$props.class].filter(Boolean).join(" "))]),append($$anchor,div),pop()}function cn(...classes){return classes. filter(Boolean).join(" ")}const isBrowser$1=typeof document<"u",defaultWindow$2=typeof window<"u"?window:void 0;function getActiveElement$2(document2){let activeElement=document2.activeElement;for(;activeElement?.shadowRoot;){const node2=activeElement.shadowRoot.activeElement;if(node2===activeElement)break;activeElement=node2}return activeElement}let ActiveElement$2=class{#document;#subscribe;constructor(options={}){const{window:window2=defaultWindow$2,document:document2=window2?.document}=options; window2!==void 0&&(this.#document=document2,this.#subscribe=createSubscriber(update2=>{const cleanupFocusIn=on(window2,"focusin",update2),cleanupFocusOut=on(window2,"focusout",update2);return()=>{cleanupFocusIn(),cleanupFocusOut()}}))}get current(){return this.#subscribe?.(),this.#document?getActiveElement$2(this.#document):null}};new ActiveElement$2;class Context2{#name;#key;constructor(name){this.#name=name,this.#key=Symbol(name)}get key(){return this.#key}exists(){return hasContext(this.#key)}get(){ const context=getContext(this.#key);if(context===void 0)throw new Error(`Context "${this.#name}" not found`);return context}getOr(fallback2){const context=getContext(this.#key);return context===void 0?fallback2:context}set(context){return setContext(this.#key,context)}}const sonnerContext=new Context2("");let toastsCounter=0;class ToastState{#toasts=state$1(proxy([]));get toasts(){return get$4(this.#toasts)}set toasts(value){set$1(this.#toasts,value,!0)}#heights=state$1(proxy([]));get heights(){ return get$4(this.#heights)}set heights(value){set$1(this.#heights,value,!0)}#findToastIdx=id2=>{const idx=this.toasts.findIndex(toast2=>toast2.id===id2);return idx===-1?null:idx};addToast=data=>{isBrowser$1&&this.toasts.unshift(data)};updateToast=({id:id2,data,type:type2,message})=>{const toastIdx=this.toasts.findIndex(toast2=>toast2.id===id2),toastToUpdate=this.toasts[toastIdx];this.toasts[toastIdx]={...toastToUpdate,...data,id:id2,title:message,type:type2,updated:!0}};create=data=>{const{message, ...rest}=data,id2=typeof data?.id=="number"||data.id&&data.id?.length>0?data.id:toastsCounter++,dismissable=data.dismissable===void 0?!0:data.dismissable,type2=data.type===void 0?"default":data.type;return untrack$1(()=>{this.toasts.find(toast2=>toast2.id===id2)?this.updateToast({id:id2,data,type:type2,message,dismissable}):this.addToast({...rest,id:id2,title:message,dismissable,type:type2})}),id2};dismiss=id2=>(untrack$1(()=>{if(id2===void 0){this.toasts=this.toasts.map(toast2=>({...toast2,dismiss:!0})); return}const toastIdx=this.toasts.findIndex(toast2=>toast2.id===id2);this.toasts[toastIdx]&&(this.toasts[toastIdx]={...this.toasts[toastIdx],dismiss:!0})}),id2);remove=id2=>{if(id2===void 0){this.toasts=[];return}const toastIdx=this.#findToastIdx(id2);if(toastIdx!==null)return this.toasts.splice(toastIdx,1),id2};message=(message,data)=>this.create({...data,type:"default",message});error=(message,data)=>this.create({...data,type:"error",message});success=(message,data)=>this.create({...data,type:"\ success",message});info=(message,data)=>this.create({...data,type:"info",message});warning=(message,data)=>this.create({...data,type:"warning",message});loading=(message,data)=>this.create({...data,type:"loading",message});promise=(promise,data)=>{if(!data)return;let id2;data.loading!==void 0&&(id2=this.create({...data,promise,type:"loading",message:typeof data.loading=="string"?data.loading:data.loading()}));const p2=promise instanceof Promise?promise:promise();let shouldDismiss=id2!==void 0;return p2. then(response=>{if(typeof response=="object"&&response&&"ok"in response&&typeof response.ok=="boolean"&&!response.ok){shouldDismiss=!1;const message=constructPromiseErrorMessage(response);this.create({id:id2,type:"error",message})}else if(data.success!==void 0){shouldDismiss=!1;const message=typeof data.success=="function"?data.success(response):data.success;this.create({id:id2,type:"success",message})}}).catch(error2=>{if(data.error!==void 0){shouldDismiss=!1;const message=typeof data.error=="f\ unction"?data.error(error2):data.error;this.create({id:id2,type:"error",message})}}).finally(()=>{shouldDismiss&&(this.dismiss(id2),id2=void 0),data.finally?.()}),id2};custom=(component2,data)=>{const id2=data?.id||toastsCounter++;return this.create({component:component2,id:id2,...data}),id2};removeHeight=id2=>{this.heights=this.heights.filter(height=>height.toastId!==id2)};setHeight=data=>{const toastIdx=this.#findToastIdx(data.toastId);if(toastIdx===null){this.heights.push(data);return}this.heights[toastIdx]= data};reset=()=>{this.toasts=[],this.heights=[]}}function constructPromiseErrorMessage(response){return response&&typeof response=="object"&&"status"in response?`HTTP error! Status: ${response.status}`:`Error! ${response}`}const toastState=new ToastState;function toastFunction(message,data){return toastState.create({message,...data})}class SonnerState{#activeToasts=user_derived(()=>toastState.toasts.filter(toast2=>!toast2.dismiss));get toasts(){return get$4(this.#activeToasts)}}const basicToast=toastFunction, toast=Object.assign(basicToast,{success:toastState.success,info:toastState.info,warning:toastState.warning,error:toastState.error,custom:toastState.custom,message:toastState.message,promise:toastState.promise,dismiss:toastState.dismiss,loading:toastState.loading,getActiveToasts:()=>toastState.toasts.filter(toast2=>!toast2.dismiss)});function isAction(action2){return action2.label!==void 0}function useDocumentHidden(){let current2=state$1(proxy(typeof document<"u"?document.hidden:!1));return user_effect( ()=>on(document,"visibilitychange",()=>{set$1(current2,document.hidden,!0)})),{get current(){return get$4(current2)}}}const TOAST_LIFETIME$1=4e3,GAP$1=14,SWIPE_THRESHOLD=45,TIME_BEFORE_UNMOUNT=200,SCALE_MULTIPLIER=.05,DEFAULT_TOAST_CLASSES={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function getDefaultSwipeDirections(position2){const[y,x]=position2.split("-"),directions=[];return y&& directions.push(y),x&&directions.push(x),directions}function getDampening(delta){return 1/(1.5+Math.abs(delta)/20)}var root_2$17=from_html("
"),root_4$y=from_html(''),root_7$s=from_html('
'),root_24$4=from_html('
'),root_30$3=from_html(''),root_34$1=from_html(''),root_6$A=from_html('
',1),root$1D=from_html('
  • ');function Toast($$anchor,$$props){push$1($$props,!0);const LoadingIcon=$$anchor2=>{var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor3=>{var div=root_2$17(),node_1=child(div);snippet(node_1,()=>$$props.loadingIcon),reset(div),template_effect($0=>{set_class(div,1,$0),set_attribute(div,"data-visible",get$4(toastType)==="loading")},[()=>clsx(cn(get$4(classes)?. loader,$$props.toast?.classes?.loader,"sonner-loader"))]),append($$anchor3,div)},alternate=$$anchor3=>{{let $0=user_derived(()=>cn(get$4(classes)?.loader,$$props.toast.classes?.loader)),$1=user_derived(()=>get$4(toastType)==="loading");Loader($$anchor3,{get class(){return get$4($0)},get visible(){return get$4($1)}})}};if_block(node2,$$render=>{$$props.loadingIcon?$$render(consequent):$$render(alternate,!1)})}append($$anchor2,fragment)};let cancelButtonStyle=prop($$props,"cancelButtonStyle",3,""), actionButtonStyle=prop($$props,"actionButtonStyle",3,""),descriptionClass=prop($$props,"descriptionClass",3,""),unstyled=prop($$props,"unstyled",3,!1),defaultRichColors=prop($$props,"defaultRichColors",3,!1);const defaultClasses={...DEFAULT_TOAST_CLASSES};let mounted=state$1(!1),removed=state$1(!1),swiping=state$1(!1),swipeOut=state$1(!1),isSwiped=state$1(!1),offsetBeforeRemove=state$1(0),initialHeight=state$1(0),remainingTime=$$props.toast.duration||$$props.duration||TOAST_LIFETIME$1,toastRef=state$1( void 0),swipeDirection=state$1(null),swipeOutDirection=state$1(null);const isFront=user_derived(()=>$$props.index===0),isVisible=user_derived(()=>$$props.index+1<=$$props.visibleToasts),toastType=user_derived(()=>$$props.toast.type),dismissable=user_derived(()=>$$props.toast.dismissable!==!1),toastClass=user_derived(()=>$$props.toast.class||""),toastDescriptionClass=user_derived(()=>$$props.toast.descriptionClass||""),heightIndex=user_derived(()=>toastState.heights.findIndex(height=>height.toastId=== $$props.toast.id)||0),closeButton=user_derived(()=>$$props.toast.closeButton??$$props.closeButton),duration2=user_derived(()=>$$props.toast.duration??$$props.duration??TOAST_LIFETIME$1);let pointerStart=null;const coords=user_derived(()=>$$props.position.split("-")),toastsHeightBefore=user_derived(()=>toastState.heights.reduce((prev2,curr,reducerIndex)=>reducerIndex>=get$4(heightIndex)?prev2:prev2+curr.height,0)),isDocumentHidden=useDocumentHidden(),invert=user_derived(()=>$$props.toast.invert|| $$props.invert),disabled=user_derived(()=>get$4(toastType)==="loading"),classes=user_derived(()=>({...defaultClasses,...$$props.classes})),toastTitle=user_derived(()=>$$props.toast.title),toastDescription=user_derived(()=>$$props.toast.description);let closeTimerStartTime=state$1(0),lastCloseTimerStartTime=state$1(0);const offset2=user_derived(()=>Math.round(get$4(heightIndex)*GAP$1+get$4(toastsHeightBefore)));user_effect(()=>{get$4(toastTitle),get$4(toastDescription);let scale2;$$props.expanded|| $$props.expandByDefault?scale2=1:scale2=1-$$props.index*SCALE_MULTIPLIER;const toastEl=untrack$1(()=>get$4(toastRef));if(toastEl===void 0)return;toastEl.style.setProperty("height","auto");const offsetHeight=toastEl.offsetHeight,rectHeight=toastEl.getBoundingClientRect().height,scaledRectHeight=Math.round(rectHeight/scale2+Number.EPSILON&100)/100;toastEl.style.removeProperty("height");let finalHeight;Math.abs(scaledRectHeight-offsetHeight)<1?finalHeight=scaledRectHeight:finalHeight=offsetHeight,set$1( initialHeight,finalHeight,!0),untrack$1(()=>{toastState.setHeight({toastId:$$props.toast.id,height:finalHeight})})});function deleteToast(){set$1(removed,!0),set$1(offsetBeforeRemove,get$4(offset2),!0),toastState.removeHeight($$props.toast.id),setTimeout(()=>{toastState.remove($$props.toast.id)},TIME_BEFORE_UNMOUNT)}let timeoutId;const isPromiseLoadingOrInfiniteDuration=user_derived(()=>$$props.toast.promise&&get$4(toastType)==="loading"||$$props.toast.duration===Number.POSITIVE_INFINITY);function startTimer(){ set$1(closeTimerStartTime,new Date().getTime(),!0),timeoutId=setTimeout(()=>{$$props.toast.onAutoClose?.($$props.toast),deleteToast()},remainingTime)}function pauseTimer(){if(get$4(lastCloseTimerStartTime){$$props.toast.updated&&(clearTimeout(timeoutId),remainingTime=get$4(duration2),startTimer())}), user_effect(()=>(get$4(isPromiseLoadingOrInfiniteDuration)||($$props.expanded||$$props.interacting||isDocumentHidden.current?pauseTimer():startTimer()),()=>clearTimeout(timeoutId))),onMount$1(()=>{set$1(mounted,!0);const height=get$4(toastRef)?.getBoundingClientRect().height;return set$1(initialHeight,height,!0),toastState.setHeight({toastId:$$props.toast.id,height}),()=>{toastState.removeHeight($$props.toast.id)}}),user_effect(()=>{$$props.toast.delete&&untrack$1(()=>{deleteToast(),$$props.toast. onDismiss?.($$props.toast)})});const handlePointerDown=event2=>{if(get$4(disabled))return;set$1(offsetBeforeRemove,get$4(offset2),!0);const target2=event2.target;target2.setPointerCapture(event2.pointerId),target2.tagName!=="BUTTON"&&(set$1(swiping,!0),pointerStart={x:event2.clientX,y:event2.clientY})},handlePointerUp=()=>{if(get$4(swipeOut)||!get$4(dismissable))return;pointerStart=null;const swipeAmountX=Number(get$4(toastRef)?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),swipeAmountY=Number( get$4(toastRef)?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),timeTaken=new Date().getTime()-0,swipeAmount=get$4(swipeDirection)==="x"?swipeAmountX:swipeAmountY,velocity=Math.abs(swipeAmount)/timeTaken;if(Math.abs(swipeAmount)>=SWIPE_THRESHOLD||velocity>.11){set$1(offsetBeforeRemove,get$4(offset2),!0),$$props.toast.onDismiss?.($$props.toast),get$4(swipeDirection)==="x"?set$1(swipeOutDirection,swipeAmountX>0?"right":"left",!0):set$1(swipeOutDirection,swipeAmountY>0?"down":"up", !0),deleteToast(),set$1(swipeOut,!0);return}else get$4(toastRef)?.style.setProperty("--swipe-amount-x","0px"),get$4(toastRef)?.style.setProperty("--swipe-amount-y","0px");set$1(isSwiped,!1),set$1(swiping,!1),set$1(swipeDirection,null)},handlePointerMove=event2=>{if(!pointerStart||!get$4(dismissable)||(window.getSelection()?.toString().length??-1)>0)return;const yDelta=event2.clientY-pointerStart.y,xDelta=event2.clientX-pointerStart.x,swipeDirections=$$props.swipeDirections??getDefaultSwipeDirections( $$props.position);!get$4(swipeDirection)&&(Math.abs(xDelta)>1||Math.abs(yDelta)>1)&&set$1(swipeDirection,Math.abs(xDelta)>Math.abs(yDelta)?"x":"y",!0);let swipeAmount={x:0,y:0};if(get$4(swipeDirection)==="y"){if(swipeDirections.includes("top")||swipeDirections.includes("bottom"))if(swipeDirections.includes("top")&&yDelta<0||swipeDirections.includes("bottom")&&yDelta>0)swipeAmount.y=yDelta;else{const dampenedDelta=yDelta*getDampening(yDelta);swipeAmount.y=Math.abs(dampenedDelta)0)swipeAmount.x=xDelta;else{const dampenedDelta=xDelta*getDampening(xDelta);swipeAmount.x=Math.abs(dampenedDelta)0||Math.abs(swipeAmount.y)>0)&&set$1(isSwiped,!0),get$4(toastRef)?.style.setProperty("--swipe-amount-x",`${swipeAmount. x}px`),get$4(toastRef)?.style.setProperty("--swipe-amount-y",`${swipeAmount.y}px`)},handleDragEnd=()=>{set$1(swiping,!1),set$1(swipeDirection,null),pointerStart=null},icon=user_derived(()=>$$props.toast.icon?$$props.toast.icon:get$4(toastType)==="success"?$$props.successIcon:get$4(toastType)==="error"?$$props.errorIcon:get$4(toastType)==="warning"?$$props.warningIcon:get$4(toastType)==="info"?$$props.infoIcon:get$4(toastType)==="loading"?$$props.loadingIcon:null);var li2=root$1D();set_attribute( li2,"tabindex",0);let styles2;li2.__pointermove=handlePointerMove,li2.__pointerup=handlePointerUp,li2.__pointerdown=handlePointerDown;var node_2=child(li2);{var consequent_1=$$anchor2=>{var button=root_4$y();button.__click=()=>{get$4(disabled)||!get$4(dismissable)||(deleteToast(),$$props.toast.onDismiss?.($$props.toast))};var node_3=child(button);snippet(node_3,()=>$$props.closeIcon??noop$3),reset(button),template_effect($0=>{set_attribute(button,"aria-label",$$props.closeButtonAriaLabel),set_attribute( button,"data-disabled",get$4(disabled)),set_class(button,1,$0)},[()=>clsx(cn(get$4(classes)?.closeButton,$$props.toast?.classes?.closeButton))]),append($$anchor2,button)};if_block(node_2,$$render=>{get$4(closeButton)&&!$$props.toast.component&&get$4(toastType)!=="loading"&&$$props.closeIcon!==null&&$$render(consequent_1)})}var node_4=sibling(node_2,2);{var consequent_2=$$anchor2=>{const Component=user_derived(()=>$$props.toast.component);var fragment_2=comment$2(),node_5=first_child(fragment_2); component(node_5,()=>get$4(Component),($$anchor3,Component_1)=>{Component_1($$anchor3,spread_props(()=>$$props.toast.componentProps,{closeToast:deleteToast}))}),append($$anchor2,fragment_2)},alternate_10=$$anchor2=>{var fragment_3=root_6$A(),node_6=first_child(fragment_3);{var consequent_11=$$anchor3=>{var div_1=root_7$s(),node_7=child(div_1);{var consequent_4=$$anchor4=>{var fragment_4=comment$2(),node_8=first_child(fragment_4);{var consequent_3=$$anchor5=>{var fragment_5=comment$2(),node_9=first_child( fragment_5);component(node_9,()=>$$props.toast.icon,($$anchor6,toast_icon)=>{toast_icon($$anchor6,{})}),append($$anchor5,fragment_5)},alternate_1=$$anchor5=>{LoadingIcon($$anchor5)};if_block(node_8,$$render=>{$$props.toast.icon?$$render(consequent_3):$$render(alternate_1,!1)})}append($$anchor4,fragment_4)};if_block(node_7,$$render=>{($$props.toast.promise||get$4(toastType)==="loading")&&$$render(consequent_4)})}var node_10=sibling(node_7,2);{var consequent_10=$$anchor4=>{var fragment_7=comment$2(), node_11=first_child(fragment_7);{var consequent_5=$$anchor5=>{var fragment_8=comment$2(),node_12=first_child(fragment_8);component(node_12,()=>$$props.toast.icon,($$anchor6,toast_icon_1)=>{toast_icon_1($$anchor6,{})}),append($$anchor5,fragment_8)},alternate_5=$$anchor5=>{var fragment_9=comment$2(),node_13=first_child(fragment_9);{var consequent_6=$$anchor6=>{var fragment_10=comment$2(),node_14=first_child(fragment_10);snippet(node_14,()=>$$props.successIcon??noop$3),append($$anchor6,fragment_10)}, alternate_4=$$anchor6=>{var fragment_11=comment$2(),node_15=first_child(fragment_11);{var consequent_7=$$anchor7=>{var fragment_12=comment$2(),node_16=first_child(fragment_12);snippet(node_16,()=>$$props.errorIcon??noop$3),append($$anchor7,fragment_12)},alternate_3=$$anchor7=>{var fragment_13=comment$2(),node_17=first_child(fragment_13);{var consequent_8=$$anchor8=>{var fragment_14=comment$2(),node_18=first_child(fragment_14);snippet(node_18,()=>$$props.warningIcon??noop$3),append($$anchor8,fragment_14)}, alternate_2=$$anchor8=>{var fragment_15=comment$2(),node_19=first_child(fragment_15);{var consequent_9=$$anchor9=>{var fragment_16=comment$2(),node_20=first_child(fragment_16);snippet(node_20,()=>$$props.infoIcon??noop$3),append($$anchor9,fragment_16)};if_block(node_19,$$render=>{get$4(toastType)==="info"&&$$render(consequent_9)},!0)}append($$anchor8,fragment_15)};if_block(node_17,$$render=>{get$4(toastType)==="warning"?$$render(consequent_8):$$render(alternate_2,!1)},!0)}append($$anchor7,fragment_13)}; if_block(node_15,$$render=>{get$4(toastType)==="error"?$$render(consequent_7):$$render(alternate_3,!1)},!0)}append($$anchor6,fragment_11)};if_block(node_13,$$render=>{get$4(toastType)==="success"?$$render(consequent_6):$$render(alternate_4,!1)},!0)}append($$anchor5,fragment_9)};if_block(node_11,$$render=>{$$props.toast.icon?$$render(consequent_5):$$render(alternate_5,!1)})}append($$anchor4,fragment_7)};if_block(node_10,$$render=>{$$props.toast.type!=="loading"&&$$render(consequent_10)})}reset(div_1), template_effect($0=>set_class(div_1,1,$0),[()=>clsx(cn(get$4(classes)?.icon,$$props.toast?.classes?.icon))]),append($$anchor3,div_1)};if_block(node_6,$$render=>{(get$4(toastType)||$$props.toast.icon||$$props.toast.promise)&&$$props.toast.icon!==null&&(get$4(icon)!==null||$$props.toast.icon)&&$$render(consequent_11)})}var div_2=sibling(node_6,2),div_3=child(div_2),node_21=child(div_3);{var consequent_13=$$anchor3=>{var fragment_17=comment$2(),node_22=first_child(fragment_17);{var consequent_12=$$anchor4=>{ const Title=user_derived(()=>$$props.toast.title);var fragment_18=comment$2(),node_23=first_child(fragment_18);component(node_23,()=>get$4(Title),($$anchor5,Title_1)=>{Title_1($$anchor5,spread_props(()=>$$props.toast.componentProps))}),append($$anchor4,fragment_18)},alternate_6=$$anchor4=>{var text2=text$8();template_effect(()=>set_text(text2,$$props.toast.title)),append($$anchor4,text2)};if_block(node_22,$$render=>{typeof $$props.toast.title!="string"?$$render(consequent_12):$$render(alternate_6, !1)})}append($$anchor3,fragment_17)};if_block(node_21,$$render=>{$$props.toast.title&&$$render(consequent_13)})}reset(div_3);var node_24=sibling(div_3,2);{var consequent_15=$$anchor3=>{var div_4=root_24$4(),node_25=child(div_4);{var consequent_14=$$anchor4=>{const Description=user_derived(()=>$$props.toast.description);var fragment_20=comment$2(),node_26=first_child(fragment_20);component(node_26,()=>get$4(Description),($$anchor5,Description_1)=>{Description_1($$anchor5,spread_props(()=>$$props. toast.componentProps))}),append($$anchor4,fragment_20)},alternate_7=$$anchor4=>{var text_1=text$8();template_effect(()=>set_text(text_1,$$props.toast.description)),append($$anchor4,text_1)};if_block(node_25,$$render=>{typeof $$props.toast.description!="string"?$$render(consequent_14):$$render(alternate_7,!1)})}reset(div_4),template_effect($0=>set_class(div_4,1,$0),[()=>clsx(cn(descriptionClass(),get$4(toastDescriptionClass),get$4(classes)?.description,$$props.toast.classes?.description))]),append( $$anchor3,div_4)};if_block(node_24,$$render=>{$$props.toast.description&&$$render(consequent_15)})}reset(div_2);var node_27=sibling(div_2,2);{var consequent_18=$$anchor3=>{var fragment_22=comment$2(),node_28=first_child(fragment_22);{var consequent_16=$$anchor4=>{var fragment_23=comment$2(),node_29=first_child(fragment_23);component(node_29,()=>$$props.toast.cancel,($$anchor5,toast_cancel)=>{toast_cancel($$anchor5,{})}),append($$anchor4,fragment_23)},alternate_8=$$anchor4=>{var fragment_24=comment$2(), node_30=first_child(fragment_24);{var consequent_17=$$anchor5=>{var button_1=root_30$3();button_1.__click=event2=>{isAction($$props.toast.cancel)&&get$4(dismissable)&&($$props.toast.cancel?.onClick?.(event2),deleteToast())};var text_2=child(button_1,!0);reset(button_1),template_effect($0=>{set_style(button_1,$$props.toast.cancelButtonStyle??cancelButtonStyle()),set_class(button_1,1,$0),set_text(text_2,$$props.toast.cancel.label)},[()=>clsx(cn(get$4(classes)?.cancelButton,$$props.toast?.classes?. cancelButton))]),append($$anchor5,button_1)};if_block(node_30,$$render=>{isAction($$props.toast.cancel)&&$$render(consequent_17)},!0)}append($$anchor4,fragment_24)};if_block(node_28,$$render=>{typeof $$props.toast.cancel=="function"?$$render(consequent_16):$$render(alternate_8,!1)})}append($$anchor3,fragment_22)};if_block(node_27,$$render=>{$$props.toast.cancel&&$$render(consequent_18)})}var node_31=sibling(node_27,2);{var consequent_21=$$anchor3=>{var fragment_25=comment$2(),node_32=first_child( fragment_25);{var consequent_19=$$anchor4=>{var fragment_26=comment$2(),node_33=first_child(fragment_26);component(node_33,()=>$$props.toast.action,($$anchor5,toast_action)=>{toast_action($$anchor5,{})}),append($$anchor4,fragment_26)},alternate_9=$$anchor4=>{var fragment_27=comment$2(),node_34=first_child(fragment_27);{var consequent_20=$$anchor5=>{var button_2=root_34$1();button_2.__click=event2=>{isAction($$props.toast.action)&&($$props.toast.action?.onClick(event2),!event2.defaultPrevented&&deleteToast())}; var text_3=child(button_2,!0);reset(button_2),template_effect($0=>{set_style(button_2,$$props.toast.actionButtonStyle??actionButtonStyle()),set_class(button_2,1,$0),set_text(text_3,$$props.toast.action.label)},[()=>clsx(cn(get$4(classes)?.actionButton,$$props.toast?.classes?.actionButton))]),append($$anchor5,button_2)};if_block(node_34,$$render=>{isAction($$props.toast.action)&&$$render(consequent_20)},!0)}append($$anchor4,fragment_27)};if_block(node_32,$$render=>{typeof $$props.toast.action=="f\ unction"?$$render(consequent_19):$$render(alternate_9,!1)})}append($$anchor3,fragment_25)};if_block(node_31,$$render=>{$$props.toast.action&&$$render(consequent_21)})}template_effect($0=>set_class(div_3,1,$0),[()=>clsx(cn(get$4(classes)?.title,$$props.toast?.classes?.title))]),append($$anchor2,fragment_3)};if_block(node_4,$$render=>{$$props.toast.component?$$render(consequent_2):$$render(alternate_10,!1)})}reset(li2),bind_this(li2,$$value=>set$1(toastRef,$$value),()=>get$4(toastRef)),template_effect( ($0,$1,$2)=>{set_class(li2,1,$0),set_attribute(li2,"data-rich-colors",$$props.toast.richColors??defaultRichColors()),set_attribute(li2,"data-styled",!($$props.toast.component||$$props.toast.unstyled||unstyled())),set_attribute(li2,"data-mounted",get$4(mounted)),set_attribute(li2,"data-promise",$1),set_attribute(li2,"data-swiped",get$4(isSwiped)),set_attribute(li2,"data-removed",get$4(removed)),set_attribute(li2,"data-visible",get$4(isVisible)),set_attribute(li2,"data-y-position",get$4(coords)[0]), set_attribute(li2,"data-x-position",get$4(coords)[1]),set_attribute(li2,"data-index",$$props.index),set_attribute(li2,"data-front",get$4(isFront)),set_attribute(li2,"data-swiping",get$4(swiping)),set_attribute(li2,"data-dismissable",get$4(dismissable)),set_attribute(li2,"data-type",get$4(toastType)),set_attribute(li2,"data-invert",get$4(invert)),set_attribute(li2,"data-swipe-out",get$4(swipeOut)),set_attribute(li2,"data-swipe-direction",get$4(swipeOutDirection)),set_attribute(li2,"data-expanded", $2),styles2=set_style(li2,`${$$props.style} ${$$props.toast.style}`,styles2,{"--index":$$props.index,"--toasts-before":$$props.index,"--z-index":toastState.toasts.length-$$props.index,"--offset":`${get$4(removed)?get$4(offsetBeforeRemove):get$4(offset2)}px`,"--initial-height":$$props.expandByDefault?"auto":`${get$4(initialHeight)}px`})},[()=>clsx(cn($$props.class,get$4(toastClass),get$4(classes)?.toast,$$props.toast?.classes?.toast,get$4(classes)?.[get$4(toastType)],$$props.toast?.classes?.[get$4( toastType)])),()=>!!$$props.toast.promise,()=>!!($$props.expanded||$$props.expandByDefault&&get$4(mounted))]),event("dragend",li2,handleDragEnd),append($$anchor,li2),pop()}delegate(["pointermove","pointerup","pointerdown","click"]);var root$1C=from_svg('');function SuccessIcon($$anchor){var svg2=root$1C();append($$anchor,svg2)}var root$1B=from_svg('');function ErrorIcon($$anchor){var svg2=root$1B();append($$anchor,svg2)}var root$1A=from_svg('');function WarningIcon($$anchor){var svg2=root$1A();append($$anchor,svg2)}var root$1z=from_svg('');function InfoIcon($$anchor){var svg2=root$1z();append($$anchor,svg2)}var root$1y=from_svg('');function CloseIcon($$anchor){var svg2=root$1y();append($$anchor,svg2)}const VISIBLE_TOASTS_AMOUNT=3,VIEWPORT_OFFSET="24px",MOBILE_VIEWPORT_OFFSET="16px",TOAST_LIFETIME=4e3,TOAST_WIDTH=356,GAP=14,DARK="dark",LIGHT="light";function getOffsetObject(defaultOffset,mobileOffset){const styles2={};return[defaultOffset,mobileOffset].forEach((offset2,index2)=>{const isMobile=index2===1,prefix=isMobile?"\ --mobile-offset":"--offset",defaultValue=isMobile?MOBILE_VIEWPORT_OFFSET:VIEWPORT_OFFSET;function assignAll(offset3){["top","right","bottom","left"].forEach(key2=>{styles2[`${prefix}-${key2}`]=typeof offset3=="number"?`${offset3}px`:offset3})}typeof offset2=="number"||typeof offset2=="string"?assignAll(offset2):typeof offset2=="object"?["top","right","bottom","left"].forEach(key2=>{const value=offset2[key2];value===void 0?styles2[`${prefix}-${key2}`]=defaultValue:styles2[`${prefix}-${key2}`]=typeof value== "number"?`${value}px`:value}):assignAll(defaultValue)}),styles2}var root_2$16=from_html("
      "),root$1x=from_html('
      ');function Toaster($$anchor,$$props){push$1($$props,!0);function getInitialTheme(t){return t!=="system"?t:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?DARK:LIGHT}let invert=prop($$props,"invert",3,!1),position2=prop( $$props,"position",3,"bottom-right"),hotkey=prop($$props,"hotkey",19,()=>["altKey","KeyT"]),expand=prop($$props,"expand",3,!1),closeButton=prop($$props,"closeButton",3,!1),offset2=prop($$props,"offset",3,VIEWPORT_OFFSET),mobileOffset=prop($$props,"mobileOffset",3,MOBILE_VIEWPORT_OFFSET),theme=prop($$props,"theme",3,"light"),richColors=prop($$props,"richColors",3,!1),duration2=prop($$props,"duration",3,TOAST_LIFETIME),visibleToasts=prop($$props,"visibleToasts",3,VISIBLE_TOASTS_AMOUNT),toastOptions=prop( $$props,"toastOptions",19,()=>({})),dir=prop($$props,"dir",7,"auto"),gap=prop($$props,"gap",3,GAP),containerAriaLabel=prop($$props,"containerAriaLabel",3,"Notifications"),closeButtonAriaLabel=prop($$props,"closeButtonAriaLabel",3,"Close toast"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","invert","position","hotkey","expand","closeButton","offset","mobileOffset","theme","richColors","duration","visibleToasts","toastOptions","dir","gap","loadingIcon","successIcon","errorIcon","w\ arningIcon","closeIcon","infoIcon","containerAriaLabel","class","closeButtonAriaLabel","onblur","onfocus","onmouseenter","onmousemove","onmouseleave","ondragend","onpointerdown","onpointerup"]);function getDocumentDirection(){if(dir()!=="auto")return dir();if(typeof window>"u"||typeof document>"u")return"ltr";const dirAttribute=document.documentElement.getAttribute("dir");return dirAttribute==="auto"||!dirAttribute?(untrack$1(()=>dir(window.getComputedStyle(document.documentElement).direction??"\ ltr")),dir()):(untrack$1(()=>dir(dirAttribute)),dirAttribute)}const possiblePositions=user_derived(()=>Array.from(new Set([position2(),...toastState.toasts.filter(toast2=>toast2.position).map(toast2=>toast2.position)].filter(Boolean))));let expanded=state$1(!1),interacting=state$1(!1),actualTheme=state$1(proxy(getInitialTheme(theme()))),listRef=state$1(void 0),lastFocusedElementRef=state$1(null),isFocusWithin=state$1(!1);const hotkeyLabel=user_derived(()=>hotkey().join("+").replace(/Key/g,"").replace( /Digit/g,""));user_effect(()=>{toastState.toasts.length<=1&&set$1(expanded,!1)}),user_effect(()=>{const toastsToDismiss=toastState.toasts.filter(toast2=>toast2.dismiss&&!toast2.delete);if(toastsToDismiss.length>0){const updatedToasts=toastState.toasts.map(toast2=>toastsToDismiss.find(dismissToast=>dismissToast.id===toast2.id)?{...toast2,delete:!0}:toast2);toastState.toasts=updatedToasts}}),user_effect(()=>()=>{get$4(listRef)&&get$4(lastFocusedElementRef)&&(get$4(lastFocusedElementRef).focus({preventScroll:!0}), set$1(lastFocusedElementRef,null),set$1(isFocusWithin,!1))}),onMount$1(()=>(toastState.reset(),on(document,"keydown",event2=>{hotkey().every(key2=>event2[key2]||event2.code===key2)&&(set$1(expanded,!0),get$4(listRef)?.focus()),event2.code==="Escape"&&(document.activeElement===get$4(listRef)||get$4(listRef)?.contains(document.activeElement))&&set$1(expanded,!1)}))),user_effect(()=>{if(theme()!=="system"&&set$1(actualTheme,theme()),typeof window<"u"){theme()==="system"&&(window.matchMedia&&window. matchMedia("(prefers-color-scheme: dark)").matches?set$1(actualTheme,DARK):set$1(actualTheme,LIGHT));const mediaQueryList=window.matchMedia("(prefers-color-scheme: dark)"),changeHandler=({matches:matches2})=>{set$1(actualTheme,matches2?DARK:LIGHT,!0)};"addEventListener"in mediaQueryList?mediaQueryList.addEventListener("change",changeHandler):mediaQueryList.addListener(changeHandler)}});const handleBlur=event2=>{$$props.onblur?.(event2),get$4(isFocusWithin)&&!event2.currentTarget.contains(event2. relatedTarget)&&(set$1(isFocusWithin,!1),get$4(lastFocusedElementRef)&&(get$4(lastFocusedElementRef).focus({preventScroll:!0}),set$1(lastFocusedElementRef,null)))},handleFocus=event2=>{$$props.onfocus?.(event2),!(event2.target instanceof HTMLElement&&event2.target.dataset.dismissable==="false")&&(get$4(isFocusWithin)||(set$1(isFocusWithin,!0),set$1(lastFocusedElementRef,event2.relatedTarget,!0)))},handlePointerDown=event2=>{$$props.onpointerdown?.(event2),!(event2.target instanceof HTMLElement&& event2.target.dataset.dismissable==="false")&&set$1(interacting,!0)},handleMouseEnter=event2=>{$$props.onmouseenter?.(event2),set$1(expanded,!0)},handleMouseLeave=event2=>{$$props.onmouseleave?.(event2),get$4(interacting)||set$1(expanded,!1)},handleMouseMove=event2=>{$$props.onmousemove?.(event2),set$1(expanded,!0)},handleDragEnd=event2=>{$$props.ondragend?.(event2),set$1(expanded,!1)},handlePointerUp=event2=>{$$props.onpointerup?.(event2),set$1(interacting,!1)};sonnerContext.set(new SonnerState); var section=root$1x();set_attribute(section,"tabindex",-1);var node2=child(section);{var consequent_10=$$anchor2=>{var fragment=comment$2(),node_1=first_child(fragment);each(node_1,18,()=>get$4(possiblePositions),position3=>position3,($$anchor3,position3,index2,$$array)=>{const computed_const=user_derived(()=>{const[y,x]=position3.split("-");return{y,x}}),offsetObject=user_derived(()=>getOffsetObject(offset2(),mobileOffset()));var ol=root_2$16();attribute_effect(ol,$0=>({tabindex:-1,dir:$0,class:$$props. class,"data-sonner-toaster":!0,"data-sonner-theme":get$4(actualTheme),"data-y-position":get$4(computed_const).y,"data-x-position":get$4(computed_const).x,style:$$props.style,onblur:handleBlur,onfocus:handleFocus,onmouseenter:handleMouseEnter,onmousemove:handleMouseMove,onmouseleave:handleMouseLeave,ondragend:handleDragEnd,onpointerdown:handlePointerDown,onpointerup:handlePointerUp,...restProps,[STYLE]:{"--front-toast-height":`${toastState.heights[0]?.height}px`,"--width":`${TOAST_WIDTH}px`,"--ga\ p":`${gap()}px`,"--offset-top":get$4(offsetObject)["--offset-top"],"--offset-right":get$4(offsetObject)["--offset-right"],"--offset-bottom":get$4(offsetObject)["--offset-bottom"],"--offset-left":get$4(offsetObject)["--offset-left"],"--mobile-offset-top":get$4(offsetObject)["--mobile-offset-top"],"--mobile-offset-right":get$4(offsetObject)["--mobile-offset-right"],"--mobile-offset-bottom":get$4(offsetObject)["--mobile-offset-bottom"],"--mobile-offset-left":get$4(offsetObject)["--mobile-offset-lef\ t"]}}),[getDocumentDirection],void 0,void 0,"svelte-nbs0zk"),each(ol,23,()=>toastState.toasts.filter(toast2=>!toast2.position&&get$4(index2)===0||toast2.position===position3),toast2=>toast2.id,($$anchor4,toast2,index3,$$array_1)=>{{const successIcon=$$anchor5=>{var fragment_2=comment$2(),node_2=first_child(fragment_2);{var consequent=$$anchor6=>{var fragment_3=comment$2(),node_3=first_child(fragment_3);snippet(node_3,()=>$$props.successIcon??noop$3),append($$anchor6,fragment_3)},alternate=$$anchor6=>{ var fragment_4=comment$2(),node_4=first_child(fragment_4);{var consequent_1=$$anchor7=>{SuccessIcon($$anchor7)};if_block(node_4,$$render=>{$$props.successIcon!==null&&$$render(consequent_1)},!0)}append($$anchor6,fragment_4)};if_block(node_2,$$render=>{$$props.successIcon?$$render(consequent):$$render(alternate,!1)})}append($$anchor5,fragment_2)},errorIcon=$$anchor5=>{var fragment_6=comment$2(),node_5=first_child(fragment_6);{var consequent_2=$$anchor6=>{var fragment_7=comment$2(),node_6=first_child( fragment_7);snippet(node_6,()=>$$props.errorIcon??noop$3),append($$anchor6,fragment_7)},alternate_1=$$anchor6=>{var fragment_8=comment$2(),node_7=first_child(fragment_8);{var consequent_3=$$anchor7=>{ErrorIcon($$anchor7)};if_block(node_7,$$render=>{$$props.errorIcon!==null&&$$render(consequent_3)},!0)}append($$anchor6,fragment_8)};if_block(node_5,$$render=>{$$props.errorIcon?$$render(consequent_2):$$render(alternate_1,!1)})}append($$anchor5,fragment_6)},warningIcon=$$anchor5=>{var fragment_10=comment$2(), node_8=first_child(fragment_10);{var consequent_4=$$anchor6=>{var fragment_11=comment$2(),node_9=first_child(fragment_11);snippet(node_9,()=>$$props.warningIcon??noop$3),append($$anchor6,fragment_11)},alternate_2=$$anchor6=>{var fragment_12=comment$2(),node_10=first_child(fragment_12);{var consequent_5=$$anchor7=>{WarningIcon($$anchor7)};if_block(node_10,$$render=>{$$props.warningIcon!==null&&$$render(consequent_5)},!0)}append($$anchor6,fragment_12)};if_block(node_8,$$render=>{$$props.warningIcon? $$render(consequent_4):$$render(alternate_2,!1)})}append($$anchor5,fragment_10)},infoIcon=$$anchor5=>{var fragment_14=comment$2(),node_11=first_child(fragment_14);{var consequent_6=$$anchor6=>{var fragment_15=comment$2(),node_12=first_child(fragment_15);snippet(node_12,()=>$$props.infoIcon??noop$3),append($$anchor6,fragment_15)},alternate_3=$$anchor6=>{var fragment_16=comment$2(),node_13=first_child(fragment_16);{var consequent_7=$$anchor7=>{InfoIcon($$anchor7)};if_block(node_13,$$render=>{$$props. infoIcon!==null&&$$render(consequent_7)},!0)}append($$anchor6,fragment_16)};if_block(node_11,$$render=>{$$props.infoIcon?$$render(consequent_6):$$render(alternate_3,!1)})}append($$anchor5,fragment_14)},closeIcon=$$anchor5=>{var fragment_18=comment$2(),node_14=first_child(fragment_18);{var consequent_8=$$anchor6=>{var fragment_19=comment$2(),node_15=first_child(fragment_19);snippet(node_15,()=>$$props.closeIcon??noop$3),append($$anchor6,fragment_19)},alternate_4=$$anchor6=>{var fragment_20=comment$2(), node_16=first_child(fragment_20);{var consequent_9=$$anchor7=>{CloseIcon($$anchor7)};if_block(node_16,$$render=>{$$props.closeIcon!==null&&$$render(consequent_9)},!0)}append($$anchor6,fragment_20)};if_block(node_14,$$render=>{$$props.closeIcon?$$render(consequent_8):$$render(alternate_4,!1)})}append($$anchor5,fragment_18)};let $0=user_derived(()=>toastOptions()?.duration??duration2()),$1=user_derived(()=>toastOptions()?.class??""),$2=user_derived(()=>toastOptions()?.descriptionClass||""),$3=user_derived( ()=>toastOptions()?.style??""),$4=user_derived(()=>toastOptions().classes||{}),$5=user_derived(()=>toastOptions().unstyled??!1),$6=user_derived(()=>toastOptions()?.cancelButtonStyle??""),$7=user_derived(()=>toastOptions()?.actionButtonStyle??""),$8=user_derived(()=>toastOptions()?.closeButtonAriaLabel??closeButtonAriaLabel());Toast($$anchor4,{get index(){return get$4(index3)},get toast(){return get$4(toast2)},get defaultRichColors(){return richColors()},get duration(){return get$4($0)},get class(){ return get$4($1)},get descriptionClass(){return get$4($2)},get invert(){return invert()},get visibleToasts(){return visibleToasts()},get closeButton(){return closeButton()},get interacting(){return get$4(interacting)},get position(){return position3},get style(){return get$4($3)},get classes(){return get$4($4)},get unstyled(){return get$4($5)},get cancelButtonStyle(){return get$4($6)},get actionButtonStyle(){return get$4($7)},get closeButtonAriaLabel(){return get$4($8)},get expandByDefault(){return expand()}, get expanded(){return get$4(expanded)},get loadingIcon(){return $$props.loadingIcon},successIcon,errorIcon,warningIcon,infoIcon,closeIcon,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),reset(ol),bind_this(ol,$$value=>set$1(listRef,$$value),()=>get$4(listRef)),template_effect(()=>ol.dir=ol.dir),append($$anchor3,ol)}),append($$anchor2,fragment)};if_block(node2,$$render=>{toastState.toasts.length>0&&$$render(consequent_10)})}reset(section),template_effect(()=>set_attribute( section,"aria-label",`${containerAriaLabel()??""} ${get$4(hotkeyLabel)??""}`)),append($$anchor,section),pop()}async function copyToClipboard(text2,successMessage="Copied to clipboard",errorMessage="Failed to copy to clipboard"){try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(text2),toast.success(successMessage),!0;const textArea=document.createElement("textarea");textArea.value=text2,textArea.style.position="fixed",textArea.style.left="-999999\ px",textArea.style.top="-999999px",document.body.appendChild(textArea),textArea.focus(),textArea.select();const successful=document.execCommand("copy");if(document.body.removeChild(textArea),successful)return toast.success(successMessage),!0;throw new Error("execCommand failed")}catch(error2){return console.error("Failed to copy to clipboard:",error2),toast.error(errorMessage),!1}}async function copyCodeToClipboard(rawCode,successMessage="Code copied to clipboard",errorMessage="Failed to copy co\ de"){return copyToClipboard(rawCode,successMessage,errorMessage)}function formatMessageForClipboard(content2,extras,asPlainText=!1){const textAttachments=extras?.filter(extra=>extra.type===AttachmentType.TEXT||extra.type===AttachmentType.LEGACY_CONTEXT||extra.type===AttachmentType.MCP_PROMPT||extra.type===AttachmentType.MCP_RESOURCE)??[];if(textAttachments.length===0)return content2;if(asPlainText){const parts=[content2];for(const att of textAttachments)parts.push(att.content);return parts.join( ` `)}const clipboardAttachments=textAttachments.map(att=>{if(att.type===AttachmentType.MCP_PROMPT){const mcpAtt=att;return{type:AttachmentType.MCP_PROMPT,name:mcpAtt.name,serverName:mcpAtt.serverName,promptName:mcpAtt.promptName,content:mcpAtt.content,arguments:mcpAtt.arguments}}return{type:AttachmentType.TEXT,name:att.name,content:att.content}});return`${JSON.stringify(content2)} ${JSON.stringify(clipboardAttachments,null,2)}`}function parseClipboardContent(clipboardText){const defaultResult={message:clipboardText,textAttachments:[],mcpPromptAttachments:[]};if(!clipboardText.startsWith('"'))return defaultResult;try{let stringEndIndex=-1,escaped=!1;for(let i=1;imax2?content2.slice(0,max2)+"...":content2}function getFileTypeCategory(mimeType){switch(mimeType){case MimeTypeImage.JPEG:case MimeTypeImage.PNG:case MimeTypeImage.GIF:case MimeTypeImage.WEBP:case MimeTypeImage.SVG:return FileTypeCategory.IMAGE;case MimeTypeAudio. MP3_MPEG:case MimeTypeAudio.MP3:case MimeTypeAudio.MP4:case MimeTypeAudio.WAV:case MimeTypeAudio.WEBM:case MimeTypeAudio.WEBM_OPUS:return FileTypeCategory.AUDIO;case MimeTypeApplication.PDF:return FileTypeCategory.PDF;case MimeTypeText.PLAIN:case MimeTypeText.MARKDOWN:case MimeTypeText.ASCIIDOC:case MimeTypeText.JAVASCRIPT:case MimeTypeText.JAVASCRIPT_APP:case MimeTypeText.TYPESCRIPT:case MimeTypeText.JSX:case MimeTypeText.TSX:case MimeTypeText.CSS:case MimeTypeText.HTML:case MimeTypeText.JSON:case MimeTypeText. XML_TEXT:case MimeTypeText.XML_APP:case MimeTypeText.YAML_TEXT:case MimeTypeText.YAML_APP:case MimeTypeText.CSV:case MimeTypeText.PYTHON:case MimeTypeText.JAVA:case MimeTypeText.CPP_SRC:case MimeTypeText.C_SRC:case MimeTypeText.C_HDR:case MimeTypeText.PHP:case MimeTypeText.RUBY:case MimeTypeText.GO:case MimeTypeText.RUST:case MimeTypeText.SHELL:case MimeTypeText.BAT:case MimeTypeText.SQL:case MimeTypeText.R:case MimeTypeText.SCALA:case MimeTypeText.KOTLIN:case MimeTypeText.SWIFT:case MimeTypeText. DART:case MimeTypeText.VUE:case MimeTypeText.SVELTE:case MimeTypeText.LATEX:case MimeTypeText.BIBTEX:case MimeTypeText.CUDA:case MimeTypeText.CPP_HDR:case MimeTypeText.CSHARP:case MimeTypeText.HASKELL:case MimeTypeText.PROPERTIES:case MimeTypeText.TEX:case MimeTypeText.TEX_APP:return FileTypeCategory.TEXT;default:return null}}function getFileTypeCategoryByExtension(filename){switch(filename.toLowerCase().substring(filename.lastIndexOf("."))){case FileExtensionImage.JPG:case FileExtensionImage.JPEG:case FileExtensionImage. PNG:case FileExtensionImage.GIF:case FileExtensionImage.WEBP:case FileExtensionImage.SVG:return FileTypeCategory.IMAGE;case FileExtensionAudio.MP3:case FileExtensionAudio.WAV:return FileTypeCategory.AUDIO;case FileExtensionPdf.PDF:return FileTypeCategory.PDF;case FileExtensionText.TXT:case FileExtensionText.MD:case FileExtensionText.ADOC:case FileExtensionText.JS:case FileExtensionText.TS:case FileExtensionText.JSX:case FileExtensionText.TSX:case FileExtensionText.CSS:case FileExtensionText.HTML:case FileExtensionText. HTM:case FileExtensionText.JSON:case FileExtensionText.XML:case FileExtensionText.YAML:case FileExtensionText.YML:case FileExtensionText.CSV:case FileExtensionText.LOG:case FileExtensionText.PY:case FileExtensionText.JAVA:case FileExtensionText.CPP:case FileExtensionText.C:case FileExtensionText.H:case FileExtensionText.PHP:case FileExtensionText.RB:case FileExtensionText.GO:case FileExtensionText.RS:case FileExtensionText.SH:case FileExtensionText.BAT:case FileExtensionText.SQL:case FileExtensionText. R:case FileExtensionText.SCALA:case FileExtensionText.KT:case FileExtensionText.SWIFT:case FileExtensionText.DART:case FileExtensionText.VUE:case FileExtensionText.SVELTE:case FileExtensionText.TEX:case FileExtensionText.BIB:case FileExtensionText.COMP:case FileExtensionText.CU:case FileExtensionText.CUH:case FileExtensionText.HPP:case FileExtensionText.HS:case FileExtensionText.PROPERTIES:return FileTypeCategory.TEXT;default:return null}}function isFileTypeSupported(filename,mimeType){if(mimeType){ const category=getFileTypeCategory(mimeType);if(category===FileTypeCategory.IMAGE||category===FileTypeCategory.AUDIO||category===FileTypeCategory.PDF)return!0}const extCategory=getFileTypeCategoryByExtension(filename);return extCategory===FileTypeCategory.IMAGE||extCategory===FileTypeCategory.AUDIO||extCategory===FileTypeCategory.PDF,!0}function formatFileSize(bytes){if(typeof bytes!="number")return"Unknown";if(bytes===0)return"0 Bytes";const k=1024,sizes=["Bytes","KB","MB","GB"],i=Math.floor(Math. log(bytes)/Math.log(k));return parseFloat((bytes/Math.pow(k,i)).toFixed(2))+" "+sizes[i]}function formatParameters(params){return typeof params!="number"?"Unknown":params>=1e9?`${(params/1e9).toFixed(2)}B`:params>=1e6?`${(params/1e6).toFixed(2)}M`:params>=1e3?`${(params/1e3).toFixed(2)}K`:params.toString()}function formatNumber(num){return typeof num!="number"?"Unknown":num.toLocaleString()}function formatJsonPretty(jsonString){try{const parsed=JSON.parse(jsonString);return JSON.stringify(parsed, null,2)}catch{return jsonString}}function formatTime(date2){return date2.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}function formatPerformanceTime(ms){if(ms<0)return"0s";const totalSeconds=ms/MS_PER_SECOND;if(totalSeconds0&&parts.push(`${hours}h`),minutes>0&&parts.push(`${minutes}min`),(seconds>0||parts.length===0)&&parts.push(`${seconds}s`),parts.join(" ")}function formatAttachmentText(label,name,content2,extra){const header=extra?`${name} (${extra})`:name;return` --- ${label}: ${header} --- ${content2}`}function isIMEComposing(event2){return event2.isComposing||event2.keyCode===229}function maskInlineLaTeX(content2,latexExpressions){return content2.includes("$")?content2.split(` `).map(line=>{if(line.indexOf("$")==-1)return line;let processedLine="",currentPosition=0;for(;currentPosition0?line[openDollarIndex-1]:"",charAfterOpen=line[openDollarIndex+1],charBeforeClose=openDollarIndex+ 1>`,currentPosition=closeDollarIndex+1}return processedLine}).join(` `):content2}function escapeBrackets(text2){return text2.replace(LATEX_MATH_AND_CODE_PATTERN,(match,codeBlock,squareBracket,roundBracket)=>codeBlock??(squareBracket!=null?`$$${squareBracket}$$`:roundBracket!=null?`$${roundBracket}$`:match))}function preprocessLaTeX(content2){const blockquoteMarkers=new Map;content2=content2.split(` `).map((line,index2)=>{const match=line.match(/^(>\s*)/);return match?(blockquoteMarkers.set(index2,match[1]),line.slice(match[1].length)):line}).join(` `);const codeBlocks=[];content2=content2.replace(CODE_BLOCK_REGEXP,match=>(codeBlocks.push(match),`<>`));const latexExpressions=[];return content2=content2.replace(/([\S].*?)\\\[([\s\S]*?)\\\](.*)/g,(match,group1,group2,group3)=>{if(group1.endsWith("\\"))return match;const hasSuffix=/\S/.test(group3);let optBreak;return hasSuffix?(latexExpressions.push(`\\(${group2.trim()}\\)`),optBreak=""):(latexExpressions.push(`\\[${group2}\\]`),optBreak=` `),`${group1}${optBreak}<>${optBreak}${group3}`}),content2=content2.replace(new RegExp("(\\$\\$[\\s\\S]*?\\$\\$|(?(latexExpressions.push(match),`<>`)),content2=maskInlineLaTeX(content2,latexExpressions),content2=content2.replace(/\$(?=\d)/g,"\\$"),content2=content2.replace(/<>/g,(_,index2)=>{let expr=latexExpressions[parseInt(index2)];const match=expr. match(LATEX_LINEBREAK_REGEXP);if(match){const formula=match[1],prefix=formula.startsWith(` `)?"":` `,suffix=formula.endsWith(` `)?"":` `;expr="$$"+prefix+formula+suffix+"$$"}return expr}),content2=escapeBrackets(content2),content2=content2.replace(new RegExp("(?`$$${content22}$$`),content2=content2.replace(/<>/g,(_,index2)=>codeBlocks[parseInt(index2)]),blockquoteMarkers.size>0&&(content2=content2.split(` `).map((line,index2)=>{const marker=blockquoteMarkers.get(index2);return marker?marker+line:line}).join(` `)),content2}function filterFilesByModalities(files,capabilities){const supportedFiles=[],unsupportedFiles=[],modalityReasons={},{hasVision,hasAudio}=capabilities;for(const file of files){const category=getFileTypeCategory(file.type);let isSupported=!0,reason="";switch(category){case FileTypeCategory.IMAGE:hasVision||(isSupported=!1,reason="Images require a vision-capable model");break;case FileTypeCategory.AUDIO:hasAudio||(isSupported=!1,reason="Audio files require an audio-capable model");break;case FileTypeCategory. TEXT:case FileTypeCategory.PDF:break}isSupported?supportedFiles.push(file):(unsupportedFiles.push(file),modalityReasons[file.name]=reason)}return{supportedFiles,unsupportedFiles,modalityReasons}}function normalizeModelName(modelName){const trimmed=modelName.trim();if(!trimmed)return"";const segments=trimmed.split(/[\\/]/);if(segments.length===2){const[org,model]=segments,trimmedOrg=org?.trim(),trimmedModel=model?.trim();if(trimmedOrg&&trimmedModel)return`${trimmedOrg}/${trimmedModel}`}const normalized=segments. pop()?.trim();return normalized&&normalized.length>0?normalized:trimmed}function normalizeFloatingPoint(value){return typeof value=="number"?Math.round(value*PRECISION_MULTIPLIER)/PRECISION_MULTIPLIER:value}function getLanguageFromFilename(filename){switch(filename.toLowerCase().substring(filename.lastIndexOf("."))){case".js":case".mjs":case".cjs":return"javascript";case".ts":case".mts":case".cts":return"typescript";case".jsx":return"javascript";case".tsx":return"typescript";case".html":case".ht\ m":return"html";case".css":return"css";case".scss":return"scss";case".less":return"less";case".vue":return"html";case".svelte":return"html";case".json":return"json";case".xml":return"xml";case".yaml":case".yml":return"yaml";case".toml":return"ini";case".csv":return"plaintext";case".py":return"python";case".java":return"java";case".kt":case".kts":return"kotlin";case".scala":return"scala";case".cpp":case".cc":case".cxx":case".c++":return"cpp";case".c":return"c";case".h":case".hpp":return"cpp";case"\ .cs":return"csharp";case".go":return"go";case".rs":return"rust";case".rb":return"ruby";case".php":return"php";case".swift":return"swift";case".dart":return"dart";case".r":return"r";case".lua":return"lua";case".pl":case".pm":return"perl";case".sh":case".bash":case".zsh":return"bash";case".bat":case".cmd":return"dos";case".ps1":return"powershell";case".sql":return"sql";case".md":case".markdown":return"markdown";case".tex":case".latex":return"latex";case".adoc":case".asciidoc":return"asciidoc";case"\ .ini":case".cfg":case".conf":return"ini";case".dockerfile":return"dockerfile";case".nginx":return"nginx";case".graphql":case".gql":return"graphql";case".proto":return"protobuf";case".diff":case".patch":return"diff";case".log":return"plaintext";case".txt":return"plaintext";default:return"plaintext"}}async function readFileAsText(file){return new Promise((resolve2,reject)=>{const reader=new FileReader;reader.onload=event2=>{event2.target?.result!==null&&event2.target?.result!==void 0?resolve2(event2. target.result):reject(new Error("Failed to read file"))},reader.onerror=()=>reject(new Error("File reading error")),reader.readAsText(file)})}function isLikelyTextFile(content2,options={}){if(!content2)return!0;const config2={...DEFAULT_BINARY_DETECTION_OPTIONS,...options},sample=content2.substring(0,config2.prefixLength);let nullCount=0,suspiciousControlCount=0;for(let i=0;i13&&charCode<27)&&suspiciousControlCount++,charCode===65533&&suspiciousControlCount++}return!(nullCount>config2.maxAbsoluteNullBytes||suspiciousControlCount/sample.length>config2.suspiciousCharThresholdRatio)}function debounce(fn,delay){let timeoutId=null;return(...args)=>{timeoutId&&clearTimeout(timeoutId),timeoutId=setTimeout(()=>{fn(...args),timeoutId=null},delay)}}function sanitizeKeyValuePairKey(raw2){return raw2.replace(KEY_VALUE_PAIR_UNSAFE_KEY_RE, "").slice(0,KEY_VALUE_PAIR_KEY_MAX_LENGTH)}function sanitizeKeyValuePairValue(raw2){return raw2.replace(KEY_VALUE_PAIR_UNSAFE_VALUE_RE,"").slice(0,KEY_VALUE_PAIR_VALUE_MAX_LENGTH)}function getImageErrorFallbackHtml(src){return`
      Image cannot be displayed (open link)
      `}function detectMcpTransportFromUrl(url2){const normalized=url2.trim().toLowerCase();return normalized.startsWith(UrlProtocol.WEBSOCKET)||normalized.startsWith(UrlProtocol.WEBSOCKET_SECURE)?MCPTransportType.WEBSOCKET:MCPTransportType.STREAMABLE_HTTP}function parseMcpServerSettings(rawServers){if(!rawServers)return[];let parsed;if(typeof rawServers=="string"){const trimmed=rawServers.trim();if(!trimmed)return[];try{parsed=JSON.parse(trimmed)}catch(error2){return console.warn("[MCP] Failed\ to parse mcpServers JSON, ignoring value:",error2),[]}}else parsed=rawServers;return Array.isArray(parsed)?parsed.map((entry,index2)=>{const url2=typeof entry?.url=="string"?entry.url.trim():"",headers=typeof entry?.headers=="string"?entry.headers.trim():void 0;return{id:typeof entry?.id=="string"&&entry.id?.trim()?entry.id.trim():`${MCP_SERVER_ID_PREFIX}-${index2+1}`,enabled:!!entry?.enabled,url:url2,name:entry?.name,requestTimeoutSeconds:DEFAULT_MCP_CONFIG.requestTimeoutSeconds,headers:headers|| void 0,useProxy:!!entry?.useProxy}}):[]}function getMcpLogLevelIcon(level){switch(level){case MCPLogLevel.ERROR:return Circle_x;case MCPLogLevel.WARN:return Triangle_alert;default:return Info$1}}function getMcpLogLevelClass(level){switch(level){case MCPLogLevel.ERROR:return"text-destructive";case MCPLogLevel.WARN:return"text-yellow-600 dark:text-yellow-500";default:return"text-muted-foreground"}}function isImageMimeType(mimeType){return mimeType?.startsWith(MimeTypePrefix.IMAGE)??!1}function parseResourcePath(uri2){ try{return uri2.replace(PROTOCOL_PREFIX_REGEX,"").split(PATH_SEPARATOR).filter(p2=>p2.length>0)}catch{return[uri2]}}function getDisplayName(pathPart){return pathPart.replace(FILE_EXTENSION_REGEX,"").split(DISPLAY_NAME_SEPARATOR_REGEX).map(word=>word.charAt(0).toUpperCase()+word.slice(1)).join(" ")}function getResourceDisplayName(resource){try{const parts=parseResourcePath(resource.uri);return parts[parts.length-1]||resource.name||resource.uri}catch{return resource.name||resource.uri}}function isCodeResource(mimeType,uri2){ const mime=mimeType?.toLowerCase()||"",u=uri2?.toLowerCase()||"";return mime.includes(MimeTypeIncludes.JSON)||mime.includes(MimeTypeIncludes.JAVASCRIPT)||mime.includes(MimeTypeIncludes.TYPESCRIPT)||CODE_FILE_EXTENSION_REGEX.test(u)}function isImageResource(mimeType,uri2){const mime=mimeType?.toLowerCase()||"",u=uri2?.toLowerCase()||"";return mime.startsWith(MimeTypePrefix.IMAGE)||IMAGE_FILE_EXTENSION_REGEX.test(u)}function getResourceIcon(mimeType,uri2){const mime=mimeType?.toLowerCase()||"",u=uri2?. toLowerCase()||"";return mime.startsWith(MimeTypePrefix.IMAGE)||IMAGE_FILE_EXTENSION_REGEX.test(u)?Image$1:mime.includes(MimeTypeIncludes.JSON)||mime.includes(MimeTypeIncludes.JAVASCRIPT)||mime.includes(MimeTypeIncludes.TYPESCRIPT)||CODE_FILE_EXTENSION_REGEX.test(u)?Code:mime.includes(MimeTypePrefix.TEXT)||TEXT_FILE_EXTENSION_REGEX.test(u)?File_text:u.includes(UriPattern.DATABASE_KEYWORD)||u.includes(UriPattern.DATABASE_SCHEME)?Database:File$1}function getResourceTextContent(content2){return content2? content2.filter(c2=>"text"in c2).map(c2=>c2.text).join(RESOURCE_TEXT_CONTENT_SEPARATOR):""}function getResourceBlobContent(content2){return content2?content2.filter(c2=>"blob"in c2):[]}function downloadResourceContent(text2,mimeType=MimeTypeText.PLAIN,filename=DEFAULT_RESOURCE_FILENAME){const blob=new Blob([text2],{type:mimeType}),url2=URL.createObjectURL(blob),a=document.createElement("a");a.href=url2,a.download=filename,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL( url2)}function normalizeResourceUri(uri2){const schemeEnd=uri2.indexOf(URI_SCHEME_SEPARATOR);if(schemeEnd===-1)return uri2;const scheme2=uri2.substring(0,schemeEnd),rest=uri2.substring(schemeEnd+URI_SCHEME_SEPARATOR.length).replace(LEADING_SLASHES_REGEX,"");return`${scheme2}${URI_SCHEME_SEPARATOR}${rest}`}function extractTemplateVariables(template){const variables=[],seen2=new Set;let match;for(TEMPLATE_EXPRESSION_REGEX.lastIndex=0;(match=TEMPLATE_EXPRESSION_REGEX.exec(template))!==null;){const operator2=match[1]|| "",varList=match[2];for(const varSpec of varList.split(",")){const name=varSpec.replace(VARIABLE_EXPLODE_MODIFIER_REGEX,"").replace(VARIABLE_PREFIX_MODIFIER_REGEX,"").trim();name&&!seen2.has(name)&&(seen2.add(name),variables.push({name,operator:operator2}))}}return variables}function expandTemplate(template,values){return TEMPLATE_EXPRESSION_REGEX.lastIndex=0,template.replace(TEMPLATE_EXPRESSION_REGEX,(_match,operator2,varList)=>{const varNames=varList.split(",").map(v=>v.replace(VARIABLE_EXPLODE_MODIFIER_REGEX, "").replace(VARIABLE_PREFIX_MODIFIER_REGEX,"").trim()),expandedParts=varNames.map(name=>values[name]??"").filter(v=>v!=="");if(expandedParts.length===0)return"";switch(operator2){case URI_TEMPLATE_OPERATORS.RESERVED:return expandedParts.join(URI_TEMPLATE_SEPARATORS.COMMA);case URI_TEMPLATE_OPERATORS.FRAGMENT:return URI_TEMPLATE_OPERATORS.FRAGMENT+expandedParts.join(URI_TEMPLATE_SEPARATORS.COMMA);case URI_TEMPLATE_OPERATORS.PATH_SEGMENT:return URI_TEMPLATE_SEPARATORS.SLASH+expandedParts.join(URI_TEMPLATE_SEPARATORS. SLASH);case URI_TEMPLATE_OPERATORS.LABEL:return URI_TEMPLATE_SEPARATORS.PERIOD+expandedParts.join(URI_TEMPLATE_SEPARATORS.PERIOD);case URI_TEMPLATE_OPERATORS.PATH_PARAM:return varNames.filter((_,i)=>expandedParts[i]).map((name,i)=>`${URI_TEMPLATE_SEPARATORS.SEMICOLON}${name}=${expandedParts[i]}`).join("");case URI_TEMPLATE_OPERATORS.FORM_QUERY:return URI_TEMPLATE_SEPARATORS.QUERY_PREFIX+varNames.filter((_,i)=>expandedParts[i]).map((name,i)=>`${encodeURIComponent(name)}=${encodeURIComponent(expandedParts[i])}`). join(URI_TEMPLATE_SEPARATORS.COMMA);case URI_TEMPLATE_OPERATORS.FORM_CONTINUATION:return URI_TEMPLATE_SEPARATORS.QUERY_CONTINUATION+varNames.filter((_,i)=>expandedParts[i]).map((name,i)=>`${encodeURIComponent(name)}=${encodeURIComponent(expandedParts[i])}`).join(URI_TEMPLATE_SEPARATORS.COMMA);default:return expandedParts.map(v=>encodeURIComponent(v)).join(URI_TEMPLATE_SEPARATORS.COMMA)}})}function isTemplateComplete(template,values){return extractTemplateVariables(template).every(v=>(values[v.name]?? "").trim()!=="")}function createBase64DataUrl(mimeType,base64Data){return`data:${mimeType};base64,${base64Data}`}function parseHeadersToArray(headersJson){if(!headersJson?.trim())return[];try{const parsed=JSON.parse(headersJson);if(typeof parsed=="object"&&parsed!==null&&!Array.isArray(parsed))return Object.entries(parsed).map(([key2,value])=>({key:key2,value:String(value)}))}catch{return[]}return[]}function serializeHeaders(pairs){const validPairs=pairs.filter(p2=>p2.key.trim());if(validPairs.length=== 0)return"";const obj={};for(const pair of validPairs)obj[pair.key.trim()]=pair.value;return JSON.stringify(obj)}function getFaviconUrl(urlString,useProxy=!0){try{const url2=new URL(urlString),hostnameParts=url2.hostname.split(DOMAIN_SEPARATOR),rootDomain=hostnameParts.length>=ROOT_DOMAIN_MIN_PARTS?hostnameParts.slice(-ROOT_DOMAIN_MIN_PARTS).join(DOMAIN_SEPARATOR):url2.hostname,googleFaviconUrl=`${GOOGLE_FAVICON_BASE_URL}?domain=${rootDomain}&sz=${DEFAULT_FAVICON_SIZE}`;return useProxy?getProxiedUrlString( googleFaviconUrl):googleFaviconUrl}catch{return null}}function deriveSingleTurnSections(message,toolMessages=[],streamingToolCalls=[],isStreaming=!1){const sections=[];if(message.reasoningContent){const toolCalls2=parseToolCalls(message.toolCalls),hasContentAfterReasoning=!!message.content?.trim()||toolCalls2.length>0||streamingToolCalls.length>0,isPending=isStreaming&&!hasContentAfterReasoning;sections.push({type:isPending?AgenticSectionType.REASONING_PENDING:AgenticSectionType.REASONING,content:message. reasoningContent})}message.content?.trim()&§ions.push({type:AgenticSectionType.TEXT,content:message.content});const toolCalls=parseToolCalls(message.toolCalls);for(const tc of toolCalls){const resultMsg=toolMessages.find(m=>m.toolCallId===tc.id);sections.push({type:resultMsg?AgenticSectionType.TOOL_CALL:AgenticSectionType.TOOL_CALL_PENDING,content:resultMsg?.content||"",toolName:tc.function?.name,toolArgs:tc.function?.arguments,toolResult:resultMsg?.content,toolResultExtras:resultMsg?.extra})} for(const tc of streamingToolCalls)tc.id&&toolCalls.find(t=>t.id===tc.id)||sections.push({type:AgenticSectionType.TOOL_CALL_STREAMING,content:"",toolName:tc.function?.name,toolArgs:tc.function?.arguments});return sections}function deriveAgenticSections(message,toolMessages=[],streamingToolCalls=[],isStreaming=!1){if(!toolMessages.some(m=>m.role===MessageRole.ASSISTANT))return deriveSingleTurnSections(message,toolMessages,streamingToolCalls,isStreaming);const sections=[],firstTurnToolMsgs=collectToolMessages( toolMessages,0);sections.push(...deriveSingleTurnSections(message,firstTurnToolMsgs));let i=firstTurnToolMsgs.length;for(;i=toolMessages.length;sections.push(...deriveSingleTurnSections(msg,turnToolMsgs,isLastTurn?streamingToolCalls:[],isLastTurn&&isStreaming)),i+=1+turnToolMsgs.length}else i++}return sections}function collectToolMessages(messages,startIndex){ const result=[];for(let i=startIndex;i{const match=line.match(ATTACHMENT_SAVED_REGEX);if(!match||!extras)return{text:line};const attachmentName=match[1],image2=extras.find(e=>e.type===AttachmentType.IMAGE&&e.name===attachmentName);return{text:line,image:image2}})}function parseToolCalls(toolCallsJson){ if(!toolCallsJson)return[];try{const parsed=JSON.parse(toolCallsJson);return Array.isArray(parsed)?parsed:[]}catch{return[]}}function hasAgenticContent(message,toolMessages=[]){return message.toolCalls&&parseToolCalls(message.toolCalls).length>0?!0:toolMessages.length>0}var dexie_min$1={exports:{}},dexie_min=dexie_min$1.exports,hasRequiredDexie_min;function requireDexie_min(){return hasRequiredDexie_min||(hasRequiredDexie_min=1,function(module,exports){(function(e,t){module.exports=t()})(dexie_min, function(){var s2=function(e2,t2){return(s2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e3,t3){e3.__proto__=t3}||function(e3,t3){for(var n2 in t3)Object.prototype.hasOwnProperty.call(t3,n2)&&(e3[n2]=t3[n2])})(e2,t2)},_=function(){return(_=Object.assign||function(e2){for(var t2,n2=1,r3=arguments.length;n2"u"||f.Promise||(f.Promise=Promise);var c2=Object.getPrototypeOf,n={}.hasOwnProperty;function m(e2,t2){return n.call(e2, t2)}function r2(t2,n2){typeof n2=="function"&&(n2=n2(c2(t2))),(typeof Reflect>"u"?x:Reflect.ownKeys)(n2).forEach(function(e2){l(t2,e2,n2[e2])})}var u=Object.defineProperty;function l(e2,t2,n2,r3){u(e2,t2,a(n2&&m(n2,"get")&&typeof n2.get=="function"?{get:n2.get,set:n2.set,configurable:!0}:{value:n2,configurable:!0,writable:!0},r3))}function o(t2){return{from:function(e2){return t2.prototype=Object.create(e2.prototype),l(t2.prototype,"constructor",t2),{extend:r2.bind(null,t2.prototype)}}}}var h2=Object. getOwnPropertyDescriptor,d2=[].slice;function b(e2,t2,n2){return d2.call(e2,t2,n2)}function p2(e2,t2){return t2(e2)}function y(e2){if(!e2)throw new Error("Assertion Failed")}function v(e2){f.setImmediate?setImmediate(e2):setTimeout(e2,0)}function O(e2,t2){if(typeof t2=="string"&&m(e2,t2))return e2[t2];if(!t2)return e2;if(typeof t2!="string"){for(var n2=[],r3=0,i2=t2.length;r3"u"?[]:function(){var e2=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e2,c2(e2),e2];var t2=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t2,c2(t2),e2]}(),R=e[0],F=e[1],e=e[2],F=F&&F.then,se=R&&R.constructor,ce=!!e,le=function(e2,t2){be.push([e2,t2]),he&&(queueMicrotask( Se),he=!1)},fe=!0,he=!0,de=[],pe=[],ye=X2,ve={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:G,pgp:!1,env:{},finalize:G},me=ve,be=[],ge=0,we=[];function _e(e2){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var t2=this._PSD=me;if(typeof e2!="function"){if(e2!==ae)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&Oe(this,this._value))}this._state=null,this. _value=null,++t2.ref,function t3(r3,e3){try{e3(function(n2){if(r3._state===null){if(n2===r3)throw new TypeError("A promise cannot be resolved with itself.");var e4=r3._lib&&je();n2&&typeof n2.then=="function"?t3(r3,function(e5,t4){n2 instanceof _e?n2._then(e5,t4):n2.then(e5,t4)}):(r3._state=!0,r3._value=n2,Pe(r3)),e4&&Ae()}},Oe.bind(null,r3))}catch(e4){Oe(r3,e4)}}(this,e2)}var xe={get:function(){var u2=me,t2=Fe;function e2(n2,r3){var i2=this,o2=!u2.global&&(u2!==me||t2!==Fe),a2=o2&&!Ue(),e3=new _e( function(e4,t3){Ke(i2,new ke(Qe(n2,u2,o2,a2),Qe(r3,u2,o2,a2),e4,t3,u2))});return this._consoleTask&&(e3._consoleTask=this._consoleTask),e3}return e2.prototype=ae,e2},set:function(e2){l(this,"then",e2&&e2.prototype===ae?xe:{get:function(){return e2},set:xe.set})}};function ke(e2,t2,n2,r3,i2){this.onFulfilled=typeof e2=="function"?e2:null,this.onRejected=typeof t2=="function"?t2:null,this.resolve=n2,this.reject=r3,this.psd=i2}function Oe(e2,t2){var n2,r3;pe.push(t2),e2._state===null&&(n2=e2._lib&& je(),t2=ye(t2),e2._state=!1,e2._value=t2,r3=e2,de.some(function(e3){return e3._value===r3._value})||de.push(r3),Pe(e2),n2&&Ae())}function Pe(e2){var t2=e2._listeners;e2._listeners=[];for(var n2=0,r3=t2.length;n2.",Ze="String expected.",et=[],tt="__dbnames",nt="readonly",rt="readwrite";function it(e2,t2){return e2?t2?function(){return e2.apply(this,arguments)&&t2.apply(this,arguments)}:e2:t2}var ot={type:3,lower:-1/0,lowerOpen:!1, upper:[[]],upperOpen:!1};function at(t2){return typeof t2!="string"||/\./.test(t2)?function(e2){return e2}:function(e2){return e2[t2]===void 0&&t2 in e2&&delete(e2=S2(e2))[t2],e2}}function ut(){throw Y.Type()}function st(e2,t2){try{var n2=ct(e2),r3=ct(t2);if(n2!==r3)return n2==="Array"?1:r3==="Array"?-1:n2==="binary"?1:r3==="binary"?-1:n2==="string"?1:r3==="string"?-1:n2==="Date"?1:r3!=="Date"?NaN:-1;switch(n2){case"number":case"Date":case"string":return t2s4+c4&&f2(s4+b2)})})}var h3=yt(r3)&&r3.limit===1/0&&(typeof w2!="function"||w2===Kt)&&{index:r3.index,range:r3.range};return f2(0).then(function(){if(0=c3})).length!==0?(e4.forEach(function(u3){t3.push( function(){var t4=h3,e5=u3._cfg.dbschema;fn(s4,t4,f2),fn(s4,e5,f2),h3=s4._dbSchema=e5;var n3=an(t4,e5);n3.add.forEach(function(e6){un(f2,e6[0],e6[1].primKey,e6[1].indexes)}),n3.change.forEach(function(e6){if(e6.recreate)throw new Y.Upgrade("Not yet support for changing primary key");var t5=f2.objectStore(e6.name);e6.add.forEach(function(e7){return cn2(t5,e7)}),e6.change.forEach(function(e7){t5.deleteIndex(e7.name),cn2(t5,e7)}),e6.del.forEach(function(e7){return t5.deleteIndex(e7)})});var r4=u3._cfg. contentUpgrade;if(r4&&u3._cfg.version>c3){Zt(s4,f2),l2._memoizedTables={};var i3=g(e5);n3.del.forEach(function(e6){i3[e6]=t4[e6]}),tn(s4,[s4.Transaction.prototype]),en(s4,[s4.Transaction.prototype],x(i3),i3),l2.schema=i3;var o3,a3=B(r4);return a3&&Le(),n3=_e.follow(function(){var e6;(o3=r4(l2))&&a3&&(e6=Ue.bind(null,null),o3.then(e6,e6))}),o3&&typeof o3.then=="function"?_e.resolve(o3):n3.then(function(){return o3})}}),t3.push(function(e5){var t4,n3,r4=u3._cfg.dbschema;t4=r4,n3=e5,[].slice.call(n3. db.objectStoreNames).forEach(function(e6){return t4[e6]==null&&n3.db.deleteObjectStore(e6)}),tn(s4,[s4.Transaction.prototype]),en(s4,[s4.Transaction.prototype],s4._storeNames,s4._dbSchema),l2.schema=s4._dbSchema}),t3.push(function(e5){s4.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(s4.idbdb.version/10)===u3._cfg.version?(s4.idbdb.deleteObjectStore("$meta"),delete s4._dbSchema.$meta,s4._storeNames=s4._storeNames.filter(function(e6){return e6!=="$meta"})):e5.objectStore("$meta").put(u3._cfg. version,"version"))})}),function e5(){return t3.length?_e.resolve(t3.shift()(l2.idbtrans)).then(e5):_e.resolve()}().then(function(){sn(h3,f2)})):_e.resolve();var s4,c3,l2,f2,t3,h3}).catch(u2)):(x(o2).forEach(function(e4){un(i2,e4,o2[e4].primKey,o2[e4].indexes)}),Zt(n2,i2),void _e.follow(function(){return n2.on.populate.fire(a2)}).catch(u2));var e3,t2})}function on2(e2,r3){sn(e2._dbSchema,r3),r3.db.version%10!=0||r3.objectStoreNames.contains("$meta")||r3.db.createObjectStore("$meta").add(Math.ceil( r3.db.version/10-1),"version");var t2=ln(0,e2.idbdb,r3);fn(e2,e2._dbSchema,r3);for(var n2=0,i2=an(t2,e2._dbSchema).change;n2Math.pow(2,62)? 0:e3.oldVersion,m2=e3<1,f2.idbdb=l2.result,p3&&on2(f2,v2),rn(f2,e3/10,v2,n3))},n3),l2.onsuccess=qe(function(){v2=null;var e3,t3,n4,r4,i3,o2=f2.idbdb=l2.result,a2=b(o2.objectStoreNames);if(0"u"?_e.resolve():!navigator.userAgentData&&/Safari\//.test( navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(e3){function t3(){return indexedDB.databases().finally(e3)}n2=setInterval(t3,100),t3()}).finally(function(){return clearInterval(n2)}):Promise.resolve()).then(y2)]).then(function(){return e2(),h3.onReadyBeingFired=[],_e.resolve(mn(function(){return f2.on.ready.fire(f2.vip)})).then(function e3(){if(0d3.limit?t2.length=d3.limit:e2.length===d3.limit&&t2.length=r4.limit&&(!r4.values||e4.req.values)&&Xn(e4.req.query.range,r4.query.range)}),!1,i4,o3];case"count":return a3=o3.find(function(e4){return Gn(e4.req.query.range,r4.query.range)}), [a3,!!a3,i4,o3]}}(O2,c3,"query",t2),a2=o2[0],e2=o2[1],u2=o2[2],s3=o2[3];return a2&&e2?a2.obsSet=t2.obsSet:(e2=l2.query(t2).then(function(e3){var t3=e3.result;if(a2&&(a2.res=t3),i3){for(var n3=0,r4=t3.length;n3{if(parentId!==null&&!await db.messages.get(parentId))throw new Error(`Parent message ${parentId} not found`);const newMessage={...message,id:uuid$1(),parent:parentId,toolCalls:message.toolCalls??"",children:[]};if(await db.messages.add(newMessage),parentId!==null){const parentMessage=await db.messages.get(parentId);parentMessage&&await db.messages.update(parentId,{children:[...parentMessage.children,newMessage.id]})}return await this.updateConversation(message.convId,{currNode:newMessage. id}),newMessage})}static async createRootMessage(convId){const rootMessage={id:uuid$1(),convId,type:"root",timestamp:Date.now(),role:MessageRole.SYSTEM,content:"",parent:null,toolCalls:"",children:[]};return await db.messages.add(rootMessage),rootMessage.id}static async createSystemMessage(convId,systemPrompt,parentId){const trimmedPrompt=systemPrompt.trim();if(!trimmedPrompt)throw new Error("Cannot create system message with empty content");const systemMessage={id:uuid$1(),convId,type:MessageRole. SYSTEM,timestamp:Date.now(),role:MessageRole.SYSTEM,content:trimmedPrompt,parent:parentId,children:[]};await db.messages.add(systemMessage);const parentMessage=await db.messages.get(parentId);return parentMessage&&await db.messages.update(parentId,{children:[...parentMessage.children,systemMessage.id]}),systemMessage}static async deleteConversation(id2,options){await db.transaction("rw",[db.conversations,db.messages],async()=>{if(options?.deleteWithForks){const idsToDelete=[],queue=[id2];for(;queue. length>0;){const parentId=queue.pop(),children=await db.conversations.filter(c2=>c2.forkedFromConversationId===parentId).toArray();for(const child2 of children)idsToDelete.push(child2.id),queue.push(child2.id)}for(const forkId of idsToDelete)await db.conversations.delete(forkId),await db.messages.where("convId").equals(forkId).delete()}else{const newParent=(await db.conversations.get(id2))?.forkedFromConversationId,directChildren=await db.conversations.filter(c2=>c2.forkedFromConversationId===id2). toArray();for(const child2 of directChildren)await db.conversations.update(child2.id,{forkedFromConversationId:newParent??void 0})}await db.conversations.delete(id2),await db.messages.where("convId").equals(id2).delete()})}static async deleteMessage(messageId){await db.transaction("rw",db.messages,async()=>{const message=await db.messages.get(messageId);if(message){if(message.parent){const parent=await db.messages.get(message.parent);parent&&(parent.children=parent.children.filter(childId=>childId!== messageId),await db.messages.put(parent))}await db.messages.delete(messageId)}})}static async deleteMessageCascading(conversationId,messageId){return await db.transaction("rw",db.messages,async()=>{const allMessages=await db.messages.where("convId").equals(conversationId).toArray(),descendants=findDescendantMessages(allMessages,messageId),allToDelete=[messageId,...descendants],message=await db.messages.get(messageId);if(message&&message.parent){const parent=await db.messages.get(message.parent); parent&&(parent.children=parent.children.filter(childId=>childId!==messageId),await db.messages.put(parent))}return await db.messages.bulkDelete(allToDelete),allToDelete})}static async getAllConversations(){return await db.conversations.orderBy("lastModified").reverse().toArray()}static async getConversation(id2){return await db.conversations.get(id2)}static async getConversationMessages(convId){return await db.messages.where("convId").equals(convId).sortBy("timestamp")}static async updateConversation(id2,updates){ await db.conversations.update(id2,{...updates,lastModified:Date.now()})}static async updateCurrentNode(convId,nodeId){await this.updateConversation(convId,{currNode:nodeId})}static async updateMessage(id2,updates){await db.messages.update(id2,updates)}static async importConversations(data){let importedCount=0,skippedCount=0;return await db.transaction("rw",[db.conversations,db.messages],async()=>{for(const item of data){const{conv,messages}=item;if(await db.conversations.get(conv.id)){console.warn( `Conversation "${conv.name}" already exists, skipping...`),skippedCount++;continue}await db.conversations.add(conv);for(const msg of messages)await db.messages.put(msg);importedCount++}return{imported:importedCount,skipped:skippedCount}})}static async forkConversation(sourceConvId,atMessageId,options){return await db.transaction("rw",[db.conversations,db.messages],async()=>{const sourceConv=await db.conversations.get(sourceConvId);if(!sourceConv)throw new Error(`Source conversation ${sourceConvId}\ not found`);const allMessages=await db.messages.where("convId").equals(sourceConvId).toArray(),pathMessages=filterByLeafNodeId(allMessages,atMessageId,!0);if(pathMessages.length===0)throw new Error(`Could not resolve message path to ${atMessageId}`);const idMap=new Map;for(const msg of pathMessages)idMap.set(msg.id,uuid$1());const newConvId=uuid$1(),clonedMessages=pathMessages.map(msg=>{const newId=idMap.get(msg.id),newParent=msg.parent?idMap.get(msg.parent)??null:null,newChildren=msg.children. filter(childId=>idMap.has(childId)).map(childId=>idMap.get(childId));return{...msg,id:newId,convId:newConvId,parent:newParent,children:newChildren,extra:options.includeAttachments?msg.extra:void 0}}),lastClonedMessage=clonedMessages[clonedMessages.length-1],newConv={id:newConvId,name:options.name,lastModified:Date.now(),currNode:lastClonedMessage.id,forkedFromConversationId:sourceConvId,mcpServerOverrides:sourceConv.mcpServerOverrides?sourceConv.mcpServerOverrides.map(o=>({serverId:o.serverId,enabled:o. enabled})):void 0};await db.conversations.add(newConv);for(const msg of clonedMessages)await db.messages.add(msg);return newConv})}}const MIGRATION_DONE_KEY="llama-webui-migration-v2-done";function isMigrationNeeded(){try{return!localStorage.getItem(MIGRATION_DONE_KEY)}catch{return!1}}function markMigrationDone(){try{localStorage.setItem(MIGRATION_DONE_KEY,String(Date.now()))}catch{}}function hasLegacyMarkers(message){return message.content?LEGACY_AGENTIC_REGEX.HAS_LEGACY_MARKERS.test(message.content): !1}function extractLegacyReasoning(content2){let reasoning="",cleanContent=content2;const re2=new RegExp(LEGACY_AGENTIC_REGEX.REASONING_EXTRACT.source,"g");let match;for(;(match=re2.exec(content2))!==null;)reasoning+=match[1];return cleanContent=cleanContent.replace(new RegExp(LEGACY_AGENTIC_REGEX.REASONING_BLOCK.source,"g"),"").replace(LEGACY_AGENTIC_REGEX.REASONING_OPEN,""),{reasoning,cleanContent}}function parseLegacyToolCalls(content2){const turns=[],regex=new RegExp(LEGACY_AGENTIC_REGEX.COMPLETED_TOOL_CALL. source,"g");let lastIndex=0,currentTurn={textBefore:"",toolCalls:[]},match;for(;(match=regex.exec(content2))!==null;){const textBefore=content2.slice(lastIndex,match.index).trim();textBefore&¤tTurn.toolCalls.length>0?(turns.push(currentTurn),currentTurn={textBefore,toolCalls:[]}):textBefore&¤tTurn.toolCalls.length===0&&(currentTurn.textBefore=textBefore),currentTurn.toolCalls.push({name:match[1],args:match[2],result:match[3].replace(/^\n+|\n+$/g,"")}),lastIndex=match.index+match[0].length} const remainingText=content2.slice(lastIndex).trim();if(currentTurn.toolCalls.length>0&&turns.push(currentTurn),remainingText){const cleanRemaining=remainingText.replace(LEGACY_AGENTIC_REGEX.AGENTIC_TOOL_CALL_OPEN,"").trim();cleanRemaining&&turns.push({textBefore:cleanRemaining,toolCalls:[]})}return turns.length===0&&turns.push({textBefore:content2.trim(),toolCalls:[]}),turns}async function migrateConversation(convId){const allMessages=await DatabaseService.getConversationMessages(convId);let migratedCount=0; for(const message of allMessages){if(message.role!==MessageRole.ASSISTANT)continue;if(!hasLegacyMarkers(message)){if(message.content?.includes(LEGACY_REASONING_TAGS.START)){const{reasoning:reasoning2,cleanContent:cleanContent2}=extractLegacyReasoning(message.content);await DatabaseService.updateMessage(message.id,{content:cleanContent2.trim(),reasoningContent:reasoning2||void 0}),migratedCount++}continue}const{reasoning,cleanContent}=extractLegacyReasoning(message.content),turns=parseLegacyToolCalls( cleanContent);let existingToolCalls=[];if(message.toolCalls)try{existingToolCalls=JSON.parse(message.toolCalls)}catch{}const firstTurn=turns[0];if(!firstTurn)continue;const firstTurnToolCalls=firstTurn.toolCalls.map((tc,i)=>({id:(existingToolCalls.find(e=>e.function?.name===tc.name)||existingToolCalls[i])?.id||`legacy_tool_${i}`,type:"function",function:{name:tc.name,arguments:tc.args}}));await DatabaseService.updateMessage(message.id,{content:firstTurn.textBefore,reasoningContent:reasoning||void 0, toolCalls:firstTurnToolCalls.length>0?JSON.stringify(firstTurnToolCalls):""});let currentParentId=message.id,toolCallIdCounter=existingToolCalls.length;for(let i=0;i{const idx=toolCallIdCounter+i;return{id:existingToolCalls[idx]?.id||`legacy_tool_${idx}`,type:"function",function:{name:tc.name,arguments:tc.args}}});toolCallIdCounter+=turn.toolCalls.length,currentParentId=(await DatabaseService.createMessageBranch({convId,type:MessageType.TEXT,role:MessageRole.ASSISTANT,content:turn.textBefore,timestamp:message.timestamp+turnIdx*100,toolCalls:turnToolCalls. length>0?JSON.stringify(turnToolCalls):"",children:[],model:message.model},currentParentId)).id;for(let i=0;i0&¤tParentId!== message.id){for(const childId of message.children){const child2=allMessages.find(m=>m.id===childId);if(child2&&child2.role!==MessageRole.TOOL){await DatabaseService.updateMessage(childId,{parent:currentParentId});const newParent=await DatabaseService.getConversationMessages(convId).then(msgs=>msgs.find(m=>m.id===currentParentId));newParent&&!newParent.children.includes(childId)&&await DatabaseService.updateMessage(currentParentId,{children:[...newParent.children,childId]})}}await DatabaseService. updateMessage(message.id,{children:[]})}migratedCount++}return migratedCount}async function runLegacyMigration(){if(isMigrationNeeded()){console.log("[Migration] Starting legacy message format migration...");try{const conversations2=await DatabaseService.getAllConversations();let totalMigrated=0;for(const conv of conversations2){const count=await migrateConversation(conv.id);totalMigrated+=count}totalMigrated>0?console.log(`[Migration] Migrated ${totalMigrated} messages across ${conversations2.length}\ conversations`):console.log("[Migration] No legacy messages found, marking as done"),markMigrationDone()}catch(error2){console.error("[Migration] Failed to migrate legacy messages:",error2),markMigrationDone()}}}class TTLCache{cache=new Map;ttlMs;maxEntries;onEvict;constructor(options={}){this.ttlMs=options.ttlMs??DEFAULT_CACHE_TTL_MS,this.maxEntries=options.maxEntries??DEFAULT_CACHE_MAX_ENTRIES,this.onEvict=options.onEvict}get(key2){const entry=this.cache.get(key2);return entry?Date.now()>entry. expiresAt?(this.delete(key2),null):(entry.lastAccessed=Date.now(),entry.value):null}set(key2,value,customTtlMs){this.cache.size>=this.maxEntries&&!this.cache.has(key2)&&this.evictOldest();const ttl=customTtlMs??this.ttlMs,now2=Date.now();this.cache.set(key2,{value,expiresAt:now2+ttl,lastAccessed:now2})}has(key2){const entry=this.cache.get(key2);return entry?Date.now()>entry.expiresAt?(this.delete(key2),!1):!0:!1}delete(key2){const entry=this.cache.get(key2);return entry&&this.onEvict&&this.onEvict( key2,entry.value),this.cache.delete(key2)}clear(){if(this.onEvict)for(const[key2,entry]of this.cache)this.onEvict(key2,entry.value);this.cache.clear()}get size(){return this.cache.size}prune(){const now2=Date.now();let pruned=0;for(const[key2,entry]of this.cache)now2>entry.expiresAt&&(this.delete(key2),pruned++);return pruned}keys(){const now2=Date.now(),validKeys=[];for(const[key2,entry]of this.cache)now2<=entry.expiresAt&&validKeys.push(key2);return validKeys}evictOldest(){let oldestKey=null,oldestTime=1/0; for(const[key2,entry]of this.cache)entry.lastAccessedentry.expiresAt?(this.delete(key2),!1):(entry.expiresAt=now2+this.ttlMs,entry.lastAccessed=now2,!0)}}function throwIfAborted(signal){if(signal?.aborted)throw new DOMException("Operation was aborted","AbortError")}function isAbortError(error2){return error2 instanceof DOMException&&error2.name==="AbortError"||error2 instanceof Error&&error2.name==="AbortError"}function uuid$1(){return globalThis.crypto?.randomUUID?.()??Math.random().toString(36).substring(2)}function ActionIconCopyToClipboard($$anchor,$$props){push$1($$props,!0);let ariaLabel=prop($$props,"ariaLabel",3,"Copy to clipboard"),canCopy=prop($$props,"canCopy",3,!0);{let $0=user_derived(()=>canCopy()?"pointer":"not-allowed");Copy($$anchor,{get class(){return`h-3 w-3 flex-shrink-0 cursor-${get$4($0)?? ""}`},get"aria-label"(){return ariaLabel()},onclick:()=>canCopy()&©ToClipboard($$props.text)})}pop()}function ActionIconRemove($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),iconSize=prop($$props,"iconSize",3,3);Button($$anchor,{type:"button",variant:"ghost",size:"icon-sm",get class(){return`bg-white/20 p-0 hover:bg-white/30 ${className()??""}`},onclick:e=>{e.stopPropagation(),$$props.onRemove?.($$props.id)},"aria-label":"Remove file",children:($$anchor2,$$slotProps)=>{ X($$anchor2,{get class(){return`h-${iconSize()??""} w-${iconSize()??""}`}})},$$slots:{default:!0}}),pop()}var root_6$z=from_html("

      "),root_2$15=from_html(" ",1);function BadgeChatStatistic($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,"");function handleClick(){copyToClipboard(String($$props.value))}var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Root$5, ($$anchor3,Tooltip_Root)=>{Tooltip_Root($$anchor3,{children:($$anchor4,$$slotProps)=>{var fragment_2=root_2$15(),node_2=first_child(fragment_2);component(node_2,()=>Tooltip_trigger,($$anchor5,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor5,{children:($$anchor6,$$slotProps2)=>{BadgeInfo($$anchor6,{get class(){return className()},onclick:handleClick,icon:$$anchor7=>{var fragment_4=comment$2(),node_3=first_child(fragment_4);component(node_3,()=>$$props.icon,($$anchor8,Icon_1)=>{Icon_1($$anchor8,{class:"\ h-3 w-3"})}),append($$anchor7,fragment_4)},children:($$anchor7,$$slotProps3)=>{next$1();var text2=text$8();template_effect(()=>set_text(text2,$$props.value)),append($$anchor7,text2)},$$slots:{icon:!0,default:!0}})},$$slots:{default:!0}})});var node_4=sibling(node_2,2);component(node_4,()=>Tooltip_content,($$anchor5,Tooltip_Content)=>{Tooltip_Content($$anchor5,{children:($$anchor6,$$slotProps2)=>{var p2=root_6$z(),text_1=child(p2,!0);reset(p2),template_effect(()=>set_text(text_1,$$props.tooltipLabel)), append($$anchor6,p2)},$$slots:{default:!0}})}),append($$anchor4,fragment_2)},$$slots:{default:!0}})}),append($$anchor2,fragment_1)},alternate=$$anchor2=>{BadgeInfo($$anchor2,{get class(){return className()},onclick:handleClick,icon:$$anchor3=>{var fragment_7=comment$2(),node_5=first_child(fragment_7);component(node_5,()=>$$props.icon,($$anchor4,Icon_2)=>{Icon_2($$anchor4,{class:"h-3 w-3"})}),append($$anchor3,fragment_7)},children:($$anchor3,$$slotProps)=>{next$1();var text_2=text$8();template_effect( ()=>set_text(text_2,$$props.value)),append($$anchor3,text_2)},$$slots:{icon:!0,default:!0}})};if_block(node2,$$render=>{$$props.tooltipLabel?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}var root$1w=from_html("");function BadgeInfo($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,"");var button=root$1w();button.__click=function(...$$args){$$props.onclick?.apply(this,$$args)};var node2=child(button);{var consequent=$$anchor2=>{ var fragment=comment$2(),node_1=first_child(fragment);snippet(node_1,()=>$$props.icon),append($$anchor2,fragment)};if_block(node2,$$render=>{$$props.icon&&$$render(consequent)})}var node_2=sibling(node2,2);snippet(node_2,()=>$$props.children),reset(button),template_effect($0=>set_class(button,1,$0),[()=>clsx(cn$1("inline-flex cursor-pointer items-center gap-1 rounded-sm bg-muted-foreground/15 px-1.5 py-0.75",className()))]),append($$anchor,button),pop()}delegate(["click"]);var root_1$$=from_html( " ");function BadgeModality($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,"");const displayableModalities=user_derived(()=>$$props.modalities.filter(m=>m===ModelModality.VISION||m===ModelModality.AUDIO));var fragment=comment$2(),node2=first_child(fragment);each(node2,17,()=>get$4(displayableModalities),index$2,($$anchor2,modality)=>{const IconComponent=user_derived(()=>MODALITY_ICONS[get$4(modality)]),label=user_derived(()=>MODALITY_LABELS[get$4(modality)]); var span=root_1$$(),node_1=child(span);{var consequent=$$anchor3=>{var fragment_1=comment$2(),node_2=first_child(fragment_1);component(node_2,()=>get$4(IconComponent),($$anchor4,IconComponent_1)=>{IconComponent_1($$anchor4,{class:"h-3 w-3"})}),append($$anchor3,fragment_1)};if_block(node_1,$$render=>{get$4(IconComponent)&&$$render(consequent)})}var text2=sibling(node_1);reset(span),template_effect($0=>{set_class(span,1,$0),set_text(text2,` ${get$4(label)??""}`)},[()=>clsx(cn$1("inline-flex items-\ center gap-1 rounded-md bg-muted px-2 py-1 text-xs font-medium",className()))]),append($$anchor2,span)}),append($$anchor,fragment),pop()}var root_12$a=from_html('
      '),root_2$14=from_html(" ",1),root_14$9=from_html('
      '),root_1$_=from_html("
      "),root$1v=from_html(" ",1);function ChatAttachmentsList($$anchor,$$props){push$1($$props,!0);let className=prop( $$props,"class",3,""),style2=prop($$props,"style",3,""),attachments=prop($$props,"attachments",19,()=>[]),readonly2=prop($$props,"readonly",3,!1),uploadedFiles=prop($$props,"uploadedFiles",27,()=>proxy([])),imageClass=prop($$props,"imageClass",3,""),imageHeight=prop($$props,"imageHeight",3,"h-24"),imageWidth=prop($$props,"imageWidth",3,"w-auto"),limitToSingleRow=prop($$props,"limitToSingleRow",3,!1),displayItems=user_derived(()=>getAttachmentDisplayItems({uploadedFiles:uploadedFiles(),attachments:attachments()})), carouselRef=state$1(void 0),isScrollable=state$1(!1),previewDialogOpen=state$1(!1),previewItem=state$1(null),mcpResourcePreviewOpen=state$1(!1),mcpResourcePreviewExtra=state$1(null),showViewAll=user_derived(()=>limitToSingleRow()&&get$4(displayItems).length>0&&get$4(isScrollable)),viewAllDialogOpen=state$1(!1);function openPreview(item,event2){event2?.stopPropagation(),event2?.preventDefault(),set$1(previewItem,{uploadedFile:item.uploadedFile,attachment:item.attachment,preview:item.preview,name:item. name,size:item.size,textContent:item.textContent},!0),set$1(previewDialogOpen,!0)}function openMcpResourcePreview(extra){set$1(mcpResourcePreviewExtra,extra,!0),set$1(mcpResourcePreviewOpen,!0)}function toMcpResourceAttachment(extra,id2){return{id:id2,resource:{uri:extra.uri,name:extra.name,title:extra.name,serverName:extra.serverName}}}user_effect(()=>{get$4(carouselRef)&&get$4(displayItems).length&&get$4(carouselRef).resetScroll()});var fragment=root$1v(),node2=first_child(fragment);{var consequent_10=$$anchor2=>{ var div=root_1$_(),node_1=child(div);{var consequent_5=$$anchor3=>{var fragment_1=root_2$14(),node_2=first_child(fragment_1);bind_this(HorizontalScrollCarousel(node_2,{onScrollableChange:scrollable=>set$1(isScrollable,scrollable,!0),children:($$anchor4,$$slotProps)=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);each(node_3,17,()=>get$4(displayItems),item=>item.id,($$anchor5,item)=>{var fragment_3=comment$2(),node_4=first_child(fragment_3);{var consequent_1=$$anchor6=>{const mcpPrompt=user_derived( ()=>get$4(item).attachment?.type===AttachmentType.MCP_PROMPT?get$4(item).attachment:get$4(item).uploadedFile?.mcpPrompt?{type:AttachmentType.MCP_PROMPT,name:get$4(item).name,serverName:get$4(item).uploadedFile.mcpPrompt.serverName,promptName:get$4(item).uploadedFile.mcpPrompt.promptName,content:get$4(item).textContent??"",arguments:get$4(item).uploadedFile.mcpPrompt.arguments}:null);var fragment_4=comment$2(),node_5=first_child(fragment_4);{var consequent=$$anchor7=>{{let $0=user_derived(()=>limitToSingleRow()? "first:ml-4 last:mr-4":""),$1=user_derived(()=>$$props.onFileRemove?()=>$$props.onFileRemove(get$4(item).id):void 0);ChatAttachmentMcpPrompt($$anchor7,{get class(){return`max-w-[300px] min-w-[200px] flex-shrink-0 ${get$4($0)??""}`},get prompt(){return get$4(mcpPrompt)},get readonly(){return readonly2()},get isLoading(){return get$4(item).isLoading},get loadError(){return get$4(item).loadError},get onRemove(){return get$4($1)}})}};if_block(node_5,$$render=>{get$4(mcpPrompt)&&$$render(consequent)})} append($$anchor6,fragment_4)},alternate_2=$$anchor6=>{var fragment_6=comment$2(),node_6=first_child(fragment_6);{var consequent_2=$$anchor7=>{const mcpResource=user_derived(()=>get$4(item).attachment);{let $0=user_derived(()=>limitToSingleRow()?"first:ml-4 last:mr-4":""),$1=user_derived(()=>toMcpResourceAttachment(get$4(mcpResource),get$4(item).id));ChatAttachmentMcpResource($$anchor7,{get class(){return`flex-shrink-0 ${get$4($0)??""}`},get attachment(){return get$4($1)},onClick:()=>openMcpResourcePreview( get$4(mcpResource))})}},alternate_1=$$anchor7=>{var fragment_8=comment$2(),node_7=first_child(fragment_8);{var consequent_3=$$anchor8=>{{let $0=user_derived(()=>limitToSingleRow()?"first:ml-4 last:mr-4":"");ChatAttachmentThumbnailImage($$anchor8,{get class(){return`flex-shrink-0 cursor-pointer ${get$4($0)??""}`},get id(){return get$4(item).id},get name(){return get$4(item).name},get preview(){return get$4(item).preview},get readonly(){return readonly2()},get onRemove(){return $$props.onFileRemove}, get height(){return imageHeight()},get width(){return imageWidth()},get imageClass(){return imageClass()},onClick:event2=>openPreview(get$4(item),event2)})}},alternate=$$anchor8=>{{let $0=user_derived(()=>limitToSingleRow()?"first:ml-4 last:mr-4":"");ChatAttachmentThumbnailFile($$anchor8,{get class(){return`flex-shrink-0 cursor-pointer ${get$4($0)??""}`},get id(){return get$4(item).id},get name(){return get$4(item).name},get size(){return get$4(item).size},get readonly(){return readonly2()},get onRemove(){ return $$props.onFileRemove},get textContent(){return get$4(item).textContent},get attachment(){return get$4(item).attachment},get uploadedFile(){return get$4(item).uploadedFile},onClick:event2=>openPreview(get$4(item),event2)})}};if_block(node_7,$$render=>{get$4(item).isImage&&get$4(item).preview?$$render(consequent_3):$$render(alternate,!1)},!0)}append($$anchor7,fragment_8)};if_block(node_6,$$render=>{get$4(item).isMcpResource&&get$4(item).attachment?.type===AttachmentType.MCP_RESOURCE?$$render( consequent_2):$$render(alternate_1,!1)},!0)}append($$anchor6,fragment_6)};if_block(node_4,$$render=>{get$4(item).isMcpPrompt?$$render(consequent_1):$$render(alternate_2,!1)})}append($$anchor5,fragment_3)}),append($$anchor4,fragment_2)},$$slots:{default:!0}}),$$value=>set$1(carouselRef,$$value,!0),()=>get$4(carouselRef));var node_8=sibling(node_2,2);{var consequent_4=$$anchor4=>{var div_1=root_12$a(),node_9=child(div_1);Button(node_9,{type:"button",variant:"ghost",size:"sm",class:"h-6 text-xs tex\ t-muted-foreground hover:text-foreground",onclick:()=>set$1(viewAllDialogOpen,!0),children:($$anchor5,$$slotProps)=>{next$1();var text2=text$8();template_effect(()=>set_text(text2,`View all (${get$4(displayItems).length??""})`)),append($$anchor5,text2)},$$slots:{default:!0}}),reset(div_1),append($$anchor4,div_1)};if_block(node_8,$$render=>{get$4(showViewAll)&&$$render(consequent_4)})}append($$anchor3,fragment_1)},alternate_6=$$anchor3=>{var div_2=root_14$9();each(div_2,21,()=>get$4(displayItems), item=>item.id,($$anchor4,item)=>{var fragment_12=comment$2(),node_10=first_child(fragment_12);{var consequent_7=$$anchor5=>{const mcpPrompt=user_derived(()=>get$4(item).attachment?.type===AttachmentType.MCP_PROMPT?get$4(item).attachment:get$4(item).uploadedFile?.mcpPrompt?{type:AttachmentType.MCP_PROMPT,name:get$4(item).name,serverName:get$4(item).uploadedFile.mcpPrompt.serverName,promptName:get$4(item).uploadedFile.mcpPrompt.promptName,content:get$4(item).textContent??"",arguments:get$4(item).uploadedFile. mcpPrompt.arguments}:null);var fragment_13=comment$2(),node_11=first_child(fragment_13);{var consequent_6=$$anchor6=>{{let $0=user_derived(()=>$$props.onFileRemove?()=>$$props.onFileRemove(get$4(item).id):void 0);ChatAttachmentMcpPrompt($$anchor6,{class:"max-w-[300px] min-w-[200px]",get prompt(){return get$4(mcpPrompt)},get readonly(){return readonly2()},get isLoading(){return get$4(item).isLoading},get loadError(){return get$4(item).loadError},get onRemove(){return get$4($0)}})}};if_block(node_11, $$render=>{get$4(mcpPrompt)&&$$render(consequent_6)})}append($$anchor5,fragment_13)},alternate_5=$$anchor5=>{var fragment_15=comment$2(),node_12=first_child(fragment_15);{var consequent_8=$$anchor6=>{const mcpResource=user_derived(()=>get$4(item).attachment);{let $0=user_derived(()=>toMcpResourceAttachment(get$4(mcpResource),get$4(item).id));ChatAttachmentMcpResource($$anchor6,{get attachment(){return get$4($0)},onClick:()=>openMcpResourcePreview(get$4(mcpResource))})}},alternate_4=$$anchor6=>{var fragment_17=comment$2(), node_13=first_child(fragment_17);{var consequent_9=$$anchor7=>{ChatAttachmentThumbnailImage($$anchor7,{class:"cursor-pointer",get id(){return get$4(item).id},get name(){return get$4(item).name},get preview(){return get$4(item).preview},get readonly(){return readonly2()},get onRemove(){return $$props.onFileRemove},get height(){return imageHeight()},get width(){return imageWidth()},get imageClass(){return imageClass()},onClick:event2=>openPreview(get$4(item),event2)})},alternate_3=$$anchor7=>{ChatAttachmentThumbnailFile( $$anchor7,{class:"cursor-pointer",get id(){return get$4(item).id},get name(){return get$4(item).name},get size(){return get$4(item).size},get readonly(){return readonly2()},get onRemove(){return $$props.onFileRemove},get textContent(){return get$4(item).textContent},get attachment(){return get$4(item).attachment},get uploadedFile(){return get$4(item).uploadedFile},onClick:event2=>openPreview(get$4(item),event2)})};if_block(node_13,$$render=>{get$4(item).isImage&&get$4(item).preview?$$render(consequent_9): $$render(alternate_3,!1)},!0)}append($$anchor6,fragment_17)};if_block(node_12,$$render=>{get$4(item).isMcpResource&&get$4(item).attachment?.type===AttachmentType.MCP_RESOURCE?$$render(consequent_8):$$render(alternate_4,!1)},!0)}append($$anchor5,fragment_15)};if_block(node_10,$$render=>{get$4(item).isMcpPrompt?$$render(consequent_7):$$render(alternate_5,!1)})}append($$anchor4,fragment_12)}),reset(div_2),append($$anchor3,div_2)};if_block(node_1,$$render=>{limitToSingleRow()?$$render(consequent_5): $$render(alternate_6,!1)})}reset(div),template_effect(()=>{set_class(div,1,clsx(className())),set_style(div,style2())}),append($$anchor2,div)};if_block(node2,$$render=>{get$4(displayItems).length>0&&$$render(consequent_10)})}var node_14=sibling(node2,2);{var consequent_11=$$anchor2=>{DialogChatAttachmentPreview($$anchor2,{get uploadedFile(){return get$4(previewItem).uploadedFile},get attachment(){return get$4(previewItem).attachment},get preview(){return get$4(previewItem).preview},get name(){return get$4( previewItem).name},get size(){return get$4(previewItem).size},get textContent(){return get$4(previewItem).textContent},get activeModelId(){return $$props.activeModelId},get open(){return get$4(previewDialogOpen)},set open($$value){set$1(previewDialogOpen,$$value,!0)}})};if_block(node_14,$$render=>{get$4(previewItem)&&$$render(consequent_11)})}var node_15=sibling(node_14,2);DialogChatAttachmentsViewAll(node_15,{get uploadedFiles(){return uploadedFiles()},get attachments(){return attachments()},get readonly(){ return readonly2()},get onFileRemove(){return $$props.onFileRemove},imageHeight:"h-64",get imageClass(){return imageClass()},get activeModelId(){return $$props.activeModelId},get open(){return get$4(viewAllDialogOpen)},set open($$value){set$1(viewAllDialogOpen,$$value,!0)}});var node_16=sibling(node_15,2);{var consequent_12=$$anchor2=>{DialogMcpResourcePreview($$anchor2,{get extra(){return get$4(mcpResourcePreviewExtra)},get open(){return get$4(mcpResourcePreviewOpen)},set open($$value){set$1(mcpResourcePreviewOpen, $$value,!0)}})};if_block(node_16,$$render=>{get$4(mcpResourcePreviewExtra)&&$$render(consequent_12)})}append($$anchor,fragment),pop()}var root_1$Z=from_html('
      '),root$1u=from_html("
      ");function ChatAttachmentMcpPrompt($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),readonly2=prop($$props,"readonly",3,!1),isLoading2=prop( $$props,"isLoading",3,!1);var div=root$1u(),node2=child(div);ChatMessageMcpPromptContent(node2,{get prompt(){return $$props.prompt},get variant(){return McpPromptVariant.ATTACHMENT},get isLoading(){return isLoading2()},get loadError(){return $$props.loadError}});var node_1=sibling(node2,2);{var consequent=$$anchor2=>{var div_1=root_1$Z(),node_2=child(div_1);ActionIconRemove(node_2,{get id(){return $$props.prompt.name},onRemove:()=>$$props.onRemove?.()}),reset(div_1),append($$anchor2,div_1)};if_block( node_1,$$render=>{!readonly2()&&$$props.onRemove&&$$render(consequent)})}reset(div),template_effect(()=>set_class(div,1,`group relative ${className()??""}`)),append($$anchor,div),pop()}const NEVER=Object.freeze({status:"aborted"});function $constructor(name,initializer2,params){function init2(inst,def){if(inst._zod||Object.defineProperty(inst,"_zod",{value:{def,constr:_,traits:new Set},enumerable:!1}),inst._zod.traits.has(name))return;inst._zod.traits.add(name),initializer2(inst,def);const proto=_. prototype,keys2=Object.keys(proto);for(let i=0;iparams?.Parent&&inst instanceof params.Parent?!0:inst?._zod?.traits?.has(name)}),Object.defineProperty(_,"name",{value:name}),_}class $ZodAsyncError extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class $ZodEncodeError extends Error{constructor(name){super(`Encountered unidirectional transform during encode: ${name}`),this.name="ZodEncodeError"}}const globalConfig={};function config(newConfig){return globalConfig} function getEnumValues(entries){const numericValues=Object.values(entries).filter(v=>typeof v=="number");return Object.entries(entries).filter(([k,_])=>numericValues.indexOf(+k)===-1).map(([_,v])=>v)}function jsonStringifyReplacer(_,value){return typeof value=="bigint"?value.toString():value}function cached(getter){return{get value(){{const value=getter();return Object.defineProperty(this,"value",{value}),value}}}}function nullish(input){return input==null}function cleanRegex(source2){const start2=source2. startsWith("^")?1:0,end=source2.endsWith("$")?source2.length-1:source2.length;return source2.slice(start2,end)}function floatSafeRemainder(val,step){const valDecCount=(val.toString().split(".")[1]||"").length,stepString=step.toString();let stepDecCount=(stepString.split(".")[1]||"").length;if(stepDecCount===0&&/\d?e-\d?/.test(stepString)){const match=stepString.match(/\d?e-(\d?)/);match?.[1]&&(stepDecCount=Number.parseInt(match[1]))}const decCount=valDecCount>stepDecCount?valDecCount:stepDecCount, valInt=Number.parseInt(val.toFixed(decCount).replace(".","")),stepInt=Number.parseInt(step.toFixed(decCount).replace(".",""));return valInt%stepInt/10**decCount}const EVALUATING=Symbol("evaluating");function defineLazy(object2,key2,getter){let value;Object.defineProperty(object2,key2,{get(){if(value!==EVALUATING)return value===void 0&&(value=EVALUATING,value=getter()),value},set(v){Object.defineProperty(object2,key2,{value:v})},configurable:!0})}function assignProp(target2,prop2,value){Object.defineProperty( target2,prop2,{value,writable:!0,enumerable:!0,configurable:!0})}function mergeDefs(...defs){const mergedDescriptors={};for(const def of defs){const descriptors=Object.getOwnPropertyDescriptors(def);Object.assign(mergedDescriptors,descriptors)}return Object.defineProperties({},mergedDescriptors)}function esc(str){return JSON.stringify(str)}function slugify(input){return input.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const captureStackTrace="capt\ ureStackTrace"in Error?Error.captureStackTrace:(..._args)=>{};function isObject$1(data){return typeof data=="object"&&data!==null&&!Array.isArray(data)}const allowsEval=cached(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const F=Function;return new F(""),!0}catch{return!1}});function isPlainObject$2(o){if(isObject$1(o)===!1)return!1;const ctor=o.constructor;if(ctor===void 0||typeof ctor!="function")return!0;const prot=ctor.prototype;return!(isObject$1(prot)=== !1||Object.prototype.hasOwnProperty.call(prot,"isPrototypeOf")===!1)}function shallowClone(o){return isPlainObject$2(o)?{...o}:Array.isArray(o)?[...o]:o}const propertyKeyTypes=new Set(["string","number","symbol"]);function escapeRegex(str){return str.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function clone(inst,def,params){const cl=new inst._zod.constr(def??inst._zod.def);return(!def||params?.parent)&&(cl._zod.parent=inst),cl}function normalizeParams(_params){const params=_params;if(!params)return{}; if(typeof params=="string")return{error:()=>params};if(params?.message!==void 0){if(params?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");params.error=params.message}return delete params.message,typeof params.error=="string"?{...params,error:()=>params.error}:params}function optionalKeys(shape){return Object.keys(shape).filter(k=>shape[k]._zod.optin==="optional"&&shape[k]._zod.optout==="optional")}const NUMBER_FORMAT_RANGES={safeint:[Number.MIN_SAFE_INTEGER,Number. MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function pick(schema,mask){const currDef=schema._zod.def,def=mergeDefs(schema._zod.def,{get shape(){const newShape={};for(const key2 in mask){if(!(key2 in currDef.shape))throw new Error(`Unrecognized key: "${key2}"`);mask[key2]&&(newShape[key2]=currDef.shape[key2])}return assignProp(this,"shape",newShape),newShape},checks:[]});return clone( schema,def)}function omit(schema,mask){const currDef=schema._zod.def,def=mergeDefs(schema._zod.def,{get shape(){const newShape={...schema._zod.def.shape};for(const key2 in mask){if(!(key2 in currDef.shape))throw new Error(`Unrecognized key: "${key2}"`);mask[key2]&&delete newShape[key2]}return assignProp(this,"shape",newShape),newShape},checks:[]});return clone(schema,def)}function extend$2(schema,shape){if(!isPlainObject$2(shape))throw new Error("Invalid input to extend: expected a plain object"); const checks2=schema._zod.def.checks;if(checks2&&checks2.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const def=mergeDefs(schema._zod.def,{get shape(){const _shape={...schema._zod.def.shape,...shape};return assignProp(this,"shape",_shape),_shape},checks:[]});return clone(schema,def)}function safeExtend(schema,shape){if(!isPlainObject$2(shape))throw new Error("Invalid input to safeExtend: expected a plain object");const def={...schema. _zod.def,get shape(){const _shape={...schema._zod.def.shape,...shape};return assignProp(this,"shape",_shape),_shape},checks:schema._zod.def.checks};return clone(schema,def)}function merge$1(a,b){const def=mergeDefs(a._zod.def,{get shape(){const _shape={...a._zod.def.shape,...b._zod.def.shape};return assignProp(this,"shape",_shape),_shape},get catchall(){return b._zod.def.catchall},checks:[]});return clone(a,def)}function partial(Class,schema,mask){const def=mergeDefs(schema._zod.def,{get shape(){ const oldShape=schema._zod.def.shape,shape={...oldShape};if(mask)for(const key2 in mask){if(!(key2 in oldShape))throw new Error(`Unrecognized key: "${key2}"`);mask[key2]&&(shape[key2]=Class?new Class({type:"optional",innerType:oldShape[key2]}):oldShape[key2])}else for(const key2 in oldShape)shape[key2]=Class?new Class({type:"optional",innerType:oldShape[key2]}):oldShape[key2];return assignProp(this,"shape",shape),shape},checks:[]});return clone(schema,def)}function required$4(Class,schema,mask){ const def=mergeDefs(schema._zod.def,{get shape(){const oldShape=schema._zod.def.shape,shape={...oldShape};if(mask)for(const key2 in mask){if(!(key2 in shape))throw new Error(`Unrecognized key: "${key2}"`);mask[key2]&&(shape[key2]=new Class({type:"nonoptional",innerType:oldShape[key2]}))}else for(const key2 in oldShape)shape[key2]=new Class({type:"nonoptional",innerType:oldShape[key2]});return assignProp(this,"shape",shape),shape},checks:[]});return clone(schema,def)}function aborted(x,startIndex=0){ if(x.aborted===!0)return!0;for(let i=startIndex;i{var _a2;return(_a2=iss).path??(_a2.path=[]),iss.path.unshift(path2),iss})}function unwrapMessage(message){return typeof message=="string"?message:message?.message}function finalizeIssue(iss,ctx,config2){const full={...iss,path:iss.path??[]};if(!iss.message){const message=unwrapMessage(iss.inst?._zod.def?.error?.(iss))??unwrapMessage( ctx?.error?.(iss))??unwrapMessage(config2.customError?.(iss))??unwrapMessage(config2.localeError?.(iss))??"Invalid input";full.message=message}return delete full.inst,delete full.continue,ctx?.reportInput||delete full.input,full}function getLengthableOrigin(input){return Array.isArray(input)?"array":typeof input=="string"?"string":"unknown"}function issue(...args){const[iss,input,inst]=args;return typeof iss=="string"?{message:iss,code:"custom",input,inst}:{...iss}}const initializer$1=(inst,def)=>{ inst.name="$ZodError",Object.defineProperty(inst,"_zod",{value:inst._zod,enumerable:!1}),Object.defineProperty(inst,"issues",{value:def,enumerable:!1}),inst.message=JSON.stringify(def,jsonStringifyReplacer,2),Object.defineProperty(inst,"toString",{value:()=>inst.message,enumerable:!1})},$ZodError=$constructor("$ZodError",initializer$1),$ZodRealError=$constructor("$ZodError",initializer$1,{Parent:Error});function flattenError$1(error2,mapper=issue2=>issue2.message){const fieldErrors={},formErrors=[]; for(const sub2 of error2.issues)sub2.path.length>0?(fieldErrors[sub2.path[0]]=fieldErrors[sub2.path[0]]||[],fieldErrors[sub2.path[0]].push(mapper(sub2))):formErrors.push(mapper(sub2));return{formErrors,fieldErrors}}function formatError(error2,mapper=issue2=>issue2.message){const fieldErrors={_errors:[]},processError=error3=>{for(const issue2 of error3.issues)if(issue2.code==="invalid_union"&&issue2.errors.length)issue2.errors.map(issues=>processError({issues}));else if(issue2.code==="invalid_key") processError({issues:issue2.issues});else if(issue2.code==="invalid_element")processError({issues:issue2.issues});else if(issue2.path.length===0)fieldErrors._errors.push(mapper(issue2));else{let curr=fieldErrors,i=0;for(;i(schema,value,_ctx,_params)=>{ const ctx=_ctx?Object.assign(_ctx,{async:!1}):{async:!1},result=schema._zod.run({value,issues:[]},ctx);if(result instanceof Promise)throw new $ZodAsyncError;if(result.issues.length){const e=new(_params?.Err??_Err)(result.issues.map(iss=>finalizeIssue(iss,ctx,config())));throw captureStackTrace(e,_params?.callee),e}return result.value},_parseAsync=_Err=>async(schema,value,_ctx,params)=>{const ctx=_ctx?Object.assign(_ctx,{async:!0}):{async:!0};let result=schema._zod.run({value,issues:[]},ctx);if(result instanceof Promise&&(result=await result),result.issues.length){const e=new(params?.Err??_Err)(result.issues.map(iss=>finalizeIssue(iss,ctx,config())));throw captureStackTrace(e,params?.callee),e}return result.value},_safeParse=_Err=>(schema,value,_ctx)=>{const ctx=_ctx?{..._ctx,async:!1}:{async:!1},result=schema._zod.run({value,issues:[]},ctx);if(result instanceof Promise)throw new $ZodAsyncError;return result.issues.length?{success:!1,error:new(_Err??$ZodError)(result.issues.map(iss=>finalizeIssue(iss,ctx, config())))}:{success:!0,data:result.value}},safeParse$2=_safeParse($ZodRealError),_safeParseAsync=_Err=>async(schema,value,_ctx)=>{const ctx=_ctx?Object.assign(_ctx,{async:!0}):{async:!0};let result=schema._zod.run({value,issues:[]},ctx);return result instanceof Promise&&(result=await result),result.issues.length?{success:!1,error:new _Err(result.issues.map(iss=>finalizeIssue(iss,ctx,config())))}:{success:!0,data:result.value}},safeParseAsync$1=_safeParseAsync($ZodRealError),_encode=_Err=>(schema,value,_ctx)=>{ const ctx=_ctx?Object.assign(_ctx,{direction:"backward"}):{direction:"backward"};return _parse(_Err)(schema,value,ctx)},_decode=_Err=>(schema,value,_ctx)=>_parse(_Err)(schema,value,_ctx),_encodeAsync=_Err=>async(schema,value,_ctx)=>{const ctx=_ctx?Object.assign(_ctx,{direction:"backward"}):{direction:"backward"};return _parseAsync(_Err)(schema,value,ctx)},_decodeAsync=_Err=>async(schema,value,_ctx)=>_parseAsync(_Err)(schema,value,_ctx),_safeEncode=_Err=>(schema,value,_ctx)=>{const ctx=_ctx?Object. assign(_ctx,{direction:"backward"}):{direction:"backward"};return _safeParse(_Err)(schema,value,ctx)},_safeDecode=_Err=>(schema,value,_ctx)=>_safeParse(_Err)(schema,value,_ctx),_safeEncodeAsync=_Err=>async(schema,value,_ctx)=>{const ctx=_ctx?Object.assign(_ctx,{direction:"backward"}):{direction:"backward"};return _safeParseAsync(_Err)(schema,value,ctx)},_safeDecodeAsync=_Err=>async(schema,value,_ctx)=>_safeParseAsync(_Err)(schema,value,_ctx),cuid=/^[cC][^\s-]{8,}$/,cuid2=/^[0-9a-z]+$/,ulid=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, xid=/^[0-9a-vA-V]{20}$/,ksuid=/^[A-Za-z0-9]{27}$/,nanoid=/^[a-zA-Z0-9_-]{21}$/,duration$1=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,guid=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,uuid=version2=>version2?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version2}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, email=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,_emoji$1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function emoji(){return new RegExp(_emoji$1,"u")}const ipv4=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, cidrv4=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,cidrv6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,base64url=/^[A-Za-z0-9_-]*$/,e164=/^\+(?:[0-9]){6,14}[0-9]$/,dateSource="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]\ 00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",date$1=new RegExp(`^${dateSource}$`);function timeSource(args){const hhmm="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof args.precision=="number"?args.precision===-1?`${hhmm}`:args.precision===0?`${hhmm}:[0-5]\\d`:`${hhmm}:[0-5]\\d\\.\\d{${args.precision}}`:`${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`}function time$1(args){return new RegExp(`^${timeSource(args)}$`)} function datetime$1(args){const time2=timeSource({precision:args.precision}),opts=["Z"];args.local&&opts.push(""),args.offset&&opts.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const timeRegex=`${time2}(?:${opts.join("|")})`;return new RegExp(`^${dateSource}T(?:${timeRegex})$`)}const string$3=params=>{const regex=params?`[\\s\\S]{${params?.minimum??0},${params?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${regex}$`)},integer=/^-?\d+$/,number$3=/^-?\d+(?:\.\d+)?/,boolean$2=/^(?:true|false)$/i,_null$2=/^null$/i, lowercase=/^[^A-Z]*$/,uppercase$1=/^[^a-z]*$/,$ZodCheck=$constructor("$ZodCheck",(inst,def)=>{var _a2;inst._zod??(inst._zod={}),inst._zod.def=def,(_a2=inst._zod).onattach??(_a2.onattach=[])}),numericOriginMap={number:"number",bigint:"bigint",object:"date"},$ZodCheckLessThan=$constructor("$ZodCheckLessThan",(inst,def)=>{$ZodCheck.init(inst,def);const origin2=numericOriginMap[typeof def.value];inst._zod.onattach.push(inst2=>{const bag=inst2._zod.bag,curr=(def.inclusive?bag.maximum:bag.exclusiveMaximum)?? Number.POSITIVE_INFINITY;def.value{(def.inclusive?payload.value<=def.value:payload.value{$ZodCheck.init(inst,def);const origin2=numericOriginMap[typeof def.value];inst._zod. onattach.push(inst2=>{const bag=inst2._zod.bag,curr=(def.inclusive?bag.minimum:bag.exclusiveMinimum)??Number.NEGATIVE_INFINITY;def.value>curr&&(def.inclusive?bag.minimum=def.value:bag.exclusiveMinimum=def.value)}),inst._zod.check=payload=>{(def.inclusive?payload.value>=def.value:payload.value>def.value)||payload.issues.push({origin:origin2,code:"too_small",minimum:def.value,input:payload.value,inclusive:def.inclusive,inst,continue:!def.abort})}}),$ZodCheckMultipleOf=$constructor("$ZodCheckMultip\ leOf",(inst,def)=>{$ZodCheck.init(inst,def),inst._zod.onattach.push(inst2=>{var _a2;(_a2=inst2._zod.bag).multipleOf??(_a2.multipleOf=def.value)}),inst._zod.check=payload=>{if(typeof payload.value!=typeof def.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof payload.value=="bigint"?payload.value%def.value===BigInt(0):floatSafeRemainder(payload.value,def.value)===0)||payload.issues.push({origin:typeof payload.value,code:"not_multiple_of",divisor:def.value,input:payload. value,inst,continue:!def.abort})}}),$ZodCheckNumberFormat=$constructor("$ZodCheckNumberFormat",(inst,def)=>{$ZodCheck.init(inst,def),def.format=def.format||"float64";const isInt=def.format?.includes("int"),origin2=isInt?"int":"number",[minimum,maximum]=NUMBER_FORMAT_RANGES[def.format];inst._zod.onattach.push(inst2=>{const bag=inst2._zod.bag;bag.format=def.format,bag.minimum=minimum,bag.maximum=maximum,isInt&&(bag.pattern=integer)}),inst._zod.check=payload=>{const input=payload.value;if(isInt){if(!Number. isInteger(input)){payload.issues.push({expected:origin2,format:def.format,code:"invalid_type",continue:!1,input,inst});return}if(!Number.isSafeInteger(input)){input>0?payload.issues.push({input,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst,origin:origin2,continue:!def.abort}):payload.issues.push({input,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst,origin:origin2,continue:!def. abort});return}}inputmaximum&&payload.issues.push({origin:"number",input,code:"too_big",maximum,inst})}}),$ZodCheckMaxLength=$constructor("$ZodCheckMaxLength",(inst,def)=>{var _a2;$ZodCheck.init(inst,def),(_a2=inst._zod.def).when??(_a2.when=payload=>{const val=payload.value;return!nullish(val)&&val.length!==void 0}),inst._zod.onattach.push(inst2=>{const curr=inst2._zod.bag. maximum??Number.POSITIVE_INFINITY;def.maximum{const input=payload.value;if(input.length<=def.maximum)return;const origin2=getLengthableOrigin(input);payload.issues.push({origin:origin2,code:"too_big",maximum:def.maximum,inclusive:!0,input,inst,continue:!def.abort})}}),$ZodCheckMinLength=$constructor("$ZodCheckMinLength",(inst,def)=>{var _a2;$ZodCheck.init(inst,def),(_a2=inst._zod.def).when??(_a2.when=payload=>{const val=payload. value;return!nullish(val)&&val.length!==void 0}),inst._zod.onattach.push(inst2=>{const curr=inst2._zod.bag.minimum??Number.NEGATIVE_INFINITY;def.minimum>curr&&(inst2._zod.bag.minimum=def.minimum)}),inst._zod.check=payload=>{const input=payload.value;if(input.length>=def.minimum)return;const origin2=getLengthableOrigin(input);payload.issues.push({origin:origin2,code:"too_small",minimum:def.minimum,inclusive:!0,input,inst,continue:!def.abort})}}),$ZodCheckLengthEquals=$constructor("$ZodCheckLength\ Equals",(inst,def)=>{var _a2;$ZodCheck.init(inst,def),(_a2=inst._zod.def).when??(_a2.when=payload=>{const val=payload.value;return!nullish(val)&&val.length!==void 0}),inst._zod.onattach.push(inst2=>{const bag=inst2._zod.bag;bag.minimum=def.length,bag.maximum=def.length,bag.length=def.length}),inst._zod.check=payload=>{const input=payload.value,length=input.length;if(length===def.length)return;const origin2=getLengthableOrigin(input),tooBig=length>def.length;payload.issues.push({origin:origin2,...tooBig? {code:"too_big",maximum:def.length}:{code:"too_small",minimum:def.length},inclusive:!0,exact:!0,input:payload.value,inst,continue:!def.abort})}}),$ZodCheckStringFormat=$constructor("$ZodCheckStringFormat",(inst,def)=>{var _a2,_b;$ZodCheck.init(inst,def),inst._zod.onattach.push(inst2=>{const bag=inst2._zod.bag;bag.format=def.format,def.pattern&&(bag.patterns??(bag.patterns=new Set),bag.patterns.add(def.pattern))}),def.pattern?(_a2=inst._zod).check??(_a2.check=payload=>{def.pattern.lastIndex=0,!def. pattern.test(payload.value)&&payload.issues.push({origin:"string",code:"invalid_format",format:def.format,input:payload.value,...def.pattern?{pattern:def.pattern.toString()}:{},inst,continue:!def.abort})}):(_b=inst._zod).check??(_b.check=()=>{})}),$ZodCheckRegex=$constructor("$ZodCheckRegex",(inst,def)=>{$ZodCheckStringFormat.init(inst,def),inst._zod.check=payload=>{def.pattern.lastIndex=0,!def.pattern.test(payload.value)&&payload.issues.push({origin:"string",code:"invalid_format",format:"regex", input:payload.value,pattern:def.pattern.toString(),inst,continue:!def.abort})}}),$ZodCheckLowerCase=$constructor("$ZodCheckLowerCase",(inst,def)=>{def.pattern??(def.pattern=lowercase),$ZodCheckStringFormat.init(inst,def)}),$ZodCheckUpperCase=$constructor("$ZodCheckUpperCase",(inst,def)=>{def.pattern??(def.pattern=uppercase$1),$ZodCheckStringFormat.init(inst,def)}),$ZodCheckIncludes=$constructor("$ZodCheckIncludes",(inst,def)=>{$ZodCheck.init(inst,def);const escapedRegex=escapeRegex(def.includes), pattern2=new RegExp(typeof def.position=="number"?`^.{${def.position}}${escapedRegex}`:escapedRegex);def.pattern=pattern2,inst._zod.onattach.push(inst2=>{const bag=inst2._zod.bag;bag.patterns??(bag.patterns=new Set),bag.patterns.add(pattern2)}),inst._zod.check=payload=>{payload.value.includes(def.includes,def.position)||payload.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:def.includes,input:payload.value,inst,continue:!def.abort})}}),$ZodCheckStartsWith=$constructor( "$ZodCheckStartsWith",(inst,def)=>{$ZodCheck.init(inst,def);const pattern2=new RegExp(`^${escapeRegex(def.prefix)}.*`);def.pattern??(def.pattern=pattern2),inst._zod.onattach.push(inst2=>{const bag=inst2._zod.bag;bag.patterns??(bag.patterns=new Set),bag.patterns.add(pattern2)}),inst._zod.check=payload=>{payload.value.startsWith(def.prefix)||payload.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:def.prefix,input:payload.value,inst,continue:!def.abort})}}),$ZodCheckEndsWith=$constructor( "$ZodCheckEndsWith",(inst,def)=>{$ZodCheck.init(inst,def);const pattern2=new RegExp(`.*${escapeRegex(def.suffix)}$`);def.pattern??(def.pattern=pattern2),inst._zod.onattach.push(inst2=>{const bag=inst2._zod.bag;bag.patterns??(bag.patterns=new Set),bag.patterns.add(pattern2)}),inst._zod.check=payload=>{payload.value.endsWith(def.suffix)||payload.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:def.suffix,input:payload.value,inst,continue:!def.abort})}}),$ZodCheckOverwrite=$constructor( "$ZodCheckOverwrite",(inst,def)=>{$ZodCheck.init(inst,def),inst._zod.check=payload=>{payload.value=def.tx(payload.value)}});class Doc{constructor(args=[]){this.content=[],this.indent=0,this&&(this.args=args)}indented(fn){this.indent+=1,fn(this),this.indent-=1}write(arg){if(typeof arg=="function"){arg(this,{execution:"sync"}),arg(this,{execution:"async"});return}const lines=arg.split(` `).filter(x=>x),minIndent=Math.min(...lines.map(x=>x.length-x.trimStart().length)),dedented=lines.map(x=>x.slice(minIndent)).map(x=>" ".repeat(this.indent*2)+x);for(const line of dedented)this.content.push(line)}compile(){const F=Function,args=this?.args,lines=[...(this?.content??[""]).map(x=>` ${x}`)];return new F(...args,lines.join(` `))}}const version$2={major:4,minor:2,patch:1},$ZodType=$constructor("$ZodType",(inst,def)=>{var _a2;inst??(inst={}),inst._zod.def=def,inst._zod.bag=inst._zod.bag||{},inst._zod.version=version$2;const checks2=[...inst._zod.def.checks??[]];inst._zod.traits.has("$ZodCheck")&&checks2.unshift(inst);for(const ch of checks2)for(const fn of ch._zod.onattach)fn(inst);if(checks2.length===0)(_a2=inst._zod).deferred??(_a2.deferred=[]),inst._zod.deferred?.push(()=>{inst._zod.run=inst._zod.parse});else{const runChecks=(payload,checks3,ctx)=>{ let isAborted=aborted(payload),asyncResult;for(const ch of checks3){if(ch._zod.def.when){if(!ch._zod.def.when(payload))continue}else if(isAborted)continue;const currLen=payload.issues.length,_=ch._zod.check(payload);if(_ instanceof Promise&&ctx?.async===!1)throw new $ZodAsyncError;if(asyncResult||_ instanceof Promise)asyncResult=(asyncResult??Promise.resolve()).then(async()=>{await _,payload.issues.length!==currLen&&(isAborted||(isAborted=aborted(payload,currLen)))});else{if(payload.issues.length=== currLen)continue;isAborted||(isAborted=aborted(payload,currLen))}}return asyncResult?asyncResult.then(()=>payload):payload},handleCanaryResult=(canary,payload,ctx)=>{if(aborted(canary))return canary.aborted=!0,canary;const checkResult=runChecks(payload,checks2,ctx);if(checkResult instanceof Promise){if(ctx.async===!1)throw new $ZodAsyncError;return checkResult.then(checkResult2=>inst._zod.parse(checkResult2,ctx))}return inst._zod.parse(checkResult,ctx)};inst._zod.run=(payload,ctx)=>{if(ctx.skipChecks) return inst._zod.parse(payload,ctx);if(ctx.direction==="backward"){const canary=inst._zod.parse({value:payload.value,issues:[]},{...ctx,skipChecks:!0});return canary instanceof Promise?canary.then(canary2=>handleCanaryResult(canary2,payload,ctx)):handleCanaryResult(canary,payload,ctx)}const result=inst._zod.parse(payload,ctx);if(result instanceof Promise){if(ctx.async===!1)throw new $ZodAsyncError;return result.then(result2=>runChecks(result2,checks2,ctx))}return runChecks(result,checks2,ctx)}}inst["\ ~standard"]={validate:value=>{try{const r2=safeParse$2(inst,value);return r2.success?{value:r2.data}:{issues:r2.error?.issues}}catch{return safeParseAsync$1(inst,value).then(r2=>r2.success?{value:r2.data}:{issues:r2.error?.issues})}},vendor:"zod",version:1}}),$ZodString=$constructor("$ZodString",(inst,def)=>{$ZodType.init(inst,def),inst._zod.pattern=[...inst?._zod.bag?.patterns??[]].pop()??string$3(inst._zod.bag),inst._zod.parse=(payload,_)=>{if(def.coerce)try{payload.value=String(payload.value)}catch{} return typeof payload.value=="string"||payload.issues.push({expected:"string",code:"invalid_type",input:payload.value,inst}),payload}}),$ZodStringFormat=$constructor("$ZodStringFormat",(inst,def)=>{$ZodCheckStringFormat.init(inst,def),$ZodString.init(inst,def)}),$ZodGUID=$constructor("$ZodGUID",(inst,def)=>{def.pattern??(def.pattern=guid),$ZodStringFormat.init(inst,def)}),$ZodUUID=$constructor("$ZodUUID",(inst,def)=>{if(def.version){const v={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[def.version]; if(v===void 0)throw new Error(`Invalid UUID version: "${def.version}"`);def.pattern??(def.pattern=uuid(v))}else def.pattern??(def.pattern=uuid());$ZodStringFormat.init(inst,def)}),$ZodEmail=$constructor("$ZodEmail",(inst,def)=>{def.pattern??(def.pattern=email),$ZodStringFormat.init(inst,def)}),$ZodURL=$constructor("$ZodURL",(inst,def)=>{$ZodStringFormat.init(inst,def),inst._zod.check=payload=>{try{const trimmed=payload.value.trim(),url2=new URL(trimmed);def.hostname&&(def.hostname.lastIndex=0,def. hostname.test(url2.hostname)||payload.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:def.hostname.source,input:payload.value,inst,continue:!def.abort})),def.protocol&&(def.protocol.lastIndex=0,def.protocol.test(url2.protocol.endsWith(":")?url2.protocol.slice(0,-1):url2.protocol)||payload.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:def.protocol.source,input:payload.value,inst,continue:!def.abort})),def.normalize?payload.value=url2. href:payload.value=trimmed;return}catch{payload.issues.push({code:"invalid_format",format:"url",input:payload.value,inst,continue:!def.abort})}}}),$ZodEmoji=$constructor("$ZodEmoji",(inst,def)=>{def.pattern??(def.pattern=emoji()),$ZodStringFormat.init(inst,def)}),$ZodNanoID=$constructor("$ZodNanoID",(inst,def)=>{def.pattern??(def.pattern=nanoid),$ZodStringFormat.init(inst,def)}),$ZodCUID=$constructor("$ZodCUID",(inst,def)=>{def.pattern??(def.pattern=cuid),$ZodStringFormat.init(inst,def)}),$ZodCUID2=$constructor( "$ZodCUID2",(inst,def)=>{def.pattern??(def.pattern=cuid2),$ZodStringFormat.init(inst,def)}),$ZodULID=$constructor("$ZodULID",(inst,def)=>{def.pattern??(def.pattern=ulid),$ZodStringFormat.init(inst,def)}),$ZodXID=$constructor("$ZodXID",(inst,def)=>{def.pattern??(def.pattern=xid),$ZodStringFormat.init(inst,def)}),$ZodKSUID=$constructor("$ZodKSUID",(inst,def)=>{def.pattern??(def.pattern=ksuid),$ZodStringFormat.init(inst,def)}),$ZodISODateTime=$constructor("$ZodISODateTime",(inst,def)=>{def.pattern?? (def.pattern=datetime$1(def)),$ZodStringFormat.init(inst,def)}),$ZodISODate=$constructor("$ZodISODate",(inst,def)=>{def.pattern??(def.pattern=date$1),$ZodStringFormat.init(inst,def)}),$ZodISOTime=$constructor("$ZodISOTime",(inst,def)=>{def.pattern??(def.pattern=time$1(def)),$ZodStringFormat.init(inst,def)}),$ZodISODuration=$constructor("$ZodISODuration",(inst,def)=>{def.pattern??(def.pattern=duration$1),$ZodStringFormat.init(inst,def)}),$ZodIPv4=$constructor("$ZodIPv4",(inst,def)=>{def.pattern?? (def.pattern=ipv4),$ZodStringFormat.init(inst,def),inst._zod.bag.format="ipv4"}),$ZodIPv6=$constructor("$ZodIPv6",(inst,def)=>{def.pattern??(def.pattern=ipv6),$ZodStringFormat.init(inst,def),inst._zod.bag.format="ipv6",inst._zod.check=payload=>{try{new URL(`http://[${payload.value}]`)}catch{payload.issues.push({code:"invalid_format",format:"ipv6",input:payload.value,inst,continue:!def.abort})}}}),$ZodCIDRv4=$constructor("$ZodCIDRv4",(inst,def)=>{def.pattern??(def.pattern=cidrv4),$ZodStringFormat. init(inst,def)}),$ZodCIDRv6=$constructor("$ZodCIDRv6",(inst,def)=>{def.pattern??(def.pattern=cidrv6),$ZodStringFormat.init(inst,def),inst._zod.check=payload=>{const parts=payload.value.split("/");try{if(parts.length!==2)throw new Error;const[address,prefix]=parts;if(!prefix)throw new Error;const prefixNum=Number(prefix);if(`${prefixNum}`!==prefix)throw new Error;if(prefixNum<0||prefixNum>128)throw new Error;new URL(`http://[${address}]`)}catch{payload.issues.push({code:"invalid_format",format:"c\ idrv6",input:payload.value,inst,continue:!def.abort})}}});function isValidBase64(data){if(data==="")return!0;if(data.length%4!==0)return!1;try{return atob(data),!0}catch{return!1}}const $ZodBase64=$constructor("$ZodBase64",(inst,def)=>{def.pattern??(def.pattern=base64),$ZodStringFormat.init(inst,def),inst._zod.bag.contentEncoding="base64",inst._zod.check=payload=>{isValidBase64(payload.value)||payload.issues.push({code:"invalid_format",format:"base64",input:payload.value,inst,continue:!def.abort})}}); function isValidBase64URL(data){if(!base64url.test(data))return!1;const base642=data.replace(/[-_]/g,c2=>c2==="-"?"+":"/"),padded=base642.padEnd(Math.ceil(base642.length/4)*4,"=");return isValidBase64(padded)}const $ZodBase64URL=$constructor("$ZodBase64URL",(inst,def)=>{def.pattern??(def.pattern=base64url),$ZodStringFormat.init(inst,def),inst._zod.bag.contentEncoding="base64url",inst._zod.check=payload=>{isValidBase64URL(payload.value)||payload.issues.push({code:"invalid_format",format:"base64ur\ l",input:payload.value,inst,continue:!def.abort})}}),$ZodE164=$constructor("$ZodE164",(inst,def)=>{def.pattern??(def.pattern=e164),$ZodStringFormat.init(inst,def)});function isValidJWT(token2,algorithm=null){try{const tokensParts=token2.split(".");if(tokensParts.length!==3)return!1;const[header]=tokensParts;if(!header)return!1;const parsedHeader=JSON.parse(atob(header));return!("typ"in parsedHeader&&parsedHeader?.typ!=="JWT"||!parsedHeader.alg||algorithm&&(!("alg"in parsedHeader)||parsedHeader.alg!== algorithm))}catch{return!1}}const $ZodJWT=$constructor("$ZodJWT",(inst,def)=>{$ZodStringFormat.init(inst,def),inst._zod.check=payload=>{isValidJWT(payload.value,def.alg)||payload.issues.push({code:"invalid_format",format:"jwt",input:payload.value,inst,continue:!def.abort})}}),$ZodNumber=$constructor("$ZodNumber",(inst,def)=>{$ZodType.init(inst,def),inst._zod.pattern=inst._zod.bag.pattern??number$3,inst._zod.parse=(payload,_ctx)=>{if(def.coerce)try{payload.value=Number(payload.value)}catch{}const input=payload. value;if(typeof input=="number"&&!Number.isNaN(input)&&Number.isFinite(input))return payload;const received=typeof input=="number"?Number.isNaN(input)?"NaN":Number.isFinite(input)?void 0:"Infinity":void 0;return payload.issues.push({expected:"number",code:"invalid_type",input,inst,...received?{received}:{}}),payload}}),$ZodNumberFormat=$constructor("$ZodNumberFormat",(inst,def)=>{$ZodCheckNumberFormat.init(inst,def),$ZodNumber.init(inst,def)}),$ZodBoolean=$constructor("$ZodBoolean",(inst,def)=>{ $ZodType.init(inst,def),inst._zod.pattern=boolean$2,inst._zod.parse=(payload,_ctx)=>{if(def.coerce)try{payload.value=!!payload.value}catch{}const input=payload.value;return typeof input=="boolean"||payload.issues.push({expected:"boolean",code:"invalid_type",input,inst}),payload}}),$ZodNull=$constructor("$ZodNull",(inst,def)=>{$ZodType.init(inst,def),inst._zod.pattern=_null$2,inst._zod.values=new Set([null]),inst._zod.parse=(payload,_ctx)=>{const input=payload.value;return input===null||payload.issues. push({expected:"null",code:"invalid_type",input,inst}),payload}}),$ZodAny=$constructor("$ZodAny",(inst,def)=>{$ZodType.init(inst,def),inst._zod.parse=payload=>payload}),$ZodUnknown=$constructor("$ZodUnknown",(inst,def)=>{$ZodType.init(inst,def),inst._zod.parse=payload=>payload}),$ZodNever=$constructor("$ZodNever",(inst,def)=>{$ZodType.init(inst,def),inst._zod.parse=(payload,_ctx)=>(payload.issues.push({expected:"never",code:"invalid_type",input:payload.value,inst}),payload)});function handleArrayResult(result,final,index2){ result.issues.length&&final.issues.push(...prefixIssues(index2,result.issues)),final.value[index2]=result.value}const $ZodArray=$constructor("$ZodArray",(inst,def)=>{$ZodType.init(inst,def),inst._zod.parse=(payload,ctx)=>{const input=payload.value;if(!Array.isArray(input))return payload.issues.push({expected:"array",code:"invalid_type",input,inst}),payload;payload.value=Array(input.length);const proms=[];for(let i=0;ihandleArrayResult(result2,payload,i))):handleArrayResult(result,payload,i)}return proms.length?Promise.all(proms).then(()=>payload):payload}});function handlePropertyResult(result,final,key2,input){result.issues.length&&final.issues.push(...prefixIssues(key2,result.issues)),result.value===void 0?key2 in input&&(final.value[key2]=void 0):final.value[key2]=result.value}function normalizeDef(def){const keys2=Object.keys(def.shape); for(const k of keys2)if(!def.shape?.[k]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${k}": expected a Zod schema`);const okeys=optionalKeys(def.shape);return{...def,keys:keys2,keySet:new Set(keys2),numKeys:keys2.length,optionalKeys:new Set(okeys)}}function handleCatchall(proms,input,payload,ctx,def,inst){const unrecognized=[],keySet=def.keySet,_catchall=def.catchall._zod,t=_catchall.def.type;for(const key2 in input){if(keySet.has(key2))continue;if(t==="never"){unrecognized. push(key2);continue}const r2=_catchall.run({value:input[key2],issues:[]},ctx);r2 instanceof Promise?proms.push(r2.then(r3=>handlePropertyResult(r3,payload,key2,input))):handlePropertyResult(r2,payload,key2,input)}return unrecognized.length&&payload.issues.push({code:"unrecognized_keys",keys:unrecognized,input,inst}),proms.length?Promise.all(proms).then(()=>payload):payload}const $ZodObject=$constructor("$ZodObject",(inst,def)=>{if($ZodType.init(inst,def),!Object.getOwnPropertyDescriptor(def,"sha\ pe")?.get){const sh=def.shape;Object.defineProperty(def,"shape",{get:()=>{const newSh={...sh};return Object.defineProperty(def,"shape",{value:newSh}),newSh}})}const _normalized=cached(()=>normalizeDef(def));defineLazy(inst._zod,"propValues",()=>{const shape=def.shape,propValues={};for(const key2 in shape){const field=shape[key2]._zod;if(field.values){propValues[key2]??(propValues[key2]=new Set);for(const v of field.values)propValues[key2].add(v)}}return propValues});const isObject2=isObject$1,catchall=def. catchall;let value;inst._zod.parse=(payload,ctx)=>{value??(value=_normalized.value);const input=payload.value;if(!isObject2(input))return payload.issues.push({expected:"object",code:"invalid_type",input,inst}),payload;payload.value={};const proms=[],shape=value.shape;for(const key2 of value.keys){const r2=shape[key2]._zod.run({value:input[key2],issues:[]},ctx);r2 instanceof Promise?proms.push(r2.then(r3=>handlePropertyResult(r3,payload,key2,input))):handlePropertyResult(r2,payload,key2,input)}return catchall? handleCatchall(proms,input,payload,ctx,_normalized.value,inst):proms.length?Promise.all(proms).then(()=>payload):payload}}),$ZodObjectJIT=$constructor("$ZodObjectJIT",(inst,def)=>{$ZodObject.init(inst,def);const superParse=inst._zod.parse,_normalized=cached(()=>normalizeDef(def)),generateFastpass=shape=>{const doc=new Doc(["shape","payload","ctx"]),normalized=_normalized.value,parseStr=key2=>{const k=esc(key2);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};doc.write("cons\ t input = payload.value;");const ids=Object.create(null);let counter=0;for(const key2 of normalized.keys)ids[key2]=`key_${counter++}`;doc.write("const newResult = {};");for(const key2 of normalized.keys){const id2=ids[key2],k=esc(key2);doc.write(`const ${id2} = ${parseStr(key2)};`),doc.write(` if (${id2}.issues.length) { payload.issues = payload.issues.concat(${id2}.issues.map(iss => ({ ...iss, path: iss.path ? [${k}, ...iss.path] : [${k}] }))); } if (${id2}.value === undefined) { if (${k} in input) { newResult[${k}] = undefined; } } else { newResult[${k}] = ${id2}.value; } `)}doc.write("payload.value = newResult;"),doc.write("return payload;");const fn=doc.compile();return(payload,ctx)=>fn(shape,payload,ctx)};let fastpass;const isObject2=isObject$1,jit=!globalConfig.jitless,fastEnabled=jit&&allowsEval.value,catchall=def.catchall;let value;inst._zod.parse=(payload,ctx)=>{value??(value=_normalized.value);const input=payload.value;return isObject2(input)?jit&&fastEnabled&&ctx?.async===!1&&ctx.jitless!==!0?(fastpass||(fastpass=generateFastpass(def.shape)),payload= fastpass(payload,ctx),catchall?handleCatchall([],input,payload,ctx,value,inst):payload):superParse(payload,ctx):(payload.issues.push({expected:"object",code:"invalid_type",input,inst}),payload)}});function handleUnionResults(results,final,inst,ctx){for(const result of results)if(result.issues.length===0)return final.value=result.value,final;const nonaborted=results.filter(r2=>!aborted(r2));return nonaborted.length===1?(final.value=nonaborted[0].value,nonaborted[0]):(final.issues.push({code:"inva\ lid_union",input:final.value,inst,errors:results.map(result=>result.issues.map(iss=>finalizeIssue(iss,ctx,config())))}),final)}const $ZodUnion=$constructor("$ZodUnion",(inst,def)=>{$ZodType.init(inst,def),defineLazy(inst._zod,"optin",()=>def.options.some(o=>o._zod.optin==="optional")?"optional":void 0),defineLazy(inst._zod,"optout",()=>def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),defineLazy(inst._zod,"values",()=>{if(def.options.every(o=>o._zod.values))return new Set(def.options. flatMap(option2=>Array.from(option2._zod.values)))}),defineLazy(inst._zod,"pattern",()=>{if(def.options.every(o=>o._zod.pattern)){const patterns=def.options.map(o=>o._zod.pattern);return new RegExp(`^(${patterns.map(p2=>cleanRegex(p2.source)).join("|")})$`)}});const single=def.options.length===1,first=def.options[0]._zod.run;inst._zod.parse=(payload,ctx)=>{if(single)return first(payload,ctx);let async=!1;const results=[];for(const option2 of def.options){const result=option2._zod.run({value:payload. value,issues:[]},ctx);if(result instanceof Promise)results.push(result),async=!0;else{if(result.issues.length===0)return result;results.push(result)}}return async?Promise.all(results).then(results2=>handleUnionResults(results2,payload,inst,ctx)):handleUnionResults(results,payload,inst,ctx)}}),$ZodDiscriminatedUnion=$constructor("$ZodDiscriminatedUnion",(inst,def)=>{def.inclusive=!1,$ZodUnion.init(inst,def);const _super=inst._zod.parse;defineLazy(inst._zod,"propValues",()=>{const propValues={};for(const option2 of def. options){const pv=option2._zod.propValues;if(!pv||Object.keys(pv).length===0)throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option2)}"`);for(const[k,v]of Object.entries(pv)){propValues[k]||(propValues[k]=new Set);for(const val of v)propValues[k].add(val)}}return propValues});const disc=cached(()=>{const opts=def.options,map2=new Map;for(const o of opts){const values=o._zod.propValues?.[def.discriminator];if(!values||values.size===0)throw new Error(`Invalid di\ scriminated union option at index "${def.options.indexOf(o)}"`);for(const v of values){if(map2.has(v))throw new Error(`Duplicate discriminator value "${String(v)}"`);map2.set(v,o)}}return map2});inst._zod.parse=(payload,ctx)=>{const input=payload.value;if(!isObject$1(input))return payload.issues.push({code:"invalid_type",expected:"object",input,inst}),payload;const opt=disc.value.get(input?.[def.discriminator]);return opt?opt._zod.run(payload,ctx):def.unionFallback?_super(payload,ctx):(payload.issues. push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:def.discriminator,input,path:[def.discriminator],inst}),payload)}}),$ZodIntersection=$constructor("$ZodIntersection",(inst,def)=>{$ZodType.init(inst,def),inst._zod.parse=(payload,ctx)=>{const input=payload.value,left=def.left._zod.run({value:input,issues:[]},ctx),right=def.right._zod.run({value:input,issues:[]},ctx);return left instanceof Promise||right instanceof Promise?Promise.all([left,right]).then(([left2,right2])=>handleIntersectionResults( payload,left2,right2)):handleIntersectionResults(payload,left,right)}});function mergeValues(a,b){if(a===b)return{valid:!0,data:a};if(a instanceof Date&&b instanceof Date&&+a==+b)return{valid:!0,data:a};if(isPlainObject$2(a)&&isPlainObject$2(b)){const bKeys=Object.keys(b),sharedKeys=Object.keys(a).filter(key2=>bKeys.indexOf(key2)!==-1),newObj={...a,...b};for(const key2 of sharedKeys){const sharedValue=mergeValues(a[key2],b[key2]);if(!sharedValue.valid)return{valid:!1,mergeErrorPath:[key2,...sharedValue. mergeErrorPath]};newObj[key2]=sharedValue.data}return{valid:!0,data:newObj}}if(Array.isArray(a)&&Array.isArray(b)){if(a.length!==b.length)return{valid:!1,mergeErrorPath:[]};const newArray=[];for(let index2=0;index2{$ZodType.init(inst,def),inst._zod.parse=(payload,ctx)=>{ const input=payload.value;if(!isPlainObject$2(input))return payload.issues.push({expected:"record",code:"invalid_type",input,inst}),payload;const proms=[],values=def.keyType._zod.values;if(values){payload.value={};const recordKeys=new Set;for(const key2 of values)if(typeof key2=="string"||typeof key2=="number"||typeof key2=="symbol"){recordKeys.add(typeof key2=="number"?key2.toString():key2);const result=def.valueType._zod.run({value:input[key2],issues:[]},ctx);result instanceof Promise?proms.push( result.then(result2=>{result2.issues.length&&payload.issues.push(...prefixIssues(key2,result2.issues)),payload.value[key2]=result2.value})):(result.issues.length&&payload.issues.push(...prefixIssues(key2,result.issues)),payload.value[key2]=result.value)}let unrecognized;for(const key2 in input)recordKeys.has(key2)||(unrecognized=unrecognized??[],unrecognized.push(key2));unrecognized&&unrecognized.length>0&&payload.issues.push({code:"unrecognized_keys",input,inst,keys:unrecognized})}else{payload. value={};for(const key2 of Reflect.ownKeys(input)){if(key2==="__proto__")continue;const keyResult=def.keyType._zod.run({value:key2,issues:[]},ctx);if(keyResult instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(keyResult.issues.length){def.mode==="loose"?payload.value[key2]=input[key2]:payload.issues.push({code:"invalid_key",origin:"record",issues:keyResult.issues.map(iss=>finalizeIssue(iss,ctx,config())),input:key2,path:[key2],inst});continue}const result=def. valueType._zod.run({value:input[key2],issues:[]},ctx);result instanceof Promise?proms.push(result.then(result2=>{result2.issues.length&&payload.issues.push(...prefixIssues(key2,result2.issues)),payload.value[keyResult.value]=result2.value})):(result.issues.length&&payload.issues.push(...prefixIssues(key2,result.issues)),payload.value[keyResult.value]=result.value)}}return proms.length?Promise.all(proms).then(()=>payload):payload}}),$ZodEnum=$constructor("$ZodEnum",(inst,def)=>{$ZodType.init(inst, def);const values=getEnumValues(def.entries),valuesSet=new Set(values);inst._zod.values=valuesSet,inst._zod.pattern=new RegExp(`^(${values.filter(k=>propertyKeyTypes.has(typeof k)).map(o=>typeof o=="string"?escapeRegex(o):o.toString()).join("|")})$`),inst._zod.parse=(payload,_ctx)=>{const input=payload.value;return valuesSet.has(input)||payload.issues.push({code:"invalid_value",values,input,inst}),payload}}),$ZodLiteral=$constructor("$ZodLiteral",(inst,def)=>{if($ZodType.init(inst,def),def.values. length===0)throw new Error("Cannot create literal schema with no valid values");const values=new Set(def.values);inst._zod.values=values,inst._zod.pattern=new RegExp(`^(${def.values.map(o=>typeof o=="string"?escapeRegex(o):o?escapeRegex(o.toString()):String(o)).join("|")})$`),inst._zod.parse=(payload,_ctx)=>{const input=payload.value;return values.has(input)||payload.issues.push({code:"invalid_value",values:def.values,input,inst}),payload}}),$ZodTransform=$constructor("$ZodTransform",(inst,def)=>{ $ZodType.init(inst,def),inst._zod.parse=(payload,ctx)=>{if(ctx.direction==="backward")throw new $ZodEncodeError(inst.constructor.name);const _out=def.transform(payload.value,payload);if(ctx.async)return(_out instanceof Promise?_out:Promise.resolve(_out)).then(output2=>(payload.value=output2,payload));if(_out instanceof Promise)throw new $ZodAsyncError;return payload.value=_out,payload}});function handleOptionalResult(result,input){return result.issues.length&&input===void 0?{issues:[],value:void 0}: result}const $ZodOptional=$constructor("$ZodOptional",(inst,def)=>{$ZodType.init(inst,def),inst._zod.optin="optional",inst._zod.optout="optional",defineLazy(inst._zod,"values",()=>def.innerType._zod.values?new Set([...def.innerType._zod.values,void 0]):void 0),defineLazy(inst._zod,"pattern",()=>{const pattern2=def.innerType._zod.pattern;return pattern2?new RegExp(`^(${cleanRegex(pattern2.source)})?$`):void 0}),inst._zod.parse=(payload,ctx)=>{if(def.innerType._zod.optin==="optional"){const result=def. innerType._zod.run(payload,ctx);return result instanceof Promise?result.then(r2=>handleOptionalResult(r2,payload.value)):handleOptionalResult(result,payload.value)}return payload.value===void 0?payload:def.innerType._zod.run(payload,ctx)}}),$ZodNullable=$constructor("$ZodNullable",(inst,def)=>{$ZodType.init(inst,def),defineLazy(inst._zod,"optin",()=>def.innerType._zod.optin),defineLazy(inst._zod,"optout",()=>def.innerType._zod.optout),defineLazy(inst._zod,"pattern",()=>{const pattern2=def.innerType. _zod.pattern;return pattern2?new RegExp(`^(${cleanRegex(pattern2.source)}|null)$`):void 0}),defineLazy(inst._zod,"values",()=>def.innerType._zod.values?new Set([...def.innerType._zod.values,null]):void 0),inst._zod.parse=(payload,ctx)=>payload.value===null?payload:def.innerType._zod.run(payload,ctx)}),$ZodDefault=$constructor("$ZodDefault",(inst,def)=>{$ZodType.init(inst,def),inst._zod.optin="optional",defineLazy(inst._zod,"values",()=>def.innerType._zod.values),inst._zod.parse=(payload,ctx)=>{if(ctx. direction==="backward")return def.innerType._zod.run(payload,ctx);if(payload.value===void 0)return payload.value=def.defaultValue,payload;const result=def.innerType._zod.run(payload,ctx);return result instanceof Promise?result.then(result2=>handleDefaultResult(result2,def)):handleDefaultResult(result,def)}});function handleDefaultResult(payload,def){return payload.value===void 0&&(payload.value=def.defaultValue),payload}const $ZodPrefault=$constructor("$ZodPrefault",(inst,def)=>{$ZodType.init(inst, def),inst._zod.optin="optional",defineLazy(inst._zod,"values",()=>def.innerType._zod.values),inst._zod.parse=(payload,ctx)=>(ctx.direction==="backward"||payload.value===void 0&&(payload.value=def.defaultValue),def.innerType._zod.run(payload,ctx))}),$ZodNonOptional=$constructor("$ZodNonOptional",(inst,def)=>{$ZodType.init(inst,def),defineLazy(inst._zod,"values",()=>{const v=def.innerType._zod.values;return v?new Set([...v].filter(x=>x!==void 0)):void 0}),inst._zod.parse=(payload,ctx)=>{const result=def. innerType._zod.run(payload,ctx);return result instanceof Promise?result.then(result2=>handleNonOptionalResult(result2,inst)):handleNonOptionalResult(result,inst)}});function handleNonOptionalResult(payload,inst){return!payload.issues.length&&payload.value===void 0&&payload.issues.push({code:"invalid_type",expected:"nonoptional",input:payload.value,inst}),payload}const $ZodCatch=$constructor("$ZodCatch",(inst,def)=>{$ZodType.init(inst,def),defineLazy(inst._zod,"optin",()=>def.innerType._zod.optin), defineLazy(inst._zod,"optout",()=>def.innerType._zod.optout),defineLazy(inst._zod,"values",()=>def.innerType._zod.values),inst._zod.parse=(payload,ctx)=>{if(ctx.direction==="backward")return def.innerType._zod.run(payload,ctx);const result=def.innerType._zod.run(payload,ctx);return result instanceof Promise?result.then(result2=>(payload.value=result2.value,result2.issues.length&&(payload.value=def.catchValue({...payload,error:{issues:result2.issues.map(iss=>finalizeIssue(iss,ctx,config()))},input:payload. value}),payload.issues=[]),payload)):(payload.value=result.value,result.issues.length&&(payload.value=def.catchValue({...payload,error:{issues:result.issues.map(iss=>finalizeIssue(iss,ctx,config()))},input:payload.value}),payload.issues=[]),payload)}}),$ZodPipe=$constructor("$ZodPipe",(inst,def)=>{$ZodType.init(inst,def),defineLazy(inst._zod,"values",()=>def.in._zod.values),defineLazy(inst._zod,"optin",()=>def.in._zod.optin),defineLazy(inst._zod,"optout",()=>def.out._zod.optout),defineLazy(inst. _zod,"propValues",()=>def.in._zod.propValues),inst._zod.parse=(payload,ctx)=>{if(ctx.direction==="backward"){const right=def.out._zod.run(payload,ctx);return right instanceof Promise?right.then(right2=>handlePipeResult(right2,def.in,ctx)):handlePipeResult(right,def.in,ctx)}const left=def.in._zod.run(payload,ctx);return left instanceof Promise?left.then(left2=>handlePipeResult(left2,def.out,ctx)):handlePipeResult(left,def.out,ctx)}});function handlePipeResult(left,next2,ctx){return left.issues.length? (left.aborted=!0,left):next2._zod.run({value:left.value,issues:left.issues},ctx)}const $ZodReadonly=$constructor("$ZodReadonly",(inst,def)=>{$ZodType.init(inst,def),defineLazy(inst._zod,"propValues",()=>def.innerType._zod.propValues),defineLazy(inst._zod,"values",()=>def.innerType._zod.values),defineLazy(inst._zod,"optin",()=>def.innerType?._zod?.optin),defineLazy(inst._zod,"optout",()=>def.innerType?._zod?.optout),inst._zod.parse=(payload,ctx)=>{if(ctx.direction==="backward")return def.innerType. _zod.run(payload,ctx);const result=def.innerType._zod.run(payload,ctx);return result instanceof Promise?result.then(handleReadonlyResult):handleReadonlyResult(result)}});function handleReadonlyResult(payload){return payload.value=Object.freeze(payload.value),payload}const $ZodCustom=$constructor("$ZodCustom",(inst,def)=>{$ZodCheck.init(inst,def),$ZodType.init(inst,def),inst._zod.parse=(payload,_)=>payload,inst._zod.check=payload=>{const input=payload.value,r2=def.fn(input);if(r2 instanceof Promise) return r2.then(r3=>handleRefineResult(r3,payload,input,inst));handleRefineResult(r2,payload,input,inst)}});function handleRefineResult(result,payload,input,inst){if(!result){const _iss={code:"custom",input,inst,path:[...inst._zod.def.path??[]],continue:!inst._zod.def.abort};inst._zod.def.params&&(_iss.params=inst._zod.def.params),payload.issues.push(issue(_iss))}}var _a;class $ZodRegistry{constructor(){this._map=new WeakMap,this._idmap=new Map}add(schema,..._meta){const meta=_meta[0];if(this._map. set(schema,meta),meta&&typeof meta=="object"&&"id"in meta){if(this._idmap.has(meta.id))throw new Error(`ID ${meta.id} already exists in the registry`);this._idmap.set(meta.id,schema)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(schema){const meta=this._map.get(schema);return meta&&typeof meta=="object"&&"id"in meta&&this._idmap.delete(meta.id),this._map.delete(schema),this}get(schema){const p2=schema._zod.parent;if(p2){const pm={...this.get(p2)??{}};delete pm. id;const f={...pm,...this._map.get(schema)};return Object.keys(f).length?f:void 0}return this._map.get(schema)}has(schema){return this._map.has(schema)}}function registry(){return new $ZodRegistry}(_a=globalThis).__zod_globalRegistry??(_a.__zod_globalRegistry=registry());const globalRegistry=globalThis.__zod_globalRegistry;function _string(Class,params){return new Class({type:"string",...normalizeParams(params)})}function _email(Class,params){return new Class({type:"string",format:"email",check:"\ string_format",abort:!1,...normalizeParams(params)})}function _guid(Class,params){return new Class({type:"string",format:"guid",check:"string_format",abort:!1,...normalizeParams(params)})}function _uuid(Class,params){return new Class({type:"string",format:"uuid",check:"string_format",abort:!1,...normalizeParams(params)})}function _uuidv4(Class,params){return new Class({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...normalizeParams(params)})}function _uuidv6(Class,params){ return new Class({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...normalizeParams(params)})}function _uuidv7(Class,params){return new Class({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...normalizeParams(params)})}function _url$1(Class,params){return new Class({type:"string",format:"url",check:"string_format",abort:!1,...normalizeParams(params)})}function _emoji(Class,params){return new Class({type:"string",format:"emoji",check:"string_forma\ t",abort:!1,...normalizeParams(params)})}function _nanoid(Class,params){return new Class({type:"string",format:"nanoid",check:"string_format",abort:!1,...normalizeParams(params)})}function _cuid(Class,params){return new Class({type:"string",format:"cuid",check:"string_format",abort:!1,...normalizeParams(params)})}function _cuid2(Class,params){return new Class({type:"string",format:"cuid2",check:"string_format",abort:!1,...normalizeParams(params)})}function _ulid(Class,params){return new Class({type:"\ string",format:"ulid",check:"string_format",abort:!1,...normalizeParams(params)})}function _xid(Class,params){return new Class({type:"string",format:"xid",check:"string_format",abort:!1,...normalizeParams(params)})}function _ksuid(Class,params){return new Class({type:"string",format:"ksuid",check:"string_format",abort:!1,...normalizeParams(params)})}function _ipv4(Class,params){return new Class({type:"string",format:"ipv4",check:"string_format",abort:!1,...normalizeParams(params)})}function _ipv6(Class,params){ return new Class({type:"string",format:"ipv6",check:"string_format",abort:!1,...normalizeParams(params)})}function _cidrv4(Class,params){return new Class({type:"string",format:"cidrv4",check:"string_format",abort:!1,...normalizeParams(params)})}function _cidrv6(Class,params){return new Class({type:"string",format:"cidrv6",check:"string_format",abort:!1,...normalizeParams(params)})}function _base64(Class,params){return new Class({type:"string",format:"base64",check:"string_format",abort:!1,...normalizeParams( params)})}function _base64url(Class,params){return new Class({type:"string",format:"base64url",check:"string_format",abort:!1,...normalizeParams(params)})}function _e164(Class,params){return new Class({type:"string",format:"e164",check:"string_format",abort:!1,...normalizeParams(params)})}function _jwt(Class,params){return new Class({type:"string",format:"jwt",check:"string_format",abort:!1,...normalizeParams(params)})}function _isoDateTime(Class,params){return new Class({type:"string",format:"d\ atetime",check:"string_format",offset:!1,local:!1,precision:null,...normalizeParams(params)})}function _isoDate(Class,params){return new Class({type:"string",format:"date",check:"string_format",...normalizeParams(params)})}function _isoTime(Class,params){return new Class({type:"string",format:"time",check:"string_format",precision:null,...normalizeParams(params)})}function _isoDuration(Class,params){return new Class({type:"string",format:"duration",check:"string_format",...normalizeParams(params)})} function _number(Class,params){return new Class({type:"number",checks:[],...normalizeParams(params)})}function _coercedNumber(Class,params){return new Class({type:"number",coerce:!0,checks:[],...normalizeParams(params)})}function _int(Class,params){return new Class({type:"number",check:"number_format",abort:!1,format:"safeint",...normalizeParams(params)})}function _boolean(Class,params){return new Class({type:"boolean",...normalizeParams(params)})}function _null$1(Class,params){return new Class( {type:"null",...normalizeParams(params)})}function _any(Class){return new Class({type:"any"})}function _unknown(Class){return new Class({type:"unknown"})}function _never(Class,params){return new Class({type:"never",...normalizeParams(params)})}function _lt(value,params){return new $ZodCheckLessThan({check:"less_than",...normalizeParams(params),value,inclusive:!1})}function _lte(value,params){return new $ZodCheckLessThan({check:"less_than",...normalizeParams(params),value,inclusive:!0})}function _gt(value,params){ return new $ZodCheckGreaterThan({check:"greater_than",...normalizeParams(params),value,inclusive:!1})}function _gte(value,params){return new $ZodCheckGreaterThan({check:"greater_than",...normalizeParams(params),value,inclusive:!0})}function _multipleOf(value,params){return new $ZodCheckMultipleOf({check:"multiple_of",...normalizeParams(params),value})}function _maxLength(maximum,params){return new $ZodCheckMaxLength({check:"max_length",...normalizeParams(params),maximum})}function _minLength(minimum,params){ return new $ZodCheckMinLength({check:"min_length",...normalizeParams(params),minimum})}function _length(length,params){return new $ZodCheckLengthEquals({check:"length_equals",...normalizeParams(params),length})}function _regex(pattern2,params){return new $ZodCheckRegex({check:"string_format",format:"regex",...normalizeParams(params),pattern:pattern2})}function _lowercase(params){return new $ZodCheckLowerCase({check:"string_format",format:"lowercase",...normalizeParams(params)})}function _uppercase(params){ return new $ZodCheckUpperCase({check:"string_format",format:"uppercase",...normalizeParams(params)})}function _includes(includes2,params){return new $ZodCheckIncludes({check:"string_format",format:"includes",...normalizeParams(params),includes:includes2})}function _startsWith(prefix,params){return new $ZodCheckStartsWith({check:"string_format",format:"starts_with",...normalizeParams(params),prefix})}function _endsWith(suffix,params){return new $ZodCheckEndsWith({check:"string_format",format:"end\ s_with",...normalizeParams(params),suffix})}function _overwrite(tx){return new $ZodCheckOverwrite({check:"overwrite",tx})}function _normalize(form){return _overwrite(input=>input.normalize(form))}function _trim(){return _overwrite(input=>input.trim())}function _toLowerCase(){return _overwrite(input=>input.toLowerCase())}function _toUpperCase(){return _overwrite(input=>input.toUpperCase())}function _slugify(){return _overwrite(input=>slugify(input))}function _array(Class,element2,params){return new Class( {type:"array",element:element2,...normalizeParams(params)})}function _custom(Class,fn,_params){const norm=normalizeParams(_params);return norm.abort??(norm.abort=!0),new Class({type:"custom",check:"custom",fn,...norm})}function _refine(Class,fn,_params){return new Class({type:"custom",check:"custom",fn,...normalizeParams(_params)})}function _superRefine(fn){const ch=_check(payload=>(payload.addIssue=issue$1=>{if(typeof issue$1=="string")payload.issues.push(issue(issue$1,payload.value,ch._zod.def));else{ const _issue=issue$1;_issue.fatal&&(_issue.continue=!1),_issue.code??(_issue.code="custom"),_issue.input??(_issue.input=payload.value),_issue.inst??(_issue.inst=ch),_issue.continue??(_issue.continue=!ch._zod.def.abort),payload.issues.push(issue(_issue))}},fn(payload.value,payload)));return ch}function _check(fn,params){const ch=new $ZodCheck({check:"custom",...normalizeParams(params)});return ch._zod.check=fn,ch}function initializeContext(params){let target2=params?.target??"draft-2020-12";return target2=== "draft-4"&&(target2="draft-04"),target2==="draft-7"&&(target2="draft-07"),{processors:params.processors??{},metadataRegistry:params?.metadata??globalRegistry,target:target2,unrepresentable:params?.unrepresentable??"throw",override:params?.override??(()=>{}),io:params?.io??"output",counter:0,seen:new Map,cycles:params?.cycles??"ref",reused:params?.reused??"inline",external:params?.external??void 0}}function process$1(schema,ctx,_params={path:[],schemaPath:[]}){var _a2;const def=schema._zod.def,seen2=ctx. seen.get(schema);if(seen2)return seen2.count++,_params.schemaPath.includes(schema)&&(seen2.cycle=_params.path),seen2.schema;const result={schema:{},count:1,cycle:void 0,path:_params.path};ctx.seen.set(schema,result);const overrideSchema=schema._zod.toJSONSchema?.();if(overrideSchema)result.schema=overrideSchema;else{const params={..._params,schemaPath:[..._params.schemaPath,schema],path:_params.path},parent=schema._zod.parent;if(parent)result.ref=parent,process$1(parent,ctx,params),ctx.seen.get( parent).isParent=!0;else if(schema._zod.processJSONSchema)schema._zod.processJSONSchema(ctx,result.schema,params);else{const _json=result.schema,processor=ctx.processors[def.type];if(!processor)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);processor(schema,ctx,_json,params)}}const meta=ctx.metadataRegistry.get(schema);return meta&&Object.assign(result.schema,meta),ctx.io==="input"&&isTransforming(schema)&&(delete result.schema.examples,delete result.schema.default), ctx.io==="input"&&result.schema._prefault&&((_a2=result.schema).default??(_a2.default=result.schema._prefault)),delete result.schema._prefault,ctx.seen.get(schema).schema}function extractDefs(ctx,schema){const root2=ctx.seen.get(schema);if(!root2)throw new Error("Unprocessed schema. This is a bug in Zod.");const makeURI=entry=>{const defsSegment=ctx.target==="draft-2020-12"?"$defs":"definitions";if(ctx.external){const externalId=ctx.external.registry.get(entry[0])?.id,uriGenerator=ctx.external.uri?? (id3=>id3);if(externalId)return{ref:uriGenerator(externalId)};const id2=entry[1].defId??entry[1].schema.id??`schema${ctx.counter++}`;return entry[1].defId=id2,{defId:id2,ref:`${uriGenerator("__shared")}#/${defsSegment}/${id2}`}}if(entry[1]===root2)return{ref:"#"};const defUriPrefix=`#/${defsSegment}/`,defId=entry[1].schema.id??`__schema${ctx.counter++}`;return{defId,ref:defUriPrefix+defId}},extractToDef=entry=>{if(entry[1].schema.$ref)return;const seen2=entry[1],{ref:ref2,defId}=makeURI(entry);seen2. def={...seen2.schema},defId&&(seen2.defId=defId);const schema2=seen2.schema;for(const key2 in schema2)delete schema2[key2];schema2.$ref=ref2};if(ctx.cycles==="throw")for(const entry of ctx.seen.entries()){const seen2=entry[1];if(seen2.cycle)throw new Error(`Cycle detected: #/${seen2.cycle?.join("/")}/ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const entry of ctx.seen.entries()){const seen2=entry[1];if(schema===entry[0]){extractToDef(entry);continue}if(ctx.external){const ext=ctx.external.registry.get(entry[0])?.id;if(schema!==entry[0]&&ext){extractToDef(entry);continue}}if(ctx.metadataRegistry.get(entry[0])?.id){extractToDef(entry);continue}if(seen2.cycle){extractToDef(entry);continue}if(seen2.count>1&&ctx.reused==="ref"){extractToDef(entry);continue}}} function finalize(ctx,schema){const root2=ctx.seen.get(schema);if(!root2)throw new Error("Unprocessed schema. This is a bug in Zod.");const flattenRef=zodSchema=>{const seen2=ctx.seen.get(zodSchema),schema2=seen2.def??seen2.schema,_cached={...schema2};if(seen2.ref===null)return;const ref2=seen2.ref;if(seen2.ref=null,ref2){flattenRef(ref2);const refSchema=ctx.seen.get(ref2).schema;refSchema.$ref&&(ctx.target==="draft-07"||ctx.target==="draft-04"||ctx.target==="openapi-3.0")?(schema2.allOf=schema2. allOf??[],schema2.allOf.push(refSchema)):(Object.assign(schema2,refSchema),Object.assign(schema2,_cached))}seen2.isParent||ctx.override({zodSchema,jsonSchema:schema2,path:seen2.path??[]})};for(const entry of[...ctx.seen.entries()].reverse())flattenRef(entry[0]);const result={};if(ctx.target==="draft-2020-12"?result.$schema="https://json-schema.org/draft/2020-12/schema":ctx.target==="draft-07"?result.$schema="http://json-schema.org/draft-07/schema#":ctx.target==="draft-04"?result.$schema="http://\ json-schema.org/draft-04/schema#":ctx.target,ctx.external?.uri){const id2=ctx.external.registry.get(schema)?.id;if(!id2)throw new Error("Schema is missing an `id` property");result.$id=ctx.external.uri(id2)}Object.assign(result,root2.def??root2.schema);const defs=ctx.external?.defs??{};for(const entry of ctx.seen.entries()){const seen2=entry[1];seen2.def&&seen2.defId&&(defs[seen2.defId]=seen2.def)}ctx.external||Object.keys(defs).length>0&&(ctx.target==="draft-2020-12"?result.$defs=defs:result.definitions= defs);try{const finalized=JSON.parse(JSON.stringify(result));return Object.defineProperty(finalized,"~standard",{value:{...schema["~standard"],jsonSchema:{input:createStandardJSONSchemaMethod(schema,"input"),output:createStandardJSONSchemaMethod(schema,"output")}},enumerable:!1,writable:!1}),finalized}catch{throw new Error("Error converting schema to JSON.")}}function isTransforming(_schema,_ctx){const ctx=_ctx??{seen:new Set};if(ctx.seen.has(_schema))return!1;ctx.seen.add(_schema);const def=_schema. _zod.def;if(def.type==="transform")return!0;if(def.type==="array")return isTransforming(def.element,ctx);if(def.type==="set")return isTransforming(def.valueType,ctx);if(def.type==="lazy")return isTransforming(def.getter(),ctx);if(def.type==="promise"||def.type==="optional"||def.type==="nonoptional"||def.type==="nullable"||def.type==="readonly"||def.type==="default"||def.type==="prefault")return isTransforming(def.innerType,ctx);if(def.type==="intersection")return isTransforming(def.left,ctx)||isTransforming( def.right,ctx);if(def.type==="record"||def.type==="map")return isTransforming(def.keyType,ctx)||isTransforming(def.valueType,ctx);if(def.type==="pipe")return isTransforming(def.in,ctx)||isTransforming(def.out,ctx);if(def.type==="object"){for(const key2 in def.shape)if(isTransforming(def.shape[key2],ctx))return!0;return!1}if(def.type==="union"){for(const option2 of def.options)if(isTransforming(option2,ctx))return!0;return!1}if(def.type==="tuple"){for(const item of def.items)if(isTransforming(item, ctx))return!0;return!!(def.rest&&isTransforming(def.rest,ctx))}return!1}const createToJSONSchemaMethod=(schema,processors={})=>params=>{const ctx=initializeContext({...params,processors});return process$1(schema,ctx),extractDefs(ctx,schema),finalize(ctx,schema)},createStandardJSONSchemaMethod=(schema,io)=>params=>{const{libraryOptions,target:target2}=params??{},ctx=initializeContext({...libraryOptions??{},target:target2,io,processors:{}});return process$1(schema,ctx),extractDefs(ctx,schema),finalize( ctx,schema)},formatMap={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},stringProcessor=(schema,ctx,_json,_params)=>{const json2=_json;json2.type="string";const{minimum,maximum,format:format2,patterns,contentEncoding}=schema._zod.bag;if(typeof minimum=="number"&&(json2.minLength=minimum),typeof maximum=="number"&&(json2.maxLength=maximum),format2&&(json2.format=formatMap[format2]??format2,json2.format===""&&delete json2.format),contentEncoding&&(json2.contentEncoding= contentEncoding),patterns&&patterns.size>0){const regexes=[...patterns];regexes.length===1?json2.pattern=regexes[0].source:regexes.length>1&&(json2.allOf=[...regexes.map(regex=>({...ctx.target==="draft-07"||ctx.target==="draft-04"||ctx.target==="openapi-3.0"?{type:"string"}:{},pattern:regex.source}))])}},numberProcessor=(schema,ctx,_json,_params)=>{const json2=_json,{minimum,maximum,format:format2,multipleOf:multipleOf2,exclusiveMaximum,exclusiveMinimum}=schema._zod.bag;typeof format2=="string"&& format2.includes("int")?json2.type="integer":json2.type="number",typeof exclusiveMinimum=="number"&&(ctx.target==="draft-04"||ctx.target==="openapi-3.0"?(json2.minimum=exclusiveMinimum,json2.exclusiveMinimum=!0):json2.exclusiveMinimum=exclusiveMinimum),typeof minimum=="number"&&(json2.minimum=minimum,typeof exclusiveMinimum=="number"&&ctx.target!=="draft-04"&&(exclusiveMinimum>=minimum?delete json2.minimum:delete json2.exclusiveMinimum)),typeof exclusiveMaximum=="number"&&(ctx.target==="draft-04"|| ctx.target==="openapi-3.0"?(json2.maximum=exclusiveMaximum,json2.exclusiveMaximum=!0):json2.exclusiveMaximum=exclusiveMaximum),typeof maximum=="number"&&(json2.maximum=maximum,typeof exclusiveMaximum=="number"&&ctx.target!=="draft-04"&&(exclusiveMaximum<=maximum?delete json2.maximum:delete json2.exclusiveMaximum)),typeof multipleOf2=="number"&&(json2.multipleOf=multipleOf2)},booleanProcessor=(_schema,_ctx,json2,_params)=>{json2.type="boolean"},nullProcessor=(_schema,ctx,json2,_params)=>{ctx.target=== "openapi-3.0"?(json2.type="string",json2.nullable=!0,json2.enum=[null]):json2.type="null"},neverProcessor=(_schema,_ctx,json2,_params)=>{json2.not={}},anyProcessor=(_schema,_ctx,_json,_params)=>{},unknownProcessor=(_schema,_ctx,_json,_params)=>{},enumProcessor=(schema,_ctx,json2,_params)=>{const def=schema._zod.def,values=getEnumValues(def.entries);values.every(v=>typeof v=="number")&&(json2.type="number"),values.every(v=>typeof v=="string")&&(json2.type="string"),json2.enum=values},literalProcessor=(schema,ctx,json2,_params)=>{ const def=schema._zod.def,vals=[];for(const val of def.values)if(val===void 0){if(ctx.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof val=="bigint"){if(ctx.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");vals.push(Number(val))}else vals.push(val);if(vals.length!==0)if(vals.length===1){const val=vals[0];json2.type=val===null?"null":typeof val,ctx.target==="draft-04"||ctx.target=== "openapi-3.0"?json2.enum=[val]:json2.const=val}else vals.every(v=>typeof v=="number")&&(json2.type="number"),vals.every(v=>typeof v=="string")&&(json2.type="string"),vals.every(v=>typeof v=="boolean")&&(json2.type="boolean"),vals.every(v=>v===null)&&(json2.type="null"),json2.enum=vals},customProcessor=(_schema,ctx,_json,_params)=>{if(ctx.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},transformProcessor=(_schema,ctx,_json,_params)=>{if(ctx.unrepresentable=== "throw")throw new Error("Transforms cannot be represented in JSON Schema")},arrayProcessor=(schema,ctx,_json,params)=>{const json2=_json,def=schema._zod.def,{minimum,maximum}=schema._zod.bag;typeof minimum=="number"&&(json2.minItems=minimum),typeof maximum=="number"&&(json2.maxItems=maximum),json2.type="array",json2.items=process$1(def.element,ctx,{...params,path:[...params.path,"items"]})},objectProcessor=(schema,ctx,_json,params)=>{const json2=_json,def=schema._zod.def;json2.type="object",json2. properties={};const shape=def.shape;for(const key2 in shape)json2.properties[key2]=process$1(shape[key2],ctx,{...params,path:[...params.path,"properties",key2]});const allKeys=new Set(Object.keys(shape)),requiredKeys=new Set([...allKeys].filter(key2=>{const v=def.shape[key2]._zod;return ctx.io==="input"?v.optin===void 0:v.optout===void 0}));requiredKeys.size>0&&(json2.required=Array.from(requiredKeys)),def.catchall?._zod.def.type==="never"?json2.additionalProperties=!1:def.catchall?def.catchall&& (json2.additionalProperties=process$1(def.catchall,ctx,{...params,path:[...params.path,"additionalProperties"]})):ctx.io==="output"&&(json2.additionalProperties=!1)},unionProcessor=(schema,ctx,json2,params)=>{const def=schema._zod.def,isExclusive=def.inclusive===!1,options=def.options.map((x,i)=>process$1(x,ctx,{...params,path:[...params.path,isExclusive?"oneOf":"anyOf",i]}));isExclusive?json2.oneOf=options:json2.anyOf=options},intersectionProcessor=(schema,ctx,json2,params)=>{const def=schema._zod. def,a=process$1(def.left,ctx,{...params,path:[...params.path,"allOf",0]}),b=process$1(def.right,ctx,{...params,path:[...params.path,"allOf",1]}),isSimpleIntersection=val=>"allOf"in val&&Object.keys(val).length===1,allOf2=[...isSimpleIntersection(a)?a.allOf:[a],...isSimpleIntersection(b)?b.allOf:[b]];json2.allOf=allOf2},recordProcessor=(schema,ctx,_json,params)=>{const json2=_json,def=schema._zod.def;json2.type="object",(ctx.target==="draft-07"||ctx.target==="draft-2020-12")&&(json2.propertyNames= process$1(def.keyType,ctx,{...params,path:[...params.path,"propertyNames"]})),json2.additionalProperties=process$1(def.valueType,ctx,{...params,path:[...params.path,"additionalProperties"]})},nullableProcessor=(schema,ctx,json2,params)=>{const def=schema._zod.def,inner2=process$1(def.innerType,ctx,params),seen2=ctx.seen.get(schema);ctx.target==="openapi-3.0"?(seen2.ref=def.innerType,json2.nullable=!0):json2.anyOf=[inner2,{type:"null"}]},nonoptionalProcessor=(schema,ctx,_json,params)=>{const def=schema. _zod.def;process$1(def.innerType,ctx,params);const seen2=ctx.seen.get(schema);seen2.ref=def.innerType},defaultProcessor=(schema,ctx,json2,params)=>{const def=schema._zod.def;process$1(def.innerType,ctx,params);const seen2=ctx.seen.get(schema);seen2.ref=def.innerType,json2.default=JSON.parse(JSON.stringify(def.defaultValue))},prefaultProcessor=(schema,ctx,json2,params)=>{const def=schema._zod.def;process$1(def.innerType,ctx,params);const seen2=ctx.seen.get(schema);seen2.ref=def.innerType,ctx.io=== "input"&&(json2._prefault=JSON.parse(JSON.stringify(def.defaultValue)))},catchProcessor=(schema,ctx,json2,params)=>{const def=schema._zod.def;process$1(def.innerType,ctx,params);const seen2=ctx.seen.get(schema);seen2.ref=def.innerType;let catchValue;try{catchValue=def.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}json2.default=catchValue},pipeProcessor=(schema,ctx,_json,params)=>{const def=schema._zod.def,innerType=ctx.io==="input"?def.in._zod. def.type==="transform"?def.out:def.in:def.out;process$1(innerType,ctx,params);const seen2=ctx.seen.get(schema);seen2.ref=innerType},readonlyProcessor=(schema,ctx,json2,params)=>{const def=schema._zod.def;process$1(def.innerType,ctx,params);const seen2=ctx.seen.get(schema);seen2.ref=def.innerType,json2.readOnly=!0},optionalProcessor=(schema,ctx,_json,params)=>{const def=schema._zod.def;process$1(def.innerType,ctx,params);const seen2=ctx.seen.get(schema);seen2.ref=def.innerType};function isZ4Schema(s2){ return!!s2._zod}function safeParse$1(schema,data){return isZ4Schema(schema)?safeParse$2(schema,data):schema.safeParse(data)}function getObjectShape(schema){if(!schema)return;let rawShape;if(isZ4Schema(schema)?rawShape=schema._zod?.def?.shape:rawShape=schema.shape,!!rawShape){if(typeof rawShape=="function")try{return rawShape()}catch{return}return rawShape}}function getLiteralValue(schema){if(isZ4Schema(schema)){const def2=schema._zod?.def;if(def2){if(def2.value!==void 0)return def2.value;if(Array. isArray(def2.values)&&def2.values.length>0)return def2.values[0]}}const def=schema._def;if(def){if(def.value!==void 0)return def.value;if(Array.isArray(def.values)&&def.values.length>0)return def.values[0]}const directValue=schema.value;if(directValue!==void 0)return directValue}const ZodISODateTime=$constructor("ZodISODateTime",(inst,def)=>{$ZodISODateTime.init(inst,def),ZodStringFormat.init(inst,def)});function datetime(params){return _isoDateTime(ZodISODateTime,params)}const ZodISODate=$constructor( "ZodISODate",(inst,def)=>{$ZodISODate.init(inst,def),ZodStringFormat.init(inst,def)});function date(params){return _isoDate(ZodISODate,params)}const ZodISOTime=$constructor("ZodISOTime",(inst,def)=>{$ZodISOTime.init(inst,def),ZodStringFormat.init(inst,def)});function time(params){return _isoTime(ZodISOTime,params)}const ZodISODuration=$constructor("ZodISODuration",(inst,def)=>{$ZodISODuration.init(inst,def),ZodStringFormat.init(inst,def)});function duration(params){return _isoDuration(ZodISODuration, params)}const initializer=(inst,issues)=>{$ZodError.init(inst,issues),inst.name="ZodError",Object.defineProperties(inst,{format:{value:mapper=>formatError(inst,mapper)},flatten:{value:mapper=>flattenError$1(inst,mapper)},addIssue:{value:issue2=>{inst.issues.push(issue2),inst.message=JSON.stringify(inst.issues,jsonStringifyReplacer,2)}},addIssues:{value:issues2=>{inst.issues.push(...issues2),inst.message=JSON.stringify(inst.issues,jsonStringifyReplacer,2)}},isEmpty:{get(){return inst.issues.length=== 0}}})},ZodRealError=$constructor("ZodError",initializer,{Parent:Error}),parse$3=_parse(ZodRealError),parseAsync=_parseAsync(ZodRealError),safeParse=_safeParse(ZodRealError),safeParseAsync=_safeParseAsync(ZodRealError),encode=_encode(ZodRealError),decode$1=_decode(ZodRealError),encodeAsync=_encodeAsync(ZodRealError),decodeAsync=_decodeAsync(ZodRealError),safeEncode=_safeEncode(ZodRealError),safeDecode=_safeDecode(ZodRealError),safeEncodeAsync=_safeEncodeAsync(ZodRealError),safeDecodeAsync=_safeDecodeAsync( ZodRealError),ZodType=$constructor("ZodType",(inst,def)=>($ZodType.init(inst,def),Object.assign(inst["~standard"],{jsonSchema:{input:createStandardJSONSchemaMethod(inst,"input"),output:createStandardJSONSchemaMethod(inst,"output")}}),inst.toJSONSchema=createToJSONSchemaMethod(inst,{}),inst.def=def,inst.type=def.type,Object.defineProperty(inst,"_def",{value:def}),inst.check=(...checks2)=>inst.clone(mergeDefs(def,{checks:[...def.checks??[],...checks2.map(ch=>typeof ch=="function"?{_zod:{check:ch,def:{ check:"custom"},onattach:[]}}:ch)]})),inst.clone=(def2,params)=>clone(inst,def2,params),inst.brand=()=>inst,inst.register=(reg,meta)=>(reg.add(inst,meta),inst),inst.parse=(data,params)=>parse$3(inst,data,params,{callee:inst.parse}),inst.safeParse=(data,params)=>safeParse(inst,data,params),inst.parseAsync=async(data,params)=>parseAsync(inst,data,params,{callee:inst.parseAsync}),inst.safeParseAsync=async(data,params)=>safeParseAsync(inst,data,params),inst.spa=inst.safeParseAsync,inst.encode=(data,params)=>encode( inst,data,params),inst.decode=(data,params)=>decode$1(inst,data,params),inst.encodeAsync=async(data,params)=>encodeAsync(inst,data,params),inst.decodeAsync=async(data,params)=>decodeAsync(inst,data,params),inst.safeEncode=(data,params)=>safeEncode(inst,data,params),inst.safeDecode=(data,params)=>safeDecode(inst,data,params),inst.safeEncodeAsync=async(data,params)=>safeEncodeAsync(inst,data,params),inst.safeDecodeAsync=async(data,params)=>safeDecodeAsync(inst,data,params),inst.refine=(check,params)=>inst. check(refine(check,params)),inst.superRefine=refinement=>inst.check(superRefine(refinement)),inst.overwrite=fn=>inst.check(_overwrite(fn)),inst.optional=()=>optional(inst),inst.nullable=()=>nullable(inst),inst.nullish=()=>optional(nullable(inst)),inst.nonoptional=params=>nonoptional(inst,params),inst.array=()=>array(inst),inst.or=arg=>union([inst,arg]),inst.and=arg=>intersection(inst,arg),inst.transform=tx=>pipe(inst,transform$1(tx)),inst.default=def2=>_default(inst,def2),inst.prefault=def2=>prefault( inst,def2),inst.catch=params=>_catch(inst,params),inst.pipe=target2=>pipe(inst,target2),inst.readonly=()=>readonly(inst),inst.describe=description2=>{const cl=inst.clone();return globalRegistry.add(cl,{description:description2}),cl},Object.defineProperty(inst,"description",{get(){return globalRegistry.get(inst)?.description},configurable:!0}),inst.meta=(...args)=>{if(args.length===0)return globalRegistry.get(inst);const cl=inst.clone();return globalRegistry.add(cl,args[0]),cl},inst.isOptional=()=>inst. safeParse(void 0).success,inst.isNullable=()=>inst.safeParse(null).success,inst)),_ZodString=$constructor("_ZodString",(inst,def)=>{$ZodString.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>stringProcessor(inst,ctx,json2);const bag=inst._zod.bag;inst.format=bag.format??null,inst.minLength=bag.minimum??null,inst.maxLength=bag.maximum??null,inst.regex=(...args)=>inst.check(_regex(...args)),inst.includes=(...args)=>inst.check(_includes(...args)),inst.startsWith= (...args)=>inst.check(_startsWith(...args)),inst.endsWith=(...args)=>inst.check(_endsWith(...args)),inst.min=(...args)=>inst.check(_minLength(...args)),inst.max=(...args)=>inst.check(_maxLength(...args)),inst.length=(...args)=>inst.check(_length(...args)),inst.nonempty=(...args)=>inst.check(_minLength(1,...args)),inst.lowercase=params=>inst.check(_lowercase(params)),inst.uppercase=params=>inst.check(_uppercase(params)),inst.trim=()=>inst.check(_trim()),inst.normalize=(...args)=>inst.check(_normalize( ...args)),inst.toLowerCase=()=>inst.check(_toLowerCase()),inst.toUpperCase=()=>inst.check(_toUpperCase()),inst.slugify=()=>inst.check(_slugify())}),ZodString=$constructor("ZodString",(inst,def)=>{$ZodString.init(inst,def),_ZodString.init(inst,def),inst.email=params=>inst.check(_email(ZodEmail,params)),inst.url=params=>inst.check(_url$1(ZodURL,params)),inst.jwt=params=>inst.check(_jwt(ZodJWT,params)),inst.emoji=params=>inst.check(_emoji(ZodEmoji,params)),inst.guid=params=>inst.check(_guid(ZodGUID, params)),inst.uuid=params=>inst.check(_uuid(ZodUUID,params)),inst.uuidv4=params=>inst.check(_uuidv4(ZodUUID,params)),inst.uuidv6=params=>inst.check(_uuidv6(ZodUUID,params)),inst.uuidv7=params=>inst.check(_uuidv7(ZodUUID,params)),inst.nanoid=params=>inst.check(_nanoid(ZodNanoID,params)),inst.guid=params=>inst.check(_guid(ZodGUID,params)),inst.cuid=params=>inst.check(_cuid(ZodCUID,params)),inst.cuid2=params=>inst.check(_cuid2(ZodCUID2,params)),inst.ulid=params=>inst.check(_ulid(ZodULID,params)),inst. base64=params=>inst.check(_base64(ZodBase64,params)),inst.base64url=params=>inst.check(_base64url(ZodBase64URL,params)),inst.xid=params=>inst.check(_xid(ZodXID,params)),inst.ksuid=params=>inst.check(_ksuid(ZodKSUID,params)),inst.ipv4=params=>inst.check(_ipv4(ZodIPv4,params)),inst.ipv6=params=>inst.check(_ipv6(ZodIPv6,params)),inst.cidrv4=params=>inst.check(_cidrv4(ZodCIDRv4,params)),inst.cidrv6=params=>inst.check(_cidrv6(ZodCIDRv6,params)),inst.e164=params=>inst.check(_e164(ZodE164,params)),inst. datetime=params=>inst.check(datetime(params)),inst.date=params=>inst.check(date(params)),inst.time=params=>inst.check(time(params)),inst.duration=params=>inst.check(duration(params))});function string$2(params){return _string(ZodString,params)}const ZodStringFormat=$constructor("ZodStringFormat",(inst,def)=>{$ZodStringFormat.init(inst,def),_ZodString.init(inst,def)}),ZodEmail=$constructor("ZodEmail",(inst,def)=>{$ZodEmail.init(inst,def),ZodStringFormat.init(inst,def)}),ZodGUID=$constructor("ZodG\ UID",(inst,def)=>{$ZodGUID.init(inst,def),ZodStringFormat.init(inst,def)}),ZodUUID=$constructor("ZodUUID",(inst,def)=>{$ZodUUID.init(inst,def),ZodStringFormat.init(inst,def)}),ZodURL=$constructor("ZodURL",(inst,def)=>{$ZodURL.init(inst,def),ZodStringFormat.init(inst,def)});function url(params){return _url$1(ZodURL,params)}const ZodEmoji=$constructor("ZodEmoji",(inst,def)=>{$ZodEmoji.init(inst,def),ZodStringFormat.init(inst,def)}),ZodNanoID=$constructor("ZodNanoID",(inst,def)=>{$ZodNanoID.init(inst, def),ZodStringFormat.init(inst,def)}),ZodCUID=$constructor("ZodCUID",(inst,def)=>{$ZodCUID.init(inst,def),ZodStringFormat.init(inst,def)}),ZodCUID2=$constructor("ZodCUID2",(inst,def)=>{$ZodCUID2.init(inst,def),ZodStringFormat.init(inst,def)}),ZodULID=$constructor("ZodULID",(inst,def)=>{$ZodULID.init(inst,def),ZodStringFormat.init(inst,def)}),ZodXID=$constructor("ZodXID",(inst,def)=>{$ZodXID.init(inst,def),ZodStringFormat.init(inst,def)}),ZodKSUID=$constructor("ZodKSUID",(inst,def)=>{$ZodKSUID.init( inst,def),ZodStringFormat.init(inst,def)}),ZodIPv4=$constructor("ZodIPv4",(inst,def)=>{$ZodIPv4.init(inst,def),ZodStringFormat.init(inst,def)}),ZodIPv6=$constructor("ZodIPv6",(inst,def)=>{$ZodIPv6.init(inst,def),ZodStringFormat.init(inst,def)}),ZodCIDRv4=$constructor("ZodCIDRv4",(inst,def)=>{$ZodCIDRv4.init(inst,def),ZodStringFormat.init(inst,def)}),ZodCIDRv6=$constructor("ZodCIDRv6",(inst,def)=>{$ZodCIDRv6.init(inst,def),ZodStringFormat.init(inst,def)}),ZodBase64=$constructor("ZodBase64",(inst,def)=>{ $ZodBase64.init(inst,def),ZodStringFormat.init(inst,def)}),ZodBase64URL=$constructor("ZodBase64URL",(inst,def)=>{$ZodBase64URL.init(inst,def),ZodStringFormat.init(inst,def)}),ZodE164=$constructor("ZodE164",(inst,def)=>{$ZodE164.init(inst,def),ZodStringFormat.init(inst,def)}),ZodJWT=$constructor("ZodJWT",(inst,def)=>{$ZodJWT.init(inst,def),ZodStringFormat.init(inst,def)}),ZodNumber=$constructor("ZodNumber",(inst,def)=>{$ZodNumber.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>numberProcessor( inst,ctx,json2),inst.gt=(value,params)=>inst.check(_gt(value,params)),inst.gte=(value,params)=>inst.check(_gte(value,params)),inst.min=(value,params)=>inst.check(_gte(value,params)),inst.lt=(value,params)=>inst.check(_lt(value,params)),inst.lte=(value,params)=>inst.check(_lte(value,params)),inst.max=(value,params)=>inst.check(_lte(value,params)),inst.int=params=>inst.check(int(params)),inst.safe=params=>inst.check(int(params)),inst.positive=params=>inst.check(_gt(0,params)),inst.nonnegative=params=>inst. check(_gte(0,params)),inst.negative=params=>inst.check(_lt(0,params)),inst.nonpositive=params=>inst.check(_lte(0,params)),inst.multipleOf=(value,params)=>inst.check(_multipleOf(value,params)),inst.step=(value,params)=>inst.check(_multipleOf(value,params)),inst.finite=()=>inst;const bag=inst._zod.bag;inst.minValue=Math.max(bag.minimum??Number.NEGATIVE_INFINITY,bag.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,inst.maxValue=Math.min(bag.maximum??Number.POSITIVE_INFINITY,bag.exclusiveMaximum??Number. POSITIVE_INFINITY)??null,inst.isInt=(bag.format??"").includes("int")||Number.isSafeInteger(bag.multipleOf??.5),inst.isFinite=!0,inst.format=bag.format??null});function number$2(params){return _number(ZodNumber,params)}const ZodNumberFormat=$constructor("ZodNumberFormat",(inst,def)=>{$ZodNumberFormat.init(inst,def),ZodNumber.init(inst,def)});function int(params){return _int(ZodNumberFormat,params)}const ZodBoolean=$constructor("ZodBoolean",(inst,def)=>{$ZodBoolean.init(inst,def),ZodType.init(inst, def),inst._zod.processJSONSchema=(ctx,json2,params)=>booleanProcessor(inst,ctx,json2)});function boolean$1(params){return _boolean(ZodBoolean,params)}const ZodNull=$constructor("ZodNull",(inst,def)=>{$ZodNull.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>nullProcessor(inst,ctx,json2)});function _null(params){return _null$1(ZodNull,params)}const ZodAny=$constructor("ZodAny",(inst,def)=>{$ZodAny.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema= (ctx,json2,params)=>anyProcessor()});function any(){return _any(ZodAny)}const ZodUnknown=$constructor("ZodUnknown",(inst,def)=>{$ZodUnknown.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>unknownProcessor()});function unknown$2(){return _unknown(ZodUnknown)}const ZodNever=$constructor("ZodNever",(inst,def)=>{$ZodNever.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>neverProcessor(inst,ctx,json2)});function never(params){ return _never(ZodNever,params)}const ZodArray=$constructor("ZodArray",(inst,def)=>{$ZodArray.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>arrayProcessor(inst,ctx,json2,params),inst.element=def.element,inst.min=(minLength,params)=>inst.check(_minLength(minLength,params)),inst.nonempty=params=>inst.check(_minLength(1,params)),inst.max=(maxLength,params)=>inst.check(_maxLength(maxLength,params)),inst.length=(len,params)=>inst.check(_length(len,params)),inst. unwrap=()=>inst.element});function array(element2,params){return _array(ZodArray,element2,params)}const ZodObject=$constructor("ZodObject",(inst,def)=>{$ZodObjectJIT.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>objectProcessor(inst,ctx,json2,params),defineLazy(inst,"shape",()=>def.shape),inst.keyof=()=>_enum$2(Object.keys(inst._zod.def.shape)),inst.catchall=catchall=>inst.clone({...inst._zod.def,catchall}),inst.passthrough=()=>inst.clone({...inst._zod.def, catchall:unknown$2()}),inst.loose=()=>inst.clone({...inst._zod.def,catchall:unknown$2()}),inst.strict=()=>inst.clone({...inst._zod.def,catchall:never()}),inst.strip=()=>inst.clone({...inst._zod.def,catchall:void 0}),inst.extend=incoming=>extend$2(inst,incoming),inst.safeExtend=incoming=>safeExtend(inst,incoming),inst.merge=other=>merge$1(inst,other),inst.pick=mask=>pick(inst,mask),inst.omit=mask=>omit(inst,mask),inst.partial=(...args)=>partial(ZodOptional,inst,args[0]),inst.required=(...args)=>required$4( ZodNonOptional,inst,args[0])});function object(shape,params){const def={type:"object",shape:shape??{},...normalizeParams(params)};return new ZodObject(def)}function looseObject(shape,params){return new ZodObject({type:"object",shape,catchall:unknown$2(),...normalizeParams(params)})}const ZodUnion=$constructor("ZodUnion",(inst,def)=>{$ZodUnion.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>unionProcessor(inst,ctx,json2,params),inst.options=def.options});function union(options,params){ return new ZodUnion({type:"union",options,...normalizeParams(params)})}const ZodDiscriminatedUnion=$constructor("ZodDiscriminatedUnion",(inst,def)=>{ZodUnion.init(inst,def),$ZodDiscriminatedUnion.init(inst,def)});function discriminatedUnion(discriminator2,options,params){return new ZodDiscriminatedUnion({type:"union",options,discriminator:discriminator2,...normalizeParams(params)})}const ZodIntersection=$constructor("ZodIntersection",(inst,def)=>{$ZodIntersection.init(inst,def),ZodType.init(inst, def),inst._zod.processJSONSchema=(ctx,json2,params)=>intersectionProcessor(inst,ctx,json2,params)});function intersection(left,right){return new ZodIntersection({type:"intersection",left,right})}const ZodRecord=$constructor("ZodRecord",(inst,def)=>{$ZodRecord.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>recordProcessor(inst,ctx,json2,params),inst.keyType=def.keyType,inst.valueType=def.valueType});function record(keyType,valueType,params){return new ZodRecord( {type:"record",keyType,valueType,...normalizeParams(params)})}const ZodEnum=$constructor("ZodEnum",(inst,def)=>{$ZodEnum.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>enumProcessor(inst,ctx,json2),inst.enum=def.entries,inst.options=Object.values(def.entries);const keys2=new Set(Object.keys(def.entries));inst.extract=(values,params)=>{const newEntries={};for(const value of values)if(keys2.has(value))newEntries[value]=def.entries[value];else throw new Error( `Key ${value} not found in enum`);return new ZodEnum({...def,checks:[],...normalizeParams(params),entries:newEntries})},inst.exclude=(values,params)=>{const newEntries={...def.entries};for(const value of values)if(keys2.has(value))delete newEntries[value];else throw new Error(`Key ${value} not found in enum`);return new ZodEnum({...def,checks:[],...normalizeParams(params),entries:newEntries})}});function _enum$2(values,params){const entries=Array.isArray(values)?Object.fromEntries(values.map(v=>[ v,v])):values;return new ZodEnum({type:"enum",entries,...normalizeParams(params)})}const ZodLiteral=$constructor("ZodLiteral",(inst,def)=>{$ZodLiteral.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>literalProcessor(inst,ctx,json2),inst.values=new Set(def.values),Object.defineProperty(inst,"value",{get(){if(def.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return def.values[0]}})});function literal(value,params){ return new ZodLiteral({type:"literal",values:Array.isArray(value)?value:[value],...normalizeParams(params)})}const ZodTransform=$constructor("ZodTransform",(inst,def)=>{$ZodTransform.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>transformProcessor(inst,ctx),inst._zod.parse=(payload,_ctx)=>{if(_ctx.direction==="backward")throw new $ZodEncodeError(inst.constructor.name);payload.addIssue=issue$1=>{if(typeof issue$1=="string")payload.issues.push(issue(issue$1, payload.value,def));else{const _issue=issue$1;_issue.fatal&&(_issue.continue=!1),_issue.code??(_issue.code="custom"),_issue.input??(_issue.input=payload.value),_issue.inst??(_issue.inst=inst),payload.issues.push(issue(_issue))}};const output=def.transform(payload.value,payload);return output instanceof Promise?output.then(output2=>(payload.value=output2,payload)):(payload.value=output,payload)}});function transform$1(fn){return new ZodTransform({type:"transform",transform:fn})}const ZodOptional=$constructor( "ZodOptional",(inst,def)=>{$ZodOptional.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>optionalProcessor(inst,ctx,json2,params),inst.unwrap=()=>inst._zod.def.innerType});function optional(innerType){return new ZodOptional({type:"optional",innerType})}const ZodNullable=$constructor("ZodNullable",(inst,def)=>{$ZodNullable.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>nullableProcessor(inst,ctx,json2,params),inst.unwrap= ()=>inst._zod.def.innerType});function nullable(innerType){return new ZodNullable({type:"nullable",innerType})}const ZodDefault=$constructor("ZodDefault",(inst,def)=>{$ZodDefault.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>defaultProcessor(inst,ctx,json2,params),inst.unwrap=()=>inst._zod.def.innerType,inst.removeDefault=inst.unwrap});function _default(innerType,defaultValue){return new ZodDefault({type:"default",innerType,get defaultValue(){return typeof defaultValue== "function"?defaultValue():shallowClone(defaultValue)}})}const ZodPrefault=$constructor("ZodPrefault",(inst,def)=>{$ZodPrefault.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>prefaultProcessor(inst,ctx,json2,params),inst.unwrap=()=>inst._zod.def.innerType});function prefault(innerType,defaultValue){return new ZodPrefault({type:"prefault",innerType,get defaultValue(){return typeof defaultValue=="function"?defaultValue():shallowClone(defaultValue)}})}const ZodNonOptional=$constructor( "ZodNonOptional",(inst,def)=>{$ZodNonOptional.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>nonoptionalProcessor(inst,ctx,json2,params),inst.unwrap=()=>inst._zod.def.innerType});function nonoptional(innerType,params){return new ZodNonOptional({type:"nonoptional",innerType,...normalizeParams(params)})}const ZodCatch=$constructor("ZodCatch",(inst,def)=>{$ZodCatch.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>catchProcessor( inst,ctx,json2,params),inst.unwrap=()=>inst._zod.def.innerType,inst.removeCatch=inst.unwrap});function _catch(innerType,catchValue){return new ZodCatch({type:"catch",innerType,catchValue:typeof catchValue=="function"?catchValue:()=>catchValue})}const ZodPipe=$constructor("ZodPipe",(inst,def)=>{$ZodPipe.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>pipeProcessor(inst,ctx,json2,params),inst.in=def.in,inst.out=def.out});function pipe(in_,out){return new ZodPipe( {type:"pipe",in:in_,out})}const ZodReadonly=$constructor("ZodReadonly",(inst,def)=>{$ZodReadonly.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>readonlyProcessor(inst,ctx,json2,params),inst.unwrap=()=>inst._zod.def.innerType});function readonly(innerType){return new ZodReadonly({type:"readonly",innerType})}const ZodCustom=$constructor("ZodCustom",(inst,def)=>{$ZodCustom.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>customProcessor( inst,ctx)});function custom(fn,_params){return _custom(ZodCustom,fn??(()=>!0),_params)}function refine(fn,_params={}){return _refine(ZodCustom,fn,_params)}function superRefine(fn){return _superRefine(fn)}function preprocess$1(fn,schema){return pipe(transform$1(fn),schema)}const ZodIssueCode={custom:"custom"};function number$1(params){return _coercedNumber(ZodNumber,params)}const LATEST_PROTOCOL_VERSION="2025-11-25",SUPPORTED_PROTOCOL_VERSIONS=[LATEST_PROTOCOL_VERSION,"2025-06-18","2025-03-26","2\ 024-11-05","2024-10-07"],RELATED_TASK_META_KEY="io.modelcontextprotocol/related-task",JSONRPC_VERSION="2.0",AssertObjectSchema=custom(v=>v!==null&&(typeof v=="object"||typeof v=="function")),ProgressTokenSchema=union([string$2(),number$2().int()]),CursorSchema=string$2();looseObject({ttl:union([number$2(),_null()]).optional(),pollInterval:number$2().optional()});const TaskMetadataSchema=object({ttl:number$2().optional()}),RelatedTaskMetadataSchema=object({taskId:string$2()}),RequestMetaSchema=looseObject( {progressToken:ProgressTokenSchema.optional(),[RELATED_TASK_META_KEY]:RelatedTaskMetadataSchema.optional()}),BaseRequestParamsSchema=object({_meta:RequestMetaSchema.optional()}),TaskAugmentedRequestParamsSchema=BaseRequestParamsSchema.extend({task:TaskMetadataSchema.optional()}),isTaskAugmentedRequestParams=value=>TaskAugmentedRequestParamsSchema.safeParse(value).success,RequestSchema=object({method:string$2(),params:BaseRequestParamsSchema.loose().optional()}),NotificationsParamsSchema=object({ _meta:RequestMetaSchema.optional()}),NotificationSchema=object({method:string$2(),params:NotificationsParamsSchema.loose().optional()}),ResultSchema=looseObject({_meta:RequestMetaSchema.optional()}),RequestIdSchema=union([string$2(),number$2().int()]),JSONRPCRequestSchema=object({jsonrpc:literal(JSONRPC_VERSION),id:RequestIdSchema,...RequestSchema.shape}).strict(),isJSONRPCRequest=value=>JSONRPCRequestSchema.safeParse(value).success,JSONRPCNotificationSchema=object({jsonrpc:literal(JSONRPC_VERSION), ...NotificationSchema.shape}).strict(),isJSONRPCNotification=value=>JSONRPCNotificationSchema.safeParse(value).success,JSONRPCResultResponseSchema=object({jsonrpc:literal(JSONRPC_VERSION),id:RequestIdSchema,result:ResultSchema}).strict(),isJSONRPCResultResponse=value=>JSONRPCResultResponseSchema.safeParse(value).success;var ErrorCode;(function(ErrorCode2){ErrorCode2[ErrorCode2.ConnectionClosed=-32e3]="ConnectionClosed",ErrorCode2[ErrorCode2.RequestTimeout=-32001]="RequestTimeout",ErrorCode2[ErrorCode2. ParseError=-32700]="ParseError",ErrorCode2[ErrorCode2.InvalidRequest=-32600]="InvalidRequest",ErrorCode2[ErrorCode2.MethodNotFound=-32601]="MethodNotFound",ErrorCode2[ErrorCode2.InvalidParams=-32602]="InvalidParams",ErrorCode2[ErrorCode2.InternalError=-32603]="InternalError",ErrorCode2[ErrorCode2.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(ErrorCode||(ErrorCode={}));const JSONRPCErrorResponseSchema=object({jsonrpc:literal(JSONRPC_VERSION),id:RequestIdSchema.optional(),error:object( {code:number$2().int(),message:string$2(),data:unknown$2().optional()})}).strict(),isJSONRPCErrorResponse=value=>JSONRPCErrorResponseSchema.safeParse(value).success,JSONRPCMessageSchema=union([JSONRPCRequestSchema,JSONRPCNotificationSchema,JSONRPCResultResponseSchema,JSONRPCErrorResponseSchema]);union([JSONRPCResultResponseSchema,JSONRPCErrorResponseSchema]);const EmptyResultSchema=ResultSchema.strict(),CancelledNotificationParamsSchema=NotificationsParamsSchema.extend({requestId:RequestIdSchema. optional(),reason:string$2().optional()}),CancelledNotificationSchema=NotificationSchema.extend({method:literal("notifications/cancelled"),params:CancelledNotificationParamsSchema}),IconSchema=object({src:string$2(),mimeType:string$2().optional(),sizes:array(string$2()).optional(),theme:_enum$2(["light","dark"]).optional()}),IconsSchema=object({icons:array(IconSchema).optional()}),BaseMetadataSchema=object({name:string$2(),title:string$2().optional()}),ImplementationSchema=BaseMetadataSchema.extend( {...BaseMetadataSchema.shape,...IconsSchema.shape,version:string$2(),websiteUrl:string$2().optional(),description:string$2().optional()}),FormElicitationCapabilitySchema=intersection(object({applyDefaults:boolean$1().optional()}),record(string$2(),unknown$2())),ElicitationCapabilitySchema=preprocess$1(value=>value&&typeof value=="object"&&!Array.isArray(value)&&Object.keys(value).length===0?{form:{}}:value,intersection(object({form:FormElicitationCapabilitySchema.optional(),url:AssertObjectSchema. optional()}),record(string$2(),unknown$2()).optional())),ClientTasksCapabilitySchema=looseObject({list:AssertObjectSchema.optional(),cancel:AssertObjectSchema.optional(),requests:looseObject({sampling:looseObject({createMessage:AssertObjectSchema.optional()}).optional(),elicitation:looseObject({create:AssertObjectSchema.optional()}).optional()}).optional()}),ServerTasksCapabilitySchema=looseObject({list:AssertObjectSchema.optional(),cancel:AssertObjectSchema.optional(),requests:looseObject({tools:looseObject( {call:AssertObjectSchema.optional()}).optional()}).optional()}),ClientCapabilitiesSchema=object({experimental:record(string$2(),AssertObjectSchema).optional(),sampling:object({context:AssertObjectSchema.optional(),tools:AssertObjectSchema.optional()}).optional(),elicitation:ElicitationCapabilitySchema.optional(),roots:object({listChanged:boolean$1().optional()}).optional(),tasks:ClientTasksCapabilitySchema.optional()}),InitializeRequestParamsSchema=BaseRequestParamsSchema.extend({protocolVersion:string$2(), capabilities:ClientCapabilitiesSchema,clientInfo:ImplementationSchema}),InitializeRequestSchema=RequestSchema.extend({method:literal("initialize"),params:InitializeRequestParamsSchema}),ServerCapabilitiesSchema=object({experimental:record(string$2(),AssertObjectSchema).optional(),logging:AssertObjectSchema.optional(),completions:AssertObjectSchema.optional(),prompts:object({listChanged:boolean$1().optional()}).optional(),resources:object({subscribe:boolean$1().optional(),listChanged:boolean$1(). optional()}).optional(),tools:object({listChanged:boolean$1().optional()}).optional(),tasks:ServerTasksCapabilitySchema.optional()}),InitializeResultSchema=ResultSchema.extend({protocolVersion:string$2(),capabilities:ServerCapabilitiesSchema,serverInfo:ImplementationSchema,instructions:string$2().optional()}),InitializedNotificationSchema=NotificationSchema.extend({method:literal("notifications/initialized"),params:NotificationsParamsSchema.optional()}),isInitializedNotification=value=>InitializedNotificationSchema. safeParse(value).success,PingRequestSchema=RequestSchema.extend({method:literal("ping"),params:BaseRequestParamsSchema.optional()}),ProgressSchema=object({progress:number$2(),total:optional(number$2()),message:optional(string$2())}),ProgressNotificationParamsSchema=object({...NotificationsParamsSchema.shape,...ProgressSchema.shape,progressToken:ProgressTokenSchema}),ProgressNotificationSchema=NotificationSchema.extend({method:literal("notifications/progress"),params:ProgressNotificationParamsSchema}), PaginatedRequestParamsSchema=BaseRequestParamsSchema.extend({cursor:CursorSchema.optional()}),PaginatedRequestSchema=RequestSchema.extend({params:PaginatedRequestParamsSchema.optional()}),PaginatedResultSchema=ResultSchema.extend({nextCursor:CursorSchema.optional()}),TaskStatusSchema=_enum$2(["working","input_required","completed","failed","cancelled"]),TaskSchema=object({taskId:string$2(),status:TaskStatusSchema,ttl:union([number$2(),_null()]),createdAt:string$2(),lastUpdatedAt:string$2(),pollInterval:optional( number$2()),statusMessage:optional(string$2())}),CreateTaskResultSchema=ResultSchema.extend({task:TaskSchema}),TaskStatusNotificationParamsSchema=NotificationsParamsSchema.merge(TaskSchema),TaskStatusNotificationSchema=NotificationSchema.extend({method:literal("notifications/tasks/status"),params:TaskStatusNotificationParamsSchema}),GetTaskRequestSchema=RequestSchema.extend({method:literal("tasks/get"),params:BaseRequestParamsSchema.extend({taskId:string$2()})}),GetTaskResultSchema=ResultSchema. merge(TaskSchema),GetTaskPayloadRequestSchema=RequestSchema.extend({method:literal("tasks/result"),params:BaseRequestParamsSchema.extend({taskId:string$2()})});ResultSchema.loose();const ListTasksRequestSchema=PaginatedRequestSchema.extend({method:literal("tasks/list")}),ListTasksResultSchema=PaginatedResultSchema.extend({tasks:array(TaskSchema)}),CancelTaskRequestSchema=RequestSchema.extend({method:literal("tasks/cancel"),params:BaseRequestParamsSchema.extend({taskId:string$2()})}),CancelTaskResultSchema=ResultSchema. merge(TaskSchema),ResourceContentsSchema=object({uri:string$2(),mimeType:optional(string$2()),_meta:record(string$2(),unknown$2()).optional()}),TextResourceContentsSchema=ResourceContentsSchema.extend({text:string$2()}),Base64Schema=string$2().refine(val=>{try{return atob(val),!0}catch{return!1}},{message:"Invalid Base64 string"}),BlobResourceContentsSchema=ResourceContentsSchema.extend({blob:Base64Schema}),RoleSchema=_enum$2(["user","assistant"]),AnnotationsSchema=object({audience:array(RoleSchema). optional(),priority:number$2().min(0).max(1).optional(),lastModified:datetime({offset:!0}).optional()}),ResourceSchema=object({...BaseMetadataSchema.shape,...IconsSchema.shape,uri:string$2(),description:optional(string$2()),mimeType:optional(string$2()),annotations:AnnotationsSchema.optional(),_meta:optional(looseObject({}))}),ResourceTemplateSchema=object({...BaseMetadataSchema.shape,...IconsSchema.shape,uriTemplate:string$2(),description:optional(string$2()),mimeType:optional(string$2()),annotations:AnnotationsSchema. optional(),_meta:optional(looseObject({}))}),ListResourcesRequestSchema=PaginatedRequestSchema.extend({method:literal("resources/list")}),ListResourcesResultSchema=PaginatedResultSchema.extend({resources:array(ResourceSchema)}),ListResourceTemplatesRequestSchema=PaginatedRequestSchema.extend({method:literal("resources/templates/list")}),ListResourceTemplatesResultSchema=PaginatedResultSchema.extend({resourceTemplates:array(ResourceTemplateSchema)}),ResourceRequestParamsSchema=BaseRequestParamsSchema. extend({uri:string$2()}),ReadResourceRequestParamsSchema=ResourceRequestParamsSchema,ReadResourceRequestSchema=RequestSchema.extend({method:literal("resources/read"),params:ReadResourceRequestParamsSchema}),ReadResourceResultSchema=ResultSchema.extend({contents:array(union([TextResourceContentsSchema,BlobResourceContentsSchema]))}),ResourceListChangedNotificationSchema=NotificationSchema.extend({method:literal("notifications/resources/list_changed"),params:NotificationsParamsSchema.optional()}), SubscribeRequestParamsSchema=ResourceRequestParamsSchema,SubscribeRequestSchema=RequestSchema.extend({method:literal("resources/subscribe"),params:SubscribeRequestParamsSchema}),UnsubscribeRequestParamsSchema=ResourceRequestParamsSchema,UnsubscribeRequestSchema=RequestSchema.extend({method:literal("resources/unsubscribe"),params:UnsubscribeRequestParamsSchema}),ResourceUpdatedNotificationParamsSchema=NotificationsParamsSchema.extend({uri:string$2()}),ResourceUpdatedNotificationSchema=NotificationSchema. extend({method:literal("notifications/resources/updated"),params:ResourceUpdatedNotificationParamsSchema}),PromptArgumentSchema=object({name:string$2(),description:optional(string$2()),required:optional(boolean$1())}),PromptSchema=object({...BaseMetadataSchema.shape,...IconsSchema.shape,description:optional(string$2()),arguments:optional(array(PromptArgumentSchema)),_meta:optional(looseObject({}))}),ListPromptsRequestSchema=PaginatedRequestSchema.extend({method:literal("prompts/list")}),ListPromptsResultSchema=PaginatedResultSchema. extend({prompts:array(PromptSchema)}),GetPromptRequestParamsSchema=BaseRequestParamsSchema.extend({name:string$2(),arguments:record(string$2(),string$2()).optional()}),GetPromptRequestSchema=RequestSchema.extend({method:literal("prompts/get"),params:GetPromptRequestParamsSchema}),TextContentSchema=object({type:literal("text"),text:string$2(),annotations:AnnotationsSchema.optional(),_meta:record(string$2(),unknown$2()).optional()}),ImageContentSchema=object({type:literal("image"),data:Base64Schema, mimeType:string$2(),annotations:AnnotationsSchema.optional(),_meta:record(string$2(),unknown$2()).optional()}),AudioContentSchema=object({type:literal("audio"),data:Base64Schema,mimeType:string$2(),annotations:AnnotationsSchema.optional(),_meta:record(string$2(),unknown$2()).optional()}),ToolUseContentSchema=object({type:literal("tool_use"),name:string$2(),id:string$2(),input:record(string$2(),unknown$2()),_meta:record(string$2(),unknown$2()).optional()}),EmbeddedResourceSchema=object({type:literal( "resource"),resource:union([TextResourceContentsSchema,BlobResourceContentsSchema]),annotations:AnnotationsSchema.optional(),_meta:record(string$2(),unknown$2()).optional()}),ResourceLinkSchema=ResourceSchema.extend({type:literal("resource_link")}),ContentBlockSchema=union([TextContentSchema,ImageContentSchema,AudioContentSchema,ResourceLinkSchema,EmbeddedResourceSchema]),PromptMessageSchema=object({role:RoleSchema,content:ContentBlockSchema}),GetPromptResultSchema=ResultSchema.extend({description:string$2(). optional(),messages:array(PromptMessageSchema)}),PromptListChangedNotificationSchema=NotificationSchema.extend({method:literal("notifications/prompts/list_changed"),params:NotificationsParamsSchema.optional()}),ToolAnnotationsSchema=object({title:string$2().optional(),readOnlyHint:boolean$1().optional(),destructiveHint:boolean$1().optional(),idempotentHint:boolean$1().optional(),openWorldHint:boolean$1().optional()}),ToolExecutionSchema=object({taskSupport:_enum$2(["required","optional","forbidd\ en"]).optional()}),ToolSchema=object({...BaseMetadataSchema.shape,...IconsSchema.shape,description:string$2().optional(),inputSchema:object({type:literal("object"),properties:record(string$2(),AssertObjectSchema).optional(),required:array(string$2()).optional()}).catchall(unknown$2()),outputSchema:object({type:literal("object"),properties:record(string$2(),AssertObjectSchema).optional(),required:array(string$2()).optional()}).catchall(unknown$2()).optional(),annotations:ToolAnnotationsSchema.optional(), execution:ToolExecutionSchema.optional(),_meta:record(string$2(),unknown$2()).optional()}),ListToolsRequestSchema=PaginatedRequestSchema.extend({method:literal("tools/list")}),ListToolsResultSchema=PaginatedResultSchema.extend({tools:array(ToolSchema)}),CallToolResultSchema=ResultSchema.extend({content:array(ContentBlockSchema).default([]),structuredContent:record(string$2(),unknown$2()).optional(),isError:boolean$1().optional()});CallToolResultSchema.or(ResultSchema.extend({toolResult:unknown$2()})); const CallToolRequestParamsSchema=TaskAugmentedRequestParamsSchema.extend({name:string$2(),arguments:record(string$2(),unknown$2()).optional()}),CallToolRequestSchema=RequestSchema.extend({method:literal("tools/call"),params:CallToolRequestParamsSchema}),ToolListChangedNotificationSchema=NotificationSchema.extend({method:literal("notifications/tools/list_changed"),params:NotificationsParamsSchema.optional()}),ListChangedOptionsBaseSchema=object({autoRefresh:boolean$1().default(!0),debounceMs:number$2(). int().nonnegative().default(300)}),LoggingLevelSchema=_enum$2(["debug","info","notice","warning","error","critical","alert","emergency"]),SetLevelRequestParamsSchema=BaseRequestParamsSchema.extend({level:LoggingLevelSchema}),SetLevelRequestSchema=RequestSchema.extend({method:literal("logging/setLevel"),params:SetLevelRequestParamsSchema}),LoggingMessageNotificationParamsSchema=NotificationsParamsSchema.extend({level:LoggingLevelSchema,logger:string$2().optional(),data:unknown$2()}),LoggingMessageNotificationSchema=NotificationSchema. extend({method:literal("notifications/message"),params:LoggingMessageNotificationParamsSchema}),ModelHintSchema=object({name:string$2().optional()}),ModelPreferencesSchema=object({hints:array(ModelHintSchema).optional(),costPriority:number$2().min(0).max(1).optional(),speedPriority:number$2().min(0).max(1).optional(),intelligencePriority:number$2().min(0).max(1).optional()}),ToolChoiceSchema=object({mode:_enum$2(["auto","required","none"]).optional()}),ToolResultContentSchema=object({type:literal( "tool_result"),toolUseId:string$2().describe("The unique identifier for the corresponding tool call."),content:array(ContentBlockSchema).default([]),structuredContent:object({}).loose().optional(),isError:boolean$1().optional(),_meta:record(string$2(),unknown$2()).optional()}),SamplingContentSchema=discriminatedUnion("type",[TextContentSchema,ImageContentSchema,AudioContentSchema]),SamplingMessageContentBlockSchema=discriminatedUnion("type",[TextContentSchema,ImageContentSchema,AudioContentSchema, ToolUseContentSchema,ToolResultContentSchema]),SamplingMessageSchema=object({role:RoleSchema,content:union([SamplingMessageContentBlockSchema,array(SamplingMessageContentBlockSchema)]),_meta:record(string$2(),unknown$2()).optional()}),CreateMessageRequestParamsSchema=TaskAugmentedRequestParamsSchema.extend({messages:array(SamplingMessageSchema),modelPreferences:ModelPreferencesSchema.optional(),systemPrompt:string$2().optional(),includeContext:_enum$2(["none","thisServer","allServers"]).optional(), temperature:number$2().optional(),maxTokens:number$2().int(),stopSequences:array(string$2()).optional(),metadata:AssertObjectSchema.optional(),tools:array(ToolSchema).optional(),toolChoice:ToolChoiceSchema.optional()}),CreateMessageRequestSchema=RequestSchema.extend({method:literal("sampling/createMessage"),params:CreateMessageRequestParamsSchema}),CreateMessageResultSchema=ResultSchema.extend({model:string$2(),stopReason:optional(_enum$2(["endTurn","stopSequence","maxTokens"]).or(string$2())),role:RoleSchema, content:SamplingContentSchema}),CreateMessageResultWithToolsSchema=ResultSchema.extend({model:string$2(),stopReason:optional(_enum$2(["endTurn","stopSequence","maxTokens","toolUse"]).or(string$2())),role:RoleSchema,content:union([SamplingMessageContentBlockSchema,array(SamplingMessageContentBlockSchema)])}),BooleanSchemaSchema=object({type:literal("boolean"),title:string$2().optional(),description:string$2().optional(),default:boolean$1().optional()}),StringSchemaSchema=object({type:literal("str\ ing"),title:string$2().optional(),description:string$2().optional(),minLength:number$2().optional(),maxLength:number$2().optional(),format:_enum$2(["email","uri","date","date-time"]).optional(),default:string$2().optional()}),NumberSchemaSchema=object({type:_enum$2(["number","integer"]),title:string$2().optional(),description:string$2().optional(),minimum:number$2().optional(),maximum:number$2().optional(),default:number$2().optional()}),UntitledSingleSelectEnumSchemaSchema=object({type:literal( "string"),title:string$2().optional(),description:string$2().optional(),enum:array(string$2()),default:string$2().optional()}),TitledSingleSelectEnumSchemaSchema=object({type:literal("string"),title:string$2().optional(),description:string$2().optional(),oneOf:array(object({const:string$2(),title:string$2()})),default:string$2().optional()}),LegacyTitledEnumSchemaSchema=object({type:literal("string"),title:string$2().optional(),description:string$2().optional(),enum:array(string$2()),enumNames:array( string$2()).optional(),default:string$2().optional()}),SingleSelectEnumSchemaSchema=union([UntitledSingleSelectEnumSchemaSchema,TitledSingleSelectEnumSchemaSchema]),UntitledMultiSelectEnumSchemaSchema=object({type:literal("array"),title:string$2().optional(),description:string$2().optional(),minItems:number$2().optional(),maxItems:number$2().optional(),items:object({type:literal("string"),enum:array(string$2())}),default:array(string$2()).optional()}),TitledMultiSelectEnumSchemaSchema=object({type:literal( "array"),title:string$2().optional(),description:string$2().optional(),minItems:number$2().optional(),maxItems:number$2().optional(),items:object({anyOf:array(object({const:string$2(),title:string$2()}))}),default:array(string$2()).optional()}),MultiSelectEnumSchemaSchema=union([UntitledMultiSelectEnumSchemaSchema,TitledMultiSelectEnumSchemaSchema]),EnumSchemaSchema=union([LegacyTitledEnumSchemaSchema,SingleSelectEnumSchemaSchema,MultiSelectEnumSchemaSchema]),PrimitiveSchemaDefinitionSchema=union( [EnumSchemaSchema,BooleanSchemaSchema,StringSchemaSchema,NumberSchemaSchema]),ElicitRequestFormParamsSchema=TaskAugmentedRequestParamsSchema.extend({mode:literal("form").optional(),message:string$2(),requestedSchema:object({type:literal("object"),properties:record(string$2(),PrimitiveSchemaDefinitionSchema),required:array(string$2()).optional()})}),ElicitRequestURLParamsSchema=TaskAugmentedRequestParamsSchema.extend({mode:literal("url"),message:string$2(),elicitationId:string$2(),url:string$2(). url()}),ElicitRequestParamsSchema=union([ElicitRequestFormParamsSchema,ElicitRequestURLParamsSchema]),ElicitRequestSchema=RequestSchema.extend({method:literal("elicitation/create"),params:ElicitRequestParamsSchema}),ElicitationCompleteNotificationParamsSchema=NotificationsParamsSchema.extend({elicitationId:string$2()}),ElicitationCompleteNotificationSchema=NotificationSchema.extend({method:literal("notifications/elicitation/complete"),params:ElicitationCompleteNotificationParamsSchema}),ElicitResultSchema=ResultSchema. extend({action:_enum$2(["accept","decline","cancel"]),content:preprocess$1(val=>val===null?void 0:val,record(string$2(),union([string$2(),number$2(),boolean$1(),array(string$2())])).optional())}),ResourceTemplateReferenceSchema=object({type:literal("ref/resource"),uri:string$2()}),PromptReferenceSchema=object({type:literal("ref/prompt"),name:string$2()}),CompleteRequestParamsSchema=BaseRequestParamsSchema.extend({ref:union([PromptReferenceSchema,ResourceTemplateReferenceSchema]),argument:object( {name:string$2(),value:string$2()}),context:object({arguments:record(string$2(),string$2()).optional()}).optional()}),CompleteRequestSchema=RequestSchema.extend({method:literal("completion/complete"),params:CompleteRequestParamsSchema}),CompleteResultSchema=ResultSchema.extend({completion:looseObject({values:array(string$2()).max(100),total:optional(number$2().int()),hasMore:optional(boolean$1())})}),RootSchema=object({uri:string$2().startsWith("file://"),name:string$2().optional(),_meta:record( string$2(),unknown$2()).optional()}),ListRootsRequestSchema=RequestSchema.extend({method:literal("roots/list"),params:BaseRequestParamsSchema.optional()}),ListRootsResultSchema=ResultSchema.extend({roots:array(RootSchema)}),RootsListChangedNotificationSchema=NotificationSchema.extend({method:literal("notifications/roots/list_changed"),params:NotificationsParamsSchema.optional()});union([PingRequestSchema,InitializeRequestSchema,CompleteRequestSchema,SetLevelRequestSchema,GetPromptRequestSchema,ListPromptsRequestSchema, ListResourcesRequestSchema,ListResourceTemplatesRequestSchema,ReadResourceRequestSchema,SubscribeRequestSchema,UnsubscribeRequestSchema,CallToolRequestSchema,ListToolsRequestSchema,GetTaskRequestSchema,GetTaskPayloadRequestSchema,ListTasksRequestSchema,CancelTaskRequestSchema]);union([CancelledNotificationSchema,ProgressNotificationSchema,InitializedNotificationSchema,RootsListChangedNotificationSchema,TaskStatusNotificationSchema]);union([EmptyResultSchema,CreateMessageResultSchema,CreateMessageResultWithToolsSchema, ElicitResultSchema,ListRootsResultSchema,GetTaskResultSchema,ListTasksResultSchema,CreateTaskResultSchema]);union([PingRequestSchema,CreateMessageRequestSchema,ElicitRequestSchema,ListRootsRequestSchema,GetTaskRequestSchema,GetTaskPayloadRequestSchema,ListTasksRequestSchema,CancelTaskRequestSchema]);union([CancelledNotificationSchema,ProgressNotificationSchema,LoggingMessageNotificationSchema,ResourceUpdatedNotificationSchema,ResourceListChangedNotificationSchema,ToolListChangedNotificationSchema, PromptListChangedNotificationSchema,TaskStatusNotificationSchema,ElicitationCompleteNotificationSchema]);union([EmptyResultSchema,InitializeResultSchema,CompleteResultSchema,GetPromptResultSchema,ListPromptsResultSchema,ListResourcesResultSchema,ListResourceTemplatesResultSchema,ReadResourceResultSchema,CallToolResultSchema,ListToolsResultSchema,GetTaskResultSchema,ListTasksResultSchema,CreateTaskResultSchema]);class McpError extends Error{constructor(code2,message,data){super(`MCP error ${code2}\ : ${message}`),this.code=code2,this.data=data,this.name="McpError"}static fromError(code2,message,data){if(code2===ErrorCode.UrlElicitationRequired&&data){const errorData=data;if(errorData.elicitations)return new UrlElicitationRequiredError(errorData.elicitations,message)}return new McpError(code2,message,data)}}class UrlElicitationRequiredError extends McpError{constructor(elicitations,message=`URL elicitation${elicitations.length>1?"s":""} required`){super(ErrorCode.UrlElicitationRequired,message, {elicitations})}get elicitations(){return this.data?.elicitations??[]}}function isTerminal(status){return status==="completed"||status==="failed"||status==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function getMethodLiteral(schema){const methodSchema=getObjectShape(schema)?.method;if(!methodSchema)throw new Error("Schema is missing a method literal");const value=getLiteralValue(methodSchema);if(typeof value!="string")throw new Error("Schema method litera\ l must be a string");return value}function parseWithCompat(schema,data){const result=safeParse$1(schema,data);if(!result.success)throw result.error;return result.data}const DEFAULT_REQUEST_TIMEOUT_MSEC=6e4;class Protocol{constructor(_options){this._options=_options,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications= new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(CancelledNotificationSchema,notification=>{this._oncancel(notification)}),this.setNotificationHandler(ProgressNotificationSchema,notification=>{this._onprogress(notification)}),this.setRequestHandler(PingRequestSchema,_request=>({})),this._taskStore=_options?.taskStore,this._taskMessageQueue=_options?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(GetTaskRequestSchema,async(request,extra)=>{ const task=await this._taskStore.getTask(request.params.taskId,extra.sessionId);if(!task)throw new McpError(ErrorCode.InvalidParams,"Failed to retrieve task: Task not found");return{...task}}),this.setRequestHandler(GetTaskPayloadRequestSchema,async(request,extra)=>{const handleTaskResult=async()=>{const taskId=request.params.taskId;if(this._taskMessageQueue){let queuedMessage;for(;queuedMessage=await this._taskMessageQueue.dequeue(taskId,extra.sessionId);){if(queuedMessage.type==="response"||queuedMessage. type==="error"){const message=queuedMessage.message,requestId=message.id,resolver2=this._requestResolvers.get(requestId);if(resolver2)if(this._requestResolvers.delete(requestId),queuedMessage.type==="response")resolver2(message);else{const errorMessage=message,error2=new McpError(errorMessage.error.code,errorMessage.error.message,errorMessage.error.data);resolver2(error2)}else{const messageType=queuedMessage.type==="response"?"Response":"Error";this._onerror(new Error(`${messageType} handler mis\ sing for request ${requestId}`))}continue}await this._transport?.send(queuedMessage.message,{relatedRequestId:extra.requestId})}}const task=await this._taskStore.getTask(taskId,extra.sessionId);if(!task)throw new McpError(ErrorCode.InvalidParams,`Task not found: ${taskId}`);if(!isTerminal(task.status))return await this._waitForTaskUpdate(taskId,extra.signal),await handleTaskResult();if(isTerminal(task.status)){const result=await this._taskStore.getTaskResult(taskId,extra.sessionId);return this._clearTaskQueue( taskId),{...result,_meta:{...result._meta,[RELATED_TASK_META_KEY]:{taskId}}}}return await handleTaskResult()};return await handleTaskResult()}),this.setRequestHandler(ListTasksRequestSchema,async(request,extra)=>{try{const{tasks,nextCursor}=await this._taskStore.listTasks(request.params?.cursor,extra.sessionId);return{tasks,nextCursor,_meta:{}}}catch(error2){throw new McpError(ErrorCode.InvalidParams,`Failed to list tasks: ${error2 instanceof Error?error2.message:String(error2)}`)}}),this.setRequestHandler( CancelTaskRequestSchema,async(request,extra)=>{try{const task=await this._taskStore.getTask(request.params.taskId,extra.sessionId);if(!task)throw new McpError(ErrorCode.InvalidParams,`Task not found: ${request.params.taskId}`);if(isTerminal(task.status))throw new McpError(ErrorCode.InvalidParams,`Cannot cancel task in terminal status: ${task.status}`);await this._taskStore.updateTaskStatus(request.params.taskId,"cancelled","Client cancelled task execution.",extra.sessionId),this._clearTaskQueue( request.params.taskId);const cancelledTask=await this._taskStore.getTask(request.params.taskId,extra.sessionId);if(!cancelledTask)throw new McpError(ErrorCode.InvalidParams,`Task not found after cancellation: ${request.params.taskId}`);return{_meta:{},...cancelledTask}}catch(error2){throw error2 instanceof McpError?error2:new McpError(ErrorCode.InvalidRequest,`Failed to cancel task: ${error2 instanceof Error?error2.message:String(error2)}`)}}))}async _oncancel(notification){if(!notification.params. requestId)return;this._requestHandlerAbortControllers.get(notification.params.requestId)?.abort(notification.params.reason)}_setupTimeout(messageId,timeout,maxTotalTimeout,onTimeout,resetTimeoutOnProgress=!1){this._timeoutInfo.set(messageId,{timeoutId:setTimeout(onTimeout,timeout),startTime:Date.now(),timeout,maxTotalTimeout,resetTimeoutOnProgress,onTimeout})}_resetTimeout(messageId){const info2=this._timeoutInfo.get(messageId);if(!info2)return!1;const totalElapsed=Date.now()-info2.startTime;if(info2. maxTotalTimeout&&totalElapsed>=info2.maxTotalTimeout)throw this._timeoutInfo.delete(messageId),McpError.fromError(ErrorCode.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:info2.maxTotalTimeout,totalElapsed});return clearTimeout(info2.timeoutId),info2.timeoutId=setTimeout(info2.onTimeout,info2.timeout),!0}_cleanupTimeout(messageId){const info2=this._timeoutInfo.get(messageId);info2&&(clearTimeout(info2.timeoutId),this._timeoutInfo.delete(messageId))}async connect(transport){if(this. _transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=transport;const _onclose=this.transport?.onclose;this._transport.onclose=()=>{_onclose?.(),this._onclose()};const _onerror=this.transport?.onerror;this._transport.onerror=error2=>{_onerror?.(error2),this._onerror(error2)};const _onmessage=this._transport?.onmessage;this._transport.onmessage=(message,extra)=>{_onmessage?.( message,extra),isJSONRPCResultResponse(message)||isJSONRPCErrorResponse(message)?this._onresponse(message):isJSONRPCRequest(message)?this._onrequest(message,extra):isJSONRPCNotification(message)?this._onnotification(message):this._onerror(new Error(`Unknown message type: ${JSON.stringify(message)}`))},await this._transport.start()}_onclose(){const responseHandlers=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications. clear();for(const controller of this._requestHandlerAbortControllers.values())controller.abort();this._requestHandlerAbortControllers.clear();const error2=McpError.fromError(ErrorCode.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const handler of responseHandlers.values())handler(error2)}_onerror(error2){this.onerror?.(error2)}_onnotification(notification){const handler=this._notificationHandlers.get(notification.method)??this.fallbackNotificationHandler;handler!== void 0&&Promise.resolve().then(()=>handler(notification)).catch(error2=>this._onerror(new Error(`Uncaught error in notification handler: ${error2}`)))}_onrequest(request,extra){const handler=this._requestHandlers.get(request.method)??this.fallbackRequestHandler,capturedTransport=this._transport,relatedTaskId=request.params?._meta?.[RELATED_TASK_META_KEY]?.taskId;if(handler===void 0){const errorResponse={jsonrpc:"2.0",id:request.id,error:{code:ErrorCode.MethodNotFound,message:"Method not found"}}; relatedTaskId&&this._taskMessageQueue?this._enqueueTaskMessage(relatedTaskId,{type:"error",message:errorResponse,timestamp:Date.now()},capturedTransport?.sessionId).catch(error2=>this._onerror(new Error(`Failed to enqueue error response: ${error2}`))):capturedTransport?.send(errorResponse).catch(error2=>this._onerror(new Error(`Failed to send an error response: ${error2}`)));return}const abortController=new AbortController;this._requestHandlerAbortControllers.set(request.id,abortController);const taskCreationParams=isTaskAugmentedRequestParams( request.params)?request.params.task:void 0,taskStore=this._taskStore?this.requestTaskStore(request,capturedTransport?.sessionId):void 0,fullExtra={signal:abortController.signal,sessionId:capturedTransport?.sessionId,_meta:request.params?._meta,sendNotification:async notification=>{if(abortController.signal.aborted)return;const notificationOptions={relatedRequestId:request.id};relatedTaskId&&(notificationOptions.relatedTask={taskId:relatedTaskId}),await this.notification(notification,notificationOptions)}, sendRequest:async(r2,resultSchema,options)=>{if(abortController.signal.aborted)throw new McpError(ErrorCode.ConnectionClosed,"Request was cancelled");const requestOptions={...options,relatedRequestId:request.id};relatedTaskId&&!requestOptions.relatedTask&&(requestOptions.relatedTask={taskId:relatedTaskId});const effectiveTaskId=requestOptions.relatedTask?.taskId??relatedTaskId;return effectiveTaskId&&taskStore&&await taskStore.updateTaskStatus(effectiveTaskId,"input_required"),await this.request( r2,resultSchema,requestOptions)},authInfo:extra?.authInfo,requestId:request.id,requestInfo:extra?.requestInfo,taskId:relatedTaskId,taskStore,taskRequestedTtl:taskCreationParams?.ttl,closeSSEStream:extra?.closeSSEStream,closeStandaloneSSEStream:extra?.closeStandaloneSSEStream};Promise.resolve().then(()=>{taskCreationParams&&this.assertTaskHandlerCapability(request.method)}).then(()=>handler(request,fullExtra)).then(async result=>{if(abortController.signal.aborted)return;const response={result,jsonrpc:"\ 2.0",id:request.id};relatedTaskId&&this._taskMessageQueue?await this._enqueueTaskMessage(relatedTaskId,{type:"response",message:response,timestamp:Date.now()},capturedTransport?.sessionId):await capturedTransport?.send(response)},async error2=>{if(abortController.signal.aborted)return;const errorResponse={jsonrpc:"2.0",id:request.id,error:{code:Number.isSafeInteger(error2.code)?error2.code:ErrorCode.InternalError,message:error2.message??"Internal error",...error2.data!==void 0&&{data:error2.data}}}; relatedTaskId&&this._taskMessageQueue?await this._enqueueTaskMessage(relatedTaskId,{type:"error",message:errorResponse,timestamp:Date.now()},capturedTransport?.sessionId):await capturedTransport?.send(errorResponse)}).catch(error2=>this._onerror(new Error(`Failed to send response: ${error2}`))).finally(()=>{this._requestHandlerAbortControllers.delete(request.id)})}_onprogress(notification){const{progressToken,...params}=notification.params,messageId=Number(progressToken),handler=this._progressHandlers. get(messageId);if(!handler){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(notification)}`));return}const responseHandler=this._responseHandlers.get(messageId),timeoutInfo=this._timeoutInfo.get(messageId);if(timeoutInfo&&responseHandler&&timeoutInfo.resetTimeoutOnProgress)try{this._resetTimeout(messageId)}catch(error2){this._responseHandlers.delete(messageId),this._progressHandlers.delete(messageId),this._cleanupTimeout(messageId),responseHandler( error2);return}handler(params)}_onresponse(response){const messageId=Number(response.id),resolver2=this._requestResolvers.get(messageId);if(resolver2){if(this._requestResolvers.delete(messageId),isJSONRPCResultResponse(response))resolver2(response);else{const error2=new McpError(response.error.code,response.error.message,response.error.data);resolver2(error2)}return}const handler=this._responseHandlers.get(messageId);if(handler===void 0){this._onerror(new Error(`Received a response for an unknow\ n message ID: ${JSON.stringify(response)}`));return}this._responseHandlers.delete(messageId),this._cleanupTimeout(messageId);let isTaskResponse=!1;if(isJSONRPCResultResponse(response)&&response.result&&typeof response.result=="object"){const result=response.result;if(result.task&&typeof result.task=="object"){const task=result.task;typeof task.taskId=="string"&&(isTaskResponse=!0,this._taskProgressTokens.set(task.taskId,messageId))}}if(isTaskResponse||this._progressHandlers.delete(messageId),isJSONRPCResultResponse( response))handler(response);else{const error2=McpError.fromError(response.error.code,response.error.message,response.error.data);handler(error2)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(request,resultSchema,options){const{task}=options??{};if(!task){try{yield{type:"result",result:await this.request(request,resultSchema,options)}}catch(error2){yield{type:"error",error:error2 instanceof McpError?error2:new McpError(ErrorCode.InternalError, String(error2))}}return}let taskId;try{const createResult=await this.request(request,CreateTaskResultSchema,options);if(createResult.task)taskId=createResult.task.taskId,yield{type:"taskCreated",task:createResult.task};else throw new McpError(ErrorCode.InternalError,"Task creation did not return a task");for(;;){const task2=await this.getTask({taskId},options);if(yield{type:"taskStatus",task:task2},isTerminal(task2.status)){task2.status==="completed"?yield{type:"result",result:await this.getTaskResult( {taskId},resultSchema,options)}:task2.status==="failed"?yield{type:"error",error:new McpError(ErrorCode.InternalError,`Task ${taskId} failed`)}:task2.status==="cancelled"&&(yield{type:"error",error:new McpError(ErrorCode.InternalError,`Task ${taskId} was cancelled`)});return}if(task2.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId},resultSchema,options)};return}const pollInterval=task2.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise( resolve2=>setTimeout(resolve2,pollInterval)),options?.signal?.throwIfAborted()}}catch(error2){yield{type:"error",error:error2 instanceof McpError?error2:new McpError(ErrorCode.InternalError,String(error2))}}}request(request,resultSchema,options){const{relatedRequestId,resumptionToken,onresumptiontoken,task,relatedTask}=options??{};return new Promise((resolve2,reject)=>{const earlyReject=error2=>{reject(error2)};if(!this._transport){earlyReject(new Error("Not connected"));return}if(this._options?. enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(request.method),task&&this.assertTaskCapability(request.method)}catch(e){earlyReject(e);return}options?.signal?.throwIfAborted();const messageId=this._requestMessageId++,jsonrpcRequest={...request,jsonrpc:"2.0",id:messageId};options?.onprogress&&(this._progressHandlers.set(messageId,options.onprogress),jsonrpcRequest.params={...request.params,_meta:{...request.params?._meta||{},progressToken:messageId}}),task&&(jsonrpcRequest.params= {...jsonrpcRequest.params,task}),relatedTask&&(jsonrpcRequest.params={...jsonrpcRequest.params,_meta:{...jsonrpcRequest.params?._meta||{},[RELATED_TASK_META_KEY]:relatedTask}});const cancel=reason=>{this._responseHandlers.delete(messageId),this._progressHandlers.delete(messageId),this._cleanupTimeout(messageId),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:messageId,reason:String(reason)}},{relatedRequestId,resumptionToken,onresumptiontoken}).catch(error3=>this. _onerror(new Error(`Failed to send cancellation: ${error3}`)));const error2=reason instanceof McpError?reason:new McpError(ErrorCode.RequestTimeout,String(reason));reject(error2)};this._responseHandlers.set(messageId,response=>{if(!options?.signal?.aborted){if(response instanceof Error)return reject(response);try{const parseResult=safeParse$1(resultSchema,response.result);parseResult.success?resolve2(parseResult.data):reject(parseResult.error)}catch(error2){reject(error2)}}}),options?.signal?.addEventListener( "abort",()=>{cancel(options?.signal?.reason)});const timeout=options?.timeout??DEFAULT_REQUEST_TIMEOUT_MSEC,timeoutHandler=()=>cancel(McpError.fromError(ErrorCode.RequestTimeout,"Request timed out",{timeout}));this._setupTimeout(messageId,timeout,options?.maxTotalTimeout,timeoutHandler,options?.resetTimeoutOnProgress??!1);const relatedTaskId=relatedTask?.taskId;if(relatedTaskId){const responseResolver=response=>{const handler=this._responseHandlers.get(messageId);handler?handler(response):this._onerror( new Error(`Response handler missing for side-channeled request ${messageId}`))};this._requestResolvers.set(messageId,responseResolver),this._enqueueTaskMessage(relatedTaskId,{type:"request",message:jsonrpcRequest,timestamp:Date.now()}).catch(error2=>{this._cleanupTimeout(messageId),reject(error2)})}else this._transport.send(jsonrpcRequest,{relatedRequestId,resumptionToken,onresumptiontoken}).catch(error2=>{this._cleanupTimeout(messageId),reject(error2)})})}async getTask(params,options){return this. request({method:"tasks/get",params},GetTaskResultSchema,options)}async getTaskResult(params,resultSchema,options){return this.request({method:"tasks/result",params},resultSchema,options)}async listTasks(params,options){return this.request({method:"tasks/list",params},ListTasksResultSchema,options)}async cancelTask(params,options){return this.request({method:"tasks/cancel",params},CancelTaskResultSchema,options)}async notification(notification,options){if(!this._transport)throw new Error("Not con\ nected");this.assertNotificationCapability(notification.method);const relatedTaskId=options?.relatedTask?.taskId;if(relatedTaskId){const jsonrpcNotification2={...notification,jsonrpc:"2.0",params:{...notification.params,_meta:{...notification.params?._meta||{},[RELATED_TASK_META_KEY]:options.relatedTask}}};await this._enqueueTaskMessage(relatedTaskId,{type:"notification",message:jsonrpcNotification2,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(notification. method)&&!notification.params&&!options?.relatedRequestId&&!options?.relatedTask){if(this._pendingDebouncedNotifications.has(notification.method))return;this._pendingDebouncedNotifications.add(notification.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(notification.method),!this._transport)return;let jsonrpcNotification2={...notification,jsonrpc:"2.0"};options?.relatedTask&&(jsonrpcNotification2={...jsonrpcNotification2,params:{...jsonrpcNotification2.params,_meta:{ ...jsonrpcNotification2.params?._meta||{},[RELATED_TASK_META_KEY]:options.relatedTask}}}),this._transport?.send(jsonrpcNotification2,options).catch(error2=>this._onerror(error2))});return}let jsonrpcNotification={...notification,jsonrpc:"2.0"};options?.relatedTask&&(jsonrpcNotification={...jsonrpcNotification,params:{...jsonrpcNotification.params,_meta:{...jsonrpcNotification.params?._meta||{},[RELATED_TASK_META_KEY]:options.relatedTask}}}),await this._transport.send(jsonrpcNotification,options)}setRequestHandler(requestSchema,handler){ const method=getMethodLiteral(requestSchema);this.assertRequestHandlerCapability(method),this._requestHandlers.set(method,(request,extra)=>{const parsed=parseWithCompat(requestSchema,request);return Promise.resolve(handler(parsed,extra))})}removeRequestHandler(method){this._requestHandlers.delete(method)}assertCanSetRequestHandler(method){if(this._requestHandlers.has(method))throw new Error(`A request handler for ${method} already exists, which would be overridden`)}setNotificationHandler(notificationSchema,handler){ const method=getMethodLiteral(notificationSchema);this._notificationHandlers.set(method,notification=>{const parsed=parseWithCompat(notificationSchema,notification);return Promise.resolve(handler(parsed))})}removeNotificationHandler(method){this._notificationHandlers.delete(method)}_cleanupTaskProgressHandler(taskId){const progressToken=this._taskProgressTokens.get(taskId);progressToken!==void 0&&(this._progressHandlers.delete(progressToken),this._taskProgressTokens.delete(taskId))}async _enqueueTaskMessage(taskId,message,sessionId){ if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const maxQueueSize=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(taskId,message,sessionId,maxQueueSize)}async _clearTaskQueue(taskId,sessionId){if(this._taskMessageQueue){const messages=await this._taskMessageQueue.dequeueAll(taskId,sessionId);for(const message of messages)if(message.type==="request"&&isJSONRPCRequest(message.message)){ const requestId=message.message.id,resolver2=this._requestResolvers.get(requestId);resolver2?(resolver2(new McpError(ErrorCode.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(requestId)):this._onerror(new Error(`Resolver missing for request ${requestId} during task ${taskId} cleanup`))}}}async _waitForTaskUpdate(taskId,signal){let interval=this._options?.defaultTaskPollInterval??1e3;try{const task=await this._taskStore?.getTask(taskId);task?.pollInterval&&(interval=task. pollInterval)}catch{}return new Promise((resolve2,reject)=>{if(signal.aborted){reject(new McpError(ErrorCode.InvalidRequest,"Request cancelled"));return}const timeoutId=setTimeout(resolve2,interval);signal.addEventListener("abort",()=>{clearTimeout(timeoutId),reject(new McpError(ErrorCode.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(request,sessionId){const taskStore=this._taskStore;if(!taskStore)throw new Error("No task store configured");return{createTask:async taskParams=>{ if(!request)throw new Error("No request provided");return await taskStore.createTask(taskParams,request.id,{method:request.method,params:request.params},sessionId)},getTask:async taskId=>{const task=await taskStore.getTask(taskId,sessionId);if(!task)throw new McpError(ErrorCode.InvalidParams,"Failed to retrieve task: Task not found");return task},storeTaskResult:async(taskId,status,result)=>{await taskStore.storeTaskResult(taskId,status,result,sessionId);const task=await taskStore.getTask(taskId, sessionId);if(task){const notification=TaskStatusNotificationSchema.parse({method:"notifications/tasks/status",params:task});await this.notification(notification),isTerminal(task.status)&&this._cleanupTaskProgressHandler(taskId)}},getTaskResult:taskId=>taskStore.getTaskResult(taskId,sessionId),updateTaskStatus:async(taskId,status,statusMessage)=>{const task=await taskStore.getTask(taskId,sessionId);if(!task)throw new McpError(ErrorCode.InvalidParams,`Task "${taskId}" not found - it may have been\ cleaned up`);if(isTerminal(task.status))throw new McpError(ErrorCode.InvalidParams,`Cannot update task "${taskId}" from terminal status "${task.status}" to "${status}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await taskStore.updateTaskStatus(taskId,status,statusMessage,sessionId);const updatedTask=await taskStore.getTask(taskId,sessionId);if(updatedTask){const notification=TaskStatusNotificationSchema.parse({method:"notifications/tasks/status",params:updatedTask}); await this.notification(notification),isTerminal(updatedTask.status)&&this._cleanupTaskProgressHandler(taskId)}},listTasks:cursor=>taskStore.listTasks(cursor,sessionId)}}}function isPlainObject$1(value){return value!==null&&typeof value=="object"&&!Array.isArray(value)}function mergeCapabilities(base2,additional){const result={...base2};for(const key2 in additional){const k=key2,addValue=additional[k];if(addValue===void 0)continue;const baseValue=result[k];isPlainObject$1(baseValue)&&isPlainObject$1( addValue)?result[k]={...baseValue,...addValue}:result[k]=addValue}return result}var ajv$1={exports:{}},core$4={},validate$1={},boolSchema$1={},errors$1={},codegen$1={},code$6={},hasRequiredCode$3;function requireCode$3(){return hasRequiredCode$3||(hasRequiredCode$3=1,function(exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.regexpCode=exports.getEsmExportName=exports.getProperty=exports.safeStringify=exports.stringify=exports.strConcat=exports.addCodeArg=exports.str=exports. _=exports.nil=exports._Code=exports.Name=exports.IDENTIFIER=exports._CodeOrName=void 0;class _CodeOrName{}exports._CodeOrName=_CodeOrName,exports.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Name extends _CodeOrName{constructor(s2){if(super(),!exports.IDENTIFIER.test(s2))throw new Error("CodeGen: name must be a valid identifier");this.str=s2}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}exports.Name=Name;class _Code extends _CodeOrName{constructor(code2){super(),this. _items=typeof code2=="string"?[code2]:code2}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const item=this._items[0];return item===""||item==='""'}get str(){var _a2;return(_a2=this._str)!==null&&_a2!==void 0?_a2:this._str=this._items.reduce((s2,c2)=>`${s2}${c2}`,"")}get names(){var _a2;return(_a2=this._names)!==null&&_a2!==void 0?_a2:this._names=this._items.reduce((names2,c2)=>(c2 instanceof Name&&(names2[c2.str]=(names2[c2.str]||0)+1),names2),{})}}exports._Code=_Code,exports. nil=new _Code("");function _(strs,...args){const code2=[strs[0]];let i=0;for(;i{if(name.scopePath===void 0)throw new Error(`CodeGen: name "${name}" has no value`);return(0,code_1._)`${scopeName}${name.scopePath}`})}scopeCode(values=this._values,usedValues,getCode){return this._reduceValues(values,name=>{if(name.value===void 0)throw new Error(`Code\ Gen: name "${name}" has no value`);return name.value.code},usedValues,getCode)}_reduceValues(values,valueCode,usedValues={},getCode){let code2=code_1.nil;for(const prefix in values){const vs=values[prefix];if(!vs)continue;const nameSet=usedValues[prefix]=usedValues[prefix]||new Map;vs.forEach(name=>{if(nameSet.has(name))return;nameSet.set(name,UsedValueState.Started);let c2=valueCode(name);if(c2){const def=this.opts.es5?exports.varKinds.var:exports.varKinds.const;code2=(0,code_1._)`${code2}${def} ${name} = ${c2};${this. opts._n}`}else if(c2=getCode?.(name))code2=(0,code_1._)`${code2}${c2}${this.opts._n}`;else throw new ValueError(name);nameSet.set(name,UsedValueState.Completed)})}return code2}}exports.ValueScope=ValueScope}(scope$1)),scope$1}var hasRequiredCodegen$1;function requireCodegen$1(){return hasRequiredCodegen$1||(hasRequiredCodegen$1=1,function(exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.or=exports.and=exports.not=exports.CodeGen=exports.operators=exports.varKinds=exports.ValueScopeName= exports.ValueScope=exports.Scope=exports.Name=exports.regexpCode=exports.stringify=exports.getProperty=exports.nil=exports.strConcat=exports.str=exports._=void 0;const code_1=requireCode$3(),scope_1=requireScope$1();var code_2=requireCode$3();Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return code_2._}}),Object.defineProperty(exports,"str",{enumerable:!0,get:function(){return code_2.str}}),Object.defineProperty(exports,"strConcat",{enumerable:!0,get:function(){return code_2.strConcat}}), Object.defineProperty(exports,"nil",{enumerable:!0,get:function(){return code_2.nil}}),Object.defineProperty(exports,"getProperty",{enumerable:!0,get:function(){return code_2.getProperty}}),Object.defineProperty(exports,"stringify",{enumerable:!0,get:function(){return code_2.stringify}}),Object.defineProperty(exports,"regexpCode",{enumerable:!0,get:function(){return code_2.regexpCode}}),Object.defineProperty(exports,"Name",{enumerable:!0,get:function(){return code_2.Name}});var scope_2=requireScope$1(); Object.defineProperty(exports,"Scope",{enumerable:!0,get:function(){return scope_2.Scope}}),Object.defineProperty(exports,"ValueScope",{enumerable:!0,get:function(){return scope_2.ValueScope}}),Object.defineProperty(exports,"ValueScopeName",{enumerable:!0,get:function(){return scope_2.ValueScopeName}}),Object.defineProperty(exports,"varKinds",{enumerable:!0,get:function(){return scope_2.varKinds}}),exports.operators={GT:new code_1._Code(">"),GTE:new code_1._Code(">="),LT:new code_1._Code("<"),LTE:new code_1. _Code("<="),EQ:new code_1._Code("==="),NEQ:new code_1._Code("!=="),NOT:new code_1._Code("!"),OR:new code_1._Code("||"),AND:new code_1._Code("&&"),ADD:new code_1._Code("+")};class Node2{optimizeNodes(){return this}optimizeNames(_names,_constants){return this}}class Def extends Node2{constructor(varKind,name,rhs){super(),this.varKind=varKind,this.name=name,this.rhs=rhs}render({es5,_n}){const varKind=es5?scope_1.varKinds.var:this.varKind,rhs=this.rhs===void 0?"":` = ${this.rhs}`;return`${varKind} ${this. name}${rhs};`+_n}optimizeNames(names2,constants2){if(names2[this.name.str])return this.rhs&&(this.rhs=optimizeExpr(this.rhs,names2,constants2)),this}get names(){return this.rhs instanceof code_1._CodeOrName?this.rhs.names:{}}}class Assign extends Node2{constructor(lhs,rhs,sideEffects){super(),this.lhs=lhs,this.rhs=rhs,this.sideEffects=sideEffects}render({_n}){return`${this.lhs} = ${this.rhs};`+_n}optimizeNames(names2,constants2){if(!(this.lhs instanceof code_1.Name&&!names2[this.lhs.str]&&!this. sideEffects))return this.rhs=optimizeExpr(this.rhs,names2,constants2),this}get names(){const names2=this.lhs instanceof code_1.Name?{}:{...this.lhs.names};return addExprNames(names2,this.rhs)}}class AssignOp extends Assign{constructor(lhs,op2,rhs,sideEffects){super(lhs,rhs,sideEffects),this.op=op2}render({_n}){return`${this.lhs} ${this.op}= ${this.rhs};`+_n}}class Label2 extends Node2{constructor(label){super(),this.label=label,this.names={}}render({_n}){return`${this.label}:`+_n}}class Break extends Node2{constructor(label){ super(),this.label=label,this.names={}}render({_n}){return`break${this.label?` ${this.label}`:""};`+_n}}class Throw extends Node2{constructor(error2){super(),this.error=error2}render({_n}){return`throw ${this.error};`+_n}get names(){return this.error.names}}class AnyCode extends Node2{constructor(code2){super(),this.code=code2}render({_n}){return`${this.code};`+_n}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(names2,constants2){return this.code=optimizeExpr(this.code,names2,constants2), this}get names(){return this.code instanceof code_1._CodeOrName?this.code.names:{}}}class ParentNode extends Node2{constructor(nodes2=[]){super(),this.nodes=nodes2}render(opts){return this.nodes.reduce((code2,n)=>code2+n.render(opts),"")}optimizeNodes(){const{nodes:nodes2}=this;let i=nodes2.length;for(;i--;){const n=nodes2[i].optimizeNodes();Array.isArray(n)?nodes2.splice(i,1,...n):n?nodes2[i]=n:nodes2.splice(i,1)}return nodes2.length>0?this:void 0}optimizeNames(names2,constants2){const{nodes:nodes2}=this; let i=nodes2.length;for(;i--;){const n=nodes2[i];n.optimizeNames(names2,constants2)||(subtractNames(names2,n.names),nodes2.splice(i,1))}return nodes2.length>0?this:void 0}get names(){return this.nodes.reduce((names2,n)=>addNames(names2,n.names),{})}}class BlockNode extends ParentNode{render(opts){return"{"+opts._n+super.render(opts)+"}"+opts._n}}class Root2 extends ParentNode{}class Else extends BlockNode{}Else.kind="else";class If extends BlockNode{constructor(condition,nodes2){super(nodes2),this. condition=condition}render(opts){let code2=`if(${this.condition})`+super.render(opts);return this.else&&(code2+="else "+this.else.render(opts)),code2}optimizeNodes(){super.optimizeNodes();const cond=this.condition;if(cond===!0)return this.nodes;let e=this.else;if(e){const ns=e.optimizeNodes();e=this.else=Array.isArray(ns)?new Else(ns):ns}if(e)return cond===!1?e instanceof If?e:e.nodes:this.nodes.length?this:new If(not2(cond),e instanceof If?[e]:e.nodes);if(!(cond===!1||!this.nodes.length))return this}optimizeNames(names2,constants2){ var _a2;if(this.else=(_a2=this.else)===null||_a2===void 0?void 0:_a2.optimizeNames(names2,constants2),!!(super.optimizeNames(names2,constants2)||this.else))return this.condition=optimizeExpr(this.condition,names2,constants2),this}get names(){const names2=super.names;return addExprNames(names2,this.condition),this.else&&addNames(names2,this.else.names),names2}}If.kind="if";class For extends BlockNode{}For.kind="for";class ForLoop extends For{constructor(iteration){super(),this.iteration=iteration}render(opts){ return`for(${this.iteration})`+super.render(opts)}optimizeNames(names2,constants2){if(super.optimizeNames(names2,constants2))return this.iteration=optimizeExpr(this.iteration,names2,constants2),this}get names(){return addNames(super.names,this.iteration.names)}}class ForRange extends For{constructor(varKind,name,from,to){super(),this.varKind=varKind,this.name=name,this.from=from,this.to=to}render(opts){const varKind=opts.es5?scope_1.varKinds.var:this.varKind,{name,from,to}=this;return`for(${varKind}\ ${name}=${from}; ${name}<${to}; ${name}++)`+super.render(opts)}get names(){const names2=addExprNames(super.names,this.from);return addExprNames(names2,this.to)}}class ForIter extends For{constructor(loop2,varKind,name,iterable){super(),this.loop=loop2,this.varKind=varKind,this.name=name,this.iterable=iterable}render(opts){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(opts)}optimizeNames(names2,constants2){if(super.optimizeNames(names2,constants2))return this. iterable=optimizeExpr(this.iterable,names2,constants2),this}get names(){return addNames(super.names,this.iterable.names)}}class Func extends BlockNode{constructor(name,args,async){super(),this.name=name,this.args=args,this.async=async}render(opts){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(opts)}}Func.kind="func";class Return extends ParentNode{render(opts){return"return "+super.render(opts)}}Return.kind="return";class Try extends BlockNode{render(opts){let code2="\ try"+super.render(opts);return this.catch&&(code2+=this.catch.render(opts)),this.finally&&(code2+=this.finally.render(opts)),code2}optimizeNodes(){var _a2,_b;return super.optimizeNodes(),(_a2=this.catch)===null||_a2===void 0||_a2.optimizeNodes(),(_b=this.finally)===null||_b===void 0||_b.optimizeNodes(),this}optimizeNames(names2,constants2){var _a2,_b;return super.optimizeNames(names2,constants2),(_a2=this.catch)===null||_a2===void 0||_a2.optimizeNames(names2,constants2),(_b=this.finally)===null|| _b===void 0||_b.optimizeNames(names2,constants2),this}get names(){const names2=super.names;return this.catch&&addNames(names2,this.catch.names),this.finally&&addNames(names2,this.finally.names),names2}}class Catch extends BlockNode{constructor(error2){super(),this.error=error2}render(opts){return`catch(${this.error})`+super.render(opts)}}Catch.kind="catch";class Finally extends BlockNode{render(opts){return"finally"+super.render(opts)}}Finally.kind="finally";class CodeGen{constructor(extScope,opts={}){ this._values={},this._blockStarts=[],this._constants={},this.opts={...opts,_n:opts.lines?` `:""},this._extScope=extScope,this._scope=new scope_1.Scope({parent:extScope}),this._nodes=[new Root2]}toString(){return this._root.render(this.opts)}name(prefix){return this._scope.name(prefix)}scopeName(prefix){return this._extScope.name(prefix)}scopeValue(prefixOrName,value){const name=this._extScope.value(prefixOrName,value);return(this._values[name.prefix]||(this._values[name.prefix]=new Set)).add(name),name}getScopeValue(prefix,keyOrRef){return this._extScope.getValue(prefix,keyOrRef)}scopeRefs(scopeName){ return this._extScope.scopeRefs(scopeName,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(varKind,nameOrPrefix,rhs,constant){const name=this._scope.toName(nameOrPrefix);return rhs!==void 0&&constant&&(this._constants[name.str]=rhs),this._leafNode(new Def(varKind,name,rhs)),name}const(nameOrPrefix,rhs,_constant){return this._def(scope_1.varKinds.const,nameOrPrefix,rhs,_constant)}let(nameOrPrefix,rhs,_constant){return this._def(scope_1.varKinds.let,nameOrPrefix,rhs,_constant)}var(nameOrPrefix,rhs,_constant){ return this._def(scope_1.varKinds.var,nameOrPrefix,rhs,_constant)}assign(lhs,rhs,sideEffects){return this._leafNode(new Assign(lhs,rhs,sideEffects))}add(lhs,rhs){return this._leafNode(new AssignOp(lhs,exports.operators.ADD,rhs))}code(c2){return typeof c2=="function"?c2():c2!==code_1.nil&&this._leafNode(new AnyCode(c2)),this}object(...keyValues){const code2=["{"];for(const[key2,value]of keyValues)code2.length>1&&code2.push(","),code2.push(key2),(key2!==value||this.opts.es5)&&(code2.push(":"),(0,code_1. addCodeArg)(code2,value));return code2.push("}"),new code_1._Code(code2)}if(condition,thenBody,elseBody){if(this._blockNode(new If(condition)),thenBody&&elseBody)this.code(thenBody).else().code(elseBody).endIf();else if(thenBody)this.code(thenBody).endIf();else if(elseBody)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(condition){return this._elseNode(new If(condition))}else(){return this._elseNode(new Else)}endIf(){return this._endBlockNode(If,Else)}_for(node2,forBody){ return this._blockNode(node2),forBody&&this.code(forBody).endFor(),this}for(iteration,forBody){return this._for(new ForLoop(iteration),forBody)}forRange(nameOrPrefix,from,to,forBody,varKind=this.opts.es5?scope_1.varKinds.var:scope_1.varKinds.let){const name=this._scope.toName(nameOrPrefix);return this._for(new ForRange(varKind,name,from,to),()=>forBody(name))}forOf(nameOrPrefix,iterable,forBody,varKind=scope_1.varKinds.const){const name=this._scope.toName(nameOrPrefix);if(this.opts.es5){const arr=iterable instanceof code_1.Name?iterable:this.var("_arr",iterable);return this.forRange("_i",0,(0,code_1._)`${arr}.length`,i=>{this.var(name,(0,code_1._)`${arr}[${i}]`),forBody(name)})}return this._for(new ForIter("of",varKind,name,iterable),()=>forBody(name))}forIn(nameOrPrefix,obj,forBody,varKind=this.opts.es5?scope_1.varKinds.var:scope_1.varKinds.const){if(this.opts.ownProperties)return this.forOf(nameOrPrefix,(0,code_1._)`Object.keys(${obj})`,forBody);const name=this._scope.toName(nameOrPrefix);return this._for( new ForIter("in",varKind,name,obj),()=>forBody(name))}endFor(){return this._endBlockNode(For)}label(label){return this._leafNode(new Label2(label))}break(label){return this._leafNode(new Break(label))}return(value){const node2=new Return;if(this._blockNode(node2),this.code(value),node2.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Return)}try(tryBody,catchCode,finallyCode){if(!catchCode&&!finallyCode)throw new Error('CodeGen: "try" without "\ catch" and "finally"');const node2=new Try;if(this._blockNode(node2),this.code(tryBody),catchCode){const error2=this.name("e");this._currNode=node2.catch=new Catch(error2),catchCode(error2)}return finallyCode&&(this._currNode=node2.finally=new Finally,this.code(finallyCode)),this._endBlockNode(Catch,Finally)}throw(error2){return this._leafNode(new Throw(error2))}block(body2,nodeCount){return this._blockStarts.push(this._nodes.length),body2&&this.code(body2).endBlock(nodeCount),this}endBlock(nodeCount){ const len=this._blockStarts.pop();if(len===void 0)throw new Error("CodeGen: not in self-balancing block");const toClose=this._nodes.length-len;if(toClose<0||nodeCount!==void 0&&toClose!==nodeCount)throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);return this._nodes.length=len,this}func(name,args=code_1.nil,async,funcBody){return this._blockNode(new Func(name,args,async)),funcBody&&this.code(funcBody).endFunc(),this}endFunc(){return this._endBlockNode(Func)}optimize(n=1){ for(;n-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(node2){return this._currNode.nodes.push(node2),this}_blockNode(node2){this._currNode.nodes.push(node2),this._nodes.push(node2)}_endBlockNode(N1,N2){const n=this._currNode;if(n instanceof N1||N2&&n instanceof N2)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${N2?`${N1.kind}/${N2.kind}`:N1.kind}"`)}_elseNode(node2){const n=this._currNode;if(!(n instanceof If))throw new Error( 'CodeGen: "else" without "if"');return this._currNode=n.else=node2,this}get _root(){return this._nodes[0]}get _currNode(){const ns=this._nodes;return ns[ns.length-1]}set _currNode(node2){const ns=this._nodes;ns[ns.length-1]=node2}}exports.CodeGen=CodeGen;function addNames(names2,from){for(const n in from)names2[n]=(names2[n]||0)+(from[n]||0);return names2}function addExprNames(names2,from){return from instanceof code_1._CodeOrName?addNames(names2,from.names):names2}function optimizeExpr(expr,names2,constants2){ if(expr instanceof code_1.Name)return replaceName(expr);if(!canOptimize(expr))return expr;return new code_1._Code(expr._items.reduce((items2,c2)=>(c2 instanceof code_1.Name&&(c2=replaceName(c2)),c2 instanceof code_1._Code?items2.push(...c2._items):items2.push(c2),items2),[]));function replaceName(n){const c2=constants2[n.str];return c2===void 0||names2[n.str]!==1?n:(delete names2[n.str],c2)}function canOptimize(e){return e instanceof code_1._Code&&e._items.some(c2=>c2 instanceof code_1.Name&&names2[c2. str]===1&&constants2[c2.str]!==void 0)}}function subtractNames(names2,from){for(const n in from)names2[n]=(names2[n]||0)-(from[n]||0)}function not2(x){return typeof x=="boolean"||typeof x=="number"||x===null?!x:(0,code_1._)`!${par(x)}`}exports.not=not2;const andCode=mappend(exports.operators.AND);function and(...args){return args.reduce(andCode)}exports.and=and;const orCode=mappend(exports.operators.OR);function or(...args){return args.reduce(orCode)}exports.or=or;function mappend(op2){return(x,y)=>x=== code_1.nil?y:y===code_1.nil?x:(0,code_1._)`${par(x)} ${op2} ${par(y)}`}function par(x){return x instanceof code_1.Name?x:(0,code_1._)`(${x})`}}(codegen$1)),codegen$1}var util$1={},hasRequiredUtil$1;function requireUtil$1(){if(hasRequiredUtil$1)return util$1;hasRequiredUtil$1=1,Object.defineProperty(util$1,"__esModule",{value:!0}),util$1.checkStrictMode=util$1.getErrorPath=util$1.Type=util$1.useFunc=util$1.setEvaluated=util$1.evaluatedPropsToName=util$1.mergeEvaluated=util$1.eachItem=util$1.unescapeJsonPointer= util$1.escapeJsonPointer=util$1.escapeFragment=util$1.unescapeFragment=util$1.schemaRefOrVal=util$1.schemaHasRulesButRef=util$1.schemaHasRules=util$1.checkUnknownRules=util$1.alwaysValidSchema=util$1.toHash=void 0;const codegen_1=requireCodegen$1(),code_1=requireCode$3();function toHash(arr){const hash2={};for(const item of arr)hash2[item]=!0;return hash2}util$1.toHash=toHash;function alwaysValidSchema(it,schema){return typeof schema=="boolean"?schema:Object.keys(schema).length===0?!0:(checkUnknownRules( it,schema),!schemaHasRules(schema,it.self.RULES.all))}util$1.alwaysValidSchema=alwaysValidSchema;function checkUnknownRules(it,schema=it.schema){const{opts,self:self2}=it;if(!opts.strictSchema||typeof schema=="boolean")return;const rules2=self2.RULES.keywords;for(const key2 in schema)rules2[key2]||checkStrictMode(it,`unknown keyword: "${key2}"`)}util$1.checkUnknownRules=checkUnknownRules;function schemaHasRules(schema,rules2){if(typeof schema=="boolean")return!schema;for(const key2 in schema)if(rules2[key2]) return!0;return!1}util$1.schemaHasRules=schemaHasRules;function schemaHasRulesButRef(schema,RULES){if(typeof schema=="boolean")return!schema;for(const key2 in schema)if(key2!=="$ref"&&RULES.all[key2])return!0;return!1}util$1.schemaHasRulesButRef=schemaHasRulesButRef;function schemaRefOrVal({topSchemaRef,schemaPath},schema,keyword2,$data){if(!$data){if(typeof schema=="number"||typeof schema=="boolean")return schema;if(typeof schema=="string")return(0,codegen_1._)`${schema}`}return(0,codegen_1._)`${topSchemaRef}${schemaPath}${(0,codegen_1. getProperty)(keyword2)}`}util$1.schemaRefOrVal=schemaRefOrVal;function unescapeFragment(str){return unescapeJsonPointer(decodeURIComponent(str))}util$1.unescapeFragment=unescapeFragment;function escapeFragment(str){return encodeURIComponent(escapeJsonPointer(str))}util$1.escapeFragment=escapeFragment;function escapeJsonPointer(str){return typeof str=="number"?`${str}`:str.replace(/~/g,"~0").replace(/\//g,"~1")}util$1.escapeJsonPointer=escapeJsonPointer;function unescapeJsonPointer(str){return str. replace(/~1/g,"/").replace(/~0/g,"~")}util$1.unescapeJsonPointer=unescapeJsonPointer;function eachItem(xs,f){if(Array.isArray(xs))for(const x of xs)f(x);else f(xs)}util$1.eachItem=eachItem;function makeMergeEvaluated({mergeNames,mergeToName,mergeValues:mergeValues2,resultToName}){return(gen,from,to,toName)=>{const res=to===void 0?from:to instanceof codegen_1.Name?(from instanceof codegen_1.Name?mergeNames(gen,from,to):mergeToName(gen,from,to),to):from instanceof codegen_1.Name?(mergeToName(gen,to, from),from):mergeValues2(from,to);return toName===codegen_1.Name&&!(res instanceof codegen_1.Name)?resultToName(gen,res):res}}util$1.mergeEvaluated={props:makeMergeEvaluated({mergeNames:(gen,from,to)=>gen.if((0,codegen_1._)`${to} !== true && ${from} !== undefined`,()=>{gen.if((0,codegen_1._)`${from} === true`,()=>gen.assign(to,!0),()=>gen.assign(to,(0,codegen_1._)`${to} || {}`).code((0,codegen_1._)`Object.assign(${to}, ${from})`))}),mergeToName:(gen,from,to)=>gen.if((0,codegen_1._)`${to} !== true`, ()=>{from===!0?gen.assign(to,!0):(gen.assign(to,(0,codegen_1._)`${to} || {}`),setEvaluated(gen,to,from))}),mergeValues:(from,to)=>from===!0?!0:{...from,...to},resultToName:evaluatedPropsToName}),items:makeMergeEvaluated({mergeNames:(gen,from,to)=>gen.if((0,codegen_1._)`${to} !== true && ${from} !== undefined`,()=>gen.assign(to,(0,codegen_1._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),mergeToName:(gen,from,to)=>gen.if((0,codegen_1._)`${to} !== true`,()=>gen.assign(to,from===!0? !0:(0,codegen_1._)`${to} > ${from} ? ${to} : ${from}`)),mergeValues:(from,to)=>from===!0?!0:Math.max(from,to),resultToName:(gen,items2)=>gen.var("items",items2)})};function evaluatedPropsToName(gen,ps){if(ps===!0)return gen.var("props",!0);const props=gen.var("props",(0,codegen_1._)`{}`);return ps!==void 0&&setEvaluated(gen,props,ps),props}util$1.evaluatedPropsToName=evaluatedPropsToName;function setEvaluated(gen,props,ps){Object.keys(ps).forEach(p2=>gen.assign((0,codegen_1._)`${props}${(0,codegen_1. getProperty)(p2)}`,!0))}util$1.setEvaluated=setEvaluated;const snippets={};function useFunc(gen,f){return gen.scopeValue("func",{ref:f,code:snippets[f.code]||(snippets[f.code]=new code_1._Code(f.code))})}util$1.useFunc=useFunc;var Type;(function(Type2){Type2[Type2.Num=0]="Num",Type2[Type2.Str=1]="Str"})(Type||(util$1.Type=Type={}));function getErrorPath(dataProp,dataPropType,jsPropertySyntax){if(dataProp instanceof codegen_1.Name){const isNumber2=dataPropType===Type.Num;return jsPropertySyntax?isNumber2? (0,codegen_1._)`"[" + ${dataProp} + "]"`:(0,codegen_1._)`"['" + ${dataProp} + "']"`:isNumber2?(0,codegen_1._)`"/" + ${dataProp}`:(0,codegen_1._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return jsPropertySyntax?(0,codegen_1.getProperty)(dataProp).toString():"/"+escapeJsonPointer(dataProp)}util$1.getErrorPath=getErrorPath;function checkStrictMode(it,msg,mode=it.opts.strictSchema){if(mode){if(msg=`strict mode: ${msg}`,mode===!0)throw new Error(msg);it.self.logger.warn(msg)}}return util$1. checkStrictMode=checkStrictMode,util$1}var names$1={},hasRequiredNames$1;function requireNames$1(){if(hasRequiredNames$1)return names$1;hasRequiredNames$1=1,Object.defineProperty(names$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),names2={data:new codegen_1.Name("data"),valCxt:new codegen_1.Name("valCxt"),instancePath:new codegen_1.Name("instancePath"),parentData:new codegen_1.Name("parentData"),parentDataProperty:new codegen_1.Name("parentDataProperty"),rootData:new codegen_1.Name( "rootData"),dynamicAnchors:new codegen_1.Name("dynamicAnchors"),vErrors:new codegen_1.Name("vErrors"),errors:new codegen_1.Name("errors"),this:new codegen_1.Name("this"),self:new codegen_1.Name("self"),scope:new codegen_1.Name("scope"),json:new codegen_1.Name("json"),jsonPos:new codegen_1.Name("jsonPos"),jsonLen:new codegen_1.Name("jsonLen"),jsonPart:new codegen_1.Name("jsonPart")};return names$1.default=names2,names$1}var hasRequiredErrors$1;function requireErrors$1(){return hasRequiredErrors$1|| (hasRequiredErrors$1=1,function(exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.extendErrors=exports.resetErrorsCount=exports.reportExtraError=exports.reportError=exports.keyword$DataError=exports.keywordError=void 0;const codegen_1=requireCodegen$1(),util_1=requireUtil$1(),names_1=requireNames$1();exports.keywordError={message:({keyword:keyword2})=>(0,codegen_1.str)`must pass "${keyword2}" keyword validation`},exports.keyword$DataError={message:({keyword:keyword2,schemaType})=>schemaType? (0,codegen_1.str)`"${keyword2}" keyword must be ${schemaType} ($data)`:(0,codegen_1.str)`"${keyword2}" keyword is invalid ($data)`};function reportError(cxt,error2=exports.keywordError,errorPaths,overrideAllErrors){const{it}=cxt,{gen,compositeRule,allErrors}=it,errObj=errorObjectCode(cxt,error2,errorPaths);overrideAllErrors??(compositeRule||allErrors)?addError(gen,errObj):returnErrors(it,(0,codegen_1._)`[${errObj}]`)}exports.reportError=reportError;function reportExtraError(cxt,error2=exports.keywordError,errorPaths){ const{it}=cxt,{gen,compositeRule,allErrors}=it,errObj=errorObjectCode(cxt,error2,errorPaths);addError(gen,errObj),compositeRule||allErrors||returnErrors(it,names_1.default.vErrors)}exports.reportExtraError=reportExtraError;function resetErrorsCount(gen,errsCount){gen.assign(names_1.default.errors,errsCount),gen.if((0,codegen_1._)`${names_1.default.vErrors} !== null`,()=>gen.if(errsCount,()=>gen.assign((0,codegen_1._)`${names_1.default.vErrors}.length`,errsCount),()=>gen.assign(names_1.default.vErrors, null)))}exports.resetErrorsCount=resetErrorsCount;function extendErrors({gen,keyword:keyword2,schemaValue,data,errsCount,it}){if(errsCount===void 0)throw new Error("ajv implementation error");const err=gen.name("err");gen.forRange("i",errsCount,names_1.default.errors,i=>{gen.const(err,(0,codegen_1._)`${names_1.default.vErrors}[${i}]`),gen.if((0,codegen_1._)`${err}.instancePath === undefined`,()=>gen.assign((0,codegen_1._)`${err}.instancePath`,(0,codegen_1.strConcat)(names_1.default.instancePath, it.errorPath))),gen.assign((0,codegen_1._)`${err}.schemaPath`,(0,codegen_1.str)`${it.errSchemaPath}/${keyword2}`),it.opts.verbose&&(gen.assign((0,codegen_1._)`${err}.schema`,schemaValue),gen.assign((0,codegen_1._)`${err}.data`,data))})}exports.extendErrors=extendErrors;function addError(gen,errObj){const err=gen.const("err",errObj);gen.if((0,codegen_1._)`${names_1.default.vErrors} === null`,()=>gen.assign(names_1.default.vErrors,(0,codegen_1._)`[${err}]`),(0,codegen_1._)`${names_1.default.vErrors}.push(${err})`), gen.code((0,codegen_1._)`${names_1.default.errors}++`)}function returnErrors(it,errs){const{gen,validateName,schemaEnv}=it;schemaEnv.$async?gen.throw((0,codegen_1._)`new ${it.ValidationError}(${errs})`):(gen.assign((0,codegen_1._)`${validateName}.errors`,errs),gen.return(!1))}const E={keyword:new codegen_1.Name("keyword"),schemaPath:new codegen_1.Name("schemaPath"),params:new codegen_1.Name("params"),propertyName:new codegen_1.Name("propertyName"),message:new codegen_1.Name("message"),schema:new codegen_1. Name("schema"),parentSchema:new codegen_1.Name("parentSchema")};function errorObjectCode(cxt,error2,errorPaths){const{createErrors}=cxt.it;return createErrors===!1?(0,codegen_1._)`{}`:errorObject(cxt,error2,errorPaths)}function errorObject(cxt,error2,errorPaths={}){const{gen,it}=cxt,keyValues=[errorInstancePath(it,errorPaths),errorSchemaPath(cxt,errorPaths)];return extraErrorProps(cxt,error2,keyValues),gen.object(...keyValues)}function errorInstancePath({errorPath},{instancePath}){const instPath=instancePath? (0,codegen_1.str)`${errorPath}${(0,util_1.getErrorPath)(instancePath,util_1.Type.Str)}`:errorPath;return[names_1.default.instancePath,(0,codegen_1.strConcat)(names_1.default.instancePath,instPath)]}function errorSchemaPath({keyword:keyword2,it:{errSchemaPath}},{schemaPath,parentSchema}){let schPath=parentSchema?errSchemaPath:(0,codegen_1.str)`${errSchemaPath}/${keyword2}`;return schemaPath&&(schPath=(0,codegen_1.str)`${schPath}${(0,util_1.getErrorPath)(schemaPath,util_1.Type.Str)}`),[E.schemaPath, schPath]}function extraErrorProps(cxt,{params,message},keyValues){const{keyword:keyword2,data,schemaValue,it}=cxt,{opts,propertyName,topSchemaRef,schemaPath}=it;keyValues.push([E.keyword,keyword2],[E.params,typeof params=="function"?params(cxt):params||(0,codegen_1._)`{}`]),opts.messages&&keyValues.push([E.message,typeof message=="function"?message(cxt):message]),opts.verbose&&keyValues.push([E.schema,schemaValue],[E.parentSchema,(0,codegen_1._)`${topSchemaRef}${schemaPath}`],[names_1.default.data, data]),propertyName&&keyValues.push([E.propertyName,propertyName])}}(errors$1)),errors$1}var hasRequiredBoolSchema$1;function requireBoolSchema$1(){if(hasRequiredBoolSchema$1)return boolSchema$1;hasRequiredBoolSchema$1=1,Object.defineProperty(boolSchema$1,"__esModule",{value:!0}),boolSchema$1.boolOrEmptySchema=boolSchema$1.topBoolOrEmptySchema=void 0;const errors_1=requireErrors$1(),codegen_1=requireCodegen$1(),names_1=requireNames$1(),boolError={message:"boolean schema is false"};function topBoolOrEmptySchema(it){ const{gen,schema,validateName}=it;schema===!1?falseSchemaError(it,!1):typeof schema=="object"&&schema.$async===!0?gen.return(names_1.default.data):(gen.assign((0,codegen_1._)`${validateName}.errors`,null),gen.return(!0))}boolSchema$1.topBoolOrEmptySchema=topBoolOrEmptySchema;function boolOrEmptySchema(it,valid2){const{gen,schema}=it;schema===!1?(gen.var(valid2,!1),falseSchemaError(it)):gen.var(valid2,!0)}boolSchema$1.boolOrEmptySchema=boolOrEmptySchema;function falseSchemaError(it,overrideAllErrors){ const{gen,data}=it,cxt={gen,keyword:"false schema",data,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it};(0,errors_1.reportError)(cxt,boolError,void 0,overrideAllErrors)}return boolSchema$1}var dataType$1={},rules$1={},hasRequiredRules$1;function requireRules$1(){if(hasRequiredRules$1)return rules$1;hasRequiredRules$1=1,Object.defineProperty(rules$1,"__esModule",{value:!0}),rules$1.getRules=rules$1.isJSONType=void 0;const _jsonTypes=["string","number","integer","boolean","null","object","arr\ ay"],jsonTypes=new Set(_jsonTypes);function isJSONType(x){return typeof x=="string"&&jsonTypes.has(x)}rules$1.isJSONType=isJSONType;function getRules(){const groups={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...groups,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},groups.number,groups.string,groups.array,groups.object],post:{rules:[]},all:{},keywords:{}}}return rules$1.getRules=getRules,rules$1}var applicability$1={}, hasRequiredApplicability$1;function requireApplicability$1(){if(hasRequiredApplicability$1)return applicability$1;hasRequiredApplicability$1=1,Object.defineProperty(applicability$1,"__esModule",{value:!0}),applicability$1.shouldUseRule=applicability$1.shouldUseGroup=applicability$1.schemaHasRulesForType=void 0;function schemaHasRulesForType({schema,self:self2},type2){const group=self2.RULES.types[type2];return group&&group!==!0&&shouldUseGroup(schema,group)}applicability$1.schemaHasRulesForType= schemaHasRulesForType;function shouldUseGroup(schema,group){return group.rules.some(rule=>shouldUseRule(schema,rule))}applicability$1.shouldUseGroup=shouldUseGroup;function shouldUseRule(schema,rule){var _a2;return schema[rule.keyword]!==void 0||((_a2=rule.definition.implements)===null||_a2===void 0?void 0:_a2.some(kwd=>schema[kwd]!==void 0))}return applicability$1.shouldUseRule=shouldUseRule,applicability$1}var hasRequiredDataType$1;function requireDataType$1(){if(hasRequiredDataType$1)return dataType$1; hasRequiredDataType$1=1,Object.defineProperty(dataType$1,"__esModule",{value:!0}),dataType$1.reportTypeError=dataType$1.checkDataTypes=dataType$1.checkDataType=dataType$1.coerceAndCheckDataType=dataType$1.getJSONTypes=dataType$1.getSchemaTypes=dataType$1.DataType=void 0;const rules_1=requireRules$1(),applicability_1=requireApplicability$1(),errors_1=requireErrors$1(),codegen_1=requireCodegen$1(),util_1=requireUtil$1();var DataType;(function(DataType2){DataType2[DataType2.Correct=0]="Correct",DataType2[DataType2. Wrong=1]="Wrong"})(DataType||(dataType$1.DataType=DataType={}));function getSchemaTypes(schema){const types2=getJSONTypes(schema.type);if(types2.includes("null")){if(schema.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!types2.length&&schema.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');schema.nullable===!0&&types2.push("null")}return types2}dataType$1.getSchemaTypes=getSchemaTypes;function getJSONTypes(ts){const types2=Array.isArray( ts)?ts:ts?[ts]:[];if(types2.every(rules_1.isJSONType))return types2;throw new Error("type must be JSONType or JSONType[]: "+types2.join(","))}dataType$1.getJSONTypes=getJSONTypes;function coerceAndCheckDataType(it,types2){const{gen,data,opts}=it,coerceTo=coerceToTypes(types2,opts.coerceTypes),checkTypes=types2.length>0&&!(coerceTo.length===0&&types2.length===1&&(0,applicability_1.schemaHasRulesForType)(it,types2[0]));if(checkTypes){const wrongType=checkDataTypes(types2,data,opts.strictNumbers,DataType. Wrong);gen.if(wrongType,()=>{coerceTo.length?coerceData(it,types2,coerceTo):reportTypeError(it)})}return checkTypes}dataType$1.coerceAndCheckDataType=coerceAndCheckDataType;const COERCIBLE=new Set(["string","number","integer","boolean","null"]);function coerceToTypes(types2,coerceTypes){return coerceTypes?types2.filter(t=>COERCIBLE.has(t)||coerceTypes==="array"&&t==="array"):[]}function coerceData(it,types2,coerceTo){const{gen,data,opts}=it,dataType2=gen.let("dataType",(0,codegen_1._)`typeof ${data}`), coerced=gen.let("coerced",(0,codegen_1._)`undefined`);opts.coerceTypes==="array"&&gen.if((0,codegen_1._)`${dataType2} == 'object' && Array.isArray(${data}) && ${data}.length == 1`,()=>gen.assign(data,(0,codegen_1._)`${data}[0]`).assign(dataType2,(0,codegen_1._)`typeof ${data}`).if(checkDataTypes(types2,data,opts.strictNumbers),()=>gen.assign(coerced,data))),gen.if((0,codegen_1._)`${coerced} !== undefined`);for(const t of coerceTo)(COERCIBLE.has(t)||t==="array"&&opts.coerceTypes==="array")&&coerceSpecificType( t);gen.else(),reportTypeError(it),gen.endIf(),gen.if((0,codegen_1._)`${coerced} !== undefined`,()=>{gen.assign(data,coerced),assignParentData(it,coerced)});function coerceSpecificType(t){switch(t){case"string":gen.elseIf((0,codegen_1._)`${dataType2} == "number" || ${dataType2} == "boolean"`).assign(coerced,(0,codegen_1._)`"" + ${data}`).elseIf((0,codegen_1._)`${data} === null`).assign(coerced,(0,codegen_1._)`""`);return;case"number":gen.elseIf((0,codegen_1._)`${dataType2} == "boolean" || ${data} === null || (${dataType2} == "string" && ${data} && ${data} == +${data})`).assign(coerced,(0,codegen_1._)`+${data}`);return;case"integer":gen.elseIf((0,codegen_1._)`${dataType2} === "boolean" || ${data} === null || (${dataType2} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced,(0,codegen_1._)`+${data}`);return;case"boolean":gen.elseIf((0,codegen_1._)`${data} === "false" || ${data} === 0 || ${data} === null`).assign(coerced,!1).elseIf((0,codegen_1._)`${data} === "true" || ${data} === 1`).assign(coerced,!0);return;case"null":gen.elseIf((0,codegen_1._)`${data} === "" || ${data} === 0 || ${data} === false`),gen.assign(coerced,null);return;case"array":gen.elseIf( (0,codegen_1._)`${dataType2} === "string" || ${dataType2} === "number" || ${dataType2} === "boolean" || ${data} === null`).assign(coerced,(0,codegen_1._)`[${data}]`)}}}function assignParentData({gen,parentData,parentDataProperty},expr){gen.if((0,codegen_1._)`${parentData} !== undefined`,()=>gen.assign((0,codegen_1._)`${parentData}[${parentDataProperty}]`,expr))}function checkDataType(dataType2,data,strictNums,correct=DataType.Correct){const EQ=correct===DataType.Correct?codegen_1.operators.EQ:codegen_1.operators.NEQ;let cond;switch(dataType2){case"nul\ l":return(0,codegen_1._)`${data} ${EQ} null`;case"array":cond=(0,codegen_1._)`Array.isArray(${data})`;break;case"object":cond=(0,codegen_1._)`${data} && typeof ${data} == "object" && !Array.isArray(${data})`;break;case"integer":cond=numCond((0,codegen_1._)`!(${data} % 1) && !isNaN(${data})`);break;case"number":cond=numCond();break;default:return(0,codegen_1._)`typeof ${data} ${EQ} ${dataType2}`}return correct===DataType.Correct?cond:(0,codegen_1.not)(cond);function numCond(_cond=codegen_1.nil){return(0,codegen_1. and)((0,codegen_1._)`typeof ${data} == "number"`,_cond,strictNums?(0,codegen_1._)`isFinite(${data})`:codegen_1.nil)}}dataType$1.checkDataType=checkDataType;function checkDataTypes(dataTypes,data,strictNums,correct){if(dataTypes.length===1)return checkDataType(dataTypes[0],data,strictNums,correct);let cond;const types2=(0,util_1.toHash)(dataTypes);if(types2.array&&types2.object){const notObj=(0,codegen_1._)`typeof ${data} != "object"`;cond=types2.null?notObj:(0,codegen_1._)`!${data} || ${notObj}`, delete types2.null,delete types2.array,delete types2.object}else cond=codegen_1.nil;types2.number&&delete types2.integer;for(const t in types2)cond=(0,codegen_1.and)(cond,checkDataType(t,data,strictNums,correct));return cond}dataType$1.checkDataTypes=checkDataTypes;const typeError={message:({schema})=>`must be ${schema}`,params:({schema,schemaValue})=>typeof schema=="string"?(0,codegen_1._)`{type: ${schema}}`:(0,codegen_1._)`{type: ${schemaValue}}`};function reportTypeError(it){const cxt=getTypeErrorContext( it);(0,errors_1.reportError)(cxt,typeError)}dataType$1.reportTypeError=reportTypeError;function getTypeErrorContext(it){const{gen,data,schema}=it,schemaCode=(0,util_1.schemaRefOrVal)(it,schema,"type");return{gen,keyword:"type",data,schema:schema.type,schemaCode,schemaValue:schemaCode,parentSchema:schema,params:{},it}}return dataType$1}var defaults$1={},hasRequiredDefaults$1;function requireDefaults$1(){if(hasRequiredDefaults$1)return defaults$1;hasRequiredDefaults$1=1,Object.defineProperty(defaults$1, "__esModule",{value:!0}),defaults$1.assignDefaults=void 0;const codegen_1=requireCodegen$1(),util_1=requireUtil$1();function assignDefaults(it,ty){const{properties:properties2,items:items2}=it.schema;if(ty==="object"&&properties2)for(const key2 in properties2)assignDefault(it,key2,properties2[key2].default);else ty==="array"&&Array.isArray(items2)&&items2.forEach((sch,i)=>assignDefault(it,i,sch.default))}defaults$1.assignDefaults=assignDefaults;function assignDefault(it,prop2,defaultValue){const{ gen,compositeRule,data,opts}=it;if(defaultValue===void 0)return;const childData=(0,codegen_1._)`${data}${(0,codegen_1.getProperty)(prop2)}`;if(compositeRule){(0,util_1.checkStrictMode)(it,`default is ignored for: ${childData}`);return}let condition=(0,codegen_1._)`${childData} === undefined`;opts.useDefaults==="empty"&&(condition=(0,codegen_1._)`${condition} || ${childData} === null || ${childData} === ""`),gen.if(condition,(0,codegen_1._)`${childData} = ${(0,codegen_1.stringify)(defaultValue)}`)} return defaults$1}var keyword$1={},code$5={},hasRequiredCode$2;function requireCode$2(){if(hasRequiredCode$2)return code$5;hasRequiredCode$2=1,Object.defineProperty(code$5,"__esModule",{value:!0}),code$5.validateUnion=code$5.validateArray=code$5.usePattern=code$5.callValidateCode=code$5.schemaProperties=code$5.allSchemaProperties=code$5.noPropertyInData=code$5.propertyInData=code$5.isOwnProperty=code$5.hasPropFunc=code$5.reportMissingProp=code$5.checkMissingProp=code$5.checkReportMissingProp=void 0; const codegen_1=requireCodegen$1(),util_1=requireUtil$1(),names_1=requireNames$1(),util_2=requireUtil$1();function checkReportMissingProp(cxt,prop2){const{gen,data,it}=cxt;gen.if(noPropertyInData(gen,data,prop2,it.opts.ownProperties),()=>{cxt.setParams({missingProperty:(0,codegen_1._)`${prop2}`},!0),cxt.error()})}code$5.checkReportMissingProp=checkReportMissingProp;function checkMissingProp({gen,data,it:{opts}},properties2,missing){return(0,codegen_1.or)(...properties2.map(prop2=>(0,codegen_1.and)( noPropertyInData(gen,data,prop2,opts.ownProperties),(0,codegen_1._)`${missing} = ${prop2}`)))}code$5.checkMissingProp=checkMissingProp;function reportMissingProp(cxt,missing){cxt.setParams({missingProperty:missing},!0),cxt.error()}code$5.reportMissingProp=reportMissingProp;function hasPropFunc(gen){return gen.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,codegen_1._)`Object.prototype.hasOwnProperty`})}code$5.hasPropFunc=hasPropFunc;function isOwnProperty(gen,data,property){return(0,codegen_1. _)`${hasPropFunc(gen)}.call(${data}, ${property})`}code$5.isOwnProperty=isOwnProperty;function propertyInData(gen,data,property,ownProperties){const cond=(0,codegen_1._)`${data}${(0,codegen_1.getProperty)(property)} !== undefined`;return ownProperties?(0,codegen_1._)`${cond} && ${isOwnProperty(gen,data,property)}`:cond}code$5.propertyInData=propertyInData;function noPropertyInData(gen,data,property,ownProperties){const cond=(0,codegen_1._)`${data}${(0,codegen_1.getProperty)(property)} === undefined`; return ownProperties?(0,codegen_1.or)(cond,(0,codegen_1.not)(isOwnProperty(gen,data,property))):cond}code$5.noPropertyInData=noPropertyInData;function allSchemaProperties(schemaMap){return schemaMap?Object.keys(schemaMap).filter(p2=>p2!=="__proto__"):[]}code$5.allSchemaProperties=allSchemaProperties;function schemaProperties(it,schemaMap){return allSchemaProperties(schemaMap).filter(p2=>!(0,util_1.alwaysValidSchema)(it,schemaMap[p2]))}code$5.schemaProperties=schemaProperties;function callValidateCode({ schemaCode,data,it:{gen,topSchemaRef,schemaPath,errorPath},it},func,context,passSchema){const dataAndSchema=passSchema?(0,codegen_1._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}`:data,valCxt=[[names_1.default.instancePath,(0,codegen_1.strConcat)(names_1.default.instancePath,errorPath)],[names_1.default.parentData,it.parentData],[names_1.default.parentDataProperty,it.parentDataProperty],[names_1.default.rootData,names_1.default.rootData]];it.opts.dynamicRef&&valCxt.push([names_1.default. dynamicAnchors,names_1.default.dynamicAnchors]);const args=(0,codegen_1._)`${dataAndSchema}, ${gen.object(...valCxt)}`;return context!==codegen_1.nil?(0,codegen_1._)`${func}.call(${context}, ${args})`:(0,codegen_1._)`${func}(${args})`}code$5.callValidateCode=callValidateCode;const newRegExp=(0,codegen_1._)`new RegExp`;function usePattern({gen,it:{opts}},pattern2){const u=opts.unicodeRegExp?"u":"",{regExp}=opts.code,rx=regExp(pattern2,u);return gen.scopeValue("pattern",{key:rx.toString(),ref:rx,code:(0,codegen_1. _)`${regExp.code==="new RegExp"?newRegExp:(0,util_2.useFunc)(gen,regExp)}(${pattern2}, ${u})`})}code$5.usePattern=usePattern;function validateArray(cxt){const{gen,data,keyword:keyword2,it}=cxt,valid2=gen.name("valid");if(it.allErrors){const validArr=gen.let("valid",!0);return validateItems(()=>gen.assign(validArr,!1)),validArr}return gen.var(valid2,!0),validateItems(()=>gen.break()),valid2;function validateItems(notValid){const len=gen.const("len",(0,codegen_1._)`${data}.length`);gen.forRange("i", 0,len,i=>{cxt.subschema({keyword:keyword2,dataProp:i,dataPropType:util_1.Type.Num},valid2),gen.if((0,codegen_1.not)(valid2),notValid)})}}code$5.validateArray=validateArray;function validateUnion(cxt){const{gen,schema,keyword:keyword2,it}=cxt;if(!Array.isArray(schema))throw new Error("ajv implementation error");if(schema.some(sch=>(0,util_1.alwaysValidSchema)(it,sch))&&!it.opts.unevaluated)return;const valid2=gen.let("valid",!1),schValid=gen.name("_valid");gen.block(()=>schema.forEach((_sch,i)=>{ const schCxt=cxt.subschema({keyword:keyword2,schemaProp:i,compositeRule:!0},schValid);gen.assign(valid2,(0,codegen_1._)`${valid2} || ${schValid}`),cxt.mergeValidEvaluated(schCxt,schValid)||gen.if((0,codegen_1.not)(valid2))})),cxt.result(valid2,()=>cxt.reset(),()=>cxt.error(!0))}return code$5.validateUnion=validateUnion,code$5}var hasRequiredKeyword$1;function requireKeyword$1(){if(hasRequiredKeyword$1)return keyword$1;hasRequiredKeyword$1=1,Object.defineProperty(keyword$1,"__esModule",{value:!0}), keyword$1.validateKeywordUsage=keyword$1.validSchemaType=keyword$1.funcKeywordCode=keyword$1.macroKeywordCode=void 0;const codegen_1=requireCodegen$1(),names_1=requireNames$1(),code_1=requireCode$2(),errors_1=requireErrors$1();function macroKeywordCode(cxt,def){const{gen,keyword:keyword2,schema,parentSchema,it}=cxt,macroSchema=def.macro.call(it.self,schema,parentSchema,it),schemaRef=useKeyword(gen,keyword2,macroSchema);it.opts.validateSchema!==!1&&it.self.validateSchema(macroSchema,!0);const valid2=gen. name("valid");cxt.subschema({schema:macroSchema,schemaPath:codegen_1.nil,errSchemaPath:`${it.errSchemaPath}/${keyword2}`,topSchemaRef:schemaRef,compositeRule:!0},valid2),cxt.pass(valid2,()=>cxt.error(!0))}keyword$1.macroKeywordCode=macroKeywordCode;function funcKeywordCode(cxt,def){var _a2;const{gen,keyword:keyword2,schema,parentSchema,$data,it}=cxt;checkAsyncKeyword(it,def);const validate2=!$data&&def.compile?def.compile.call(it.self,schema,parentSchema,it):def.validate,validateRef=useKeyword(gen, keyword2,validate2),valid2=gen.let("valid");cxt.block$data(valid2,validateKeyword),cxt.ok((_a2=def.valid)!==null&&_a2!==void 0?_a2:valid2);function validateKeyword(){if(def.errors===!1)assignValid(),def.modifying&&modifyData(cxt),reportErrs(()=>cxt.error());else{const ruleErrs=def.async?validateAsync():validateSync();def.modifying&&modifyData(cxt),reportErrs(()=>addErrs(cxt,ruleErrs))}}function validateAsync(){const ruleErrs=gen.let("ruleErrs",null);return gen.try(()=>assignValid((0,codegen_1._)`await `), e=>gen.assign(valid2,!1).if((0,codegen_1._)`${e} instanceof ${it.ValidationError}`,()=>gen.assign(ruleErrs,(0,codegen_1._)`${e}.errors`),()=>gen.throw(e))),ruleErrs}function validateSync(){const validateErrs=(0,codegen_1._)`${validateRef}.errors`;return gen.assign(validateErrs,null),assignValid(codegen_1.nil),validateErrs}function assignValid(_await=def.async?(0,codegen_1._)`await `:codegen_1.nil){const passCxt=it.opts.passContext?names_1.default.this:names_1.default.self,passSchema=!("compile"in def&&!$data||def.schema===!1);gen.assign(valid2,(0,codegen_1._)`${_await}${(0,code_1.callValidateCode)(cxt,validateRef,passCxt,passSchema)}`,def.modifying)}function reportErrs(errors2){var _a3;gen.if((0,codegen_1.not)((_a3=def.valid)!==null&&_a3!==void 0?_a3:valid2),errors2)}}keyword$1.funcKeywordCode=funcKeywordCode;function modifyData(cxt){const{gen,data,it}=cxt;gen.if(it.parentData,()=>gen.assign(data,(0,codegen_1._)`${it.parentData}[${it.parentDataProperty}]`))}function addErrs(cxt,errs){const{ gen}=cxt;gen.if((0,codegen_1._)`Array.isArray(${errs})`,()=>{gen.assign(names_1.default.vErrors,(0,codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors,(0,codegen_1._)`${names_1.default.vErrors}.length`),(0,errors_1.extendErrors)(cxt)},()=>cxt.error())}function checkAsyncKeyword({schemaEnv},def){if(def.async&&!schemaEnv.$async)throw new Error("async keyword in sync schema")}function useKeyword(gen,keyword2,result){ if(result===void 0)throw new Error(`keyword "${keyword2}" failed to compile`);return gen.scopeValue("keyword",typeof result=="function"?{ref:result}:{ref:result,code:(0,codegen_1.stringify)(result)})}function validSchemaType(schema,schemaType,allowUndefined=!1){return!schemaType.length||schemaType.some(st=>st==="array"?Array.isArray(schema):st==="object"?schema&&typeof schema=="object"&&!Array.isArray(schema):typeof schema==st||allowUndefined&&typeof schema>"u")}keyword$1.validSchemaType=validSchemaType; function validateKeywordUsage({schema,opts,self:self2,errSchemaPath},def,keyword2){if(Array.isArray(def.keyword)?!def.keyword.includes(keyword2):def.keyword!==keyword2)throw new Error("ajv implementation error");const deps=def.dependencies;if(deps?.some(kwd=>!Object.prototype.hasOwnProperty.call(schema,kwd)))throw new Error(`parent schema must have dependencies of ${keyword2}: ${deps.join(",")}`);if(def.validateSchema&&!def.validateSchema(schema[keyword2])){const msg=`keyword "${keyword2}" value\ is invalid at path "${errSchemaPath}": `+self2.errorsText(def.validateSchema.errors);if(opts.validateSchema==="log")self2.logger.error(msg);else throw new Error(msg)}}return keyword$1.validateKeywordUsage=validateKeywordUsage,keyword$1}var subschema$1={},hasRequiredSubschema$1;function requireSubschema$1(){if(hasRequiredSubschema$1)return subschema$1;hasRequiredSubschema$1=1,Object.defineProperty(subschema$1,"__esModule",{value:!0}),subschema$1.extendSubschemaMode=subschema$1.extendSubschemaData= subschema$1.getSubschema=void 0;const codegen_1=requireCodegen$1(),util_1=requireUtil$1();function getSubschema(it,{keyword:keyword2,schemaProp,schema,schemaPath,errSchemaPath,topSchemaRef}){if(keyword2!==void 0&&schema!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(keyword2!==void 0){const sch=it.schema[keyword2];return schemaProp===void 0?{schema:sch,schemaPath:(0,codegen_1._)`${it.schemaPath}${(0,codegen_1.getProperty)(keyword2)}`,errSchemaPath:`${it.errSchemaPath}\ /${keyword2}`}:{schema:sch[schemaProp],schemaPath:(0,codegen_1._)`${it.schemaPath}${(0,codegen_1.getProperty)(keyword2)}${(0,codegen_1.getProperty)(schemaProp)}`,errSchemaPath:`${it.errSchemaPath}/${keyword2}/${(0,util_1.escapeFragment)(schemaProp)}`}}if(schema!==void 0){if(schemaPath===void 0||errSchemaPath===void 0||topSchemaRef===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema,schemaPath,topSchemaRef,errSchemaPath}}throw new Error( 'either "keyword" or "schema" must be passed')}subschema$1.getSubschema=getSubschema;function extendSubschemaData(subschema2,it,{dataProp,dataPropType:dpType,data,dataTypes,propertyName}){if(data!==void 0&&dataProp!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen}=it;if(dataProp!==void 0){const{errorPath,dataPathArr,opts}=it,nextData=gen.let("data",(0,codegen_1._)`${it.data}${(0,codegen_1.getProperty)(dataProp)}`,!0);dataContextProps(nextData),subschema2. errorPath=(0,codegen_1.str)`${errorPath}${(0,util_1.getErrorPath)(dataProp,dpType,opts.jsPropertySyntax)}`,subschema2.parentDataProperty=(0,codegen_1._)`${dataProp}`,subschema2.dataPathArr=[...dataPathArr,subschema2.parentDataProperty]}if(data!==void 0){const nextData=data instanceof codegen_1.Name?data:gen.let("data",data,!0);dataContextProps(nextData),propertyName!==void 0&&(subschema2.propertyName=propertyName)}dataTypes&&(subschema2.dataTypes=dataTypes);function dataContextProps(_nextData){subschema2. data=_nextData,subschema2.dataLevel=it.dataLevel+1,subschema2.dataTypes=[],it.definedProperties=new Set,subschema2.parentData=it.data,subschema2.dataNames=[...it.dataNames,_nextData]}}subschema$1.extendSubschemaData=extendSubschemaData;function extendSubschemaMode(subschema2,{jtdDiscriminator,jtdMetadata,compositeRule,createErrors,allErrors}){compositeRule!==void 0&&(subschema2.compositeRule=compositeRule),createErrors!==void 0&&(subschema2.createErrors=createErrors),allErrors!==void 0&&(subschema2. allErrors=allErrors),subschema2.jtdDiscriminator=jtdDiscriminator,subschema2.jtdMetadata=jtdMetadata}return subschema$1.extendSubschemaMode=extendSubschemaMode,subschema$1}var resolve$1={},fastDeepEqual,hasRequiredFastDeepEqual;function requireFastDeepEqual(){return hasRequiredFastDeepEqual||(hasRequiredFastDeepEqual=1,fastDeepEqual=function equal2(a,b){if(a===b)return!0;if(a&&b&&typeof a=="object"&&typeof b=="object"){if(a.constructor!==b.constructor)return!1;var length,i,keys2;if(Array.isArray( a)){if(length=a.length,length!=b.length)return!1;for(i=length;i--!==0;)if(!equal2(a[i],b[i]))return!1;return!0}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();if(keys2=Object.keys(a),length=keys2.length,length!==Object.keys(b).length)return!1;for(i=length;i--!==0;)if(!Object.prototype.hasOwnProperty.call(b,keys2[i]))return!1; for(i=length;i--!==0;){var key2=keys2[i];if(!equal2(a[key2],b[key2]))return!1}return!0}return a!==a&&b!==b}),fastDeepEqual}var jsonSchemaTraverse$1={exports:{}},hasRequiredJsonSchemaTraverse$1;function requireJsonSchemaTraverse$1(){if(hasRequiredJsonSchemaTraverse$1)return jsonSchemaTraverse$1.exports;hasRequiredJsonSchemaTraverse$1=1;var traverse=jsonSchemaTraverse$1.exports=function(schema,opts,cb){typeof opts=="function"&&(cb=opts,opts={}),cb=opts.cb||cb;var pre=typeof cb=="function"?cb:cb.pre|| function(){},post=cb.post||function(){};_traverse(opts,pre,post,schema,"",schema)};traverse.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},traverse.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},traverse.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},traverse.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 _traverse(opts,pre,post,schema,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex){if(schema&&typeof schema=="object"&&!Array.isArray(schema)){pre(schema,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex);for(var key2 in schema){var sch=schema[key2];if(Array.isArray(sch)){if(key2 in traverse.arrayKeywords)for(var i=0;icount+=countKeys(sch)),count===1/0))return 1/0}return count}function getFullPath(resolver2,id2="",normalize2){ normalize2!==!1&&(id2=normalizeId(id2));const p2=resolver2.parse(id2);return _getFullPath(resolver2,p2)}resolve$1.getFullPath=getFullPath;function _getFullPath(resolver2,p2){return resolver2.serialize(p2).split("#")[0]+"#"}resolve$1._getFullPath=_getFullPath;const TRAILING_SLASH_HASH=/#\/?$/;function normalizeId(id2){return id2?id2.replace(TRAILING_SLASH_HASH,""):""}resolve$1.normalizeId=normalizeId;function resolveUrl(resolver2,baseId,id2){return id2=normalizeId(id2),resolver2.resolve(baseId,id2)} resolve$1.resolveUrl=resolveUrl;const ANCHOR=/^[a-z_][-a-z0-9._]*$/i;function getSchemaRefs(schema,baseId){if(typeof schema=="boolean")return{};const{schemaId,uriResolver}=this.opts,schId=normalizeId(schema[schemaId]||baseId),baseIds={"":schId},pathPrefix=getFullPath(uriResolver,schId,!1),localRefs={},schemaRefs=new Set;return traverse(schema,{allKeys:!0},(sch,jsonPtr,_,parentJsonPtr)=>{if(parentJsonPtr===void 0)return;const fullPath=pathPrefix+jsonPtr;let innerBaseId=baseIds[parentJsonPtr];typeof sch[schemaId]== "string"&&(innerBaseId=addRef.call(this,sch[schemaId])),addAnchor.call(this,sch.$anchor),addAnchor.call(this,sch.$dynamicAnchor),baseIds[jsonPtr]=innerBaseId;function addRef(ref2){const _resolve=this.opts.uriResolver.resolve;if(ref2=normalizeId(innerBaseId?_resolve(innerBaseId,ref2):ref2),schemaRefs.has(ref2))throw ambiguos(ref2);schemaRefs.add(ref2);let schOrRef=this.refs[ref2];return typeof schOrRef=="string"&&(schOrRef=this.refs[schOrRef]),typeof schOrRef=="object"?checkAmbiguosRef(sch,schOrRef. schema,ref2):ref2!==normalizeId(fullPath)&&(ref2[0]==="#"?(checkAmbiguosRef(sch,localRefs[ref2],ref2),localRefs[ref2]=sch):this.refs[ref2]=fullPath),ref2}function addAnchor(anchor){if(typeof anchor=="string"){if(!ANCHOR.test(anchor))throw new Error(`invalid anchor "${anchor}"`);addRef.call(this,`#${anchor}`)}}}),localRefs;function checkAmbiguosRef(sch1,sch2,ref2){if(sch2!==void 0&&!equal2(sch1,sch2))throw ambiguos(ref2)}function ambiguos(ref2){return new Error(`reference "${ref2}" resolves to mo\ re than one schema`)}}return resolve$1.getSchemaRefs=getSchemaRefs,resolve$1}var hasRequiredValidate$1;function requireValidate$1(){if(hasRequiredValidate$1)return validate$1;hasRequiredValidate$1=1,Object.defineProperty(validate$1,"__esModule",{value:!0}),validate$1.getData=validate$1.KeywordCxt=validate$1.validateFunctionCode=void 0;const boolSchema_1=requireBoolSchema$1(),dataType_1=requireDataType$1(),applicability_1=requireApplicability$1(),dataType_2=requireDataType$1(),defaults_1=requireDefaults$1(), keyword_1=requireKeyword$1(),subschema_1=requireSubschema$1(),codegen_1=requireCodegen$1(),names_1=requireNames$1(),resolve_1=requireResolve$1(),util_1=requireUtil$1(),errors_1=requireErrors$1();function validateFunctionCode(it){if(isSchemaObj(it)&&(checkKeywords(it),schemaCxtHasRules(it))){topSchemaObjCode(it);return}validateFunction(it,()=>(0,boolSchema_1.topBoolOrEmptySchema)(it))}validate$1.validateFunctionCode=validateFunctionCode;function validateFunction({gen,validateName,schema,schemaEnv, opts},body2){opts.code.es5?gen.func(validateName,(0,codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`,schemaEnv.$async,()=>{gen.code((0,codegen_1._)`"use strict"; ${funcSourceUrl(schema,opts)}`),destructureValCxtES5(gen,opts),gen.code(body2)}):gen.func(validateName,(0,codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`,schemaEnv.$async,()=>gen.code(funcSourceUrl(schema,opts)).code(body2))}function destructureValCxt(opts){return(0,codegen_1._)`{${names_1.default.instancePath}="", ${names_1. default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef?(0,codegen_1._)`, ${names_1.default.dynamicAnchors}={}`:codegen_1.nil}}={}`}function destructureValCxtES5(gen,opts){gen.if(names_1.default.valCxt,()=>{gen.var(names_1.default.instancePath,(0,codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`),gen.var(names_1.default.parentData,(0,codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentData}`), gen.var(names_1.default.parentDataProperty,(0,codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentDataProperty}`),gen.var(names_1.default.rootData,(0,codegen_1._)`${names_1.default.valCxt}.${names_1.default.rootData}`),opts.dynamicRef&&gen.var(names_1.default.dynamicAnchors,(0,codegen_1._)`${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`)},()=>{gen.var(names_1.default.instancePath,(0,codegen_1._)`""`),gen.var(names_1.default.parentData,(0,codegen_1._)`undefined`),gen.var(names_1. default.parentDataProperty,(0,codegen_1._)`undefined`),gen.var(names_1.default.rootData,names_1.default.data),opts.dynamicRef&&gen.var(names_1.default.dynamicAnchors,(0,codegen_1._)`{}`)})}function topSchemaObjCode(it){const{schema,opts,gen}=it;validateFunction(it,()=>{opts.$comment&&schema.$comment&&commentKeyword(it),checkNoDefault(it),gen.let(names_1.default.vErrors,null),gen.let(names_1.default.errors,0),opts.unevaluated&&resetEvaluated(it),typeAndKeywords(it),returnResults(it)})}function resetEvaluated(it){ const{gen,validateName}=it;it.evaluated=gen.const("evaluated",(0,codegen_1._)`${validateName}.evaluated`),gen.if((0,codegen_1._)`${it.evaluated}.dynamicProps`,()=>gen.assign((0,codegen_1._)`${it.evaluated}.props`,(0,codegen_1._)`undefined`)),gen.if((0,codegen_1._)`${it.evaluated}.dynamicItems`,()=>gen.assign((0,codegen_1._)`${it.evaluated}.items`,(0,codegen_1._)`undefined`))}function funcSourceUrl(schema,opts){const schId=typeof schema=="object"&&schema[opts.schemaId];return schId&&(opts.code.source|| opts.code.process)?(0,codegen_1._)`/*# sourceURL=${schId} */`:codegen_1.nil}function subschemaCode(it,valid2){if(isSchemaObj(it)&&(checkKeywords(it),schemaCxtHasRules(it))){subSchemaObjCode(it,valid2);return}(0,boolSchema_1.boolOrEmptySchema)(it,valid2)}function schemaCxtHasRules({schema,self:self2}){if(typeof schema=="boolean")return!schema;for(const key2 in schema)if(self2.RULES.all[key2])return!0;return!1}function isSchemaObj(it){return typeof it.schema!="boolean"}function subSchemaObjCode(it,valid2){ const{schema,gen,opts}=it;opts.$comment&&schema.$comment&&commentKeyword(it),updateContext(it),checkAsyncSchema(it);const errsCount=gen.const("_errs",names_1.default.errors);typeAndKeywords(it,errsCount),gen.var(valid2,(0,codegen_1._)`${errsCount} === ${names_1.default.errors}`)}function checkKeywords(it){(0,util_1.checkUnknownRules)(it),checkRefsAndKeywords(it)}function typeAndKeywords(it,errsCount){if(it.opts.jtd)return schemaKeywords(it,[],!1,errsCount);const types2=(0,dataType_1.getSchemaTypes)( it.schema),checkedTypes=(0,dataType_1.coerceAndCheckDataType)(it,types2);schemaKeywords(it,types2,!checkedTypes,errsCount)}function checkRefsAndKeywords(it){const{schema,errSchemaPath,opts,self:self2}=it;schema.$ref&&opts.ignoreKeywordsWithRef&&(0,util_1.schemaHasRulesButRef)(schema,self2.RULES)&&self2.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`)}function checkNoDefault(it){const{schema,opts}=it;schema.default!==void 0&&opts.useDefaults&&opts.strictSchema&&(0,util_1. checkStrictMode)(it,"default is ignored in the schema root")}function updateContext(it){const schId=it.schema[it.opts.schemaId];schId&&(it.baseId=(0,resolve_1.resolveUrl)(it.opts.uriResolver,it.baseId,schId))}function checkAsyncSchema(it){if(it.schema.$async&&!it.schemaEnv.$async)throw new Error("async schema in sync schema")}function commentKeyword({gen,schemaEnv,schema,errSchemaPath,opts}){const msg=schema.$comment;if(opts.$comment===!0)gen.code((0,codegen_1._)`${names_1.default.self}.logger.log(${msg})`);else if(typeof opts. $comment=="function"){const schemaPath=(0,codegen_1.str)`${errSchemaPath}/$comment`,rootName=gen.scopeValue("root",{ref:schemaEnv.root});gen.code((0,codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`)}}function returnResults(it){const{gen,schemaEnv,validateName,ValidationError,opts}=it;schemaEnv.$async?gen.if((0,codegen_1._)`${names_1.default.errors} === 0`,()=>gen.return(names_1.default.data),()=>gen.throw((0,codegen_1._)`new ${ValidationError}(${names_1. default.vErrors})`)):(gen.assign((0,codegen_1._)`${validateName}.errors`,names_1.default.vErrors),opts.unevaluated&&assignEvaluated(it),gen.return((0,codegen_1._)`${names_1.default.errors} === 0`))}function assignEvaluated({gen,evaluated,props,items:items2}){props instanceof codegen_1.Name&&gen.assign((0,codegen_1._)`${evaluated}.props`,props),items2 instanceof codegen_1.Name&&gen.assign((0,codegen_1._)`${evaluated}.items`,items2)}function schemaKeywords(it,types2,typeErrors,errsCount){const{gen, schema,data,allErrors,opts,self:self2}=it,{RULES}=self2;if(schema.$ref&&(opts.ignoreKeywordsWithRef||!(0,util_1.schemaHasRulesButRef)(schema,RULES))){gen.block(()=>keywordCode(it,"$ref",RULES.all.$ref.definition));return}opts.jtd||checkStrictTypes(it,types2),gen.block(()=>{for(const group of RULES.rules)groupKeywords(group);groupKeywords(RULES.post)});function groupKeywords(group){(0,applicability_1.shouldUseGroup)(schema,group)&&(group.type?(gen.if((0,dataType_2.checkDataType)(group.type,data,opts. strictNumbers)),iterateKeywords(it,group),types2.length===1&&types2[0]===group.type&&typeErrors&&(gen.else(),(0,dataType_2.reportTypeError)(it)),gen.endIf()):iterateKeywords(it,group),allErrors||gen.if((0,codegen_1._)`${names_1.default.errors} === ${errsCount||0}`))}}function iterateKeywords(it,group){const{gen,schema,opts:{useDefaults}}=it;useDefaults&&(0,defaults_1.assignDefaults)(it,group.type),gen.block(()=>{for(const rule of group.rules)(0,applicability_1.shouldUseRule)(schema,rule)&&keywordCode( it,rule.keyword,rule.definition,group.type)})}function checkStrictTypes(it,types2){it.schemaEnv.meta||!it.opts.strictTypes||(checkContextTypes(it,types2),it.opts.allowUnionTypes||checkMultipleTypes(it,types2),checkKeywordTypes(it,it.dataTypes))}function checkContextTypes(it,types2){if(types2.length){if(!it.dataTypes.length){it.dataTypes=types2;return}types2.forEach(t=>{includesType(it.dataTypes,t)||strictTypesError(it,`type "${t}" not allowed by context "${it.dataTypes.join(",")}"`)}),narrowSchemaTypes( it,types2)}}function checkMultipleTypes(it,ts){ts.length>1&&!(ts.length===2&&ts.includes("null"))&&strictTypesError(it,"use allowUnionTypes to allow union type keyword")}function checkKeywordTypes(it,ts){const rules2=it.self.RULES.all;for(const keyword2 in rules2){const rule=rules2[keyword2];if(typeof rule=="object"&&(0,applicability_1.shouldUseRule)(it.schema,rule)){const{type:type2}=rule.definition;type2.length&&!type2.some(t=>hasApplicableType(ts,t))&&strictTypesError(it,`missing type "${type2. join(",")}" for keyword "${keyword2}"`)}}}function hasApplicableType(schTs,kwdT){return schTs.includes(kwdT)||kwdT==="number"&&schTs.includes("integer")}function includesType(ts,t){return ts.includes(t)||t==="integer"&&ts.includes("number")}function narrowSchemaTypes(it,withTypes){const ts=[];for(const t of it.dataTypes)includesType(withTypes,t)?ts.push(t):withTypes.includes("integer")&&t==="number"&&ts.push("integer");it.dataTypes=ts}function strictTypesError(it,msg){const schemaPath=it.schemaEnv. baseId+it.errSchemaPath;msg+=` at "${schemaPath}" (strictTypes)`,(0,util_1.checkStrictMode)(it,msg,it.opts.strictTypes)}class KeywordCxt{constructor(it,def,keyword2){if((0,keyword_1.validateKeywordUsage)(it,def,keyword2),this.gen=it.gen,this.allErrors=it.allErrors,this.keyword=keyword2,this.data=it.data,this.schema=it.schema[keyword2],this.$data=def.$data&&it.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,util_1.schemaRefOrVal)(it,this.schema,keyword2,this.$data),this.schemaType= def.schemaType,this.parentSchema=it.schema,this.params={},this.it=it,this.def=def,this.$data)this.schemaCode=it.gen.const("vSchema",getData(this.$data,it));else if(this.schemaCode=this.schemaValue,!(0,keyword_1.validSchemaType)(this.schema,def.schemaType,def.allowUndefined))throw new Error(`${keyword2} value must be ${JSON.stringify(def.schemaType)}`);("code"in def?def.trackErrors:def.errors!==!1)&&(this.errsCount=it.gen.const("_errs",names_1.default.errors))}result(condition,successAction,failAction){ this.failResult((0,codegen_1.not)(condition),successAction,failAction)}failResult(condition,successAction,failAction){this.gen.if(condition),failAction?failAction():this.error(),successAction?(this.gen.else(),successAction(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(condition,failAction){this.failResult((0,codegen_1.not)(condition),void 0,failAction)}fail(condition){if(condition===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if( condition),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(condition){if(!this.$data)return this.fail(condition);const{schemaCode}=this;this.fail((0,codegen_1._)`${schemaCode} !== undefined && (${(0,codegen_1.or)(this.invalid$data(),condition)})`)}error(append2,errorParams,errorPaths){if(errorParams){this.setParams(errorParams),this._error(append2,errorPaths),this.setParams({});return}this._error(append2,errorPaths)}_error(append2,errorPaths){(append2?errors_1.reportExtraError: errors_1.reportError)(this,this.def.error,errorPaths)}$dataError(){(0,errors_1.reportError)(this,this.def.$dataError||errors_1.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,errors_1.resetErrorsCount)(this.gen,this.errsCount)}ok(cond){this.allErrors||this.gen.if(cond)}setParams(obj,assign){assign?Object.assign(this.params,obj):this.params=obj}block$data(valid2,codeBlock,$dataValid=codegen_1.nil){this.gen.block(()=>{this.check$data( valid2,$dataValid),codeBlock()})}check$data(valid2=codegen_1.nil,$dataValid=codegen_1.nil){if(!this.$data)return;const{gen,schemaCode,schemaType,def}=this;gen.if((0,codegen_1.or)((0,codegen_1._)`${schemaCode} === undefined`,$dataValid)),valid2!==codegen_1.nil&&gen.assign(valid2,!0),(schemaType.length||def.validateSchema)&&(gen.elseIf(this.invalid$data()),this.$dataError(),valid2!==codegen_1.nil&&gen.assign(valid2,!1)),gen.else()}invalid$data(){const{gen,schemaCode,schemaType,def,it}=this;return(0,codegen_1. or)(wrong$DataType(),invalid$DataSchema());function wrong$DataType(){if(schemaType.length){if(!(schemaCode instanceof codegen_1.Name))throw new Error("ajv implementation error");const st=Array.isArray(schemaType)?schemaType:[schemaType];return(0,codegen_1._)`${(0,dataType_2.checkDataTypes)(st,schemaCode,it.opts.strictNumbers,dataType_2.DataType.Wrong)}`}return codegen_1.nil}function invalid$DataSchema(){if(def.validateSchema){const validateSchemaRef=gen.scopeValue("validate$data",{ref:def.validateSchema}); return(0,codegen_1._)`!${validateSchemaRef}(${schemaCode})`}return codegen_1.nil}}subschema(appl,valid2){const subschema2=(0,subschema_1.getSubschema)(this.it,appl);(0,subschema_1.extendSubschemaData)(subschema2,this.it,appl),(0,subschema_1.extendSubschemaMode)(subschema2,appl);const nextContext={...this.it,...subschema2,items:void 0,props:void 0};return subschemaCode(nextContext,valid2),nextContext}mergeEvaluated(schemaCxt,toName){const{it,gen}=this;it.opts.unevaluated&&(it.props!==!0&&schemaCxt. props!==void 0&&(it.props=util_1.mergeEvaluated.props(gen,schemaCxt.props,it.props,toName)),it.items!==!0&&schemaCxt.items!==void 0&&(it.items=util_1.mergeEvaluated.items(gen,schemaCxt.items,it.items,toName)))}mergeValidEvaluated(schemaCxt,valid2){const{it,gen}=this;if(it.opts.unevaluated&&(it.props!==!0||it.items!==!0))return gen.if(valid2,()=>this.mergeEvaluated(schemaCxt,codegen_1.Name)),!0}}validate$1.KeywordCxt=KeywordCxt;function keywordCode(it,keyword2,def,ruleType){const cxt=new KeywordCxt( it,def,keyword2);"code"in def?def.code(cxt,ruleType):cxt.$data&&def.validate?(0,keyword_1.funcKeywordCode)(cxt,def):"macro"in def?(0,keyword_1.macroKeywordCode)(cxt,def):(def.compile||def.validate)&&(0,keyword_1.funcKeywordCode)(cxt,def)}const JSON_POINTER=/^\/(?:[^~]|~0|~1)*$/,RELATIVE_JSON_POINTER=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData($data,{dataLevel,dataNames,dataPathArr}){let jsonPointer,data;if($data==="")return names_1.default.rootData;if($data[0]==="/"){if(!JSON_POINTER.test( $data))throw new Error(`Invalid JSON-pointer: ${$data}`);jsonPointer=$data,data=names_1.default.rootData}else{const matches2=RELATIVE_JSON_POINTER.exec($data);if(!matches2)throw new Error(`Invalid JSON-pointer: ${$data}`);const up=+matches2[1];if(jsonPointer=matches2[2],jsonPointer==="#"){if(up>=dataLevel)throw new Error(errorMsg("property/index",up));return dataPathArr[dataLevel-up]}if(up>dataLevel)throw new Error(errorMsg("data",up));if(data=dataNames[dataLevel-up],!jsonPointer)return data}let expr=data; const segments=jsonPointer.split("/");for(const segment of segments)segment&&(data=(0,codegen_1._)`${data}${(0,codegen_1.getProperty)((0,util_1.unescapeJsonPointer)(segment))}`,expr=(0,codegen_1._)`${expr} && ${data}`);return expr;function errorMsg(pointerType,up){return`Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`}}return validate$1.getData=getData,validate$1}var validation_error$1={},hasRequiredValidation_error$1;function requireValidation_error$1(){if(hasRequiredValidation_error$1) return validation_error$1;hasRequiredValidation_error$1=1,Object.defineProperty(validation_error$1,"__esModule",{value:!0});class ValidationError extends Error{constructor(errors2){super("validation failed"),this.errors=errors2,this.ajv=this.validation=!0}}return validation_error$1.default=ValidationError,validation_error$1}var ref_error$1={},hasRequiredRef_error$1;function requireRef_error$1(){if(hasRequiredRef_error$1)return ref_error$1;hasRequiredRef_error$1=1,Object.defineProperty(ref_error$1, "__esModule",{value:!0});const resolve_1=requireResolve$1();class MissingRefError extends Error{constructor(resolver2,baseId,ref2,msg){super(msg||`can't resolve reference ${ref2} from id ${baseId}`),this.missingRef=(0,resolve_1.resolveUrl)(resolver2,baseId,ref2),this.missingSchema=(0,resolve_1.normalizeId)((0,resolve_1.getFullPath)(resolver2,this.missingRef))}}return ref_error$1.default=MissingRefError,ref_error$1}var compile$1={},hasRequiredCompile$1;function requireCompile$1(){if(hasRequiredCompile$1) return compile$1;hasRequiredCompile$1=1,Object.defineProperty(compile$1,"__esModule",{value:!0}),compile$1.resolveSchema=compile$1.getCompilingSchema=compile$1.resolveRef=compile$1.compileSchema=compile$1.SchemaEnv=void 0;const codegen_1=requireCodegen$1(),validation_error_1=requireValidation_error$1(),names_1=requireNames$1(),resolve_1=requireResolve$1(),util_1=requireUtil$1(),validate_1=requireValidate$1();class SchemaEnv{constructor(env2){var _a2;this.refs={},this.dynamicAnchors={};let schema; typeof env2.schema=="object"&&(schema=env2.schema),this.schema=env2.schema,this.schemaId=env2.schemaId,this.root=env2.root||this,this.baseId=(_a2=env2.baseId)!==null&&_a2!==void 0?_a2:(0,resolve_1.normalizeId)(schema?.[env2.schemaId||"$id"]),this.schemaPath=env2.schemaPath,this.localRefs=env2.localRefs,this.meta=env2.meta,this.$async=schema?.$async,this.refs={}}}compile$1.SchemaEnv=SchemaEnv;function compileSchema(sch){const _sch=getCompilingSchema.call(this,sch);if(_sch)return _sch;const rootId=(0,resolve_1. getFullPath)(this.opts.uriResolver,sch.root.baseId),{es5,lines}=this.opts.code,{ownProperties}=this.opts,gen=new codegen_1.CodeGen(this.scope,{es5,lines,ownProperties});let _ValidationError;sch.$async&&(_ValidationError=gen.scopeValue("Error",{ref:validation_error_1.default,code:(0,codegen_1._)`require("ajv/dist/runtime/validation_error").default`}));const validateName=gen.scopeName("validate");sch.validateName=validateName;const schemaCxt={gen,allErrors:this.opts.allErrors,data:names_1.default. data,parentData:names_1.default.parentData,parentDataProperty:names_1.default.parentDataProperty,dataNames:[names_1.default.data],dataPathArr:[codegen_1.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:gen.scopeValue("schema",this.opts.code.source===!0?{ref:sch.schema,code:(0,codegen_1.stringify)(sch.schema)}:{ref:sch.schema}),validateName,ValidationError:_ValidationError,schema:sch.schema,schemaEnv:sch,rootId,baseId:sch.baseId||rootId,schemaPath:codegen_1.nil,errSchemaPath:sch. schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,codegen_1._)`""`,opts:this.opts,self:this};let sourceCode;try{this._compilations.add(sch),(0,validate_1.validateFunctionCode)(schemaCxt),gen.optimize(this.opts.code.optimize);const validateCode=gen.toString();sourceCode=`${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`,this.opts.code.process&&(sourceCode=this.opts.code.process(sourceCode,sch));const validate2=new Function(`${names_1.default.self}`,`${names_1.default.scope}`,sourceCode)( this,this.scope.get());if(this.scope.value(validateName,{ref:validate2}),validate2.errors=null,validate2.schema=sch.schema,validate2.schemaEnv=sch,sch.$async&&(validate2.$async=!0),this.opts.code.source===!0&&(validate2.source={validateName,validateCode,scopeValues:gen._values}),this.opts.unevaluated){const{props,items:items2}=schemaCxt;validate2.evaluated={props:props instanceof codegen_1.Name?void 0:props,items:items2 instanceof codegen_1.Name?void 0:items2,dynamicProps:props instanceof codegen_1. Name,dynamicItems:items2 instanceof codegen_1.Name},validate2.source&&(validate2.source.evaluated=(0,codegen_1.stringify)(validate2.evaluated))}return sch.validate=validate2,sch}catch(e){throw delete sch.validate,delete sch.validateName,sourceCode&&this.logger.error("Error compiling schema, function code:",sourceCode),e}finally{this._compilations.delete(sch)}}compile$1.compileSchema=compileSchema;function resolveRef(root2,baseId,ref2){var _a2;ref2=(0,resolve_1.resolveUrl)(this.opts.uriResolver,baseId, ref2);const schOrFunc=root2.refs[ref2];if(schOrFunc)return schOrFunc;let _sch=resolve2.call(this,root2,ref2);if(_sch===void 0){const schema=(_a2=root2.localRefs)===null||_a2===void 0?void 0:_a2[ref2],{schemaId}=this.opts;schema&&(_sch=new SchemaEnv({schema,schemaId,root:root2,baseId}))}if(_sch!==void 0)return root2.refs[ref2]=inlineOrCompile.call(this,_sch)}compile$1.resolveRef=resolveRef;function inlineOrCompile(sch){return(0,resolve_1.inlineRef)(sch.schema,this.opts.inlineRefs)?sch.schema:sch. validate?sch:compileSchema.call(this,sch)}function getCompilingSchema(schEnv){for(const sch of this._compilations)if(sameSchemaEnv(sch,schEnv))return sch}compile$1.getCompilingSchema=getCompilingSchema;function sameSchemaEnv(s1,s2){return s1.schema===s2.schema&&s1.root===s2.root&&s1.baseId===s2.baseId}function resolve2(root2,ref2){let sch;for(;typeof(sch=this.refs[ref2])=="string";)ref2=sch;return sch||this.schemas[ref2]||resolveSchema.call(this,root2,ref2)}function resolveSchema(root2,ref2){const p2=this. opts.uriResolver.parse(ref2),refPath=(0,resolve_1._getFullPath)(this.opts.uriResolver,p2);let baseId=(0,resolve_1.getFullPath)(this.opts.uriResolver,root2.baseId,void 0);if(Object.keys(root2.schema).length>0&&refPath===baseId)return getJsonPointer.call(this,p2,root2);const id2=(0,resolve_1.normalizeId)(refPath),schOrRef=this.refs[id2]||this.schemas[id2];if(typeof schOrRef=="string"){const sch=resolveSchema.call(this,root2,schOrRef);return typeof sch?.schema!="object"?void 0:getJsonPointer.call(this, p2,sch)}if(typeof schOrRef?.schema=="object"){if(schOrRef.validate||compileSchema.call(this,schOrRef),id2===(0,resolve_1.normalizeId)(ref2)){const{schema}=schOrRef,{schemaId}=this.opts,schId=schema[schemaId];return schId&&(baseId=(0,resolve_1.resolveUrl)(this.opts.uriResolver,baseId,schId)),new SchemaEnv({schema,schemaId,root:root2,baseId})}return getJsonPointer.call(this,p2,schOrRef)}}compile$1.resolveSchema=resolveSchema;const PREVENT_SCOPE_CHANGE=new Set(["properties","patternProperties","enu\ m","dependencies","definitions"]);function getJsonPointer(parsedRef,{baseId,schema,root:root2}){var _a2;if(((_a2=parsedRef.fragment)===null||_a2===void 0?void 0:_a2[0])!=="/")return;for(const part of parsedRef.fragment.slice(1).split("/")){if(typeof schema=="boolean")return;const partSchema=schema[(0,util_1.unescapeFragment)(part)];if(partSchema===void 0)return;schema=partSchema;const schId=typeof schema=="object"&&schema[this.opts.schemaId];!PREVENT_SCOPE_CHANGE.has(part)&&schId&&(baseId=(0,resolve_1. resolveUrl)(this.opts.uriResolver,baseId,schId))}let env2;if(typeof schema!="boolean"&&schema.$ref&&!(0,util_1.schemaHasRulesButRef)(schema,this.RULES)){const $ref=(0,resolve_1.resolveUrl)(this.opts.uriResolver,baseId,schema.$ref);env2=resolveSchema.call(this,root2,$ref)}const{schemaId}=this.opts;if(env2=env2||new SchemaEnv({schema,schemaId,root:root2,baseId}),env2.schema!==env2.root.schema)return env2}return compile$1}const $id$3="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/r\ efs/data.json#",description$1="Meta-schema for $data reference (JSON AnySchema extension proposal)",type$3="object",required$3=["$data"],properties$6={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties$3=!1,require$$9$1={$id:$id$3,description:description$1,type:type$3,required:required$3,properties:properties$6,additionalProperties:additionalProperties$3};var uri$1={},fastUri={exports:{}},utils$1,hasRequiredUtils;function requireUtils(){if(hasRequiredUtils) return utils$1;hasRequiredUtils=1;const isUUID=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),isIPv4=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function stringArrayToHexStripped(input){let acc="",code2=0,i=0;for(i=0;i=48&&code2<=57||code2>=65&&code2<=70||code2>=97&&code2<=102))return"";acc+=input[i];break}for(i+= 1;i=48&&code2<=57||code2>=65&&code2<=70||code2>=97&&code2<=102))return"";acc+=input[i]}return acc}const nonSimpleDomain=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function consumeIsZone(buffer){return buffer.length=0,!0}function consumeHextets(buffer,address,output){if(buffer.length){const hex=stringArrayToHexStripped(buffer);if(hex!=="")address.push(hex);else return output.error=!0,!1;buffer.length=0}return!0}function getIPV6(input){ let tokenCount=0;const output={error:!1,address:"",zone:""},address=[],buffer=[];let endipv6Encountered=!1,endIpv6=!1,consume=consumeHextets;for(let i=0;i7){output.error=!0;break}i>0&&input[i-1]===":"&&(endipv6Encountered=!0),address.push(":");continue}else if(cursor==="%"){if(!consume(buffer,address,output))break; consume=consumeIsZone}else{buffer.push(cursor);continue}}return buffer.length&&(consume===consumeIsZone?output.zone=buffer.join(""):endIpv6?address.push(buffer.join("")):address.push(stringArrayToHexStripped(buffer))),output.address=address.join(""),output}function normalizeIPv6(host){if(findToken(host,":")<2)return{host,isIPV6:!1};const ipv62=getIPV6(host);if(ipv62.error)return{host,isIPV6:!1};{let newHost=ipv62.address,escapedHost=ipv62.address;return ipv62.zone&&(newHost+="%"+ipv62.zone,escapedHost+= "%25"+ipv62.zone),{host:newHost,isIPV6:!0,escapedHost}}}function findToken(str,token2){let ind=0;for(let i=0;inew RegExp( str,flags2);defaultRegExp.code="new RegExp";const META_IGNORE_OPTIONS=["removeAdditional","useDefaults","coerceTypes"],EXT_SCOPE_NAMES=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),removedOptions={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 `f\ ormats` 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."},deprecatedOptions={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},MAX_EXPRESSION=200;function requiredOptions(o){var _a2,_b,_c,_d,_e,_f,_g,_h,_j,_k,_l,_m,_o,_p,_q,_r,_s,_t,_u,_v,_w,_x,_y,_z,_02;const s2=o.strict,_optz=(_a2=o.code)===null||_a2===void 0?void 0:_a2.optimize, optimize=_optz===!0||_optz===void 0?1:_optz||0,regExp=(_c=(_b=o.code)===null||_b===void 0?void 0:_b.regExp)!==null&&_c!==void 0?_c:defaultRegExp,uriResolver=(_d=o.uriResolver)!==null&&_d!==void 0?_d:uri_1.default;return{strictSchema:(_f=(_e=o.strictSchema)!==null&&_e!==void 0?_e:s2)!==null&&_f!==void 0?_f:!0,strictNumbers:(_h=(_g=o.strictNumbers)!==null&&_g!==void 0?_g:s2)!==null&&_h!==void 0?_h:!0,strictTypes:(_k=(_j=o.strictTypes)!==null&&_j!==void 0?_j:s2)!==null&&_k!==void 0?_k:"log",strictTuples:(_m= (_l=o.strictTuples)!==null&&_l!==void 0?_l:s2)!==null&&_m!==void 0?_m:"log",strictRequired:(_p=(_o=o.strictRequired)!==null&&_o!==void 0?_o:s2)!==null&&_p!==void 0?_p:!1,code:o.code?{...o.code,optimize,regExp}:{optimize,regExp},loopRequired:(_q=o.loopRequired)!==null&&_q!==void 0?_q:MAX_EXPRESSION,loopEnum:(_r=o.loopEnum)!==null&&_r!==void 0?_r:MAX_EXPRESSION,meta:(_s=o.meta)!==null&&_s!==void 0?_s:!0,messages:(_t=o.messages)!==null&&_t!==void 0?_t:!0,inlineRefs:(_u=o.inlineRefs)!==null&&_u!==void 0? _u:!0,schemaId:(_v=o.schemaId)!==null&&_v!==void 0?_v:"$id",addUsedSchema:(_w=o.addUsedSchema)!==null&&_w!==void 0?_w:!0,validateSchema:(_x=o.validateSchema)!==null&&_x!==void 0?_x:!0,validateFormats:(_y=o.validateFormats)!==null&&_y!==void 0?_y:!0,unicodeRegExp:(_z=o.unicodeRegExp)!==null&&_z!==void 0?_z:!0,int32range:(_02=o.int32range)!==null&&_02!==void 0?_02:!0,uriResolver}}class Ajv2{constructor(opts={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={}, this._cache=new Map,opts=this.opts={...opts,...requiredOptions(opts)};const{es5,lines}=this.opts.code;this.scope=new codegen_2.ValueScope({scope:{},prefixes:EXT_SCOPE_NAMES,es5,lines}),this.logger=getLogger(opts.logger);const formatOpt=opts.validateFormats;opts.validateFormats=!1,this.RULES=(0,rules_1.getRules)(),checkOptions.call(this,removedOptions,opts,"NOT SUPPORTED"),checkOptions.call(this,deprecatedOptions,opts,"DEPRECATED","warn"),this._metaOpts=getMetaSchemaOptions.call(this),opts.formats&& addInitialFormats.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),opts.keywords&&addInitialKeywords.call(this,opts.keywords),typeof opts.meta=="object"&&this.addMetaSchema(opts.meta),addInitialSchemas.call(this),opts.validateFormats=formatOpt}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data,meta,schemaId}=this.opts;let _dataRefSchema=$dataRefSchema;schemaId==="id"&&(_dataRefSchema={...$dataRefSchema},_dataRefSchema.id=_dataRefSchema.$id,delete _dataRefSchema. $id),meta&&$data&&this.addMetaSchema(_dataRefSchema,_dataRefSchema[schemaId],!1)}defaultMeta(){const{meta,schemaId}=this.opts;return this.opts.defaultMeta=typeof meta=="object"?meta[schemaId]||meta:void 0}validate(schemaKeyRef,data){let v;if(typeof schemaKeyRef=="string"){if(v=this.getSchema(schemaKeyRef),!v)throw new Error(`no schema with key or ref "${schemaKeyRef}"`)}else v=this.compile(schemaKeyRef);const valid2=v(data);return"$async"in v||(this.errors=v.errors),valid2}compile(schema,_meta){ const sch=this._addSchema(schema,_meta);return sch.validate||this._compileSchemaEnv(sch)}compileAsync(schema,meta){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema}=this.opts;return runCompileAsync.call(this,schema,meta);async function runCompileAsync(_schema,_meta){await loadMetaSchema.call(this,_schema.$schema);const sch=this._addSchema(_schema,_meta);return sch.validate||_compileAsync.call(this,sch)}async function loadMetaSchema($ref){ $ref&&!this.getSchema($ref)&&await runCompileAsync.call(this,{$ref},!0)}async function _compileAsync(sch){try{return this._compileSchemaEnv(sch)}catch(e){if(!(e instanceof ref_error_1.default))throw e;return checkLoaded.call(this,e),await loadMissingSchema.call(this,e.missingSchema),_compileAsync.call(this,sch)}}function checkLoaded({missingSchema:ref2,missingRef}){if(this.refs[ref2])throw new Error(`AnySchema ${ref2} is loaded but ${missingRef} cannot be resolved`)}async function loadMissingSchema(ref2){ const _schema=await _loadSchema.call(this,ref2);this.refs[ref2]||await loadMetaSchema.call(this,_schema.$schema),this.refs[ref2]||this.addSchema(_schema,ref2,meta)}async function _loadSchema(ref2){const p2=this._loading[ref2];if(p2)return p2;try{return await(this._loading[ref2]=loadSchema(ref2))}finally{delete this._loading[ref2]}}}addSchema(schema,key2,_meta,_validateSchema=this.opts.validateSchema){if(Array.isArray(schema)){for(const sch of schema)this.addSchema(sch,void 0,_meta,_validateSchema); return this}let id2;if(typeof schema=="object"){const{schemaId}=this.opts;if(id2=schema[schemaId],id2!==void 0&&typeof id2!="string")throw new Error(`schema ${schemaId} must be string`)}return key2=(0,resolve_1.normalizeId)(key2||id2),this._checkUnique(key2),this.schemas[key2]=this._addSchema(schema,_meta,key2,_validateSchema,!0),this}addMetaSchema(schema,key2,_validateSchema=this.opts.validateSchema){return this.addSchema(schema,key2,!0,_validateSchema),this}validateSchema(schema,throwOrLogError){ if(typeof schema=="boolean")return!0;let $schema2;if($schema2=schema.$schema,$schema2!==void 0&&typeof $schema2!="string")throw new Error("$schema must be a string");if($schema2=$schema2||this.opts.defaultMeta||this.defaultMeta(),!$schema2)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const valid2=this.validate($schema2,schema);if(!valid2&&throwOrLogError){const message="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(message);else throw new Error(message)}return valid2}getSchema(keyRef){let sch;for(;typeof(sch=getSchEnv.call(this,keyRef))=="string";)keyRef=sch;if(sch===void 0){const{schemaId}=this.opts,root2=new compile_1.SchemaEnv({schema:{},schemaId});if(sch=compile_1.resolveSchema.call(this,root2,keyRef),!sch)return;this.refs[keyRef]=sch}return sch.validate||this._compileSchemaEnv(sch)}removeSchema(schemaKeyRef){if(schemaKeyRef instanceof RegExp)return this._removeAllSchemas(this.schemas,schemaKeyRef),this._removeAllSchemas( this.refs,schemaKeyRef),this;switch(typeof schemaKeyRef){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const sch=getSchEnv.call(this,schemaKeyRef);return typeof sch=="object"&&this._cache.delete(sch.schema),delete this.schemas[schemaKeyRef],delete this.refs[schemaKeyRef],this}case"object":{const cacheKey=schemaKeyRef;this._cache.delete(cacheKey);let id2=schemaKeyRef[this.opts.schemaId];return id2&&(id2=(0,resolve_1. normalizeId)(id2),delete this.schemas[id2],delete this.refs[id2]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(definitions2){for(const def of definitions2)this.addKeyword(def);return this}addKeyword(kwdOrDef,def){let keyword2;if(typeof kwdOrDef=="string")keyword2=kwdOrDef,typeof def=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),def.keyword=keyword2);else if(typeof kwdOrDef=="object"&&def===void 0){if(def=kwdOrDef,keyword2= def.keyword,Array.isArray(keyword2)&&!keyword2.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(checkKeyword.call(this,keyword2,def),!def)return(0,util_1.eachItem)(keyword2,kwd=>addRule.call(this,kwd)),this;keywordMetaschema.call(this,def);const definition2={...def,type:(0,dataType_1.getJSONTypes)(def.type),schemaType:(0,dataType_1.getJSONTypes)(def.schemaType)};return(0,util_1.eachItem)(keyword2,definition2. type.length===0?k=>addRule.call(this,k,definition2):k=>definition2.type.forEach(t=>addRule.call(this,k,definition2,t))),this}getKeyword(keyword2){const rule=this.RULES.all[keyword2];return typeof rule=="object"?rule.definition:!!rule}removeKeyword(keyword2){const{RULES}=this;delete RULES.keywords[keyword2],delete RULES.all[keyword2];for(const group of RULES.rules){const i=group.rules.findIndex(rule=>rule.keyword===keyword2);i>=0&&group.rules.splice(i,1)}return this}addFormat(name,format2){return typeof format2== "string"&&(format2=new RegExp(format2)),this.formats[name]=format2,this}errorsText(errors2=this.errors,{separator=", ",dataVar="data"}={}){return!errors2||errors2.length===0?"No errors":errors2.map(e=>`${dataVar}${e.instancePath} ${e.message}`).reduce((text2,msg)=>text2+separator+msg)}$dataMetaSchema(metaSchema,keywordsJsonPointers){const rules2=this.RULES.all;metaSchema=JSON.parse(JSON.stringify(metaSchema));for(const jsonPointer of keywordsJsonPointers){const segments=jsonPointer.split("/").slice( 1);let keywords2=metaSchema;for(const seg of segments)keywords2=keywords2[seg];for(const key2 in rules2){const rule=rules2[key2];if(typeof rule!="object")continue;const{$data}=rule.definition,schema=keywords2[key2];$data&&schema&&(keywords2[key2]=schemaOrData(schema))}}return metaSchema}_removeAllSchemas(schemas,regex){for(const keyRef in schemas){const sch=schemas[keyRef];(!regex||regex.test(keyRef))&&(typeof sch=="string"?delete schemas[keyRef]:sch&&!sch.meta&&(this._cache.delete(sch.schema),delete schemas[keyRef]))}}_addSchema(schema,meta,baseId,validateSchema=this. opts.validateSchema,addSchema=this.opts.addUsedSchema){let id2;const{schemaId}=this.opts;if(typeof schema=="object")id2=schema[schemaId];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof schema!="boolean")throw new Error("schema must be object or boolean")}let sch=this._cache.get(schema);if(sch!==void 0)return sch;baseId=(0,resolve_1.normalizeId)(id2||baseId);const localRefs=resolve_1.getSchemaRefs.call(this,schema,baseId);return sch=new compile_1.SchemaEnv({schema,schemaId, meta,baseId,localRefs}),this._cache.set(sch.schema,sch),addSchema&&!baseId.startsWith("#")&&(baseId&&this._checkUnique(baseId),this.refs[baseId]=sch),validateSchema&&this.validateSchema(schema,!0),sch}_checkUnique(id2){if(this.schemas[id2]||this.refs[id2])throw new Error(`schema with key or id "${id2}" already exists`)}_compileSchemaEnv(sch){if(sch.meta?this._compileMetaSchema(sch):compile_1.compileSchema.call(this,sch),!sch.validate)throw new Error("ajv implementation error");return sch.validate}_compileMetaSchema(sch){ const currentOpts=this.opts;this.opts=this._metaOpts;try{compile_1.compileSchema.call(this,sch)}finally{this.opts=currentOpts}}}Ajv2.ValidationError=validation_error_1.default,Ajv2.MissingRefError=ref_error_1.default,exports.default=Ajv2;function checkOptions(checkOpts,options,msg,log="error"){for(const key2 in checkOpts){const opt=key2;opt in options&&this.logger[log](`${msg}: option ${key2}. ${checkOpts[opt]}`)}}function getSchEnv(keyRef){return keyRef=(0,resolve_1.normalizeId)(keyRef),this.schemas[keyRef]|| this.refs[keyRef]}function addInitialSchemas(){const optsSchemas=this.opts.schemas;if(optsSchemas)if(Array.isArray(optsSchemas))this.addSchema(optsSchemas);else for(const key2 in optsSchemas)this.addSchema(optsSchemas[key2],key2)}function addInitialFormats(){for(const name in this.opts.formats){const format2=this.opts.formats[name];format2&&this.addFormat(name,format2)}}function addInitialKeywords(defs){if(Array.isArray(defs)){this.addVocabulary(defs);return}this.logger.warn("keywords option as \ map is deprecated, pass array");for(const keyword2 in defs){const def=defs[keyword2];def.keyword||(def.keyword=keyword2),this.addKeyword(def)}}function getMetaSchemaOptions(){const metaOpts={...this.opts};for(const opt of META_IGNORE_OPTIONS)delete metaOpts[opt];return metaOpts}const noLogs={log(){},warn(){},error(){}};function getLogger(logger){if(logger===!1)return noLogs;if(logger===void 0)return console;if(logger.log&&logger.warn&&logger.error)return logger;throw new Error("logger must imple\ ment log, warn and error methods")}const KEYWORD_NAME=/^[a-z_$][a-z0-9_$:-]*$/i;function checkKeyword(keyword2,def){const{RULES}=this;if((0,util_1.eachItem)(keyword2,kwd=>{if(RULES.keywords[kwd])throw new Error(`Keyword ${kwd} is already defined`);if(!KEYWORD_NAME.test(kwd))throw new Error(`Keyword ${kwd} has invalid name`)}),!!def&&def.$data&&!("code"in def||"validate"in def))throw new Error('$data keyword must have "code" or "validate" function')}function addRule(keyword2,definition2,dataType2){ var _a2;const post=definition2?.post;if(dataType2&&post)throw new Error('keyword with "post" flag cannot have "type"');const{RULES}=this;let ruleGroup=post?RULES.post:RULES.rules.find(({type:t})=>t===dataType2);if(ruleGroup||(ruleGroup={type:dataType2,rules:[]},RULES.rules.push(ruleGroup)),RULES.keywords[keyword2]=!0,!definition2)return;const rule={keyword:keyword2,definition:{...definition2,type:(0,dataType_1.getJSONTypes)(definition2.type),schemaType:(0,dataType_1.getJSONTypes)(definition2.schemaType)}}; definition2.before?addBeforeRule.call(this,ruleGroup,rule,definition2.before):ruleGroup.rules.push(rule),RULES.all[keyword2]=rule,(_a2=definition2.implements)===null||_a2===void 0||_a2.forEach(kwd=>this.addKeyword(kwd))}function addBeforeRule(ruleGroup,rule,before){const i=ruleGroup.rules.findIndex(_rule=>_rule.keyword===before);i>=0?ruleGroup.rules.splice(i,0,rule):(ruleGroup.rules.push(rule),this.logger.warn(`rule ${before} is not defined`))}function keywordMetaschema(def){let{metaSchema}=def; metaSchema!==void 0&&(def.$data&&this.opts.$data&&(metaSchema=schemaOrData(metaSchema)),def.validateSchema=this.compile(metaSchema,!0))}const $dataRef={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function schemaOrData(schema){return{anyOf:[schema,$dataRef]}}}(core$4)),core$4}var draft7$1={},core$3={},id$1={},hasRequiredId$1;function requireId$1(){if(hasRequiredId$1)return id$1;hasRequiredId$1=1,Object.defineProperty(id$1,"__esModule",{value:!0});const def={ keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return id$1.default=def,id$1}var ref$1={},hasRequiredRef$1;function requireRef$1(){if(hasRequiredRef$1)return ref$1;hasRequiredRef$1=1,Object.defineProperty(ref$1,"__esModule",{value:!0}),ref$1.callRef=ref$1.getValidate=void 0;const ref_error_1=requireRef_error$1(),code_1=requireCode$2(),codegen_1=requireCodegen$1(),names_1=requireNames$1(),compile_1=requireCompile$1(),util_1=requireUtil$1(),def={keyword:"\ $ref",schemaType:"string",code(cxt){const{gen,schema:$ref,it}=cxt,{baseId,schemaEnv:env2,validateName,opts,self:self2}=it,{root:root2}=env2;if(($ref==="#"||$ref==="#/")&&baseId===root2.baseId)return callRootRef();const schOrEnv=compile_1.resolveRef.call(self2,root2,baseId,$ref);if(schOrEnv===void 0)throw new ref_error_1.default(it.opts.uriResolver,baseId,$ref);if(schOrEnv instanceof compile_1.SchemaEnv)return callValidate(schOrEnv);return inlineRefSchema(schOrEnv);function callRootRef(){if(env2=== root2)return callRef(cxt,validateName,env2,env2.$async);const rootName=gen.scopeValue("root",{ref:root2});return callRef(cxt,(0,codegen_1._)`${rootName}.validate`,root2,root2.$async)}function callValidate(sch){const v=getValidate(cxt,sch);callRef(cxt,v,sch,sch.$async)}function inlineRefSchema(sch){const schName=gen.scopeValue("schema",opts.code.source===!0?{ref:sch,code:(0,codegen_1.stringify)(sch)}:{ref:sch}),valid2=gen.name("valid"),schCxt=cxt.subschema({schema:sch,dataTypes:[],schemaPath:codegen_1. nil,topSchemaRef:schName,errSchemaPath:$ref},valid2);cxt.mergeEvaluated(schCxt),cxt.ok(valid2)}}};function getValidate(cxt,sch){const{gen}=cxt;return sch.validate?gen.scopeValue("validate",{ref:sch.validate}):(0,codegen_1._)`${gen.scopeValue("wrapper",{ref:sch})}.validate`}ref$1.getValidate=getValidate;function callRef(cxt,v,sch,$async){const{gen,it}=cxt,{allErrors,schemaEnv:env2,opts}=it,passCxt=opts.passContext?names_1.default.this:codegen_1.nil;$async?callAsyncRef():callSyncRef();function callAsyncRef(){ if(!env2.$async)throw new Error("async schema referenced by sync schema");const valid2=gen.let("valid");gen.try(()=>{gen.code((0,codegen_1._)`await ${(0,code_1.callValidateCode)(cxt,v,passCxt)}`),addEvaluatedFrom(v),allErrors||gen.assign(valid2,!0)},e=>{gen.if((0,codegen_1._)`!(${e} instanceof ${it.ValidationError})`,()=>gen.throw(e)),addErrorsFrom(e),allErrors||gen.assign(valid2,!1)}),cxt.ok(valid2)}function callSyncRef(){cxt.result((0,code_1.callValidateCode)(cxt,v,passCxt),()=>addEvaluatedFrom( v),()=>addErrorsFrom(v))}function addErrorsFrom(source2){const errs=(0,codegen_1._)`${source2}.errors`;gen.assign(names_1.default.vErrors,(0,codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`),gen.assign(names_1.default.errors,(0,codegen_1._)`${names_1.default.vErrors}.length`)}function addEvaluatedFrom(source2){var _a2;if(!it.opts.unevaluated)return;const schEvaluated=(_a2=sch?.validate)===null||_a2===void 0?void 0:_a2.evaluated;if(it.props!== !0)if(schEvaluated&&!schEvaluated.dynamicProps)schEvaluated.props!==void 0&&(it.props=util_1.mergeEvaluated.props(gen,schEvaluated.props,it.props));else{const props=gen.var("props",(0,codegen_1._)`${source2}.evaluated.props`);it.props=util_1.mergeEvaluated.props(gen,props,it.props,codegen_1.Name)}if(it.items!==!0)if(schEvaluated&&!schEvaluated.dynamicItems)schEvaluated.items!==void 0&&(it.items=util_1.mergeEvaluated.items(gen,schEvaluated.items,it.items));else{const items2=gen.var("items",(0,codegen_1. _)`${source2}.evaluated.items`);it.items=util_1.mergeEvaluated.items(gen,items2,it.items,codegen_1.Name)}}}return ref$1.callRef=callRef,ref$1.default=def,ref$1}var hasRequiredCore$2;function requireCore$2(){if(hasRequiredCore$2)return core$3;hasRequiredCore$2=1,Object.defineProperty(core$3,"__esModule",{value:!0});const id_1=requireId$1(),ref_1=requireRef$1(),core2=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",id_1.default,ref_1.default];return core$3.default=core2,core$3} var validation$1={},limitNumber$1={},hasRequiredLimitNumber$1;function requireLimitNumber$1(){if(hasRequiredLimitNumber$1)return limitNumber$1;hasRequiredLimitNumber$1=1,Object.defineProperty(limitNumber$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),ops=codegen_1.operators,KWDs={maximum:{okStr:"<=",ok:ops.LTE,fail:ops.GT},minimum:{okStr:">=",ok:ops.GTE,fail:ops.LT},exclusiveMaximum:{okStr:"<",ok:ops.LT,fail:ops.GTE},exclusiveMinimum:{okStr:">",ok:ops.GT,fail:ops.LTE}},error2={message:({ keyword:keyword2,schemaCode})=>(0,codegen_1.str)`must be ${KWDs[keyword2].okStr} ${schemaCode}`,params:({keyword:keyword2,schemaCode})=>(0,codegen_1._)`{comparison: ${KWDs[keyword2].okStr}, limit: ${schemaCode}}`},def={keyword:Object.keys(KWDs),type:"number",schemaType:"number",$data:!0,error:error2,code(cxt){const{keyword:keyword2,data,schemaCode}=cxt;cxt.fail$data((0,codegen_1._)`${data} ${KWDs[keyword2].fail} ${schemaCode} || isNaN(${data})`)}};return limitNumber$1.default=def,limitNumber$1}var multipleOf$1={}, hasRequiredMultipleOf$1;function requireMultipleOf$1(){if(hasRequiredMultipleOf$1)return multipleOf$1;hasRequiredMultipleOf$1=1,Object.defineProperty(multipleOf$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),def={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode})=>(0,codegen_1.str)`must be multiple of ${schemaCode}`,params:({schemaCode})=>(0,codegen_1._)`{multipleOf: ${schemaCode}}`},code(cxt){const{gen,data,schemaCode,it}=cxt,prec=it.opts. multipleOfPrecision,res=gen.let("res"),invalid2=prec?(0,codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}`:(0,codegen_1._)`${res} !== parseInt(${res})`;cxt.fail$data((0,codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid2}))`)}};return multipleOf$1.default=def,multipleOf$1}var limitLength$1={},ucs2length$1={},hasRequiredUcs2length$1;function requireUcs2length$1(){if(hasRequiredUcs2length$1)return ucs2length$1;hasRequiredUcs2length$1=1,Object.defineProperty( ucs2length$1,"__esModule",{value:!0});function ucs2length2(str){const len=str.length;let length=0,pos=0,value;for(;pos=55296&&value<=56319&&pos(0,codegen_1._)`{limit: ${schemaCode}}`},code(cxt){const{keyword:keyword2, data,schemaCode,it}=cxt,op2=keyword2==="maxLength"?codegen_1.operators.GT:codegen_1.operators.LT,len=it.opts.unicode===!1?(0,codegen_1._)`${data}.length`:(0,codegen_1._)`${(0,util_1.useFunc)(cxt.gen,ucs2length_1.default)}(${data})`;cxt.fail$data((0,codegen_1._)`${len} ${op2} ${schemaCode}`)}};return limitLength$1.default=def,limitLength$1}var pattern$1={},hasRequiredPattern$1;function requirePattern$1(){if(hasRequiredPattern$1)return pattern$1;hasRequiredPattern$1=1,Object.defineProperty(pattern$1, "__esModule",{value:!0});const code_1=requireCode$2(),codegen_1=requireCodegen$1(),def={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode})=>(0,codegen_1.str)`must match pattern "${schemaCode}"`,params:({schemaCode})=>(0,codegen_1._)`{pattern: ${schemaCode}}`},code(cxt){const{data,$data,schema,schemaCode,it}=cxt,u=it.opts.unicodeRegExp?"u":"",regExp=$data?(0,codegen_1._)`(new RegExp(${schemaCode}, ${u}))`:(0,code_1.usePattern)(cxt,schema);cxt.fail$data((0,codegen_1. _)`!${regExp}.test(${data})`)}};return pattern$1.default=def,pattern$1}var limitProperties$1={},hasRequiredLimitProperties$1;function requireLimitProperties$1(){if(hasRequiredLimitProperties$1)return limitProperties$1;hasRequiredLimitProperties$1=1,Object.defineProperty(limitProperties$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),def={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:keyword2,schemaCode}){const comp=keyword2=== "maxProperties"?"more":"fewer";return(0,codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`},params:({schemaCode})=>(0,codegen_1._)`{limit: ${schemaCode}}`},code(cxt){const{keyword:keyword2,data,schemaCode}=cxt,op2=keyword2==="maxProperties"?codegen_1.operators.GT:codegen_1.operators.LT;cxt.fail$data((0,codegen_1._)`Object.keys(${data}).length ${op2} ${schemaCode}`)}};return limitProperties$1.default=def,limitProperties$1}var required$2={},hasRequiredRequired$1;function requireRequired$1(){ if(hasRequiredRequired$1)return required$2;hasRequiredRequired$1=1,Object.defineProperty(required$2,"__esModule",{value:!0});const code_1=requireCode$2(),codegen_1=requireCodegen$1(),util_1=requireUtil$1(),def={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty}})=>(0,codegen_1.str)`must have required property '${missingProperty}'`,params:({params:{missingProperty}})=>(0,codegen_1._)`{missingProperty: ${missingProperty}}`},code(cxt){const{gen,schema, schemaCode,data,$data,it}=cxt,{opts}=it;if(!$data&&schema.length===0)return;const useLoop=schema.length>=opts.loopRequired;if(it.allErrors?allErrorsMode():exitOnErrorMode(),opts.strictRequired){const props=cxt.parentSchema.properties,{definedProperties}=cxt.it;for(const requiredKey of schema)if(props?.[requiredKey]===void 0&&!definedProperties.has(requiredKey)){const schemaPath=it.schemaEnv.baseId+it.errSchemaPath,msg=`required property "${requiredKey}" is not defined at "${schemaPath}" (strictR\ equired)`;(0,util_1.checkStrictMode)(it,msg,it.opts.strictRequired)}}function allErrorsMode(){if(useLoop||$data)cxt.block$data(codegen_1.nil,loopAllRequired);else for(const prop2 of schema)(0,code_1.checkReportMissingProp)(cxt,prop2)}function exitOnErrorMode(){const missing=gen.let("missing");if(useLoop||$data){const valid2=gen.let("valid",!0);cxt.block$data(valid2,()=>loopUntilMissing(missing,valid2)),cxt.ok(valid2)}else gen.if((0,code_1.checkMissingProp)(cxt,schema,missing)),(0,code_1.reportMissingProp)( cxt,missing),gen.else()}function loopAllRequired(){gen.forOf("prop",schemaCode,prop2=>{cxt.setParams({missingProperty:prop2}),gen.if((0,code_1.noPropertyInData)(gen,data,prop2,opts.ownProperties),()=>cxt.error())})}function loopUntilMissing(missing,valid2){cxt.setParams({missingProperty:missing}),gen.forOf(missing,schemaCode,()=>{gen.assign(valid2,(0,code_1.propertyInData)(gen,data,missing,opts.ownProperties)),gen.if((0,codegen_1.not)(valid2),()=>{cxt.error(),gen.break()})},codegen_1.nil)}}};return required$2. default=def,required$2}var limitItems$1={},hasRequiredLimitItems$1;function requireLimitItems$1(){if(hasRequiredLimitItems$1)return limitItems$1;hasRequiredLimitItems$1=1,Object.defineProperty(limitItems$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),def={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:keyword2,schemaCode}){const comp=keyword2==="maxItems"?"more":"fewer";return(0,codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`}, params:({schemaCode})=>(0,codegen_1._)`{limit: ${schemaCode}}`},code(cxt){const{keyword:keyword2,data,schemaCode}=cxt,op2=keyword2==="maxItems"?codegen_1.operators.GT:codegen_1.operators.LT;cxt.fail$data((0,codegen_1._)`${data}.length ${op2} ${schemaCode}`)}};return limitItems$1.default=def,limitItems$1}var uniqueItems$1={},equal$1={},hasRequiredEqual$1;function requireEqual$1(){if(hasRequiredEqual$1)return equal$1;hasRequiredEqual$1=1,Object.defineProperty(equal$1,"__esModule",{value:!0});const equal2=requireFastDeepEqual(); return equal2.code='require("ajv/dist/runtime/equal").default',equal$1.default=equal2,equal$1}var hasRequiredUniqueItems$1;function requireUniqueItems$1(){if(hasRequiredUniqueItems$1)return uniqueItems$1;hasRequiredUniqueItems$1=1,Object.defineProperty(uniqueItems$1,"__esModule",{value:!0});const dataType_1=requireDataType$1(),codegen_1=requireCodegen$1(),util_1=requireUtil$1(),equal_1=requireEqual$1(),def={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{ i,j}})=>(0,codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,params:({params:{i,j}})=>(0,codegen_1._)`{i: ${i}, j: ${j}}`},code(cxt){const{gen,data,$data,schema,parentSchema,schemaCode,it}=cxt;if(!$data&&!schema)return;const valid2=gen.let("valid"),itemTypes=parentSchema.items?(0,dataType_1.getSchemaTypes)(parentSchema.items):[];cxt.block$data(valid2,validateUniqueItems,(0,codegen_1._)`${schemaCode} === false`),cxt.ok(valid2);function validateUniqueItems(){const i=gen. let("i",(0,codegen_1._)`${data}.length`),j=gen.let("j");cxt.setParams({i,j}),gen.assign(valid2,!0),gen.if((0,codegen_1._)`${i} > 1`,()=>(canOptimize()?loopN:loopN2)(i,j))}function canOptimize(){return itemTypes.length>0&&!itemTypes.some(t=>t==="object"||t==="array")}function loopN(i,j){const item=gen.name("item"),wrongType=(0,dataType_1.checkDataTypes)(itemTypes,item,it.opts.strictNumbers,dataType_1.DataType.Wrong),indices=gen.const("indices",(0,codegen_1._)`{}`);gen.for((0,codegen_1._)`;${i}--;`, ()=>{gen.let(item,(0,codegen_1._)`${data}[${i}]`),gen.if(wrongType,(0,codegen_1._)`continue`),itemTypes.length>1&&gen.if((0,codegen_1._)`typeof ${item} == "string"`,(0,codegen_1._)`${item} += "_"`),gen.if((0,codegen_1._)`typeof ${indices}[${item}] == "number"`,()=>{gen.assign(j,(0,codegen_1._)`${indices}[${item}]`),cxt.error(),gen.assign(valid2,!1).break()}).code((0,codegen_1._)`${indices}[${item}] = ${i}`)})}function loopN2(i,j){const eql=(0,util_1.useFunc)(gen,equal_1.default),outer=gen.name("\ outer");gen.label(outer).for((0,codegen_1._)`;${i}--;`,()=>gen.for((0,codegen_1._)`${j} = ${i}; ${j}--;`,()=>gen.if((0,codegen_1._)`${eql}(${data}[${i}], ${data}[${j}])`,()=>{cxt.error(),gen.assign(valid2,!1).break(outer)})))}}};return uniqueItems$1.default=def,uniqueItems$1}var _const$1={},hasRequired_const$1;function require_const$1(){if(hasRequired_const$1)return _const$1;hasRequired_const$1=1,Object.defineProperty(_const$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),util_1=requireUtil$1(), equal_1=requireEqual$1(),def={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode})=>(0,codegen_1._)`{allowedValue: ${schemaCode}}`},code(cxt){const{gen,data,$data,schemaCode,schema}=cxt;$data||schema&&typeof schema=="object"?cxt.fail$data((0,codegen_1._)`!${(0,util_1.useFunc)(gen,equal_1.default)}(${data}, ${schemaCode})`):cxt.fail((0,codegen_1._)`${schema} !== ${data}`)}};return _const$1.default=def,_const$1}var _enum$1={},hasRequired_enum$1;function require_enum$1(){ if(hasRequired_enum$1)return _enum$1;hasRequired_enum$1=1,Object.defineProperty(_enum$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),util_1=requireUtil$1(),equal_1=requireEqual$1(),def={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode})=>(0,codegen_1._)`{allowedValues: ${schemaCode}}`},code(cxt){const{gen,data,$data,schema,schemaCode,it}=cxt;if(!$data&&schema.length===0)throw new Error("enum must have non-em\ pty array");const useLoop=schema.length>=it.opts.loopEnum;let eql;const getEql=()=>eql??(eql=(0,util_1.useFunc)(gen,equal_1.default));let valid2;if(useLoop||$data)valid2=gen.let("valid"),cxt.block$data(valid2,loopEnum);else{if(!Array.isArray(schema))throw new Error("ajv implementation error");const vSchema=gen.const("vSchema",schemaCode);valid2=(0,codegen_1.or)(...schema.map((_x,i)=>equalCode(vSchema,i)))}cxt.pass(valid2);function loopEnum(){gen.assign(valid2,!1),gen.forOf("v",schemaCode,v=>gen. if((0,codegen_1._)`${getEql()}(${data}, ${v})`,()=>gen.assign(valid2,!0).break()))}function equalCode(vSchema,i){const sch=schema[i];return typeof sch=="object"&&sch!==null?(0,codegen_1._)`${getEql()}(${data}, ${vSchema}[${i}])`:(0,codegen_1._)`${data} === ${sch}`}}};return _enum$1.default=def,_enum$1}var hasRequiredValidation$1;function requireValidation$1(){if(hasRequiredValidation$1)return validation$1;hasRequiredValidation$1=1,Object.defineProperty(validation$1,"__esModule",{value:!0});const limitNumber_1=requireLimitNumber$1(), multipleOf_1=requireMultipleOf$1(),limitLength_1=requireLimitLength$1(),pattern_1=requirePattern$1(),limitProperties_1=requireLimitProperties$1(),required_1=requireRequired$1(),limitItems_1=requireLimitItems$1(),uniqueItems_1=requireUniqueItems$1(),const_1=require_const$1(),enum_1=require_enum$1(),validation2=[limitNumber_1.default,multipleOf_1.default,limitLength_1.default,pattern_1.default,limitProperties_1.default,required_1.default,limitItems_1.default,uniqueItems_1.default,{keyword:"type",schemaType:[ "string","array"]},{keyword:"nullable",schemaType:"boolean"},const_1.default,enum_1.default];return validation$1.default=validation2,validation$1}var applicator$1={},additionalItems$1={},hasRequiredAdditionalItems$1;function requireAdditionalItems$1(){if(hasRequiredAdditionalItems$1)return additionalItems$1;hasRequiredAdditionalItems$1=1,Object.defineProperty(additionalItems$1,"__esModule",{value:!0}),additionalItems$1.validateAdditionalItems=void 0;const codegen_1=requireCodegen$1(),util_1=requireUtil$1(), def={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len}})=>(0,codegen_1.str)`must NOT have more than ${len} items`,params:({params:{len}})=>(0,codegen_1._)`{limit: ${len}}`},code(cxt){const{parentSchema,it}=cxt,{items:items2}=parentSchema;if(!Array.isArray(items2)){(0,util_1.checkStrictMode)(it,'"additionalItems" is ignored when "items" is not an array of schemas');return}validateAdditionalItems(cxt,items2)}};function validateAdditionalItems(cxt,items2){ const{gen,schema,data,keyword:keyword2,it}=cxt;it.items=!0;const len=gen.const("len",(0,codegen_1._)`${data}.length`);if(schema===!1)cxt.setParams({len:items2.length}),cxt.pass((0,codegen_1._)`${len} <= ${items2.length}`);else if(typeof schema=="object"&&!(0,util_1.alwaysValidSchema)(it,schema)){const valid2=gen.var("valid",(0,codegen_1._)`${len} <= ${items2.length}`);gen.if((0,codegen_1.not)(valid2),()=>validateItems(valid2)),cxt.ok(valid2)}function validateItems(valid2){gen.forRange("i",items2. length,len,i=>{cxt.subschema({keyword:keyword2,dataProp:i,dataPropType:util_1.Type.Num},valid2),it.allErrors||gen.if((0,codegen_1.not)(valid2),()=>gen.break())})}}return additionalItems$1.validateAdditionalItems=validateAdditionalItems,additionalItems$1.default=def,additionalItems$1}var prefixItems$1={},items$1={},hasRequiredItems$1;function requireItems$1(){if(hasRequiredItems$1)return items$1;hasRequiredItems$1=1,Object.defineProperty(items$1,"__esModule",{value:!0}),items$1.validateTuple=void 0; const codegen_1=requireCodegen$1(),util_1=requireUtil$1(),code_1=requireCode$2(),def={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(cxt){const{schema,it}=cxt;if(Array.isArray(schema))return validateTuple(cxt,"additionalItems",schema);it.items=!0,!(0,util_1.alwaysValidSchema)(it,schema)&&cxt.ok((0,code_1.validateArray)(cxt))}};function validateTuple(cxt,extraItems,schArr=cxt.schema){const{gen,parentSchema,data,keyword:keyword2,it}=cxt;checkStrictTuple( parentSchema),it.opts.unevaluated&&schArr.length&&it.items!==!0&&(it.items=util_1.mergeEvaluated.items(gen,schArr.length,it.items));const valid2=gen.name("valid"),len=gen.const("len",(0,codegen_1._)`${data}.length`);schArr.forEach((sch,i)=>{(0,util_1.alwaysValidSchema)(it,sch)||(gen.if((0,codegen_1._)`${len} > ${i}`,()=>cxt.subschema({keyword:keyword2,schemaProp:i,dataProp:i},valid2)),cxt.ok(valid2))});function checkStrictTuple(sch){const{opts,errSchemaPath}=it,l=schArr.length,fullTuple=l===sch. minItems&&(l===sch.maxItems||sch[extraItems]===!1);if(opts.strictTuples&&!fullTuple){const msg=`"${keyword2}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`;(0,util_1.checkStrictMode)(it,msg,opts.strictTuples)}}}return items$1.validateTuple=validateTuple,items$1.default=def,items$1}var hasRequiredPrefixItems$1;function requirePrefixItems$1(){if(hasRequiredPrefixItems$1)return prefixItems$1;hasRequiredPrefixItems$1=1,Object.defineProperty( prefixItems$1,"__esModule",{value:!0});const items_1=requireItems$1(),def={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:cxt=>(0,items_1.validateTuple)(cxt,"items")};return prefixItems$1.default=def,prefixItems$1}var items2020$1={},hasRequiredItems2020$1;function requireItems2020$1(){if(hasRequiredItems2020$1)return items2020$1;hasRequiredItems2020$1=1,Object.defineProperty(items2020$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),util_1=requireUtil$1(), code_1=requireCode$2(),additionalItems_1=requireAdditionalItems$1(),def={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len}})=>(0,codegen_1.str)`must NOT have more than ${len} items`,params:({params:{len}})=>(0,codegen_1._)`{limit: ${len}}`},code(cxt){const{schema,parentSchema,it}=cxt,{prefixItems:prefixItems2}=parentSchema;it.items=!0,!(0,util_1.alwaysValidSchema)(it,schema)&&(prefixItems2?(0,additionalItems_1.validateAdditionalItems)( cxt,prefixItems2):cxt.ok((0,code_1.validateArray)(cxt)))}};return items2020$1.default=def,items2020$1}var contains$2={},hasRequiredContains$1;function requireContains$1(){if(hasRequiredContains$1)return contains$2;hasRequiredContains$1=1,Object.defineProperty(contains$2,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),util_1=requireUtil$1(),def={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:min2,max:max2}})=>max2=== void 0?(0,codegen_1.str)`must contain at least ${min2} valid item(s)`:(0,codegen_1.str)`must contain at least ${min2} and no more than ${max2} valid item(s)`,params:({params:{min:min2,max:max2}})=>max2===void 0?(0,codegen_1._)`{minContains: ${min2}}`:(0,codegen_1._)`{minContains: ${min2}, maxContains: ${max2}}`},code(cxt){const{gen,schema,parentSchema,data,it}=cxt;let min2,max2;const{minContains,maxContains}=parentSchema;it.opts.next?(min2=minContains===void 0?1:minContains,max2=maxContains):min2= 1;const len=gen.const("len",(0,codegen_1._)`${data}.length`);if(cxt.setParams({min:min2,max:max2}),max2===void 0&&min2===0){(0,util_1.checkStrictMode)(it,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(max2!==void 0&&min2>max2){(0,util_1.checkStrictMode)(it,'"minContains" > "maxContains" is always invalid'),cxt.fail();return}if((0,util_1.alwaysValidSchema)(it,schema)){let cond=(0,codegen_1._)`${len} >= ${min2}`;max2!==void 0&&(cond=(0,codegen_1._)`${cond} && ${len} <= ${max2}`), cxt.pass(cond);return}it.items=!0;const valid2=gen.name("valid");max2===void 0&&min2===1?validateItems(valid2,()=>gen.if(valid2,()=>gen.break())):min2===0?(gen.let(valid2,!0),max2!==void 0&&gen.if((0,codegen_1._)`${data}.length > 0`,validateItemsWithCount)):(gen.let(valid2,!1),validateItemsWithCount()),cxt.result(valid2,()=>cxt.reset());function validateItemsWithCount(){const schValid=gen.name("_valid"),count=gen.let("count",0);validateItems(schValid,()=>gen.if(schValid,()=>checkLimits(count)))} function validateItems(_valid,block2){gen.forRange("i",0,len,i=>{cxt.subschema({keyword:"contains",dataProp:i,dataPropType:util_1.Type.Num,compositeRule:!0},_valid),block2()})}function checkLimits(count){gen.code((0,codegen_1._)`${count}++`),max2===void 0?gen.if((0,codegen_1._)`${count} >= ${min2}`,()=>gen.assign(valid2,!0).break()):(gen.if((0,codegen_1._)`${count} > ${max2}`,()=>gen.assign(valid2,!1).break()),min2===1?gen.assign(valid2,!0):gen.if((0,codegen_1._)`${count} >= ${min2}`,()=>gen.assign( valid2,!0)))}}};return contains$2.default=def,contains$2}var dependencies$1={},hasRequiredDependencies$1;function requireDependencies$1(){return hasRequiredDependencies$1||(hasRequiredDependencies$1=1,function(exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.validateSchemaDeps=exports.validatePropertyDeps=exports.error=void 0;const codegen_1=requireCodegen$1(),util_1=requireUtil$1(),code_1=requireCode$2();exports.error={message:({params:{property,depsCount,deps}})=>{const property_ies=depsCount=== 1?"property":"properties";return(0,codegen_1.str)`must have ${property_ies} ${deps} when property ${property} is present`},params:({params:{property,depsCount,deps,missingProperty}})=>(0,codegen_1._)`{property: ${property}, missingProperty: ${missingProperty}, depsCount: ${depsCount}, deps: ${deps}}`};const def={keyword:"dependencies",type:"object",schemaType:"object",error:exports.error,code(cxt){const[propDeps,schDeps]=splitDependencies(cxt);validatePropertyDeps(cxt,propDeps),validateSchemaDeps(cxt,schDeps)}};function splitDependencies({schema}){const propertyDeps={},schemaDeps={};for(const key2 in schema){if(key2==="__proto__")continue;const deps=Array.isArray(schema[key2])?propertyDeps:schemaDeps;deps[key2]=schema[key2]}return[propertyDeps,schemaDeps]}function validatePropertyDeps(cxt,propertyDeps=cxt. schema){const{gen,data,it}=cxt;if(Object.keys(propertyDeps).length===0)return;const missing=gen.let("missing");for(const prop2 in propertyDeps){const deps=propertyDeps[prop2];if(deps.length===0)continue;const hasProperty=(0,code_1.propertyInData)(gen,data,prop2,it.opts.ownProperties);cxt.setParams({property:prop2,depsCount:deps.length,deps:deps.join(", ")}),it.allErrors?gen.if(hasProperty,()=>{for(const depProp of deps)(0,code_1.checkReportMissingProp)(cxt,depProp)}):(gen.if((0,codegen_1._)`${hasProperty} && (${(0,code_1. checkMissingProp)(cxt,deps,missing)})`),(0,code_1.reportMissingProp)(cxt,missing),gen.else())}}exports.validatePropertyDeps=validatePropertyDeps;function validateSchemaDeps(cxt,schemaDeps=cxt.schema){const{gen,data,keyword:keyword2,it}=cxt,valid2=gen.name("valid");for(const prop2 in schemaDeps)(0,util_1.alwaysValidSchema)(it,schemaDeps[prop2])||(gen.if((0,code_1.propertyInData)(gen,data,prop2,it.opts.ownProperties),()=>{const schCxt=cxt.subschema({keyword:keyword2,schemaProp:prop2},valid2);cxt.mergeValidEvaluated( schCxt,valid2)},()=>gen.var(valid2,!0)),cxt.ok(valid2))}exports.validateSchemaDeps=validateSchemaDeps,exports.default=def}(dependencies$1)),dependencies$1}var propertyNames$1={},hasRequiredPropertyNames$1;function requirePropertyNames$1(){if(hasRequiredPropertyNames$1)return propertyNames$1;hasRequiredPropertyNames$1=1,Object.defineProperty(propertyNames$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),util_1=requireUtil$1(),def={keyword:"propertyNames",type:"object",schemaType:["ob\ ject","boolean"],error:{message:"property name must be valid",params:({params})=>(0,codegen_1._)`{propertyName: ${params.propertyName}}`},code(cxt){const{gen,schema,data,it}=cxt;if((0,util_1.alwaysValidSchema)(it,schema))return;const valid2=gen.name("valid");gen.forIn("key",data,key2=>{cxt.setParams({propertyName:key2}),cxt.subschema({keyword:"propertyNames",data:key2,dataTypes:["string"],propertyName:key2,compositeRule:!0},valid2),gen.if((0,codegen_1.not)(valid2),()=>{cxt.error(!0),it.allErrors|| gen.break()})}),cxt.ok(valid2)}};return propertyNames$1.default=def,propertyNames$1}var additionalProperties$2={},hasRequiredAdditionalProperties$1;function requireAdditionalProperties$1(){if(hasRequiredAdditionalProperties$1)return additionalProperties$2;hasRequiredAdditionalProperties$1=1,Object.defineProperty(additionalProperties$2,"__esModule",{value:!0});const code_1=requireCode$2(),codegen_1=requireCodegen$1(),names_1=requireNames$1(),util_1=requireUtil$1(),def={keyword:"additionalProperti\ es",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params})=>(0,codegen_1._)`{additionalProperty: ${params.additionalProperty}}`},code(cxt){const{gen,schema,parentSchema,data,errsCount,it}=cxt;if(!errsCount)throw new Error("ajv implementation error");const{allErrors,opts}=it;if(it.props=!0,opts.removeAdditional!=="all"&&(0,util_1.alwaysValidSchema)(it,schema))return;const props=(0,code_1.allSchemaProperties)( parentSchema.properties),patProps=(0,code_1.allSchemaProperties)(parentSchema.patternProperties);checkAdditionalProperties(),cxt.ok((0,codegen_1._)`${errsCount} === ${names_1.default.errors}`);function checkAdditionalProperties(){gen.forIn("key",data,key2=>{!props.length&&!patProps.length?additionalPropertyCode(key2):gen.if(isAdditional(key2),()=>additionalPropertyCode(key2))})}function isAdditional(key2){let definedProp;if(props.length>8){const propsSchema=(0,util_1.schemaRefOrVal)(it,parentSchema. properties,"properties");definedProp=(0,code_1.isOwnProperty)(gen,propsSchema,key2)}else props.length?definedProp=(0,codegen_1.or)(...props.map(p2=>(0,codegen_1._)`${key2} === ${p2}`)):definedProp=codegen_1.nil;return patProps.length&&(definedProp=(0,codegen_1.or)(definedProp,...patProps.map(p2=>(0,codegen_1._)`${(0,code_1.usePattern)(cxt,p2)}.test(${key2})`))),(0,codegen_1.not)(definedProp)}function deleteAdditional(key2){gen.code((0,codegen_1._)`delete ${data}[${key2}]`)}function additionalPropertyCode(key2){ if(opts.removeAdditional==="all"||opts.removeAdditional&&schema===!1){deleteAdditional(key2);return}if(schema===!1){cxt.setParams({additionalProperty:key2}),cxt.error(),allErrors||gen.break();return}if(typeof schema=="object"&&!(0,util_1.alwaysValidSchema)(it,schema)){const valid2=gen.name("valid");opts.removeAdditional==="failing"?(applyAdditionalSchema(key2,valid2,!1),gen.if((0,codegen_1.not)(valid2),()=>{cxt.reset(),deleteAdditional(key2)})):(applyAdditionalSchema(key2,valid2),allErrors||gen. if((0,codegen_1.not)(valid2),()=>gen.break()))}}function applyAdditionalSchema(key2,valid2,errors2){const subschema2={keyword:"additionalProperties",dataProp:key2,dataPropType:util_1.Type.Str};errors2===!1&&Object.assign(subschema2,{compositeRule:!0,createErrors:!1,allErrors:!1}),cxt.subschema(subschema2,valid2)}}};return additionalProperties$2.default=def,additionalProperties$2}var properties$5={},hasRequiredProperties$1;function requireProperties$1(){if(hasRequiredProperties$1)return properties$5; hasRequiredProperties$1=1,Object.defineProperty(properties$5,"__esModule",{value:!0});const validate_1=requireValidate$1(),code_1=requireCode$2(),util_1=requireUtil$1(),additionalProperties_1=requireAdditionalProperties$1(),def={keyword:"properties",type:"object",schemaType:"object",code(cxt){const{gen,schema,parentSchema,data,it}=cxt;it.opts.removeAdditional==="all"&&parentSchema.additionalProperties===void 0&&additionalProperties_1.default.code(new validate_1.KeywordCxt(it,additionalProperties_1. default,"additionalProperties"));const allProps=(0,code_1.allSchemaProperties)(schema);for(const prop2 of allProps)it.definedProperties.add(prop2);it.opts.unevaluated&&allProps.length&&it.props!==!0&&(it.props=util_1.mergeEvaluated.props(gen,(0,util_1.toHash)(allProps),it.props));const properties2=allProps.filter(p2=>!(0,util_1.alwaysValidSchema)(it,schema[p2]));if(properties2.length===0)return;const valid2=gen.name("valid");for(const prop2 of properties2)hasDefault(prop2)?applyPropertySchema(prop2): (gen.if((0,code_1.propertyInData)(gen,data,prop2,it.opts.ownProperties)),applyPropertySchema(prop2),it.allErrors||gen.else().var(valid2,!0),gen.endIf()),cxt.it.definedProperties.add(prop2),cxt.ok(valid2);function hasDefault(prop2){return it.opts.useDefaults&&!it.compositeRule&&schema[prop2].default!==void 0}function applyPropertySchema(prop2){cxt.subschema({keyword:"properties",schemaProp:prop2,dataProp:prop2},valid2)}}};return properties$5.default=def,properties$5}var patternProperties$1={},hasRequiredPatternProperties$1; function requirePatternProperties$1(){if(hasRequiredPatternProperties$1)return patternProperties$1;hasRequiredPatternProperties$1=1,Object.defineProperty(patternProperties$1,"__esModule",{value:!0});const code_1=requireCode$2(),codegen_1=requireCodegen$1(),util_1=requireUtil$1(),util_2=requireUtil$1(),def={keyword:"patternProperties",type:"object",schemaType:"object",code(cxt){const{gen,schema,data,parentSchema,it}=cxt,{opts}=it,patterns=(0,code_1.allSchemaProperties)(schema),alwaysValidPatterns=patterns. filter(p2=>(0,util_1.alwaysValidSchema)(it,schema[p2]));if(patterns.length===0||alwaysValidPatterns.length===patterns.length&&(!it.opts.unevaluated||it.props===!0))return;const checkProperties=opts.strictSchema&&!opts.allowMatchingProperties&&parentSchema.properties,valid2=gen.name("valid");it.props!==!0&&!(it.props instanceof codegen_1.Name)&&(it.props=(0,util_2.evaluatedPropsToName)(gen,it.props));const{props}=it;validatePatternProperties();function validatePatternProperties(){for(const pat of patterns) checkProperties&&checkMatchingProperties(pat),it.allErrors?validateProperties(pat):(gen.var(valid2,!0),validateProperties(pat),gen.if(valid2))}function checkMatchingProperties(pat){for(const prop2 in checkProperties)new RegExp(pat).test(prop2)&&(0,util_1.checkStrictMode)(it,`property ${prop2} matches pattern ${pat} (use allowMatchingProperties)`)}function validateProperties(pat){gen.forIn("key",data,key2=>{gen.if((0,codegen_1._)`${(0,code_1.usePattern)(cxt,pat)}.test(${key2})`,()=>{const alwaysValid=alwaysValidPatterns. includes(pat);alwaysValid||cxt.subschema({keyword:"patternProperties",schemaProp:pat,dataProp:key2,dataPropType:util_2.Type.Str},valid2),it.opts.unevaluated&&props!==!0?gen.assign((0,codegen_1._)`${props}[${key2}]`,!0):!alwaysValid&&!it.allErrors&&gen.if((0,codegen_1.not)(valid2),()=>gen.break())})})}}};return patternProperties$1.default=def,patternProperties$1}var not$1={},hasRequiredNot$1;function requireNot$1(){if(hasRequiredNot$1)return not$1;hasRequiredNot$1=1,Object.defineProperty(not$1,"_\ _esModule",{value:!0});const util_1=requireUtil$1(),def={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(cxt){const{gen,schema,it}=cxt;if((0,util_1.alwaysValidSchema)(it,schema)){cxt.fail();return}const valid2=gen.name("valid");cxt.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},valid2),cxt.failResult(valid2,()=>cxt.reset(),()=>cxt.error())},error:{message:"must NOT be valid"}};return not$1.default=def,not$1}var anyOf$1={},hasRequiredAnyOf$1;function requireAnyOf$1(){ if(hasRequiredAnyOf$1)return anyOf$1;hasRequiredAnyOf$1=1,Object.defineProperty(anyOf$1,"__esModule",{value:!0});const def={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:requireCode$2().validateUnion,error:{message:"must match a schema in anyOf"}};return anyOf$1.default=def,anyOf$1}var oneOf$1={},hasRequiredOneOf$1;function requireOneOf$1(){if(hasRequiredOneOf$1)return oneOf$1;hasRequiredOneOf$1=1,Object.defineProperty(oneOf$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(), util_1=requireUtil$1(),def={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params})=>(0,codegen_1._)`{passingSchemas: ${params.passing}}`},code(cxt){const{gen,schema,parentSchema,it}=cxt;if(!Array.isArray(schema))throw new Error("ajv implementation error");if(it.opts.discriminator&&parentSchema.discriminator)return;const schArr=schema,valid2=gen.let("valid",!1),passing=gen.let("passing",null),schValid=gen.name("_valid");cxt.setParams( {passing}),gen.block(validateOneOf),cxt.result(valid2,()=>cxt.reset(),()=>cxt.error(!0));function validateOneOf(){schArr.forEach((sch,i)=>{let schCxt;(0,util_1.alwaysValidSchema)(it,sch)?gen.var(schValid,!0):schCxt=cxt.subschema({keyword:"oneOf",schemaProp:i,compositeRule:!0},schValid),i>0&&gen.if((0,codegen_1._)`${schValid} && ${valid2}`).assign(valid2,!1).assign(passing,(0,codegen_1._)`[${passing}, ${i}]`).else(),gen.if(schValid,()=>{gen.assign(valid2,!0),gen.assign(passing,i),schCxt&&cxt.mergeEvaluated( schCxt,codegen_1.Name)})})}}};return oneOf$1.default=def,oneOf$1}var allOf$1={},hasRequiredAllOf$1;function requireAllOf$1(){if(hasRequiredAllOf$1)return allOf$1;hasRequiredAllOf$1=1,Object.defineProperty(allOf$1,"__esModule",{value:!0});const util_1=requireUtil$1(),def={keyword:"allOf",schemaType:"array",code(cxt){const{gen,schema,it}=cxt;if(!Array.isArray(schema))throw new Error("ajv implementation error");const valid2=gen.name("valid");schema.forEach((sch,i)=>{if((0,util_1.alwaysValidSchema)( it,sch))return;const schCxt=cxt.subschema({keyword:"allOf",schemaProp:i},valid2);cxt.ok(valid2),cxt.mergeEvaluated(schCxt)})}};return allOf$1.default=def,allOf$1}var _if$1={},hasRequired_if$1;function require_if$1(){if(hasRequired_if$1)return _if$1;hasRequired_if$1=1,Object.defineProperty(_if$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),util_1=requireUtil$1(),def={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params})=>(0,codegen_1.str)`must match "${params. ifClause}" schema`,params:({params})=>(0,codegen_1._)`{failingKeyword: ${params.ifClause}}`},code(cxt){const{gen,parentSchema,it}=cxt;parentSchema.then===void 0&&parentSchema.else===void 0&&(0,util_1.checkStrictMode)(it,'"if" without "then" and "else" is ignored');const hasThen=hasSchema(it,"then"),hasElse=hasSchema(it,"else");if(!hasThen&&!hasElse)return;const valid2=gen.let("valid",!0),schValid=gen.name("_valid");if(validateIf(),cxt.reset(),hasThen&&hasElse){const ifClause=gen.let("ifClause"); cxt.setParams({ifClause}),gen.if(schValid,validateClause("then",ifClause),validateClause("else",ifClause))}else hasThen?gen.if(schValid,validateClause("then")):gen.if((0,codegen_1.not)(schValid),validateClause("else"));cxt.pass(valid2,()=>cxt.error(!0));function validateIf(){const schCxt=cxt.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},schValid);cxt.mergeEvaluated(schCxt)}function validateClause(keyword2,ifClause){return()=>{const schCxt=cxt.subschema({keyword:keyword2}, schValid);gen.assign(valid2,schValid),cxt.mergeValidEvaluated(schCxt,valid2),ifClause?gen.assign(ifClause,(0,codegen_1._)`${keyword2}`):cxt.setParams({ifClause:keyword2})}}}};function hasSchema(it,keyword2){const schema=it.schema[keyword2];return schema!==void 0&&!(0,util_1.alwaysValidSchema)(it,schema)}return _if$1.default=def,_if$1}var thenElse$1={},hasRequiredThenElse$1;function requireThenElse$1(){if(hasRequiredThenElse$1)return thenElse$1;hasRequiredThenElse$1=1,Object.defineProperty(thenElse$1, "__esModule",{value:!0});const util_1=requireUtil$1(),def={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:keyword2,parentSchema,it}){parentSchema.if===void 0&&(0,util_1.checkStrictMode)(it,`"${keyword2}" without "if" is ignored`)}};return thenElse$1.default=def,thenElse$1}var hasRequiredApplicator$1;function requireApplicator$1(){if(hasRequiredApplicator$1)return applicator$1;hasRequiredApplicator$1=1,Object.defineProperty(applicator$1,"__esModule",{value:!0});const additionalItems_1=requireAdditionalItems$1(), prefixItems_1=requirePrefixItems$1(),items_1=requireItems$1(),items2020_1=requireItems2020$1(),contains_1=requireContains$1(),dependencies_1=requireDependencies$1(),propertyNames_1=requirePropertyNames$1(),additionalProperties_1=requireAdditionalProperties$1(),properties_12=requireProperties$1(),patternProperties_1=requirePatternProperties$1(),not_1=requireNot$1(),anyOf_1=requireAnyOf$1(),oneOf_1=requireOneOf$1(),allOf_1=requireAllOf$1(),if_1=require_if$1(),thenElse_1=requireThenElse$1();function getApplicator(draft2020=!1){ const applicator2=[not_1.default,anyOf_1.default,oneOf_1.default,allOf_1.default,if_1.default,thenElse_1.default,propertyNames_1.default,additionalProperties_1.default,dependencies_1.default,properties_12.default,patternProperties_1.default];return draft2020?applicator2.push(prefixItems_1.default,items2020_1.default):applicator2.push(additionalItems_1.default,items_1.default),applicator2.push(contains_1.default),applicator2}return applicator$1.default=getApplicator,applicator$1}var format$3={},format$2={}, hasRequiredFormat$3;function requireFormat$3(){if(hasRequiredFormat$3)return format$2;hasRequiredFormat$3=1,Object.defineProperty(format$2,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),def={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode})=>(0,codegen_1.str)`must match format "${schemaCode}"`,params:({schemaCode})=>(0,codegen_1._)`{format: ${schemaCode}}`},code(cxt,ruleType){const{gen,data,$data,schema,schemaCode,it}=cxt,{opts,errSchemaPath, schemaEnv,self:self2}=it;if(!opts.validateFormats)return;$data?validate$DataFormat():validateFormat();function validate$DataFormat(){const fmts=gen.scopeValue("formats",{ref:self2.formats,code:opts.code.formats}),fDef=gen.const("fDef",(0,codegen_1._)`${fmts}[${schemaCode}]`),fType=gen.let("fType"),format2=gen.let("format");gen.if((0,codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`,()=>gen.assign(fType,(0,codegen_1._)`${fDef}.type || "string"`).assign(format2,(0,codegen_1. _)`${fDef}.validate`),()=>gen.assign(fType,(0,codegen_1._)`"string"`).assign(format2,fDef)),cxt.fail$data((0,codegen_1.or)(unknownFmt(),invalidFmt()));function unknownFmt(){return opts.strictSchema===!1?codegen_1.nil:(0,codegen_1._)`${schemaCode} && !${format2}`}function invalidFmt(){const callFormat=schemaEnv.$async?(0,codegen_1._)`(${fDef}.async ? await ${format2}(${data}) : ${format2}(${data}))`:(0,codegen_1._)`${format2}(${data})`,validData=(0,codegen_1._)`(typeof ${format2} == "function" ? ${callFormat} : ${format2}.test(${data}))`; return(0,codegen_1._)`${format2} && ${format2} !== true && ${fType} === ${ruleType} && !${validData}`}}function validateFormat(){const formatDef=self2.formats[schema];if(!formatDef){unknownFormat();return}if(formatDef===!0)return;const[fmtType,format2,fmtRef]=getFormat(formatDef);fmtType===ruleType&&cxt.pass(validCondition());function unknownFormat(){if(opts.strictSchema===!1){self2.logger.warn(unknownMsg());return}throw new Error(unknownMsg());function unknownMsg(){return`unknown format "${schema}\ " ignored in schema at path "${errSchemaPath}"`}}function getFormat(fmtDef){const code2=fmtDef instanceof RegExp?(0,codegen_1.regexpCode)(fmtDef):opts.code.formats?(0,codegen_1._)`${opts.code.formats}${(0,codegen_1.getProperty)(schema)}`:void 0,fmt=gen.scopeValue("formats",{key:schema,ref:fmtDef,code:code2});return typeof fmtDef=="object"&&!(fmtDef instanceof RegExp)?[fmtDef.type||"string",fmtDef.validate,(0,codegen_1._)`${fmt}.validate`]:["string",fmtDef,fmt]}function validCondition(){if(typeof formatDef== "object"&&!(formatDef instanceof RegExp)&&formatDef.async){if(!schemaEnv.$async)throw new Error("async format in sync schema");return(0,codegen_1._)`await ${fmtRef}(${data})`}return typeof format2=="function"?(0,codegen_1._)`${fmtRef}(${data})`:(0,codegen_1._)`${fmtRef}.test(${data})`}}}};return format$2.default=def,format$2}var hasRequiredFormat$2;function requireFormat$2(){if(hasRequiredFormat$2)return format$3;hasRequiredFormat$2=1,Object.defineProperty(format$3,"__esModule",{value:!0});const format2=[ requireFormat$3().default];return format$3.default=format2,format$3}var metadata$1={},hasRequiredMetadata$1;function requireMetadata$1(){return hasRequiredMetadata$1||(hasRequiredMetadata$1=1,Object.defineProperty(metadata$1,"__esModule",{value:!0}),metadata$1.contentVocabulary=metadata$1.metadataVocabulary=void 0,metadata$1.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],metadata$1.contentVocabulary=["contentMediaType","contentEncoding","conte\ ntSchema"]),metadata$1}var hasRequiredDraft7$1;function requireDraft7$1(){if(hasRequiredDraft7$1)return draft7$1;hasRequiredDraft7$1=1,Object.defineProperty(draft7$1,"__esModule",{value:!0});const core_1=requireCore$2(),validation_1=requireValidation$1(),applicator_1=requireApplicator$1(),format_1=requireFormat$2(),metadata_1=requireMetadata$1(),draft7Vocabularies=[core_1.default,validation_1.default,(0,applicator_1.default)(),format_1.default,metadata_1.metadataVocabulary,metadata_1.contentVocabulary]; return draft7$1.default=draft7Vocabularies,draft7$1}var discriminator$1={},types$2={},hasRequiredTypes$1;function requireTypes$1(){if(hasRequiredTypes$1)return types$2;hasRequiredTypes$1=1,Object.defineProperty(types$2,"__esModule",{value:!0}),types$2.DiscrError=void 0;var DiscrError;return function(DiscrError2){DiscrError2.Tag="tag",DiscrError2.Mapping="mapping"}(DiscrError||(types$2.DiscrError=DiscrError={})),types$2}var hasRequiredDiscriminator$1;function requireDiscriminator$1(){if(hasRequiredDiscriminator$1) return discriminator$1;hasRequiredDiscriminator$1=1,Object.defineProperty(discriminator$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),types_1=requireTypes$1(),compile_1=requireCompile$1(),ref_error_1=requireRef_error$1(),util_1=requireUtil$1(),def={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError,tagName}})=>discrError===types_1.DiscrError.Tag?`tag "${tagName}" must be string`:`value of tag "${tagName}" must be in oneOf`,params:({params:{ discrError,tag,tagName}})=>(0,codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`},code(cxt){const{gen,data,schema,parentSchema,it}=cxt,{oneOf:oneOf2}=parentSchema;if(!it.opts.discriminator)throw new Error("discriminator: requires discriminator option");const tagName=schema.propertyName;if(typeof tagName!="string")throw new Error("discriminator: requires propertyName");if(schema.mapping)throw new Error("discriminator: mapping is not supported");if(!oneOf2)throw new Error("dis\ criminator: requires oneOf keyword");const valid2=gen.let("valid",!1),tag=gen.const("tag",(0,codegen_1._)`${data}${(0,codegen_1.getProperty)(tagName)}`);gen.if((0,codegen_1._)`typeof ${tag} == "string"`,()=>validateMapping(),()=>cxt.error(!1,{discrError:types_1.DiscrError.Tag,tag,tagName})),cxt.ok(valid2);function validateMapping(){const mapping=getMapping();gen.if(!1);for(const tagValue in mapping)gen.elseIf((0,codegen_1._)`${tag} === ${tagValue}`),gen.assign(valid2,applyTagSchema(mapping[tagValue])); gen.else(),cxt.error(!1,{discrError:types_1.DiscrError.Mapping,tag,tagName}),gen.endIf()}function applyTagSchema(schemaProp){const _valid=gen.name("valid"),schCxt=cxt.subschema({keyword:"oneOf",schemaProp},_valid);return cxt.mergeEvaluated(schCxt,codegen_1.Name),_valid}function getMapping(){var _a2;const oneOfMapping={},topRequired=hasRequired(parentSchema);let tagRequired=!0;for(let i=0;ithis.addVocabulary(v)),this.opts.discriminator&&this.addKeyword(discriminator_1.default)}_addDefaultMetaSchema(){ if(super._addDefaultMetaSchema(),!this.opts.meta)return;const metaSchema=this.opts.$data?this.$dataMetaSchema(draft7MetaSchema,META_SUPPORT_DATA):draft7MetaSchema;this.addMetaSchema(metaSchema,META_SCHEMA_ID,!1),this.refs["http://json-schema.org/schema"]=META_SCHEMA_ID}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(META_SCHEMA_ID)?META_SCHEMA_ID:void 0)}}exports.Ajv=Ajv2,module.exports=exports=Ajv2,module.exports.Ajv=Ajv2,Object.defineProperty(exports,"__esModule", {value:!0}),exports.default=Ajv2;var validate_1=requireValidate$1();Object.defineProperty(exports,"KeywordCxt",{enumerable:!0,get:function(){return validate_1.KeywordCxt}});var codegen_1=requireCodegen$1();Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return codegen_1._}}),Object.defineProperty(exports,"str",{enumerable:!0,get:function(){return codegen_1.str}}),Object.defineProperty(exports,"stringify",{enumerable:!0,get:function(){return codegen_1.stringify}}),Object.defineProperty( exports,"nil",{enumerable:!0,get:function(){return codegen_1.nil}}),Object.defineProperty(exports,"Name",{enumerable:!0,get:function(){return codegen_1.Name}}),Object.defineProperty(exports,"CodeGen",{enumerable:!0,get:function(){return codegen_1.CodeGen}});var validation_error_1=requireValidation_error$1();Object.defineProperty(exports,"ValidationError",{enumerable:!0,get:function(){return validation_error_1.default}});var ref_error_1=requireRef_error$1();Object.defineProperty(exports,"MissingR\ efError",{enumerable:!0,get:function(){return ref_error_1.default}})}(ajv$1,ajv$1.exports)),ajv$1.exports}var ajvExports=requireAjv$1();const Ajv=getDefaultExportFromCjs(ajvExports);var dist={exports:{}},formats={},hasRequiredFormats;function requireFormats(){return hasRequiredFormats||(hasRequiredFormats=1,function(exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatNames=exports.fastFormats=exports.fullFormats=void 0;function fmtDef(validate2,compare){return{validate:validate2, compare}}exports.fullFormats={date:fmtDef(date2,compareDate),time:fmtDef(getTime(!0),compareTime),"date-time":fmtDef(getDateTime(!0),compareDateTime),"iso-time":fmtDef(getTime(),compareIsoTime),"iso-date-time":fmtDef(getDateTime(),compareIsoDateTime),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:uri2,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i, "uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu, email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i, regex,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte,int32:{type:"number",validate:validateInt32},int64:{type:"number",validate:validateInt64},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:!0,binary:!0},exports. fastFormats={...exports.fullFormats,date:fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,compareDate),time:fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareTime),"date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareDateTime),"iso-time":fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareIsoTime),"iso-date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoDateTime),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},exports.formatNames=Object.keys(exports.fullFormats);function isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}const DATE2=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,DAYS=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date2(str){ const matches2=DATE2.exec(str);if(!matches2)return!1;const year=+matches2[1],month=+matches2[2],day=+matches2[3];return month>=1&&month<=12&&day>=1&&day<=(month===2&&isLeapYear(year)?29:DAYS[month])}function compareDate(d1,d2){if(d1&&d2)return d1>d2?1:d123||tzM>59||strictTimeZone&&!tz)return!1;if(hr<=23&&min2<=59&&sec<60)return!0;const utcMin=min2-tzM*tzSign,utcHr=hr-tzH*tzSign-(utcMin<0?1:0);return(utcHr===23||utcHr===-1)&&(utcMin===59||utcMin===-1)&&sec<61}}function compareTime(s1,s2){if(!(s1&&s2))return;const t1=new Date("2020-01-01T"+s1).valueOf(),t2=new Date("2020-01-01T"+s2).valueOf();if(t1&&t2)return t1-t2}function compareIsoTime(t1,t2){if(!(t1&& t2))return;const a1=TIME.exec(t1),a2=TIME.exec(t2);if(a1&&a2)return t1=a1[1]+a1[2]+a1[3],t2=a2[1]+a2[2]+a2[3],t1>t2?1:t1=MIN_INT32}function validateInt64(value){return Number.isInteger(value)}function validateNumber(){return!0}const Z_ANCHOR=/[^\\]\\Z/;function regex(str){if(Z_ANCHOR. test(str))return!1;try{return new RegExp(str),!0}catch{return!1}}}(formats)),formats}var limit={},ajv={exports:{}},core$2={},validate={},boolSchema={},errors={},codegen={},code$4={},hasRequiredCode$1;function requireCode$1(){return hasRequiredCode$1||(hasRequiredCode$1=1,function(exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.regexpCode=exports.getEsmExportName=exports.getProperty=exports.safeStringify=exports.stringify=exports.strConcat=exports.addCodeArg=exports.str=exports. _=exports.nil=exports._Code=exports.Name=exports.IDENTIFIER=exports._CodeOrName=void 0;class _CodeOrName{}exports._CodeOrName=_CodeOrName,exports.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Name extends _CodeOrName{constructor(s2){if(super(),!exports.IDENTIFIER.test(s2))throw new Error("CodeGen: name must be a valid identifier");this.str=s2}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}exports.Name=Name;class _Code extends _CodeOrName{constructor(code2){super(),this. _items=typeof code2=="string"?[code2]:code2}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const item=this._items[0];return item===""||item==='""'}get str(){var _a2;return(_a2=this._str)!==null&&_a2!==void 0?_a2:this._str=this._items.reduce((s2,c2)=>`${s2}${c2}`,"")}get names(){var _a2;return(_a2=this._names)!==null&&_a2!==void 0?_a2:this._names=this._items.reduce((names2,c2)=>(c2 instanceof Name&&(names2[c2.str]=(names2[c2.str]||0)+1),names2),{})}}exports._Code=_Code,exports. nil=new _Code("");function _(strs,...args){const code2=[strs[0]];let i=0;for(;i{if(name.scopePath===void 0)throw new Error(`CodeGen: name "${name}" has no value`);return(0,code_1._)`${scopeName}${name.scopePath}`})}scopeCode(values=this._values,usedValues,getCode){return this._reduceValues(values,name=>{if(name.value===void 0)throw new Error(`CodeGen: n\ ame "${name}" has no value`);return name.value.code},usedValues,getCode)}_reduceValues(values,valueCode,usedValues={},getCode){let code2=code_1.nil;for(const prefix in values){const vs=values[prefix];if(!vs)continue;const nameSet=usedValues[prefix]=usedValues[prefix]||new Map;vs.forEach(name=>{if(nameSet.has(name))return;nameSet.set(name,UsedValueState.Started);let c2=valueCode(name);if(c2){const def=this.opts.es5?exports.varKinds.var:exports.varKinds.const;code2=(0,code_1._)`${code2}${def} ${name} = ${c2};${this. opts._n}`}else if(c2=getCode?.(name))code2=(0,code_1._)`${code2}${c2}${this.opts._n}`;else throw new ValueError(name);nameSet.set(name,UsedValueState.Completed)})}return code2}}exports.ValueScope=ValueScope}(scope)),scope}var hasRequiredCodegen;function requireCodegen(){return hasRequiredCodegen||(hasRequiredCodegen=1,function(exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.or=exports.and=exports.not=exports.CodeGen=exports.operators=exports.varKinds=exports.ValueScopeName= exports.ValueScope=exports.Scope=exports.Name=exports.regexpCode=exports.stringify=exports.getProperty=exports.nil=exports.strConcat=exports.str=exports._=void 0;const code_1=requireCode$1(),scope_1=requireScope();var code_2=requireCode$1();Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return code_2._}}),Object.defineProperty(exports,"str",{enumerable:!0,get:function(){return code_2.str}}),Object.defineProperty(exports,"strConcat",{enumerable:!0,get:function(){return code_2.strConcat}}), Object.defineProperty(exports,"nil",{enumerable:!0,get:function(){return code_2.nil}}),Object.defineProperty(exports,"getProperty",{enumerable:!0,get:function(){return code_2.getProperty}}),Object.defineProperty(exports,"stringify",{enumerable:!0,get:function(){return code_2.stringify}}),Object.defineProperty(exports,"regexpCode",{enumerable:!0,get:function(){return code_2.regexpCode}}),Object.defineProperty(exports,"Name",{enumerable:!0,get:function(){return code_2.Name}});var scope_2=requireScope(); Object.defineProperty(exports,"Scope",{enumerable:!0,get:function(){return scope_2.Scope}}),Object.defineProperty(exports,"ValueScope",{enumerable:!0,get:function(){return scope_2.ValueScope}}),Object.defineProperty(exports,"ValueScopeName",{enumerable:!0,get:function(){return scope_2.ValueScopeName}}),Object.defineProperty(exports,"varKinds",{enumerable:!0,get:function(){return scope_2.varKinds}}),exports.operators={GT:new code_1._Code(">"),GTE:new code_1._Code(">="),LT:new code_1._Code("<"),LTE:new code_1. _Code("<="),EQ:new code_1._Code("==="),NEQ:new code_1._Code("!=="),NOT:new code_1._Code("!"),OR:new code_1._Code("||"),AND:new code_1._Code("&&"),ADD:new code_1._Code("+")};class Node2{optimizeNodes(){return this}optimizeNames(_names,_constants){return this}}class Def extends Node2{constructor(varKind,name,rhs){super(),this.varKind=varKind,this.name=name,this.rhs=rhs}render({es5,_n}){const varKind=es5?scope_1.varKinds.var:this.varKind,rhs=this.rhs===void 0?"":` = ${this.rhs}`;return`${varKind} ${this. name}${rhs};`+_n}optimizeNames(names2,constants2){if(names2[this.name.str])return this.rhs&&(this.rhs=optimizeExpr(this.rhs,names2,constants2)),this}get names(){return this.rhs instanceof code_1._CodeOrName?this.rhs.names:{}}}class Assign extends Node2{constructor(lhs,rhs,sideEffects){super(),this.lhs=lhs,this.rhs=rhs,this.sideEffects=sideEffects}render({_n}){return`${this.lhs} = ${this.rhs};`+_n}optimizeNames(names2,constants2){if(!(this.lhs instanceof code_1.Name&&!names2[this.lhs.str]&&!this. sideEffects))return this.rhs=optimizeExpr(this.rhs,names2,constants2),this}get names(){const names2=this.lhs instanceof code_1.Name?{}:{...this.lhs.names};return addExprNames(names2,this.rhs)}}class AssignOp extends Assign{constructor(lhs,op2,rhs,sideEffects){super(lhs,rhs,sideEffects),this.op=op2}render({_n}){return`${this.lhs} ${this.op}= ${this.rhs};`+_n}}class Label2 extends Node2{constructor(label){super(),this.label=label,this.names={}}render({_n}){return`${this.label}:`+_n}}class Break extends Node2{constructor(label){ super(),this.label=label,this.names={}}render({_n}){return`break${this.label?` ${this.label}`:""};`+_n}}class Throw extends Node2{constructor(error2){super(),this.error=error2}render({_n}){return`throw ${this.error};`+_n}get names(){return this.error.names}}class AnyCode extends Node2{constructor(code2){super(),this.code=code2}render({_n}){return`${this.code};`+_n}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(names2,constants2){return this.code=optimizeExpr(this.code,names2,constants2), this}get names(){return this.code instanceof code_1._CodeOrName?this.code.names:{}}}class ParentNode extends Node2{constructor(nodes2=[]){super(),this.nodes=nodes2}render(opts){return this.nodes.reduce((code2,n)=>code2+n.render(opts),"")}optimizeNodes(){const{nodes:nodes2}=this;let i=nodes2.length;for(;i--;){const n=nodes2[i].optimizeNodes();Array.isArray(n)?nodes2.splice(i,1,...n):n?nodes2[i]=n:nodes2.splice(i,1)}return nodes2.length>0?this:void 0}optimizeNames(names2,constants2){const{nodes:nodes2}=this; let i=nodes2.length;for(;i--;){const n=nodes2[i];n.optimizeNames(names2,constants2)||(subtractNames(names2,n.names),nodes2.splice(i,1))}return nodes2.length>0?this:void 0}get names(){return this.nodes.reduce((names2,n)=>addNames(names2,n.names),{})}}class BlockNode extends ParentNode{render(opts){return"{"+opts._n+super.render(opts)+"}"+opts._n}}class Root2 extends ParentNode{}class Else extends BlockNode{}Else.kind="else";class If extends BlockNode{constructor(condition,nodes2){super(nodes2),this. condition=condition}render(opts){let code2=`if(${this.condition})`+super.render(opts);return this.else&&(code2+="else "+this.else.render(opts)),code2}optimizeNodes(){super.optimizeNodes();const cond=this.condition;if(cond===!0)return this.nodes;let e=this.else;if(e){const ns=e.optimizeNodes();e=this.else=Array.isArray(ns)?new Else(ns):ns}if(e)return cond===!1?e instanceof If?e:e.nodes:this.nodes.length?this:new If(not2(cond),e instanceof If?[e]:e.nodes);if(!(cond===!1||!this.nodes.length))return this}optimizeNames(names2,constants2){ var _a2;if(this.else=(_a2=this.else)===null||_a2===void 0?void 0:_a2.optimizeNames(names2,constants2),!!(super.optimizeNames(names2,constants2)||this.else))return this.condition=optimizeExpr(this.condition,names2,constants2),this}get names(){const names2=super.names;return addExprNames(names2,this.condition),this.else&&addNames(names2,this.else.names),names2}}If.kind="if";class For extends BlockNode{}For.kind="for";class ForLoop extends For{constructor(iteration){super(),this.iteration=iteration}render(opts){ return`for(${this.iteration})`+super.render(opts)}optimizeNames(names2,constants2){if(super.optimizeNames(names2,constants2))return this.iteration=optimizeExpr(this.iteration,names2,constants2),this}get names(){return addNames(super.names,this.iteration.names)}}class ForRange extends For{constructor(varKind,name,from,to){super(),this.varKind=varKind,this.name=name,this.from=from,this.to=to}render(opts){const varKind=opts.es5?scope_1.varKinds.var:this.varKind,{name,from,to}=this;return`for(${varKind}\ ${name}=${from}; ${name}<${to}; ${name}++)`+super.render(opts)}get names(){const names2=addExprNames(super.names,this.from);return addExprNames(names2,this.to)}}class ForIter extends For{constructor(loop2,varKind,name,iterable){super(),this.loop=loop2,this.varKind=varKind,this.name=name,this.iterable=iterable}render(opts){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(opts)}optimizeNames(names2,constants2){if(super.optimizeNames(names2,constants2))return this. iterable=optimizeExpr(this.iterable,names2,constants2),this}get names(){return addNames(super.names,this.iterable.names)}}class Func extends BlockNode{constructor(name,args,async){super(),this.name=name,this.args=args,this.async=async}render(opts){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(opts)}}Func.kind="func";class Return extends ParentNode{render(opts){return"return "+super.render(opts)}}Return.kind="return";class Try extends BlockNode{render(opts){let code2="\ try"+super.render(opts);return this.catch&&(code2+=this.catch.render(opts)),this.finally&&(code2+=this.finally.render(opts)),code2}optimizeNodes(){var _a2,_b;return super.optimizeNodes(),(_a2=this.catch)===null||_a2===void 0||_a2.optimizeNodes(),(_b=this.finally)===null||_b===void 0||_b.optimizeNodes(),this}optimizeNames(names2,constants2){var _a2,_b;return super.optimizeNames(names2,constants2),(_a2=this.catch)===null||_a2===void 0||_a2.optimizeNames(names2,constants2),(_b=this.finally)===null|| _b===void 0||_b.optimizeNames(names2,constants2),this}get names(){const names2=super.names;return this.catch&&addNames(names2,this.catch.names),this.finally&&addNames(names2,this.finally.names),names2}}class Catch extends BlockNode{constructor(error2){super(),this.error=error2}render(opts){return`catch(${this.error})`+super.render(opts)}}Catch.kind="catch";class Finally extends BlockNode{render(opts){return"finally"+super.render(opts)}}Finally.kind="finally";class CodeGen{constructor(extScope,opts={}){ this._values={},this._blockStarts=[],this._constants={},this.opts={...opts,_n:opts.lines?` `:""},this._extScope=extScope,this._scope=new scope_1.Scope({parent:extScope}),this._nodes=[new Root2]}toString(){return this._root.render(this.opts)}name(prefix){return this._scope.name(prefix)}scopeName(prefix){return this._extScope.name(prefix)}scopeValue(prefixOrName,value){const name=this._extScope.value(prefixOrName,value);return(this._values[name.prefix]||(this._values[name.prefix]=new Set)).add(name),name}getScopeValue(prefix,keyOrRef){return this._extScope.getValue(prefix,keyOrRef)}scopeRefs(scopeName){ return this._extScope.scopeRefs(scopeName,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(varKind,nameOrPrefix,rhs,constant){const name=this._scope.toName(nameOrPrefix);return rhs!==void 0&&constant&&(this._constants[name.str]=rhs),this._leafNode(new Def(varKind,name,rhs)),name}const(nameOrPrefix,rhs,_constant){return this._def(scope_1.varKinds.const,nameOrPrefix,rhs,_constant)}let(nameOrPrefix,rhs,_constant){return this._def(scope_1.varKinds.let,nameOrPrefix,rhs,_constant)}var(nameOrPrefix,rhs,_constant){ return this._def(scope_1.varKinds.var,nameOrPrefix,rhs,_constant)}assign(lhs,rhs,sideEffects){return this._leafNode(new Assign(lhs,rhs,sideEffects))}add(lhs,rhs){return this._leafNode(new AssignOp(lhs,exports.operators.ADD,rhs))}code(c2){return typeof c2=="function"?c2():c2!==code_1.nil&&this._leafNode(new AnyCode(c2)),this}object(...keyValues){const code2=["{"];for(const[key2,value]of keyValues)code2.length>1&&code2.push(","),code2.push(key2),(key2!==value||this.opts.es5)&&(code2.push(":"),(0,code_1. addCodeArg)(code2,value));return code2.push("}"),new code_1._Code(code2)}if(condition,thenBody,elseBody){if(this._blockNode(new If(condition)),thenBody&&elseBody)this.code(thenBody).else().code(elseBody).endIf();else if(thenBody)this.code(thenBody).endIf();else if(elseBody)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(condition){return this._elseNode(new If(condition))}else(){return this._elseNode(new Else)}endIf(){return this._endBlockNode(If,Else)}_for(node2,forBody){ return this._blockNode(node2),forBody&&this.code(forBody).endFor(),this}for(iteration,forBody){return this._for(new ForLoop(iteration),forBody)}forRange(nameOrPrefix,from,to,forBody,varKind=this.opts.es5?scope_1.varKinds.var:scope_1.varKinds.let){const name=this._scope.toName(nameOrPrefix);return this._for(new ForRange(varKind,name,from,to),()=>forBody(name))}forOf(nameOrPrefix,iterable,forBody,varKind=scope_1.varKinds.const){const name=this._scope.toName(nameOrPrefix);if(this.opts.es5){const arr=iterable instanceof code_1.Name?iterable:this.var("_arr",iterable);return this.forRange("_i",0,(0,code_1._)`${arr}.length`,i=>{this.var(name,(0,code_1._)`${arr}[${i}]`),forBody(name)})}return this._for(new ForIter("of",varKind,name,iterable),()=>forBody(name))}forIn(nameOrPrefix,obj,forBody,varKind=this.opts.es5?scope_1.varKinds.var:scope_1.varKinds.const){if(this.opts.ownProperties)return this.forOf(nameOrPrefix,(0,code_1._)`Object.keys(${obj})`,forBody);const name=this._scope.toName(nameOrPrefix);return this._for( new ForIter("in",varKind,name,obj),()=>forBody(name))}endFor(){return this._endBlockNode(For)}label(label){return this._leafNode(new Label2(label))}break(label){return this._leafNode(new Break(label))}return(value){const node2=new Return;if(this._blockNode(node2),this.code(value),node2.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Return)}try(tryBody,catchCode,finallyCode){if(!catchCode&&!finallyCode)throw new Error('CodeGen: "try" without "\ catch" and "finally"');const node2=new Try;if(this._blockNode(node2),this.code(tryBody),catchCode){const error2=this.name("e");this._currNode=node2.catch=new Catch(error2),catchCode(error2)}return finallyCode&&(this._currNode=node2.finally=new Finally,this.code(finallyCode)),this._endBlockNode(Catch,Finally)}throw(error2){return this._leafNode(new Throw(error2))}block(body2,nodeCount){return this._blockStarts.push(this._nodes.length),body2&&this.code(body2).endBlock(nodeCount),this}endBlock(nodeCount){ const len=this._blockStarts.pop();if(len===void 0)throw new Error("CodeGen: not in self-balancing block");const toClose=this._nodes.length-len;if(toClose<0||nodeCount!==void 0&&toClose!==nodeCount)throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);return this._nodes.length=len,this}func(name,args=code_1.nil,async,funcBody){return this._blockNode(new Func(name,args,async)),funcBody&&this.code(funcBody).endFunc(),this}endFunc(){return this._endBlockNode(Func)}optimize(n=1){ for(;n-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(node2){return this._currNode.nodes.push(node2),this}_blockNode(node2){this._currNode.nodes.push(node2),this._nodes.push(node2)}_endBlockNode(N1,N2){const n=this._currNode;if(n instanceof N1||N2&&n instanceof N2)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${N2?`${N1.kind}/${N2.kind}`:N1.kind}"`)}_elseNode(node2){const n=this._currNode;if(!(n instanceof If))throw new Error( 'CodeGen: "else" without "if"');return this._currNode=n.else=node2,this}get _root(){return this._nodes[0]}get _currNode(){const ns=this._nodes;return ns[ns.length-1]}set _currNode(node2){const ns=this._nodes;ns[ns.length-1]=node2}}exports.CodeGen=CodeGen;function addNames(names2,from){for(const n in from)names2[n]=(names2[n]||0)+(from[n]||0);return names2}function addExprNames(names2,from){return from instanceof code_1._CodeOrName?addNames(names2,from.names):names2}function optimizeExpr(expr,names2,constants2){ if(expr instanceof code_1.Name)return replaceName(expr);if(!canOptimize(expr))return expr;return new code_1._Code(expr._items.reduce((items2,c2)=>(c2 instanceof code_1.Name&&(c2=replaceName(c2)),c2 instanceof code_1._Code?items2.push(...c2._items):items2.push(c2),items2),[]));function replaceName(n){const c2=constants2[n.str];return c2===void 0||names2[n.str]!==1?n:(delete names2[n.str],c2)}function canOptimize(e){return e instanceof code_1._Code&&e._items.some(c2=>c2 instanceof code_1.Name&&names2[c2. str]===1&&constants2[c2.str]!==void 0)}}function subtractNames(names2,from){for(const n in from)names2[n]=(names2[n]||0)-(from[n]||0)}function not2(x){return typeof x=="boolean"||typeof x=="number"||x===null?!x:(0,code_1._)`!${par(x)}`}exports.not=not2;const andCode=mappend(exports.operators.AND);function and(...args){return args.reduce(andCode)}exports.and=and;const orCode=mappend(exports.operators.OR);function or(...args){return args.reduce(orCode)}exports.or=or;function mappend(op2){return(x,y)=>x=== code_1.nil?y:y===code_1.nil?x:(0,code_1._)`${par(x)} ${op2} ${par(y)}`}function par(x){return x instanceof code_1.Name?x:(0,code_1._)`(${x})`}}(codegen)),codegen}var util={},hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util;hasRequiredUtil=1,Object.defineProperty(util,"__esModule",{value:!0}),util.checkStrictMode=util.getErrorPath=util.Type=util.useFunc=util.setEvaluated=util.evaluatedPropsToName=util.mergeEvaluated=util.eachItem=util.unescapeJsonPointer=util.escapeJsonPointer= util.escapeFragment=util.unescapeFragment=util.schemaRefOrVal=util.schemaHasRulesButRef=util.schemaHasRules=util.checkUnknownRules=util.alwaysValidSchema=util.toHash=void 0;const codegen_1=requireCodegen(),code_1=requireCode$1();function toHash(arr){const hash2={};for(const item of arr)hash2[item]=!0;return hash2}util.toHash=toHash;function alwaysValidSchema(it,schema){return typeof schema=="boolean"?schema:Object.keys(schema).length===0?!0:(checkUnknownRules(it,schema),!schemaHasRules(schema,it. self.RULES.all))}util.alwaysValidSchema=alwaysValidSchema;function checkUnknownRules(it,schema=it.schema){const{opts,self:self2}=it;if(!opts.strictSchema||typeof schema=="boolean")return;const rules2=self2.RULES.keywords;for(const key2 in schema)rules2[key2]||checkStrictMode(it,`unknown keyword: "${key2}"`)}util.checkUnknownRules=checkUnknownRules;function schemaHasRules(schema,rules2){if(typeof schema=="boolean")return!schema;for(const key2 in schema)if(rules2[key2])return!0;return!1}util.schemaHasRules= schemaHasRules;function schemaHasRulesButRef(schema,RULES){if(typeof schema=="boolean")return!schema;for(const key2 in schema)if(key2!=="$ref"&&RULES.all[key2])return!0;return!1}util.schemaHasRulesButRef=schemaHasRulesButRef;function schemaRefOrVal({topSchemaRef,schemaPath},schema,keyword2,$data){if(!$data){if(typeof schema=="number"||typeof schema=="boolean")return schema;if(typeof schema=="string")return(0,codegen_1._)`${schema}`}return(0,codegen_1._)`${topSchemaRef}${schemaPath}${(0,codegen_1. getProperty)(keyword2)}`}util.schemaRefOrVal=schemaRefOrVal;function unescapeFragment(str){return unescapeJsonPointer(decodeURIComponent(str))}util.unescapeFragment=unescapeFragment;function escapeFragment(str){return encodeURIComponent(escapeJsonPointer(str))}util.escapeFragment=escapeFragment;function escapeJsonPointer(str){return typeof str=="number"?`${str}`:str.replace(/~/g,"~0").replace(/\//g,"~1")}util.escapeJsonPointer=escapeJsonPointer;function unescapeJsonPointer(str){return str.replace( /~1/g,"/").replace(/~0/g,"~")}util.unescapeJsonPointer=unescapeJsonPointer;function eachItem(xs,f){if(Array.isArray(xs))for(const x of xs)f(x);else f(xs)}util.eachItem=eachItem;function makeMergeEvaluated({mergeNames,mergeToName,mergeValues:mergeValues2,resultToName}){return(gen,from,to,toName)=>{const res=to===void 0?from:to instanceof codegen_1.Name?(from instanceof codegen_1.Name?mergeNames(gen,from,to):mergeToName(gen,from,to),to):from instanceof codegen_1.Name?(mergeToName(gen,to,from),from): mergeValues2(from,to);return toName===codegen_1.Name&&!(res instanceof codegen_1.Name)?resultToName(gen,res):res}}util.mergeEvaluated={props:makeMergeEvaluated({mergeNames:(gen,from,to)=>gen.if((0,codegen_1._)`${to} !== true && ${from} !== undefined`,()=>{gen.if((0,codegen_1._)`${from} === true`,()=>gen.assign(to,!0),()=>gen.assign(to,(0,codegen_1._)`${to} || {}`).code((0,codegen_1._)`Object.assign(${to}, ${from})`))}),mergeToName:(gen,from,to)=>gen.if((0,codegen_1._)`${to} !== true`,()=>{from=== !0?gen.assign(to,!0):(gen.assign(to,(0,codegen_1._)`${to} || {}`),setEvaluated(gen,to,from))}),mergeValues:(from,to)=>from===!0?!0:{...from,...to},resultToName:evaluatedPropsToName}),items:makeMergeEvaluated({mergeNames:(gen,from,to)=>gen.if((0,codegen_1._)`${to} !== true && ${from} !== undefined`,()=>gen.assign(to,(0,codegen_1._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),mergeToName:(gen,from,to)=>gen.if((0,codegen_1._)`${to} !== true`,()=>gen.assign(to,from===!0?!0:(0,codegen_1. _)`${to} > ${from} ? ${to} : ${from}`)),mergeValues:(from,to)=>from===!0?!0:Math.max(from,to),resultToName:(gen,items2)=>gen.var("items",items2)})};function evaluatedPropsToName(gen,ps){if(ps===!0)return gen.var("props",!0);const props=gen.var("props",(0,codegen_1._)`{}`);return ps!==void 0&&setEvaluated(gen,props,ps),props}util.evaluatedPropsToName=evaluatedPropsToName;function setEvaluated(gen,props,ps){Object.keys(ps).forEach(p2=>gen.assign((0,codegen_1._)`${props}${(0,codegen_1.getProperty)( p2)}`,!0))}util.setEvaluated=setEvaluated;const snippets={};function useFunc(gen,f){return gen.scopeValue("func",{ref:f,code:snippets[f.code]||(snippets[f.code]=new code_1._Code(f.code))})}util.useFunc=useFunc;var Type;(function(Type2){Type2[Type2.Num=0]="Num",Type2[Type2.Str=1]="Str"})(Type||(util.Type=Type={}));function getErrorPath(dataProp,dataPropType,jsPropertySyntax){if(dataProp instanceof codegen_1.Name){const isNumber2=dataPropType===Type.Num;return jsPropertySyntax?isNumber2?(0,codegen_1. _)`"[" + ${dataProp} + "]"`:(0,codegen_1._)`"['" + ${dataProp} + "']"`:isNumber2?(0,codegen_1._)`"/" + ${dataProp}`:(0,codegen_1._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return jsPropertySyntax?(0,codegen_1.getProperty)(dataProp).toString():"/"+escapeJsonPointer(dataProp)}util.getErrorPath=getErrorPath;function checkStrictMode(it,msg,mode=it.opts.strictSchema){if(mode){if(msg=`strict mode: ${msg}`,mode===!0)throw new Error(msg);it.self.logger.warn(msg)}}return util.checkStrictMode= checkStrictMode,util}var names={},hasRequiredNames;function requireNames(){if(hasRequiredNames)return names;hasRequiredNames=1,Object.defineProperty(names,"__esModule",{value:!0});const codegen_1=requireCodegen(),names$12={data:new codegen_1.Name("data"),valCxt:new codegen_1.Name("valCxt"),instancePath:new codegen_1.Name("instancePath"),parentData:new codegen_1.Name("parentData"),parentDataProperty:new codegen_1.Name("parentDataProperty"),rootData:new codegen_1.Name("rootData"),dynamicAnchors:new codegen_1. Name("dynamicAnchors"),vErrors:new codegen_1.Name("vErrors"),errors:new codegen_1.Name("errors"),this:new codegen_1.Name("this"),self:new codegen_1.Name("self"),scope:new codegen_1.Name("scope"),json:new codegen_1.Name("json"),jsonPos:new codegen_1.Name("jsonPos"),jsonLen:new codegen_1.Name("jsonLen"),jsonPart:new codegen_1.Name("jsonPart")};return names.default=names$12,names}var hasRequiredErrors;function requireErrors(){return hasRequiredErrors||(hasRequiredErrors=1,function(exports){Object.defineProperty( exports,"__esModule",{value:!0}),exports.extendErrors=exports.resetErrorsCount=exports.reportExtraError=exports.reportError=exports.keyword$DataError=exports.keywordError=void 0;const codegen_1=requireCodegen(),util_1=requireUtil(),names_1=requireNames();exports.keywordError={message:({keyword:keyword2})=>(0,codegen_1.str)`must pass "${keyword2}" keyword validation`},exports.keyword$DataError={message:({keyword:keyword2,schemaType})=>schemaType?(0,codegen_1.str)`"${keyword2}" keyword must be ${schemaType} ($data)`: (0,codegen_1.str)`"${keyword2}" keyword is invalid ($data)`};function reportError(cxt,error2=exports.keywordError,errorPaths,overrideAllErrors){const{it}=cxt,{gen,compositeRule,allErrors}=it,errObj=errorObjectCode(cxt,error2,errorPaths);overrideAllErrors??(compositeRule||allErrors)?addError(gen,errObj):returnErrors(it,(0,codegen_1._)`[${errObj}]`)}exports.reportError=reportError;function reportExtraError(cxt,error2=exports.keywordError,errorPaths){const{it}=cxt,{gen,compositeRule,allErrors}=it,errObj=errorObjectCode( cxt,error2,errorPaths);addError(gen,errObj),compositeRule||allErrors||returnErrors(it,names_1.default.vErrors)}exports.reportExtraError=reportExtraError;function resetErrorsCount(gen,errsCount){gen.assign(names_1.default.errors,errsCount),gen.if((0,codegen_1._)`${names_1.default.vErrors} !== null`,()=>gen.if(errsCount,()=>gen.assign((0,codegen_1._)`${names_1.default.vErrors}.length`,errsCount),()=>gen.assign(names_1.default.vErrors,null)))}exports.resetErrorsCount=resetErrorsCount;function extendErrors({ gen,keyword:keyword2,schemaValue,data,errsCount,it}){if(errsCount===void 0)throw new Error("ajv implementation error");const err=gen.name("err");gen.forRange("i",errsCount,names_1.default.errors,i=>{gen.const(err,(0,codegen_1._)`${names_1.default.vErrors}[${i}]`),gen.if((0,codegen_1._)`${err}.instancePath === undefined`,()=>gen.assign((0,codegen_1._)`${err}.instancePath`,(0,codegen_1.strConcat)(names_1.default.instancePath,it.errorPath))),gen.assign((0,codegen_1._)`${err}.schemaPath`,(0,codegen_1. str)`${it.errSchemaPath}/${keyword2}`),it.opts.verbose&&(gen.assign((0,codegen_1._)`${err}.schema`,schemaValue),gen.assign((0,codegen_1._)`${err}.data`,data))})}exports.extendErrors=extendErrors;function addError(gen,errObj){const err=gen.const("err",errObj);gen.if((0,codegen_1._)`${names_1.default.vErrors} === null`,()=>gen.assign(names_1.default.vErrors,(0,codegen_1._)`[${err}]`),(0,codegen_1._)`${names_1.default.vErrors}.push(${err})`),gen.code((0,codegen_1._)`${names_1.default.errors}++`)}function returnErrors(it,errs){ const{gen,validateName,schemaEnv}=it;schemaEnv.$async?gen.throw((0,codegen_1._)`new ${it.ValidationError}(${errs})`):(gen.assign((0,codegen_1._)`${validateName}.errors`,errs),gen.return(!1))}const E={keyword:new codegen_1.Name("keyword"),schemaPath:new codegen_1.Name("schemaPath"),params:new codegen_1.Name("params"),propertyName:new codegen_1.Name("propertyName"),message:new codegen_1.Name("message"),schema:new codegen_1.Name("schema"),parentSchema:new codegen_1.Name("parentSchema")};function errorObjectCode(cxt,error2,errorPaths){ const{createErrors}=cxt.it;return createErrors===!1?(0,codegen_1._)`{}`:errorObject(cxt,error2,errorPaths)}function errorObject(cxt,error2,errorPaths={}){const{gen,it}=cxt,keyValues=[errorInstancePath(it,errorPaths),errorSchemaPath(cxt,errorPaths)];return extraErrorProps(cxt,error2,keyValues),gen.object(...keyValues)}function errorInstancePath({errorPath},{instancePath}){const instPath=instancePath?(0,codegen_1.str)`${errorPath}${(0,util_1.getErrorPath)(instancePath,util_1.Type.Str)}`:errorPath; return[names_1.default.instancePath,(0,codegen_1.strConcat)(names_1.default.instancePath,instPath)]}function errorSchemaPath({keyword:keyword2,it:{errSchemaPath}},{schemaPath,parentSchema}){let schPath=parentSchema?errSchemaPath:(0,codegen_1.str)`${errSchemaPath}/${keyword2}`;return schemaPath&&(schPath=(0,codegen_1.str)`${schPath}${(0,util_1.getErrorPath)(schemaPath,util_1.Type.Str)}`),[E.schemaPath,schPath]}function extraErrorProps(cxt,{params,message},keyValues){const{keyword:keyword2,data,schemaValue, it}=cxt,{opts,propertyName,topSchemaRef,schemaPath}=it;keyValues.push([E.keyword,keyword2],[E.params,typeof params=="function"?params(cxt):params||(0,codegen_1._)`{}`]),opts.messages&&keyValues.push([E.message,typeof message=="function"?message(cxt):message]),opts.verbose&&keyValues.push([E.schema,schemaValue],[E.parentSchema,(0,codegen_1._)`${topSchemaRef}${schemaPath}`],[names_1.default.data,data]),propertyName&&keyValues.push([E.propertyName,propertyName])}}(errors)),errors}var hasRequiredBoolSchema; function requireBoolSchema(){if(hasRequiredBoolSchema)return boolSchema;hasRequiredBoolSchema=1,Object.defineProperty(boolSchema,"__esModule",{value:!0}),boolSchema.boolOrEmptySchema=boolSchema.topBoolOrEmptySchema=void 0;const errors_1=requireErrors(),codegen_1=requireCodegen(),names_1=requireNames(),boolError={message:"boolean schema is false"};function topBoolOrEmptySchema(it){const{gen,schema,validateName}=it;schema===!1?falseSchemaError(it,!1):typeof schema=="object"&&schema.$async===!0?gen. return(names_1.default.data):(gen.assign((0,codegen_1._)`${validateName}.errors`,null),gen.return(!0))}boolSchema.topBoolOrEmptySchema=topBoolOrEmptySchema;function boolOrEmptySchema(it,valid2){const{gen,schema}=it;schema===!1?(gen.var(valid2,!1),falseSchemaError(it)):gen.var(valid2,!0)}boolSchema.boolOrEmptySchema=boolOrEmptySchema;function falseSchemaError(it,overrideAllErrors){const{gen,data}=it,cxt={gen,keyword:"false schema",data,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it};(0,errors_1. reportError)(cxt,boolError,void 0,overrideAllErrors)}return boolSchema}var dataType={},rules={},hasRequiredRules;function requireRules(){if(hasRequiredRules)return rules;hasRequiredRules=1,Object.defineProperty(rules,"__esModule",{value:!0}),rules.getRules=rules.isJSONType=void 0;const _jsonTypes=["string","number","integer","boolean","null","object","array"],jsonTypes=new Set(_jsonTypes);function isJSONType(x){return typeof x=="string"&&jsonTypes.has(x)}rules.isJSONType=isJSONType;function getRules(){ const groups={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...groups,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},groups.number,groups.string,groups.array,groups.object],post:{rules:[]},all:{},keywords:{}}}return rules.getRules=getRules,rules}var applicability={},hasRequiredApplicability;function requireApplicability(){if(hasRequiredApplicability)return applicability;hasRequiredApplicability=1,Object. defineProperty(applicability,"__esModule",{value:!0}),applicability.shouldUseRule=applicability.shouldUseGroup=applicability.schemaHasRulesForType=void 0;function schemaHasRulesForType({schema,self:self2},type2){const group=self2.RULES.types[type2];return group&&group!==!0&&shouldUseGroup(schema,group)}applicability.schemaHasRulesForType=schemaHasRulesForType;function shouldUseGroup(schema,group){return group.rules.some(rule=>shouldUseRule(schema,rule))}applicability.shouldUseGroup=shouldUseGroup; function shouldUseRule(schema,rule){var _a2;return schema[rule.keyword]!==void 0||((_a2=rule.definition.implements)===null||_a2===void 0?void 0:_a2.some(kwd=>schema[kwd]!==void 0))}return applicability.shouldUseRule=shouldUseRule,applicability}var hasRequiredDataType;function requireDataType(){if(hasRequiredDataType)return dataType;hasRequiredDataType=1,Object.defineProperty(dataType,"__esModule",{value:!0}),dataType.reportTypeError=dataType.checkDataTypes=dataType.checkDataType=dataType.coerceAndCheckDataType= dataType.getJSONTypes=dataType.getSchemaTypes=dataType.DataType=void 0;const rules_1=requireRules(),applicability_1=requireApplicability(),errors_1=requireErrors(),codegen_1=requireCodegen(),util_1=requireUtil();var DataType;(function(DataType2){DataType2[DataType2.Correct=0]="Correct",DataType2[DataType2.Wrong=1]="Wrong"})(DataType||(dataType.DataType=DataType={}));function getSchemaTypes(schema){const types2=getJSONTypes(schema.type);if(types2.includes("null")){if(schema.nullable===!1)throw new Error( "type: null contradicts nullable: false")}else{if(!types2.length&&schema.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');schema.nullable===!0&&types2.push("null")}return types2}dataType.getSchemaTypes=getSchemaTypes;function getJSONTypes(ts){const types2=Array.isArray(ts)?ts:ts?[ts]:[];if(types2.every(rules_1.isJSONType))return types2;throw new Error("type must be JSONType or JSONType[]: "+types2.join(","))}dataType.getJSONTypes=getJSONTypes;function coerceAndCheckDataType(it,types2){ const{gen,data,opts}=it,coerceTo=coerceToTypes(types2,opts.coerceTypes),checkTypes=types2.length>0&&!(coerceTo.length===0&&types2.length===1&&(0,applicability_1.schemaHasRulesForType)(it,types2[0]));if(checkTypes){const wrongType=checkDataTypes(types2,data,opts.strictNumbers,DataType.Wrong);gen.if(wrongType,()=>{coerceTo.length?coerceData(it,types2,coerceTo):reportTypeError(it)})}return checkTypes}dataType.coerceAndCheckDataType=coerceAndCheckDataType;const COERCIBLE=new Set(["string","number","\ integer","boolean","null"]);function coerceToTypes(types2,coerceTypes){return coerceTypes?types2.filter(t=>COERCIBLE.has(t)||coerceTypes==="array"&&t==="array"):[]}function coerceData(it,types2,coerceTo){const{gen,data,opts}=it,dataType2=gen.let("dataType",(0,codegen_1._)`typeof ${data}`),coerced=gen.let("coerced",(0,codegen_1._)`undefined`);opts.coerceTypes==="array"&&gen.if((0,codegen_1._)`${dataType2} == 'object' && Array.isArray(${data}) && ${data}.length == 1`,()=>gen.assign(data,(0,codegen_1. _)`${data}[0]`).assign(dataType2,(0,codegen_1._)`typeof ${data}`).if(checkDataTypes(types2,data,opts.strictNumbers),()=>gen.assign(coerced,data))),gen.if((0,codegen_1._)`${coerced} !== undefined`);for(const t of coerceTo)(COERCIBLE.has(t)||t==="array"&&opts.coerceTypes==="array")&&coerceSpecificType(t);gen.else(),reportTypeError(it),gen.endIf(),gen.if((0,codegen_1._)`${coerced} !== undefined`,()=>{gen.assign(data,coerced),assignParentData(it,coerced)});function coerceSpecificType(t){switch(t){case"\ string":gen.elseIf((0,codegen_1._)`${dataType2} == "number" || ${dataType2} == "boolean"`).assign(coerced,(0,codegen_1._)`"" + ${data}`).elseIf((0,codegen_1._)`${data} === null`).assign(coerced,(0,codegen_1._)`""`);return;case"number":gen.elseIf((0,codegen_1._)`${dataType2} == "boolean" || ${data} === null || (${dataType2} == "string" && ${data} && ${data} == +${data})`).assign(coerced,(0,codegen_1._)`+${data}`);return;case"integer":gen.elseIf((0,codegen_1._)`${dataType2} === "boolean" || ${data} === null || (${dataType2} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced,(0,codegen_1._)`+${data}`);return;case"boolean":gen.elseIf((0,codegen_1._)`${data} === "false" || ${data} === 0 || ${data} === null`).assign(coerced,!1).elseIf((0,codegen_1._)`${data} === "true" || ${data} === 1`).assign(coerced,!0);return;case"null":gen.elseIf((0,codegen_1._)`${data} === "" || ${data} === 0 || ${data} === false`),gen.assign(coerced,null);return;case"array":gen.elseIf( (0,codegen_1._)`${dataType2} === "string" || ${dataType2} === "number" || ${dataType2} === "boolean" || ${data} === null`).assign(coerced,(0,codegen_1._)`[${data}]`)}}}function assignParentData({gen,parentData,parentDataProperty},expr){gen.if((0,codegen_1._)`${parentData} !== undefined`,()=>gen.assign((0,codegen_1._)`${parentData}[${parentDataProperty}]`,expr))}function checkDataType(dataType2,data,strictNums,correct=DataType.Correct){const EQ=correct===DataType.Correct?codegen_1.operators.EQ:codegen_1.operators.NEQ;let cond;switch(dataType2){case"nul\ l":return(0,codegen_1._)`${data} ${EQ} null`;case"array":cond=(0,codegen_1._)`Array.isArray(${data})`;break;case"object":cond=(0,codegen_1._)`${data} && typeof ${data} == "object" && !Array.isArray(${data})`;break;case"integer":cond=numCond((0,codegen_1._)`!(${data} % 1) && !isNaN(${data})`);break;case"number":cond=numCond();break;default:return(0,codegen_1._)`typeof ${data} ${EQ} ${dataType2}`}return correct===DataType.Correct?cond:(0,codegen_1.not)(cond);function numCond(_cond=codegen_1.nil){return(0,codegen_1. and)((0,codegen_1._)`typeof ${data} == "number"`,_cond,strictNums?(0,codegen_1._)`isFinite(${data})`:codegen_1.nil)}}dataType.checkDataType=checkDataType;function checkDataTypes(dataTypes,data,strictNums,correct){if(dataTypes.length===1)return checkDataType(dataTypes[0],data,strictNums,correct);let cond;const types2=(0,util_1.toHash)(dataTypes);if(types2.array&&types2.object){const notObj=(0,codegen_1._)`typeof ${data} != "object"`;cond=types2.null?notObj:(0,codegen_1._)`!${data} || ${notObj}`,delete types2. null,delete types2.array,delete types2.object}else cond=codegen_1.nil;types2.number&&delete types2.integer;for(const t in types2)cond=(0,codegen_1.and)(cond,checkDataType(t,data,strictNums,correct));return cond}dataType.checkDataTypes=checkDataTypes;const typeError={message:({schema})=>`must be ${schema}`,params:({schema,schemaValue})=>typeof schema=="string"?(0,codegen_1._)`{type: ${schema}}`:(0,codegen_1._)`{type: ${schemaValue}}`};function reportTypeError(it){const cxt=getTypeErrorContext(it); (0,errors_1.reportError)(cxt,typeError)}dataType.reportTypeError=reportTypeError;function getTypeErrorContext(it){const{gen,data,schema}=it,schemaCode=(0,util_1.schemaRefOrVal)(it,schema,"type");return{gen,keyword:"type",data,schema:schema.type,schemaCode,schemaValue:schemaCode,parentSchema:schema,params:{},it}}return dataType}var defaults={},hasRequiredDefaults;function requireDefaults(){if(hasRequiredDefaults)return defaults;hasRequiredDefaults=1,Object.defineProperty(defaults,"__esModule",{value:!0}), defaults.assignDefaults=void 0;const codegen_1=requireCodegen(),util_1=requireUtil();function assignDefaults(it,ty){const{properties:properties2,items:items2}=it.schema;if(ty==="object"&&properties2)for(const key2 in properties2)assignDefault(it,key2,properties2[key2].default);else ty==="array"&&Array.isArray(items2)&&items2.forEach((sch,i)=>assignDefault(it,i,sch.default))}defaults.assignDefaults=assignDefaults;function assignDefault(it,prop2,defaultValue){const{gen,compositeRule,data,opts}=it; if(defaultValue===void 0)return;const childData=(0,codegen_1._)`${data}${(0,codegen_1.getProperty)(prop2)}`;if(compositeRule){(0,util_1.checkStrictMode)(it,`default is ignored for: ${childData}`);return}let condition=(0,codegen_1._)`${childData} === undefined`;opts.useDefaults==="empty"&&(condition=(0,codegen_1._)`${condition} || ${childData} === null || ${childData} === ""`),gen.if(condition,(0,codegen_1._)`${childData} = ${(0,codegen_1.stringify)(defaultValue)}`)}return defaults}var keyword={}, code$3={},hasRequiredCode;function requireCode(){if(hasRequiredCode)return code$3;hasRequiredCode=1,Object.defineProperty(code$3,"__esModule",{value:!0}),code$3.validateUnion=code$3.validateArray=code$3.usePattern=code$3.callValidateCode=code$3.schemaProperties=code$3.allSchemaProperties=code$3.noPropertyInData=code$3.propertyInData=code$3.isOwnProperty=code$3.hasPropFunc=code$3.reportMissingProp=code$3.checkMissingProp=code$3.checkReportMissingProp=void 0;const codegen_1=requireCodegen(),util_1=requireUtil(), names_1=requireNames(),util_2=requireUtil();function checkReportMissingProp(cxt,prop2){const{gen,data,it}=cxt;gen.if(noPropertyInData(gen,data,prop2,it.opts.ownProperties),()=>{cxt.setParams({missingProperty:(0,codegen_1._)`${prop2}`},!0),cxt.error()})}code$3.checkReportMissingProp=checkReportMissingProp;function checkMissingProp({gen,data,it:{opts}},properties2,missing){return(0,codegen_1.or)(...properties2.map(prop2=>(0,codegen_1.and)(noPropertyInData(gen,data,prop2,opts.ownProperties),(0,codegen_1. _)`${missing} = ${prop2}`)))}code$3.checkMissingProp=checkMissingProp;function reportMissingProp(cxt,missing){cxt.setParams({missingProperty:missing},!0),cxt.error()}code$3.reportMissingProp=reportMissingProp;function hasPropFunc(gen){return gen.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,codegen_1._)`Object.prototype.hasOwnProperty`})}code$3.hasPropFunc=hasPropFunc;function isOwnProperty(gen,data,property){return(0,codegen_1._)`${hasPropFunc(gen)}.call(${data}, ${property})`} code$3.isOwnProperty=isOwnProperty;function propertyInData(gen,data,property,ownProperties){const cond=(0,codegen_1._)`${data}${(0,codegen_1.getProperty)(property)} !== undefined`;return ownProperties?(0,codegen_1._)`${cond} && ${isOwnProperty(gen,data,property)}`:cond}code$3.propertyInData=propertyInData;function noPropertyInData(gen,data,property,ownProperties){const cond=(0,codegen_1._)`${data}${(0,codegen_1.getProperty)(property)} === undefined`;return ownProperties?(0,codegen_1.or)(cond,(0,codegen_1. not)(isOwnProperty(gen,data,property))):cond}code$3.noPropertyInData=noPropertyInData;function allSchemaProperties(schemaMap){return schemaMap?Object.keys(schemaMap).filter(p2=>p2!=="__proto__"):[]}code$3.allSchemaProperties=allSchemaProperties;function schemaProperties(it,schemaMap){return allSchemaProperties(schemaMap).filter(p2=>!(0,util_1.alwaysValidSchema)(it,schemaMap[p2]))}code$3.schemaProperties=schemaProperties;function callValidateCode({schemaCode,data,it:{gen,topSchemaRef,schemaPath,errorPath}, it},func,context,passSchema){const dataAndSchema=passSchema?(0,codegen_1._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}`:data,valCxt=[[names_1.default.instancePath,(0,codegen_1.strConcat)(names_1.default.instancePath,errorPath)],[names_1.default.parentData,it.parentData],[names_1.default.parentDataProperty,it.parentDataProperty],[names_1.default.rootData,names_1.default.rootData]];it.opts.dynamicRef&&valCxt.push([names_1.default.dynamicAnchors,names_1.default.dynamicAnchors]);const args=(0,codegen_1. _)`${dataAndSchema}, ${gen.object(...valCxt)}`;return context!==codegen_1.nil?(0,codegen_1._)`${func}.call(${context}, ${args})`:(0,codegen_1._)`${func}(${args})`}code$3.callValidateCode=callValidateCode;const newRegExp=(0,codegen_1._)`new RegExp`;function usePattern({gen,it:{opts}},pattern2){const u=opts.unicodeRegExp?"u":"",{regExp}=opts.code,rx=regExp(pattern2,u);return gen.scopeValue("pattern",{key:rx.toString(),ref:rx,code:(0,codegen_1._)`${regExp.code==="new RegExp"?newRegExp:(0,util_2.useFunc)( gen,regExp)}(${pattern2}, ${u})`})}code$3.usePattern=usePattern;function validateArray(cxt){const{gen,data,keyword:keyword2,it}=cxt,valid2=gen.name("valid");if(it.allErrors){const validArr=gen.let("valid",!0);return validateItems(()=>gen.assign(validArr,!1)),validArr}return gen.var(valid2,!0),validateItems(()=>gen.break()),valid2;function validateItems(notValid){const len=gen.const("len",(0,codegen_1._)`${data}.length`);gen.forRange("i",0,len,i=>{cxt.subschema({keyword:keyword2,dataProp:i,dataPropType:util_1. Type.Num},valid2),gen.if((0,codegen_1.not)(valid2),notValid)})}}code$3.validateArray=validateArray;function validateUnion(cxt){const{gen,schema,keyword:keyword2,it}=cxt;if(!Array.isArray(schema))throw new Error("ajv implementation error");if(schema.some(sch=>(0,util_1.alwaysValidSchema)(it,sch))&&!it.opts.unevaluated)return;const valid2=gen.let("valid",!1),schValid=gen.name("_valid");gen.block(()=>schema.forEach((_sch,i)=>{const schCxt=cxt.subschema({keyword:keyword2,schemaProp:i,compositeRule:!0}, schValid);gen.assign(valid2,(0,codegen_1._)`${valid2} || ${schValid}`),cxt.mergeValidEvaluated(schCxt,schValid)||gen.if((0,codegen_1.not)(valid2))})),cxt.result(valid2,()=>cxt.reset(),()=>cxt.error(!0))}return code$3.validateUnion=validateUnion,code$3}var hasRequiredKeyword;function requireKeyword(){if(hasRequiredKeyword)return keyword;hasRequiredKeyword=1,Object.defineProperty(keyword,"__esModule",{value:!0}),keyword.validateKeywordUsage=keyword.validSchemaType=keyword.funcKeywordCode=keyword.macroKeywordCode= void 0;const codegen_1=requireCodegen(),names_1=requireNames(),code_1=requireCode(),errors_1=requireErrors();function macroKeywordCode(cxt,def){const{gen,keyword:keyword2,schema,parentSchema,it}=cxt,macroSchema=def.macro.call(it.self,schema,parentSchema,it),schemaRef=useKeyword(gen,keyword2,macroSchema);it.opts.validateSchema!==!1&&it.self.validateSchema(macroSchema,!0);const valid2=gen.name("valid");cxt.subschema({schema:macroSchema,schemaPath:codegen_1.nil,errSchemaPath:`${it.errSchemaPath}/${keyword2}`, topSchemaRef:schemaRef,compositeRule:!0},valid2),cxt.pass(valid2,()=>cxt.error(!0))}keyword.macroKeywordCode=macroKeywordCode;function funcKeywordCode(cxt,def){var _a2;const{gen,keyword:keyword2,schema,parentSchema,$data,it}=cxt;checkAsyncKeyword(it,def);const validate2=!$data&&def.compile?def.compile.call(it.self,schema,parentSchema,it):def.validate,validateRef=useKeyword(gen,keyword2,validate2),valid2=gen.let("valid");cxt.block$data(valid2,validateKeyword),cxt.ok((_a2=def.valid)!==null&&_a2!== void 0?_a2:valid2);function validateKeyword(){if(def.errors===!1)assignValid(),def.modifying&&modifyData(cxt),reportErrs(()=>cxt.error());else{const ruleErrs=def.async?validateAsync():validateSync();def.modifying&&modifyData(cxt),reportErrs(()=>addErrs(cxt,ruleErrs))}}function validateAsync(){const ruleErrs=gen.let("ruleErrs",null);return gen.try(()=>assignValid((0,codegen_1._)`await `),e=>gen.assign(valid2,!1).if((0,codegen_1._)`${e} instanceof ${it.ValidationError}`,()=>gen.assign(ruleErrs,(0,codegen_1. _)`${e}.errors`),()=>gen.throw(e))),ruleErrs}function validateSync(){const validateErrs=(0,codegen_1._)`${validateRef}.errors`;return gen.assign(validateErrs,null),assignValid(codegen_1.nil),validateErrs}function assignValid(_await=def.async?(0,codegen_1._)`await `:codegen_1.nil){const passCxt=it.opts.passContext?names_1.default.this:names_1.default.self,passSchema=!("compile"in def&&!$data||def.schema===!1);gen.assign(valid2,(0,codegen_1._)`${_await}${(0,code_1.callValidateCode)(cxt,validateRef, passCxt,passSchema)}`,def.modifying)}function reportErrs(errors2){var _a3;gen.if((0,codegen_1.not)((_a3=def.valid)!==null&&_a3!==void 0?_a3:valid2),errors2)}}keyword.funcKeywordCode=funcKeywordCode;function modifyData(cxt){const{gen,data,it}=cxt;gen.if(it.parentData,()=>gen.assign(data,(0,codegen_1._)`${it.parentData}[${it.parentDataProperty}]`))}function addErrs(cxt,errs){const{gen}=cxt;gen.if((0,codegen_1._)`Array.isArray(${errs})`,()=>{gen.assign(names_1.default.vErrors,(0,codegen_1._)`${names_1. default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors,(0,codegen_1._)`${names_1.default.vErrors}.length`),(0,errors_1.extendErrors)(cxt)},()=>cxt.error())}function checkAsyncKeyword({schemaEnv},def){if(def.async&&!schemaEnv.$async)throw new Error("async keyword in sync schema")}function useKeyword(gen,keyword2,result){if(result===void 0)throw new Error(`keyword "${keyword2}" failed to compile`);return gen.scopeValue("keyword",typeof result== "function"?{ref:result}:{ref:result,code:(0,codegen_1.stringify)(result)})}function validSchemaType(schema,schemaType,allowUndefined=!1){return!schemaType.length||schemaType.some(st=>st==="array"?Array.isArray(schema):st==="object"?schema&&typeof schema=="object"&&!Array.isArray(schema):typeof schema==st||allowUndefined&&typeof schema>"u")}keyword.validSchemaType=validSchemaType;function validateKeywordUsage({schema,opts,self:self2,errSchemaPath},def,keyword2){if(Array.isArray(def.keyword)?!def. keyword.includes(keyword2):def.keyword!==keyword2)throw new Error("ajv implementation error");const deps=def.dependencies;if(deps?.some(kwd=>!Object.prototype.hasOwnProperty.call(schema,kwd)))throw new Error(`parent schema must have dependencies of ${keyword2}: ${deps.join(",")}`);if(def.validateSchema&&!def.validateSchema(schema[keyword2])){const msg=`keyword "${keyword2}" value is invalid at path "${errSchemaPath}": `+self2.errorsText(def.validateSchema.errors);if(opts.validateSchema==="log")self2. logger.error(msg);else throw new Error(msg)}}return keyword.validateKeywordUsage=validateKeywordUsage,keyword}var subschema={},hasRequiredSubschema;function requireSubschema(){if(hasRequiredSubschema)return subschema;hasRequiredSubschema=1,Object.defineProperty(subschema,"__esModule",{value:!0}),subschema.extendSubschemaMode=subschema.extendSubschemaData=subschema.getSubschema=void 0;const codegen_1=requireCodegen(),util_1=requireUtil();function getSubschema(it,{keyword:keyword2,schemaProp,schema, schemaPath,errSchemaPath,topSchemaRef}){if(keyword2!==void 0&&schema!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(keyword2!==void 0){const sch=it.schema[keyword2];return schemaProp===void 0?{schema:sch,schemaPath:(0,codegen_1._)`${it.schemaPath}${(0,codegen_1.getProperty)(keyword2)}`,errSchemaPath:`${it.errSchemaPath}/${keyword2}`}:{schema:sch[schemaProp],schemaPath:(0,codegen_1._)`${it.schemaPath}${(0,codegen_1.getProperty)(keyword2)}${(0,codegen_1.getProperty)( schemaProp)}`,errSchemaPath:`${it.errSchemaPath}/${keyword2}/${(0,util_1.escapeFragment)(schemaProp)}`}}if(schema!==void 0){if(schemaPath===void 0||errSchemaPath===void 0||topSchemaRef===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema,schemaPath,topSchemaRef,errSchemaPath}}throw new Error('either "keyword" or "schema" must be passed')}subschema.getSubschema=getSubschema;function extendSubschemaData(subschema2,it,{dataProp,dataPropType:dpType, data,dataTypes,propertyName}){if(data!==void 0&&dataProp!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen}=it;if(dataProp!==void 0){const{errorPath,dataPathArr,opts}=it,nextData=gen.let("data",(0,codegen_1._)`${it.data}${(0,codegen_1.getProperty)(dataProp)}`,!0);dataContextProps(nextData),subschema2.errorPath=(0,codegen_1.str)`${errorPath}${(0,util_1.getErrorPath)(dataProp,dpType,opts.jsPropertySyntax)}`,subschema2.parentDataProperty=(0,codegen_1._)`${dataProp}`, subschema2.dataPathArr=[...dataPathArr,subschema2.parentDataProperty]}if(data!==void 0){const nextData=data instanceof codegen_1.Name?data:gen.let("data",data,!0);dataContextProps(nextData),propertyName!==void 0&&(subschema2.propertyName=propertyName)}dataTypes&&(subschema2.dataTypes=dataTypes);function dataContextProps(_nextData){subschema2.data=_nextData,subschema2.dataLevel=it.dataLevel+1,subschema2.dataTypes=[],it.definedProperties=new Set,subschema2.parentData=it.data,subschema2.dataNames=[ ...it.dataNames,_nextData]}}subschema.extendSubschemaData=extendSubschemaData;function extendSubschemaMode(subschema2,{jtdDiscriminator,jtdMetadata,compositeRule,createErrors,allErrors}){compositeRule!==void 0&&(subschema2.compositeRule=compositeRule),createErrors!==void 0&&(subschema2.createErrors=createErrors),allErrors!==void 0&&(subschema2.allErrors=allErrors),subschema2.jtdDiscriminator=jtdDiscriminator,subschema2.jtdMetadata=jtdMetadata}return subschema.extendSubschemaMode=extendSubschemaMode, subschema}var resolve={},jsonSchemaTraverse={exports:{}},hasRequiredJsonSchemaTraverse;function requireJsonSchemaTraverse(){if(hasRequiredJsonSchemaTraverse)return jsonSchemaTraverse.exports;hasRequiredJsonSchemaTraverse=1;var traverse=jsonSchemaTraverse.exports=function(schema,opts,cb){typeof opts=="function"&&(cb=opts,opts={}),cb=opts.cb||cb;var pre=typeof cb=="function"?cb:cb.pre||function(){},post=cb.post||function(){};_traverse(opts,pre,post,schema,"",schema)};traverse.keywords={additionalItems:!0, items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},traverse.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},traverse.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},traverse.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 _traverse(opts,pre,post,schema,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex){if(schema&&typeof schema=="object"&&!Array.isArray(schema)){pre(schema,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex);for(var key2 in schema){var sch=schema[key2];if(Array.isArray(sch)){if(key2 in traverse.arrayKeywords)for(var i=0;icount+=countKeys(sch)),count===1/0))return 1/0}return count}function getFullPath(resolver2,id2="",normalize2){normalize2!==!1&&(id2=normalizeId(id2));const p2=resolver2.parse(id2);return _getFullPath(resolver2,p2)}resolve.getFullPath=getFullPath; function _getFullPath(resolver2,p2){return resolver2.serialize(p2).split("#")[0]+"#"}resolve._getFullPath=_getFullPath;const TRAILING_SLASH_HASH=/#\/?$/;function normalizeId(id2){return id2?id2.replace(TRAILING_SLASH_HASH,""):""}resolve.normalizeId=normalizeId;function resolveUrl(resolver2,baseId,id2){return id2=normalizeId(id2),resolver2.resolve(baseId,id2)}resolve.resolveUrl=resolveUrl;const ANCHOR=/^[a-z_][-a-z0-9._]*$/i;function getSchemaRefs(schema,baseId){if(typeof schema=="boolean")return{}; const{schemaId,uriResolver}=this.opts,schId=normalizeId(schema[schemaId]||baseId),baseIds={"":schId},pathPrefix=getFullPath(uriResolver,schId,!1),localRefs={},schemaRefs=new Set;return traverse(schema,{allKeys:!0},(sch,jsonPtr,_,parentJsonPtr)=>{if(parentJsonPtr===void 0)return;const fullPath=pathPrefix+jsonPtr;let innerBaseId=baseIds[parentJsonPtr];typeof sch[schemaId]=="string"&&(innerBaseId=addRef.call(this,sch[schemaId])),addAnchor.call(this,sch.$anchor),addAnchor.call(this,sch.$dynamicAnchor), baseIds[jsonPtr]=innerBaseId;function addRef(ref2){const _resolve=this.opts.uriResolver.resolve;if(ref2=normalizeId(innerBaseId?_resolve(innerBaseId,ref2):ref2),schemaRefs.has(ref2))throw ambiguos(ref2);schemaRefs.add(ref2);let schOrRef=this.refs[ref2];return typeof schOrRef=="string"&&(schOrRef=this.refs[schOrRef]),typeof schOrRef=="object"?checkAmbiguosRef(sch,schOrRef.schema,ref2):ref2!==normalizeId(fullPath)&&(ref2[0]==="#"?(checkAmbiguosRef(sch,localRefs[ref2],ref2),localRefs[ref2]=sch):this. refs[ref2]=fullPath),ref2}function addAnchor(anchor){if(typeof anchor=="string"){if(!ANCHOR.test(anchor))throw new Error(`invalid anchor "${anchor}"`);addRef.call(this,`#${anchor}`)}}}),localRefs;function checkAmbiguosRef(sch1,sch2,ref2){if(sch2!==void 0&&!equal2(sch1,sch2))throw ambiguos(ref2)}function ambiguos(ref2){return new Error(`reference "${ref2}" resolves to more than one schema`)}}return resolve.getSchemaRefs=getSchemaRefs,resolve}var hasRequiredValidate;function requireValidate(){if(hasRequiredValidate) return validate;hasRequiredValidate=1,Object.defineProperty(validate,"__esModule",{value:!0}),validate.getData=validate.KeywordCxt=validate.validateFunctionCode=void 0;const boolSchema_1=requireBoolSchema(),dataType_1=requireDataType(),applicability_1=requireApplicability(),dataType_2=requireDataType(),defaults_1=requireDefaults(),keyword_1=requireKeyword(),subschema_1=requireSubschema(),codegen_1=requireCodegen(),names_1=requireNames(),resolve_1=requireResolve(),util_1=requireUtil(),errors_1=requireErrors(); function validateFunctionCode(it){if(isSchemaObj(it)&&(checkKeywords(it),schemaCxtHasRules(it))){topSchemaObjCode(it);return}validateFunction(it,()=>(0,boolSchema_1.topBoolOrEmptySchema)(it))}validate.validateFunctionCode=validateFunctionCode;function validateFunction({gen,validateName,schema,schemaEnv,opts},body2){opts.code.es5?gen.func(validateName,(0,codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`,schemaEnv.$async,()=>{gen.code((0,codegen_1._)`"use strict"; ${funcSourceUrl(schema, opts)}`),destructureValCxtES5(gen,opts),gen.code(body2)}):gen.func(validateName,(0,codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`,schemaEnv.$async,()=>gen.code(funcSourceUrl(schema,opts)).code(body2))}function destructureValCxt(opts){return(0,codegen_1._)`{${names_1.default.instancePath}="", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef?(0,codegen_1._)`, ${names_1.default.dynamicAnchors}={}`: codegen_1.nil}}={}`}function destructureValCxtES5(gen,opts){gen.if(names_1.default.valCxt,()=>{gen.var(names_1.default.instancePath,(0,codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`),gen.var(names_1.default.parentData,(0,codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentData}`),gen.var(names_1.default.parentDataProperty,(0,codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentDataProperty}`),gen.var(names_1.default.rootData,(0,codegen_1._)`${names_1. default.valCxt}.${names_1.default.rootData}`),opts.dynamicRef&&gen.var(names_1.default.dynamicAnchors,(0,codegen_1._)`${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`)},()=>{gen.var(names_1.default.instancePath,(0,codegen_1._)`""`),gen.var(names_1.default.parentData,(0,codegen_1._)`undefined`),gen.var(names_1.default.parentDataProperty,(0,codegen_1._)`undefined`),gen.var(names_1.default.rootData,names_1.default.data),opts.dynamicRef&&gen.var(names_1.default.dynamicAnchors,(0,codegen_1. _)`{}`)})}function topSchemaObjCode(it){const{schema,opts,gen}=it;validateFunction(it,()=>{opts.$comment&&schema.$comment&&commentKeyword(it),checkNoDefault(it),gen.let(names_1.default.vErrors,null),gen.let(names_1.default.errors,0),opts.unevaluated&&resetEvaluated(it),typeAndKeywords(it),returnResults(it)})}function resetEvaluated(it){const{gen,validateName}=it;it.evaluated=gen.const("evaluated",(0,codegen_1._)`${validateName}.evaluated`),gen.if((0,codegen_1._)`${it.evaluated}.dynamicProps`,()=>gen. assign((0,codegen_1._)`${it.evaluated}.props`,(0,codegen_1._)`undefined`)),gen.if((0,codegen_1._)`${it.evaluated}.dynamicItems`,()=>gen.assign((0,codegen_1._)`${it.evaluated}.items`,(0,codegen_1._)`undefined`))}function funcSourceUrl(schema,opts){const schId=typeof schema=="object"&&schema[opts.schemaId];return schId&&(opts.code.source||opts.code.process)?(0,codegen_1._)`/*# sourceURL=${schId} */`:codegen_1.nil}function subschemaCode(it,valid2){if(isSchemaObj(it)&&(checkKeywords(it),schemaCxtHasRules( it))){subSchemaObjCode(it,valid2);return}(0,boolSchema_1.boolOrEmptySchema)(it,valid2)}function schemaCxtHasRules({schema,self:self2}){if(typeof schema=="boolean")return!schema;for(const key2 in schema)if(self2.RULES.all[key2])return!0;return!1}function isSchemaObj(it){return typeof it.schema!="boolean"}function subSchemaObjCode(it,valid2){const{schema,gen,opts}=it;opts.$comment&&schema.$comment&&commentKeyword(it),updateContext(it),checkAsyncSchema(it);const errsCount=gen.const("_errs",names_1. default.errors);typeAndKeywords(it,errsCount),gen.var(valid2,(0,codegen_1._)`${errsCount} === ${names_1.default.errors}`)}function checkKeywords(it){(0,util_1.checkUnknownRules)(it),checkRefsAndKeywords(it)}function typeAndKeywords(it,errsCount){if(it.opts.jtd)return schemaKeywords(it,[],!1,errsCount);const types2=(0,dataType_1.getSchemaTypes)(it.schema),checkedTypes=(0,dataType_1.coerceAndCheckDataType)(it,types2);schemaKeywords(it,types2,!checkedTypes,errsCount)}function checkRefsAndKeywords(it){ const{schema,errSchemaPath,opts,self:self2}=it;schema.$ref&&opts.ignoreKeywordsWithRef&&(0,util_1.schemaHasRulesButRef)(schema,self2.RULES)&&self2.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`)}function checkNoDefault(it){const{schema,opts}=it;schema.default!==void 0&&opts.useDefaults&&opts.strictSchema&&(0,util_1.checkStrictMode)(it,"default is ignored in the schema root")}function updateContext(it){const schId=it.schema[it.opts.schemaId];schId&&(it.baseId=(0,resolve_1. resolveUrl)(it.opts.uriResolver,it.baseId,schId))}function checkAsyncSchema(it){if(it.schema.$async&&!it.schemaEnv.$async)throw new Error("async schema in sync schema")}function commentKeyword({gen,schemaEnv,schema,errSchemaPath,opts}){const msg=schema.$comment;if(opts.$comment===!0)gen.code((0,codegen_1._)`${names_1.default.self}.logger.log(${msg})`);else if(typeof opts.$comment=="function"){const schemaPath=(0,codegen_1.str)`${errSchemaPath}/$comment`,rootName=gen.scopeValue("root",{ref:schemaEnv. root});gen.code((0,codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`)}}function returnResults(it){const{gen,schemaEnv,validateName,ValidationError,opts}=it;schemaEnv.$async?gen.if((0,codegen_1._)`${names_1.default.errors} === 0`,()=>gen.return(names_1.default.data),()=>gen.throw((0,codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`)):(gen.assign((0,codegen_1._)`${validateName}.errors`,names_1.default.vErrors),opts.unevaluated&&assignEvaluated( it),gen.return((0,codegen_1._)`${names_1.default.errors} === 0`))}function assignEvaluated({gen,evaluated,props,items:items2}){props instanceof codegen_1.Name&&gen.assign((0,codegen_1._)`${evaluated}.props`,props),items2 instanceof codegen_1.Name&&gen.assign((0,codegen_1._)`${evaluated}.items`,items2)}function schemaKeywords(it,types2,typeErrors,errsCount){const{gen,schema,data,allErrors,opts,self:self2}=it,{RULES}=self2;if(schema.$ref&&(opts.ignoreKeywordsWithRef||!(0,util_1.schemaHasRulesButRef)( schema,RULES))){gen.block(()=>keywordCode(it,"$ref",RULES.all.$ref.definition));return}opts.jtd||checkStrictTypes(it,types2),gen.block(()=>{for(const group of RULES.rules)groupKeywords(group);groupKeywords(RULES.post)});function groupKeywords(group){(0,applicability_1.shouldUseGroup)(schema,group)&&(group.type?(gen.if((0,dataType_2.checkDataType)(group.type,data,opts.strictNumbers)),iterateKeywords(it,group),types2.length===1&&types2[0]===group.type&&typeErrors&&(gen.else(),(0,dataType_2.reportTypeError)( it)),gen.endIf()):iterateKeywords(it,group),allErrors||gen.if((0,codegen_1._)`${names_1.default.errors} === ${errsCount||0}`))}}function iterateKeywords(it,group){const{gen,schema,opts:{useDefaults}}=it;useDefaults&&(0,defaults_1.assignDefaults)(it,group.type),gen.block(()=>{for(const rule of group.rules)(0,applicability_1.shouldUseRule)(schema,rule)&&keywordCode(it,rule.keyword,rule.definition,group.type)})}function checkStrictTypes(it,types2){it.schemaEnv.meta||!it.opts.strictTypes||(checkContextTypes( it,types2),it.opts.allowUnionTypes||checkMultipleTypes(it,types2),checkKeywordTypes(it,it.dataTypes))}function checkContextTypes(it,types2){if(types2.length){if(!it.dataTypes.length){it.dataTypes=types2;return}types2.forEach(t=>{includesType(it.dataTypes,t)||strictTypesError(it,`type "${t}" not allowed by context "${it.dataTypes.join(",")}"`)}),narrowSchemaTypes(it,types2)}}function checkMultipleTypes(it,ts){ts.length>1&&!(ts.length===2&&ts.includes("null"))&&strictTypesError(it,"use allowUnionT\ ypes to allow union type keyword")}function checkKeywordTypes(it,ts){const rules2=it.self.RULES.all;for(const keyword2 in rules2){const rule=rules2[keyword2];if(typeof rule=="object"&&(0,applicability_1.shouldUseRule)(it.schema,rule)){const{type:type2}=rule.definition;type2.length&&!type2.some(t=>hasApplicableType(ts,t))&&strictTypesError(it,`missing type "${type2.join(",")}" for keyword "${keyword2}"`)}}}function hasApplicableType(schTs,kwdT){return schTs.includes(kwdT)||kwdT==="number"&&schTs. includes("integer")}function includesType(ts,t){return ts.includes(t)||t==="integer"&&ts.includes("number")}function narrowSchemaTypes(it,withTypes){const ts=[];for(const t of it.dataTypes)includesType(withTypes,t)?ts.push(t):withTypes.includes("integer")&&t==="number"&&ts.push("integer");it.dataTypes=ts}function strictTypesError(it,msg){const schemaPath=it.schemaEnv.baseId+it.errSchemaPath;msg+=` at "${schemaPath}" (strictTypes)`,(0,util_1.checkStrictMode)(it,msg,it.opts.strictTypes)}class KeywordCxt{constructor(it,def,keyword2){ if((0,keyword_1.validateKeywordUsage)(it,def,keyword2),this.gen=it.gen,this.allErrors=it.allErrors,this.keyword=keyword2,this.data=it.data,this.schema=it.schema[keyword2],this.$data=def.$data&&it.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,util_1.schemaRefOrVal)(it,this.schema,keyword2,this.$data),this.schemaType=def.schemaType,this.parentSchema=it.schema,this.params={},this.it=it,this.def=def,this.$data)this.schemaCode=it.gen.const("vSchema",getData(this.$data,it));else if(this. schemaCode=this.schemaValue,!(0,keyword_1.validSchemaType)(this.schema,def.schemaType,def.allowUndefined))throw new Error(`${keyword2} value must be ${JSON.stringify(def.schemaType)}`);("code"in def?def.trackErrors:def.errors!==!1)&&(this.errsCount=it.gen.const("_errs",names_1.default.errors))}result(condition,successAction,failAction){this.failResult((0,codegen_1.not)(condition),successAction,failAction)}failResult(condition,successAction,failAction){this.gen.if(condition),failAction?failAction(): this.error(),successAction?(this.gen.else(),successAction(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(condition,failAction){this.failResult((0,codegen_1.not)(condition),void 0,failAction)}fail(condition){if(condition===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(condition),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(condition){if(!this.$data)return this.fail(condition);const{schemaCode}=this;this. fail((0,codegen_1._)`${schemaCode} !== undefined && (${(0,codegen_1.or)(this.invalid$data(),condition)})`)}error(append2,errorParams,errorPaths){if(errorParams){this.setParams(errorParams),this._error(append2,errorPaths),this.setParams({});return}this._error(append2,errorPaths)}_error(append2,errorPaths){(append2?errors_1.reportExtraError:errors_1.reportError)(this,this.def.error,errorPaths)}$dataError(){(0,errors_1.reportError)(this,this.def.$dataError||errors_1.keyword$DataError)}reset(){if(this. errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,errors_1.resetErrorsCount)(this.gen,this.errsCount)}ok(cond){this.allErrors||this.gen.if(cond)}setParams(obj,assign){assign?Object.assign(this.params,obj):this.params=obj}block$data(valid2,codeBlock,$dataValid=codegen_1.nil){this.gen.block(()=>{this.check$data(valid2,$dataValid),codeBlock()})}check$data(valid2=codegen_1.nil,$dataValid=codegen_1.nil){if(!this.$data)return;const{gen,schemaCode,schemaType,def}=this;gen. if((0,codegen_1.or)((0,codegen_1._)`${schemaCode} === undefined`,$dataValid)),valid2!==codegen_1.nil&&gen.assign(valid2,!0),(schemaType.length||def.validateSchema)&&(gen.elseIf(this.invalid$data()),this.$dataError(),valid2!==codegen_1.nil&&gen.assign(valid2,!1)),gen.else()}invalid$data(){const{gen,schemaCode,schemaType,def,it}=this;return(0,codegen_1.or)(wrong$DataType(),invalid$DataSchema());function wrong$DataType(){if(schemaType.length){if(!(schemaCode instanceof codegen_1.Name))throw new Error( "ajv implementation error");const st=Array.isArray(schemaType)?schemaType:[schemaType];return(0,codegen_1._)`${(0,dataType_2.checkDataTypes)(st,schemaCode,it.opts.strictNumbers,dataType_2.DataType.Wrong)}`}return codegen_1.nil}function invalid$DataSchema(){if(def.validateSchema){const validateSchemaRef=gen.scopeValue("validate$data",{ref:def.validateSchema});return(0,codegen_1._)`!${validateSchemaRef}(${schemaCode})`}return codegen_1.nil}}subschema(appl,valid2){const subschema2=(0,subschema_1.getSubschema)( this.it,appl);(0,subschema_1.extendSubschemaData)(subschema2,this.it,appl),(0,subschema_1.extendSubschemaMode)(subschema2,appl);const nextContext={...this.it,...subschema2,items:void 0,props:void 0};return subschemaCode(nextContext,valid2),nextContext}mergeEvaluated(schemaCxt,toName){const{it,gen}=this;it.opts.unevaluated&&(it.props!==!0&&schemaCxt.props!==void 0&&(it.props=util_1.mergeEvaluated.props(gen,schemaCxt.props,it.props,toName)),it.items!==!0&&schemaCxt.items!==void 0&&(it.items=util_1. mergeEvaluated.items(gen,schemaCxt.items,it.items,toName)))}mergeValidEvaluated(schemaCxt,valid2){const{it,gen}=this;if(it.opts.unevaluated&&(it.props!==!0||it.items!==!0))return gen.if(valid2,()=>this.mergeEvaluated(schemaCxt,codegen_1.Name)),!0}}validate.KeywordCxt=KeywordCxt;function keywordCode(it,keyword2,def,ruleType){const cxt=new KeywordCxt(it,def,keyword2);"code"in def?def.code(cxt,ruleType):cxt.$data&&def.validate?(0,keyword_1.funcKeywordCode)(cxt,def):"macro"in def?(0,keyword_1.macroKeywordCode)( cxt,def):(def.compile||def.validate)&&(0,keyword_1.funcKeywordCode)(cxt,def)}const JSON_POINTER=/^\/(?:[^~]|~0|~1)*$/,RELATIVE_JSON_POINTER=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData($data,{dataLevel,dataNames,dataPathArr}){let jsonPointer,data;if($data==="")return names_1.default.rootData;if($data[0]==="/"){if(!JSON_POINTER.test($data))throw new Error(`Invalid JSON-pointer: ${$data}`);jsonPointer=$data,data=names_1.default.rootData}else{const matches2=RELATIVE_JSON_POINTER.exec($data); if(!matches2)throw new Error(`Invalid JSON-pointer: ${$data}`);const up=+matches2[1];if(jsonPointer=matches2[2],jsonPointer==="#"){if(up>=dataLevel)throw new Error(errorMsg("property/index",up));return dataPathArr[dataLevel-up]}if(up>dataLevel)throw new Error(errorMsg("data",up));if(data=dataNames[dataLevel-up],!jsonPointer)return data}let expr=data;const segments=jsonPointer.split("/");for(const segment of segments)segment&&(data=(0,codegen_1._)`${data}${(0,codegen_1.getProperty)((0,util_1.unescapeJsonPointer)( segment))}`,expr=(0,codegen_1._)`${expr} && ${data}`);return expr;function errorMsg(pointerType,up){return`Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`}}return validate.getData=getData,validate}var validation_error={},hasRequiredValidation_error;function requireValidation_error(){if(hasRequiredValidation_error)return validation_error;hasRequiredValidation_error=1,Object.defineProperty(validation_error,"__esModule",{value:!0});class ValidationError extends Error{constructor(errors2){ super("validation failed"),this.errors=errors2,this.ajv=this.validation=!0}}return validation_error.default=ValidationError,validation_error}var ref_error={},hasRequiredRef_error;function requireRef_error(){if(hasRequiredRef_error)return ref_error;hasRequiredRef_error=1,Object.defineProperty(ref_error,"__esModule",{value:!0});const resolve_1=requireResolve();class MissingRefError extends Error{constructor(resolver2,baseId,ref2,msg){super(msg||`can't resolve reference ${ref2} from id ${baseId}`), this.missingRef=(0,resolve_1.resolveUrl)(resolver2,baseId,ref2),this.missingSchema=(0,resolve_1.normalizeId)((0,resolve_1.getFullPath)(resolver2,this.missingRef))}}return ref_error.default=MissingRefError,ref_error}var compile={},hasRequiredCompile;function requireCompile(){if(hasRequiredCompile)return compile;hasRequiredCompile=1,Object.defineProperty(compile,"__esModule",{value:!0}),compile.resolveSchema=compile.getCompilingSchema=compile.resolveRef=compile.compileSchema=compile.SchemaEnv=void 0; const codegen_1=requireCodegen(),validation_error_1=requireValidation_error(),names_1=requireNames(),resolve_1=requireResolve(),util_1=requireUtil(),validate_1=requireValidate();class SchemaEnv{constructor(env2){var _a2;this.refs={},this.dynamicAnchors={};let schema;typeof env2.schema=="object"&&(schema=env2.schema),this.schema=env2.schema,this.schemaId=env2.schemaId,this.root=env2.root||this,this.baseId=(_a2=env2.baseId)!==null&&_a2!==void 0?_a2:(0,resolve_1.normalizeId)(schema?.[env2.schemaId|| "$id"]),this.schemaPath=env2.schemaPath,this.localRefs=env2.localRefs,this.meta=env2.meta,this.$async=schema?.$async,this.refs={}}}compile.SchemaEnv=SchemaEnv;function compileSchema(sch){const _sch=getCompilingSchema.call(this,sch);if(_sch)return _sch;const rootId=(0,resolve_1.getFullPath)(this.opts.uriResolver,sch.root.baseId),{es5,lines}=this.opts.code,{ownProperties}=this.opts,gen=new codegen_1.CodeGen(this.scope,{es5,lines,ownProperties});let _ValidationError;sch.$async&&(_ValidationError=gen. scopeValue("Error",{ref:validation_error_1.default,code:(0,codegen_1._)`require("ajv/dist/runtime/validation_error").default`}));const validateName=gen.scopeName("validate");sch.validateName=validateName;const schemaCxt={gen,allErrors:this.opts.allErrors,data:names_1.default.data,parentData:names_1.default.parentData,parentDataProperty:names_1.default.parentDataProperty,dataNames:[names_1.default.data],dataPathArr:[codegen_1.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:gen. scopeValue("schema",this.opts.code.source===!0?{ref:sch.schema,code:(0,codegen_1.stringify)(sch.schema)}:{ref:sch.schema}),validateName,ValidationError:_ValidationError,schema:sch.schema,schemaEnv:sch,rootId,baseId:sch.baseId||rootId,schemaPath:codegen_1.nil,errSchemaPath:sch.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,codegen_1._)`""`,opts:this.opts,self:this};let sourceCode;try{this._compilations.add(sch),(0,validate_1.validateFunctionCode)(schemaCxt),gen.optimize(this.opts.code.optimize); const validateCode=gen.toString();sourceCode=`${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`,this.opts.code.process&&(sourceCode=this.opts.code.process(sourceCode,sch));const validate2=new Function(`${names_1.default.self}`,`${names_1.default.scope}`,sourceCode)(this,this.scope.get());if(this.scope.value(validateName,{ref:validate2}),validate2.errors=null,validate2.schema=sch.schema,validate2.schemaEnv=sch,sch.$async&&(validate2.$async=!0),this.opts.code.source===!0&&(validate2.source= {validateName,validateCode,scopeValues:gen._values}),this.opts.unevaluated){const{props,items:items2}=schemaCxt;validate2.evaluated={props:props instanceof codegen_1.Name?void 0:props,items:items2 instanceof codegen_1.Name?void 0:items2,dynamicProps:props instanceof codegen_1.Name,dynamicItems:items2 instanceof codegen_1.Name},validate2.source&&(validate2.source.evaluated=(0,codegen_1.stringify)(validate2.evaluated))}return sch.validate=validate2,sch}catch(e){throw delete sch.validate,delete sch. validateName,sourceCode&&this.logger.error("Error compiling schema, function code:",sourceCode),e}finally{this._compilations.delete(sch)}}compile.compileSchema=compileSchema;function resolveRef(root2,baseId,ref2){var _a2;ref2=(0,resolve_1.resolveUrl)(this.opts.uriResolver,baseId,ref2);const schOrFunc=root2.refs[ref2];if(schOrFunc)return schOrFunc;let _sch=resolve2.call(this,root2,ref2);if(_sch===void 0){const schema=(_a2=root2.localRefs)===null||_a2===void 0?void 0:_a2[ref2],{schemaId}=this.opts; schema&&(_sch=new SchemaEnv({schema,schemaId,root:root2,baseId}))}if(_sch!==void 0)return root2.refs[ref2]=inlineOrCompile.call(this,_sch)}compile.resolveRef=resolveRef;function inlineOrCompile(sch){return(0,resolve_1.inlineRef)(sch.schema,this.opts.inlineRefs)?sch.schema:sch.validate?sch:compileSchema.call(this,sch)}function getCompilingSchema(schEnv){for(const sch of this._compilations)if(sameSchemaEnv(sch,schEnv))return sch}compile.getCompilingSchema=getCompilingSchema;function sameSchemaEnv(s1,s2){ return s1.schema===s2.schema&&s1.root===s2.root&&s1.baseId===s2.baseId}function resolve2(root2,ref2){let sch;for(;typeof(sch=this.refs[ref2])=="string";)ref2=sch;return sch||this.schemas[ref2]||resolveSchema.call(this,root2,ref2)}function resolveSchema(root2,ref2){const p2=this.opts.uriResolver.parse(ref2),refPath=(0,resolve_1._getFullPath)(this.opts.uriResolver,p2);let baseId=(0,resolve_1.getFullPath)(this.opts.uriResolver,root2.baseId,void 0);if(Object.keys(root2.schema).length>0&&refPath===baseId) return getJsonPointer.call(this,p2,root2);const id2=(0,resolve_1.normalizeId)(refPath),schOrRef=this.refs[id2]||this.schemas[id2];if(typeof schOrRef=="string"){const sch=resolveSchema.call(this,root2,schOrRef);return typeof sch?.schema!="object"?void 0:getJsonPointer.call(this,p2,sch)}if(typeof schOrRef?.schema=="object"){if(schOrRef.validate||compileSchema.call(this,schOrRef),id2===(0,resolve_1.normalizeId)(ref2)){const{schema}=schOrRef,{schemaId}=this.opts,schId=schema[schemaId];return schId&& (baseId=(0,resolve_1.resolveUrl)(this.opts.uriResolver,baseId,schId)),new SchemaEnv({schema,schemaId,root:root2,baseId})}return getJsonPointer.call(this,p2,schOrRef)}}compile.resolveSchema=resolveSchema;const PREVENT_SCOPE_CHANGE=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(parsedRef,{baseId,schema,root:root2}){var _a2;if(((_a2=parsedRef.fragment)===null||_a2===void 0?void 0:_a2[0])!=="/")return;for(const part of parsedRef.fragment.slice( 1).split("/")){if(typeof schema=="boolean")return;const partSchema=schema[(0,util_1.unescapeFragment)(part)];if(partSchema===void 0)return;schema=partSchema;const schId=typeof schema=="object"&&schema[this.opts.schemaId];!PREVENT_SCOPE_CHANGE.has(part)&&schId&&(baseId=(0,resolve_1.resolveUrl)(this.opts.uriResolver,baseId,schId))}let env2;if(typeof schema!="boolean"&&schema.$ref&&!(0,util_1.schemaHasRulesButRef)(schema,this.RULES)){const $ref=(0,resolve_1.resolveUrl)(this.opts.uriResolver,baseId, schema.$ref);env2=resolveSchema.call(this,root2,$ref)}const{schemaId}=this.opts;if(env2=env2||new SchemaEnv({schema,schemaId,root:root2,baseId}),env2.schema!==env2.root.schema)return env2}return compile}const $id$1="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description="Meta-schema for $data reference (JSON AnySchema extension proposal)",type$1="object",required$1=["$data"],properties$3={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"j\ son-pointer"}]}},additionalProperties$1=!1,require$$9={$id:$id$1,description,type:type$1,required:required$1,properties:properties$3,additionalProperties:additionalProperties$1};var uri={},hasRequiredUri;function requireUri(){if(hasRequiredUri)return uri;hasRequiredUri=1,Object.defineProperty(uri,"__esModule",{value:!0});const uri$12=requireFastUri();return uri$12.code='require("ajv/dist/runtime/uri").default',uri.default=uri$12,uri}var hasRequiredCore$1;function requireCore$1(){return hasRequiredCore$1|| (hasRequiredCore$1=1,function(exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.CodeGen=exports.Name=exports.nil=exports.stringify=exports.str=exports._=exports.KeywordCxt=void 0;var validate_1=requireValidate();Object.defineProperty(exports,"KeywordCxt",{enumerable:!0,get:function(){return validate_1.KeywordCxt}});var codegen_1=requireCodegen();Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return codegen_1._}}),Object.defineProperty(exports,"str",{enumerable:!0, get:function(){return codegen_1.str}}),Object.defineProperty(exports,"stringify",{enumerable:!0,get:function(){return codegen_1.stringify}}),Object.defineProperty(exports,"nil",{enumerable:!0,get:function(){return codegen_1.nil}}),Object.defineProperty(exports,"Name",{enumerable:!0,get:function(){return codegen_1.Name}}),Object.defineProperty(exports,"CodeGen",{enumerable:!0,get:function(){return codegen_1.CodeGen}});const validation_error_1=requireValidation_error(),ref_error_1=requireRef_error(), rules_1=requireRules(),compile_1=requireCompile(),codegen_2=requireCodegen(),resolve_1=requireResolve(),dataType_1=requireDataType(),util_1=requireUtil(),$dataRefSchema=require$$9,uri_1=requireUri(),defaultRegExp=(str,flags2)=>new RegExp(str,flags2);defaultRegExp.code="new RegExp";const META_IGNORE_OPTIONS=["removeAdditional","useDefaults","coerceTypes"],EXT_SCOPE_NAMES=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","E\ rror"]),removedOptions={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."},deprecatedOptions={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for un\ icode characters by default.'},MAX_EXPRESSION=200;function requiredOptions(o){var _a2,_b,_c,_d,_e,_f,_g,_h,_j,_k,_l,_m,_o,_p,_q,_r,_s,_t,_u,_v,_w,_x,_y,_z,_02;const s2=o.strict,_optz=(_a2=o.code)===null||_a2===void 0?void 0:_a2.optimize,optimize=_optz===!0||_optz===void 0?1:_optz||0,regExp=(_c=(_b=o.code)===null||_b===void 0?void 0:_b.regExp)!==null&&_c!==void 0?_c:defaultRegExp,uriResolver=(_d=o.uriResolver)!==null&&_d!==void 0?_d:uri_1.default;return{strictSchema:(_f=(_e=o.strictSchema)!==null&& _e!==void 0?_e:s2)!==null&&_f!==void 0?_f:!0,strictNumbers:(_h=(_g=o.strictNumbers)!==null&&_g!==void 0?_g:s2)!==null&&_h!==void 0?_h:!0,strictTypes:(_k=(_j=o.strictTypes)!==null&&_j!==void 0?_j:s2)!==null&&_k!==void 0?_k:"log",strictTuples:(_m=(_l=o.strictTuples)!==null&&_l!==void 0?_l:s2)!==null&&_m!==void 0?_m:"log",strictRequired:(_p=(_o=o.strictRequired)!==null&&_o!==void 0?_o:s2)!==null&&_p!==void 0?_p:!1,code:o.code?{...o.code,optimize,regExp}:{optimize,regExp},loopRequired:(_q=o.loopRequired)!== null&&_q!==void 0?_q:MAX_EXPRESSION,loopEnum:(_r=o.loopEnum)!==null&&_r!==void 0?_r:MAX_EXPRESSION,meta:(_s=o.meta)!==null&&_s!==void 0?_s:!0,messages:(_t=o.messages)!==null&&_t!==void 0?_t:!0,inlineRefs:(_u=o.inlineRefs)!==null&&_u!==void 0?_u:!0,schemaId:(_v=o.schemaId)!==null&&_v!==void 0?_v:"$id",addUsedSchema:(_w=o.addUsedSchema)!==null&&_w!==void 0?_w:!0,validateSchema:(_x=o.validateSchema)!==null&&_x!==void 0?_x:!0,validateFormats:(_y=o.validateFormats)!==null&&_y!==void 0?_y:!0,unicodeRegExp:(_z= o.unicodeRegExp)!==null&&_z!==void 0?_z:!0,int32range:(_02=o.int32range)!==null&&_02!==void 0?_02:!0,uriResolver}}class Ajv2{constructor(opts={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,opts=this.opts={...opts,...requiredOptions(opts)};const{es5,lines}=this.opts.code;this.scope=new codegen_2.ValueScope({scope:{},prefixes:EXT_SCOPE_NAMES,es5,lines}),this.logger=getLogger(opts.logger);const formatOpt=opts.validateFormats;opts.validateFormats= !1,this.RULES=(0,rules_1.getRules)(),checkOptions.call(this,removedOptions,opts,"NOT SUPPORTED"),checkOptions.call(this,deprecatedOptions,opts,"DEPRECATED","warn"),this._metaOpts=getMetaSchemaOptions.call(this),opts.formats&&addInitialFormats.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),opts.keywords&&addInitialKeywords.call(this,opts.keywords),typeof opts.meta=="object"&&this.addMetaSchema(opts.meta),addInitialSchemas.call(this),opts.validateFormats=formatOpt}_addVocabularies(){ this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data,meta,schemaId}=this.opts;let _dataRefSchema=$dataRefSchema;schemaId==="id"&&(_dataRefSchema={...$dataRefSchema},_dataRefSchema.id=_dataRefSchema.$id,delete _dataRefSchema.$id),meta&&$data&&this.addMetaSchema(_dataRefSchema,_dataRefSchema[schemaId],!1)}defaultMeta(){const{meta,schemaId}=this.opts;return this.opts.defaultMeta=typeof meta=="object"?meta[schemaId]||meta:void 0}validate(schemaKeyRef,data){let v;if(typeof schemaKeyRef=="str\ ing"){if(v=this.getSchema(schemaKeyRef),!v)throw new Error(`no schema with key or ref "${schemaKeyRef}"`)}else v=this.compile(schemaKeyRef);const valid2=v(data);return"$async"in v||(this.errors=v.errors),valid2}compile(schema,_meta){const sch=this._addSchema(schema,_meta);return sch.validate||this._compileSchemaEnv(sch)}compileAsync(schema,meta){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema}=this.opts;return runCompileAsync. call(this,schema,meta);async function runCompileAsync(_schema,_meta){await loadMetaSchema.call(this,_schema.$schema);const sch=this._addSchema(_schema,_meta);return sch.validate||_compileAsync.call(this,sch)}async function loadMetaSchema($ref){$ref&&!this.getSchema($ref)&&await runCompileAsync.call(this,{$ref},!0)}async function _compileAsync(sch){try{return this._compileSchemaEnv(sch)}catch(e){if(!(e instanceof ref_error_1.default))throw e;return checkLoaded.call(this,e),await loadMissingSchema. call(this,e.missingSchema),_compileAsync.call(this,sch)}}function checkLoaded({missingSchema:ref2,missingRef}){if(this.refs[ref2])throw new Error(`AnySchema ${ref2} is loaded but ${missingRef} cannot be resolved`)}async function loadMissingSchema(ref2){const _schema=await _loadSchema.call(this,ref2);this.refs[ref2]||await loadMetaSchema.call(this,_schema.$schema),this.refs[ref2]||this.addSchema(_schema,ref2,meta)}async function _loadSchema(ref2){const p2=this._loading[ref2];if(p2)return p2;try{return await(this. _loading[ref2]=loadSchema(ref2))}finally{delete this._loading[ref2]}}}addSchema(schema,key2,_meta,_validateSchema=this.opts.validateSchema){if(Array.isArray(schema)){for(const sch of schema)this.addSchema(sch,void 0,_meta,_validateSchema);return this}let id2;if(typeof schema=="object"){const{schemaId}=this.opts;if(id2=schema[schemaId],id2!==void 0&&typeof id2!="string")throw new Error(`schema ${schemaId} must be string`)}return key2=(0,resolve_1.normalizeId)(key2||id2),this._checkUnique(key2),this. schemas[key2]=this._addSchema(schema,_meta,key2,_validateSchema,!0),this}addMetaSchema(schema,key2,_validateSchema=this.opts.validateSchema){return this.addSchema(schema,key2,!0,_validateSchema),this}validateSchema(schema,throwOrLogError){if(typeof schema=="boolean")return!0;let $schema2;if($schema2=schema.$schema,$schema2!==void 0&&typeof $schema2!="string")throw new Error("$schema must be a string");if($schema2=$schema2||this.opts.defaultMeta||this.defaultMeta(),!$schema2)return this.logger.warn( "meta-schema not available"),this.errors=null,!0;const valid2=this.validate($schema2,schema);if(!valid2&&throwOrLogError){const message="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(message);else throw new Error(message)}return valid2}getSchema(keyRef){let sch;for(;typeof(sch=getSchEnv.call(this,keyRef))=="string";)keyRef=sch;if(sch===void 0){const{schemaId}=this.opts,root2=new compile_1.SchemaEnv({schema:{},schemaId});if(sch=compile_1.resolveSchema. call(this,root2,keyRef),!sch)return;this.refs[keyRef]=sch}return sch.validate||this._compileSchemaEnv(sch)}removeSchema(schemaKeyRef){if(schemaKeyRef instanceof RegExp)return this._removeAllSchemas(this.schemas,schemaKeyRef),this._removeAllSchemas(this.refs,schemaKeyRef),this;switch(typeof schemaKeyRef){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const sch=getSchEnv.call(this,schemaKeyRef);return typeof sch== "object"&&this._cache.delete(sch.schema),delete this.schemas[schemaKeyRef],delete this.refs[schemaKeyRef],this}case"object":{const cacheKey=schemaKeyRef;this._cache.delete(cacheKey);let id2=schemaKeyRef[this.opts.schemaId];return id2&&(id2=(0,resolve_1.normalizeId)(id2),delete this.schemas[id2],delete this.refs[id2]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(definitions2){for(const def of definitions2)this.addKeyword(def);return this}addKeyword(kwdOrDef,def){ let keyword2;if(typeof kwdOrDef=="string")keyword2=kwdOrDef,typeof def=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),def.keyword=keyword2);else if(typeof kwdOrDef=="object"&&def===void 0){if(def=kwdOrDef,keyword2=def.keyword,Array.isArray(keyword2)&&!keyword2.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(checkKeyword.call(this,keyword2,def),!def)return(0,util_1. eachItem)(keyword2,kwd=>addRule.call(this,kwd)),this;keywordMetaschema.call(this,def);const definition2={...def,type:(0,dataType_1.getJSONTypes)(def.type),schemaType:(0,dataType_1.getJSONTypes)(def.schemaType)};return(0,util_1.eachItem)(keyword2,definition2.type.length===0?k=>addRule.call(this,k,definition2):k=>definition2.type.forEach(t=>addRule.call(this,k,definition2,t))),this}getKeyword(keyword2){const rule=this.RULES.all[keyword2];return typeof rule=="object"?rule.definition:!!rule}removeKeyword(keyword2){ const{RULES}=this;delete RULES.keywords[keyword2],delete RULES.all[keyword2];for(const group of RULES.rules){const i=group.rules.findIndex(rule=>rule.keyword===keyword2);i>=0&&group.rules.splice(i,1)}return this}addFormat(name,format2){return typeof format2=="string"&&(format2=new RegExp(format2)),this.formats[name]=format2,this}errorsText(errors2=this.errors,{separator=", ",dataVar="data"}={}){return!errors2||errors2.length===0?"No errors":errors2.map(e=>`${dataVar}${e.instancePath} ${e.message}`). reduce((text2,msg)=>text2+separator+msg)}$dataMetaSchema(metaSchema,keywordsJsonPointers){const rules2=this.RULES.all;metaSchema=JSON.parse(JSON.stringify(metaSchema));for(const jsonPointer of keywordsJsonPointers){const segments=jsonPointer.split("/").slice(1);let keywords2=metaSchema;for(const seg of segments)keywords2=keywords2[seg];for(const key2 in rules2){const rule=rules2[key2];if(typeof rule!="object")continue;const{$data}=rule.definition,schema=keywords2[key2];$data&&schema&&(keywords2[key2]= schemaOrData(schema))}}return metaSchema}_removeAllSchemas(schemas,regex){for(const keyRef in schemas){const sch=schemas[keyRef];(!regex||regex.test(keyRef))&&(typeof sch=="string"?delete schemas[keyRef]:sch&&!sch.meta&&(this._cache.delete(sch.schema),delete schemas[keyRef]))}}_addSchema(schema,meta,baseId,validateSchema=this.opts.validateSchema,addSchema=this.opts.addUsedSchema){let id2;const{schemaId}=this.opts;if(typeof schema=="object")id2=schema[schemaId];else{if(this.opts.jtd)throw new Error( "schema must be object");if(typeof schema!="boolean")throw new Error("schema must be object or boolean")}let sch=this._cache.get(schema);if(sch!==void 0)return sch;baseId=(0,resolve_1.normalizeId)(id2||baseId);const localRefs=resolve_1.getSchemaRefs.call(this,schema,baseId);return sch=new compile_1.SchemaEnv({schema,schemaId,meta,baseId,localRefs}),this._cache.set(sch.schema,sch),addSchema&&!baseId.startsWith("#")&&(baseId&&this._checkUnique(baseId),this.refs[baseId]=sch),validateSchema&&this.validateSchema( schema,!0),sch}_checkUnique(id2){if(this.schemas[id2]||this.refs[id2])throw new Error(`schema with key or id "${id2}" already exists`)}_compileSchemaEnv(sch){if(sch.meta?this._compileMetaSchema(sch):compile_1.compileSchema.call(this,sch),!sch.validate)throw new Error("ajv implementation error");return sch.validate}_compileMetaSchema(sch){const currentOpts=this.opts;this.opts=this._metaOpts;try{compile_1.compileSchema.call(this,sch)}finally{this.opts=currentOpts}}}Ajv2.ValidationError=validation_error_1. default,Ajv2.MissingRefError=ref_error_1.default,exports.default=Ajv2;function checkOptions(checkOpts,options,msg,log="error"){for(const key2 in checkOpts){const opt=key2;opt in options&&this.logger[log](`${msg}: option ${key2}. ${checkOpts[opt]}`)}}function getSchEnv(keyRef){return keyRef=(0,resolve_1.normalizeId)(keyRef),this.schemas[keyRef]||this.refs[keyRef]}function addInitialSchemas(){const optsSchemas=this.opts.schemas;if(optsSchemas)if(Array.isArray(optsSchemas))this.addSchema(optsSchemas);else for(const key2 in optsSchemas)this.addSchema(optsSchemas[key2],key2)}function addInitialFormats(){for(const name in this.opts.formats){const format2=this.opts.formats[name];format2&&this.addFormat(name,format2)}}function addInitialKeywords(defs){if(Array.isArray(defs)){this.addVocabulary(defs);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const keyword2 in defs){const def=defs[keyword2];def.keyword||(def.keyword=keyword2),this.addKeyword(def)}}function getMetaSchemaOptions(){ const metaOpts={...this.opts};for(const opt of META_IGNORE_OPTIONS)delete metaOpts[opt];return metaOpts}const noLogs={log(){},warn(){},error(){}};function getLogger(logger){if(logger===!1)return noLogs;if(logger===void 0)return console;if(logger.log&&logger.warn&&logger.error)return logger;throw new Error("logger must implement log, warn and error methods")}const KEYWORD_NAME=/^[a-z_$][a-z0-9_$:-]*$/i;function checkKeyword(keyword2,def){const{RULES}=this;if((0,util_1.eachItem)(keyword2,kwd=>{if(RULES. keywords[kwd])throw new Error(`Keyword ${kwd} is already defined`);if(!KEYWORD_NAME.test(kwd))throw new Error(`Keyword ${kwd} has invalid name`)}),!!def&&def.$data&&!("code"in def||"validate"in def))throw new Error('$data keyword must have "code" or "validate" function')}function addRule(keyword2,definition2,dataType2){var _a2;const post=definition2?.post;if(dataType2&&post)throw new Error('keyword with "post" flag cannot have "type"');const{RULES}=this;let ruleGroup=post?RULES.post:RULES.rules. find(({type:t})=>t===dataType2);if(ruleGroup||(ruleGroup={type:dataType2,rules:[]},RULES.rules.push(ruleGroup)),RULES.keywords[keyword2]=!0,!definition2)return;const rule={keyword:keyword2,definition:{...definition2,type:(0,dataType_1.getJSONTypes)(definition2.type),schemaType:(0,dataType_1.getJSONTypes)(definition2.schemaType)}};definition2.before?addBeforeRule.call(this,ruleGroup,rule,definition2.before):ruleGroup.rules.push(rule),RULES.all[keyword2]=rule,(_a2=definition2.implements)===null||_a2=== void 0||_a2.forEach(kwd=>this.addKeyword(kwd))}function addBeforeRule(ruleGroup,rule,before){const i=ruleGroup.rules.findIndex(_rule=>_rule.keyword===before);i>=0?ruleGroup.rules.splice(i,0,rule):(ruleGroup.rules.push(rule),this.logger.warn(`rule ${before} is not defined`))}function keywordMetaschema(def){let{metaSchema}=def;metaSchema!==void 0&&(def.$data&&this.opts.$data&&(metaSchema=schemaOrData(metaSchema)),def.validateSchema=this.compile(metaSchema,!0))}const $dataRef={$ref:"https://raw.git\ hubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function schemaOrData(schema){return{anyOf:[schema,$dataRef]}}}(core$2)),core$2}var draft7={},core$1={},id={},hasRequiredId;function requireId(){if(hasRequiredId)return id;hasRequiredId=1,Object.defineProperty(id,"__esModule",{value:!0});const def={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return id.default=def,id}var ref={},hasRequiredRef;function requireRef(){if(hasRequiredRef) return ref;hasRequiredRef=1,Object.defineProperty(ref,"__esModule",{value:!0}),ref.callRef=ref.getValidate=void 0;const ref_error_1=requireRef_error(),code_1=requireCode(),codegen_1=requireCodegen(),names_1=requireNames(),compile_1=requireCompile(),util_1=requireUtil(),def={keyword:"$ref",schemaType:"string",code(cxt){const{gen,schema:$ref,it}=cxt,{baseId,schemaEnv:env2,validateName,opts,self:self2}=it,{root:root2}=env2;if(($ref==="#"||$ref==="#/")&&baseId===root2.baseId)return callRootRef();const schOrEnv=compile_1. resolveRef.call(self2,root2,baseId,$ref);if(schOrEnv===void 0)throw new ref_error_1.default(it.opts.uriResolver,baseId,$ref);if(schOrEnv instanceof compile_1.SchemaEnv)return callValidate(schOrEnv);return inlineRefSchema(schOrEnv);function callRootRef(){if(env2===root2)return callRef(cxt,validateName,env2,env2.$async);const rootName=gen.scopeValue("root",{ref:root2});return callRef(cxt,(0,codegen_1._)`${rootName}.validate`,root2,root2.$async)}function callValidate(sch){const v=getValidate(cxt,sch); callRef(cxt,v,sch,sch.$async)}function inlineRefSchema(sch){const schName=gen.scopeValue("schema",opts.code.source===!0?{ref:sch,code:(0,codegen_1.stringify)(sch)}:{ref:sch}),valid2=gen.name("valid"),schCxt=cxt.subschema({schema:sch,dataTypes:[],schemaPath:codegen_1.nil,topSchemaRef:schName,errSchemaPath:$ref},valid2);cxt.mergeEvaluated(schCxt),cxt.ok(valid2)}}};function getValidate(cxt,sch){const{gen}=cxt;return sch.validate?gen.scopeValue("validate",{ref:sch.validate}):(0,codegen_1._)`${gen.scopeValue( "wrapper",{ref:sch})}.validate`}ref.getValidate=getValidate;function callRef(cxt,v,sch,$async){const{gen,it}=cxt,{allErrors,schemaEnv:env2,opts}=it,passCxt=opts.passContext?names_1.default.this:codegen_1.nil;$async?callAsyncRef():callSyncRef();function callAsyncRef(){if(!env2.$async)throw new Error("async schema referenced by sync schema");const valid2=gen.let("valid");gen.try(()=>{gen.code((0,codegen_1._)`await ${(0,code_1.callValidateCode)(cxt,v,passCxt)}`),addEvaluatedFrom(v),allErrors||gen.assign( valid2,!0)},e=>{gen.if((0,codegen_1._)`!(${e} instanceof ${it.ValidationError})`,()=>gen.throw(e)),addErrorsFrom(e),allErrors||gen.assign(valid2,!1)}),cxt.ok(valid2)}function callSyncRef(){cxt.result((0,code_1.callValidateCode)(cxt,v,passCxt),()=>addEvaluatedFrom(v),()=>addErrorsFrom(v))}function addErrorsFrom(source2){const errs=(0,codegen_1._)`${source2}.errors`;gen.assign(names_1.default.vErrors,(0,codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`), gen.assign(names_1.default.errors,(0,codegen_1._)`${names_1.default.vErrors}.length`)}function addEvaluatedFrom(source2){var _a2;if(!it.opts.unevaluated)return;const schEvaluated=(_a2=sch?.validate)===null||_a2===void 0?void 0:_a2.evaluated;if(it.props!==!0)if(schEvaluated&&!schEvaluated.dynamicProps)schEvaluated.props!==void 0&&(it.props=util_1.mergeEvaluated.props(gen,schEvaluated.props,it.props));else{const props=gen.var("props",(0,codegen_1._)`${source2}.evaluated.props`);it.props=util_1.mergeEvaluated. props(gen,props,it.props,codegen_1.Name)}if(it.items!==!0)if(schEvaluated&&!schEvaluated.dynamicItems)schEvaluated.items!==void 0&&(it.items=util_1.mergeEvaluated.items(gen,schEvaluated.items,it.items));else{const items2=gen.var("items",(0,codegen_1._)`${source2}.evaluated.items`);it.items=util_1.mergeEvaluated.items(gen,items2,it.items,codegen_1.Name)}}}return ref.callRef=callRef,ref.default=def,ref}var hasRequiredCore;function requireCore(){if(hasRequiredCore)return core$1;hasRequiredCore=1,Object. defineProperty(core$1,"__esModule",{value:!0});const id_1=requireId(),ref_1=requireRef(),core2=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",id_1.default,ref_1.default];return core$1.default=core2,core$1}var validation={},limitNumber={},hasRequiredLimitNumber;function requireLimitNumber(){if(hasRequiredLimitNumber)return limitNumber;hasRequiredLimitNumber=1,Object.defineProperty(limitNumber,"__esModule",{value:!0});const codegen_1=requireCodegen(),ops=codegen_1.operators, KWDs={maximum:{okStr:"<=",ok:ops.LTE,fail:ops.GT},minimum:{okStr:">=",ok:ops.GTE,fail:ops.LT},exclusiveMaximum:{okStr:"<",ok:ops.LT,fail:ops.GTE},exclusiveMinimum:{okStr:">",ok:ops.GT,fail:ops.LTE}},error2={message:({keyword:keyword2,schemaCode})=>(0,codegen_1.str)`must be ${KWDs[keyword2].okStr} ${schemaCode}`,params:({keyword:keyword2,schemaCode})=>(0,codegen_1._)`{comparison: ${KWDs[keyword2].okStr}, limit: ${schemaCode}}`},def={keyword:Object.keys(KWDs),type:"number",schemaType:"number",$data:!0, error:error2,code(cxt){const{keyword:keyword2,data,schemaCode}=cxt;cxt.fail$data((0,codegen_1._)`${data} ${KWDs[keyword2].fail} ${schemaCode} || isNaN(${data})`)}};return limitNumber.default=def,limitNumber}var multipleOf={},hasRequiredMultipleOf;function requireMultipleOf(){if(hasRequiredMultipleOf)return multipleOf;hasRequiredMultipleOf=1,Object.defineProperty(multipleOf,"__esModule",{value:!0});const codegen_1=requireCodegen(),def={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0, error:{message:({schemaCode})=>(0,codegen_1.str)`must be multiple of ${schemaCode}`,params:({schemaCode})=>(0,codegen_1._)`{multipleOf: ${schemaCode}}`},code(cxt){const{gen,data,schemaCode,it}=cxt,prec=it.opts.multipleOfPrecision,res=gen.let("res"),invalid2=prec?(0,codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}`:(0,codegen_1._)`${res} !== parseInt(${res})`;cxt.fail$data((0,codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid2}))`)}};return multipleOf.default= def,multipleOf}var limitLength={},ucs2length={},hasRequiredUcs2length;function requireUcs2length(){if(hasRequiredUcs2length)return ucs2length;hasRequiredUcs2length=1,Object.defineProperty(ucs2length,"__esModule",{value:!0});function ucs2length$12(str){const len=str.length;let length=0,pos=0,value;for(;pos=55296&&value<=56319&&pos(0,codegen_1._)`{limit: ${schemaCode}}`},code(cxt){const{keyword:keyword2,data,schemaCode,it}=cxt,op2=keyword2==="maxLength"?codegen_1.operators.GT:codegen_1.operators.LT,len=it.opts.unicode===!1?(0,codegen_1._)`${data}.length`:(0,codegen_1._)`${(0,util_1.useFunc)(cxt.gen,ucs2length_1.default)}(${data})`;cxt.fail$data((0,codegen_1._)`${len} ${op2} ${schemaCode}`)}};return limitLength. default=def,limitLength}var pattern={},hasRequiredPattern;function requirePattern(){if(hasRequiredPattern)return pattern;hasRequiredPattern=1,Object.defineProperty(pattern,"__esModule",{value:!0});const code_1=requireCode(),codegen_1=requireCodegen(),def={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode})=>(0,codegen_1.str)`must match pattern "${schemaCode}"`,params:({schemaCode})=>(0,codegen_1._)`{pattern: ${schemaCode}}`},code(cxt){const{data,$data,schema, schemaCode,it}=cxt,u=it.opts.unicodeRegExp?"u":"",regExp=$data?(0,codegen_1._)`(new RegExp(${schemaCode}, ${u}))`:(0,code_1.usePattern)(cxt,schema);cxt.fail$data((0,codegen_1._)`!${regExp}.test(${data})`)}};return pattern.default=def,pattern}var limitProperties={},hasRequiredLimitProperties;function requireLimitProperties(){if(hasRequiredLimitProperties)return limitProperties;hasRequiredLimitProperties=1,Object.defineProperty(limitProperties,"__esModule",{value:!0});const codegen_1=requireCodegen(), def={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:keyword2,schemaCode}){const comp=keyword2==="maxProperties"?"more":"fewer";return(0,codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`},params:({schemaCode})=>(0,codegen_1._)`{limit: ${schemaCode}}`},code(cxt){const{keyword:keyword2,data,schemaCode}=cxt,op2=keyword2==="maxProperties"?codegen_1.operators.GT:codegen_1.operators.LT;cxt.fail$data((0,codegen_1._)`Object.keys(${data}).length ${op2} ${schemaCode}`)}}; return limitProperties.default=def,limitProperties}var required={},hasRequiredRequired;function requireRequired(){if(hasRequiredRequired)return required;hasRequiredRequired=1,Object.defineProperty(required,"__esModule",{value:!0});const code_1=requireCode(),codegen_1=requireCodegen(),util_1=requireUtil(),def={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty}})=>(0,codegen_1.str)`must have required property '${missingProperty}'`,params:({params:{ missingProperty}})=>(0,codegen_1._)`{missingProperty: ${missingProperty}}`},code(cxt){const{gen,schema,schemaCode,data,$data,it}=cxt,{opts}=it;if(!$data&&schema.length===0)return;const useLoop=schema.length>=opts.loopRequired;if(it.allErrors?allErrorsMode():exitOnErrorMode(),opts.strictRequired){const props=cxt.parentSchema.properties,{definedProperties}=cxt.it;for(const requiredKey of schema)if(props?.[requiredKey]===void 0&&!definedProperties.has(requiredKey)){const schemaPath=it.schemaEnv.baseId+ it.errSchemaPath,msg=`required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`;(0,util_1.checkStrictMode)(it,msg,it.opts.strictRequired)}}function allErrorsMode(){if(useLoop||$data)cxt.block$data(codegen_1.nil,loopAllRequired);else for(const prop2 of schema)(0,code_1.checkReportMissingProp)(cxt,prop2)}function exitOnErrorMode(){const missing=gen.let("missing");if(useLoop||$data){const valid2=gen.let("valid",!0);cxt.block$data(valid2,()=>loopUntilMissing(missing,valid2)), cxt.ok(valid2)}else gen.if((0,code_1.checkMissingProp)(cxt,schema,missing)),(0,code_1.reportMissingProp)(cxt,missing),gen.else()}function loopAllRequired(){gen.forOf("prop",schemaCode,prop2=>{cxt.setParams({missingProperty:prop2}),gen.if((0,code_1.noPropertyInData)(gen,data,prop2,opts.ownProperties),()=>cxt.error())})}function loopUntilMissing(missing,valid2){cxt.setParams({missingProperty:missing}),gen.forOf(missing,schemaCode,()=>{gen.assign(valid2,(0,code_1.propertyInData)(gen,data,missing,opts. ownProperties)),gen.if((0,codegen_1.not)(valid2),()=>{cxt.error(),gen.break()})},codegen_1.nil)}}};return required.default=def,required}var limitItems={},hasRequiredLimitItems;function requireLimitItems(){if(hasRequiredLimitItems)return limitItems;hasRequiredLimitItems=1,Object.defineProperty(limitItems,"__esModule",{value:!0});const codegen_1=requireCodegen(),def={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:keyword2,schemaCode}){const comp=keyword2=== "maxItems"?"more":"fewer";return(0,codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`},params:({schemaCode})=>(0,codegen_1._)`{limit: ${schemaCode}}`},code(cxt){const{keyword:keyword2,data,schemaCode}=cxt,op2=keyword2==="maxItems"?codegen_1.operators.GT:codegen_1.operators.LT;cxt.fail$data((0,codegen_1._)`${data}.length ${op2} ${schemaCode}`)}};return limitItems.default=def,limitItems}var uniqueItems={},equal={},hasRequiredEqual;function requireEqual(){if(hasRequiredEqual)return equal; hasRequiredEqual=1,Object.defineProperty(equal,"__esModule",{value:!0});const equal$12=requireFastDeepEqual();return equal$12.code='require("ajv/dist/runtime/equal").default',equal.default=equal$12,equal}var hasRequiredUniqueItems;function requireUniqueItems(){if(hasRequiredUniqueItems)return uniqueItems;hasRequiredUniqueItems=1,Object.defineProperty(uniqueItems,"__esModule",{value:!0});const dataType_1=requireDataType(),codegen_1=requireCodegen(),util_1=requireUtil(),equal_1=requireEqual(),def={ keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i,j}})=>(0,codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,params:({params:{i,j}})=>(0,codegen_1._)`{i: ${i}, j: ${j}}`},code(cxt){const{gen,data,$data,schema,parentSchema,schemaCode,it}=cxt;if(!$data&&!schema)return;const valid2=gen.let("valid"),itemTypes=parentSchema.items?(0,dataType_1.getSchemaTypes)(parentSchema.items):[];cxt.block$data(valid2,validateUniqueItems,(0,codegen_1. _)`${schemaCode} === false`),cxt.ok(valid2);function validateUniqueItems(){const i=gen.let("i",(0,codegen_1._)`${data}.length`),j=gen.let("j");cxt.setParams({i,j}),gen.assign(valid2,!0),gen.if((0,codegen_1._)`${i} > 1`,()=>(canOptimize()?loopN:loopN2)(i,j))}function canOptimize(){return itemTypes.length>0&&!itemTypes.some(t=>t==="object"||t==="array")}function loopN(i,j){const item=gen.name("item"),wrongType=(0,dataType_1.checkDataTypes)(itemTypes,item,it.opts.strictNumbers,dataType_1.DataType.Wrong), indices=gen.const("indices",(0,codegen_1._)`{}`);gen.for((0,codegen_1._)`;${i}--;`,()=>{gen.let(item,(0,codegen_1._)`${data}[${i}]`),gen.if(wrongType,(0,codegen_1._)`continue`),itemTypes.length>1&&gen.if((0,codegen_1._)`typeof ${item} == "string"`,(0,codegen_1._)`${item} += "_"`),gen.if((0,codegen_1._)`typeof ${indices}[${item}] == "number"`,()=>{gen.assign(j,(0,codegen_1._)`${indices}[${item}]`),cxt.error(),gen.assign(valid2,!1).break()}).code((0,codegen_1._)`${indices}[${item}] = ${i}`)})}function loopN2(i,j){ const eql=(0,util_1.useFunc)(gen,equal_1.default),outer=gen.name("outer");gen.label(outer).for((0,codegen_1._)`;${i}--;`,()=>gen.for((0,codegen_1._)`${j} = ${i}; ${j}--;`,()=>gen.if((0,codegen_1._)`${eql}(${data}[${i}], ${data}[${j}])`,()=>{cxt.error(),gen.assign(valid2,!1).break(outer)})))}}};return uniqueItems.default=def,uniqueItems}var _const={},hasRequired_const;function require_const(){if(hasRequired_const)return _const;hasRequired_const=1,Object.defineProperty(_const,"__esModule",{value:!0}); const codegen_1=requireCodegen(),util_1=requireUtil(),equal_1=requireEqual(),def={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode})=>(0,codegen_1._)`{allowedValue: ${schemaCode}}`},code(cxt){const{gen,data,$data,schemaCode,schema}=cxt;$data||schema&&typeof schema=="object"?cxt.fail$data((0,codegen_1._)`!${(0,util_1.useFunc)(gen,equal_1.default)}(${data}, ${schemaCode})`):cxt.fail((0,codegen_1._)`${schema} !== ${data}`)}};return _const.default=def,_const}var _enum={}, hasRequired_enum;function require_enum(){if(hasRequired_enum)return _enum;hasRequired_enum=1,Object.defineProperty(_enum,"__esModule",{value:!0});const codegen_1=requireCodegen(),util_1=requireUtil(),equal_1=requireEqual(),def={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode})=>(0,codegen_1._)`{allowedValues: ${schemaCode}}`},code(cxt){const{gen,data,$data,schema,schemaCode,it}=cxt;if(!$data&&schema.length===0)throw new Error( "enum must have non-empty array");const useLoop=schema.length>=it.opts.loopEnum;let eql;const getEql=()=>eql??(eql=(0,util_1.useFunc)(gen,equal_1.default));let valid2;if(useLoop||$data)valid2=gen.let("valid"),cxt.block$data(valid2,loopEnum);else{if(!Array.isArray(schema))throw new Error("ajv implementation error");const vSchema=gen.const("vSchema",schemaCode);valid2=(0,codegen_1.or)(...schema.map((_x,i)=>equalCode(vSchema,i)))}cxt.pass(valid2);function loopEnum(){gen.assign(valid2,!1),gen.forOf( "v",schemaCode,v=>gen.if((0,codegen_1._)`${getEql()}(${data}, ${v})`,()=>gen.assign(valid2,!0).break()))}function equalCode(vSchema,i){const sch=schema[i];return typeof sch=="object"&&sch!==null?(0,codegen_1._)`${getEql()}(${data}, ${vSchema}[${i}])`:(0,codegen_1._)`${data} === ${sch}`}}};return _enum.default=def,_enum}var hasRequiredValidation;function requireValidation(){if(hasRequiredValidation)return validation;hasRequiredValidation=1,Object.defineProperty(validation,"__esModule",{value:!0}); const limitNumber_1=requireLimitNumber(),multipleOf_1=requireMultipleOf(),limitLength_1=requireLimitLength(),pattern_1=requirePattern(),limitProperties_1=requireLimitProperties(),required_1=requireRequired(),limitItems_1=requireLimitItems(),uniqueItems_1=requireUniqueItems(),const_1=require_const(),enum_1=require_enum(),validation$12=[limitNumber_1.default,multipleOf_1.default,limitLength_1.default,pattern_1.default,limitProperties_1.default,required_1.default,limitItems_1.default,uniqueItems_1. default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},const_1.default,enum_1.default];return validation.default=validation$12,validation}var applicator={},additionalItems={},hasRequiredAdditionalItems;function requireAdditionalItems(){if(hasRequiredAdditionalItems)return additionalItems;hasRequiredAdditionalItems=1,Object.defineProperty(additionalItems,"__esModule",{value:!0}),additionalItems.validateAdditionalItems=void 0;const codegen_1=requireCodegen(), util_1=requireUtil(),def={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len}})=>(0,codegen_1.str)`must NOT have more than ${len} items`,params:({params:{len}})=>(0,codegen_1._)`{limit: ${len}}`},code(cxt){const{parentSchema,it}=cxt,{items:items2}=parentSchema;if(!Array.isArray(items2)){(0,util_1.checkStrictMode)(it,'"additionalItems" is ignored when "items" is not an array of schemas');return}validateAdditionalItems(cxt,items2)}}; function validateAdditionalItems(cxt,items2){const{gen,schema,data,keyword:keyword2,it}=cxt;it.items=!0;const len=gen.const("len",(0,codegen_1._)`${data}.length`);if(schema===!1)cxt.setParams({len:items2.length}),cxt.pass((0,codegen_1._)`${len} <= ${items2.length}`);else if(typeof schema=="object"&&!(0,util_1.alwaysValidSchema)(it,schema)){const valid2=gen.var("valid",(0,codegen_1._)`${len} <= ${items2.length}`);gen.if((0,codegen_1.not)(valid2),()=>validateItems(valid2)),cxt.ok(valid2)}function validateItems(valid2){ gen.forRange("i",items2.length,len,i=>{cxt.subschema({keyword:keyword2,dataProp:i,dataPropType:util_1.Type.Num},valid2),it.allErrors||gen.if((0,codegen_1.not)(valid2),()=>gen.break())})}}return additionalItems.validateAdditionalItems=validateAdditionalItems,additionalItems.default=def,additionalItems}var prefixItems={},items={},hasRequiredItems;function requireItems(){if(hasRequiredItems)return items;hasRequiredItems=1,Object.defineProperty(items,"__esModule",{value:!0}),items.validateTuple=void 0; const codegen_1=requireCodegen(),util_1=requireUtil(),code_1=requireCode(),def={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(cxt){const{schema,it}=cxt;if(Array.isArray(schema))return validateTuple(cxt,"additionalItems",schema);it.items=!0,!(0,util_1.alwaysValidSchema)(it,schema)&&cxt.ok((0,code_1.validateArray)(cxt))}};function validateTuple(cxt,extraItems,schArr=cxt.schema){const{gen,parentSchema,data,keyword:keyword2,it}=cxt;checkStrictTuple(parentSchema), it.opts.unevaluated&&schArr.length&&it.items!==!0&&(it.items=util_1.mergeEvaluated.items(gen,schArr.length,it.items));const valid2=gen.name("valid"),len=gen.const("len",(0,codegen_1._)`${data}.length`);schArr.forEach((sch,i)=>{(0,util_1.alwaysValidSchema)(it,sch)||(gen.if((0,codegen_1._)`${len} > ${i}`,()=>cxt.subschema({keyword:keyword2,schemaProp:i,dataProp:i},valid2)),cxt.ok(valid2))});function checkStrictTuple(sch){const{opts,errSchemaPath}=it,l=schArr.length,fullTuple=l===sch.minItems&&(l=== sch.maxItems||sch[extraItems]===!1);if(opts.strictTuples&&!fullTuple){const msg=`"${keyword2}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`;(0,util_1.checkStrictMode)(it,msg,opts.strictTuples)}}}return items.validateTuple=validateTuple,items.default=def,items}var hasRequiredPrefixItems;function requirePrefixItems(){if(hasRequiredPrefixItems)return prefixItems;hasRequiredPrefixItems=1,Object.defineProperty(prefixItems,"__esModule", {value:!0});const items_1=requireItems(),def={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:cxt=>(0,items_1.validateTuple)(cxt,"items")};return prefixItems.default=def,prefixItems}var items2020={},hasRequiredItems2020;function requireItems2020(){if(hasRequiredItems2020)return items2020;hasRequiredItems2020=1,Object.defineProperty(items2020,"__esModule",{value:!0});const codegen_1=requireCodegen(),util_1=requireUtil(),code_1=requireCode(),additionalItems_1=requireAdditionalItems(), def={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len}})=>(0,codegen_1.str)`must NOT have more than ${len} items`,params:({params:{len}})=>(0,codegen_1._)`{limit: ${len}}`},code(cxt){const{schema,parentSchema,it}=cxt,{prefixItems:prefixItems2}=parentSchema;it.items=!0,!(0,util_1.alwaysValidSchema)(it,schema)&&(prefixItems2?(0,additionalItems_1.validateAdditionalItems)(cxt,prefixItems2):cxt.ok((0,code_1.validateArray)(cxt)))}};return items2020. default=def,items2020}var contains$1={},hasRequiredContains;function requireContains(){if(hasRequiredContains)return contains$1;hasRequiredContains=1,Object.defineProperty(contains$1,"__esModule",{value:!0});const codegen_1=requireCodegen(),util_1=requireUtil(),def={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:min2,max:max2}})=>max2===void 0?(0,codegen_1.str)`must contain at least ${min2} valid item(s)`:(0,codegen_1. str)`must contain at least ${min2} and no more than ${max2} valid item(s)`,params:({params:{min:min2,max:max2}})=>max2===void 0?(0,codegen_1._)`{minContains: ${min2}}`:(0,codegen_1._)`{minContains: ${min2}, maxContains: ${max2}}`},code(cxt){const{gen,schema,parentSchema,data,it}=cxt;let min2,max2;const{minContains,maxContains}=parentSchema;it.opts.next?(min2=minContains===void 0?1:minContains,max2=maxContains):min2=1;const len=gen.const("len",(0,codegen_1._)`${data}.length`);if(cxt.setParams({min:min2, max:max2}),max2===void 0&&min2===0){(0,util_1.checkStrictMode)(it,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(max2!==void 0&&min2>max2){(0,util_1.checkStrictMode)(it,'"minContains" > "maxContains" is always invalid'),cxt.fail();return}if((0,util_1.alwaysValidSchema)(it,schema)){let cond=(0,codegen_1._)`${len} >= ${min2}`;max2!==void 0&&(cond=(0,codegen_1._)`${cond} && ${len} <= ${max2}`),cxt.pass(cond);return}it.items=!0;const valid2=gen.name("valid");max2=== void 0&&min2===1?validateItems(valid2,()=>gen.if(valid2,()=>gen.break())):min2===0?(gen.let(valid2,!0),max2!==void 0&&gen.if((0,codegen_1._)`${data}.length > 0`,validateItemsWithCount)):(gen.let(valid2,!1),validateItemsWithCount()),cxt.result(valid2,()=>cxt.reset());function validateItemsWithCount(){const schValid=gen.name("_valid"),count=gen.let("count",0);validateItems(schValid,()=>gen.if(schValid,()=>checkLimits(count)))}function validateItems(_valid,block2){gen.forRange("i",0,len,i=>{cxt.subschema( {keyword:"contains",dataProp:i,dataPropType:util_1.Type.Num,compositeRule:!0},_valid),block2()})}function checkLimits(count){gen.code((0,codegen_1._)`${count}++`),max2===void 0?gen.if((0,codegen_1._)`${count} >= ${min2}`,()=>gen.assign(valid2,!0).break()):(gen.if((0,codegen_1._)`${count} > ${max2}`,()=>gen.assign(valid2,!1).break()),min2===1?gen.assign(valid2,!0):gen.if((0,codegen_1._)`${count} >= ${min2}`,()=>gen.assign(valid2,!0)))}}};return contains$1.default=def,contains$1}var dependencies={}, hasRequiredDependencies;function requireDependencies(){return hasRequiredDependencies||(hasRequiredDependencies=1,function(exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.validateSchemaDeps=exports.validatePropertyDeps=exports.error=void 0;const codegen_1=requireCodegen(),util_1=requireUtil(),code_1=requireCode();exports.error={message:({params:{property,depsCount,deps}})=>{const property_ies=depsCount===1?"property":"properties";return(0,codegen_1.str)`must have ${property_ies} ${deps} when property ${property} is present`}, params:({params:{property,depsCount,deps,missingProperty}})=>(0,codegen_1._)`{property: ${property}, missingProperty: ${missingProperty}, depsCount: ${depsCount}, deps: ${deps}}`};const def={keyword:"dependencies",type:"object",schemaType:"object",error:exports.error,code(cxt){const[propDeps,schDeps]=splitDependencies(cxt);validatePropertyDeps(cxt,propDeps),validateSchemaDeps(cxt,schDeps)}};function splitDependencies({schema}){const propertyDeps={},schemaDeps={};for(const key2 in schema){if(key2==="__proto__")continue;const deps=Array.isArray(schema[key2])?propertyDeps:schemaDeps;deps[key2]=schema[key2]}return[propertyDeps,schemaDeps]}function validatePropertyDeps(cxt,propertyDeps=cxt. schema){const{gen,data,it}=cxt;if(Object.keys(propertyDeps).length===0)return;const missing=gen.let("missing");for(const prop2 in propertyDeps){const deps=propertyDeps[prop2];if(deps.length===0)continue;const hasProperty=(0,code_1.propertyInData)(gen,data,prop2,it.opts.ownProperties);cxt.setParams({property:prop2,depsCount:deps.length,deps:deps.join(", ")}),it.allErrors?gen.if(hasProperty,()=>{for(const depProp of deps)(0,code_1.checkReportMissingProp)(cxt,depProp)}):(gen.if((0,codegen_1._)`${hasProperty} && (${(0,code_1. checkMissingProp)(cxt,deps,missing)})`),(0,code_1.reportMissingProp)(cxt,missing),gen.else())}}exports.validatePropertyDeps=validatePropertyDeps;function validateSchemaDeps(cxt,schemaDeps=cxt.schema){const{gen,data,keyword:keyword2,it}=cxt,valid2=gen.name("valid");for(const prop2 in schemaDeps)(0,util_1.alwaysValidSchema)(it,schemaDeps[prop2])||(gen.if((0,code_1.propertyInData)(gen,data,prop2,it.opts.ownProperties),()=>{const schCxt=cxt.subschema({keyword:keyword2,schemaProp:prop2},valid2);cxt.mergeValidEvaluated( schCxt,valid2)},()=>gen.var(valid2,!0)),cxt.ok(valid2))}exports.validateSchemaDeps=validateSchemaDeps,exports.default=def}(dependencies)),dependencies}var propertyNames={},hasRequiredPropertyNames;function requirePropertyNames(){if(hasRequiredPropertyNames)return propertyNames;hasRequiredPropertyNames=1,Object.defineProperty(propertyNames,"__esModule",{value:!0});const codegen_1=requireCodegen(),util_1=requireUtil(),def={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{ message:"property name must be valid",params:({params})=>(0,codegen_1._)`{propertyName: ${params.propertyName}}`},code(cxt){const{gen,schema,data,it}=cxt;if((0,util_1.alwaysValidSchema)(it,schema))return;const valid2=gen.name("valid");gen.forIn("key",data,key2=>{cxt.setParams({propertyName:key2}),cxt.subschema({keyword:"propertyNames",data:key2,dataTypes:["string"],propertyName:key2,compositeRule:!0},valid2),gen.if((0,codegen_1.not)(valid2),()=>{cxt.error(!0),it.allErrors||gen.break()})}),cxt.ok( valid2)}};return propertyNames.default=def,propertyNames}var additionalProperties={},hasRequiredAdditionalProperties;function requireAdditionalProperties(){if(hasRequiredAdditionalProperties)return additionalProperties;hasRequiredAdditionalProperties=1,Object.defineProperty(additionalProperties,"__esModule",{value:!0});const code_1=requireCode(),codegen_1=requireCodegen(),names_1=requireNames(),util_1=requireUtil(),def={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"], allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params})=>(0,codegen_1._)`{additionalProperty: ${params.additionalProperty}}`},code(cxt){const{gen,schema,parentSchema,data,errsCount,it}=cxt;if(!errsCount)throw new Error("ajv implementation error");const{allErrors,opts}=it;if(it.props=!0,opts.removeAdditional!=="all"&&(0,util_1.alwaysValidSchema)(it,schema))return;const props=(0,code_1.allSchemaProperties)(parentSchema.properties),patProps=(0,code_1. allSchemaProperties)(parentSchema.patternProperties);checkAdditionalProperties(),cxt.ok((0,codegen_1._)`${errsCount} === ${names_1.default.errors}`);function checkAdditionalProperties(){gen.forIn("key",data,key2=>{!props.length&&!patProps.length?additionalPropertyCode(key2):gen.if(isAdditional(key2),()=>additionalPropertyCode(key2))})}function isAdditional(key2){let definedProp;if(props.length>8){const propsSchema=(0,util_1.schemaRefOrVal)(it,parentSchema.properties,"properties");definedProp=(0,code_1. isOwnProperty)(gen,propsSchema,key2)}else props.length?definedProp=(0,codegen_1.or)(...props.map(p2=>(0,codegen_1._)`${key2} === ${p2}`)):definedProp=codegen_1.nil;return patProps.length&&(definedProp=(0,codegen_1.or)(definedProp,...patProps.map(p2=>(0,codegen_1._)`${(0,code_1.usePattern)(cxt,p2)}.test(${key2})`))),(0,codegen_1.not)(definedProp)}function deleteAdditional(key2){gen.code((0,codegen_1._)`delete ${data}[${key2}]`)}function additionalPropertyCode(key2){if(opts.removeAdditional==="all"|| opts.removeAdditional&&schema===!1){deleteAdditional(key2);return}if(schema===!1){cxt.setParams({additionalProperty:key2}),cxt.error(),allErrors||gen.break();return}if(typeof schema=="object"&&!(0,util_1.alwaysValidSchema)(it,schema)){const valid2=gen.name("valid");opts.removeAdditional==="failing"?(applyAdditionalSchema(key2,valid2,!1),gen.if((0,codegen_1.not)(valid2),()=>{cxt.reset(),deleteAdditional(key2)})):(applyAdditionalSchema(key2,valid2),allErrors||gen.if((0,codegen_1.not)(valid2),()=>gen. break()))}}function applyAdditionalSchema(key2,valid2,errors2){const subschema2={keyword:"additionalProperties",dataProp:key2,dataPropType:util_1.Type.Str};errors2===!1&&Object.assign(subschema2,{compositeRule:!0,createErrors:!1,allErrors:!1}),cxt.subschema(subschema2,valid2)}}};return additionalProperties.default=def,additionalProperties}var properties$2={},hasRequiredProperties;function requireProperties(){if(hasRequiredProperties)return properties$2;hasRequiredProperties=1,Object.defineProperty( properties$2,"__esModule",{value:!0});const validate_1=requireValidate(),code_1=requireCode(),util_1=requireUtil(),additionalProperties_1=requireAdditionalProperties(),def={keyword:"properties",type:"object",schemaType:"object",code(cxt){const{gen,schema,parentSchema,data,it}=cxt;it.opts.removeAdditional==="all"&&parentSchema.additionalProperties===void 0&&additionalProperties_1.default.code(new validate_1.KeywordCxt(it,additionalProperties_1.default,"additionalProperties"));const allProps=(0,code_1. allSchemaProperties)(schema);for(const prop2 of allProps)it.definedProperties.add(prop2);it.opts.unevaluated&&allProps.length&&it.props!==!0&&(it.props=util_1.mergeEvaluated.props(gen,(0,util_1.toHash)(allProps),it.props));const properties2=allProps.filter(p2=>!(0,util_1.alwaysValidSchema)(it,schema[p2]));if(properties2.length===0)return;const valid2=gen.name("valid");for(const prop2 of properties2)hasDefault(prop2)?applyPropertySchema(prop2):(gen.if((0,code_1.propertyInData)(gen,data,prop2,it.opts. ownProperties)),applyPropertySchema(prop2),it.allErrors||gen.else().var(valid2,!0),gen.endIf()),cxt.it.definedProperties.add(prop2),cxt.ok(valid2);function hasDefault(prop2){return it.opts.useDefaults&&!it.compositeRule&&schema[prop2].default!==void 0}function applyPropertySchema(prop2){cxt.subschema({keyword:"properties",schemaProp:prop2,dataProp:prop2},valid2)}}};return properties$2.default=def,properties$2}var patternProperties={},hasRequiredPatternProperties;function requirePatternProperties(){ if(hasRequiredPatternProperties)return patternProperties;hasRequiredPatternProperties=1,Object.defineProperty(patternProperties,"__esModule",{value:!0});const code_1=requireCode(),codegen_1=requireCodegen(),util_1=requireUtil(),util_2=requireUtil(),def={keyword:"patternProperties",type:"object",schemaType:"object",code(cxt){const{gen,schema,data,parentSchema,it}=cxt,{opts}=it,patterns=(0,code_1.allSchemaProperties)(schema),alwaysValidPatterns=patterns.filter(p2=>(0,util_1.alwaysValidSchema)(it,schema[p2])); if(patterns.length===0||alwaysValidPatterns.length===patterns.length&&(!it.opts.unevaluated||it.props===!0))return;const checkProperties=opts.strictSchema&&!opts.allowMatchingProperties&&parentSchema.properties,valid2=gen.name("valid");it.props!==!0&&!(it.props instanceof codegen_1.Name)&&(it.props=(0,util_2.evaluatedPropsToName)(gen,it.props));const{props}=it;validatePatternProperties();function validatePatternProperties(){for(const pat of patterns)checkProperties&&checkMatchingProperties(pat), it.allErrors?validateProperties(pat):(gen.var(valid2,!0),validateProperties(pat),gen.if(valid2))}function checkMatchingProperties(pat){for(const prop2 in checkProperties)new RegExp(pat).test(prop2)&&(0,util_1.checkStrictMode)(it,`property ${prop2} matches pattern ${pat} (use allowMatchingProperties)`)}function validateProperties(pat){gen.forIn("key",data,key2=>{gen.if((0,codegen_1._)`${(0,code_1.usePattern)(cxt,pat)}.test(${key2})`,()=>{const alwaysValid=alwaysValidPatterns.includes(pat);alwaysValid|| cxt.subschema({keyword:"patternProperties",schemaProp:pat,dataProp:key2,dataPropType:util_2.Type.Str},valid2),it.opts.unevaluated&&props!==!0?gen.assign((0,codegen_1._)`${props}[${key2}]`,!0):!alwaysValid&&!it.allErrors&&gen.if((0,codegen_1.not)(valid2),()=>gen.break())})})}}};return patternProperties.default=def,patternProperties}var not={},hasRequiredNot;function requireNot(){if(hasRequiredNot)return not;hasRequiredNot=1,Object.defineProperty(not,"__esModule",{value:!0});const util_1=requireUtil(), def={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(cxt){const{gen,schema,it}=cxt;if((0,util_1.alwaysValidSchema)(it,schema)){cxt.fail();return}const valid2=gen.name("valid");cxt.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},valid2),cxt.failResult(valid2,()=>cxt.reset(),()=>cxt.error())},error:{message:"must NOT be valid"}};return not.default=def,not}var anyOf={},hasRequiredAnyOf;function requireAnyOf(){if(hasRequiredAnyOf)return anyOf;hasRequiredAnyOf= 1,Object.defineProperty(anyOf,"__esModule",{value:!0});const def={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:requireCode().validateUnion,error:{message:"must match a schema in anyOf"}};return anyOf.default=def,anyOf}var oneOf={},hasRequiredOneOf;function requireOneOf(){if(hasRequiredOneOf)return oneOf;hasRequiredOneOf=1,Object.defineProperty(oneOf,"__esModule",{value:!0});const codegen_1=requireCodegen(),util_1=requireUtil(),def={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{ message:"must match exactly one schema in oneOf",params:({params})=>(0,codegen_1._)`{passingSchemas: ${params.passing}}`},code(cxt){const{gen,schema,parentSchema,it}=cxt;if(!Array.isArray(schema))throw new Error("ajv implementation error");if(it.opts.discriminator&&parentSchema.discriminator)return;const schArr=schema,valid2=gen.let("valid",!1),passing=gen.let("passing",null),schValid=gen.name("_valid");cxt.setParams({passing}),gen.block(validateOneOf),cxt.result(valid2,()=>cxt.reset(),()=>cxt.error( !0));function validateOneOf(){schArr.forEach((sch,i)=>{let schCxt;(0,util_1.alwaysValidSchema)(it,sch)?gen.var(schValid,!0):schCxt=cxt.subschema({keyword:"oneOf",schemaProp:i,compositeRule:!0},schValid),i>0&&gen.if((0,codegen_1._)`${schValid} && ${valid2}`).assign(valid2,!1).assign(passing,(0,codegen_1._)`[${passing}, ${i}]`).else(),gen.if(schValid,()=>{gen.assign(valid2,!0),gen.assign(passing,i),schCxt&&cxt.mergeEvaluated(schCxt,codegen_1.Name)})})}}};return oneOf.default=def,oneOf}var allOf={}, hasRequiredAllOf;function requireAllOf(){if(hasRequiredAllOf)return allOf;hasRequiredAllOf=1,Object.defineProperty(allOf,"__esModule",{value:!0});const util_1=requireUtil(),def={keyword:"allOf",schemaType:"array",code(cxt){const{gen,schema,it}=cxt;if(!Array.isArray(schema))throw new Error("ajv implementation error");const valid2=gen.name("valid");schema.forEach((sch,i)=>{if((0,util_1.alwaysValidSchema)(it,sch))return;const schCxt=cxt.subschema({keyword:"allOf",schemaProp:i},valid2);cxt.ok(valid2), cxt.mergeEvaluated(schCxt)})}};return allOf.default=def,allOf}var _if={},hasRequired_if;function require_if(){if(hasRequired_if)return _if;hasRequired_if=1,Object.defineProperty(_if,"__esModule",{value:!0});const codegen_1=requireCodegen(),util_1=requireUtil(),def={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params})=>(0,codegen_1.str)`must match "${params.ifClause}" schema`,params:({params})=>(0,codegen_1._)`{failingKeyword: ${params.ifClause}}`},code(cxt){const{ gen,parentSchema,it}=cxt;parentSchema.then===void 0&&parentSchema.else===void 0&&(0,util_1.checkStrictMode)(it,'"if" without "then" and "else" is ignored');const hasThen=hasSchema(it,"then"),hasElse=hasSchema(it,"else");if(!hasThen&&!hasElse)return;const valid2=gen.let("valid",!0),schValid=gen.name("_valid");if(validateIf(),cxt.reset(),hasThen&&hasElse){const ifClause=gen.let("ifClause");cxt.setParams({ifClause}),gen.if(schValid,validateClause("then",ifClause),validateClause("else",ifClause))}else hasThen?gen.if(schValid,validateClause("then")):gen.if((0,codegen_1.not)(schValid),validateClause("else"));cxt.pass(valid2,()=>cxt.error(!0));function validateIf(){const schCxt=cxt.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},schValid);cxt.mergeEvaluated(schCxt)}function validateClause(keyword2,ifClause){return()=>{const schCxt=cxt.subschema({keyword:keyword2},schValid);gen.assign(valid2,schValid),cxt.mergeValidEvaluated(schCxt,valid2),ifClause?gen.assign(ifClause,(0,codegen_1. _)`${keyword2}`):cxt.setParams({ifClause:keyword2})}}}};function hasSchema(it,keyword2){const schema=it.schema[keyword2];return schema!==void 0&&!(0,util_1.alwaysValidSchema)(it,schema)}return _if.default=def,_if}var thenElse={},hasRequiredThenElse;function requireThenElse(){if(hasRequiredThenElse)return thenElse;hasRequiredThenElse=1,Object.defineProperty(thenElse,"__esModule",{value:!0});const util_1=requireUtil(),def={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:keyword2, parentSchema,it}){parentSchema.if===void 0&&(0,util_1.checkStrictMode)(it,`"${keyword2}" without "if" is ignored`)}};return thenElse.default=def,thenElse}var hasRequiredApplicator;function requireApplicator(){if(hasRequiredApplicator)return applicator;hasRequiredApplicator=1,Object.defineProperty(applicator,"__esModule",{value:!0});const additionalItems_1=requireAdditionalItems(),prefixItems_1=requirePrefixItems(),items_1=requireItems(),items2020_1=requireItems2020(),contains_1=requireContains(), dependencies_1=requireDependencies(),propertyNames_1=requirePropertyNames(),additionalProperties_1=requireAdditionalProperties(),properties_12=requireProperties(),patternProperties_1=requirePatternProperties(),not_1=requireNot(),anyOf_1=requireAnyOf(),oneOf_1=requireOneOf(),allOf_1=requireAllOf(),if_1=require_if(),thenElse_1=requireThenElse();function getApplicator(draft2020=!1){const applicator2=[not_1.default,anyOf_1.default,oneOf_1.default,allOf_1.default,if_1.default,thenElse_1.default,propertyNames_1. default,additionalProperties_1.default,dependencies_1.default,properties_12.default,patternProperties_1.default];return draft2020?applicator2.push(prefixItems_1.default,items2020_1.default):applicator2.push(additionalItems_1.default,items_1.default),applicator2.push(contains_1.default),applicator2}return applicator.default=getApplicator,applicator}var format$1={},format={},hasRequiredFormat$1;function requireFormat$1(){if(hasRequiredFormat$1)return format;hasRequiredFormat$1=1,Object.defineProperty( format,"__esModule",{value:!0});const codegen_1=requireCodegen(),def={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode})=>(0,codegen_1.str)`must match format "${schemaCode}"`,params:({schemaCode})=>(0,codegen_1._)`{format: ${schemaCode}}`},code(cxt,ruleType){const{gen,data,$data,schema,schemaCode,it}=cxt,{opts,errSchemaPath,schemaEnv,self:self2}=it;if(!opts.validateFormats)return;$data?validate$DataFormat():validateFormat();function validate$DataFormat(){ const fmts=gen.scopeValue("formats",{ref:self2.formats,code:opts.code.formats}),fDef=gen.const("fDef",(0,codegen_1._)`${fmts}[${schemaCode}]`),fType=gen.let("fType"),format2=gen.let("format");gen.if((0,codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`,()=>gen.assign(fType,(0,codegen_1._)`${fDef}.type || "string"`).assign(format2,(0,codegen_1._)`${fDef}.validate`),()=>gen.assign(fType,(0,codegen_1._)`"string"`).assign(format2,fDef)),cxt.fail$data((0,codegen_1.or)(unknownFmt(), invalidFmt()));function unknownFmt(){return opts.strictSchema===!1?codegen_1.nil:(0,codegen_1._)`${schemaCode} && !${format2}`}function invalidFmt(){const callFormat=schemaEnv.$async?(0,codegen_1._)`(${fDef}.async ? await ${format2}(${data}) : ${format2}(${data}))`:(0,codegen_1._)`${format2}(${data})`,validData=(0,codegen_1._)`(typeof ${format2} == "function" ? ${callFormat} : ${format2}.test(${data}))`;return(0,codegen_1._)`${format2} && ${format2} !== true && ${fType} === ${ruleType} && !${validData}`}} function validateFormat(){const formatDef=self2.formats[schema];if(!formatDef){unknownFormat();return}if(formatDef===!0)return;const[fmtType,format2,fmtRef]=getFormat(formatDef);fmtType===ruleType&&cxt.pass(validCondition());function unknownFormat(){if(opts.strictSchema===!1){self2.logger.warn(unknownMsg());return}throw new Error(unknownMsg());function unknownMsg(){return`unknown format "${schema}" ignored in schema at path "${errSchemaPath}"`}}function getFormat(fmtDef){const code2=fmtDef instanceof RegExp?(0,codegen_1.regexpCode)(fmtDef):opts.code.formats?(0,codegen_1._)`${opts.code.formats}${(0,codegen_1.getProperty)(schema)}`:void 0,fmt=gen.scopeValue("formats",{key:schema,ref:fmtDef,code:code2});return typeof fmtDef=="object"&&!(fmtDef instanceof RegExp)?[fmtDef.type||"string",fmtDef.validate,(0,codegen_1._)`${fmt}.validate`]:["string",fmtDef,fmt]}function validCondition(){if(typeof formatDef=="object"&&!(formatDef instanceof RegExp)&&formatDef.async){if(!schemaEnv.$async)throw new Error( "async format in sync schema");return(0,codegen_1._)`await ${fmtRef}(${data})`}return typeof format2=="function"?(0,codegen_1._)`${fmtRef}(${data})`:(0,codegen_1._)`${fmtRef}.test(${data})`}}}};return format.default=def,format}var hasRequiredFormat;function requireFormat(){if(hasRequiredFormat)return format$1;hasRequiredFormat=1,Object.defineProperty(format$1,"__esModule",{value:!0});const format2=[requireFormat$1().default];return format$1.default=format2,format$1}var metadata={},hasRequiredMetadata; function requireMetadata(){return hasRequiredMetadata||(hasRequiredMetadata=1,Object.defineProperty(metadata,"__esModule",{value:!0}),metadata.contentVocabulary=metadata.metadataVocabulary=void 0,metadata.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],metadata.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),metadata}var hasRequiredDraft7;function requireDraft7(){if(hasRequiredDraft7)return draft7;hasRequiredDraft7=1,Object. defineProperty(draft7,"__esModule",{value:!0});const core_1=requireCore(),validation_1=requireValidation(),applicator_1=requireApplicator(),format_1=requireFormat(),metadata_1=requireMetadata(),draft7Vocabularies=[core_1.default,validation_1.default,(0,applicator_1.default)(),format_1.default,metadata_1.metadataVocabulary,metadata_1.contentVocabulary];return draft7.default=draft7Vocabularies,draft7}var discriminator={},types$1={},hasRequiredTypes;function requireTypes(){if(hasRequiredTypes)return types$1; hasRequiredTypes=1,Object.defineProperty(types$1,"__esModule",{value:!0}),types$1.DiscrError=void 0;var DiscrError;return function(DiscrError2){DiscrError2.Tag="tag",DiscrError2.Mapping="mapping"}(DiscrError||(types$1.DiscrError=DiscrError={})),types$1}var hasRequiredDiscriminator;function requireDiscriminator(){if(hasRequiredDiscriminator)return discriminator;hasRequiredDiscriminator=1,Object.defineProperty(discriminator,"__esModule",{value:!0});const codegen_1=requireCodegen(),types_1=requireTypes(), compile_1=requireCompile(),ref_error_1=requireRef_error(),util_1=requireUtil(),def={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError,tagName}})=>discrError===types_1.DiscrError.Tag?`tag "${tagName}" must be string`:`value of tag "${tagName}" must be in oneOf`,params:({params:{discrError,tag,tagName}})=>(0,codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`},code(cxt){const{gen,data,schema,parentSchema,it}=cxt,{oneOf:oneOf2}=parentSchema; if(!it.opts.discriminator)throw new Error("discriminator: requires discriminator option");const tagName=schema.propertyName;if(typeof tagName!="string")throw new Error("discriminator: requires propertyName");if(schema.mapping)throw new Error("discriminator: mapping is not supported");if(!oneOf2)throw new Error("discriminator: requires oneOf keyword");const valid2=gen.let("valid",!1),tag=gen.const("tag",(0,codegen_1._)`${data}${(0,codegen_1.getProperty)(tagName)}`);gen.if((0,codegen_1._)`typeof ${tag} == "string"`, ()=>validateMapping(),()=>cxt.error(!1,{discrError:types_1.DiscrError.Tag,tag,tagName})),cxt.ok(valid2);function validateMapping(){const mapping=getMapping();gen.if(!1);for(const tagValue in mapping)gen.elseIf((0,codegen_1._)`${tag} === ${tagValue}`),gen.assign(valid2,applyTagSchema(mapping[tagValue]));gen.else(),cxt.error(!1,{discrError:types_1.DiscrError.Mapping,tag,tagName}),gen.endIf()}function applyTagSchema(schemaProp){const _valid=gen.name("valid"),schCxt=cxt.subschema({keyword:"oneOf",schemaProp}, _valid);return cxt.mergeEvaluated(schCxt,codegen_1.Name),_valid}function getMapping(){var _a2;const oneOfMapping={},topRequired=hasRequired(parentSchema);let tagRequired=!0;for(let i=0;ithis.addVocabulary(v)),this.opts.discriminator&&this.addKeyword(discriminator_1.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const metaSchema=this.opts.$data?this.$dataMetaSchema(draft7MetaSchema,META_SUPPORT_DATA):draft7MetaSchema;this.addMetaSchema(metaSchema,META_SCHEMA_ID,!1),this.refs["http://json-schema.org/schema"]=META_SCHEMA_ID}defaultMeta(){ return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(META_SCHEMA_ID)?META_SCHEMA_ID:void 0)}}exports.Ajv=Ajv2,module.exports=exports=Ajv2,module.exports.Ajv=Ajv2,Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=Ajv2;var validate_1=requireValidate();Object.defineProperty(exports,"KeywordCxt",{enumerable:!0,get:function(){return validate_1.KeywordCxt}});var codegen_1=requireCodegen();Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return codegen_1. _}}),Object.defineProperty(exports,"str",{enumerable:!0,get:function(){return codegen_1.str}}),Object.defineProperty(exports,"stringify",{enumerable:!0,get:function(){return codegen_1.stringify}}),Object.defineProperty(exports,"nil",{enumerable:!0,get:function(){return codegen_1.nil}}),Object.defineProperty(exports,"Name",{enumerable:!0,get:function(){return codegen_1.Name}}),Object.defineProperty(exports,"CodeGen",{enumerable:!0,get:function(){return codegen_1.CodeGen}});var validation_error_1=requireValidation_error(); Object.defineProperty(exports,"ValidationError",{enumerable:!0,get:function(){return validation_error_1.default}});var ref_error_1=requireRef_error();Object.defineProperty(exports,"MissingRefError",{enumerable:!0,get:function(){return ref_error_1.default}})}(ajv,ajv.exports)),ajv.exports}var hasRequiredLimit;function requireLimit(){return hasRequiredLimit||(hasRequiredLimit=1,function(exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatLimitDefinition=void 0;const ajv_1=requireAjv(), codegen_1=requireCodegen(),ops=codegen_1.operators,KWDs={formatMaximum:{okStr:"<=",ok:ops.LTE,fail:ops.GT},formatMinimum:{okStr:">=",ok:ops.GTE,fail:ops.LT},formatExclusiveMaximum:{okStr:"<",ok:ops.LT,fail:ops.GTE},formatExclusiveMinimum:{okStr:">",ok:ops.GT,fail:ops.LTE}},error2={message:({keyword:keyword2,schemaCode})=>(0,codegen_1.str)`should be ${KWDs[keyword2].okStr} ${schemaCode}`,params:({keyword:keyword2,schemaCode})=>(0,codegen_1._)`{comparison: ${KWDs[keyword2].okStr}, limit: ${schemaCode}}`}; exports.formatLimitDefinition={keyword:Object.keys(KWDs),type:"string",schemaType:"string",$data:!0,error:error2,code(cxt){const{gen,data,schemaCode,keyword:keyword2,it}=cxt,{opts,self:self2}=it;if(!opts.validateFormats)return;const fCxt=new ajv_1.KeywordCxt(it,self2.RULES.all.format.definition,"format");fCxt.$data?validate$DataFormat():validateFormat();function validate$DataFormat(){const fmts=gen.scopeValue("formats",{ref:self2.formats,code:opts.code.formats}),fmt=gen.const("fmt",(0,codegen_1. _)`${fmts}[${fCxt.schemaCode}]`);cxt.fail$data((0,codegen_1.or)((0,codegen_1._)`typeof ${fmt} != "object"`,(0,codegen_1._)`${fmt} instanceof RegExp`,(0,codegen_1._)`typeof ${fmt}.compare != "function"`,compareCode(fmt)))}function validateFormat(){const format2=fCxt.schema,fmtDef=self2.formats[format2];if(!fmtDef||fmtDef===!0)return;if(typeof fmtDef!="object"||fmtDef instanceof RegExp||typeof fmtDef.compare!="function")throw new Error(`"${keyword2}": format "${format2}" does not define "compare" \ function`);const fmt=gen.scopeValue("formats",{key:format2,ref:fmtDef,code:opts.code.formats?(0,codegen_1._)`${opts.code.formats}${(0,codegen_1.getProperty)(format2)}`:void 0});cxt.fail$data(compareCode(fmt))}function compareCode(fmt){return(0,codegen_1._)`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword2].fail} 0`}},dependencies:["format"]};const formatLimitPlugin=ajv2=>(ajv2.addKeyword(exports.formatLimitDefinition),ajv2);exports.default=formatLimitPlugin}(limit)),limit}var hasRequiredDist; function requireDist(){return hasRequiredDist||(hasRequiredDist=1,function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0});const formats_1=requireFormats(),limit_1=requireLimit(),codegen_1=requireCodegen(),fullName=new codegen_1.Name("fullFormats"),fastName=new codegen_1.Name("fastFormats"),formatsPlugin=(ajv2,opts={keywords:!0})=>{if(Array.isArray(opts))return addFormats(ajv2,opts,formats_1.fullFormats,fullName),ajv2;const[formats2,exportName]=opts.mode==="fast"?[formats_1. fastFormats,fastName]:[formats_1.fullFormats,fullName],list2=opts.formats||formats_1.formatNames;return addFormats(ajv2,list2,formats2,exportName),opts.keywords&&(0,limit_1.default)(ajv2),ajv2};formatsPlugin.get=(name,mode="full")=>{const f=(mode==="fast"?formats_1.fastFormats:formats_1.fullFormats)[name];if(!f)throw new Error(`Unknown format "${name}"`);return f};function addFormats(ajv2,list2,fs,exportName){var _a2,_b;(_a2=(_b=ajv2.opts.code).formats)!==null&&_a2!==void 0||(_b.formats=(0,codegen_1. _)`require("ajv-formats/dist/formats").${exportName}`);for(const f of list2)ajv2.addFormat(f,fs[f])}module.exports=exports=formatsPlugin,Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=formatsPlugin}(dist,dist.exports)),dist.exports}var distExports=requireDist();const _addFormats=getDefaultExportFromCjs(distExports);function createDefaultAjvInstance(){const ajv2=new Ajv({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return _addFormats(ajv2),ajv2}class AjvJsonSchemaValidator{constructor(ajv2){ this._ajv=ajv2??createDefaultAjvInstance()}getValidator(schema){const ajvValidator="$id"in schema&&typeof schema.$id=="string"?this._ajv.getSchema(schema.$id)??this._ajv.compile(schema):this._ajv.compile(schema);return input=>ajvValidator(input)?{valid:!0,data:input,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(ajvValidator.errors)}}}class ExperimentalClientTasks{constructor(_client){this._client=_client}async*callToolStream(params,resultSchema=CallToolResultSchema,options){ const clientInternal=this._client,optionsWithTask={...options,task:options?.task??(clientInternal.isToolTask(params.name)?{}:void 0)},stream=clientInternal.requestStream({method:"tools/call",params},resultSchema,optionsWithTask),validator=clientInternal.getToolOutputValidator(params.name);for await(const message of stream){if(message.type==="result"&&validator){const result=message.result;if(!result.structuredContent&&!result.isError){yield{type:"error",error:new McpError(ErrorCode.InvalidRequest, `Tool ${params.name} has an output schema but did not return structured content`)};return}if(result.structuredContent)try{const validationResult=validator(result.structuredContent);if(!validationResult.valid){yield{type:"error",error:new McpError(ErrorCode.InvalidParams,`Structured content does not match the tool's output schema: ${validationResult.errorMessage}`)};return}}catch(error2){if(error2 instanceof McpError){yield{type:"error",error:error2};return}yield{type:"error",error:new McpError(ErrorCode. InvalidParams,`Failed to validate structured content: ${error2 instanceof Error?error2.message:String(error2)}`)};return}}yield message}}async getTask(taskId,options){return this._client.getTask({taskId},options)}async getTaskResult(taskId,resultSchema,options){return this._client.getTaskResult({taskId},resultSchema,options)}async listTasks(cursor,options){return this._client.listTasks(cursor?{cursor}:void 0,options)}async cancelTask(taskId,options){return this._client.cancelTask({taskId},options)}requestStream(request,resultSchema,options){ return this._client.requestStream(request,resultSchema,options)}}function assertToolsCallTaskCapability(requests,method,entityName){if(!requests)throw new Error(`${entityName} does not support task creation (required for ${method})`);switch(method){case"tools/call":if(!requests.tools?.call)throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`);break}}function assertClientRequestTaskCapability(requests,method,entityName){if(!requests)throw new Error( `${entityName} does not support task creation (required for ${method})`);switch(method){case"sampling/createMessage":if(!requests.sampling?.createMessage)throw new Error(`${entityName} does not support task creation for sampling/createMessage (required for ${method})`);break;case"elicitation/create":if(!requests.elicitation?.create)throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`);break}}function applyElicitationDefaults(schema,data){ if(!(!schema||data===null||typeof data!="object")){if(schema.type==="object"&&schema.properties&&typeof schema.properties=="object"){const obj=data,props=schema.properties;for(const key2 of Object.keys(props)){const propSchema=props[key2];obj[key2]===void 0&&Object.prototype.hasOwnProperty.call(propSchema,"default")&&(obj[key2]=propSchema.default),obj[key2]!==void 0&&applyElicitationDefaults(propSchema,obj[key2])}}if(Array.isArray(schema.anyOf))for(const sub2 of schema.anyOf)typeof sub2!="boolea\ n"&&applyElicitationDefaults(sub2,data);if(Array.isArray(schema.oneOf))for(const sub2 of schema.oneOf)typeof sub2!="boolean"&&applyElicitationDefaults(sub2,data)}}function getSupportedElicitationModes(capabilities){if(!capabilities)return{supportsFormMode:!1,supportsUrlMode:!1};const hasFormCapability=capabilities.form!==void 0,hasUrlCapability=capabilities.url!==void 0;return{supportsFormMode:hasFormCapability||!hasFormCapability&&!hasUrlCapability,supportsUrlMode:hasUrlCapability}}class Client extends Protocol{constructor(_clientInfo,options){ super(options),this._clientInfo=_clientInfo,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=options?.capabilities??{},this._jsonSchemaValidator=options?.jsonSchemaValidator??new AjvJsonSchemaValidator,options?.listChanged&&(this._pendingListChangedConfig=options.listChanged)}_setupListChangedHandlers(config2){config2.tools&&this._serverCapabilities?.tools?.listChanged&&this. _setupListChangedHandler("tools",ToolListChangedNotificationSchema,config2.tools,async()=>(await this.listTools()).tools),config2.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",PromptListChangedNotificationSchema,config2.prompts,async()=>(await this.listPrompts()).prompts),config2.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",ResourceListChangedNotificationSchema,config2.resources,async()=>(await this. listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new ExperimentalClientTasks(this)}),this._experimental}registerCapabilities(capabilities){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=mergeCapabilities(this._capabilities,capabilities)}setRequestHandler(requestSchema,handler){const methodSchema=getObjectShape(requestSchema)?.method;if(!methodSchema)throw new Error("Schema is m\ issing a method literal");let methodValue;if(isZ4Schema(methodSchema)){const v4Schema=methodSchema;methodValue=v4Schema._zod?.def?.value??v4Schema.value}else{const v3Schema=methodSchema;methodValue=v3Schema._def?.value??v3Schema.value}if(typeof methodValue!="string")throw new Error("Schema method literal must be a string");const method=methodValue;if(method==="elicitation/create"){const wrappedHandler=async(request,extra)=>{const validatedRequest=safeParse$1(ElicitRequestSchema,request);if(!validatedRequest. success){const errorMessage=validatedRequest.error instanceof Error?validatedRequest.error.message:String(validatedRequest.error);throw new McpError(ErrorCode.InvalidParams,`Invalid elicitation request: ${errorMessage}`)}const{params}=validatedRequest.data;params.mode=params.mode??"form";const{supportsFormMode,supportsUrlMode}=getSupportedElicitationModes(this._capabilities.elicitation);if(params.mode==="form"&&!supportsFormMode)throw new McpError(ErrorCode.InvalidParams,"Client does not support\ form-mode elicitation requests");if(params.mode==="url"&&!supportsUrlMode)throw new McpError(ErrorCode.InvalidParams,"Client does not support URL-mode elicitation requests");const result=await Promise.resolve(handler(request,extra));if(params.task){const taskValidationResult=safeParse$1(CreateTaskResultSchema,result);if(!taskValidationResult.success){const errorMessage=taskValidationResult.error instanceof Error?taskValidationResult.error.message:String(taskValidationResult.error);throw new McpError( ErrorCode.InvalidParams,`Invalid task creation result: ${errorMessage}`)}return taskValidationResult.data}const validationResult=safeParse$1(ElicitResultSchema,result);if(!validationResult.success){const errorMessage=validationResult.error instanceof Error?validationResult.error.message:String(validationResult.error);throw new McpError(ErrorCode.InvalidParams,`Invalid elicitation result: ${errorMessage}`)}const validatedResult=validationResult.data,requestedSchema=params.mode==="form"?params.requestedSchema: void 0;if(params.mode==="form"&&validatedResult.action==="accept"&&validatedResult.content&&requestedSchema&&this._capabilities.elicitation?.form?.applyDefaults)try{applyElicitationDefaults(requestedSchema,validatedResult.content)}catch{}return validatedResult};return super.setRequestHandler(requestSchema,wrappedHandler)}if(method==="sampling/createMessage"){const wrappedHandler=async(request,extra)=>{const validatedRequest=safeParse$1(CreateMessageRequestSchema,request);if(!validatedRequest.success){ const errorMessage=validatedRequest.error instanceof Error?validatedRequest.error.message:String(validatedRequest.error);throw new McpError(ErrorCode.InvalidParams,`Invalid sampling request: ${errorMessage}`)}const{params}=validatedRequest.data,result=await Promise.resolve(handler(request,extra));if(params.task){const taskValidationResult=safeParse$1(CreateTaskResultSchema,result);if(!taskValidationResult.success){const errorMessage=taskValidationResult.error instanceof Error?taskValidationResult. error.message:String(taskValidationResult.error);throw new McpError(ErrorCode.InvalidParams,`Invalid task creation result: ${errorMessage}`)}return taskValidationResult.data}const resultSchema=params.tools||params.toolChoice?CreateMessageResultWithToolsSchema:CreateMessageResultSchema,validationResult=safeParse$1(resultSchema,result);if(!validationResult.success){const errorMessage=validationResult.error instanceof Error?validationResult.error.message:String(validationResult.error);throw new McpError( ErrorCode.InvalidParams,`Invalid sampling result: ${errorMessage}`)}return validationResult.data};return super.setRequestHandler(requestSchema,wrappedHandler)}return super.setRequestHandler(requestSchema,handler)}assertCapability(capability,method){if(!this._serverCapabilities?.[capability])throw new Error(`Server does not support ${capability} (required for ${method})`)}async connect(transport,options){if(await super.connect(transport),transport.sessionId===void 0)try{const result=await this.request( {method:"initialize",params:{protocolVersion:LATEST_PROTOCOL_VERSION,capabilities:this._capabilities,clientInfo:this._clientInfo}},InitializeResultSchema,options);if(result===void 0)throw new Error(`Server sent invalid initialize result: ${result}`);if(!SUPPORTED_PROTOCOL_VERSIONS.includes(result.protocolVersion))throw new Error(`Server's protocol version is not supported: ${result.protocolVersion}`);this._serverCapabilities=result.capabilities,this._serverVersion=result.serverInfo,transport.setProtocolVersion&& transport.setProtocolVersion(result.protocolVersion),this._instructions=result.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(error2){throw this.close(),error2}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(method){ switch(method){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${method})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${method})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`S\ erver does not support resources (required for ${method})`);if(method==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${method})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${method})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support com\ pletions (required for ${method})`);break}}assertNotificationCapability(method){switch(method){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${method})`);break}}assertRequestHandlerCapability(method){if(this._capabilities)switch(method){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${method}\ )`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${method})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${method})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${method})`);break}}assertTaskCapability(method){ assertToolsCallTaskCapability(this._serverCapabilities?.tasks?.requests,method,"Server")}assertTaskHandlerCapability(method){this._capabilities&&assertClientRequestTaskCapability(this._capabilities.tasks?.requests,method,"Client")}async ping(options){return this.request({method:"ping"},EmptyResultSchema,options)}async complete(params,options){return this.request({method:"completion/complete",params},CompleteResultSchema,options)}async setLoggingLevel(level,options){return this.request({method:"l\ ogging/setLevel",params:{level}},EmptyResultSchema,options)}async getPrompt(params,options){return this.request({method:"prompts/get",params},GetPromptResultSchema,options)}async listPrompts(params,options){return this.request({method:"prompts/list",params},ListPromptsResultSchema,options)}async listResources(params,options){return this.request({method:"resources/list",params},ListResourcesResultSchema,options)}async listResourceTemplates(params,options){return this.request({method:"resources/te\ mplates/list",params},ListResourceTemplatesResultSchema,options)}async readResource(params,options){return this.request({method:"resources/read",params},ReadResourceResultSchema,options)}async subscribeResource(params,options){return this.request({method:"resources/subscribe",params},EmptyResultSchema,options)}async unsubscribeResource(params,options){return this.request({method:"resources/unsubscribe",params},EmptyResultSchema,options)}async callTool(params,resultSchema=CallToolResultSchema,options){ if(this.isToolTaskRequired(params.name))throw new McpError(ErrorCode.InvalidRequest,`Tool "${params.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);const result=await this.request({method:"tools/call",params},resultSchema,options),validator=this.getToolOutputValidator(params.name);if(validator){if(!result.structuredContent&&!result.isError)throw new McpError(ErrorCode.InvalidRequest,`Tool ${params.name} has an output schema but did not return struc\ tured content`);if(result.structuredContent)try{const validationResult=validator(result.structuredContent);if(!validationResult.valid)throw new McpError(ErrorCode.InvalidParams,`Structured content does not match the tool's output schema: ${validationResult.errorMessage}`)}catch(error2){throw error2 instanceof McpError?error2:new McpError(ErrorCode.InvalidParams,`Failed to validate structured content: ${error2 instanceof Error?error2.message:String(error2)}`)}}return result}isToolTask(toolName){return this. _serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(toolName):!1}isToolTaskRequired(toolName){return this._cachedRequiredTaskTools.has(toolName)}cacheToolMetadata(tools){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(const tool of tools){if(tool.outputSchema){const toolValidator=this._jsonSchemaValidator.getValidator(tool.outputSchema);this._cachedToolOutputValidators.set(tool.name,toolValidator)} const taskSupport=tool.execution?.taskSupport;(taskSupport==="required"||taskSupport==="optional")&&this._cachedKnownTaskTools.add(tool.name),taskSupport==="required"&&this._cachedRequiredTaskTools.add(tool.name)}}getToolOutputValidator(toolName){return this._cachedToolOutputValidators.get(toolName)}async listTools(params,options){const result=await this.request({method:"tools/list",params},ListToolsResultSchema,options);return this.cacheToolMetadata(result.tools),result}_setupListChangedHandler(listType,notificationSchema,options,fetcher){ const parseResult=ListChangedOptionsBaseSchema.safeParse(options);if(!parseResult.success)throw new Error(`Invalid ${listType} listChanged options: ${parseResult.error.message}`);if(typeof options.onChanged!="function")throw new Error(`Invalid ${listType} listChanged options: onChanged must be a function`);const{autoRefresh,debounceMs}=parseResult.data,{onChanged}=options,refresh=async()=>{if(!autoRefresh){onChanged(null,null);return}try{const items2=await fetcher();onChanged(null,items2)}catch(e){ const error2=e instanceof Error?e:new Error(String(e));onChanged(error2,null)}},handler=()=>{if(debounceMs){const existingTimer=this._listChangedDebounceTimers.get(listType);existingTimer&&clearTimeout(existingTimer);const timer=setTimeout(refresh,debounceMs);this._listChangedDebounceTimers.set(listType,timer)}else refresh()};this.setNotificationHandler(notificationSchema,handler)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}function normalizeHeaders(headers){ return headers?headers instanceof Headers?Object.fromEntries(headers.entries()):Array.isArray(headers)?Object.fromEntries(headers):{...headers}:{}}function createFetchWithInit(baseFetch=fetch,baseInit){return baseInit?async(url2,init2)=>{const mergedInit={...baseInit,...init2,headers:init2?.headers?{...normalizeHeaders(baseInit.headers),...normalizeHeaders(init2.headers)}:baseInit.headers};return baseFetch(url2,mergedInit)}:baseFetch}let crypto$1;crypto$1=globalThis.crypto;async function getRandomValues(size2){ return(await crypto$1).getRandomValues(new Uint8Array(size2))}async function random(size2){const mask="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",evenDistCutoff=Math.pow(2,8)-Math.pow(2,8)%mask.length;let result="";for(;result.length128)throw`Expected a length between 43 and 128. Received ${length}.`;const verifier=await generateVerifier(length),challenge=await generateChallenge(verifier); return{code_verifier:verifier,code_challenge:challenge}}const SafeUrlSchema=url().superRefine((val,ctx)=>{if(!URL.canParse(val))return ctx.addIssue({code:ZodIssueCode.custom,message:"URL must be parseable",fatal:!0}),NEVER}).refine(url2=>{const u=new URL(url2);return u.protocol!=="javascript:"&&u.protocol!=="data:"&&u.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),OAuthProtectedResourceMetadataSchema=looseObject({resource:string$2().url(),authorization_servers:array( SafeUrlSchema).optional(),jwks_uri:string$2().url().optional(),scopes_supported:array(string$2()).optional(),bearer_methods_supported:array(string$2()).optional(),resource_signing_alg_values_supported:array(string$2()).optional(),resource_name:string$2().optional(),resource_documentation:string$2().optional(),resource_policy_uri:string$2().url().optional(),resource_tos_uri:string$2().url().optional(),tls_client_certificate_bound_access_tokens:boolean$1().optional(),authorization_details_types_supported:array( string$2()).optional(),dpop_signing_alg_values_supported:array(string$2()).optional(),dpop_bound_access_tokens_required:boolean$1().optional()}),OAuthMetadataSchema=looseObject({issuer:string$2(),authorization_endpoint:SafeUrlSchema,token_endpoint:SafeUrlSchema,registration_endpoint:SafeUrlSchema.optional(),scopes_supported:array(string$2()).optional(),response_types_supported:array(string$2()),response_modes_supported:array(string$2()).optional(),grant_types_supported:array(string$2()).optional(), token_endpoint_auth_methods_supported:array(string$2()).optional(),token_endpoint_auth_signing_alg_values_supported:array(string$2()).optional(),service_documentation:SafeUrlSchema.optional(),revocation_endpoint:SafeUrlSchema.optional(),revocation_endpoint_auth_methods_supported:array(string$2()).optional(),revocation_endpoint_auth_signing_alg_values_supported:array(string$2()).optional(),introspection_endpoint:string$2().optional(),introspection_endpoint_auth_methods_supported:array(string$2()). optional(),introspection_endpoint_auth_signing_alg_values_supported:array(string$2()).optional(),code_challenge_methods_supported:array(string$2()).optional(),client_id_metadata_document_supported:boolean$1().optional()}),OpenIdProviderMetadataSchema=looseObject({issuer:string$2(),authorization_endpoint:SafeUrlSchema,token_endpoint:SafeUrlSchema,userinfo_endpoint:SafeUrlSchema.optional(),jwks_uri:SafeUrlSchema,registration_endpoint:SafeUrlSchema.optional(),scopes_supported:array(string$2()).optional(), response_types_supported:array(string$2()),response_modes_supported:array(string$2()).optional(),grant_types_supported:array(string$2()).optional(),acr_values_supported:array(string$2()).optional(),subject_types_supported:array(string$2()),id_token_signing_alg_values_supported:array(string$2()),id_token_encryption_alg_values_supported:array(string$2()).optional(),id_token_encryption_enc_values_supported:array(string$2()).optional(),userinfo_signing_alg_values_supported:array(string$2()).optional(), userinfo_encryption_alg_values_supported:array(string$2()).optional(),userinfo_encryption_enc_values_supported:array(string$2()).optional(),request_object_signing_alg_values_supported:array(string$2()).optional(),request_object_encryption_alg_values_supported:array(string$2()).optional(),request_object_encryption_enc_values_supported:array(string$2()).optional(),token_endpoint_auth_methods_supported:array(string$2()).optional(),token_endpoint_auth_signing_alg_values_supported:array(string$2()).optional(), display_values_supported:array(string$2()).optional(),claim_types_supported:array(string$2()).optional(),claims_supported:array(string$2()).optional(),service_documentation:string$2().optional(),claims_locales_supported:array(string$2()).optional(),ui_locales_supported:array(string$2()).optional(),claims_parameter_supported:boolean$1().optional(),request_parameter_supported:boolean$1().optional(),request_uri_parameter_supported:boolean$1().optional(),require_request_uri_registration:boolean$1(). optional(),op_policy_uri:SafeUrlSchema.optional(),op_tos_uri:SafeUrlSchema.optional(),client_id_metadata_document_supported:boolean$1().optional()}),OpenIdProviderDiscoveryMetadataSchema=object({...OpenIdProviderMetadataSchema.shape,...OAuthMetadataSchema.pick({code_challenge_methods_supported:!0}).shape}),OAuthTokensSchema=object({access_token:string$2(),id_token:string$2().optional(),token_type:string$2(),expires_in:number$1().optional(),scope:string$2().optional(),refresh_token:string$2().optional()}). strip(),OAuthErrorResponseSchema=object({error:string$2(),error_description:string$2().optional(),error_uri:string$2().optional()}),OptionalSafeUrlSchema=SafeUrlSchema.optional().or(literal("").transform(()=>{})),OAuthClientMetadataSchema=object({redirect_uris:array(SafeUrlSchema),token_endpoint_auth_method:string$2().optional(),grant_types:array(string$2()).optional(),response_types:array(string$2()).optional(),client_name:string$2().optional(),client_uri:SafeUrlSchema.optional(),logo_uri:OptionalSafeUrlSchema, scope:string$2().optional(),contacts:array(string$2()).optional(),tos_uri:OptionalSafeUrlSchema,policy_uri:string$2().optional(),jwks_uri:SafeUrlSchema.optional(),jwks:any().optional(),software_id:string$2().optional(),software_version:string$2().optional(),software_statement:string$2().optional()}).strip(),OAuthClientInformationSchema=object({client_id:string$2(),client_secret:string$2().optional(),client_id_issued_at:number$2().optional(),client_secret_expires_at:number$2().optional()}).strip(), OAuthClientInformationFullSchema=OAuthClientMetadataSchema.merge(OAuthClientInformationSchema);object({error:string$2(),error_description:string$2().optional()}).strip();object({token:string$2(),token_type_hint:string$2().optional()}).strip();function resourceUrlFromServerUrl(url2){const resourceURL=typeof url2=="string"?new URL(url2):new URL(url2.href);return resourceURL.hash="",resourceURL}function checkResourceAllowed({requestedResource,configuredResource}){const requested=typeof requestedResource== "string"?new URL(requestedResource):new URL(requestedResource.href),configured=typeof configuredResource=="string"?new URL(configuredResource):new URL(configuredResource.href);if(requested.origin!==configured.origin||requested.pathname.length0&&(authorizationServerUrl=resourceMetadata.authorization_servers[0])}catch{}authorizationServerUrl||(authorizationServerUrl=new URL("/",serverUrl));const resource=await selectResourceURL(serverUrl,provider,resourceMetadata),metadata2=await discoverAuthorizationServerMetadata(authorizationServerUrl,{fetchFn});let clientInformation=await Promise.resolve(provider.clientInformation());if(!clientInformation){ if(authorizationCode!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const supportsUrlBasedClientId=metadata2?.client_id_metadata_document_supported===!0,clientMetadataUrl=provider.clientMetadataUrl;if(clientMetadataUrl&&!isHttpsUrl(clientMetadataUrl))throw new InvalidClientMetadataError(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${clientMetadataUrl}`);if(supportsUrlBasedClientId&&clientMetadataUrl)clientInformation= {client_id:clientMetadataUrl},await provider.saveClientInformation?.(clientInformation);else{if(!provider.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const fullInformation=await registerClient(authorizationServerUrl,{metadata:metadata2,clientMetadata:provider.clientMetadata,fetchFn});await provider.saveClientInformation(fullInformation),clientInformation=fullInformation}}const nonInteractiveFlow=!provider.redirectUrl;if(authorizationCode!== void 0||nonInteractiveFlow){const tokens2=await fetchToken(provider,authorizationServerUrl,{metadata:metadata2,resource,authorizationCode,fetchFn});return await provider.saveTokens(tokens2),"AUTHORIZED"}const tokens=await provider.tokens();if(tokens?.refresh_token)try{const newTokens=await refreshAuthorization(authorizationServerUrl,{metadata:metadata2,clientInformation,refreshToken:tokens.refresh_token,resource,addClientAuthentication:provider.addClientAuthentication,fetchFn});return await provider. saveTokens(newTokens),"AUTHORIZED"}catch(error2){if(!(!(error2 instanceof OAuthError)||error2 instanceof ServerError))throw error2}const state2=provider.state?await provider.state():void 0,{authorizationUrl,codeVerifier}=await startAuthorization(authorizationServerUrl,{metadata:metadata2,clientInformation,state:state2,redirectUrl:provider.redirectUrl,scope:scope2||resourceMetadata?.scopes_supported?.join(" ")||provider.clientMetadata.scope,resource});return await provider.saveCodeVerifier(codeVerifier), await provider.redirectToAuthorization(authorizationUrl),"REDIRECT"}function isHttpsUrl(value){if(!value)return!1;try{const url2=new URL(value);return url2.protocol==="https:"&&url2.pathname!=="/"}catch{return!1}}async function selectResourceURL(serverUrl,provider,resourceMetadata){const defaultResource=resourceUrlFromServerUrl(serverUrl);if(provider.validateResourceURL)return await provider.validateResourceURL(defaultResource,resourceMetadata?.resource);if(resourceMetadata){if(!checkResourceAllowed( {requestedResource:defaultResource,configuredResource:resourceMetadata.resource}))throw new Error(`Protected resource ${resourceMetadata.resource} does not match expected ${defaultResource} (or origin)`);return new URL(resourceMetadata.resource)}}function extractWWWAuthenticateParams(res){const authenticateHeader=res.headers.get("WWW-Authenticate");if(!authenticateHeader)return{};const[type2,scheme2]=authenticateHeader.split(" ");if(type2.toLowerCase()!=="bearer"||!scheme2)return{};const resourceMetadataMatch=extractFieldFromWwwAuth( res,"resource_metadata")||void 0;let resourceMetadataUrl;if(resourceMetadataMatch)try{resourceMetadataUrl=new URL(resourceMetadataMatch)}catch{}const scope2=extractFieldFromWwwAuth(res,"scope")||void 0,error2=extractFieldFromWwwAuth(res,"error")||void 0;return{resourceMetadataUrl,scope:scope2,error:error2}}function extractFieldFromWwwAuth(response,fieldName){const wwwAuthHeader=response.headers.get("WWW-Authenticate");if(!wwwAuthHeader)return null;const pattern2=new RegExp(`${fieldName}=(?:"([^"\ ]+)"|([^\\s,]+))`),match=wwwAuthHeader.match(pattern2);return match?match[1]||match[2]:null}async function discoverOAuthProtectedResourceMetadata(serverUrl,opts,fetchFn=fetch){const response=await discoverMetadataWithFallback(serverUrl,"oauth-protected-resource",fetchFn,{protocolVersion:opts?.protocolVersion,metadataUrl:opts?.resourceMetadataUrl});if(!response||response.status===404)throw await response?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Me\ tadata.");if(!response.ok)throw await response.body?.cancel(),new Error(`HTTP ${response.status} trying to load well-known OAuth protected resource metadata.`);return OAuthProtectedResourceMetadataSchema.parse(await response.json())}async function fetchWithCorsRetry(url2,headers,fetchFn=fetch){try{return await fetchFn(url2,{headers})}catch(error2){if(error2 instanceof TypeError)return headers?fetchWithCorsRetry(url2,void 0,fetchFn):void 0;throw error2}}function buildWellKnownPath(wellKnownPrefix,pathname="",options={}){ return pathname.endsWith("/")&&(pathname=pathname.slice(0,-1)),options.prependPathname?`${pathname}/.well-known/${wellKnownPrefix}`:`/.well-known/${wellKnownPrefix}${pathname}`}async function tryMetadataDiscovery(url2,protocolVersion,fetchFn=fetch){return await fetchWithCorsRetry(url2,{"MCP-Protocol-Version":protocolVersion},fetchFn)}function shouldAttemptFallback(response,pathname){return!response||response.status>=400&&response.status<500&&pathname!=="/"}async function discoverMetadataWithFallback(serverUrl,wellKnownType,fetchFn,opts){ const issuer=new URL(serverUrl),protocolVersion=opts?.protocolVersion??LATEST_PROTOCOL_VERSION;let url2;if(opts?.metadataUrl)url2=new URL(opts.metadataUrl);else{const wellKnownPath=buildWellKnownPath(wellKnownType,issuer.pathname);url2=new URL(wellKnownPath,opts?.metadataServerUrl??issuer),url2.search=issuer.search}let response=await tryMetadataDiscovery(url2,protocolVersion,fetchFn);if(!opts?.metadataUrl&&shouldAttemptFallback(response,issuer.pathname)){const rootUrl=new URL(`/.well-known/${wellKnownType}`, issuer);response=await tryMetadataDiscovery(rootUrl,protocolVersion,fetchFn)}return response}function buildDiscoveryUrls(authorizationServerUrl){const url2=typeof authorizationServerUrl=="string"?new URL(authorizationServerUrl):authorizationServerUrl,hasPath=url2.pathname!=="/",urlsToTry=[];if(!hasPath)return urlsToTry.push({url:new URL("/.well-known/oauth-authorization-server",url2.origin),type:"oauth"}),urlsToTry.push({url:new URL("/.well-known/openid-configuration",url2.origin),type:"oidc"}), urlsToTry;let pathname=url2.pathname;return pathname.endsWith("/")&&(pathname=pathname.slice(0,-1)),urlsToTry.push({url:new URL(`/.well-known/oauth-authorization-server${pathname}`,url2.origin),type:"oauth"}),urlsToTry.push({url:new URL(`/.well-known/openid-configuration${pathname}`,url2.origin),type:"oidc"}),urlsToTry.push({url:new URL(`${pathname}/.well-known/openid-configuration`,url2.origin),type:"oidc"}),urlsToTry}async function discoverAuthorizationServerMetadata(authorizationServerUrl,{fetchFn=fetch, protocolVersion=LATEST_PROTOCOL_VERSION}={}){const headers={"MCP-Protocol-Version":protocolVersion,Accept:"application/json"},urlsToTry=buildDiscoveryUrls(authorizationServerUrl);for(const{url:endpointUrl,type:type2}of urlsToTry){const response=await fetchWithCorsRetry(endpointUrl,headers,fetchFn);if(response){if(!response.ok){if(await response.body?.cancel(),response.status>=400&&response.status<500)continue;throw new Error(`HTTP ${response.status} trying to load ${type2==="oauth"?"OAuth":"Open\ ID provider"} metadata from ${endpointUrl}`)}return type2==="oauth"?OAuthMetadataSchema.parse(await response.json()):OpenIdProviderDiscoveryMetadataSchema.parse(await response.json())}}}async function startAuthorization(authorizationServerUrl,{metadata:metadata2,clientInformation,redirectUrl,scope:scope2,state:state2,resource}){let authorizationUrl;if(metadata2){if(authorizationUrl=new URL(metadata2.authorization_endpoint),!metadata2.response_types_supported.includes(AUTHORIZATION_CODE_RESPONSE_TYPE)) throw new Error(`Incompatible auth server: does not support response type ${AUTHORIZATION_CODE_RESPONSE_TYPE}`);if(metadata2.code_challenge_methods_supported&&!metadata2.code_challenge_methods_supported.includes(AUTHORIZATION_CODE_CHALLENGE_METHOD))throw new Error(`Incompatible auth server: does not support code challenge method ${AUTHORIZATION_CODE_CHALLENGE_METHOD}`)}else authorizationUrl=new URL("/authorize",authorizationServerUrl);const challenge=await pkceChallenge(),codeVerifier=challenge. code_verifier,codeChallenge=challenge.code_challenge;return authorizationUrl.searchParams.set("response_type",AUTHORIZATION_CODE_RESPONSE_TYPE),authorizationUrl.searchParams.set("client_id",clientInformation.client_id),authorizationUrl.searchParams.set("code_challenge",codeChallenge),authorizationUrl.searchParams.set("code_challenge_method",AUTHORIZATION_CODE_CHALLENGE_METHOD),authorizationUrl.searchParams.set("redirect_uri",String(redirectUrl)),state2&&authorizationUrl.searchParams.set("state", state2),scope2&&authorizationUrl.searchParams.set("scope",scope2),scope2?.includes("offline_access")&&authorizationUrl.searchParams.append("prompt","consent"),resource&&authorizationUrl.searchParams.set("resource",resource.href),{authorizationUrl,codeVerifier}}function prepareAuthorizationCodeRequest(authorizationCode,codeVerifier,redirectUri){return new URLSearchParams({grant_type:"authorization_code",code:authorizationCode,code_verifier:codeVerifier,redirect_uri:String(redirectUri)})}async function executeTokenRequest(authorizationServerUrl,{ metadata:metadata2,tokenRequestParams,clientInformation,addClientAuthentication,resource,fetchFn}){const tokenUrl=metadata2?.token_endpoint?new URL(metadata2.token_endpoint):new URL("/token",authorizationServerUrl),headers=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(resource&&tokenRequestParams.set("resource",resource.href),addClientAuthentication)await addClientAuthentication(headers,tokenRequestParams,tokenUrl,metadata2);else if(clientInformation){ const supportedMethods=metadata2?.token_endpoint_auth_methods_supported??[],authMethod=selectClientAuthMethod(clientInformation,supportedMethods);applyClientAuthentication(authMethod,clientInformation,headers,tokenRequestParams)}const response=await(fetchFn??fetch)(tokenUrl,{method:"POST",headers,body:tokenRequestParams});if(!response.ok)throw await parseErrorResponse(response);return OAuthTokensSchema.parse(await response.json())}async function refreshAuthorization(authorizationServerUrl,{metadata:metadata2, clientInformation,refreshToken,resource,addClientAuthentication,fetchFn}){const tokenRequestParams=new URLSearchParams({grant_type:"refresh_token",refresh_token:refreshToken}),tokens=await executeTokenRequest(authorizationServerUrl,{metadata:metadata2,tokenRequestParams,clientInformation,addClientAuthentication,resource,fetchFn});return{refresh_token:refreshToken,...tokens}}async function fetchToken(provider,authorizationServerUrl,{metadata:metadata2,resource,authorizationCode,fetchFn}={}){const scope2=provider. clientMetadata.scope;let tokenRequestParams;if(provider.prepareTokenRequest&&(tokenRequestParams=await provider.prepareTokenRequest(scope2)),!tokenRequestParams){if(!authorizationCode)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!provider.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const codeVerifier=await provider.codeVerifier();tokenRequestParams=prepareAuthorizationCodeRequest(authorizationCode,codeVerifier, provider.redirectUrl)}const clientInformation=await provider.clientInformation();return executeTokenRequest(authorizationServerUrl,{metadata:metadata2,tokenRequestParams,clientInformation:clientInformation??void 0,addClientAuthentication:provider.addClientAuthentication,resource,fetchFn})}async function registerClient(authorizationServerUrl,{metadata:metadata2,clientMetadata,fetchFn}){let registrationUrl;if(metadata2){if(!metadata2.registration_endpoint)throw new Error("Incompatible auth server:\ does not support dynamic client registration");registrationUrl=new URL(metadata2.registration_endpoint)}else registrationUrl=new URL("/register",authorizationServerUrl);const response=await(fetchFn??fetch)(registrationUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(clientMetadata)});if(!response.ok)throw await parseErrorResponse(response);return OAuthClientInformationFullSchema.parse(await response.json())}let ParseError$1=class extends Error{constructor(message,options){ super(message),this.name="ParseError",this.type=options.type,this.field=options.field,this.value=options.value,this.line=options.line}};function noop(_arg){}function createParser$1(callbacks){if(typeof callbacks=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent=noop,onError=noop,onRetry=noop,onComment}=callbacks;let incompleteLine="",isFirstChunk=!0,id2,data="",eventType="";function feed(newChunk){const chunk=isFirstChunk? newChunk.replace(/^\xEF\xBB\xBF/,""):newChunk,[complete,incomplete]=splitLines(`${incompleteLine}${chunk}`);for(const line of complete)parseLine(line);incompleteLine=incomplete,isFirstChunk=!1}function parseLine(line){if(line===""){dispatchEvent2();return}if(line.startsWith(":")){onComment&&onComment(line.slice(line.startsWith(": ")?2:1));return}const fieldSeparatorIndex=line.indexOf(":");if(fieldSeparatorIndex!==-1){const field=line.slice(0,fieldSeparatorIndex),offset2=line[fieldSeparatorIndex+ 1]===" "?2:1,value=line.slice(fieldSeparatorIndex+offset2);processField(field,value,line);return}processField(line,"",line)}function processField(field,value,line){switch(field){case"event":eventType=value;break;case"data":data=`${data}${value} `;break;case"id":id2=value.includes("\0")?void 0:value;break;case"retry":/^\d+$/.test(value)?onRetry(parseInt(value,10)):onError(new ParseError$1(`Invalid \`retry\` value: "${value}"`,{type:"invalid-retry",value,line}));break;default:onError(new ParseError$1(`Unknown field "${field.length>20?`${field.slice(0,20)}…`:field}"`,{type:"unknown-field",field,value,line}));break}}function dispatchEvent2(){data.length>0&&onEvent({id:id2,event:eventType||void 0,data:data.endsWith(` `)?data.slice(0,-1):data}),id2=void 0,data="",eventType=""}function reset2(options={}){incompleteLine&&options.consume&&parseLine(incompleteLine),isFirstChunk=!0,id2=void 0,data="",eventType="",incompleteLine=""}return{feed,reset:reset2}}function splitLines(chunk){const lines=[];let incompleteLine="",searchIndex=0;for(;searchIndex{controller.enqueue(event2)},onError(error2){onError==="terminate"?controller.error(error2):typeof onError=="function"&&onError(error2)},onRetry,onComment})},transform(chunk){parser.feed(chunk)}})}}const DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4, reconnectionDelayGrowFactor:1.5,maxRetries:2};class StreamableHTTPError extends Error{constructor(code2,message){super(`Streamable HTTP error: ${message}`),this.code=code2}}class StreamableHTTPClientTransport{constructor(url2,opts){this._hasCompletedAuthFlow=!1,this._url=url2,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=opts?.requestInit,this._authProvider=opts?.authProvider,this._fetch=opts?.fetch,this._fetchWithInit=createFetchWithInit(opts?.fetch,opts?.requestInit),this. _sessionId=opts?.sessionId,this._reconnectionOptions=opts?.reconnectionOptions??DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS}async _authThenStart(){if(!this._authProvider)throw new UnauthorizedError("No auth provider");let result;try{result=await auth(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(error2){throw this.onerror?.(error2),error2}if(result!=="AUTHORIZED")throw new UnauthorizedError;return await this. _startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const headers={};if(this._authProvider){const tokens=await this._authProvider.tokens();tokens&&(headers.Authorization=`Bearer ${tokens.access_token}`)}this._sessionId&&(headers["mcp-session-id"]=this._sessionId),this._protocolVersion&&(headers["mcp-protocol-version"]=this._protocolVersion);const extraHeaders=normalizeHeaders(this._requestInit?.headers);return new Headers({...headers,...extraHeaders})}async _startOrAuthSse(options){ const{resumptionToken}=options;try{const headers=await this._commonHeaders();headers.set("Accept","text/event-stream"),resumptionToken&&headers.set("last-event-id",resumptionToken);const response=await(this._fetch??fetch)(this._url,{method:"GET",headers,signal:this._abortController?.signal});if(!response.ok){if(await response.body?.cancel(),response.status===401&&this._authProvider)return await this._authThenStart();if(response.status===405)return;throw new StreamableHTTPError(response.status,`F\ ailed to open SSE stream: ${response.statusText}`)}this._handleSseStream(response.body,options,!0)}catch(error2){throw this.onerror?.(error2),error2}}_getNextReconnectionDelay(attempt){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const initialDelay=this._reconnectionOptions.initialReconnectionDelay,growFactor=this._reconnectionOptions.reconnectionDelayGrowFactor,maxDelay=this._reconnectionOptions.maxReconnectionDelay;return Math.min(initialDelay*Math.pow(growFactor,attempt),maxDelay)}_scheduleReconnection(options,attemptCount=0){ const maxRetries=this._reconnectionOptions.maxRetries;if(attemptCount>=maxRetries){this.onerror?.(new Error(`Maximum reconnection attempts (${maxRetries}) exceeded.`));return}const delay=this._getNextReconnectionDelay(attemptCount);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(options).catch(error2=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${error2 instanceof Error?error2.message:String(error2)}`)),this._scheduleReconnection(options,attemptCount+1)})},delay)}_handleSseStream(stream,options,isReconnectable){ if(!stream)return;const{onresumptiontoken,replayMessageId}=options;let lastEventId,hasPrimingEvent=!1,receivedResponse=!1;(async()=>{try{const reader=stream.pipeThrough(new TextDecoderStream).pipeThrough(new EventSourceParserStream({onRetry:retryMs=>{this._serverRetryMs=retryMs}})).getReader();for(;;){const{value:event2,done}=await reader.read();if(done)break;if(event2.id&&(lastEventId=event2.id,hasPrimingEvent=!0,onresumptiontoken?.(event2.id)),!!event2.data&&(!event2.event||event2.event==="mes\ sage"))try{const message=JSONRPCMessageSchema.parse(JSON.parse(event2.data));isJSONRPCResultResponse(message)&&(receivedResponse=!0,replayMessageId!==void 0&&(message.id=replayMessageId)),this.onmessage?.(message)}catch(error2){this.onerror?.(error2)}}(isReconnectable||hasPrimingEvent)&&!receivedResponse&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:lastEventId,onresumptiontoken,replayMessageId},0)}catch(error2){if(this.onerror?.(new Error( `SSE stream disconnected: ${error2}`)),(isReconnectable||hasPrimingEvent)&&!receivedResponse&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:lastEventId,onresumptiontoken,replayMessageId},0)}catch(error3){this.onerror?.(new Error(`Failed to reconnect: ${error3 instanceof Error?error3.message:String(error3)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client c\ lass, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(authorizationCode){if(!this._authProvider)throw new UnauthorizedError("No auth provider");if(await auth(this._authProvider,{serverUrl:this._url,authorizationCode,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new UnauthorizedError("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout), this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(message,options){try{const{resumptionToken,onresumptiontoken}=options||{};if(resumptionToken){this._startOrAuthSse({resumptionToken,replayMessageId:isJSONRPCRequest(message)?message.id:void 0}).catch(err=>this.onerror?.(err));return}const headers=await this._commonHeaders();headers.set("content-type","application/json"),headers.set("accept","application/json, text/event-stream");const init2={...this._requestInit, method:"POST",headers,body:JSON.stringify(message),signal:this._abortController?.signal},response=await(this._fetch??fetch)(this._url,init2),sessionId=response.headers.get("mcp-session-id");if(sessionId&&(this._sessionId=sessionId),!response.ok){const text2=await response.text().catch(()=>null);if(response.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new StreamableHTTPError(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl,scope:scope2}=extractWWWAuthenticateParams( response);if(this._resourceMetadataUrl=resourceMetadataUrl,this._scope=scope2,await auth(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new UnauthorizedError;return this._hasCompletedAuthFlow=!0,this.send(message)}if(response.status===403&&this._authProvider){const{resourceMetadataUrl,scope:scope2,error:error2}=extractWWWAuthenticateParams(response);if(error2==="insufficient_scope"){const wwwAuthHeader=response. headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===wwwAuthHeader)throw new StreamableHTTPError(403,"Server returned 403 after trying upscoping");if(scope2&&(this._scope=scope2),resourceMetadataUrl&&(this._resourceMetadataUrl=resourceMetadataUrl),this._lastUpscopingHeader=wwwAuthHeader??void 0,await auth(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new UnauthorizedError;return this.send( message)}}throw new StreamableHTTPError(response.status,`Error POSTing to endpoint: ${text2}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,response.status===202){await response.body?.cancel(),isInitializedNotification(message)&&this._startOrAuthSse({resumptionToken:void 0}).catch(err=>this.onerror?.(err));return}const hasRequests=(Array.isArray(message)?message:[message]).filter(msg=>"method"in msg&&"id"in msg&&msg.id!==void 0).length>0,contentType=response.headers.get("con\ tent-type");if(hasRequests)if(contentType?.includes("text/event-stream"))this._handleSseStream(response.body,{onresumptiontoken},!1);else if(contentType?.includes("application/json")){const data=await response.json(),responseMessages=Array.isArray(data)?data.map(msg=>JSONRPCMessageSchema.parse(msg)):[JSONRPCMessageSchema.parse(data)];for(const msg of responseMessages)this.onmessage?.(msg)}else throw await response.body?.cancel(),new StreamableHTTPError(-1,`Unexpected content type: ${contentType}`);else await response.body?.cancel()}catch(error2){throw this.onerror?.(error2),error2}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const headers=await this._commonHeaders(),init2={...this._requestInit,method:"DELETE",headers,signal:this._abortController?.signal},response=await(this._fetch??fetch)(this._url,init2);if(await response.body?.cancel(),!response.ok&&response.status!==405)throw new StreamableHTTPError(response.status,`Failed to terminate session: ${response. statusText}`);this._sessionId=void 0}catch(error2){throw this.onerror?.(error2),error2}}setProtocolVersion(version2){this._protocolVersion=version2}get protocolVersion(){return this._protocolVersion}async resumeStream(lastEventId,options){await this._startOrAuthSse({resumptionToken:lastEventId,onresumptiontoken:options?.onresumptiontoken})}}class ErrorEvent extends Event{constructor(type2,errorEventInitDict){var _a2,_b;super(type2),this.code=(_a2=errorEventInitDict?.code)!=null?_a2:void 0,this.message= (_b=errorEventInitDict?.message)!=null?_b:void 0}[Symbol.for("nodejs.util.inspect.custom")](_depth,options,inspect){return inspect(inspectableError(this),options)}[Symbol.for("Deno.customInspect")](inspect,options){return inspect(inspectableError(this),options)}}function syntaxError(message){const DomException=globalThis.DOMException;return typeof DomException=="function"?new DomException(message,"SyntaxError"):new SyntaxError(message)}function flattenError(err){return err instanceof Error?"erro\ rs"in err&&Array.isArray(err.errors)?err.errors.map(flattenError).join(", "):"cause"in err&&err.cause instanceof Error?`${err}: ${flattenError(err.cause)}`:err.message:`${err}`}function inspectableError(err){return{type:err.type,message:err.message,code:err.code,defaultPrevented:err.defaultPrevented,cancelable:err.cancelable,timeStamp:err.timeStamp}}var __typeError2=msg=>{throw TypeError(msg)},__accessCheck2=(obj,member,msg)=>member.has(obj)||__typeError2("Cannot "+msg),__privateGet2=(obj,member,getter)=>(__accessCheck2( obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd2=(obj,member,value)=>member.has(obj)?__typeError2("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet2=(obj,member,value,setter)=>(__accessCheck2(obj,member,"write to private field"),member.set(obj,value),value),__privateMethod2=(obj,member,method)=>(__accessCheck2(obj,member,"access private method"),method),_readyState,_url,_redirectUrl, _withCredentials,_fetch,_reconnectInterval,_reconnectTimer,_lastEventId,_controller,_parser,_onError,_onMessage,_onOpen,_EventSource_instances,connect_fn,_onFetchResponse,_onFetchError,getRequestOptions_fn,_onEvent,_onRetryChange,failConnection_fn,scheduleReconnect_fn,_reconnect;class EventSource extends EventTarget{constructor(url2,eventSourceInitDict){var _a2,_b;super(),__privateAdd2(this,_EventSource_instances),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,__privateAdd2(this,_readyState),__privateAdd2( this,_url),__privateAdd2(this,_redirectUrl),__privateAdd2(this,_withCredentials),__privateAdd2(this,_fetch),__privateAdd2(this,_reconnectInterval),__privateAdd2(this,_reconnectTimer),__privateAdd2(this,_lastEventId,null),__privateAdd2(this,_controller),__privateAdd2(this,_parser),__privateAdd2(this,_onError,null),__privateAdd2(this,_onMessage,null),__privateAdd2(this,_onOpen,null),__privateAdd2(this,_onFetchResponse,async response=>{var _a22;__privateGet2(this,_parser).reset();const{body:body2,redirected, status,headers}=response;if(status===204){__privateMethod2(this,_EventSource_instances,failConnection_fn).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(redirected?__privateSet2(this,_redirectUrl,new URL(response.url)):__privateSet2(this,_redirectUrl,void 0),status!==200){__privateMethod2(this,_EventSource_instances,failConnection_fn).call(this,`Non-200 status code (${status})`,status);return}if(!(headers.get("content-type")||"").startsWith("text/event-stream")){__privateMethod2( this,_EventSource_instances,failConnection_fn).call(this,'Invalid content type, expected "text/event-stream"',status);return}if(__privateGet2(this,_readyState)===this.CLOSED)return;__privateSet2(this,_readyState,this.OPEN);const openEvent=new Event("open");if((_a22=__privateGet2(this,_onOpen))==null||_a22.call(this,openEvent),this.dispatchEvent(openEvent),typeof body2!="object"||!body2||!("getReader"in body2)){__privateMethod2(this,_EventSource_instances,failConnection_fn).call(this,"Invalid res\ ponse body, expected a web ReadableStream",status),this.close();return}const decoder=new TextDecoder,reader=body2.getReader();let open2=!0;do{const{done,value}=await reader.read();value&&__privateGet2(this,_parser).feed(decoder.decode(value,{stream:!done})),done&&(open2=!1,__privateGet2(this,_parser).reset(),__privateMethod2(this,_EventSource_instances,scheduleReconnect_fn).call(this))}while(open2)}),__privateAdd2(this,_onFetchError,err=>{__privateSet2(this,_controller,void 0),!(err.name==="Abor\ tError"||err.type==="aborted")&&__privateMethod2(this,_EventSource_instances,scheduleReconnect_fn).call(this,flattenError(err))}),__privateAdd2(this,_onEvent,event2=>{typeof event2.id=="string"&&__privateSet2(this,_lastEventId,event2.id);const messageEvent=new MessageEvent(event2.event||"message",{data:event2.data,origin:__privateGet2(this,_redirectUrl)?__privateGet2(this,_redirectUrl).origin:__privateGet2(this,_url).origin,lastEventId:event2.id||""});__privateGet2(this,_onMessage)&&(!event2.event|| event2.event==="message")&&__privateGet2(this,_onMessage).call(this,messageEvent),this.dispatchEvent(messageEvent)}),__privateAdd2(this,_onRetryChange,value=>{__privateSet2(this,_reconnectInterval,value)}),__privateAdd2(this,_reconnect,()=>{__privateSet2(this,_reconnectTimer,void 0),__privateGet2(this,_readyState)===this.CONNECTING&&__privateMethod2(this,_EventSource_instances,connect_fn).call(this)});try{if(url2 instanceof URL)__privateSet2(this,_url,url2);else if(typeof url2=="string")__privateSet2( this,_url,new URL(url2,getBaseURL()));else throw new Error("Invalid URL")}catch{throw syntaxError("An invalid or illegal string was specified")}__privateSet2(this,_parser,createParser$1({onEvent:__privateGet2(this,_onEvent),onRetry:__privateGet2(this,_onRetryChange)})),__privateSet2(this,_readyState,this.CONNECTING),__privateSet2(this,_reconnectInterval,3e3),__privateSet2(this,_fetch,(_a2=eventSourceInitDict?.fetch)!=null?_a2:globalThis.fetch),__privateSet2(this,_withCredentials,(_b=eventSourceInitDict?. withCredentials)!=null?_b:!1),__privateMethod2(this,_EventSource_instances,connect_fn).call(this)}get readyState(){return __privateGet2(this,_readyState)}get url(){return __privateGet2(this,_url).href}get withCredentials(){return __privateGet2(this,_withCredentials)}get onerror(){return __privateGet2(this,_onError)}set onerror(value){__privateSet2(this,_onError,value)}get onmessage(){return __privateGet2(this,_onMessage)}set onmessage(value){__privateSet2(this,_onMessage,value)}get onopen(){return __privateGet2( this,_onOpen)}set onopen(value){__privateSet2(this,_onOpen,value)}addEventListener(type2,listener,options){const listen2=listener;super.addEventListener(type2,listen2,options)}removeEventListener(type2,listener,options){const listen2=listener;super.removeEventListener(type2,listen2,options)}close(){__privateGet2(this,_reconnectTimer)&&clearTimeout(__privateGet2(this,_reconnectTimer)),__privateGet2(this,_readyState)!==this.CLOSED&&(__privateGet2(this,_controller)&&__privateGet2(this,_controller). abort(),__privateSet2(this,_readyState,this.CLOSED),__privateSet2(this,_controller,void 0))}}_readyState=new WeakMap,_url=new WeakMap,_redirectUrl=new WeakMap,_withCredentials=new WeakMap,_fetch=new WeakMap,_reconnectInterval=new WeakMap,_reconnectTimer=new WeakMap,_lastEventId=new WeakMap,_controller=new WeakMap,_parser=new WeakMap,_onError=new WeakMap,_onMessage=new WeakMap,_onOpen=new WeakMap,_EventSource_instances=new WeakSet,connect_fn=function(){__privateSet2(this,_readyState,this.CONNECTING), __privateSet2(this,_controller,new AbortController),__privateGet2(this,_fetch)(__privateGet2(this,_url),__privateMethod2(this,_EventSource_instances,getRequestOptions_fn).call(this)).then(__privateGet2(this,_onFetchResponse)).catch(__privateGet2(this,_onFetchError))},_onFetchResponse=new WeakMap,_onFetchError=new WeakMap,getRequestOptions_fn=function(){var _a2;const init2={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...__privateGet2(this,_lastEventId)?{"Last-Event-ID":__privateGet2( this,_lastEventId)}:void 0},cache:"no-store",signal:(_a2=__privateGet2(this,_controller))==null?void 0:_a2.signal};return"window"in globalThis&&(init2.credentials=this.withCredentials?"include":"same-origin"),init2},_onEvent=new WeakMap,_onRetryChange=new WeakMap,failConnection_fn=function(message,code2){var _a2;__privateGet2(this,_readyState)!==this.CLOSED&&__privateSet2(this,_readyState,this.CLOSED);const errorEvent=new ErrorEvent("error",{code:code2,message});(_a2=__privateGet2(this,_onError))== null||_a2.call(this,errorEvent),this.dispatchEvent(errorEvent)},scheduleReconnect_fn=function(message,code2){var _a2;if(__privateGet2(this,_readyState)===this.CLOSED)return;__privateSet2(this,_readyState,this.CONNECTING);const errorEvent=new ErrorEvent("error",{code:code2,message});(_a2=__privateGet2(this,_onError))==null||_a2.call(this,errorEvent),this.dispatchEvent(errorEvent),__privateSet2(this,_reconnectTimer,setTimeout(__privateGet2(this,_reconnect),__privateGet2(this,_reconnectInterval)))}, _reconnect=new WeakMap,EventSource.CONNECTING=0,EventSource.OPEN=1,EventSource.CLOSED=2;function getBaseURL(){const doc="document"in globalThis?globalThis.document:void 0;return doc&&typeof doc=="object"&&"baseURI"in doc&&typeof doc.baseURI=="string"?doc.baseURI:void 0}class SseError extends Error{constructor(code2,message,event2){super(`SSE error: ${message}`),this.code=code2,this.event=event2}}class SSEClientTransport{constructor(url2,opts){this._url=url2,this._resourceMetadataUrl=void 0,this. _scope=void 0,this._eventSourceInit=opts?.eventSourceInit,this._requestInit=opts?.requestInit,this._authProvider=opts?.authProvider,this._fetch=opts?.fetch,this._fetchWithInit=createFetchWithInit(opts?.fetch,opts?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new UnauthorizedError("No auth provider");let result;try{result=await auth(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(error2){ throw this.onerror?.(error2),error2}if(result!=="AUTHORIZED")throw new UnauthorizedError;return await this._startOrAuth()}async _commonHeaders(){const headers={};if(this._authProvider){const tokens=await this._authProvider.tokens();tokens&&(headers.Authorization=`Bearer ${tokens.access_token}`)}this._protocolVersion&&(headers["mcp-protocol-version"]=this._protocolVersion);const extraHeaders=normalizeHeaders(this._requestInit?.headers);return new Headers({...headers,...extraHeaders})}_startOrAuth(){ const fetchImpl=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((resolve2,reject)=>{this._eventSource=new EventSource(this._url.href,{...this._eventSourceInit,fetch:async(url2,init2)=>{const headers=await this._commonHeaders();headers.set("Accept","text/event-stream");const response=await fetchImpl(url2,{...init2,headers});if(response.status===401&&response.headers.has("www-authenticate")){const{resourceMetadataUrl,scope:scope2}=extractWWWAuthenticateParams(response);this._resourceMetadataUrl= resourceMetadataUrl,this._scope=scope2}return response}}),this._abortController=new AbortController,this._eventSource.onerror=event2=>{if(event2.code===401&&this._authProvider){this._authThenStart().then(resolve2,reject);return}const error2=new SseError(event2.code,event2.message,event2);reject(error2),this.onerror?.(error2)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",event2=>{const messageEvent=event2;try{if(this._endpoint=new URL(messageEvent.data,this._url), this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(error2){reject(error2),this.onerror?.(error2),this.close();return}resolve2()}),this._eventSource.onmessage=event2=>{const messageEvent=event2;let message;try{message=JSONRPCMessageSchema.parse(JSON.parse(messageEvent.data))}catch(error2){this.onerror?.(error2);return}this.onmessage?.(message)}})}async start(){if(this._eventSource)throw new Error("SSEClientT\ ransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(authorizationCode){if(!this._authProvider)throw new UnauthorizedError("No auth provider");if(await auth(this._authProvider,{serverUrl:this._url,authorizationCode,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new UnauthorizedError("Failed to authorize")}async close(){this._abortController?. abort(),this._eventSource?.close(),this.onclose?.()}async send(message){if(!this._endpoint)throw new Error("Not connected");try{const headers=await this._commonHeaders();headers.set("content-type","application/json");const init2={...this._requestInit,method:"POST",headers,body:JSON.stringify(message),signal:this._abortController?.signal},response=await(this._fetch??fetch)(this._endpoint,init2);if(!response.ok){const text2=await response.text().catch(()=>null);if(response.status===401&&this._authProvider){ const{resourceMetadataUrl,scope:scope2}=extractWWWAuthenticateParams(response);if(this._resourceMetadataUrl=resourceMetadataUrl,this._scope=scope2,await auth(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new UnauthorizedError;return this.send(message)}throw new Error(`Error POSTing to endpoint (HTTP ${response.status}): ${text2}`)}await response.body?.cancel()}catch(error2){throw this.onerror?.( error2),error2}}setProtocolVersion(version2){this._protocolVersion=version2}}const SUBPROTOCOL="mcp";class WebSocketClientTransport{constructor(url2){this._url=url2}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((resolve2,reject)=>{this._socket=new WebSocket(this._url,SUBPROTOCOL),this._socket.onerror=event2=>{const error2="error"in event2?event2.error:new Error(`WebSo\ cket error: ${JSON.stringify(event2)}`);reject(error2),this.onerror?.(error2)},this._socket.onopen=()=>{resolve2()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=event2=>{let message;try{message=JSONRPCMessageSchema.parse(JSON.parse(event2.data))}catch(error2){this.onerror?.(error2);return}this.onmessage?.(message)}})}async close(){this._socket?.close()}send(message){return new Promise((resolve2,reject)=>{if(!this._socket){reject(new Error("Not connected"));return}this._socket?. send(JSON.stringify(message)),resolve2()})}}class MCPService{static createLog(phase,message,level=MCPLogLevel.INFO,details){return{timestamp:new Date,phase,message,level,details}}static isSessionExpiredError(error2){return error2 instanceof StreamableHTTPError&&error2.code===404}static createTransport(config2){if(!config2.url)throw new Error("MCP server configuration is missing url");const useProxy=config2.useProxy??!1,requestInit={};if(config2.headers&&(requestInit.headers=config2.useProxy?buildProxiedHeaders( config2.headers):config2.headers),useProxy&&(requestInit.headers={...getAuthHeaders(),...requestInit.headers}),config2.credentials&&(requestInit.credentials=config2.credentials),config2.transport===MCPTransportType.WEBSOCKET){if(useProxy)throw new Error("WebSocket transport is not supported when using CORS proxy. Use HTTP transport instead.");const url22=new URL(config2.url);return{transport:new WebSocketClientTransport(url22),type:MCPTransportType.WEBSOCKET}}const url2=useProxy?buildProxiedUrl( config2.url):new URL(config2.url);try{return{transport:new StreamableHTTPClientTransport(url2,{requestInit}),type:MCPTransportType.STREAMABLE_HTTP}}catch(httpError){console.warn("[MCPService] StreamableHTTP failed, trying SSE transport...",httpError);try{return{transport:new SSEClientTransport(url2,{requestInit}),type:MCPTransportType.SSE}}catch(sseError){const httpMsg=httpError instanceof Error?httpError.message:String(httpError),sseMsg=sseError instanceof Error?sseError.message:String(sseError); throw new Error(`Failed to create transport. StreamableHTTP: ${httpMsg}; SSE: ${sseMsg}`)}}}static extractServerInfo(impl){if(impl)return{name:impl.name,version:impl.version,title:impl.title,description:impl.description,websiteUrl:impl.websiteUrl,icons:impl.icons?.map(icon=>({src:icon.src,mimeType:icon.mimeType,sizes:icon.sizes}))}}static async connect(serverName,serverConfig,clientInfo,capabilities,onPhase,listChangedHandlers){const startTime=performance.now(),effectiveClientInfo=clientInfo??DEFAULT_MCP_CONFIG. clientInfo,effectiveCapabilities=capabilities??DEFAULT_MCP_CONFIG.capabilities;onPhase?.(MCPConnectionPhase.TRANSPORT_CREATING,this.createLog(MCPConnectionPhase.TRANSPORT_CREATING,`Creating transport for ${serverConfig.url}`));const{transport,type:transportType}=this.createTransport(serverConfig);transportType===MCPTransportType.WEBSOCKET&&(transport.onclose=()=>{console.log(`[MCPService][${serverName}] WebSocket closed, notifying for reconnection`),onPhase?.(MCPConnectionPhase.DISCONNECTED,this. createLog(MCPConnectionPhase.DISCONNECTED,"WebSocket connection closed"))}),onPhase?.(MCPConnectionPhase.TRANSPORT_READY,this.createLog(MCPConnectionPhase.TRANSPORT_READY,`Transport ready (${transportType})`),{transportType});const client=new Client({name:effectiveClientInfo.name,version:effectiveClientInfo.version??DEFAULT_CLIENT_VERSION},{capabilities:effectiveCapabilities,listChanged:listChangedHandlers});onPhase?.(MCPConnectionPhase.INITIALIZING,this.createLog(MCPConnectionPhase.INITIALIZING, "Sending initialize request...")),console.log(`[MCPService][${serverName}] Connecting to server...`),await client.connect(transport);const serverVersion=client.getServerVersion(),serverCapabilities=client.getServerCapabilities(),instructions=client.getInstructions(),serverInfo=this.extractServerInfo(serverVersion);onPhase?.(MCPConnectionPhase.CAPABILITIES_EXCHANGED,this.createLog(MCPConnectionPhase.CAPABILITIES_EXCHANGED,"Capabilities exchanged successfully",MCPLogLevel.INFO,{serverCapabilities, serverInfo}),{serverInfo,serverCapabilities,clientCapabilities:effectiveCapabilities,instructions}),onPhase?.(MCPConnectionPhase.LISTING_TOOLS,this.createLog(MCPConnectionPhase.LISTING_TOOLS,"Listing available tools...")),console.log(`[MCPService][${serverName}] Connected, listing tools...`);const tools=await this.listTools({client,transport,tools:[],serverName,transportType,connectionTimeMs:0}),connectionTimeMs=Math.round(performance.now()-startTime);return onPhase?.(MCPConnectionPhase.CONNECTED, this.createLog(MCPConnectionPhase.CONNECTED,`Connection established with ${tools.length} tools (${connectionTimeMs}ms)`)),console.log(`[MCPService][${serverName}] Initialization complete with ${tools.length} tools in ${connectionTimeMs}ms`),{client,transport,tools,serverName,transportType,serverInfo,serverCapabilities,clientCapabilities:effectiveCapabilities,protocolVersion:DEFAULT_MCP_CONFIG.protocolVersion,instructions,connectionTimeMs}}static async disconnect(connection){console.log(`[MCPServ\ ice][${connection.serverName}] Disconnecting...`);try{connection.transport.onclose&&(connection.transport.onclose=void 0),await connection.client.close()}catch(error2){console.warn(`[MCPService][${connection.serverName}] Error during disconnect:`,error2)}}static async listTools(connection){try{return(await connection.client.listTools()).tools??[]}catch(error2){if(this.isSessionExpiredError(error2))throw error2;return console.warn(`[MCPService][${connection.serverName}] Failed to list tools:`,error2), []}}static async listPrompts(connection){try{return(await connection.client.listPrompts()).prompts??[]}catch(error2){if(this.isSessionExpiredError(error2))throw error2;return console.warn(`[MCPService][${connection.serverName}] Failed to list prompts:`,error2),[]}}static async getPrompt(connection,name,args){try{return await connection.client.getPrompt({name,arguments:args})}catch(error2){throw console.error(`[MCPService][${connection.serverName}] Failed to get prompt:`,error2),error2}}static async callTool(connection,params,signal){ throwIfAborted(signal);try{const result=await connection.client.callTool({name:params.name,arguments:params.arguments},void 0,{signal});return{content:this.formatToolResult(result),isError:result.isError??!1}}catch(error2){if(isAbortError(error2)||this.isSessionExpiredError(error2))throw error2;const message=error2 instanceof Error?error2.message:String(error2);throw new Error(`Tool "${params.name}" execution failed on server "${connection.serverName}": ${message}`,{cause:error2 instanceof Error? error2:void 0})}}static formatToolResult(result){const content2=result.content;return Array.isArray(content2)?content2.map(item=>this.formatSingleContent(item)).filter(Boolean).join(` `):""}static formatSingleContent(content2){if(content2.type===MCPContentType.TEXT&&content2.text)return content2.text;if(content2.type===MCPContentType.IMAGE&&content2.data)return createBase64DataUrl(content2.mimeType??DEFAULT_IMAGE_MIME_TYPE,content2.data);if(content2.type===MCPContentType.RESOURCE&&content2.resource){const resource=content2.resource;return resource.text?resource.text:resource.blob?resource.blob:JSON.stringify(resource)}return content2.data&&content2.mimeType?createBase64DataUrl( content2.mimeType,content2.data):JSON.stringify(content2)}static async complete(connection,ref2,argument){try{return(await connection.client.complete({ref:ref2,argument})).completion}catch(error2){return console.error("[MCPService] Failed to get completions:",error2),null}}static async listResources(connection,cursor){try{const result=await connection.client.listResources(cursor?{cursor}:void 0);return{resources:result.resources??[],nextCursor:result.nextCursor}}catch(error2){if(this.isSessionExpiredError( error2))throw error2;return console.warn(`[MCPService][${connection.serverName}] Failed to list resources:`,error2),{resources:[]}}}static async listAllResources(connection){const allResources=[];let cursor;do{const result=await this.listResources(connection,cursor);allResources.push(...result.resources),cursor=result.nextCursor}while(cursor);return allResources}static async listResourceTemplates(connection,cursor){try{const result=await connection.client.listResourceTemplates(cursor?{cursor}:void 0); return{resourceTemplates:result.resourceTemplates??[],nextCursor:result.nextCursor}}catch(error2){if(this.isSessionExpiredError(error2))throw error2;return console.warn(`[MCPService][${connection.serverName}] Failed to list resource templates:`,error2),{resourceTemplates:[]}}}static async listAllResourceTemplates(connection){const allTemplates=[];let cursor;do{const result=await this.listResourceTemplates(connection,cursor);allTemplates.push(...result.resourceTemplates),cursor=result.nextCursor}while(cursor); return allTemplates}static async readResource(connection,uri2){try{const result=await connection.client.readResource({uri:uri2});return{contents:result.contents??[],_meta:result._meta}}catch(error2){throw console.error(`[MCPService][${connection.serverName}] Failed to read resource:`,error2),error2}}static async subscribeResource(connection,uri2){try{await connection.client.subscribeResource({uri:uri2}),console.log(`[MCPService][${connection.serverName}] Subscribed to resource: ${uri2}`)}catch(error2){ throw console.error(`[MCPService][${connection.serverName}] Failed to subscribe to resource:`,error2),error2}}static async unsubscribeResource(connection,uri2){try{await connection.client.unsubscribeResource({uri:uri2}),console.log(`[MCPService][${connection.serverName}] Unsubscribed from resource: ${uri2}`)}catch(error2){throw console.error(`[MCPService][${connection.serverName}] Failed to unsubscribe from resource:`,error2),error2}}static supportsResources(connection){return connection.serverCapabilities?. resources!==void 0}static supportsResourceSubscriptions(connection){return!!connection.serverCapabilities?.resources?.subscribe}}function generateAttachmentId(){return`${MCP_RESOURCE_ATTACHMENT_ID_PREFIX}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`}class MCPResourceStore{#_serverResources=state$1(proxy(new SvelteMap));get _serverResources(){return get$4(this.#_serverResources)}set _serverResources(value){set$1(this.#_serverResources,value,!0)}#_cachedResources=state$1(proxy(new SvelteMap));get _cachedResources(){ return get$4(this.#_cachedResources)}set _cachedResources(value){set$1(this.#_cachedResources,value,!0)}#_subscriptions=state$1(proxy(new SvelteMap));get _subscriptions(){return get$4(this.#_subscriptions)}set _subscriptions(value){set$1(this.#_subscriptions,value,!0)}#_attachments=state$1(proxy([]));get _attachments(){return get$4(this.#_attachments)}set _attachments(value){set$1(this.#_attachments,value,!0)}#_isLoading=state$1(!1);get _isLoading(){return get$4(this.#_isLoading)}set _isLoading(value){ set$1(this.#_isLoading,value,!0)}get serverResources(){return this._serverResources}get cachedResources(){return this._cachedResources}get subscriptions(){return this._subscriptions}get attachments(){return this._attachments}get isLoading(){return this._isLoading}get totalResourceCount(){let count=0;for(const serverRes of this._serverResources.values())count+=serverRes.resources.length;return count}get totalTemplateCount(){let count=0;for(const serverRes of this._serverResources.values())count+= serverRes.templates.length;return count}get attachmentCount(){return this._attachments.length}get hasAttachments(){return this._attachments.length>0}setServerResources(serverName,resources,templates){this._serverResources.set(serverName,{serverName,resources,templates,lastFetched:new Date,loading:!1,error:void 0}),console.log(`[MCPResources][${serverName}] Set ${resources.length} resources, ${templates.length} templates`)}setServerLoading(serverName,loading){const existing=this._serverResources. get(serverName);existing?this._serverResources.set(serverName,{...existing,loading}):this._serverResources.set(serverName,{serverName,resources:[],templates:[],loading,error:void 0})}setServerError(serverName,error2){const existing=this._serverResources.get(serverName);existing?this._serverResources.set(serverName,{...existing,loading:!1,error:error2}):this._serverResources.set(serverName,{serverName,resources:[],templates:[],loading:!1,error:error2})}getServerResources(serverName){return this._serverResources. get(serverName)}getAllResourceInfos(){const result=[];for(const[serverName,serverRes]of this._serverResources)for(const resource of serverRes.resources)result.push({uri:resource.uri,name:resource.name,title:resource.title,description:resource.description,mimeType:resource.mimeType,serverName,annotations:resource.annotations,icons:resource.icons});return result}getAllTemplateInfos(){const result=[];for(const[serverName,serverRes]of this._serverResources)for(const template of serverRes.templates)result. push({uriTemplate:template.uriTemplate,name:template.name,title:template.title,description:template.description,mimeType:template.mimeType,serverName,annotations:template.annotations,icons:template.icons});return result}clearServerResources(serverName){this._serverResources.delete(serverName);for(const[uri2,cached2]of this._cachedResources)cached2.resource.serverName===serverName&&this._cachedResources.delete(uri2);for(const[uri2,sub2]of this._subscriptions)sub2.serverName===serverName&&this._subscriptions. delete(uri2);console.log(`[MCPResources][${serverName}] Cleared all resources`)}cacheResourceContent(resource,content2){if(this._cachedResources.size>=MCP_RESOURCE_CACHE_MAX_ENTRIES){const oldestKey=this._cachedResources.keys().next().value;oldestKey&&this._cachedResources.delete(oldestKey)}this._cachedResources.set(resource.uri,{resource,content:content2,fetchedAt:new Date,subscribed:this._subscriptions.has(resource.uri)}),console.log(`[MCPResources] Cached content for: ${resource.uri}`)}getCachedContent(uri2){ const cached2=this._cachedResources.get(uri2);if(!cached2)return;if(Date.now()-cached2.fetchedAt.getTime()>MCP_RESOURCE_CACHE_TTL_MS&&!cached2.subscribed){this._cachedResources.delete(uri2);return}return cached2}invalidateCache(uri2){this._cachedResources.delete(uri2),console.log(`[MCPResources] Invalidated cache for: ${uri2}`)}clearCache(){this._cachedResources.clear(),console.log("[MCPResources] Cleared all cached content")}addSubscription(uri2,serverName){this._subscriptions.set(uri2,{uri:uri2, serverName,subscribedAt:new Date});const cached2=this._cachedResources.get(uri2);cached2&&this._cachedResources.set(uri2,{...cached2,subscribed:!0}),console.log(`[MCPResources] Added subscription: ${uri2}`)}removeSubscription(uri2){this._subscriptions.delete(uri2);const cached2=this._cachedResources.get(uri2);cached2&&this._cachedResources.set(uri2,{...cached2,subscribed:!1}),console.log(`[MCPResources] Removed subscription: ${uri2}`)}isSubscribed(uri2){return this._subscriptions.has(uri2)}handleResourceUpdate(uri2){ this.invalidateCache(uri2);const sub2=this._subscriptions.get(uri2);sub2&&this._subscriptions.set(uri2,{...sub2,lastUpdate:new Date}),console.log(`[MCPResources] Resource updated: ${uri2}`)}handleResourcesListChanged(serverName){const existing=this._serverResources.get(serverName);existing&&this._serverResources.set(serverName,{...existing,lastFetched:void 0}),console.log(`[MCPResources][${serverName}] Resources list changed, needs refresh`)}addAttachment(resource){const attachment={id:generateAttachmentId(), resource,loading:!0};return this._attachments=[...this._attachments,attachment],console.log(`[MCPResources] Added attachment: ${resource.uri}`),attachment}updateAttachmentContent(attachmentId,content2){this._attachments=this._attachments.map(att=>att.id===attachmentId?{...att,content:content2,loading:!1,error:void 0}:att)}updateAttachmentError(attachmentId,error2){this._attachments=this._attachments.map(att=>att.id===attachmentId?{...att,loading:!1,error:error2}:att)}removeAttachment(attachmentId){ this._attachments=this._attachments.filter(att=>att.id!==attachmentId),console.log(`[MCPResources] Removed attachment: ${attachmentId}`)}clearAttachments(){this._attachments=[],console.log("[MCPResources] Cleared all attachments")}getAttachment(attachmentId){return this._attachments.find(att=>att.id===attachmentId)}isAttached(uri2){const normalizedUri=normalizeResourceUri(uri2);return this._attachments.some(att=>att.resource.uri===uri2||normalizeResourceUri(att.resource.uri)===normalizedUri)}setLoading(loading){ this._isLoading=loading}findResourceByUri(uri2){const normalizedUri=normalizeResourceUri(uri2);for(const[serverName,serverRes]of this._serverResources){const resource=serverRes.resources.find(r2=>r2.uri===uri2)??serverRes.resources.find(r2=>normalizeResourceUri(r2.uri)===normalizedUri);if(resource)return{uri:resource.uri,name:resource.name,title:resource.title,description:resource.description,mimeType:resource.mimeType,serverName,annotations:resource.annotations,icons:resource.icons}}}findServerForUri(uri2){ for(const[serverName,serverRes]of this._serverResources)if(serverRes.resources.some(r2=>r2.uri===uri2))return serverName}clear(){this._serverResources.clear(),this._cachedResources.clear(),this._subscriptions.clear(),this._attachments=[],this._isLoading=!1,console.log("[MCPResources] Cleared all state")}formatAttachmentsForContext(){if(this._attachments.length===0)return"";const parts=[];for(const attachment of this._attachments){if(attachment.error||!attachment.content||attachment.content.length=== 0)continue;const resourceName=attachment.resource.title||attachment.resource.name,serverName=attachment.resource.serverName;for(const content2 of attachment.content)"text"in content2&&content2.text?parts.push(` --- Resource: ${resourceName} (from ${serverName}) --- ${content2.text}`):"blob"in content2&&content2.blob&&parts.push(` --- Resource: ${resourceName} (from ${serverName}) --- [${BINARY_CONTENT_LABEL}: ${content2.mimeType||RESOURCE_UNKNOWN_TYPE}]`)}return parts.join("")}toMessageExtras(){const extras=[];for(const attachment of this._attachments){if(attachment.error||!attachment.content||attachment.content.length===0)continue;const resourceName=attachment.resource.title||attachment.resource.name,contentParts=[];for(const content2 of attachment.content)"text"in content2&&content2.text?contentParts.push(content2.text):"blob"in content2&&content2.blob&&contentParts.push(`\ [${BINARY_CONTENT_LABEL}: ${content2.mimeType||RESOURCE_UNKNOWN_TYPE}]`);contentParts.length>0&&extras.push({type:AttachmentType.MCP_RESOURCE,name:resourceName,uri:attachment.resource.uri,serverName:attachment.resource.serverName,content:contentParts.join(NEWLINE_SEPARATOR),mimeType:attachment.resource.mimeType})}return extras}}const mcpResourceStore=new MCPResourceStore,mcpResources=()=>mcpResourceStore.serverResources,mcpResourceAttachments=()=>mcpResourceStore.attachments,mcpHasResourceAttachments=()=>mcpResourceStore. hasAttachments,mcpTotalResourceCount=()=>mcpResourceStore.totalResourceCount,mcpResourcesLoading=()=>mcpResourceStore.isLoading,defaultWindow$1=typeof window<"u"?window:void 0;function getActiveElement$1(document2){let activeElement=document2.activeElement;for(;activeElement?.shadowRoot;){const node2=activeElement.shadowRoot.activeElement;if(node2===activeElement)break;activeElement=node2}return activeElement}let ActiveElement$1=class{#document;#subscribe;constructor(options={}){const{window:window2=defaultWindow$1, document:document2=window2?.document}=options;window2!==void 0&&(this.#document=document2,this.#subscribe=createSubscriber(update2=>{const cleanupFocusIn=on(window2,"focusin",update2),cleanupFocusOut=on(window2,"focusout",update2);return()=>{cleanupFocusIn(),cleanupFocusOut()}}))}get current(){return this.#subscribe?.(),this.#document?getActiveElement$1(this.#document):null}};new ActiveElement$1;function runEffect(flush,effect2){switch(flush){case"post":user_effect(effect2);break;case"pre":user_pre_effect( effect2);break}}function runWatcher(sources,flush,effect2,options={}){const{lazy=!1}=options;let active=!lazy,previousValues=Array.isArray(sources)?[]:void 0;runEffect(flush,()=>{const values=Array.isArray(sources)?sources.map(source2=>source2()):sources();if(!active){active=!0,previousValues=values;return}const cleanup=untrack$1(()=>effect2(values,previousValues));return previousValues=values,cleanup})}function watch(sources,effect2,options){runWatcher(sources,"post",effect2,options)}function watchPre(sources,effect2,options){ runWatcher(sources,"pre",effect2,options)}watch.pre=watchPre;function getStorage(storageType,window2){switch(storageType){case"local":return window2.localStorage;case"session":return window2.sessionStorage}}class PersistedState{#current;#key;#serializer;#storage;#subscribe;#version=state$1(0);constructor(key2,initialValue,options={}){const{storage:storageType="local",serializer:serializer2={serialize:JSON.stringify,deserialize:JSON.parse},syncTabs=!0,window:window2=defaultWindow$1}=options;if(this.#current= initialValue,this.#key=key2,this.#serializer=serializer2,window2===void 0)return;const storage=getStorage(storageType,window2);this.#storage=storage;const existingValue=storage.getItem(key2);existingValue!==null?this.#current=this.#deserialize(existingValue):this.#serialize(initialValue),syncTabs&&storageType==="local"&&(this.#subscribe=createSubscriber(()=>on(window2,"storage",this.#handleStorageEvent)))}get current(){this.#subscribe?.(),get$4(this.#version);const root2=this.#deserialize(this.#storage?. getItem(this.#key))??this.#current,proxies=new WeakMap,proxy2=value=>{if(value===null||value?.constructor.name==="Date"||typeof value!="object")return value;let p2=proxies.get(value);return p2||(p2=new Proxy(value,{get:(target2,property)=>(get$4(this.#version),proxy2(Reflect.get(target2,property))),set:(target2,property,value2)=>(set$1(this.#version,get$4(this.#version)+1),Reflect.set(target2,property,value2),this.#serialize(root2),!0)}),proxies.set(value,p2)),p2};return proxy2(root2)}set current(newValue){ this.#serialize(newValue),set$1(this.#version,get$4(this.#version)+1)}#handleStorageEvent=event2=>{event2.key!==this.#key||event2.newValue===null||(this.#current=this.#deserialize(event2.newValue),set$1(this.#version,get$4(this.#version)+1))};#deserialize(value){try{return this.#serializer.deserialize(value)}catch(error2){console.error(`Error when parsing "${value}" from persisted store "${this.#key}"`,error2);return}}#serialize(value){try{value!=null&&this.#storage?.setItem(this.#key,this.#serializer. serialize(value))}catch(error2){console.error(`Error when writing value from persisted store "${this.#key}" to ${this.#storage}`,error2)}}}function sanitizeClassNames(classNames){return classNames.filter(className=>className.length>0)}const noopStorage={getItem:_key=>null,setItem:(_key,_value)=>{}},isBrowser=typeof document<"u";function isFunction(value){return typeof value=="function"}function isObject(value){return value!==null&&typeof value=="object"}const BoxSymbol=Symbol("box"),isWritableSymbol=Symbol( "is-writable");function isBox(value){return isObject(value)&&BoxSymbol in value}function isWritableBox(value){return box.isBox(value)&&isWritableSymbol in value}function box(initialValue){let current2=state$1(proxy(initialValue));return{[BoxSymbol]:!0,[isWritableSymbol]:!0,get current(){return get$4(current2)},set current(v){set$1(current2,v,!0)}}}function boxWith(getter,setter){const derived2=user_derived(getter);return setter?{[BoxSymbol]:!0,[isWritableSymbol]:!0,get current(){return get$4(derived2)}, set current(v){setter(v)}}:{[BoxSymbol]:!0,get current(){return getter()}}}function boxFrom(value){return box.isBox(value)?value:isFunction(value)?box.with(value):box(value)}function boxFlatten(boxes){return Object.entries(boxes).reduce((acc,[key2,b])=>box.isBox(b)?(box.isWritableBox(b)?Object.defineProperty(acc,key2,{get(){return b.current},set(v){b.current=v}}):Object.defineProperty(acc,key2,{get(){return b.current}}),acc):Object.assign(acc,{[key2]:b}),{})}function toReadonlyBox(b){return box. isWritableBox(b)?{[BoxSymbol]:!0,get current(){return b.current}}:b}box.from=boxFrom;box.with=boxWith;box.flatten=boxFlatten;box.readonly=toReadonlyBox;box.isBox=isBox;box.isWritableBox=isWritableBox;function createParser(matcher,replacer){const regex=RegExp(matcher,"g");return str=>{if(typeof str!="string")throw new TypeError(`expected an argument of type string, but got ${typeof str}`);return str.match(regex)?str.replace(regex,replacer):str}}const camelToKebab=createParser(/[A-Z]/,match=>`-${match. toLowerCase()}`);function styleToCSS(styleObj){if(!styleObj||typeof styleObj!="object"||Array.isArray(styleObj))throw new TypeError(`expected an argument of type object, but got ${typeof styleObj}`);return Object.keys(styleObj).map(property=>`${camelToKebab(property)}: ${styleObj[property]};`).join(` `)}function styleToString(style2={}){return styleToCSS(style2).replace(` `," ")}const srOnlyStyles={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"};styleToString(srOnlyStyles);const defaultWindow=typeof window<"u"?window:void 0;function getActiveElement(document2){let activeElement=document2.activeElement;for(;activeElement?.shadowRoot;){const node2=activeElement.shadowRoot.activeElement;if(node2===activeElement)break;activeElement=node2} return activeElement}class ActiveElement4{#document;#subscribe;constructor(options={}){const{window:window2=defaultWindow,document:document2=window2?.document}=options;window2!==void 0&&(this.#document=document2,this.#subscribe=createSubscriber(update2=>{const cleanupFocusIn=on(window2,"focusin",update2),cleanupFocusOut=on(window2,"focusout",update2);return()=>{cleanupFocusIn(),cleanupFocusOut()}}))}get current(){return this.#subscribe?.(),this.#document?getActiveElement(this.#document):null}}new ActiveElement4; const modeStorageKey=box("mode-watcher-mode"),themeStorageKey=box("mode-watcher-theme"),modes=["dark","light","system"];function isValidMode(value){return typeof value!="string"?!1:modes.includes(value)}class UserPrefersMode{#defaultValue="system";#storage=isBrowser?localStorage:noopStorage;#initialValue=this.#storage.getItem(modeStorageKey.current);#value=isValidMode(this.#initialValue)?this.#initialValue:this.#defaultValue;#persisted=state$1(proxy(this.#makePersisted()));#makePersisted(value=this.#value){ return new PersistedState(modeStorageKey.current,value,{serializer:{serialize:v=>v,deserialize:v=>isValidMode(v)?v:this.#defaultValue}})}constructor(){effect_root(()=>watch.pre(()=>modeStorageKey.current,(_,prevStorageKey)=>{const currModeValue=get$4(this.#persisted).current;set$1(this.#persisted,this.#makePersisted(currModeValue),!0),prevStorageKey&&localStorage.removeItem(prevStorageKey)}))}get current(){return get$4(this.#persisted).current}set current(newValue){get$4(this.#persisted).current= newValue}}class SystemPrefersMode{#defaultValue=void 0;#track=!0;#current=state$1(proxy(this.#defaultValue));#mediaQueryState=typeof window<"u"&&typeof window.matchMedia=="function"?new MediaQuery("prefers-color-scheme: light"):{current:!1};query(){isBrowser&&set$1(this.#current,this.#mediaQueryState.current?"light":"dark",!0)}tracking(active){this.#track=active}constructor(){effect_root(()=>{user_pre_effect(()=>{this.#track&&this.query()})}),this.query=this.query.bind(this),this.tracking=this.tracking. bind(this)}get current(){return get$4(this.#current)}}const userPrefersMode=new UserPrefersMode,systemPrefersMode=new SystemPrefersMode;class CustomTheme{#storage=isBrowser?localStorage:noopStorage;#initialValue=this.#storage.getItem(themeStorageKey.current);#value=this.#initialValue===null||this.#initialValue===void 0?"":this.#initialValue;#persisted=state$1(proxy(this.#makePersisted()));#makePersisted(value=this.#value){return new PersistedState(themeStorageKey.current,value,{serializer:{serialize:v=>typeof v!= "string"?"":v,deserialize:v=>v}})}constructor(){effect_root(()=>watch.pre(()=>themeStorageKey.current,(_,prevStorageKey)=>{const currModeValue=get$4(this.#persisted).current;set$1(this.#persisted,this.#makePersisted(currModeValue),!0),prevStorageKey&&localStorage.removeItem(prevStorageKey)}))}get current(){return get$4(this.#persisted).current}set current(newValue){get$4(this.#persisted).current=newValue}}const customTheme=new CustomTheme;let timeoutAction,timeoutEnable,hasLoaded=!1,styleElement=null; function getStyleElement(){return styleElement||(styleElement=document.createElement("style"),styleElement.appendChild(document.createTextNode(`* { -webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; -ms-transition: none !important; transition: none !important; }`)),styleElement)}function withoutTransition(action2,synchronous=!1){if(typeof document>"u")return;if(!hasLoaded){hasLoaded=!0,action2();return}if(typeof window<"u"&&window.__vitest_worker__){action2();return}clearTimeout(timeoutAction),clearTimeout(timeoutEnable);const style2=getStyleElement(),disable2=()=>document.head.appendChild(style2),enable=()=>{style2.parentNode&&document.head.removeChild(style2)};function executeAction(){action2(),window.requestAnimationFrame(enable)}if(typeof window. requestAnimationFrame<"u"){disable2(),synchronous?executeAction():window.requestAnimationFrame(()=>{executeAction()});return}disable2(),timeoutAction=window.setTimeout(()=>{action2(),timeoutEnable=window.setTimeout(enable,16)},16)}const themeColors=box(void 0),disableTransitions=box(!0),synchronousModeChanges=box(!1),darkClassNames=box([]),lightClassNames=box([]);function createDerivedMode(){const current2=user_derived(()=>{if(!isBrowser)return;const derivedMode2=userPrefersMode.current==="syste\ m"?systemPrefersMode.current:userPrefersMode.current,sanitizedDarkClassNames=sanitizeClassNames(darkClassNames.current),sanitizedLightClassNames=sanitizeClassNames(lightClassNames.current);function update2(){const htmlEl=document.documentElement,themeColorEl=document.querySelector('meta[name="theme-color"]');derivedMode2==="light"?(sanitizedDarkClassNames.length&&htmlEl.classList.remove(...sanitizedDarkClassNames),sanitizedLightClassNames.length&&htmlEl.classList.add(...sanitizedLightClassNames), htmlEl.style.colorScheme="light",themeColorEl&&themeColors.current&&themeColorEl.setAttribute("content",themeColors.current.light)):(sanitizedLightClassNames.length&&htmlEl.classList.remove(...sanitizedLightClassNames),sanitizedDarkClassNames.length&&htmlEl.classList.add(...sanitizedDarkClassNames),htmlEl.style.colorScheme="dark",themeColorEl&&themeColors.current&&themeColorEl.setAttribute("content",themeColors.current.dark))}return disableTransitions.current?withoutTransition(update2,synchronousModeChanges. current):update2(),derivedMode2});return{get current(){return get$4(current2)}}}function createDerivedTheme(){const current2=user_derived(()=>{if(customTheme.current,!isBrowser)return;function update2(){document.documentElement.setAttribute("data-theme",customTheme.current)}return disableTransitions.current?withoutTransition(update2,untrack$1(()=>synchronousModeChanges.current)):update2(),customTheme.current});return{get current(){return get$4(current2)}}}const derivedMode=createDerivedMode(),derivedTheme=createDerivedTheme(); function setMode(mode){userPrefersMode.current=mode}function setTheme(newTheme){customTheme.current=newTheme}function setInitialMode({defaultMode="system",themeColors:themeColors2,darkClassNames:darkClassNames2=["dark"],lightClassNames:lightClassNames2=[],defaultTheme="",modeStorageKey:modeStorageKey2="mode-watcher-mode",themeStorageKey:themeStorageKey2="mode-watcher-theme"}){const rootEl=document.documentElement,mode=localStorage.getItem(modeStorageKey2)??defaultMode,theme=localStorage.getItem(themeStorageKey2)??defaultTheme,light=mode==="light"||mode==="system"&&window.matchMedia("(prefers-color-sche\ me: light)").matches;if(light?(darkClassNames2.length&&rootEl.classList.remove(...darkClassNames2.filter(Boolean)),lightClassNames2.length&&rootEl.classList.add(...lightClassNames2.filter(Boolean))):(lightClassNames2.length&&rootEl.classList.remove(...lightClassNames2.filter(Boolean)),darkClassNames2.length&&rootEl.classList.add(...darkClassNames2.filter(Boolean))),rootEl.style.colorScheme=light?"light":"dark",themeColors2){const themeMetaEl=document.querySelector('meta[name="theme-color"]');themeMetaEl&& themeMetaEl.setAttribute("content",mode==="light"?themeColors2.light:themeColors2.dark)}theme&&(rootEl.setAttribute("data-theme",theme),localStorage.setItem(themeStorageKey2,theme)),localStorage.setItem(modeStorageKey2,mode)}var root_1$Y=from_html('');function Mode_watcher_lite($$anchor,$$props){push$1($$props,!0);var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var meta=root_1$Y();template_effect(()=>set_attribute(meta,"content",$$props. themeColors.dark)),append($$anchor2,meta)};if_block(node2,$$render=>{$$props.themeColors&&$$render(consequent)})}append($$anchor,fragment),pop()}var root_2$13=from_html(''),root_1$X=from_html(" ",1);function Mode_watcher_full($$anchor,$$props){push$1($$props,!0);let trueNonce=prop($$props,"trueNonce",3,"");head$1("1funsus",$$anchor2=>{var fragment=root_1$X(),node2=first_child(fragment);{var consequent=$$anchor3=>{var meta=root_2$13();template_effect(()=>set_attribute( meta,"content",$$props.themeColors.dark)),append($$anchor3,meta)};if_block(node2,$$render=>{$$props.themeColors&&$$render(consequent)})}var node_1=sibling(node2,2);html$6(node_1,()=>`(`+setInitialMode.toString()+")("+JSON.stringify($$props.initConfig)+");<\/script>"),append($$anchor2,fragment)}),pop()}function Mode_watcher($$anchor,$$props){push$1($$props,!0);let track2=prop($$props,"track",3,!0),defaultMode=prop($$props,"defaultMode",3,"system"), disableTransitionsProp=prop($$props,"disableTransitions",3,!0),darkClassNamesProp=prop($$props,"darkClassNames",19,()=>["dark"]),lightClassNamesProp=prop($$props,"lightClassNames",19,()=>[]),defaultTheme=prop($$props,"defaultTheme",3,""),nonce=prop($$props,"nonce",3,""),themeStorageKeyProp=prop($$props,"themeStorageKey",3,"mode-watcher-theme"),modeStorageKeyProp=prop($$props,"modeStorageKey",3,"mode-watcher-mode"),disableHeadScriptInjection=prop($$props,"disableHeadScriptInjection",3,!1),synchronousModeChangesProp=prop( $$props,"synchronousModeChanges",3,!1);modeStorageKey.current=modeStorageKeyProp(),themeStorageKey.current=themeStorageKeyProp(),darkClassNames.current=darkClassNamesProp(),lightClassNames.current=lightClassNamesProp(),disableTransitions.current=disableTransitionsProp(),themeColors.current=$$props.themeColors,synchronousModeChanges.current=synchronousModeChangesProp(),user_pre_effect(()=>{synchronousModeChanges.current=synchronousModeChangesProp()}),user_pre_effect(()=>{disableTransitions.current= disableTransitionsProp()}),user_pre_effect(()=>{themeColors.current=$$props.themeColors}),user_pre_effect(()=>{darkClassNames.current=darkClassNamesProp()}),user_pre_effect(()=>{lightClassNames.current=lightClassNamesProp()}),user_pre_effect(()=>{modeStorageKey.current=modeStorageKeyProp()}),user_pre_effect(()=>{themeStorageKey.current=themeStorageKeyProp()}),user_pre_effect(()=>{derivedMode.current,modeStorageKey.current,themeStorageKey.current,derivedTheme.current}),onMount$1(()=>{systemPrefersMode. tracking(track2()),systemPrefersMode.query();const localStorageMode=localStorage.getItem(modeStorageKey.current);setMode(isValidMode(localStorageMode)?localStorageMode:defaultMode());const localStorageTheme=localStorage.getItem(themeStorageKey.current);setTheme(localStorageTheme||defaultTheme())});const initConfig={defaultMode:defaultMode(),themeColors:$$props.themeColors,darkClassNames:darkClassNamesProp(),lightClassNames:lightClassNamesProp(),defaultTheme:defaultTheme(),modeStorageKey:modeStorageKeyProp(), themeStorageKey:themeStorageKeyProp()},trueNonce=user_derived(()=>typeof window>"u"?nonce():"");var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{Mode_watcher_lite($$anchor2,{get themeColors(){return themeColors.current}})},alternate=$$anchor2=>{Mode_watcher_full($$anchor2,{get trueNonce(){return get$4(trueNonce)},get initConfig(){return initConfig},get themeColors(){return themeColors.current}})};if_block(node2,$$render=>{disableHeadScriptInjection()?$$render(consequent): $$render(alternate,!1)})}append($$anchor,fragment),pop()}class MCPStore{#_isInitializing=state$1(!1);get _isInitializing(){return get$4(this.#_isInitializing)}set _isInitializing(value){set$1(this.#_isInitializing,value,!0)}#_error=state$1(null);get _error(){return get$4(this.#_error)}set _error(value){set$1(this.#_error,value,!0)}#_toolCount=state$1(0);get _toolCount(){return get$4(this.#_toolCount)}set _toolCount(value){set$1(this.#_toolCount,value,!0)}#_connectedServers=state$1(proxy([]));get _connectedServers(){ return get$4(this.#_connectedServers)}set _connectedServers(value){set$1(this.#_connectedServers,value,!0)}#_healthChecks=state$1(proxy({}));get _healthChecks(){return get$4(this.#_healthChecks)}set _healthChecks(value){set$1(this.#_healthChecks,value,!0)}#_proxyAvailable=state$1(!1);get _proxyAvailable(){return get$4(this.#_proxyAvailable)}set _proxyAvailable(value){set$1(this.#_proxyAvailable,value,!0)}connections=new Map;toolsIndex=new Map;serverConfigs=new Map;reconnectingServers=new Set;configSignature=null;initPromise=null;activeFlowCount=0;constructor(){ this.probeProxy()}async probeProxy(){try{const response=await fetch(`${base}${CORS_PROXY_ENDPOINT}`,{method:"HEAD"});this._proxyAvailable=response.status!==404}catch{this._proxyAvailable=!1}}get isProxyAvailable(){return this._proxyAvailable}#generateServerId(id2,index2){return typeof id2=="string"&&id2.trim()?id2.trim():`${MCP_SERVER_ID_PREFIX}-${index2+1}`}#parseServerSettings(rawServers){if(!rawServers)return[];let parsed;if(typeof rawServers=="string"){const trimmed=rawServers.trim();if(!trimmed) return[];try{parsed=JSON.parse(trimmed)}catch(error2){return console.warn("[MCP] Failed to parse mcpServers JSON:",error2),[]}}else parsed=rawServers;return Array.isArray(parsed)?parsed.map((entry,index2)=>{const url2=typeof entry?.url=="string"?entry.url.trim():"",headers=typeof entry?.headers=="string"?entry.headers.trim():void 0;return{id:this.#generateServerId(entry?.id,index2),enabled:!!entry?.enabled,url:url2,name:entry?.name,requestTimeoutSeconds:DEFAULT_MCP_CONFIG.requestTimeoutSeconds,headers:headers|| void 0,useProxy:!!entry?.useProxy}}):[]}#buildServerConfig(entry,connectionTimeoutMs=DEFAULT_MCP_CONFIG.connectionTimeoutMs){if(!entry?.url)return;let headers;if(entry.headers)try{const parsed=JSON.parse(entry.headers);typeof parsed=="object"&&parsed!==null&&!Array.isArray(parsed)&&(headers=parsed)}catch{console.warn("[MCP] Failed to parse custom headers JSON:",entry.headers)}return{url:entry.url,transport:detectMcpTransportFromUrl(entry.url),handshakeTimeoutMs:connectionTimeoutMs,requestTimeoutMs:Math. round(entry.requestTimeoutSeconds*1e3),headers,useProxy:entry.useProxy}}#checkServerEnabled(server,perChatOverrides){return perChatOverrides?.find(o=>o.serverId===server.id)?.enabled??!1}#buildMcpClientConfig(cfg,perChatOverrides){const rawServers=this.#parseServerSettings(cfg.mcpServers);if(!rawServers.length)return;const servers={};for(const[index2,entry]of rawServers.entries()){if(!this.#checkServerEnabled(entry,perChatOverrides))continue;const normalized=this.#buildServerConfig(entry);normalized&& (servers[this.#generateServerId(entry.id,index2)]=normalized)}if(Object.keys(servers).length!==0)return{protocolVersion:DEFAULT_MCP_CONFIG.protocolVersion,capabilities:DEFAULT_MCP_CONFIG.capabilities,clientInfo:DEFAULT_MCP_CONFIG.clientInfo,requestTimeoutMs:Math.round(DEFAULT_MCP_CONFIG.requestTimeoutSeconds*1e3),servers}}#buildCapabilitiesInfo(serverCaps,clientCaps){return{server:{tools:serverCaps?.tools?{listChanged:serverCaps.tools.listChanged}:void 0,prompts:serverCaps?.prompts?{listChanged:serverCaps. prompts.listChanged}:void 0,resources:serverCaps?.resources?{subscribe:serverCaps.resources.subscribe,listChanged:serverCaps.resources.listChanged}:void 0,logging:!!serverCaps?.logging,completions:!!serverCaps?.completions,tasks:!!serverCaps?.tasks},client:{roots:clientCaps?.roots?{listChanged:clientCaps.roots.listChanged}:void 0,sampling:!!clientCaps?.sampling,elicitation:clientCaps?.elicitation?{form:!!clientCaps.elicitation.form,url:!!clientCaps.elicitation.url}:void 0,tasks:!!clientCaps?.tasks}}}get isInitializing(){ return this._isInitializing}get isInitialized(){return this.connections.size>0}get error(){return this._error}get toolCount(){return this._toolCount}get connectedServerCount(){return this._connectedServers.length}get connectedServerNames(){return this._connectedServers}get isEnabled(){const mcpConfig=this.#buildMcpClientConfig(config$1());return mcpConfig!=null&&Object.keys(mcpConfig.servers).length>0}get availableTools(){return Array.from(this.toolsIndex.keys())}updateState(state2){state2.isInitializing!== void 0&&(this._isInitializing=state2.isInitializing),state2.error!==void 0&&(this._error=state2.error),state2.toolCount!==void 0&&(this._toolCount=state2.toolCount),state2.connectedServers!==void 0&&(this._connectedServers=state2.connectedServers)}updateHealthCheck(serverId,state2){this._healthChecks={...this._healthChecks,[serverId]:state2}}getHealthCheckState(serverId){return this._healthChecks[serverId]??{status:HealthCheckStatus.IDLE}}hasHealthCheck(serverId){return serverId in this._healthChecks&& this._healthChecks[serverId].status!==HealthCheckStatus.IDLE}clearHealthCheck(serverId){const{[serverId]:_removed,...rest}=this._healthChecks;this._healthChecks=rest}clearAllHealthChecks(){this._healthChecks={}}clearError(){this._error=null}getServers(){return parseMcpServerSettings(config$1().mcpServers)}getConnections(){return this.connections}getServerLabel(server){const healthState=this.getHealthCheckState(server.id);return healthState?.status===HealthCheckStatus.SUCCESS&&(healthState.serverInfo?. title||healthState.serverInfo?.name||server.name)||server.url}getServerById(serverId){return this.getServers().find(s2=>s2.id===serverId)}getServerDisplayName(serverId){const server=this.getServerById(serverId);return server?this.getServerLabel(server):serverId}#isValidIconUri(src){try{return src.startsWith(UrlProtocol.DATA)?!0:new URL(src).protocol===UrlProtocol.HTTPS}catch{return!1}}#getMcpIconUrl(icons,isDark=!1){if(!icons?.length)return null;const validIcons=icons.filter(icon=>!(!icon.src||!this.#isValidIconUri( icon.src)||icon.mimeType&&!MCP_ALLOWED_ICON_MIME_TYPES.has(icon.mimeType)));if(validIcons.length===0)return null;const preferredTheme=isDark?ColorMode.DARK:ColorMode.LIGHT,themedIcon=validIcons.find(icon=>icon.theme===preferredTheme);if(themedIcon)return this.#proxyIconSrc(themedIcon.src);const universalIcons=validIcons.filter(icon=>!icon.theme);return universalIcons.length===EXPECTED_THEMED_ICON_PAIR_COUNT?this.#proxyIconSrc(universalIcons[isDark?1:0].src):universalIcons.length>0?this.#proxyIconSrc( universalIcons[0].src):this.#proxyIconSrc(validIcons[0].src)}#proxyIconSrc(src){return src.startsWith("data:")||!this._proxyAvailable?src:getProxiedUrlString(src)}getServerFavicon(serverId){const server=this.getServerById(serverId);if(!server)return null;const isDark=derivedMode.current===ColorMode.DARK,healthState=this.getHealthCheckState(serverId);if(healthState.status===HealthCheckStatus.SUCCESS&&healthState.serverInfo?.icons){const mcpIconUrl=this.#getMcpIconUrl(healthState.serverInfo.icons, isDark);if(mcpIconUrl)return mcpIconUrl}return getFaviconUrl(server.url,this._proxyAvailable)}isAnyServerLoading(){return this.getServers().some(s2=>{const state2=this.getHealthCheckState(s2.id);return state2.status===HealthCheckStatus.IDLE||state2.status===HealthCheckStatus.CONNECTING})}getServersSorted(){const servers=this.getServers();return this.isAnyServerLoading()?servers:[...servers].sort((a,b)=>this.getServerLabel(a).localeCompare(this.getServerLabel(b)))}addServer(serverData){const servers=this. getServers(),newServer={id:serverData.id||(uuid$1()??`server-${Date.now()}`),enabled:serverData.enabled,url:serverData.url.trim(),name:serverData.name,headers:serverData.headers?.trim()||void 0,requestTimeoutSeconds:DEFAULT_MCP_CONFIG.requestTimeoutSeconds,useProxy:serverData.useProxy};settingsStore.updateConfig("mcpServers",JSON.stringify([...servers,newServer]))}updateServer(id2,updates){const servers=this.getServers();settingsStore.updateConfig("mcpServers",JSON.stringify(servers.map(server=>server. id===id2?{...server,...updates}:server)))}removeServer(id2){const servers=this.getServers();settingsStore.updateConfig("mcpServers",JSON.stringify(servers.filter(s2=>s2.id!==id2))),this.clearHealthCheck(id2)}hasAvailableServers(){return parseMcpServerSettings(config$1().mcpServers).some(s2=>s2.enabled&&s2.url.trim())}hasEnabledServers(perChatOverrides){return!!this.#buildMcpClientConfig(config$1(),perChatOverrides)}getEnabledServersForConversation(perChatOverrides){return this.getServers().filter( server=>this.#checkServerEnabled(server,perChatOverrides))}async ensureInitialized(perChatOverrides){const mcpConfig=this.#buildMcpClientConfig(config$1(),perChatOverrides),signature=mcpConfig?JSON.stringify(mcpConfig):null;return signature?this.isInitialized&&this.configSignature===signature?!0:this.initPromise&&this.configSignature===signature?this.initPromise:((this.connections.size>0||this.initPromise)&&await this.shutdown(),this.initialize(signature,mcpConfig)):(await this.shutdown(),!1)}async initialize(signature,mcpConfig){ this.updateState({isInitializing:!0,error:null}),this.configSignature=signature;const serverEntries=Object.entries(mcpConfig.servers);return serverEntries.length===0?(this.updateState({isInitializing:!1,toolCount:0,connectedServers:[]}),!1):(this.initPromise=this.doInitialize(signature,mcpConfig,serverEntries),this.initPromise)}async doInitialize(signature,mcpConfig,serverEntries){const clientInfo=mcpConfig.clientInfo??DEFAULT_MCP_CONFIG.clientInfo,capabilities=mcpConfig.capabilities??DEFAULT_MCP_CONFIG. capabilities,results=await Promise.allSettled(serverEntries.map(async([name,serverConfig])=>{this.serverConfigs.set(name,serverConfig);const listChangedHandlers=this.createListChangedHandlers(name),connection=await MCPService.connect(name,serverConfig,clientInfo,capabilities,phase=>{phase===MCPConnectionPhase.DISCONNECTED&&(console.log(`[MCPStore][${name}] Connection lost, starting auto-reconnect`),this.autoReconnect(name))},listChangedHandlers);return{name,connection}}));if(this.configSignature!== signature){for(const result of results)result.status==="fulfilled"&&await MCPService.disconnect(result.value.connection).catch(console.warn);return!1}for(const result of results)if(result.status==="fulfilled"){const{name,connection}=result.value;this.connections.set(name,connection);for(const tool of connection.tools)this.toolsIndex.has(tool.name)&&console.warn(`[MCPStore] Tool name conflict: "${tool.name}" exists in "${this.toolsIndex.get(tool.name)}" and "${name}". Using tool from "${name}".`), this.toolsIndex.set(tool.name,name)}else console.error("[MCPStore] Failed to connect:",result.reason);return this.connections.size===0&&serverEntries.length>0?(this.updateState({isInitializing:!1,error:"All MCP server connections failed",toolCount:0,connectedServers:[]}),this.initPromise=null,!1):(this.updateState({isInitializing:!1,error:null,toolCount:this.toolsIndex.size,connectedServers:Array.from(this.connections.keys())}),this.initPromise=null,!0)}createListChangedHandlers(serverName){return{ tools:{onChanged:(error2,tools)=>{if(error2){console.warn(`[MCPStore][${serverName}] Tools list changed error:`,error2);return}this.handleToolsListChanged(serverName,tools??[])}},prompts:{onChanged:error2=>{if(error2){console.warn(`[MCPStore][${serverName}] Prompts list changed error:`,error2);return}}}}}handleToolsListChanged(serverName,tools){const connection=this.connections.get(serverName);if(connection){for(const[toolName,ownerServer]of this.toolsIndex.entries())ownerServer===serverName&&this. toolsIndex.delete(toolName);connection.tools=tools;for(const tool of tools)this.toolsIndex.has(tool.name)&&console.warn(`[MCPStore] Tool name conflict after list change: "${tool.name}" exists in "${this.toolsIndex.get(tool.name)}" and "${serverName}". Using tool from "${serverName}".`),this.toolsIndex.set(tool.name,serverName);this.updateState({toolCount:this.toolsIndex.size})}}acquireConnection(){this.activeFlowCount++}async releaseConnection(shutdownIfUnused=!1){this.activeFlowCount=Math.max(0, this.activeFlowCount-1),shutdownIfUnused&&this.activeFlowCount===0&&await this.shutdown()}getActiveFlowCount(){return this.activeFlowCount}async shutdown(){this.initPromise&&(await this.initPromise.catch(()=>{}),this.initPromise=null),this.connections.size!==0&&(await Promise.all(Array.from(this.connections.values()).map(conn=>MCPService.disconnect(conn).catch(error2=>console.warn(`[MCPStore] Error disconnecting ${conn.serverName}:`,error2)))),this.connections.clear(),this.toolsIndex.clear(),this. serverConfigs.clear(),this.configSignature=null,this.updateState({isInitializing:!1,error:null,toolCount:0,connectedServers:[]}))}async reconnectServer(serverName){const serverConfig=this.serverConfigs.get(serverName);if(!serverConfig)throw new Error(`[MCPStore] No config found for ${serverName}, cannot reconnect`);const oldConnection=this.connections.get(serverName);oldConnection&&(await MCPService.disconnect(oldConnection).catch(console.warn),this.connections.delete(serverName)),console.log(`[\ MCPStore][${serverName}] Session expired, reconnecting with fresh session...`);const listChangedHandlers=this.createListChangedHandlers(serverName),connection=await MCPService.connect(serverName,serverConfig,DEFAULT_MCP_CONFIG.clientInfo,DEFAULT_MCP_CONFIG.capabilities,phase=>{phase===MCPConnectionPhase.DISCONNECTED&&(console.log(`[MCPStore][${serverName}] Connection lost, starting auto-reconnect`),this.autoReconnect(serverName))},listChangedHandlers);this.connections.set(serverName,connection); for(const tool of connection.tools)this.toolsIndex.set(tool.name,serverName);console.log(`[MCPStore][${serverName}] Session recovered successfully`)}async autoReconnect(serverName){if(this.reconnectingServers.has(serverName)){console.log(`[MCPStore][${serverName}] Reconnection already in progress, skipping`);return}const serverConfig=this.serverConfigs.get(serverName);if(!serverConfig){console.error(`[MCPStore] No config found for ${serverName}, cannot reconnect`);return}this.reconnectingServers. add(serverName);let backoff=MCP_RECONNECT_INITIAL_DELAY,needsReconnect=!1;try{for(;;){await new Promise(resolve2=>setTimeout(resolve2,backoff)),console.log(`[MCPStore][${serverName}] Auto-reconnecting...`);try{const timeoutPromise=new Promise((_,reject)=>setTimeout(()=>reject(new Error(`Reconnect attempt timed out after ${MCP_RECONNECT_ATTEMPT_TIMEOUT_MS}ms`)),MCP_RECONNECT_ATTEMPT_TIMEOUT_MS));needsReconnect=!1;const listChangedHandlers=this.createListChangedHandlers(serverName),connectPromise=MCPService. connect(serverName,serverConfig,DEFAULT_MCP_CONFIG.clientInfo,DEFAULT_MCP_CONFIG.capabilities,phase=>{phase===MCPConnectionPhase.DISCONNECTED&&(this.reconnectingServers.has(serverName)?needsReconnect=!0:(console.log(`[MCPStore][${serverName}] Connection lost, restarting auto-reconnect`),this.autoReconnect(serverName)))},listChangedHandlers),connection=await Promise.race([connectPromise,timeoutPromise]);this.connections.set(serverName,connection);for(const tool of connection.tools)this.toolsIndex. set(tool.name,serverName);console.log(`[MCPStore][${serverName}] Reconnected successfully`);break}catch(error2){console.warn(`[MCPStore][${serverName}] Reconnection failed:`,error2),backoff=Math.min(backoff*MCP_RECONNECT_BACKOFF_MULTIPLIER,MCP_RECONNECT_MAX_DELAY)}}}finally{this.reconnectingServers.delete(serverName),needsReconnect&&(console.log(`[MCPStore][${serverName}] Deferred disconnect detected, restarting auto-reconnect`),this.autoReconnect(serverName))}}getToolDefinitionsForLLM(){const tools=[]; for(const connection of this.connections.values())for(const tool of connection.tools){const rawSchema=tool.inputSchema??{type:JsonSchemaType.OBJECT,properties:{},required:[]};tools.push({type:ToolCallType.FUNCTION,function:{name:tool.name,description:tool.description,parameters:this.normalizeSchemaProperties(rawSchema)}})}return tools}normalizeSchemaProperties(schema){if(!schema||typeof schema!="object")return schema;const normalized={...schema};if(normalized.properties&&typeof normalized.properties== "object"){const props=normalized.properties,normalizedProps={};for(const[key2,prop2]of Object.entries(props)){if(!prop2||typeof prop2!="object"){normalizedProps[key2]=prop2;continue}const normalizedProp={...prop2};if(!normalizedProp.type&&normalizedProp.default!==void 0){const defaultVal=normalizedProp.default;typeof defaultVal=="string"?normalizedProp.type="string":typeof defaultVal=="number"?normalizedProp.type=Number.isInteger(defaultVal)?"integer":"number":typeof defaultVal=="boolean"?normalizedProp. type="boolean":Array.isArray(defaultVal)?normalizedProp.type="array":typeof defaultVal=="object"&&defaultVal!==null&&(normalizedProp.type="object")}normalizedProp.properties&&Object.assign(normalizedProp,this.normalizeSchemaProperties(normalizedProp)),normalizedProp.items&&typeof normalizedProp.items=="object"&&(normalizedProp.items=this.normalizeSchemaProperties(normalizedProp.items)),normalizedProps[key2]=normalizedProp}normalized.properties=normalizedProps}return normalized}getToolNames(){return Array. from(this.toolsIndex.keys())}hasTool(toolName){return this.toolsIndex.has(toolName)}getToolServer(toolName){return this.toolsIndex.get(toolName)}hasPromptsSupport(){for(const connection of this.connections.values())if(connection.serverCapabilities?.prompts)return!0;return!1}hasPromptsCapability(perChatOverrides){if(perChatOverrides!==void 0){const enabledServerIds=new Set(perChatOverrides.filter(o=>o.enabled).map(o=>o.serverId));if(enabledServerIds.size===0)return!1;for(const[serverId,state2]of Object. entries(this._healthChecks))if(enabledServerIds.has(serverId)&&state2.status===HealthCheckStatus.SUCCESS&&state2.capabilities?.server?.prompts!==void 0)return!0;for(const[serverName,connection]of this.connections)if(enabledServerIds.has(serverName)&&connection.serverCapabilities?.prompts)return!0;return!1}for(const state2 of Object.values(this._healthChecks))if(state2.status===HealthCheckStatus.SUCCESS&&state2.capabilities?.server?.prompts!==void 0)return!0;for(const connection of this.connections. values())if(connection.serverCapabilities?.prompts)return!0;return!1}async getAllPrompts(){const results=[];for(const[serverName,connection]of this.connections){if(!connection.serverCapabilities?.prompts)continue;const prompts=await MCPService.listPrompts(connection);for(const prompt of prompts)results.push({name:prompt.name,description:prompt.description,title:prompt.title,serverName,arguments:prompt.arguments?.map(arg=>({name:arg.name,description:arg.description,required:arg.required}))})}return results}async getPrompt(serverName,promptName,args){ const connection=this.connections.get(serverName);if(!connection)throw new Error(`Server "${serverName}" not found for prompt "${promptName}"`);return MCPService.getPrompt(connection,promptName,args)}async executeTool(toolCall,signal){const toolName=toolCall.function.name,serverName=this.toolsIndex.get(toolName);if(!serverName)throw new Error(`Unknown tool: ${toolName}`);const connection=this.connections.get(serverName);if(!connection)throw new Error(`Server "${serverName}" is not connected`);const args=this. parseToolArguments(toolCall.function.arguments);try{return await MCPService.callTool(connection,{name:toolName,arguments:args},signal)}catch(error2){if(MCPService.isSessionExpiredError(error2)){await this.reconnectServer(serverName);const newConnection=this.connections.get(serverName);if(!newConnection)throw new Error(`Failed to reconnect to "${serverName}"`);return MCPService.callTool(newConnection,{name:toolName,arguments:args},signal)}throw error2}}async executeToolByName(toolName,args,signal){ const serverName=this.toolsIndex.get(toolName);if(!serverName)throw new Error(`Unknown tool: ${toolName}`);const connection=this.connections.get(serverName);if(!connection)throw new Error(`Server "${serverName}" is not connected`);try{return await MCPService.callTool(connection,{name:toolName,arguments:args},signal)}catch(error2){if(MCPService.isSessionExpiredError(error2)){await this.reconnectServer(serverName);const newConnection=this.connections.get(serverName);if(!newConnection)throw new Error( `Failed to reconnect to "${serverName}"`);return MCPService.callTool(newConnection,{name:toolName,arguments:args},signal)}throw error2}}parseToolArguments(args){if(typeof args=="string"){const trimmed=args.trim();if(trimmed==="")return{};try{const parsed=JSON.parse(trimmed);if(typeof parsed!="object"||parsed===null||Array.isArray(parsed))throw new Error(`Tool arguments must be an object, got ${Array.isArray(parsed)?"array":typeof parsed}`);return parsed}catch(error2){throw new Error(`Failed to p\ arse tool arguments as JSON: ${error2.message}`)}}if(typeof args=="object"&&args!==null&&!Array.isArray(args))return args;throw new Error(`Invalid tool arguments type: ${typeof args}`)}async getPromptCompletions(serverName,promptName,argumentName,argumentValue){const connection=this.connections.get(serverName);return connection?connection.serverCapabilities?.completions?MCPService.complete(connection,{type:MCPRefType.PROMPT,name:promptName},{name:argumentName,value:argumentValue}):null:(console. warn(`[MCPStore] Server "${serverName}" is not connected`),null)}async getResourceCompletions(serverName,uriTemplate,argumentName,argumentValue){const connection=this.connections.get(serverName);return connection?connection.serverCapabilities?.completions?MCPService.complete(connection,{type:MCPRefType.RESOURCE,uri:uriTemplate},{name:argumentName,value:argumentValue}):null:(console.warn(`[MCPStore] Server "${serverName}" is not connected`),null)}async readResourceByUri(serverName,uri2){const connection=this. connections.get(serverName);if(!connection)return console.error(`[MCPStore] No connection found for server: ${serverName}`),null;try{return(await MCPService.readResource(connection,uri2)).contents}catch(error2){return console.error(`[MCPStore] Failed to read resource ${uri2}:`,error2),null}}parseHeaders(headersJson){if(headersJson?.trim())try{const parsed=JSON.parse(headersJson);if(typeof parsed=="object"&&parsed!==null&&!Array.isArray(parsed))return parsed}catch{console.warn("[MCPStore] Failed \ to parse custom headers JSON:",headersJson)}}async runHealthChecksForServers(servers,skipIfChecked=!0,promoteToActive=!1){const serversToCheck=skipIfChecked?servers.filter(s2=>!this.hasHealthCheck(s2.id)&&s2.url.trim()):servers.filter(s2=>s2.url.trim());if(serversToCheck.length===0)return;const BATCH_SIZE=5;for(let i=0;ithis.runHealthCheck(server,promoteToActive)))}}getExistingConnection(serverId){ return this.connections.get(serverId)}async runHealthCheck(server,promoteToActive=!1){const existingConnection=this.connections.get(server.id);if(existingConnection)try{const tools=await MCPService.listTools(existingConnection),capabilities=this.#buildCapabilitiesInfo(existingConnection.serverCapabilities,existingConnection.clientCapabilities);this.updateHealthCheck(server.id,{status:HealthCheckStatus.SUCCESS,tools:tools.map(tool=>({name:tool.name,description:tool.description,title:tool.title})), serverInfo:existingConnection.serverInfo,capabilities,transportType:existingConnection.transportType,protocolVersion:existingConnection.protocolVersion,instructions:existingConnection.instructions,connectionTimeMs:existingConnection.connectionTimeMs,logs:[]});return}catch(error2){console.warn(`[MCPStore] Failed to reuse connection for ${server.id}, creating new one:`,error2),this.connections.delete(server.id)}const trimmedUrl=server.url.trim(),logs=[];let currentPhase=MCPConnectionPhase.IDLE;if(!trimmedUrl){ this.updateHealthCheck(server.id,{status:HealthCheckStatus.ERROR,message:"Please enter a server URL first.",logs:[]});return}this.updateHealthCheck(server.id,{status:HealthCheckStatus.CONNECTING,phase:MCPConnectionPhase.TRANSPORT_CREATING,logs:[]});const timeoutMs=Math.round(server.requestTimeoutSeconds*1e3),headers=this.parseHeaders(server.headers);try{const serverConfig={url:trimmedUrl,transport:detectMcpTransportFromUrl(trimmedUrl),handshakeTimeoutMs:DEFAULT_MCP_CONFIG.connectionTimeoutMs,requestTimeoutMs:timeoutMs, headers,useProxy:server.useProxy};this.serverConfigs.set(server.id,serverConfig);const connection=await MCPService.connect(server.id,serverConfig,DEFAULT_MCP_CONFIG.clientInfo,DEFAULT_MCP_CONFIG.capabilities,(phase,log)=>{currentPhase=phase,logs.push(log),this.updateHealthCheck(server.id,{status:HealthCheckStatus.CONNECTING,phase,logs:[...logs]}),phase===MCPConnectionPhase.DISCONNECTED&&promoteToActive&&(console.log(`[MCPStore][${server.id}] Connection lost during health check, starting auto-rec\ onnect`),this.autoReconnect(server.id))}),tools=connection.tools.map(tool=>({name:tool.name,description:tool.description,title:tool.title})),capabilities=this.#buildCapabilitiesInfo(connection.serverCapabilities,connection.clientCapabilities);this.updateHealthCheck(server.id,{status:HealthCheckStatus.SUCCESS,tools,serverInfo:connection.serverInfo,capabilities,transportType:connection.transportType,protocolVersion:connection.protocolVersion,instructions:connection.instructions,connectionTimeMs:connection. connectionTimeMs,logs}),promoteToActive&&server.enabled?this.promoteHealthCheckToConnection(server.id,connection):await MCPService.disconnect(connection)}catch(error2){const message=error2 instanceof Error?error2.message:"Unknown error occurred";logs.push({timestamp:new Date,phase:MCPConnectionPhase.ERROR,message:`Connection failed: ${message}`,level:MCPLogLevel.ERROR}),this.updateHealthCheck(server.id,{status:HealthCheckStatus.ERROR,message,phase:currentPhase,logs})}}promoteHealthCheckToConnection(serverId,connection){ for(const tool of connection.tools)this.toolsIndex.has(tool.name)&&console.warn(`[MCPStore] Tool name conflict during promotion: "${tool.name}" exists in "${this.toolsIndex.get(tool.name)}" and "${serverId}". Using tool from "${serverId}".`),this.toolsIndex.set(tool.name,serverId);this.connections.set(serverId,connection),this.updateState({toolCount:this.toolsIndex.size,connectedServers:Array.from(this.connections.keys())})}getServersStatus(){const statuses=[];for(const[name,connection]of this.connections) statuses.push({name,isConnected:!0,toolCount:connection.tools.length,error:void 0});return statuses}getServerInstructions(){const results=[];for(const[serverName,connection]of this.connections)connection.instructions&&results.push({serverName,serverTitle:connection.serverInfo?.title||connection.serverInfo?.name,instructions:connection.instructions});return results}getHealthCheckInstructions(){const results=[];for(const[serverId,state2]of Object.entries(this._healthChecks))state2.status===HealthCheckStatus. SUCCESS&&state2.instructions&&results.push({serverId,serverTitle:state2.serverInfo?.title||state2.serverInfo?.name,instructions:state2.instructions});return results}hasServerInstructions(){for(const connection of this.connections.values())if(connection.instructions)return!0;return!1}hasResourcesCapability(perChatOverrides){if(perChatOverrides!==void 0){const enabledServerIds=new Set(perChatOverrides.filter(o=>o.enabled).map(o=>o.serverId));if(enabledServerIds.size===0)return!1;for(const[serverId, state2]of Object.entries(this._healthChecks))if(enabledServerIds.has(serverId)&&state2.status===HealthCheckStatus.SUCCESS&&state2.capabilities?.server?.resources!==void 0)return!0;for(const[serverName,connection]of this.connections)if(enabledServerIds.has(serverName)&&MCPService.supportsResources(connection))return!0;return!1}for(const state2 of Object.values(this._healthChecks))if(state2.status===HealthCheckStatus.SUCCESS&&state2.capabilities?.server?.resources!==void 0)return!0;for(const connection of this. connections.values())if(MCPService.supportsResources(connection))return!0;return!1}getServersWithResources(){const servers=[];for(const[name,connection]of this.connections)MCPService.supportsResources(connection)&&!servers.includes(name)&&servers.push(name);for(const[serverId,state2]of Object.entries(this._healthChecks))!servers.includes(serverId)&&state2.status===HealthCheckStatus.SUCCESS&&state2.capabilities?.server?.resources!==void 0&&servers.push(serverId);return servers}async fetchAllResources(forceRefresh=!1){ const serversWithResources=this.getServersWithResources();if(serversWithResources.length!==0){if(!forceRefresh&&serversWithResources.every(serverName=>{const serverRes=mcpResourceStore.getServerResources(serverName);return!serverRes||!serverRes.lastFetched?!1:Date.now()-serverRes.lastFetched.getTime()this.fetchServerResources( serverName)))}finally{mcpResourceStore.setLoading(!1)}}}async fetchServerResources(serverName){const connection=this.connections.get(serverName);if(!connection){console.warn(`[MCPStore] No connection found for server: ${serverName}`);return}if(MCPService.supportsResources(connection)){mcpResourceStore.setServerLoading(serverName,!0);try{const[resources,templates]=await Promise.all([MCPService.listAllResources(connection),MCPService.listAllResourceTemplates(connection)]);mcpResourceStore.setServerResources( serverName,resources,templates)}catch(error2){const message=error2 instanceof Error?error2.message:String(error2);mcpResourceStore.setServerError(serverName,message),console.error(`[MCPStore][${serverName}] Failed to fetch resources:`,error2)}}}async readResource(uri2){const cached2=mcpResourceStore.getCachedContent(uri2);if(cached2)return cached2.content;const serverName=mcpResourceStore.findServerForUri(uri2);if(!serverName)return console.error(`[MCPStore] No server found for resource URI: ${uri2}`), null;const connection=this.connections.get(serverName);if(!connection)return console.error(`[MCPStore] No connection found for server: ${serverName}`),null;try{const result=await MCPService.readResource(connection,uri2),resourceInfo=mcpResourceStore.findResourceByUri(uri2);return resourceInfo&&mcpResourceStore.cacheResourceContent(resourceInfo,result.contents),result.contents}catch(error2){return console.error(`[MCPStore] Failed to read resource ${uri2}:`,error2),null}}async subscribeToResource(uri2){ const serverName=mcpResourceStore.findServerForUri(uri2);if(!serverName)return console.error(`[MCPStore] No server found for resource URI: ${uri2}`),!1;const connection=this.connections.get(serverName);if(!connection)return console.error(`[MCPStore] No connection found for server: ${serverName}`),!1;if(!MCPService.supportsResourceSubscriptions(connection))return!1;try{return await MCPService.subscribeResource(connection,uri2),mcpResourceStore.addSubscription(uri2,serverName),!0}catch(error2){return console. error(`[MCPStore] Failed to subscribe to resource ${uri2}:`,error2),!1}}async unsubscribeFromResource(uri2){const serverName=mcpResourceStore.findServerForUri(uri2);if(!serverName)return console.error(`[MCPStore] No server found for resource URI: ${uri2}`),!1;const connection=this.connections.get(serverName);if(!connection)return console.error(`[MCPStore] No connection found for server: ${serverName}`),!1;try{return await MCPService.unsubscribeResource(connection,uri2),mcpResourceStore.removeSubscription( uri2),!0}catch(error2){return console.error(`[MCPStore] Failed to unsubscribe from resource ${uri2}:`,error2),!1}}async attachResource(uri2){const resourceInfo=mcpResourceStore.findResourceByUri(uri2);if(!resourceInfo)return console.error(`[MCPStore] Resource not found: ${uri2}`),null;if(mcpResourceStore.isAttached(uri2))return null;const attachment=mcpResourceStore.addAttachment(resourceInfo);try{const content2=await this.readResource(uri2);content2?mcpResourceStore.updateAttachmentContent(attachment. id,content2):mcpResourceStore.updateAttachmentError(attachment.id,"Failed to read resource")}catch(error2){const message=error2 instanceof Error?error2.message:String(error2);mcpResourceStore.updateAttachmentError(attachment.id,message)}return mcpResourceStore.getAttachment(attachment.id)??null}removeResourceAttachment(attachmentId){mcpResourceStore.removeAttachment(attachmentId)}clearResourceAttachments(){mcpResourceStore.clearAttachments()}getResourceContextForChat(){return mcpResourceStore.formatAttachmentsForContext()}consumeResourceAttachmentsAsExtras(){ const extras=mcpResourceStore.toMessageExtras();return extras.length>0&&mcpResourceStore.clearAttachments(),extras}}const mcpStore=new MCPStore;var root_2$12=from_html(''),root_9$m=from_html(''),root_8$p=from_html('
      '),root_1$W=from_html(" ",1);function ChatAttachmentMcpResource($$anchor,$$props){ push$1($$props,!0);function getStatusClass(attachment){return attachment.error?"border-red-500/50 bg-red-500/10":(attachment.loading,"border-border/50 bg-muted/30")}const ResourceIcon=user_derived(()=>getResourceIcon($$props.attachment.resource.mimeType,$$props.attachment.resource.uri)),serverName=user_derived(()=>mcpStore.getServerDisplayName($$props.attachment.resource.serverName)),favicon=user_derived(()=>mcpStore.getServerFavicon($$props.attachment.resource.serverName));var fragment=comment$2(), node2=first_child(fragment);component(node2,()=>Root$5,($$anchor2,Tooltip_Root)=>{Tooltip_Root($$anchor2,{children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$W(),node_1=first_child(fragment_1);component(node_1,()=>Tooltip_trigger,($$anchor4,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor4,{children:($$anchor5,$$slotProps2)=>{var button=root_2$12();button.__click=function(...$$args){$$props.onClick?.apply(this,$$args)};var node_2=child(button);{var consequent=$$anchor6=>{Loader_circle($$anchor6, {class:"h-3 w-3 animate-spin text-muted-foreground"})},alternate_1=$$anchor6=>{var fragment_3=comment$2(),node_3=first_child(fragment_3);{var consequent_1=$$anchor7=>{Circle_alert($$anchor7,{class:"h-3 w-3 text-red-500"})},alternate=$$anchor7=>{var fragment_5=comment$2(),node_4=first_child(fragment_5);component(node_4,()=>get$4(ResourceIcon),($$anchor8,ResourceIcon_1)=>{ResourceIcon_1($$anchor8,{class:"h-3 w-3 text-muted-foreground"})}),append($$anchor7,fragment_5)};if_block(node_3,$$render=>{$$props. attachment.error?$$render(consequent_1):$$render(alternate,!1)},!0)}append($$anchor6,fragment_3)};if_block(node_2,$$render=>{$$props.attachment.loading?$$render(consequent):$$render(alternate_1,!1)})}var span=sibling(node_2,2),text2=child(span,!0);reset(span);var node_5=sibling(span,2);{var consequent_2=$$anchor6=>{ActionIconRemove($$anchor6,{class:"-my-2 -mr-1.5 bg-transparent",iconSize:2,get id(){return $$props.attachment.id},get onRemove(){return $$props.onRemove}})};if_block(node_5,$$render=>{ $$props.onRemove&&$$render(consequent_2)})}reset(button),template_effect(($0,$1)=>{set_class(button,1,$0),button.disabled=!$$props.onClick,set_text(text2,$1)},[()=>clsx(cn$1("flex flex-shrink-0 items-center gap-1.5 rounded-md border px-2 py-0.75 text-sm transition-colors",getStatusClass($$props.attachment),$$props.onClick&&"cursor-pointer hover:bg-muted/50",$$props.class)),()=>getResourceDisplayName($$props.attachment.resource)]),append($$anchor5,button)},$$slots:{default:!0}})});var node_6=sibling( node_1,2);component(node_6,()=>Tooltip_content,($$anchor4,Tooltip_Content)=>{Tooltip_Content($$anchor4,{children:($$anchor5,$$slotProps2)=>{var div=root_8$p(),node_7=child(div);{var consequent_3=$$anchor6=>{var img=root_9$m();template_effect(()=>set_attribute(img,"src",get$4(favicon))),event("error",img,e=>{e.currentTarget.style.display="none"}),replay_events(img),append($$anchor6,img)};if_block(node_7,$$render=>{get$4(favicon)&&$$render(consequent_3)})}var span_1=sibling(node_7,2),text_1=child( span_1,!0);reset(span_1),reset(div),template_effect(()=>set_text(text_1,get$4(serverName))),append($$anchor5,div)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}delegate(["click"]);const alertVariants=tv({base:"relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-curre\ nt",variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"}},defaultVariants:{variant:"default"}});var root$1t=from_html("
      ");function Alert($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),variant=prop($$props,"variant",3,"default"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","variant","children"]);var div=root$1t(); attribute_effect(div,$0=>({"data-slot":"alert",class:$0,...restProps,role:"alert"}),[()=>cn$1(alertVariants({variant:variant()}),$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}var root$1s=from_html("
      ");function Alert_description($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy", "ref","class","children"]);var div=root$1s();attribute_effect(div,$0=>({"data-slot":"alert-description",class:$0,...restProps}),[()=>cn$1("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}var root$1r=from_html("
      ");function Alert_title($$anchor,$$props){push$1($$props,!0); let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$1r();attribute_effect(div,$0=>({"data-slot":"alert-title",class:$0,...restProps}),[()=>cn$1("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}class AudioRecorder{mediaRecorder=null;audioChunks=[];stream=null;recordingState=!1;async startRecording(){ try{this.stream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),this.initializeRecorder(this.stream),this.audioChunks=[],this.mediaRecorder.start(100),this.recordingState=!0}catch(error2){throw console.error("Failed to start recording:",error2),new Error("Failed to access microphone. Please check permissions.")}}async stopRecording(){return new Promise((resolve2,reject)=>{if(!this.mediaRecorder||this.mediaRecorder.state==="inactive"){ reject(new Error("No active recording to stop"));return}this.mediaRecorder.onstop=()=>{const mimeType=this.mediaRecorder?.mimeType||MimeTypeAudio.WAV,audioBlob=new Blob(this.audioChunks,{type:mimeType});this.cleanup(),resolve2(audioBlob)},this.mediaRecorder.onerror=event2=>{console.error("Recording error:",event2),this.cleanup(),reject(new Error("Recording failed"))},this.mediaRecorder.stop()})}isRecording(){return this.recordingState}cancelRecording(){this.mediaRecorder&&this.mediaRecorder.state!== "inactive"&&this.mediaRecorder.stop(),this.cleanup()}initializeRecorder(stream){const options={};MediaRecorder.isTypeSupported(MimeTypeAudio.WAV)?options.mimeType=MimeTypeAudio.WAV:MediaRecorder.isTypeSupported(MimeTypeAudio.WEBM_OPUS)?options.mimeType=MimeTypeAudio.WEBM_OPUS:MediaRecorder.isTypeSupported(MimeTypeAudio.WEBM)?options.mimeType=MimeTypeAudio.WEBM:MediaRecorder.isTypeSupported(MimeTypeAudio.MP4)?options.mimeType=MimeTypeAudio.MP4:console.warn("No preferred audio format supported, us\ ing default"),this.mediaRecorder=new MediaRecorder(stream,options),this.mediaRecorder.ondataavailable=event2=>{event2.data.size>0&&this.audioChunks.push(event2.data)},this.mediaRecorder.onstop=()=>{this.recordingState=!1},this.mediaRecorder.onerror=event2=>{console.error("MediaRecorder error:",event2),this.recordingState=!1}}cleanup(){if(this.stream){for(const track2 of this.stream.getTracks())track2.stop();this.stream=null}this.mediaRecorder=null,this.audioChunks=[],this.recordingState=!1}}async function convertToWav(audioBlob){ try{if(audioBlob.type.includes("wav"))return audioBlob;const arrayBuffer=await audioBlob.arrayBuffer(),audioContext=new(window.AudioContext||window.webkitAudioContext),audioBuffer=await audioContext.decodeAudioData(arrayBuffer),wavBlob=audioBufferToWav(audioBuffer);return audioContext.close(),wavBlob}catch(error2){return console.error("Failed to convert audio to WAV:",error2),audioBlob}}function audioBufferToWav(buffer){const length=buffer.length,numberOfChannels=buffer.numberOfChannels,sampleRate=buffer. sampleRate,blockAlign=numberOfChannels*2,byteRate=sampleRate*blockAlign,dataSize=length*blockAlign,bufferSize=44+dataSize,arrayBuffer=new ArrayBuffer(bufferSize),view=new DataView(arrayBuffer),writeString=(offset22,string2)=>{for(let i=0;i=VerbosityLevel.INFOS&&console.log(`Info: ${msg}`)}function warn(msg){verbosity>=VerbosityLevel.WARNINGS&&console.log(`Warning: ${msg}`)}function unreachable(msg){throw new Error(msg)}function assert$1(cond,msg){cond||unreachable( msg)}function _isValidProtocol(url2){switch(url2?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function createValidAbsoluteUrl(url2,baseUrl=null,options=null){if(!url2)return null;if(options&&typeof url2=="string"&&(options.addDefaultProtocol&&url2.startsWith("www.")&&url2.match(/\./g)?.length>=2&&(url2=`http://${url2}`),options.tryConvertEncoding))try{url2=stringToUTF8String(url2)}catch{}const absoluteUrl=baseUrl?URL.parse(url2,baseUrl):URL.parse( url2);return _isValidProtocol(absoluteUrl)?absoluteUrl:null}function updateUrlHash(url2,hash2,allowRel=!1){const res=URL.parse(url2);return res?(res.hash=hash2,res.href):allowRel&&createValidAbsoluteUrl(url2,"http://example.com")?url2.split("#",1)[0]+`${hash2?`#${hash2}`:""}`:""}function shadow(obj,prop2,value,nonSerializable=!1){return Object.defineProperty(obj,prop2,{value,enumerable:!nonSerializable,configurable:!0,writable:!1}),value}const BaseException=function(){function BaseException2(message,name){ this.message=message,this.name=name}return BaseException2.prototype=new Error,BaseException2.constructor=BaseException2,BaseException2}();class PasswordException extends BaseException{constructor(msg,code2){super(msg,"PasswordException"),this.code=code2}}class UnknownErrorException extends BaseException{constructor(msg,details){super(msg,"UnknownErrorException"),this.details=details}}class InvalidPDFException extends BaseException{constructor(msg){super(msg,"InvalidPDFException")}}class ResponseException extends BaseException{constructor(msg,status,missing){ super(msg,"ResponseException"),this.status=status,this.missing=missing}}class FormatError extends BaseException{constructor(msg){super(msg,"FormatError")}}class AbortException extends BaseException{constructor(msg){super(msg,"AbortException")}}function bytesToString(bytes){(typeof bytes!="object"||bytes?.length===void 0)&&unreachable("Invalid argument for bytesToString");const length=bytes.length,MAX_ARGUMENT_COUNT=8192;if(length>24&255,value>>16& 255,value>>8&255,value&255)}function isLittleEndian(){const buffer8=new Uint8Array(4);return buffer8[0]=1,new Uint32Array(buffer8.buffer,0,1)[0]===1}function isEvalSupported(){try{return new Function(""),!0}catch{return!1}}class util_FeatureTest{static get isLittleEndian(){return shadow(this,"isLittleEndian",isLittleEndian())}static get isEvalSupported(){return shadow(this,"isEvalSupported",isEvalSupported())}static get isOffscreenCanvasSupported(){return shadow(this,"isOffscreenCanvasSupported", typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return shadow(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get platform(){const{platform:platform2,userAgent}=navigator;return shadow(this,"platform",{isAndroid:userAgent.includes("Android"),isLinux:platform2.includes("Linux"),isMac:platform2.includes("Mac"),isWindows:platform2.includes("Win"),isFirefox:userAgent.includes("Firefox")})}static get isCSSRoundSupported(){return shadow(this,"isCSSRoundSupported",globalThis. CSS?.supports?.("width: round(1.5px, 1px)"))}}const hexNumbers=Array.from(Array(256).keys(),n=>n.toString(16).padStart(2,"0"));class Util{static makeHexColor(r2,g,b){return`#${hexNumbers[r2]}${hexNumbers[g]}${hexNumbers[b]}`}static scaleMinMax(transform2,minMax){let temp;transform2[0]?(transform2[0]<0&&(temp=minMax[0],minMax[0]=minMax[2],minMax[2]=temp),minMax[0]*=transform2[0],minMax[2]*=transform2[0],transform2[3]<0&&(temp=minMax[1],minMax[1]=minMax[3],minMax[3]=temp),minMax[1]*=transform2[3], minMax[3]*=transform2[3]):(temp=minMax[0],minMax[0]=minMax[1],minMax[1]=temp,temp=minMax[2],minMax[2]=minMax[3],minMax[3]=temp,transform2[1]<0&&(temp=minMax[1],minMax[1]=minMax[3],minMax[3]=temp),minMax[1]*=transform2[1],minMax[3]*=transform2[1],transform2[2]<0&&(temp=minMax[0],minMax[0]=minMax[2],minMax[2]=temp),minMax[0]*=transform2[2],minMax[2]*=transform2[2]),minMax[0]+=transform2[4],minMax[1]+=transform2[5],minMax[2]+=transform2[4],minMax[3]+=transform2[5]}static transform(m1,m2){return[m1[0]* m2[0]+m1[2]*m2[1],m1[1]*m2[0]+m1[3]*m2[1],m1[0]*m2[2]+m1[2]*m2[3],m1[1]*m2[2]+m1[3]*m2[3],m1[0]*m2[4]+m1[2]*m2[5]+m1[4],m1[1]*m2[4]+m1[3]*m2[5]+m1[5]]}static applyTransform(p2,m,pos=0){const p0=p2[pos],p1=p2[pos+1];p2[pos]=p0*m[0]+p1*m[2]+m[4],p2[pos+1]=p0*m[1]+p1*m[3]+m[5]}static applyTransformToBezier(p2,transform2,pos=0){const m0=transform2[0],m1=transform2[1],m2=transform2[2],m3=transform2[3],m4=transform2[4],m5=transform2[5];for(let i=0;i<6;i+=2){const pI=p2[pos+i],pI1=p2[pos+i+1];p2[pos+i]= pI*m0+pI1*m2+m4,p2[pos+i+1]=pI*m1+pI1*m3+m5}}static applyInverseTransform(p2,m){const p0=p2[0],p1=p2[1],d2=m[0]*m[3]-m[1]*m[2];p2[0]=(p0*m[3]-p1*m[2]+m[2]*m[5]-m[4]*m[3])/d2,p2[1]=(-p0*m[1]+p1*m[0]+m[4]*m[1]-m[5]*m[0])/d2}static axialAlignedBoundingBox(rect,transform2,output){const m0=transform2[0],m1=transform2[1],m2=transform2[2],m3=transform2[3],m4=transform2[4],m5=transform2[5],r0=rect[0],r1=rect[1],r2=rect[2],r3=rect[3];let a0=m0*r0+m4,a2=a0,a1=m0*r2+m4,a3=a1,b0=m3*r1+m5,b2=b0,b1=m3*r3+m5,b3=b1; if(m1!==0||m2!==0){const m1r0=m1*r0,m1r2=m1*r2,m2r1=m2*r1,m2r3=m2*r3;a0+=m2r1,a3+=m2r1,a1+=m2r3,a2+=m2r3,b0+=m1r0,b3+=m1r0,b1+=m1r2,b2+=m1r2}output[0]=Math.min(output[0],a0,a1,a2,a3),output[1]=Math.min(output[1],b0,b1,b2,b3),output[2]=Math.max(output[2],a0,a1,a2,a3),output[3]=Math.max(output[3],b0,b1,b2,b3)}static inverseTransform(m){const d2=m[0]*m[3]-m[1]*m[2];return[m[3]/d2,-m[1]/d2,-m[2]/d2,m[0]/d2,(m[2]*m[5]-m[4]*m[3])/d2,(m[4]*m[1]-m[5]*m[0])/d2]}static singularValueDecompose2dScale(matrix,output){ const m0=matrix[0],m1=matrix[1],m2=matrix[2],m3=matrix[3],a=m0**2+m1**2,b=m0*m2+m1*m3,c2=m2**2+m3**2,first=(a+c2)/2,second=Math.sqrt(first**2-(a*c2-b**2));output[0]=Math.sqrt(first+second||1),output[1]=Math.sqrt(first-second||1)}static normalizeRect(rect){const r2=rect.slice(0);return rect[0]>rect[2]&&(r2[0]=rect[2],r2[2]=rect[0]),rect[1]>rect[3]&&(r2[1]=rect[3],r2[3]=rect[1]),r2}static intersect(rect1,rect2){const xLow=Math.max(Math.min(rect1[0],rect1[2]),Math.min(rect2[0],rect2[2])),xHigh=Math. min(Math.max(rect1[0],rect1[2]),Math.max(rect2[0],rect2[2]));if(xLow>xHigh)return null;const yLow=Math.max(Math.min(rect1[1],rect1[3]),Math.min(rect2[1],rect2[3])),yHigh=Math.min(Math.max(rect1[1],rect1[3]),Math.max(rect2[1],rect2[3]));return yLow>yHigh?null:[xLow,yLow,xHigh,yHigh]}static pointBoundingBox(x,y,minMax){minMax[0]=Math.min(minMax[0],x),minMax[1]=Math.min(minMax[1],y),minMax[2]=Math.max(minMax[2],x),minMax[3]=Math.max(minMax[3],y)}static rectBoundingBox(x0,y0,x1,y1,minMax){minMax[0]= Math.min(minMax[0],x0,x1),minMax[1]=Math.min(minMax[1],y0,y1),minMax[2]=Math.max(minMax[2],x0,x1),minMax[3]=Math.max(minMax[3],y0,y1)}static#getExtremumOnCurve(x0,x1,x2,x3,y0,y1,y2,y3,t,minMax){if(t<=0||t>=1)return;const mt=1-t,tt=t*t,ttt=tt*t,x=mt*(mt*(mt*x0+3*t*x1)+3*tt*x2)+ttt*x3,y=mt*(mt*(mt*y0+3*t*y1)+3*tt*y2)+ttt*y3;minMax[0]=Math.min(minMax[0],x),minMax[1]=Math.min(minMax[1],y),minMax[2]=Math.max(minMax[2],x),minMax[3]=Math.max(minMax[3],y)}static#getExtremum(x0,x1,x2,x3,y0,y1,y2,y3,a,b,c2,minMax){ if(Math.abs(a)<1e-12){Math.abs(b)>=1e-12&&this.#getExtremumOnCurve(x0,x1,x2,x3,y0,y1,y2,y3,-c2/b,minMax);return}const delta=b**2-4*c2*a;if(delta<0)return;const sqrtDelta=Math.sqrt(delta),a2=2*a;this.#getExtremumOnCurve(x0,x1,x2,x3,y0,y1,y2,y3,(-b+sqrtDelta)/a2,minMax),this.#getExtremumOnCurve(x0,x1,x2,x3,y0,y1,y2,y3,(-b-sqrtDelta)/a2,minMax)}static bezierBoundingBox(x0,y0,x1,y1,x2,y2,x3,y3,minMax){minMax[0]=Math.min(minMax[0],x0,x3),minMax[1]=Math.min(minMax[1],y0,y3),minMax[2]=Math.max(minMax[2], x0,x3),minMax[3]=Math.max(minMax[3],y0,y3),this.#getExtremum(x0,x1,x2,x3,y0,y1,y2,y3,3*(-x0+3*(x1-x2)+x3),6*(x0-2*x1+x2),3*(x1-x0),minMax),this.#getExtremum(x0,x1,x2,x3,y0,y1,y2,y3,3*(-y0+3*(y1-y2)+y3),6*(y0-2*y1+y2),3*(y1-y0),minMax)}}function stringToUTF8String(str){return decodeURIComponent(escape(str))}let NormalizeRegex=null,NormalizationMap=null;function normalizeUnicode(str){return NormalizeRegex||(NormalizeRegex=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu, NormalizationMap=new Map([["ſt","ſt"]])),str.replaceAll(NormalizeRegex,(_,p1,p2)=>p1?p1.normalize("NFKC"):NormalizationMap.get(p2))}function getUuid(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const buf=new Uint8Array(32);return crypto.getRandomValues(buf),bytesToString(buf)}const AnnotationPrefix="pdfjs_internal_id_";function _isValidExplicitDest(validRef,validName,dest){if(!Array.isArray(dest)||dest.length<2)return!1;const[page2,zoom,...args]=dest;if(!validRef(page2)&& !Number.isInteger(page2)||!validName(zoom))return!1;const argsLen=args.length;let allowNull=!0;switch(zoom.name){case"XYZ":if(argsLen<2||argsLen>3)return!1;break;case"Fit":case"FitB":return argsLen===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(argsLen>1)return!1;break;case"FitR":if(argsLen!==4)return!1;allowNull=!1;break;default:return!1}for(const arg of args)if(!(typeof arg=="number"||allowNull&&arg===null))return!1;return!0}function MathClamp(v,min2,max2){return Math.min(Math.max(v,min2), max2)}function toBase64Util(arr){return Uint8Array.prototype.toBase64?arr.toBase64():btoa(bytesToString(arr))}function fromBase64Util(str){return Uint8Array.fromBase64?Uint8Array.fromBase64(str):stringToBytes(atob(str))}typeof Promise.try!="function"&&(Promise.try=function(fn,...args){return new Promise(resolve2=>{resolve2(fn(...args))})});typeof Math.sumPrecise!="function"&&(Math.sumPrecise=function(numbers){return numbers.reduce((a,b)=>a+b,0)});const SVG_NS="http://www.w3.org/2000/svg";class PixelsPerInch{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this. CSS/this.PDF}async function fetchData(url2,type2="text"){if(isValidFetchUrl(url2,document.baseURI)){const response=await fetch(url2);if(!response.ok)throw new Error(response.statusText);switch(type2){case"arraybuffer":return response.arrayBuffer();case"blob":return response.blob();case"json":return response.json()}return response.text()}return new Promise((resolve2,reject)=>{const request=new XMLHttpRequest;request.open("GET",url2,!0),request.responseType=type2,request.onreadystatechange=()=>{if(request. readyState===XMLHttpRequest.DONE){if(request.status===200||request.status===0){switch(type2){case"arraybuffer":case"blob":case"json":resolve2(request.response);return}resolve2(request.responseText);return}reject(new Error(request.statusText))}},request.send(null)})}class PageViewport{constructor({viewBox,userUnit,scale:scale2,rotation,offsetX=0,offsetY=0,dontFlip=!1}){this.viewBox=viewBox,this.userUnit=userUnit,this.scale=scale2,this.rotation=rotation,this.offsetX=offsetX,this.offsetY=offsetY,scale2*= userUnit;const centerX=(viewBox[2]+viewBox[0])/2,centerY=(viewBox[3]+viewBox[1])/2;let rotateA,rotateB,rotateC,rotateD;switch(rotation%=360,rotation<0&&(rotation+=360),rotation){case 180:rotateA=-1,rotateB=0,rotateC=0,rotateD=1;break;case 90:rotateA=0,rotateB=1,rotateC=1,rotateD=0;break;case 270:rotateA=0,rotateB=-1,rotateC=-1,rotateD=0;break;case 0:rotateA=1,rotateB=0,rotateC=0,rotateD=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}dontFlip&& (rotateC=-rotateC,rotateD=-rotateD);let offsetCanvasX,offsetCanvasY,width,height;rotateA===0?(offsetCanvasX=Math.abs(centerY-viewBox[1])*scale2+offsetX,offsetCanvasY=Math.abs(centerX-viewBox[0])*scale2+offsetY,width=(viewBox[3]-viewBox[1])*scale2,height=(viewBox[2]-viewBox[0])*scale2):(offsetCanvasX=Math.abs(centerX-viewBox[0])*scale2+offsetX,offsetCanvasY=Math.abs(centerY-viewBox[1])*scale2+offsetY,width=(viewBox[2]-viewBox[0])*scale2,height=(viewBox[3]-viewBox[1])*scale2),this.transform=[rotateA* scale2,rotateB*scale2,rotateC*scale2,rotateD*scale2,offsetCanvasX-rotateA*scale2*centerX-rotateC*scale2*centerY,offsetCanvasY-rotateB*scale2*centerX-rotateD*scale2*centerY],this.width=width,this.height=height}get rawDims(){const dims=this.viewBox;return shadow(this,"rawDims",{pageWidth:dims[2]-dims[0],pageHeight:dims[3]-dims[1],pageX:dims[0],pageY:dims[1]})}clone({scale:scale2=this.scale,rotation=this.rotation,offsetX=this.offsetX,offsetY=this.offsetY,dontFlip=!1}={}){return new PageViewport({viewBox:this. viewBox.slice(),userUnit:this.userUnit,scale:scale2,rotation,offsetX,offsetY,dontFlip})}convertToViewportPoint(x,y){const p2=[x,y];return Util.applyTransform(p2,this.transform),p2}convertToViewportRectangle(rect){const topLeft=[rect[0],rect[1]];Util.applyTransform(topLeft,this.transform);const bottomRight=[rect[2],rect[3]];return Util.applyTransform(bottomRight,this.transform),[topLeft[0],topLeft[1],bottomRight[0],bottomRight[1]]}convertToPdfPoint(x,y){const p2=[x,y];return Util.applyInverseTransform( p2,this.transform),p2}}class RenderingCancelledException extends BaseException{constructor(msg,extraDelay=0){super(msg,"RenderingCancelledException"),this.extraDelay=extraDelay}}function isDataScheme(url2){const ii=url2.length;let i=0;for(;i{try{return new URL(urlString)}catch{try{return new URL(decodeURIComponent(urlString))}catch{try{return new URL(urlString,"https://foo.bar")}catch{try{return new URL(decodeURIComponent(urlString),"https://foo.bar")}catch{ return null}}}}})(url2);if(!newURL)return defaultFilename;const decode2=name=>{try{let decoded=decodeURIComponent(name);return decoded.includes("/")?(decoded=decoded.split("/").at(-1),decoded.test(/^\.pdf$/i)?decoded:name):decoded}catch{return name}},pdfRegex=/\.pdf$/i,filename=newURL.pathname.split("/").at(-1);if(pdfRegex.test(filename))return decode2(filename);if(newURL.searchParams.size>0){const values=Array.from(newURL.searchParams.values()).reverse();for(const value of values)if(pdfRegex.test( value))return decode2(value);const keys2=Array.from(newURL.searchParams.keys()).reverse();for(const key2 of keys2)if(pdfRegex.test(key2))return decode2(key2)}if(newURL.hash){const hashFilename=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i.exec(newURL.hash);if(hashFilename)return decode2(hashFilename[0])}return defaultFilename}class StatTimer{started=Object.create(null);times=[];time(name){name in this.started&&warn(`Timer is already running for ${name}`),this.started[name]=Date.now()}timeEnd(name){name in this. started||warn(`Timer has not been started for ${name}`),this.times.push({name,start:this.started[name],end:Date.now()}),delete this.started[name]}toString(){const outBuf=[];let longest=0;for(const{name}of this.times)longest=Math.max(name.length,longest);for(const{name,start:start2,end}of this.times)outBuf.push(`${name.padEnd(longest)} ${end-start2}ms `);return outBuf.join("")}}function isValidFetchUrl(url2,baseUrl){const res=baseUrl?URL.parse(url2,baseUrl):URL.parse(url2);return res?.protocol==="http:"||res?.protocol==="https:"}function noContextMenu(e){e.preventDefault()}function stopEvent(e){e.preventDefault(),e.stopPropagation()}function deprecated(details){console.log("Deprecated API usage: "+details)}class PDFDateString{static#regex;static toDateObject(input){if(input instanceof Date)return input;if(!input||typeof input!="string")return null; this.#regex||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?");const matches2=this.#regex.exec(input);if(!matches2)return null;const year=parseInt(matches2[1],10);let month=parseInt(matches2[2],10);month=month>=1&&month<=12?month-1:0;let day=parseInt(matches2[3],10);day=day>=1&&day<=31?day:1;let hour=parseInt(matches2[4],10);hour=hour>=0&&hour<=23?hour:0;let minute=parseInt(matches2[5],10);minute=minute>=0&&minute<=59?minute:0;let second=parseInt( matches2[6],10);second=second>=0&&second<=59?second:0;const universalTimeRelation=matches2[7]||"Z";let offsetHour=parseInt(matches2[8],10);offsetHour=offsetHour>=0&&offsetHour<=23?offsetHour:0;let offsetMinute=parseInt(matches2[9],10)||0;return offsetMinute=offsetMinute>=0&&offsetMinute<=59?offsetMinute:0,universalTimeRelation==="-"?(hour+=offsetHour,minute+=offsetMinute):universalTimeRelation==="+"&&(hour-=offsetHour,minute-=offsetMinute),new Date(Date.UTC(year,month,day,hour,minute,second))}}function getXfaPageViewport(xfaPage,{ scale:scale2=1,rotation=0}){const{width,height}=xfaPage.attributes.style,viewBox=[0,0,parseInt(width),parseInt(height)];return new PageViewport({viewBox,userUnit:1,scale:scale2,rotation})}function getRGB(color){if(color.startsWith("#")){const colorRGB=parseInt(color.slice(1),16);return[(colorRGB&16711680)>>16,(colorRGB&65280)>>8,colorRGB&255]}return color.startsWith("rgb(")?color.slice(4,-1).split(",").map(x=>parseInt(x)):color.startsWith("rgba(")?color.slice(5,-1).split(",").map(x=>parseInt(x)). slice(0,3):(warn(`Not a valid color format: "${color}"`),[0,0,0])}function getColorValues(colors){const span=document.createElement("span");span.style.visibility="hidden",span.style.colorScheme="only light",document.body.append(span);for(const name of colors.keys()){span.style.color=name;const computedColor=window.getComputedStyle(span).color;colors.set(name,getRGB(computedColor))}span.remove()}function getCurrentTransform(ctx){const{a,b,c:c2,d:d2,e,f}=ctx.getTransform();return[a,b,c2,d2,e,f]}function getCurrentTransformInverse(ctx){ const{a,b,c:c2,d:d2,e,f}=ctx.getTransform().invertSelf();return[a,b,c2,d2,e,f]}function setLayerDimensions(div,viewport,mustFlip=!1,mustRotate=!0){if(viewport instanceof PageViewport){const{pageWidth,pageHeight}=viewport.rawDims,{style:style2}=div,useRound=util_FeatureTest.isCSSRoundSupported,w=`var(--total-scale-factor) * ${pageWidth}px`,h2=`var(--total-scale-factor) * ${pageHeight}px`,widthStr=useRound?`round(down, ${w}, var(--scale-round-x))`:`calc(${w})`,heightStr=useRound?`round(down, ${h2}\ , var(--scale-round-y))`:`calc(${h2})`;!mustFlip||viewport.rotation%180===0?(style2.width=widthStr,style2.height=heightStr):(style2.width=heightStr,style2.height=widthStr)}mustRotate&&div.setAttribute("data-main-rotation",viewport.rotation)}class OutputScale{constructor(){const{pixelRatio}=OutputScale;this.sx=pixelRatio,this.sy=pixelRatio}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}limitCanvas(width,height,maxPixels,maxDim,capAreaFactor=-1){let maxAreaScale=1/0, maxWidthScale=1/0,maxHeightScale=1/0;maxPixels=OutputScale.capPixels(maxPixels,capAreaFactor),maxPixels>0&&(maxAreaScale=Math.sqrt(maxPixels/(width*height))),maxDim!==-1&&(maxWidthScale=maxDim/width,maxHeightScale=maxDim/height);const maxScale=Math.min(maxAreaScale,maxWidthScale,maxHeightScale);return this.sx>maxScale||this.sy>maxScale?(this.sx=maxScale,this.sy=maxScale,!0):!1}static get pixelRatio(){return globalThis.devicePixelRatio||1}static capPixels(maxPixels,capAreaFactor){if(capAreaFactor>= 0){const winPixels=Math.ceil(window.screen.availWidth*window.screen.availHeight*this.pixelRatio**2*(1+capAreaFactor/100));return maxPixels>0?Math.min(maxPixels,winPixels):winPixels}return maxPixels}}const SupportedImageMimeTypes=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"];class EditorToolbar{#toolbar=null;#colorPicker=null;#editor;#buttons=null;#altText=null;#comment=null;#signatureDescriptionButton=null;static#l10nRemove=null;constructor(editor){ this.#editor=editor,EditorToolbar.#l10nRemove||=Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button",signature:"pdfjs-editor-remove-signature-button"})}render(){const editToolbar=this.#toolbar=document.createElement("div");editToolbar.classList.add("editToolbar","hidden"),editToolbar.setAttribute("role","toolbar");const signal=this.#editor._uiManager._signal;editToolbar. addEventListener("contextmenu",noContextMenu,{signal}),editToolbar.addEventListener("pointerdown",EditorToolbar.#pointerDown,{signal});const buttons=this.#buttons=document.createElement("div");buttons.className="buttons",editToolbar.append(buttons);const position2=this.#editor.toolbarPosition;if(position2){const{style:style2}=editToolbar,x=this.#editor._uiManager.direction==="ltr"?1-position2[0]:position2[0];style2.insetInlineEnd=`${100*x}%`,style2.top=`calc(${100*position2[1]}% + var(--editor-t\ oolbar-vert-offset))`}return editToolbar}get div(){return this.#toolbar}static#pointerDown(e){e.stopPropagation()}#focusIn(e){this.#editor._focusEventsAllowed=!1,stopEvent(e)}#focusOut(e){this.#editor._focusEventsAllowed=!0,stopEvent(e)}#addListenersToElement(element2){const signal=this.#editor._uiManager._signal;element2.addEventListener("focusin",this.#focusIn.bind(this),{capture:!0,signal}),element2.addEventListener("focusout",this.#focusOut.bind(this),{capture:!0,signal}),element2.addEventListener( "contextmenu",noContextMenu,{signal})}hide(){this.#toolbar.classList.add("hidden"),this.#colorPicker?.hideDropdown()}show(){this.#toolbar.classList.remove("hidden"),this.#altText?.shown(),this.#comment?.shown()}addDeleteButton(){const{editorType,_uiManager}=this.#editor,button=document.createElement("button");button.className="delete",button.tabIndex=0,button.setAttribute("data-l10n-id",EditorToolbar.#l10nRemove[editorType]),this.#addListenersToElement(button),button.addEventListener("click",e=>{ _uiManager.delete()},{signal:_uiManager._signal}),this.#buttons.append(button)}get#divider(){const divider=document.createElement("div");return divider.className="divider",divider}async addAltText(altText){const button=await altText.render();this.#addListenersToElement(button),this.#buttons.append(button,this.#divider),this.#altText=altText}addComment(comment2){if(this.#comment)return;const button=comment2.render();button&&(this.#addListenersToElement(button),this.#buttons.prepend(button,this.#divider), this.#comment=comment2,comment2.toolbar=this)}addColorPicker(colorPicker){if(this.#colorPicker)return;this.#colorPicker=colorPicker;const button=colorPicker.renderButton();this.#addListenersToElement(button),this.#buttons.append(button,this.#divider)}async addEditSignatureButton(signatureManager){const button=this.#signatureDescriptionButton=await signatureManager.renderEditButton(this.#editor);this.#addListenersToElement(button),this.#buttons.append(button,this.#divider)}async addButton(name,tool){ switch(name){case"colorPicker":this.addColorPicker(tool);break;case"altText":await this.addAltText(tool);break;case"editSignature":await this.addEditSignatureButton(tool);break;case"delete":this.addDeleteButton();break;case"comment":this.addComment(tool);break}}updateEditSignatureButton(description2){this.#signatureDescriptionButton&&(this.#signatureDescriptionButton.title=description2)}remove(){this.#toolbar.remove(),this.#colorPicker?.destroy(),this.#colorPicker=null}}class HighlightToolbar{#buttons=null;#toolbar=null;#uiManager;constructor(uiManager){ this.#uiManager=uiManager}#render(){const editToolbar=this.#toolbar=document.createElement("div");editToolbar.className="editToolbar",editToolbar.setAttribute("role","toolbar"),editToolbar.addEventListener("contextmenu",noContextMenu,{signal:this.#uiManager._signal});const buttons=this.#buttons=document.createElement("div");return buttons.className="buttons",editToolbar.append(buttons),this.#addHighlightButton(),editToolbar}#getLastPoint(boxes,isLTR){let lastY=0,lastX=0;for(const box2 of boxes){ const y=box2.y+box2.height;if(ylastY){lastX=x,lastY=y;continue}isLTR?x>lastX&&(lastX=x):x{this.#uiManager.highlightSelection("floating_but\ ton")},{signal}),this.#buttons.append(button)}}function bindEvents(obj,element2,names2){for(const name of names2)element2.addEventListener(name,obj[name].bind(obj))}class IdManager{#id=0;get id(){return`${AnnotationEditorPrefix}${this.#id++}`}}class ImageManager{#baseId=getUuid();#id=0;#cache=null;static get _isSVGFittingCanvas(){const svg2='data:image/svg+xml;charset=UTF-8,',ctx=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),image2=new Image;image2.src=svg2;const promise=image2.decode().then(()=>(ctx.drawImage(image2,0,0,1,1,0,0,1,3),new Uint32Array(ctx.getImageData(0,0,1,1).data.buffer)[0]===0));return shadow(this,"_isSVGFittingCanvas",promise)}async#get(key2,rawData){this.#cache||=new Map;let data=this.#cache.get(key2);if(data===null)return null;if(data?.bitmap)return data.refCounter+=1,data;try{data||={bitmap:null,id:`image_${this.#baseId}\ _${this.#id++}`,refCounter:0,isSvg:!1};let image2;if(typeof rawData=="string"?(data.url=rawData,image2=await fetchData(rawData,"blob")):rawData instanceof File?image2=data.file=rawData:rawData instanceof Blob&&(image2=rawData),image2.type==="image/svg+xml"){const mustRemoveAspectRatioPromise=ImageManager._isSVGFittingCanvas,fileReader=new FileReader,imageElement=new Image,imagePromise=new Promise((resolve2,reject)=>{imageElement.onload=()=>{data.bitmap=imageElement,data.isSvg=!0,resolve2()},fileReader. onload=async()=>{const url2=data.svgUrl=fileReader.result;imageElement.src=await mustRemoveAspectRatioPromise?`${url2}#svgView(preserveAspectRatio(none))`:url2},imageElement.onerror=fileReader.onerror=reject});fileReader.readAsDataURL(image2),await imagePromise}else data.bitmap=await createImageBitmap(image2);data.refCounter=1}catch(e){warn(e),data=null}return this.#cache.set(key2,data),data&&this.#cache.set(data.id,data),data}async getFromFile(file){const{lastModified,name,size:size2,type:type2}=file; return this.#get(`${lastModified}_${name}_${size2}_${type2}`,file)}async getFromUrl(url2){return this.#get(url2,url2)}async getFromBlob(id2,blobPromise){const blob=await blobPromise;return this.#get(id2,blob)}async getFromId(id2){this.#cache||=new Map;const data=this.#cache.get(id2);if(!data)return null;if(data.bitmap)return data.refCounter+=1,data;if(data.file)return this.getFromFile(data.file);if(data.blobPromise){const{blobPromise}=data;return delete data.blobPromise,this.getFromBlob(data.id, blobPromise)}return this.getFromUrl(data.url)}getFromCanvas(id2,canvas){this.#cache||=new Map;let data=this.#cache.get(id2);if(data?.bitmap)return data.refCounter+=1,data;const offscreen=new OffscreenCanvas(canvas.width,canvas.height);return offscreen.getContext("2d").drawImage(canvas,0,0),data={bitmap:offscreen.transferToImageBitmap(),id:`image_${this.#baseId}_${this.#id++}`,refCounter:1,isSvg:!1},this.#cache.set(id2,data),this.#cache.set(data.id,data),data}getSvgUrl(id2){const data=this.#cache. get(id2);return data?.isSvg?data.svgUrl:null}deleteId(id2){this.#cache||=new Map;const data=this.#cache.get(id2);if(!data||(data.refCounter-=1,data.refCounter!==0))return;const{bitmap}=data;if(!data.url&&!data.file){const canvas=new OffscreenCanvas(bitmap.width,bitmap.height);canvas.getContext("bitmaprenderer").transferFromImageBitmap(bitmap),data.blobPromise=canvas.convertToBlob()}bitmap.close?.(),data.bitmap=null}isValidId(id2){return id2.startsWith(`image_${this.#baseId}_`)}}class CommandManager{#commands=[];#locked=!1;#maxSize;#position=-1;constructor(maxSize=128){ this.#maxSize=maxSize}add({cmd,undo,post,mustExec,type:type2=NaN,overwriteIfSameType=!1,keepUndo=!1}){if(mustExec&&cmd(),this.#locked)return;const save={cmd,undo,post,type:type2};if(this.#position===-1){this.#commands.length>0&&(this.#commands.length=0),this.#position=0,this.#commands.push(save);return}if(overwriteIfSameType&&this.#commands[this.#position].type===type2){keepUndo&&(save.undo=this.#commands[this.#position].undo),this.#commands[this.#position]=save;return}const next2=this.#position+ 1;next2===this.#maxSize?this.#commands.splice(0,1):(this.#position=next2,next2=0;i--)if(this.#commands[i].type!==type2){this.#commands.splice(i+1,this.#position-i),this.#position=i;return}this.#commands.length=0,this.#position=-1}}destroy(){this.#commands=null}}class KeyboardManager{constructor(callbacks){this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac}=util_FeatureTest.platform;for(const[keys2,callback,options={}]of callbacks) for(const key2 of keys2){const isMacKey=key2.startsWith("mac+");isMac&&isMacKey?(this.callbacks.set(key2.slice(4),{callback,options}),this.allKeys.add(key2.split("+").at(-1))):!isMac&&!isMacKey&&(this.callbacks.set(key2,{callback,options}),this.allKeys.add(key2.split("+").at(-1)))}}#serialize(event2){event2.altKey&&this.buffer.push("alt"),event2.ctrlKey&&this.buffer.push("ctrl"),event2.metaKey&&this.buffer.push("meta"),event2.shiftKey&&this.buffer.push("shift"),this.buffer.push(event2.key);const str=this. buffer.join("+");return this.buffer.length=0,str}exec(self2,event2){if(!this.allKeys.has(event2.key))return;const info2=this.callbacks.get(this.#serialize(event2));if(!info2)return;const{callback,options:{bubbles=!1,args=[],checker=null}}=info2;checker&&!checker(self2,event2)||(callback.bind(self2,...args,event2)(),bubbles||stopEvent(event2))}}class ColorManager{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){const colors=new Map([["CanvasText",null], ["Canvas",null]]);return getColorValues(colors),shadow(this,"_colors",colors)}convert(color){const rgb=getRGB(color);if(!window.matchMedia("(forced-colors: active)").matches)return rgb;for(const[name,RGB]of this._colors)if(RGB.every((x,i)=>x===rgb[i]))return ColorManager._colorsMapping.get(name);return rgb}getHexCode(name){const rgb=this._colors.get(name);return rgb?Util.makeHexColor(...rgb):name}}class AnnotationEditorUIManager{#abortController=new AbortController;#activeEditor=null;#allEditors=new Map;#allLayers=new Map;#altTextManager=null;#annotationStorage=null;#changedExistingAnnotations=null;#commandManager=new CommandManager;#commentManager=null;#copyPasteAC=null;#currentDrawingSession=null;#currentPageIndex=0;#deletedAnnotationsElementIds=new Set;#draggingEditors=null;#editorTypes=null;#editorsToRescale=new Set;_editorUndoBar=null;#enableHighlightFloatingButton=!1;#enableUpdatedAddImage=!1;#enableNewAltTextWhenAddingImage=!1;#filterFactory=null;#focusMainContainerTimeoutId=null;#focusManagerAC=null;#highlightColors=null;#highlightWhenShiftUp=!1;#highlightToolbar=null;#idManager=new IdManager;#isEnabled=!1;#isWaiting=!1;#keyboardManagerAC=null;#lastActiveElement=null;#mainHighlightColorPicker=null;#missingCanvases=null;#mlManager=null;#mode=AnnotationEditorType. NONE;#selectedEditors=new Set;#selectedTextNode=null;#signatureManager=null;#pageColors=null;#showAllStates=null;#previousStates={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1};#translation=[0,0];#translationTimeoutId=null;#container=null;#viewer=null;#viewerAlert=null;#updateModeCapability=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){const proto=AnnotationEditorUIManager.prototype,arrowChecker=self2=>self2.#container. contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&self2.hasSomethingToControl(),textInputChecker=(_self,{target:el})=>{if(el instanceof HTMLInputElement){const{type:type2}=el;return type2!=="text"&&type2!=="number"}return!0},small=this.TRANSLATE_SMALL,big=this.TRANSLATE_BIG;return shadow(this,"_keyboardManager",new KeyboardManager([[["ctrl+a","mac+meta+a"],proto.selectAll,{checker:textInputChecker}],[["ctrl+z","mac+meta+z"],proto.undo,{checker:textInputChecker}],[["ctr\ l+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],proto.redo,{checker:textInputChecker}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],proto.delete,{checker:textInputChecker}],[["Enter","mac+Enter"],proto.addNewEditorFromKeyboard,{checker:(self2,{target:el})=>!(el instanceof HTMLButtonElement)&&self2.#container.contains(el)&&!self2.isEnterHandled}], [[" ","mac+ "],proto.addNewEditorFromKeyboard,{checker:(self2,{target:el})=>!(el instanceof HTMLButtonElement)&&self2.#container.contains(document.activeElement)}],[["Escape","mac+Escape"],proto.unselectAll],[["ArrowLeft","mac+ArrowLeft"],proto.translateSelectedEditors,{args:[-small,0],checker:arrowChecker}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],proto.translateSelectedEditors,{args:[-big,0],checker:arrowChecker}],[["ArrowRight","mac+ArrowRight"],proto.translateSelectedEditors,{args:[small,0], checker:arrowChecker}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],proto.translateSelectedEditors,{args:[big,0],checker:arrowChecker}],[["ArrowUp","mac+ArrowUp"],proto.translateSelectedEditors,{args:[0,-small],checker:arrowChecker}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],proto.translateSelectedEditors,{args:[0,-big],checker:arrowChecker}],[["ArrowDown","mac+ArrowDown"],proto.translateSelectedEditors,{args:[0,small],checker:arrowChecker}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],proto.translateSelectedEditors, {args:[0,big],checker:arrowChecker}]]))}constructor(container2,viewer,viewerAlert,altTextManager,commentManager,signatureManager,eventBus,pdfDocument,pageColors,highlightColors,enableHighlightFloatingButton,enableUpdatedAddImage,enableNewAltTextWhenAddingImage,mlManager,editorUndoBar,supportsPinchToZoom){const signal=this._signal=this.#abortController.signal;this.#container=container2,this.#viewer=viewer,this.#viewerAlert=viewerAlert,this.#altTextManager=altTextManager,this.#commentManager=commentManager, this.#signatureManager=signatureManager,this._eventBus=eventBus,eventBus._on("editingaction",this.onEditingAction.bind(this),{signal}),eventBus._on("pagechanging",this.onPageChanging.bind(this),{signal}),eventBus._on("scalechanging",this.onScaleChanging.bind(this),{signal}),eventBus._on("rotationchanging",this.onRotationChanging.bind(this),{signal}),eventBus._on("setpreference",this.onSetPreference.bind(this),{signal}),eventBus._on("switchannotationeditorparams",evt=>this.updateParams(evt.type,evt. value),{signal}),this.#addSelectionListener(),this.#addDragAndDropListeners(),this.#addKeyboardManager(),this.#annotationStorage=pdfDocument.annotationStorage,this.#filterFactory=pdfDocument.filterFactory,this.#pageColors=pageColors,this.#highlightColors=highlightColors||null,this.#enableHighlightFloatingButton=enableHighlightFloatingButton,this.#enableUpdatedAddImage=enableUpdatedAddImage,this.#enableNewAltTextWhenAddingImage=enableNewAltTextWhenAddingImage,this.#mlManager=mlManager||null,this. viewParameters={realScale:PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=editorUndoBar||null,this._supportsPinchToZoom=supportsPinchToZoom!==!1}destroy(){this.#updateModeCapability?.resolve(),this.#updateModeCapability=null,this.#abortController?.abort(),this.#abortController=null,this._signal=null;for(const layer of this.#allLayers.values())layer.destroy();this.#allLayers.clear(),this.#allEditors.clear(),this.#editorsToRescale.clear(),this.#missingCanvases?. clear(),this.#activeEditor=null,this.#selectedEditors.clear(),this.#commandManager.destroy(),this.#altTextManager?.destroy(),this.#commentManager?.destroy(),this.#signatureManager?.destroy(),this.#highlightToolbar?.hide(),this.#highlightToolbar=null,this.#mainHighlightColorPicker?.destroy(),this.#mainHighlightColorPicker=null,this.#focusMainContainerTimeoutId&&(clearTimeout(this.#focusMainContainerTimeoutId),this.#focusMainContainerTimeoutId=null),this.#translationTimeoutId&&(clearTimeout(this.#translationTimeoutId), this.#translationTimeoutId=null),this._editorUndoBar?.destroy()}combinedSignal(ac){return AbortSignal.any([this._signal,ac.signal])}get mlManager(){return this.#mlManager}get useNewAltTextFlow(){return this.#enableUpdatedAddImage}get useNewAltTextWhenAddingImage(){return this.#enableNewAltTextWhenAddingImage}get hcmFilter(){return shadow(this,"hcmFilter",this.#pageColors?this.#filterFactory.addHCMFilter(this.#pageColors.foreground,this.#pageColors.background):"none")}get direction(){return shadow( this,"direction",getComputedStyle(this.#container).direction)}get _highlightColors(){return shadow(this,"_highlightColors",this.#highlightColors?new Map(this.#highlightColors.split(",").map(pair=>(pair=pair.split("=").map(x=>x.trim()),pair[1]=pair[1].toUpperCase(),pair))):null)}get highlightColors(){const{_highlightColors}=this;if(!_highlightColors)return shadow(this,"highlightColors",null);const map2=new Map,hasHCM=!!this.#pageColors;for(const[name,color]of _highlightColors){const isNameForHCM=name. endsWith("_HCM");if(hasHCM&&isNameForHCM){map2.set(name.replace("_HCM",""),color);continue}!hasHCM&&!isNameForHCM&&map2.set(name,color)}return shadow(this,"highlightColors",map2)}get highlightColorNames(){return shadow(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,e=>e.reverse())):null)}getNonHCMColor(color){if(!this._highlightColors)return color;const colorName=this.highlightColorNames.get(color);return this._highlightColors.get(colorName)||color}getNonHCMColorName(color){ return this.highlightColorNames.get(color)||color}setCurrentDrawingSession(layer){layer?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),this.#currentDrawingSession=layer}setMainHighlightColorPicker(colorPicker){this.#mainHighlightColorPicker=colorPicker}editAltText(editor,firstTime=!1){this.#altTextManager?.editAltText(this,editor,firstTime)}hasCommentManager(){return!!this.#commentManager}editComment(editor,position2){this.#commentManager?.open(this,editor,position2)}getSignature(editor){ this.#signatureManager?.getSignature({uiManager:this,editor})}get signatureManager(){return this.#signatureManager}switchToMode(mode,callback){this._eventBus.on("annotationeditormodechanged",callback,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode})}setPreference(name,value){this._eventBus.dispatch("setpreference",{source:this,name,value})}onSetPreference({name,value}){switch(name){case"enableNewAltTextWhenAddingImage":this.#enableNewAltTextWhenAddingImage= value;break}}onPageChanging({pageNumber}){this.#currentPageIndex=pageNumber-1}focusMainContainer(){this.#container.focus()}findParent(x,y){for(const layer of this.#allLayers.values()){const{x:layerX,y:layerY,width,height}=layer.div.getBoundingClientRect();if(x>=layerX&&x<=layerX+width&&y>=layerY&&y<=layerY+height)return layer}return null}disableUserSelect(value=!1){this.#viewer.classList.toggle("noUserSelect",value)}addShouldRescale(editor){this.#editorsToRescale.add(editor)}removeShouldRescale(editor){ this.#editorsToRescale.delete(editor)}onScaleChanging({scale:scale2}){this.commitOrRemove(),this.viewParameters.realScale=scale2*PixelsPerInch.PDF_TO_CSS_UNITS;for(const editor of this.#editorsToRescale)editor.onScaleChanging();this.#currentDrawingSession?.onScaleChanging()}onRotationChanging({pagesRotation}){this.commitOrRemove(),this.viewParameters.rotation=pagesRotation}#getAnchorElementForSelection({anchorNode}){return anchorNode.nodeType===Node.TEXT_NODE?anchorNode.parentElement:anchorNode}#getLayerForTextLayer(textLayer){ const{currentLayer}=this;if(currentLayer.hasTextLayer(textLayer))return currentLayer;for(const layer of this.#allLayers.values())if(layer.hasTextLayer(textLayer))return layer;return null}highlightSelection(methodOfCreation=""){const selection=document.getSelection();if(!selection||selection.isCollapsed)return;const{anchorNode,anchorOffset,focusNode,focusOffset}=selection,text2=selection.toString(),textLayer=this.#getAnchorElementForSelection(selection).closest(".textLayer"),boxes=this.getSelectionBoxes( textLayer);if(!boxes)return;selection.empty();const layer=this.#getLayerForTextLayer(textLayer),isNoneMode=this.#mode===AnnotationEditorType.NONE,callback=()=>{layer?.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation,boxes,anchorNode,anchorOffset,focusNode,focusOffset,text:text2}),isNoneMode&&this.showAllEditors("highlight",!0,!0)};if(isNoneMode){this.switchToMode(AnnotationEditorType.HIGHLIGHT,callback);return}callback()}#displayHighlightToolbar(){const selection=document.getSelection();if(!selection|| selection.isCollapsed)return;const textLayer=this.#getAnchorElementForSelection(selection).closest(".textLayer"),boxes=this.getSelectionBoxes(textLayer);boxes&&(this.#highlightToolbar||=new HighlightToolbar(this),this.#highlightToolbar.show(textLayer,boxes,this.direction==="ltr"))}addToAnnotationStorage(editor){!editor.isEmpty()&&this.#annotationStorage&&!this.#annotationStorage.has(editor.id)&&this.#annotationStorage.setValue(editor.id,editor)}a11yAlert(messageId,args=null){const viewerAlert=this.#viewerAlert; viewerAlert&&(viewerAlert.setAttribute("data-l10n-id",messageId),args?viewerAlert.setAttribute("data-l10n-args",JSON.stringify(args)):viewerAlert.removeAttribute("data-l10n-args"))}#selectionChange(){const selection=document.getSelection();if(!selection||selection.isCollapsed){this.#selectedTextNode&&(this.#highlightToolbar?.hide(),this.#selectedTextNode=null,this.#dispatchUpdateStates({hasSelectedText:!1}));return}const{anchorNode}=selection;if(anchorNode===this.#selectedTextNode)return;const textLayer=this.#getAnchorElementForSelection( selection).closest(".textLayer");if(!textLayer){this.#selectedTextNode&&(this.#highlightToolbar?.hide(),this.#selectedTextNode=null,this.#dispatchUpdateStates({hasSelectedText:!1}));return}if(this.#highlightToolbar?.hide(),this.#selectedTextNode=anchorNode,this.#dispatchUpdateStates({hasSelectedText:!0}),!(this.#mode!==AnnotationEditorType.HIGHLIGHT&&this.#mode!==AnnotationEditorType.NONE)&&(this.#mode===AnnotationEditorType.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),this.#highlightWhenShiftUp= this.isShiftKeyDown,!this.isShiftKeyDown)){const activeLayer=this.#mode===AnnotationEditorType.HIGHLIGHT?this.#getLayerForTextLayer(textLayer):null;activeLayer?.toggleDrawing();const ac=new AbortController,signal=this.combinedSignal(ac),pointerup=e=>{e.type==="pointerup"&&e.button!==0||(ac.abort(),activeLayer?.toggleDrawing(!0),e.type==="pointerup"&&this.#onSelectEnd("main_toolbar"))};window.addEventListener("pointerup",pointerup,{signal}),window.addEventListener("blur",pointerup,{signal})}}#onSelectEnd(methodOfCreation=""){ this.#mode===AnnotationEditorType.HIGHLIGHT?this.highlightSelection(methodOfCreation):this.#enableHighlightFloatingButton&&this.#displayHighlightToolbar()}#addSelectionListener(){document.addEventListener("selectionchange",this.#selectionChange.bind(this),{signal:this._signal})}#addFocusManager(){if(this.#focusManagerAC)return;this.#focusManagerAC=new AbortController;const signal=this.combinedSignal(this.#focusManagerAC);window.addEventListener("focus",this.focus.bind(this),{signal}),window.addEventListener( "blur",this.blur.bind(this),{signal})}#removeFocusManager(){this.#focusManagerAC?.abort(),this.#focusManagerAC=null}blur(){if(this.isShiftKeyDown=!1,this.#highlightWhenShiftUp&&(this.#highlightWhenShiftUp=!1,this.#onSelectEnd("main_toolbar")),!this.hasSelection)return;const{activeElement}=document;for(const editor of this.#selectedEditors)if(editor.div.contains(activeElement)){this.#lastActiveElement=[editor,activeElement],editor._focusEventsAllowed=!1;break}}focus(){if(!this.#lastActiveElement) return;const[lastEditor,lastActiveElement]=this.#lastActiveElement;this.#lastActiveElement=null,lastActiveElement.addEventListener("focusin",()=>{lastEditor._focusEventsAllowed=!0},{once:!0,signal:this._signal}),lastActiveElement.focus()}#addKeyboardManager(){if(this.#keyboardManagerAC)return;this.#keyboardManagerAC=new AbortController;const signal=this.combinedSignal(this.#keyboardManagerAC);window.addEventListener("keydown",this.keydown.bind(this),{signal}),window.addEventListener("keyup",this. keyup.bind(this),{signal})}#removeKeyboardManager(){this.#keyboardManagerAC?.abort(),this.#keyboardManagerAC=null}#addCopyPasteListeners(){if(this.#copyPasteAC)return;this.#copyPasteAC=new AbortController;const signal=this.combinedSignal(this.#copyPasteAC);document.addEventListener("copy",this.copy.bind(this),{signal}),document.addEventListener("cut",this.cut.bind(this),{signal}),document.addEventListener("paste",this.paste.bind(this),{signal})}#removeCopyPasteListeners(){this.#copyPasteAC?.abort(), this.#copyPasteAC=null}#addDragAndDropListeners(){const signal=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal}),document.addEventListener("drop",this.drop.bind(this),{signal})}addEditListeners(){this.#addKeyboardManager(),this.#addCopyPasteListeners()}removeEditListeners(){this.#removeKeyboardManager(),this.#removeCopyPasteListeners()}dragOver(event2){for(const{type:type2}of event2.dataTransfer.items)for(const editorType of this.#editorTypes)if(editorType.isHandlingMimeForPasting( type2)){event2.dataTransfer.dropEffect="copy",event2.preventDefault();return}}drop(event2){for(const item of event2.dataTransfer.items)for(const editorType of this.#editorTypes)if(editorType.isHandlingMimeForPasting(item.type)){editorType.paste(item,this.currentLayer),event2.preventDefault();return}}copy(event2){if(event2.preventDefault(),this.#activeEditor?.commitOrRemove(),!this.hasSelection)return;const editors=[];for(const editor of this.#selectedEditors){const serialized=editor.serialize(!0); serialized&&editors.push(serialized)}editors.length!==0&&event2.clipboardData.setData("application/pdfjs",JSON.stringify(editors))}cut(event2){this.copy(event2),this.delete()}async paste(event2){event2.preventDefault();const{clipboardData}=event2;for(const item of clipboardData.items)for(const editorType of this.#editorTypes)if(editorType.isHandlingMimeForPasting(item.type)){editorType.paste(item,this.currentLayer);return}let data=clipboardData.getData("application/pdfjs");if(!data)return;try{data= JSON.parse(data)}catch(ex){warn(`paste: "${ex.message}".`);return}if(!Array.isArray(data))return;this.unselectAll();const layer=this.currentLayer;try{const newEditors=[];for(const editor of data){const deserializedEditor=await layer.deserialize(editor);if(!deserializedEditor)return;newEditors.push(deserializedEditor)}const cmd=()=>{for(const editor of newEditors)this.#addEditorToLayer(editor);this.#selectEditors(newEditors)},undo=()=>{for(const editor of newEditors)editor.remove()};this.addCommands( {cmd,undo,mustExec:!0})}catch(ex){warn(`paste: "${ex.message}".`)}}keydown(event2){!this.isShiftKeyDown&&event2.key==="Shift"&&(this.isShiftKeyDown=!0),this.#mode!==AnnotationEditorType.NONE&&!this.isEditorHandlingKeyboard&&AnnotationEditorUIManager._keyboardManager.exec(this,event2)}keyup(event2){this.isShiftKeyDown&&event2.key==="Shift"&&(this.isShiftKeyDown=!1,this.#highlightWhenShiftUp&&(this.#highlightWhenShiftUp=!1,this.#onSelectEnd("main_toolbar")))}onEditingAction({name}){switch(name){case"\ undo":case"redo":case"delete":case"selectAll":this[name]();break;case"highlightSelection":this.highlightSelection("context_menu");break}}#dispatchUpdateStates(details){Object.entries(details).some(([key2,value])=>this.#previousStates[key2]!==value)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#previousStates,details)}),this.#mode===AnnotationEditorType.HIGHLIGHT&&details.hasSelectedEditor===!1&&this.#dispatchUpdateUI([[AnnotationEditorParamsType. HIGHLIGHT_FREE,!0]]))}#dispatchUpdateUI(details){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details})}setEditingState(isEditing2){isEditing2?(this.#addFocusManager(),this.#addCopyPasteListeners(),this.#dispatchUpdateStates({isEditing:this.#mode!==AnnotationEditorType.NONE,isEmpty:this.#isEmpty(),hasSomethingToUndo:this.#commandManager.hasSomethingToUndo(),hasSomethingToRedo:this.#commandManager.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#removeFocusManager(),this.#removeCopyPasteListeners(), this.#dispatchUpdateStates({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(types2){if(!this.#editorTypes){this.#editorTypes=types2;for(const editorType of this.#editorTypes)this.#dispatchUpdateUI(editorType.defaultPropertiesToUpdate)}}getId(){return this.#idManager.id}get currentLayer(){return this.#allLayers.get(this.#currentPageIndex)}getLayer(pageIndex){return this.#allLayers.get(pageIndex)}get currentPageIndex(){return this.#currentPageIndex}addLayer(layer){this.#allLayers.set( layer.pageIndex,layer),this.#isEnabled?layer.enable():layer.disable()}removeLayer(layer){this.#allLayers.delete(layer.pageIndex)}async updateMode(mode,editId=null,isFromKeyboard=!1,mustEnterInEditMode=!1,editComment=!1){if(this.#mode!==mode&&!(this.#updateModeCapability&&(await this.#updateModeCapability.promise,!this.#updateModeCapability))){if(this.#updateModeCapability=Promise.withResolvers(),this.#currentDrawingSession?.commitOrRemove(),this.#mode=mode,mode===AnnotationEditorType.NONE){this. setEditingState(!1),this.#disableAll(),this._editorUndoBar?.hide(),this.#updateModeCapability.resolve();return}mode===AnnotationEditorType.SIGNATURE&&await this.#signatureManager?.loadSignatures(),this.setEditingState(!0),await this.#enableAll(),this.unselectAll();for(const layer of this.#allLayers.values())layer.updateMode(mode);if(!editId){isFromKeyboard&&this.addNewEditorFromKeyboard(),this.#updateModeCapability.resolve();return}for(const editor of this.#allEditors.values())editor.annotationElementId=== editId||editor.id===editId?(this.setSelected(editor),editComment?editor.editComment():mustEnterInEditMode&&editor.enterInEditMode()):editor.unselect();this.#updateModeCapability.resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(options){options.mode!==this.#mode&&this._eventBus.dispatch("switchannotationeditormode",{source:this,...options})}updateParams(type2,value){if(this.#editorTypes){switch(type2){case AnnotationEditorParamsType. CREATE:this.currentLayer.addNewEditor(value);return;case AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(this.#showAllStates||=new Map).set(type2,value),this.showAllEditors("highlight",value);break}if(this.hasSelection)for(const editor of this.#selectedEditors)editor.updateParams(type2,value);else for(const editorType of this.#editorTypes)editorType.updateDefaultParams( type2,value)}}showAllEditors(type2,visible,updateButton=!1){for(const editor of this.#allEditors.values())editor.editorType===type2&&editor.show(visible);(this.#showAllStates?.get(AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL)??!0)!==visible&&this.#dispatchUpdateUI([[AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL,visible]])}enableWaiting(mustWait=!1){if(this.#isWaiting!==mustWait){this.#isWaiting=mustWait;for(const layer of this.#allLayers.values())mustWait?layer.disableClick():layer.enableClick(), layer.div.classList.toggle("waiting",mustWait)}}async#enableAll(){if(!this.#isEnabled){this.#isEnabled=!0;const promises=[];for(const layer of this.#allLayers.values())promises.push(layer.enable());await Promise.all(promises);for(const editor of this.#allEditors.values())editor.enable()}}#disableAll(){if(this.unselectAll(),this.#isEnabled){this.#isEnabled=!1;for(const layer of this.#allLayers.values())layer.disable();for(const editor of this.#allEditors.values())editor.disable()}}getEditors(pageIndex){ const editors=[];for(const editor of this.#allEditors.values())editor.pageIndex===pageIndex&&editors.push(editor);return editors}getEditor(id2){return this.#allEditors.get(id2)}addEditor(editor){this.#allEditors.set(editor.id,editor)}removeEditor(editor){editor.div.contains(document.activeElement)&&(this.#focusMainContainerTimeoutId&&clearTimeout(this.#focusMainContainerTimeoutId),this.#focusMainContainerTimeoutId=setTimeout(()=>{this.focusMainContainer(),this.#focusMainContainerTimeoutId=null}, 0)),this.#allEditors.delete(editor.id),editor.annotationElementId&&this.#missingCanvases?.delete(editor.annotationElementId),this.unselect(editor),(!editor.annotationElementId||!this.#deletedAnnotationsElementIds.has(editor.annotationElementId))&&this.#annotationStorage?.remove(editor.id)}addDeletedAnnotationElement(editor){this.#deletedAnnotationsElementIds.add(editor.annotationElementId),this.addChangedExistingAnnotation(editor),editor.deleted=!0}isDeletedAnnotationElement(annotationElementId){ return this.#deletedAnnotationsElementIds.has(annotationElementId)}removeDeletedAnnotationElement(editor){this.#deletedAnnotationsElementIds.delete(editor.annotationElementId),this.removeChangedExistingAnnotation(editor),editor.deleted=!1}#addEditorToLayer(editor){const layer=this.#allLayers.get(editor.pageIndex);layer?layer.addOrRebuild(editor):(this.addEditor(editor),this.addToAnnotationStorage(editor))}setActiveEditor(editor){this.#activeEditor!==editor&&(this.#activeEditor=editor,editor&&this.#dispatchUpdateUI( editor.propertiesToUpdate))}get#lastSelectedEditor(){let ed=null;for(ed of this.#selectedEditors);return ed}updateUI(editor){this.#lastSelectedEditor===editor&&this.#dispatchUpdateUI(editor.propertiesToUpdate)}updateUIForDefaultProperties(editorType){this.#dispatchUpdateUI(editorType.defaultPropertiesToUpdate)}toggleSelected(editor){if(this.#selectedEditors.has(editor)){this.#selectedEditors.delete(editor),editor.unselect(),this.#dispatchUpdateStates({hasSelectedEditor:this.hasSelection});return} this.#selectedEditors.add(editor),editor.select(),this.#dispatchUpdateUI(editor.propertiesToUpdate),this.#dispatchUpdateStates({hasSelectedEditor:!0})}setSelected(editor){this.updateToolbar({mode:editor.mode,editId:editor.id}),this.#currentDrawingSession?.commitOrRemove();for(const ed of this.#selectedEditors)ed!==editor&&ed.unselect();this.#selectedEditors.clear(),this.#selectedEditors.add(editor),editor.select(),this.#dispatchUpdateUI(editor.propertiesToUpdate),this.#dispatchUpdateStates({hasSelectedEditor:!0})}isSelected(editor){ return this.#selectedEditors.has(editor)}get firstSelectedEditor(){return this.#selectedEditors.values().next().value}unselect(editor){editor.unselect(),this.#selectedEditors.delete(editor),this.#dispatchUpdateStates({hasSelectedEditor:this.hasSelection})}get hasSelection(){return this.#selectedEditors.size!==0}get isEnterHandled(){return this.#selectedEditors.size===1&&this.firstSelectedEditor.isEnterHandled}undo(){this.#commandManager.undo(),this.#dispatchUpdateStates({hasSomethingToUndo:this.#commandManager. hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#isEmpty()}),this._editorUndoBar?.hide()}redo(){this.#commandManager.redo(),this.#dispatchUpdateStates({hasSomethingToUndo:!0,hasSomethingToRedo:this.#commandManager.hasSomethingToRedo(),isEmpty:this.#isEmpty()})}addCommands(params){this.#commandManager.add(params),this.#dispatchUpdateStates({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#isEmpty()})}cleanUndoStack(type2){this.#commandManager.cleanType(type2)}#isEmpty(){if(this.#allEditors. size===0)return!0;if(this.#allEditors.size===1)for(const editor of this.#allEditors.values())return editor.isEmpty();return!1}delete(){this.commitOrRemove();const drawingEditor=this.currentLayer?.endDrawingSession(!0);if(!this.hasSelection&&!drawingEditor)return;const editors=drawingEditor?[drawingEditor]:[...this.#selectedEditors],cmd=()=>{this._editorUndoBar?.show(undo,editors.length===1?editors[0].editorType:editors.length);for(const editor of editors)editor.remove()},undo=()=>{for(const editor of editors) this.#addEditorToLayer(editor)};this.addCommands({cmd,undo,mustExec:!0})}commitOrRemove(){this.#activeEditor?.commitOrRemove()}hasSomethingToControl(){return this.#activeEditor||this.hasSelection}#selectEditors(editors){for(const editor of this.#selectedEditors)editor.unselect();this.#selectedEditors.clear();for(const editor of editors)editor.isEmpty()||(this.#selectedEditors.add(editor),editor.select());this.#dispatchUpdateStates({hasSelectedEditor:this.hasSelection})}selectAll(){for(const editor of this.#selectedEditors) editor.commit();this.#selectEditors(this.#allEditors.values())}unselectAll(){if(!(this.#activeEditor&&(this.#activeEditor.commitOrRemove(),this.#mode!==AnnotationEditorType.NONE))&&!this.#currentDrawingSession?.commitOrRemove()&&this.hasSelection){for(const editor of this.#selectedEditors)editor.unselect();this.#selectedEditors.clear(),this.#dispatchUpdateStates({hasSelectedEditor:!1})}}translateSelectedEditors(x,y,noCommit=!1){if(noCommit||this.commitOrRemove(),!this.hasSelection)return;this.#translation[0]+= x,this.#translation[1]+=y;const[totalX,totalY]=this.#translation,editors=[...this.#selectedEditors],TIME_TO_WAIT=1e3;this.#translationTimeoutId&&clearTimeout(this.#translationTimeoutId),this.#translationTimeoutId=setTimeout(()=>{this.#translationTimeoutId=null,this.#translation[0]=this.#translation[1]=0,this.addCommands({cmd:()=>{for(const editor of editors)this.#allEditors.has(editor.id)&&(editor.translateInPage(totalX,totalY),editor.translationDone())},undo:()=>{for(const editor of editors)this.#allEditors. has(editor.id)&&(editor.translateInPage(-totalX,-totalY),editor.translationDone())},mustExec:!1})},TIME_TO_WAIT);for(const editor of editors)editor.translateInPage(x,y),editor.translationDone()}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#draggingEditors=new Map;for(const editor of this.#selectedEditors)this.#draggingEditors.set(editor,{savedX:editor.x,savedY:editor.y,savedPageIndex:editor.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#draggingEditors) return!1;this.disableUserSelect(!1);const map2=this.#draggingEditors;this.#draggingEditors=null;let mustBeAddedInUndoStack=!1;for(const[{x,y,pageIndex},value]of map2)value.newX=x,value.newY=y,value.newPageIndex=pageIndex,mustBeAddedInUndoStack||=x!==value.savedX||y!==value.savedY||pageIndex!==value.savedPageIndex;if(!mustBeAddedInUndoStack)return!1;const move2=(editor,x,y,pageIndex)=>{if(this.#allEditors.has(editor.id)){const parent=this.#allLayers.get(pageIndex);parent?editor._setParentAndPosition( parent,x,y):(editor.pageIndex=pageIndex,editor.x=x,editor.y=y)}};return this.addCommands({cmd:()=>{for(const[editor,{newX,newY,newPageIndex}]of map2)move2(editor,newX,newY,newPageIndex)},undo:()=>{for(const[editor,{savedX,savedY,savedPageIndex}]of map2)move2(editor,savedX,savedY,savedPageIndex)},mustExec:!0}),!0}dragSelectedEditors(tx,ty){if(this.#draggingEditors)for(const editor of this.#draggingEditors.keys())editor.drag(tx,ty)}rebuild(editor){if(editor.parent===null){const parent=this.getLayer( editor.pageIndex);parent?(parent.changeParent(editor),parent.addOrRebuild(editor)):(this.addEditor(editor),this.addToAnnotationStorage(editor),editor.rebuild())}else editor.parent.addOrRebuild(editor)}get isEditorHandlingKeyboard(){return this.getActive()?.shouldGetKeyboardEvents()||this.#selectedEditors.size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(editor){return this.#activeEditor===editor}getActive(){return this.#activeEditor}getMode(){return this.#mode}get imageManager(){ return shadow(this,"imageManager",new ImageManager)}getSelectionBoxes(textLayer){if(!textLayer)return null;const selection=document.getSelection();for(let i=0,ii=selection.rangeCount;i({x:(y-layerY)/parentHeight,y:1-(x+ w-layerX)/parentWidth,width:h2/parentHeight,height:w/parentWidth});break;case"180":rotator=(x,y,w,h2)=>({x:1-(x+w-layerX)/parentWidth,y:1-(y+h2-layerY)/parentHeight,width:w/parentWidth,height:h2/parentHeight});break;case"270":rotator=(x,y,w,h2)=>({x:1-(y+h2-layerY)/parentHeight,y:(x-layerX)/parentWidth,width:h2/parentHeight,height:w/parentWidth});break;default:rotator=(x,y,w,h2)=>({x:(x-layerX)/parentWidth,y:(y-layerY)/parentHeight,width:w/parentWidth,height:h2/parentHeight});break}const boxes=[]; for(let i=0,ii=selection.rangeCount;ievent2.stopPropagation(),{signal});const onClick=event2=>{event2.preventDefault(),this.#editor._uiManager.editAltText(this.#editor),this.#useNewAltTextFlow&&this.#editor._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:this.#label}})};return altText.addEventListener("click",onClick,{capture:!0,signal}),altText.addEventListener("keydown",event2=>{event2.target=== altText&&event2.key==="Enter"&&(this.#altTextWasFromKeyBoard=!0,onClick(event2))},{signal}),await this.#setState(),altText}get#label(){return this.#altText&&"added"||this.#altText===null&&this.guessedText&&"review"||"missing"}finish(){this.#altTextButton&&(this.#altTextButton.focus({focusVisible:this.#altTextWasFromKeyBoard}),this.#altTextWasFromKeyBoard=!1)}isEmpty(){return this.#useNewAltTextFlow?this.#altText===null:!this.#altText&&!this.#altTextDecorative}hasData(){return this.#useNewAltTextFlow? this.#altText!==null||!!this.#guessedText:this.isEmpty()}get guessedText(){return this.#guessedText}async setGuessedText(guessedText){this.#altText===null&&(this.#guessedText=guessedText,this.#textWithDisclaimer=await AltText._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:guessedText}),this.#setState())}toggleAltTextBadge(visibility=!1){if(!this.#useNewAltTextFlow||this.#altText){this.#badge?.remove(),this.#badge=null;return}if(!this.#badge){const badge=this.#badge= document.createElement("div");badge.className="noAltTextBadge",this.#editor.div.append(badge)}this.#badge.classList.toggle("hidden",!visibility)}serialize(isForCopying){let altText=this.#altText;return!isForCopying&&this.#guessedText===altText&&(altText=this.#textWithDisclaimer),{altText,decorative:this.#altTextDecorative,guessedText:this.#guessedText,textWithDisclaimer:this.#textWithDisclaimer}}get data(){return{altText:this.#altText,decorative:this.#altTextDecorative}}set data({altText,decorative, guessedText,textWithDisclaimer,cancel=!1}){guessedText&&(this.#guessedText=guessedText,this.#textWithDisclaimer=textWithDisclaimer),!(this.#altText===altText&&this.#altTextDecorative===decorative)&&(cancel||(this.#altText=altText,this.#altTextDecorative=decorative),this.#setState())}toggle(enabled=!1){this.#altTextButton&&(!enabled&&this.#altTextTooltipTimeout&&(clearTimeout(this.#altTextTooltipTimeout),this.#altTextTooltipTimeout=null),this.#altTextButton.disabled=!enabled)}shown(){this.#editor. _reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:this.#label}})}destroy(){this.#altTextButton?.remove(),this.#altTextButton=null,this.#altTextButtonLabel=null,this.#altTextTooltip=null,this.#badge?.remove(),this.#badge=null}async#setState(){const button=this.#altTextButton;if(!button)return;if(this.#useNewAltTextFlow){if(button.classList.toggle("done",!!this.#altText),button.setAttribute("data-l10n-id",AltText.#l10nNewButton[this.#label]),this.#altTextButtonLabel?. setAttribute("data-l10n-id",AltText.#l10nNewButton[`${this.#label}-label`]),!this.#altText){this.#altTextTooltip?.remove();return}}else{if(!this.#altText&&!this.#altTextDecorative){button.classList.remove("done"),this.#altTextTooltip?.remove();return}button.classList.add("done"),button.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let tooltip=this.#altTextTooltip;if(!tooltip){this.#altTextTooltip=tooltip=document.createElement("span"),tooltip.className="tooltip",tooltip.setAttribute( "role","tooltip"),tooltip.id=`alt-text-tooltip-${this.#editor.id}`;const DELAY_TO_SHOW_TOOLTIP=100,signal=this.#editor._uiManager._signal;signal.addEventListener("abort",()=>{clearTimeout(this.#altTextTooltipTimeout),this.#altTextTooltipTimeout=null},{once:!0}),button.addEventListener("mouseenter",()=>{this.#altTextTooltipTimeout=setTimeout(()=>{this.#altTextTooltipTimeout=null,this.#altTextTooltip.classList.add("show"),this.#editor._reportTelemetry({action:"alt_text_tooltip"})},DELAY_TO_SHOW_TOOLTIP)}, {signal}),button.addEventListener("mouseleave",()=>{this.#altTextTooltipTimeout&&(clearTimeout(this.#altTextTooltipTimeout),this.#altTextTooltipTimeout=null),this.#altTextTooltip?.classList.remove("show")},{signal})}this.#altTextDecorative?tooltip.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(tooltip.removeAttribute("data-l10n-id"),tooltip.textContent=this.#altText),tooltip.parentNode||button.append(tooltip),this.#editor.getElementForAltText()?.setAttribute("aria-descr\ ibedby",tooltip.id)}}let Comment$1=class{#commentButton=null;#commentWasFromKeyBoard=!1;#editor=null;#initialText=null;#text=null;#date=null;#deleted=!1;constructor(editor){this.#editor=editor,this.toolbar=null}render(){if(!this.#editor._uiManager.hasCommentManager())return null;const comment2=this.#commentButton=document.createElement("button");comment2.className="comment",comment2.tabIndex="0",comment2.setAttribute("data-l10n-id","pdfjs-editor-edit-comment-button");const signal=this.#editor._uiManager. _signal;comment2.addEventListener("contextmenu",noContextMenu,{signal}),comment2.addEventListener("pointerdown",event2=>event2.stopPropagation(),{signal});const onClick=event2=>{event2.preventDefault(),this.edit()};return comment2.addEventListener("click",onClick,{capture:!0,signal}),comment2.addEventListener("keydown",event2=>{event2.target===comment2&&event2.key==="Enter"&&(this.#commentWasFromKeyBoard=!0,onClick(event2))},{signal}),comment2}edit(){const{bottom,left,right}=this.#editor.getClientDimensions(), position2={top:bottom};this.#editor._uiManager.direction==="ltr"?position2.right=right:position2.left=left,this.#editor._uiManager.editComment(this.#editor,position2)}finish(){this.#commentButton&&(this.#commentButton.focus({focusVisible:this.#commentWasFromKeyBoard}),this.#commentWasFromKeyBoard=!1)}isDeleted(){return this.#deleted||this.#text===""}hasBeenEdited(){return this.isDeleted()||this.#text!==this.#initialText}serialize(){return this.data}get data(){return{text:this.#text,date:this.#date, deleted:this.#deleted}}set data(text2){if(text2===null){this.#text="",this.#deleted=!0;return}this.#text=text2,this.#date=new Date,this.#deleted=!1}setInitialText(text2){this.#initialText=text2,this.data=text2}toggle(enabled=!1){this.#commentButton&&(this.#commentButton.disabled=!enabled)}shown(){}destroy(){this.#commentButton?.remove(),this.#commentButton=null,this.#text="",this.#date=null,this.#editor=null,this.#commentWasFromKeyBoard=!1,this.#deleted=!1}};class TouchManager{#container;#isPinching=!1;#isPinchingStopped=null;#isPinchingDisabled;#onPinchStart;#onPinching;#onPinchEnd;#pointerDownAC=null;#signal;#touchInfo=null;#touchManagerAC;#touchMoveAC=null;constructor({ container:container2,isPinchingDisabled=null,isPinchingStopped=null,onPinchStart=null,onPinching=null,onPinchEnd=null,signal}){this.#container=container2,this.#isPinchingStopped=isPinchingStopped,this.#isPinchingDisabled=isPinchingDisabled,this.#onPinchStart=onPinchStart,this.#onPinching=onPinching,this.#onPinchEnd=onPinchEnd,this.#touchManagerAC=new AbortController,this.#signal=AbortSignal.any([signal,this.#touchManagerAC.signal]),container2.addEventListener("touchstart",this.#onTouchStart.bind( this),{passive:!1,signal:this.#signal})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return 35/OutputScale.pixelRatio}#onTouchStart(evt){if(this.#isPinchingDisabled?.())return;if(evt.touches.length===1){if(this.#pointerDownAC)return;const pointerDownAC=this.#pointerDownAC=new AbortController,signal=AbortSignal.any([this.#signal,pointerDownAC.signal]),container2=this.#container,opts={capture:!0,signal,passive:!1},cancelPointerDown=e=>{e.pointerType==="touch"&&(this.#pointerDownAC?.abort(),this.#pointerDownAC= null)};container2.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(stopEvent(e),cancelPointerDown(e))},opts),container2.addEventListener("pointerup",cancelPointerDown,opts),container2.addEventListener("pointercancel",cancelPointerDown,opts);return}if(!this.#touchMoveAC){this.#touchMoveAC=new AbortController;const signal=AbortSignal.any([this.#signal,this.#touchMoveAC.signal]),container2=this.#container,opt={signal,capture:!1,passive:!1};container2.addEventListener("touchmove",this.#onTouchMove. bind(this),opt);const onTouchEnd=this.#onTouchEnd.bind(this);container2.addEventListener("touchend",onTouchEnd,opt),container2.addEventListener("touchcancel",onTouchEnd,opt),opt.capture=!0,container2.addEventListener("pointerdown",stopEvent,opt),container2.addEventListener("pointermove",stopEvent,opt),container2.addEventListener("pointercancel",stopEvent,opt),container2.addEventListener("pointerup",stopEvent,opt),this.#onPinchStart?.()}if(stopEvent(evt),evt.touches.length!==2||this.#isPinchingStopped?.()){ this.#touchInfo=null;return}let[touch0,touch1]=evt.touches;touch0.identifier>touch1.identifier&&([touch0,touch1]=[touch1,touch0]),this.#touchInfo={touch0X:touch0.screenX,touch0Y:touch0.screenY,touch1X:touch1.screenX,touch1Y:touch1.screenY}}#onTouchMove(evt){if(!this.#touchInfo||evt.touches.length!==2)return;stopEvent(evt);let[touch0,touch1]=evt.touches;touch0.identifier>touch1.identifier&&([touch0,touch1]=[touch1,touch0]);const{screenX:screen0X,screenY:screen0Y}=touch0,{screenX:screen1X,screenY:screen1Y}=touch1, touchInfo=this.#touchInfo,{touch0X:pTouch0X,touch0Y:pTouch0Y,touch1X:pTouch1X,touch1Y:pTouch1Y}=touchInfo,prevGapX=pTouch1X-pTouch0X,prevGapY=pTouch1Y-pTouch0Y,currGapX=screen1X-screen0X,currGapY=screen1Y-screen0Y,distance=Math.hypot(currGapX,currGapY)||1,pDistance=Math.hypot(prevGapX,prevGapY)||1;if(!this.#isPinching&&Math.abs(pDistance-distance)<=TouchManager.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(touchInfo.touch0X=screen0X,touchInfo.touch0Y=screen0Y,touchInfo.touch1X=screen1X,touchInfo.touch1Y= screen1Y,!this.#isPinching){this.#isPinching=!0;return}const origin2=[(screen0X+screen1X)/2,(screen0Y+screen1Y)/2];this.#onPinching?.(origin2,pDistance,distance)}#onTouchEnd(evt){evt.touches.length>=2||(this.#touchMoveAC&&(this.#touchMoveAC.abort(),this.#touchMoveAC=null,this.#onPinchEnd?.()),this.#touchInfo&&(stopEvent(evt),this.#touchInfo=null,this.#isPinching=!1))}destroy(){this.#touchManagerAC?.abort(),this.#touchManagerAC=null,this.#pointerDownAC?.abort(),this.#pointerDownAC=null}}class AnnotationEditor{#accessibilityData=null;#allResizerDivs=null;#altText=null;#comment=null;#disabled=!1;#dragPointerId=null;#dragPointerType="";#keepAspectRatio=!1;#resizersDiv=null;#lastPointerCoords=null;#savedDimensions=null;#focusAC=null;#focusedResizerName="";#hasBeenClicked=!1;#initialRect=null;#isEditing=!1;#isInEditMode=!1;#isResizerEnabledForKeyboard=!1;#moveInDOMTimeout=null;#prevDragX=0;#prevDragY=0;#telemetryTimeouts=null;#touchManager=null;isSelected=!1;_isCopy=!1;_editToolbar=null;_initialOptions=Object. create(null);_initialData=null;_isVisible=!0;_uiManager=null;_focusEventsAllowed=!0;static _l10n=null;static _l10nResizer=null;#isDraggable=!1;#zIndex=AnnotationEditor._zIndex++;static _borderLineWidth=-1;static _colorManager=new ColorManager;static _zIndex=1;static _telemetryTimeout=1e3;static get _resizerKeyboardManager(){const resize=AnnotationEditor.prototype._resizeWithKeyboard,small=AnnotationEditorUIManager.TRANSLATE_SMALL,big=AnnotationEditorUIManager.TRANSLATE_BIG;return shadow(this,"_r\ esizerKeyboardManager",new KeyboardManager([[["ArrowLeft","mac+ArrowLeft"],resize,{args:[-small,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],resize,{args:[-big,0]}],[["ArrowRight","mac+ArrowRight"],resize,{args:[small,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],resize,{args:[big,0]}],[["ArrowUp","mac+ArrowUp"],resize,{args:[0,-small]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],resize,{args:[0,-big]}],[["ArrowDown","mac+ArrowDown"],resize,{args:[0,small]}],[["ctrl+ArrowDown","mac+shift+ArrowDo\ wn"],resize,{args:[0,big]}],[["Escape","mac+Escape"],AnnotationEditor.prototype._stopResizingWithKeyboard]]))}constructor(parameters){this.parent=parameters.parent,this.id=parameters.id,this.width=this.height=null,this.pageIndex=parameters.parent.pageIndex,this.name=parameters.name,this.div=null,this._uiManager=parameters.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=parameters.isCentered,this._structTreeParentId=null,this.annotationElementId= parameters.annotationElementId||null;const{rotation,rawDims:{pageWidth,pageHeight,pageX,pageY}}=this.parent.viewport;this.rotation=rotation,this.pageRotation=(360+rotation-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[pageWidth,pageHeight],this.pageTranslation=[pageX,pageY];const[width,height]=this.parentDimensions;this.x=parameters.x/width,this.y=parameters.y/height,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}get mode(){ return Object.getPrototypeOf(this).constructor._editorType}static get isDrawer(){return!1}static get _defaultLineColor(){return shadow(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(editor){const fakeEditor=new FakeEditor({id:editor.parent.getNextId(),parent:editor.parent,uiManager:editor._uiManager});fakeEditor.annotationElementId=editor.annotationElementId,fakeEditor.deleted=!0,fakeEditor._uiManager.addToAnnotationStorage(fakeEditor)}static initialize(l10n,_uiManager){ if(AnnotationEditor._l10n??=l10n,AnnotationEditor._l10nResizer||=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"}),AnnotationEditor._borderLineWidth!==-1)return;const style2=getComputedStyle( document.documentElement);AnnotationEditor._borderLineWidth=parseFloat(style2.getPropertyValue("--outline-width"))||0}static updateDefaultParams(_type,_value){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(mime){return!1}static paste(item,parent){unreachable("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#isDraggable}set _isDraggable(value){this.#isDraggable=value,this.div?.classList.toggle("draggable",value)}get isEnterHandled(){ return!0}center(){const[pageWidth,pageHeight]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*pageHeight/(pageWidth*2),this.y+=this.width*pageWidth/(pageHeight*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*pageHeight/(pageWidth*2),this.y-=this.width*pageWidth/(pageHeight*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(params){this._uiManager.addCommands(params)}get currentLayer(){ return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#zIndex}setParent(parent){parent!==null?(this.pageIndex=parent.pageIndex,this.pageDimensions=parent.pageDimensions):this.#stopResizing(),this.parent=parent}focusin(event2){this._focusEventsAllowed&&(this.#hasBeenClicked?this.#hasBeenClicked=!1:this.parent.setSelected(this))}focusout(event2){!this._focusEventsAllowed||!this.isAttachedToDOM||event2.relatedTarget?.closest(`#${this. id}`)||(event2.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.isInEditMode()&&this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(x,y,tx,ty){const[width,height]=this.parentDimensions;[tx,ty]=this.screenToPageTranslation(tx,ty),this.x=(x+tx)/width,this.y=(y+ty)/height,this.fixAndSetPosition()}_moveAfterPaste(baseX,baseY){const[parentWidth,parentHeight]=this. parentDimensions;this.setAt(baseX*parentWidth,baseY*parentHeight,this.width*parentWidth,this.height*parentHeight),this._onTranslated()}#translate([width,height],x,y){[x,y]=this.screenToPageTranslation(x,y),this.x+=x/width,this.y+=y/height,this._onTranslating(this.x,this.y),this.fixAndSetPosition()}translate(x,y){this.#translate(this.parentDimensions,x,y)}translateInPage(x,y){this.#initialRect||=[this.x,this.y,this.width,this.height],this.#translate(this.pageDimensions,x,y),this.div.scrollIntoView( {block:"nearest"})}translationDone(){this._onTranslated(this.x,this.y)}drag(tx,ty){this.#initialRect||=[this.x,this.y,this.width,this.height];const{div,parentDimensions:[parentWidth,parentHeight]}=this;if(this.x+=tx/parentWidth,this.y+=ty/parentHeight,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:x2,y:y2}=this.div.getBoundingClientRect();this.parent.findNewParent(this,x2,y2)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x,y}=this;const[bx,by]=this.getBaseTranslation(); x+=bx,y+=by;const{style:style2}=div;style2.left=`${(100*x).toFixed(2)}%`,style2.top=`${(100*y).toFixed(2)}%`,this._onTranslating(x,y),div.scrollIntoView({block:"nearest"})}_onTranslating(x,y){}_onTranslated(x,y){}get _hasBeenMoved(){return!!this.#initialRect&&(this.#initialRect[0]!==this.x||this.#initialRect[1]!==this.y)}get _hasBeenResized(){return!!this.#initialRect&&(this.#initialRect[2]!==this.width||this.#initialRect[3]!==this.height)}getBaseTranslation(){const[parentWidth,parentHeight]=this. parentDimensions,{_borderLineWidth}=AnnotationEditor,x=_borderLineWidth/parentWidth,y=_borderLineWidth/parentHeight;switch(this.rotation){case 90:return[-x,y];case 180:return[x,y];case 270:return[x,-y];default:return[-x,-y]}}get _mustFixPosition(){return!0}fixAndSetPosition(rotation=this.rotation){const{div:{style:style2},pageDimensions:[pageWidth,pageHeight]}=this;let{x,y,width,height}=this;if(width*=pageWidth,height*=pageHeight,x*=pageWidth,y*=pageHeight,this._mustFixPosition)switch(rotation){case 0: x=MathClamp(x,0,pageWidth-width),y=MathClamp(y,0,pageHeight-height);break;case 90:x=MathClamp(x,0,pageWidth-height),y=MathClamp(y,width,pageHeight);break;case 180:x=MathClamp(x,width,pageWidth),y=MathClamp(y,height,pageHeight);break;case 270:x=MathClamp(x,height,pageWidth),y=MathClamp(y,0,pageHeight-width);break}this.x=x/=pageWidth,this.y=y/=pageHeight;const[bx,by]=this.getBaseTranslation();x+=bx,y+=by,style2.left=`${(100*x).toFixed(2)}%`,style2.top=`${(100*y).toFixed(2)}%`,this.moveInDOM()}static#rotatePoint(x,y,angle){ switch(angle){case 90:return[y,-x];case 180:return[-x,-y];case 270:return[-y,x];default:return[x,y]}}screenToPageTranslation(x,y){return AnnotationEditor.#rotatePoint(x,y,this.parentRotation)}pageTranslationToScreen(x,y){return AnnotationEditor.#rotatePoint(x,y,360-this.parentRotation)}#getRotationMatrix(rotation){switch(rotation){case 90:{const[pageWidth,pageHeight]=this.pageDimensions;return[0,-pageWidth/pageHeight,pageHeight/pageWidth,0]}case 180:return[-1,0,0,-1];case 270:{const[pageWidth,pageHeight]=this. pageDimensions;return[0,pageWidth/pageHeight,-pageHeight/pageWidth,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale,pageDimensions:[pageWidth,pageHeight]}=this;return[pageWidth*parentScale,pageHeight*parentScale]}setDims(width,height){const[parentWidth,parentHeight]=this.parentDimensions,{style:style2}=this.div;style2.width= `${(100*width/parentWidth).toFixed(2)}%`,this.#keepAspectRatio||(style2.height=`${(100*height/parentHeight).toFixed(2)}%`)}fixDims(){const{style:style2}=this.div,{height,width}=style2,widthPercent=width.endsWith("%"),heightPercent=!this.#keepAspectRatio&&height.endsWith("%");if(widthPercent&&heightPercent)return;const[parentWidth,parentHeight]=this.parentDimensions;widthPercent||(style2.width=`${(100*parseFloat(width)/parentWidth).toFixed(2)}%`),!this.#keepAspectRatio&&!heightPercent&&(style2.height= `${(100*parseFloat(height)/parentHeight).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}#createResizers(){if(this.#resizersDiv)return;this.#resizersDiv=document.createElement("div"),this.#resizersDiv.classList.add("resizers");const classes=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],signal=this._uiManager._signal;for(const name of classes){const div=document. createElement("div");this.#resizersDiv.append(div),div.classList.add("resizer",name),div.setAttribute("data-resizer-name",name),div.addEventListener("pointerdown",this.#resizerPointerdown.bind(this,name),{signal}),div.addEventListener("contextmenu",noContextMenu,{signal}),div.tabIndex=-1}this.div.prepend(this.#resizersDiv)}#resizerPointerdown(name,event2){event2.preventDefault();const{isMac}=util_FeatureTest.platform;if(event2.button!==0||event2.ctrlKey&&isMac)return;this.#altText?.toggle(!1);const savedDraggable=this. _isDraggable;this._isDraggable=!1,this.#lastPointerCoords=[event2.screenX,event2.screenY];const ac=new AbortController,signal=this._uiManager.combinedSignal(ac);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",this.#resizerPointermove.bind(this,name),{passive:!0,capture:!0,signal}),window.addEventListener("touchmove",stopEvent,{passive:!1,signal}),window.addEventListener("contextmenu",noContextMenu,{signal}),this.#savedDimensions={savedX:this.x,savedY:this.y,savedWidth:this. width,savedHeight:this.height};const savedParentCursor=this.parent.div.style.cursor,savedCursor=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(event2.target).cursor;const pointerUpCallback=()=>{ac.abort(),this.parent.togglePointerEvents(!0),this.#altText?.toggle(!0),this._isDraggable=savedDraggable,this.parent.div.style.cursor=savedParentCursor,this.div.style.cursor=savedCursor,this.#addResizeToUndoStack()};window.addEventListener("pointerup",pointerUpCallback, {signal}),window.addEventListener("blur",pointerUpCallback,{signal})}#resize(x,y,width,height){this.width=width,this.height=height,this.x=x,this.y=y;const[parentWidth,parentHeight]=this.parentDimensions;this.setDims(parentWidth*width,parentHeight*height),this.fixAndSetPosition(),this._onResized()}_onResized(){}#addResizeToUndoStack(){if(!this.#savedDimensions)return;const{savedX,savedY,savedWidth,savedHeight}=this.#savedDimensions;this.#savedDimensions=null;const newX=this.x,newY=this.y,newWidth=this. width,newHeight=this.height;newX===savedX&&newY===savedY&&newWidth===savedWidth&&newHeight===savedHeight||this.addCommands({cmd:this.#resize.bind(this,newX,newY,newWidth,newHeight),undo:this.#resize.bind(this,savedX,savedY,savedWidth,savedHeight),mustExec:!0})}static _round(x){return Math.round(x*1e4)/1e4}#resizerPointermove(name,event2){const[parentWidth,parentHeight]=this.parentDimensions,savedX=this.x,savedY=this.y,savedWidth=this.width,savedHeight=this.height,minWidth=AnnotationEditor.MIN_SIZE/ parentWidth,minHeight=AnnotationEditor.MIN_SIZE/parentHeight,rotationMatrix=this.#getRotationMatrix(this.rotation),transf=(x,y)=>[rotationMatrix[0]*x+rotationMatrix[2]*y,rotationMatrix[1]*x+rotationMatrix[3]*y],invRotationMatrix=this.#getRotationMatrix(360-this.rotation),invTransf=(x,y)=>[invRotationMatrix[0]*x+invRotationMatrix[2]*y,invRotationMatrix[1]*x+invRotationMatrix[3]*y];let getPoint2,getOpposite,isDiagonal=!1,isHorizontal=!1;switch(name){case"topLeft":isDiagonal=!0,getPoint2=(w,h2)=>[0, 0],getOpposite=(w,h2)=>[w,h2];break;case"topMiddle":getPoint2=(w,h2)=>[w/2,0],getOpposite=(w,h2)=>[w/2,h2];break;case"topRight":isDiagonal=!0,getPoint2=(w,h2)=>[w,0],getOpposite=(w,h2)=>[0,h2];break;case"middleRight":isHorizontal=!0,getPoint2=(w,h2)=>[w,h2/2],getOpposite=(w,h2)=>[0,h2/2];break;case"bottomRight":isDiagonal=!0,getPoint2=(w,h2)=>[w,h2],getOpposite=(w,h2)=>[0,0];break;case"bottomMiddle":getPoint2=(w,h2)=>[w/2,h2],getOpposite=(w,h2)=>[w/2,0];break;case"bottomLeft":isDiagonal=!0,getPoint2= (w,h2)=>[0,h2],getOpposite=(w,h2)=>[w,0];break;case"middleLeft":isHorizontal=!0,getPoint2=(w,h2)=>[0,h2/2],getOpposite=(w,h2)=>[w,h2/2];break}const point2=getPoint2(savedWidth,savedHeight),oppositePoint=getOpposite(savedWidth,savedHeight);let transfOppositePoint=transf(...oppositePoint);const oppositeX=AnnotationEditor._round(savedX+transfOppositePoint[0]),oppositeY=AnnotationEditor._round(savedY+transfOppositePoint[1]);let ratioX=1,ratioY=1,deltaX,deltaY;if(event2.fromKeyboard)({deltaX,deltaY}= event2);else{const{screenX,screenY}=event2,[lastScreenX,lastScreenY]=this.#lastPointerCoords;[deltaX,deltaY]=this.screenToPageTranslation(screenX-lastScreenX,screenY-lastScreenY),this.#lastPointerCoords[0]=screenX,this.#lastPointerCoords[1]=screenY}if([deltaX,deltaY]=invTransf(deltaX/parentWidth,deltaY/parentHeight),isDiagonal){const oldDiag=Math.hypot(savedWidth,savedHeight);ratioX=ratioY=Math.max(Math.min(Math.hypot(oppositePoint[0]-point2[0]-deltaX,oppositePoint[1]-point2[1]-deltaY)/oldDiag,1/ savedWidth,1/savedHeight),minWidth/savedWidth,minHeight/savedHeight)}else isHorizontal?ratioX=MathClamp(Math.abs(oppositePoint[0]-point2[0]-deltaX),minWidth,1)/savedWidth:ratioY=MathClamp(Math.abs(oppositePoint[1]-point2[1]-deltaY),minHeight,1)/savedHeight;const newWidth=AnnotationEditor._round(savedWidth*ratioX),newHeight=AnnotationEditor._round(savedHeight*ratioY);transfOppositePoint=transf(...getOpposite(newWidth,newHeight));const newX=oppositeX-transfOppositePoint[0],newY=oppositeY-transfOppositePoint[1]; this.#initialRect||=[this.x,this.y,this.width,this.height],this.width=newWidth,this.height=newHeight,this.x=newX,this.y=newY,this.setDims(parentWidth*newWidth,parentHeight*newHeight),this.fixAndSetPosition(),this._onResizing()}_onResizing(){}altTextFinish(){this.#altText?.finish()}get toolbarButtons(){return null}async addEditToolbar(){if(this._editToolbar||this.#isInEditMode)return this._editToolbar;this._editToolbar=new EditorToolbar(this),this.div.append(this._editToolbar.render()),this._editToolbar. addButton("comment",this.addCommentButton());const{toolbarButtons}=this;if(toolbarButtons)for(const[name,tool]of toolbarButtons)await this._editToolbar.addButton(name,tool);return this._editToolbar.addButton("delete"),this._editToolbar}removeEditToolbar(){this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,this.#altText?.destroy())}addContainer(container2){const editToolbarDiv=this._editToolbar?.div;editToolbarDiv?editToolbarDiv.before(container2):this.div.append(container2)}getClientDimensions(){ return this.div.getBoundingClientRect()}createAltText(){return this.#altText||(AltText.initialize(AnnotationEditor._l10n),this.#altText=new AltText(this),this.#accessibilityData&&(this.#altText.data=this.#accessibilityData,this.#accessibilityData=null)),this.#altText}get altTextData(){return this.#altText?.data}set altTextData(data){this.#altText&&(this.#altText.data=data)}get guessedAltText(){return this.#altText?.guessedText}async setGuessedAltText(text2){await this.#altText?.setGuessedText(text2)}serializeAltText(isForCopying){ return this.#altText?.serialize(isForCopying)}hasAltText(){return!!this.#altText&&!this.#altText.isEmpty()}hasAltTextData(){return this.#altText?.hasData()??!1}addCommentButton(){return this.#comment?this.#comment:this.#comment=new Comment$1(this)}get commentColor(){return null}get comment(){const comment2=this.#comment;return{text:comment2.data.text,date:comment2.data.date,deleted:comment2.isDeleted(),color:this.commentColor}}set comment(text2){this.#comment||(this.#comment=new Comment$1(this)), this.#comment.data=text2}setCommentData(text2){this.#comment||(this.#comment=new Comment$1(this)),this.#comment.setInitialText(text2)}get hasEditedComment(){return this.#comment?.hasBeenEdited()}async editComment(){this.#comment||(this.#comment=new Comment$1(this)),this.#comment.edit()}addComment(serialized){this.hasEditedComment&&(serialized.popup={contents:this.comment.text,deleted:this.comment.deleted})}render(){const div=this.div=document.createElement("div");div.setAttribute("data-editor-ro\ tation",(360-this.rotation)%360),div.className=this.name,div.setAttribute("id",this.id),div.tabIndex=this.#disabled?-1:0,div.setAttribute("role","application"),this.defaultL10nId&&div.setAttribute("data-l10n-id",this.defaultL10nId),this._isVisible||div.classList.add("hidden"),this.setInForeground(),this.#addFocusListeners();const[parentWidth,parentHeight]=this.parentDimensions;this.parentRotation%180!==0&&(div.style.maxWidth=`${(100*parentHeight/parentWidth).toFixed(2)}%`,div.style.maxHeight=`${(100* parentWidth/parentHeight).toFixed(2)}%`);const[tx,ty]=this.getInitialTranslation();return this.translate(tx,ty),bindEvents(this,div,["keydown","pointerdown","dblclick"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(this.#touchManager||=new TouchManager({container:div,isPinchingDisabled:()=>!this.isSelected,onPinchStart:this.#touchPinchStartCallback.bind(this),onPinching:this.#touchPinchCallback.bind(this),onPinchEnd:this.#touchPinchEndCallback.bind(this),signal:this._uiManager._signal})), this._uiManager._editorUndoBar?.hide(),div}#touchPinchStartCallback(){this.#savedDimensions={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height},this.#altText?.toggle(!1),this.parent.togglePointerEvents(!1)}#touchPinchCallback(_origin,prevDistance,distance){let factor=.7*(distance/prevDistance)+1-.7;if(factor===1)return;const rotationMatrix=this.#getRotationMatrix(this.rotation),transf=(x,y)=>[rotationMatrix[0]*x+rotationMatrix[2]*y,rotationMatrix[1]*x+rotationMatrix[3]*y], [parentWidth,parentHeight]=this.parentDimensions,savedX=this.x,savedY=this.y,savedWidth=this.width,savedHeight=this.height,minWidth=AnnotationEditor.MIN_SIZE/parentWidth,minHeight=AnnotationEditor.MIN_SIZE/parentHeight;factor=Math.max(Math.min(factor,1/savedWidth,1/savedHeight),minWidth/savedWidth,minHeight/savedHeight);const newWidth=AnnotationEditor._round(savedWidth*factor),newHeight=AnnotationEditor._round(savedHeight*factor);if(newWidth===savedWidth&&newHeight===savedHeight)return;this.#initialRect||= [savedX,savedY,savedWidth,savedHeight];const transfCenterPoint=transf(savedWidth/2,savedHeight/2),centerX=AnnotationEditor._round(savedX+transfCenterPoint[0]),centerY=AnnotationEditor._round(savedY+transfCenterPoint[1]),newTransfCenterPoint=transf(newWidth/2,newHeight/2);this.x=centerX-newTransfCenterPoint[0],this.y=centerY-newTransfCenterPoint[1],this.width=newWidth,this.height=newHeight,this.setDims(parentWidth*newWidth,parentHeight*newHeight),this.fixAndSetPosition(),this._onResizing()}#touchPinchEndCallback(){ this.#altText?.toggle(!0),this.parent.togglePointerEvents(!0),this.#addResizeToUndoStack()}pointerdown(event2){const{isMac}=util_FeatureTest.platform;if(event2.button!==0||event2.ctrlKey&&isMac){event2.preventDefault();return}if(this.#hasBeenClicked=!0,this._isDraggable){this.#setUpDragSession(event2);return}this.#selectOnPointerEvent(event2)}#selectOnPointerEvent(event2){const{isMac}=util_FeatureTest.platform;event2.ctrlKey&&!isMac||event2.shiftKey||event2.metaKey&&isMac?this.parent.toggleSelected( this):this.parent.setSelected(this)}#setUpDragSession(event2){const{isSelected}=this;this._uiManager.setUpDragSession();let hasDraggingStarted=!1;const ac=new AbortController,signal=this._uiManager.combinedSignal(ac),opts={capture:!0,passive:!1,signal},cancelDrag=e=>{ac.abort(),this.#dragPointerId=null,this.#hasBeenClicked=!1,this._uiManager.endDragSession()||this.#selectOnPointerEvent(e),hasDraggingStarted&&this._onStopDragging()};isSelected&&(this.#prevDragX=event2.clientX,this.#prevDragY=event2. clientY,this.#dragPointerId=event2.pointerId,this.#dragPointerType=event2.pointerType,window.addEventListener("pointermove",e=>{hasDraggingStarted||(hasDraggingStarted=!0,this._onStartDragging());const{clientX:x,clientY:y,pointerId}=e;if(pointerId!==this.#dragPointerId){stopEvent(e);return}const[tx,ty]=this.screenToPageTranslation(x-this.#prevDragX,y-this.#prevDragY);this.#prevDragX=x,this.#prevDragY=y,this._uiManager.dragSelectedEditors(tx,ty)},opts),window.addEventListener("touchmove",stopEvent, opts),window.addEventListener("pointerdown",e=>{e.pointerType===this.#dragPointerType&&(this.#touchManager||e.isPrimary)&&cancelDrag(e),stopEvent(e)},opts));const pointerUpCallback=e=>{if(!this.#dragPointerId||this.#dragPointerId===e.pointerId){cancelDrag(e);return}stopEvent(e)};window.addEventListener("pointerup",pointerUpCallback,{signal}),window.addEventListener("blur",pointerUpCallback,{signal})}_onStartDragging(){}_onStopDragging(){}moveInDOM(){this.#moveInDOMTimeout&&clearTimeout(this.#moveInDOMTimeout), this.#moveInDOMTimeout=setTimeout(()=>{this.#moveInDOMTimeout=null,this.parent?.moveEditorInDOM(this)},0)}_setParentAndPosition(parent,x,y){parent.changeParent(this),this.x=x,this.y=y,this.fixAndSetPosition(),this._onTranslated()}getRect(tx,ty,rotation=this.rotation){const scale2=this.parentScale,[pageWidth,pageHeight]=this.pageDimensions,[pageX,pageY]=this.pageTranslation,shiftX=tx/scale2,shiftY=ty/scale2,x=this.x*pageWidth,y=this.y*pageHeight,width=this.width*pageWidth,height=this.height*pageHeight; switch(rotation){case 0:return[x+shiftX+pageX,pageHeight-y-shiftY-height+pageY,x+shiftX+width+pageX,pageHeight-y-shiftY+pageY];case 90:return[x+shiftY+pageX,pageHeight-y+shiftX+pageY,x+shiftY+height+pageX,pageHeight-y+shiftX+width+pageY];case 180:return[x-shiftX-width+pageX,pageHeight-y+shiftY+pageY,x-shiftX+pageX,pageHeight-y+shiftY+height+pageY];case 270:return[x-shiftY-height+pageX,pageHeight-y-shiftX-width+pageY,x-shiftY+pageX,pageHeight-y-shiftX+pageY];default:throw new Error("Invalid rotat\ ion")}}getRectInCurrentCoords(rect,pageHeight){const[x1,y1,x2,y2]=rect,width=x2-x1,height=y2-y1;switch(this.rotation){case 0:return[x1,pageHeight-y2,width,height];case 90:return[x1,pageHeight-y1,height,width];case 180:return[x2,pageHeight-y1,width,height];case 270:return[x2,pageHeight-y2,height,width];default:throw new Error("Invalid rotation")}}onceAdded(focus2){}isEmpty(){return!1}enableEditMode(){return this.isInEditMode()?!1:(this.parent.setEditingState(!1),this.#isInEditMode=!0,!0)}disableEditMode(){ return this.isInEditMode()?(this.parent.setEditingState(!0),this.#isInEditMode=!1,!0):!1}isInEditMode(){return this.#isInEditMode}shouldGetKeyboardEvents(){return this.#isResizerEnabledForKeyboard}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){const{top,left,bottom,right}=this.getClientDimensions(),{innerHeight,innerWidth}=window;return left0&&top0}#addFocusListeners(){if(this.#focusAC||!this.div)return;this.#focusAC=new AbortController; const signal=this._uiManager.combinedSignal(this.#focusAC);this.div.addEventListener("focusin",this.focusin.bind(this),{signal}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal})}rebuild(){this.#addFocusListeners()}rotate(_angle){}resize(){}serializeDeleted(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:this._initialData?.popupRef||""}}serialize(isForCopying=!1,context=null){unreachable("An editor must be serializable")}static async deserialize(data,parent,uiManager){ const editor=new this.prototype.constructor({parent,id:parent.getNextId(),uiManager,annotationElementId:data.annotationElementId});editor.rotation=data.rotation,editor.#accessibilityData=data.accessibilityData,editor._isCopy=data.isCopy||!1;const[pageWidth,pageHeight]=editor.pageDimensions,[x,y,width,height]=editor.getRectInCurrentCoords(data.rect,pageHeight);return editor.x=x/pageWidth,editor.y=y/pageHeight,editor.width=width/pageWidth,editor.height=height/pageHeight,editor}get hasBeenModified(){ return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){if(this.#focusAC?.abort(),this.#focusAC=null,this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#moveInDOMTimeout&&(clearTimeout(this.#moveInDOMTimeout),this.#moveInDOMTimeout=null),this.#stopResizing(),this.removeEditToolbar(),this.#telemetryTimeouts){for(const timeout of this.#telemetryTimeouts.values())clearTimeout(timeout);this.#telemetryTimeouts=null}this. parent=null,this.#touchManager?.destroy(),this.#touchManager=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#createResizers(),this.#resizersDiv.classList.remove("hidden"))}get toolbarPosition(){return null}keydown(event2){if(!this.isResizable||event2.target!==this.div||event2.key!=="Enter")return;this._uiManager.setSelected(this),this.#savedDimensions={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};const children=this.#resizersDiv.children;if(!this.#allResizerDivs){ this.#allResizerDivs=Array.from(children);const boundResizerKeydown=this.#resizerKeydown.bind(this),boundResizerBlur=this.#resizerBlur.bind(this),signal=this._uiManager._signal;for(const div of this.#allResizerDivs){const name=div.getAttribute("data-resizer-name");div.setAttribute("role","spinbutton"),div.addEventListener("keydown",boundResizerKeydown,{signal}),div.addEventListener("blur",boundResizerBlur,{signal}),div.addEventListener("focus",this.#resizerFocus.bind(this,name),{signal}),div.setAttribute( "data-l10n-id",AnnotationEditor._l10nResizer[name])}}const first=this.#allResizerDivs[0];let firstPosition=0;for(const div of children){if(div===first)break;firstPosition++}const nextFirstPosition=(360-this.rotation+this.parentRotation)%360/90*(this.#allResizerDivs.length/4);if(nextFirstPosition!==firstPosition){if(nextFirstPositionfirstPosition)for(let i2=0;i2< nextFirstPosition-firstPosition;i2++)this.#resizersDiv.firstChild.before(this.#resizersDiv.lastChild);let i=0;for(const child2 of children){const name=this.#allResizerDivs[i++].getAttribute("data-resizer-name");child2.setAttribute("data-l10n-id",AnnotationEditor._l10nResizer[name])}}this.#setResizerTabIndex(0),this.#isResizerEnabledForKeyboard=!0,this.#resizersDiv.firstChild.focus({focusVisible:!0}),event2.preventDefault(),event2.stopImmediatePropagation()}#resizerKeydown(event2){AnnotationEditor. _resizerKeyboardManager.exec(this,event2)}#resizerBlur(event2){this.#isResizerEnabledForKeyboard&&event2.relatedTarget?.parentNode!==this.#resizersDiv&&this.#stopResizing()}#resizerFocus(name){this.#focusedResizerName=this.#isResizerEnabledForKeyboard?name:""}#setResizerTabIndex(value){if(this.#allResizerDivs)for(const div of this.#allResizerDivs)div.tabIndex=value}_resizeWithKeyboard(x,y){this.#isResizerEnabledForKeyboard&&this.#resizerPointermove(this.#focusedResizerName,{deltaX:x,deltaY:y,fromKeyboard:!0})}#stopResizing(){ this.#isResizerEnabledForKeyboard=!1,this.#setResizerTabIndex(-1),this.#addResizeToUndoStack()}_stopResizingWithKeyboard(){this.#stopResizing(),this.div.focus()}select(){if(!(this.isSelected&&this._editToolbar)){if(this.isSelected=!0,this.makeResizable(),this.div?.classList.add("selectedEditor"),!this._editToolbar){this.addEditToolbar().then(()=>{this.div?.classList.contains("selectedEditor")&&this._editToolbar?.show()});return}this._editToolbar?.show(),this.#altText?.toggleAltTextBadge(!1)}}unselect(){ this.isSelected&&(this.isSelected=!1,this.#resizersDiv?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),this._editToolbar?.hide(),this.#altText?.toggleAltTextBadge(!0))}updateParams(type2,value){}disableEditing(){}enableEditing(){}get canChangeContent(){return!1}enterInEditMode(){this.canChangeContent&&(this.enableEditMode(),this.div.focus())}dblclick(event2){this.enterInEditMode(), this.parent.updateToolbar({mode:this.constructor._editorType,editId:this.id})}getElementForAltText(){return this.div}get contentDiv(){return this.div}get isEditing(){return this.#isEditing}set isEditing(value){this.#isEditing=value,this.parent&&(value?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(width,height){this.#keepAspectRatio=!0;const aspectRatio=width/height,{style:style2}=this.div;style2.aspectRatio=aspectRatio,style2. height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(data,mustWait=!1){if(mustWait){this.#telemetryTimeouts||=new Map;const{action:action2}=data;let timeout=this.#telemetryTimeouts.get(action2);timeout&&clearTimeout(timeout),timeout=setTimeout(()=>{this._reportTelemetry(data),this.#telemetryTimeouts.delete(action2),this.#telemetryTimeouts.size===0&&(this.#telemetryTimeouts= null)},AnnotationEditor._telemetryTimeout),this.#telemetryTimeouts.set(action2,timeout);return}data.type||=this.editorType,this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data}})}show(visible=this._isVisible){this.div.classList.toggle("hidden",!visible),this._isVisible=visible}enable(){this.div&&(this.div.tabIndex=0),this.#disabled=!1}disable(){this.div&&(this.div.tabIndex=-1),this.#disabled=!0}renderAnnotationElement(annotation){let content2=annotation. container.querySelector(".annotationContent");if(!content2)content2=document.createElement("div"),content2.classList.add("annotationContent",this.editorType),annotation.container.prepend(content2);else if(content2.nodeName==="CANVAS"){const canvas=content2;content2=document.createElement("div"),content2.classList.add("annotationContent",this.editorType),canvas.before(content2)}return content2}resetAnnotationElement(annotation){const{firstChild}=annotation.container;firstChild?.nodeName==="DIV"&& firstChild.classList.contains("annotationContent")&&firstChild.remove()}}class FakeEditor extends AnnotationEditor{constructor(params){super(params),this.annotationElementId=params.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const SEED=3285377520,MASK_HIGH=4294901760,MASK_LOW=65535;class MurmurHash3_64{constructor(seed){this.h1=seed?seed&4294967295:SEED,this.h2=seed?seed&4294967295:SEED}update(input){let data,length;if(typeof input=="string"){data=new Uint8Array( input.length*2),length=0;for(let i=0,ii=input.length;i>>8,data[length++]=code2&255)}}else if(ArrayBuffer.isView(input))data=input.slice(),length=data.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const blockCounts=length>>2,tailLength=length-blockCounts*4,dataUint32=new Uint32Array(data.buffer,0,blockCounts);let k1=0,k2=0,h1=this.h1,h2=this.h2;const C1=3432918353, C2=461845907,C1_LOW=C1&MASK_LOW,C2_LOW=C2&MASK_LOW;for(let i=0;i>>17,k1=k1*C2&MASK_HIGH|k1*C2_LOW&MASK_LOW,h1^=k1,h1=h1<<13|h1>>>19,h1=h1*5+3864292196):(k2=dataUint32[i],k2=k2*C1&MASK_HIGH|k2*C1_LOW&MASK_LOW,k2=k2<<15|k2>>>17,k2=k2*C2&MASK_HIGH|k2*C2_LOW&MASK_LOW,h2^=k2,h2=h2<<13|h2>>>19,h2=h2*5+3864292196);switch(k1=0,tailLength){case 3:k1^=data[blockCounts*4+2]<<16;case 2:k1^=data[blockCounts*4+1]<<8;case 1: k1^=data[blockCounts*4],k1=k1*C1&MASK_HIGH|k1*C1_LOW&MASK_LOW,k1=k1<<15|k1>>>17,k1=k1*C2&MASK_HIGH|k1*C2_LOW&MASK_LOW,blockCounts&1?h1^=k1:h2^=k1}this.h1=h1,this.h2=h2}hexdigest(){let h1=this.h1,h2=this.h2;return h1^=h2>>>1,h1=h1*3981806797&MASK_HIGH|h1*36045&MASK_LOW,h2=h2*4283543511&MASK_HIGH|((h2<<16|h1>>>16)*2950163797&MASK_HIGH)>>>16,h1^=h2>>>1,h1=h1*444984403&MASK_HIGH|h1*60499&MASK_LOW,h2=h2*3301882366&MASK_HIGH|((h2<<16|h1>>>16)*3120437893&MASK_HIGH)>>>16,h1^=h2>>>1,(h1>>>0).toString(16). padStart(8,"0")+(h2>>>0).toString(16).padStart(8,"0")}}const SerializableEmpty=Object.freeze({map:null,hash:"",transfer:void 0});class AnnotationStorage{#modified=!1;#modifiedIds=null;#storage=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(key2,defaultValue){const value=this.#storage.get(key2);return value===void 0?defaultValue:Object.assign(defaultValue,value)}getRawValue(key2){return this.#storage.get(key2)}remove(key2){if(this.#storage. delete(key2),this.#storage.size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const value of this.#storage.values())if(value instanceof AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(key2,value){const obj=this.#storage.get(key2);let modified=!1;if(obj!==void 0)for(const[entry,val]of Object.entries(value))obj[entry]!==val&&(modified=!0,obj[entry]=val);else modified=!0,this.#storage.set(key2,value);modified&&this.#setModified(),value instanceof AnnotationEditor&& typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(value.constructor._type)}has(key2){return this.#storage.has(key2)}get size(){return this.#storage.size}#setModified(){this.#modified||(this.#modified=!0,typeof this.onSetModified=="function"&&this.onSetModified())}resetModified(){this.#modified&&(this.#modified=!1,typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new PrintAnnotationStorage(this)}get serializable(){if(this.#storage.size===0)return SerializableEmpty; const map2=new Map,hash2=new MurmurHash3_64,transfer=[],context=Object.create(null);let hasBitmap=!1;for(const[key2,val]of this.#storage){const serialized=val instanceof AnnotationEditor?val.serialize(!1,context):val;serialized&&(map2.set(key2,serialized),hash2.update(`${key2}:${JSON.stringify(serialized)}`),hasBitmap||=!!serialized.bitmap)}if(hasBitmap)for(const value of map2.values())value.bitmap&&transfer.push(value.bitmap);return map2.size>0?{map:map2,hash:hash2.hexdigest(),transfer}:SerializableEmpty}get editorStats(){ let stats=null;const typeToEditor=new Map;for(const value of this.#storage.values()){if(!(value instanceof AnnotationEditor))continue;const editorStats=value.telemetryFinalData;if(!editorStats)continue;const{type:type2}=editorStats;typeToEditor.has(type2)||typeToEditor.set(type2,Object.getPrototypeOf(value).constructor),stats||=Object.create(null);const map2=stats[type2]||=new Map;for(const[key2,val]of Object.entries(editorStats)){if(key2==="type")continue;let counters=map2.get(key2);counters||(counters= new Map,map2.set(key2,counters));const count=counters.get(val)??0;counters.set(val,count+1)}}for(const[type2,editor]of typeToEditor)stats[type2]=editor.computeTelemetryFinalData(stats[type2]);return stats}resetModifiedIds(){this.#modifiedIds=null}get modifiedIds(){if(this.#modifiedIds)return this.#modifiedIds;const ids=[];for(const value of this.#storage.values())!(value instanceof AnnotationEditor)||!value.annotationElementId||!value.serialize()||ids.push(value.annotationElementId);return this.#modifiedIds= {ids:new Set(ids),hash:ids.join(",")}}[Symbol.iterator](){return this.#storage.entries()}}class PrintAnnotationStorage extends AnnotationStorage{#serializable;constructor(parent){super();const{map:map2,hash:hash2,transfer}=parent.serializable,clone2=structuredClone(map2,transfer?{transfer}:null);this.#serializable={map:clone2,hash:hash2,transfer}}get print(){unreachable("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#serializable}get modifiedIds(){return shadow(this, "modifiedIds",{ids:new Set,hash:""})}}class FontLoader{#systemFonts=new Set;constructor({ownerDocument=globalThis.document,styleElement:styleElement2=null}){this._document=ownerDocument,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(nativeFontFace){this.nativeFontFaces.add(nativeFontFace),this._document.fonts.add(nativeFontFace)}removeNativeFontFace(nativeFontFace){this.nativeFontFaces.delete(nativeFontFace),this._document.fonts. delete(nativeFontFace)}insertRule(rule){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const styleSheet=this.styleElement.sheet;styleSheet.insertRule(rule,styleSheet.cssRules.length)}clear(){for(const nativeFontFace of this.nativeFontFaces)this._document.fonts.delete(nativeFontFace);this.nativeFontFaces.clear(),this.#systemFonts.clear(),this.styleElement&&(this.styleElement.remove(), this.styleElement=null)}async loadSystemFont({systemFontInfo:info2,disableFontFace,_inspectFont}){if(!(!info2||this.#systemFonts.has(info2.loadedName))){if(assert$1(!disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName,src,style:style2}=info2,fontFace=new FontFace(loadedName,src,style2);this.addNativeFontFace(fontFace);try{await fontFace.load(),this.#systemFonts.add(loadedName),_inspectFont?.(info2)}catch{warn(`Cann\ ot load system font: ${info2.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(fontFace)}return}unreachable("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(font){if(font.attached||font.missingFile&&!font.systemFontInfo)return;if(font.attached=!0,font.systemFontInfo){await this.loadSystemFont(font);return}if(this.isFontLoadingAPISupported){const nativeFontFace=font.createNativeFontFace();if(nativeFontFace){this.addNativeFontFace( nativeFontFace);try{await nativeFontFace.loaded}catch(ex){throw warn(`Failed to load font '${nativeFontFace.family}': '${ex}'.`),font.disableFontFace=!0,ex}}return}const rule=font.createFontFaceRule();if(rule){if(this.insertRule(rule),this.isSyncFontLoadingSupported)return;await new Promise(resolve2=>{const request=this._queueLoadingCallback(resolve2);this._prepareFontLoadEvent(font,request)})}}get isFontLoadingAPISupported(){const hasFonts=!!this._document?.fonts;return shadow(this,"isFontLoadi\ ngAPISupported",hasFonts)}get isSyncFontLoadingSupported(){return shadow(this,"isSyncFontLoadingSupported",isNodeJS||util_FeatureTest.platform.isFirefox)}_queueLoadingCallback(callback){function completeRequest(){for(assert$1(!request.done,"completeRequest() cannot be called twice."),request.done=!0;loadingRequests.length>0&&loadingRequests[0].done;){const otherRequest=loadingRequests.shift();setTimeout(otherRequest.callback,0)}}const{loadingRequests}=this,request={done:!1,complete:completeRequest, callback};return loadingRequests.push(request),request}get _loadTestFont(){const testFont=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwA\ AACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEA\ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAA\ AAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return shadow(this,"_loadTestFont",testFont)}_prepareFontLoadEvent(font,request){function int32(data2,offset2){return data2.charCodeAt(offset2)<<24|data2.charCodeAt(offset2+1)<<16|data2.charCodeAt(offset2+2)<<8|data2.charCodeAt(offset2+3)&255}function spliceString(s2,offset2,remove2,insert){const chunk1=s2.substring(0,offset2),chunk2=s2.substring(offset2+remove2);return chunk1+insert+chunk2}let i,ii;const canvas=this. _document.createElement("canvas");canvas.width=1,canvas.height=1;const ctx=canvas.getContext("2d");let called=0;function isFontReady(name,callback){if(++called>30){warn("Load test font never loaded."),callback();return}if(ctx.font="30px "+name,ctx.fillText(".",0,20),ctx.getImageData(0,0,1,1).data[3]>0){callback();return}setTimeout(isFontReady.bind(null,name,callback))}const loadTestFontId=`lt${Date.now()}${this.loadTestFontId++}`;let data=this._loadTestFont;data=spliceString(data,976,loadTestFontId. length,loadTestFontId);const CFF_CHECKSUM_OFFSET=16,XXXX_VALUE=1482184792;let checksum=int32(data,CFF_CHECKSUM_OFFSET);for(i=0,ii=loadTestFontId.length-3;i{div.remove(),request.complete()})}}class FontFaceObject{constructor(translatedData,inspectFont=null){ this.compiledGlyphs=Object.create(null);for(const i in translatedData)this[i]=translatedData[i];this._inspectFont=inspectFont}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let nativeFontFace;if(!this.cssFontInfo)nativeFontFace=new FontFace(this.loadedName,this.data,{});else{const css2={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(css2.style=`oblique ${this.cssFontInfo.italicAngle}deg`),nativeFontFace=new FontFace(this.cssFontInfo.fontFamily,this.data, css2)}return this._inspectFont?.(this),nativeFontFace}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const url2=`url(data:${this.mimetype};base64,${toBase64Util(this.data)});`;let rule;if(!this.cssFontInfo)rule=`@font-face {font-family:"${this.loadedName}";src:${url2}}`;else{let css2=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(css2+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),rule=`@font-face {font-family:"${this.cssFontInfo. fontFamily}";${css2}src:${url2}}`}return this._inspectFont?.(this,url2),rule}getPathGenerator(objs,character){if(this.compiledGlyphs[character]!==void 0)return this.compiledGlyphs[character];const objId=this.loadedName+"_path_"+character;let cmds;try{cmds=objs.get(objId)}catch(ex){warn(`getPathGenerator - ignoring character: "${ex}".`)}const path2=new Path2D(cmds||"");return this.fontExtraProperties||objs.delete(objId),this.compiledGlyphs[character]=path2}}function getUrlProp(val){if(val instanceof URL)return val.href;if(typeof val=="string"){if(isNodeJS)return val;const url2=URL.parse(val,window.location);if(url2)return url2.href}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(val){if(isNodeJS&&typeof Buffer<"u"&&val instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(val instanceof Uint8Array&&val.byteLength===val.buffer.byteLength)return val;if(typeof val=="st\ ring")return stringToBytes(val);if(val instanceof ArrayBuffer||ArrayBuffer.isView(val)||typeof val=="object"&&!isNaN(val?.length))return new Uint8Array(val);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function getFactoryUrlProp(val){if(typeof val!="string")return null;if(val.endsWith("/"))return val;throw new Error(`Invalid factory url: "${val}" must include trailing slash.`)}const isRefProxy=v=>typeof v=="object"&& Number.isInteger(v?.num)&&v.num>=0&&Number.isInteger(v?.gen)&&v.gen>=0,isNameProxy=v=>typeof v=="object"&&typeof v?.name=="string",isValidExplicitDest=_isValidExplicitDest.bind(null,isRefProxy,isNameProxy);class LoopbackPort{#listeners=new Map;#deferred=Promise.resolve();postMessage(obj,transfer){const event2={data:structuredClone(obj,transfer?{transfer}:null)};this.#deferred.then(()=>{for(const[listener]of this.#listeners)listener.call(this,event2)})}addEventListener(name,listener,options=null){ let rmAbort=null;if(options?.signal instanceof AbortSignal){const{signal}=options;if(signal.aborted){warn("LoopbackPort - cannot use an `aborted` signal.");return}const onAbort=()=>this.removeEventListener(name,listener);rmAbort=()=>signal.removeEventListener("abort",onAbort),signal.addEventListener("abort",onAbort)}this.#listeners.set(listener,rmAbort)}removeEventListener(name,listener){this.#listeners.get(listener)?.(),this.#listeners.delete(listener)}terminate(){for(const[,rmAbort]of this.#listeners) rmAbort?.();this.#listeners.clear()}}const CallbackKind={DATA:1,ERROR:2},StreamKind={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function onFn(){}function wrapReason(ex){if(ex instanceof AbortException||ex instanceof InvalidPDFException||ex instanceof PasswordException||ex instanceof ResponseException||ex instanceof UnknownErrorException)return ex;switch(ex instanceof Error||typeof ex=="object"&&ex!==null||unreachable('wrapReason: Expected "reaso\ n" to be a (possibly cloned) Error.'),ex.name){case"AbortException":return new AbortException(ex.message);case"InvalidPDFException":return new InvalidPDFException(ex.message);case"PasswordException":return new PasswordException(ex.message,ex.code);case"ResponseException":return new ResponseException(ex.message,ex.status,ex.missing);case"UnknownErrorException":return new UnknownErrorException(ex.message,ex.details)}return new UnknownErrorException(ex.message,ex.toString())}class MessageHandler{#messageAC=new AbortController;constructor(sourceName,targetName,comObj){ this.sourceName=sourceName,this.targetName=targetName,this.comObj=comObj,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),comObj.addEventListener("message",this.#onMessage.bind(this),{signal:this.#messageAC.signal})}#onMessage({data}){if(data.targetName!==this.sourceName)return;if(data.stream){this.#processStreamMessage(data);return}if(data.callback){ const callbackId=data.callbackId,capability=this.callbackCapabilities[callbackId];if(!capability)throw new Error(`Cannot resolve callback ${callbackId}`);if(delete this.callbackCapabilities[callbackId],data.callback===CallbackKind.DATA)capability.resolve(data.data);else if(data.callback===CallbackKind.ERROR)capability.reject(wrapReason(data.reason));else throw new Error("Unexpected callback case");return}const action2=this.actionHandler[data.action];if(!action2)throw new Error(`Unknown action fr\ om worker: ${data.action}`);if(data.callbackId){const sourceName=this.sourceName,targetName=data.sourceName,comObj=this.comObj;Promise.try(action2,data.data).then(function(result){comObj.postMessage({sourceName,targetName,callback:CallbackKind.DATA,callbackId:data.callbackId,data:result})},function(reason){comObj.postMessage({sourceName,targetName,callback:CallbackKind.ERROR,callbackId:data.callbackId,reason:wrapReason(reason)})});return}if(data.streamId){this.#createStreamSink(data);return}action2( data.data)}on(actionName,handler){const ah=this.actionHandler;if(ah[actionName])throw new Error(`There is already an actionName called "${actionName}"`);ah[actionName]=handler}send(actionName,data,transfers){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:actionName,data},transfers)}sendWithPromise(actionName,data,transfers){const callbackId=this.callbackId++,capability=Promise.withResolvers();this.callbackCapabilities[callbackId]=capability;try{this.comObj. postMessage({sourceName:this.sourceName,targetName:this.targetName,action:actionName,callbackId,data},transfers)}catch(ex){capability.reject(ex)}return capability.promise}sendWithStream(actionName,data,queueingStrategy,transfers){const streamId=this.streamId++,sourceName=this.sourceName,targetName=this.targetName,comObj=this.comObj;return new ReadableStream({start:controller=>{const startCapability=Promise.withResolvers();return this.streamControllers[streamId]={controller,startCall:startCapability, pullCall:null,cancelCall:null,isClosed:!1},comObj.postMessage({sourceName,targetName,action:actionName,streamId,data,desiredSize:controller.desiredSize},transfers),startCapability.promise},pull:controller=>{const pullCapability=Promise.withResolvers();return this.streamControllers[streamId].pullCall=pullCapability,comObj.postMessage({sourceName,targetName,stream:StreamKind.PULL,streamId,desiredSize:controller.desiredSize}),pullCapability.promise},cancel:reason=>{assert$1(reason instanceof Error, "cancel must have a valid reason");const cancelCapability=Promise.withResolvers();return this.streamControllers[streamId].cancelCall=cancelCapability,this.streamControllers[streamId].isClosed=!0,comObj.postMessage({sourceName,targetName,stream:StreamKind.CANCEL,streamId,reason:wrapReason(reason)}),cancelCapability.promise}},queueingStrategy)}#createStreamSink(data){const streamId=data.streamId,sourceName=this.sourceName,targetName=data.sourceName,comObj=this.comObj,self2=this,action2=this.actionHandler[data. action],streamSink={enqueue(chunk,size2=1,transfers){if(this.isCancelled)return;const lastDesiredSize=this.desiredSize;this.desiredSize-=size2,lastDesiredSize>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),comObj.postMessage({sourceName,targetName,stream:StreamKind.ENQUEUE,streamId,chunk},transfers)},close(){this.isCancelled||(this.isCancelled=!0,comObj.postMessage({sourceName,targetName,stream:StreamKind.CLOSE,streamId}),delete self2. streamSinks[streamId])},error(reason){assert$1(reason instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,comObj.postMessage({sourceName,targetName,stream:StreamKind.ERROR,streamId,reason:wrapReason(reason)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:data.desiredSize,ready:null};streamSink.sinkCapability.resolve(),streamSink.ready=streamSink.sinkCapability.promise,this.streamSinks[streamId]=streamSink,Promise. try(action2,data.data,streamSink).then(function(){comObj.postMessage({sourceName,targetName,stream:StreamKind.START_COMPLETE,streamId,success:!0})},function(reason){comObj.postMessage({sourceName,targetName,stream:StreamKind.START_COMPLETE,streamId,reason:wrapReason(reason)})})}#processStreamMessage(data){const streamId=data.streamId,sourceName=this.sourceName,targetName=data.sourceName,comObj=this.comObj,streamController=this.streamControllers[streamId],streamSink=this.streamSinks[streamId];switch(data. stream){case StreamKind.START_COMPLETE:data.success?streamController.startCall.resolve():streamController.startCall.reject(wrapReason(data.reason));break;case StreamKind.PULL_COMPLETE:data.success?streamController.pullCall.resolve():streamController.pullCall.reject(wrapReason(data.reason));break;case StreamKind.PULL:if(!streamSink){comObj.postMessage({sourceName,targetName,stream:StreamKind.PULL_COMPLETE,streamId,success:!0});break}streamSink.desiredSize<=0&&data.desiredSize>0&&streamSink.sinkCapability. resolve(),streamSink.desiredSize=data.desiredSize,Promise.try(streamSink.onPull||onFn).then(function(){comObj.postMessage({sourceName,targetName,stream:StreamKind.PULL_COMPLETE,streamId,success:!0})},function(reason){comObj.postMessage({sourceName,targetName,stream:StreamKind.PULL_COMPLETE,streamId,reason:wrapReason(reason)})});break;case StreamKind.ENQUEUE:if(assert$1(streamController,"enqueue should have stream controller"),streamController.isClosed)break;streamController.controller.enqueue(data. chunk);break;case StreamKind.CLOSE:if(assert$1(streamController,"close should have stream controller"),streamController.isClosed)break;streamController.isClosed=!0,streamController.controller.close(),this.#deleteStreamController(streamController,streamId);break;case StreamKind.ERROR:assert$1(streamController,"error should have stream controller"),streamController.controller.error(wrapReason(data.reason)),this.#deleteStreamController(streamController,streamId);break;case StreamKind.CANCEL_COMPLETE: data.success?streamController.cancelCall.resolve():streamController.cancelCall.reject(wrapReason(data.reason)),this.#deleteStreamController(streamController,streamId);break;case StreamKind.CANCEL:if(!streamSink)break;const dataReason=wrapReason(data.reason);Promise.try(streamSink.onCancel||onFn,dataReason).then(function(){comObj.postMessage({sourceName,targetName,stream:StreamKind.CANCEL_COMPLETE,streamId,success:!0})},function(reason){comObj.postMessage({sourceName,targetName,stream:StreamKind. CANCEL_COMPLETE,streamId,reason:wrapReason(reason)})}),streamSink.sinkCapability.reject(dataReason),streamSink.isCancelled=!0,delete this.streamSinks[streamId];break;default:throw new Error("Unexpected stream case")}}async#deleteStreamController(streamController,streamId){await Promise.allSettled([streamController.startCall?.promise,streamController.pullCall?.promise,streamController.cancelCall?.promise]),delete this.streamControllers[streamId]}destroy(){this.#messageAC?.abort(),this.#messageAC= null}}class BaseCanvasFactory{#enableHWA=!1;constructor({enableHWA=!1}){this.#enableHWA=enableHWA}create(width,height){if(width<=0||height<=0)throw new Error("Invalid canvas size");const canvas=this._createCanvas(width,height);return{canvas,context:canvas.getContext("2d",{willReadFrequently:!this.#enableHWA})}}reset(canvasAndContext,width,height){if(!canvasAndContext.canvas)throw new Error("Canvas is not specified");if(width<=0||height<=0)throw new Error("Invalid canvas size");canvasAndContext.canvas. width=width,canvasAndContext.canvas.height=height}destroy(canvasAndContext){if(!canvasAndContext.canvas)throw new Error("Canvas is not specified");canvasAndContext.canvas.width=0,canvasAndContext.canvas.height=0,canvasAndContext.canvas=null,canvasAndContext.context=null}_createCanvas(width,height){unreachable("Abstract method `_createCanvas` called.")}}class DOMCanvasFactory extends BaseCanvasFactory{constructor({ownerDocument=globalThis.document,enableHWA=!1}){super({enableHWA}),this._document= ownerDocument}_createCanvas(width,height){const canvas=this._document.createElement("canvas");return canvas.width=width,canvas.height=height,canvas}}class BaseCMapReaderFactory{constructor({baseUrl=null,isCompressed=!0}){this.baseUrl=baseUrl,this.isCompressed=isCompressed}async fetch({name}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!name)throw new Error("CMap name must be specified.");const url2=this.baseUrl+name+(this.isCompressed? ".bcmap":"");return this._fetch(url2).then(cMapData=>({cMapData,isCompressed:this.isCompressed})).catch(reason=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${url2}`)})}async _fetch(url2){unreachable("Abstract method `_fetch` called.")}}class DOMCMapReaderFactory extends BaseCMapReaderFactory{async _fetch(url2){const data=await fetchData(url2,this.isCompressed?"arraybuffer":"text");return data instanceof ArrayBuffer?new Uint8Array(data):stringToBytes(data)}}class BaseFilterFactory{addFilter(maps){ return"none"}addHCMFilter(fgColor,bgColor){return"none"}addAlphaFilter(map2){return"none"}addLuminosityFilter(map2){return"none"}addHighlightHCMFilter(filterName,fgColor,bgColor,newFgColor,newBgColor){return"none"}destroy(keepHCM=!1){}}class DOMFilterFactory extends BaseFilterFactory{#baseUrl;#_cache;#_defs;#docId;#document;#_hcmCache;#id=0;constructor({docId,ownerDocument=globalThis.document}){super(),this.#docId=docId,this.#document=ownerDocument}get#cache(){return this.#_cache||=new Map}get#hcmCache(){ return this.#_hcmCache||=new Map}get#defs(){if(!this.#_defs){const div=this.#document.createElement("div"),{style:style2}=div;style2.visibility="hidden",style2.contain="strict",style2.width=style2.height=0,style2.position="absolute",style2.top=style2.left=0,style2.zIndex=-1;const svg2=this.#document.createElementNS(SVG_NS,"svg");svg2.setAttribute("width",0),svg2.setAttribute("height",0),this.#_defs=this.#document.createElementNS(SVG_NS,"defs"),div.append(svg2),svg2.append(this.#_defs),this.#document. body.append(div)}return this.#_defs}#createTables(maps){if(maps.length===1){const mapR2=maps[0],buffer=new Array(256);for(let i=0;i<256;i++)buffer[i]=mapR2[i]/255;const table2=buffer.join(",");return[table2,table2,table2]}const[mapR,mapG,mapB]=maps,bufferR=new Array(256),bufferG=new Array(256),bufferB=new Array(256);for(let i=0;i<256;i++)bufferR[i]=mapR[i]/255,bufferG[i]=mapG[i]/255,bufferB[i]=mapB[i]/255;return[bufferR.join(","),bufferG.join(","),bufferB.join(",")]}#createUrl(id2){if(this.#baseUrl=== void 0){this.#baseUrl="";const url2=this.#document.URL;url2!==this.#document.baseURI&&(isDataScheme(url2)?warn('#createUrl: ignore "data:"-URL for performance reasons.'):this.#baseUrl=updateUrlHash(url2,""))}return`url(${this.#baseUrl}#${id2})`}addFilter(maps){if(!maps)return"none";let value=this.#cache.get(maps);if(value)return value;const[tableR,tableG,tableB]=this.#createTables(maps),key2=maps.length===1?tableR:`${tableR}${tableG}${tableB}`;if(value=this.#cache.get(key2),value)return this.#cache. set(maps,value),value;const id2=`g_${this.#docId}_transfer_map_${this.#id++}`,url2=this.#createUrl(id2);this.#cache.set(maps,url2),this.#cache.set(key2,url2);const filter=this.#createFilter(id2);return this.#addTransferMapConversion(tableR,tableG,tableB,filter),url2}addHCMFilter(fgColor,bgColor){const key2=`${fgColor}-${bgColor}`,filterName="base";let info2=this.#hcmCache.get(filterName);if(info2?.key===key2||(info2?(info2.filter?.remove(),info2.key=key2,info2.url="none",info2.filter=null):(info2= {key:key2,url:"none",filter:null},this.#hcmCache.set(filterName,info2)),!fgColor||!bgColor))return info2.url;const fgRGB=this.#getRGB(fgColor);fgColor=Util.makeHexColor(...fgRGB);const bgRGB=this.#getRGB(bgColor);if(bgColor=Util.makeHexColor(...bgRGB),this.#defs.style.color="",fgColor==="#000000"&&bgColor==="#ffffff"||fgColor===bgColor)return info2.url;const map2=new Array(256);for(let i=0;i<=255;i++){const x=i/255;map2[i]=x<=.03928?x/12.92:((x+.055)/1.055)**2.4}const table2=map2.join(","),id2=`\ g_${this.#docId}_hcm_filter`,filter=info2.filter=this.#createFilter(id2);this.#addTransferMapConversion(table2,table2,table2,filter),this.#addGrayConversion(filter);const getSteps=(c2,n)=>{const start2=fgRGB[c2]/255,end=bgRGB[c2]/255,arr=new Array(n+1);for(let i=0;i<=n;i++)arr[i]=start2+i/n*(end-start2);return arr.join(",")};return this.#addTransferMapConversion(getSteps(0,5),getSteps(1,5),getSteps(2,5),filter),info2.url=this.#createUrl(id2),info2.url}addAlphaFilter(map2){let value=this.#cache.get( map2);if(value)return value;const[tableA]=this.#createTables([map2]),key2=`alpha_${tableA}`;if(value=this.#cache.get(key2),value)return this.#cache.set(map2,value),value;const id2=`g_${this.#docId}_alpha_map_${this.#id++}`,url2=this.#createUrl(id2);this.#cache.set(map2,url2),this.#cache.set(key2,url2);const filter=this.#createFilter(id2);return this.#addTransferMapAlphaConversion(tableA,filter),url2}addLuminosityFilter(map2){let value=this.#cache.get(map2||"luminosity");if(value)return value;let tableA, key2;if(map2?([tableA]=this.#createTables([map2]),key2=`luminosity_${tableA}`):key2="luminosity",value=this.#cache.get(key2),value)return this.#cache.set(map2,value),value;const id2=`g_${this.#docId}_luminosity_map_${this.#id++}`,url2=this.#createUrl(id2);this.#cache.set(map2,url2),this.#cache.set(key2,url2);const filter=this.#createFilter(id2);return this.#addLuminosityConversion(filter),map2&&this.#addTransferMapAlphaConversion(tableA,filter),url2}addHighlightHCMFilter(filterName,fgColor,bgColor,newFgColor,newBgColor){ const key2=`${fgColor}-${bgColor}-${newFgColor}-${newBgColor}`;let info2=this.#hcmCache.get(filterName);if(info2?.key===key2||(info2?(info2.filter?.remove(),info2.key=key2,info2.url="none",info2.filter=null):(info2={key:key2,url:"none",filter:null},this.#hcmCache.set(filterName,info2)),!fgColor||!bgColor))return info2.url;const[fgRGB,bgRGB]=[fgColor,bgColor].map(this.#getRGB.bind(this));let fgGray=Math.round(.2126*fgRGB[0]+.7152*fgRGB[1]+.0722*fgRGB[2]),bgGray=Math.round(.2126*bgRGB[0]+.7152*bgRGB[1]+ .0722*bgRGB[2]),[newFgRGB,newBgRGB]=[newFgColor,newBgColor].map(this.#getRGB.bind(this));bgGray{const arr=new Array(256),step=(bgGray-fgGray)/n,newStart=fg/255,newStep=(bg-fg)/(255*n);let prev2=0;for(let i=0;i<=n;i++){const k=Math.round(fgGray+i*step),value=newStart+i*newStep;for(let j=prev2;j<=k;j++)arr[j]=value;prev2=k+1}for(let i=prev2;i<256;i++)arr[i]=arr[prev2-1]; return arr.join(",")},id2=`g_${this.#docId}_hcm_${filterName}_filter`,filter=info2.filter=this.#createFilter(id2);return this.#addGrayConversion(filter),this.#addTransferMapConversion(getSteps(newFgRGB[0],newBgRGB[0],5),getSteps(newFgRGB[1],newBgRGB[1],5),getSteps(newFgRGB[2],newBgRGB[2],5),filter),info2.url=this.#createUrl(id2),info2.url}destroy(keepHCM=!1){keepHCM&&this.#_hcmCache?.size||(this.#_defs?.parentNode.parentNode.remove(),this.#_defs=null,this.#_cache?.clear(),this.#_cache=null,this.#_hcmCache?. clear(),this.#_hcmCache=null,this.#id=0)}#addLuminosityConversion(filter){const feColorMatrix=this.#document.createElementNS(SVG_NS,"feColorMatrix");feColorMatrix.setAttribute("type","matrix"),feColorMatrix.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),filter.append(feColorMatrix)}#addGrayConversion(filter){const feColorMatrix=this.#document.createElementNS(SVG_NS,"feColorMatrix");feColorMatrix.setAttribute("type","matrix"),feColorMatrix.setAttribute("values","0.2126 0\ .7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),filter.append(feColorMatrix)}#createFilter(id2){const filter=this.#document.createElementNS(SVG_NS,"filter");return filter.setAttribute("color-interpolation-filters","sRGB"),filter.setAttribute("id",id2),this.#defs.append(filter),filter}#appendFeFunc(feComponentTransfer,func,table2){const feFunc=this.#document.createElementNS(SVG_NS,func);feFunc.setAttribute("type","discrete"),feFunc.setAttribute("tableValues",table2), feComponentTransfer.append(feFunc)}#addTransferMapConversion(rTable,gTable,bTable,filter){const feComponentTransfer=this.#document.createElementNS(SVG_NS,"feComponentTransfer");filter.append(feComponentTransfer),this.#appendFeFunc(feComponentTransfer,"feFuncR",rTable),this.#appendFeFunc(feComponentTransfer,"feFuncG",gTable),this.#appendFeFunc(feComponentTransfer,"feFuncB",bTable)}#addTransferMapAlphaConversion(aTable,filter){const feComponentTransfer=this.#document.createElementNS(SVG_NS,"feComp\ onentTransfer");filter.append(feComponentTransfer),this.#appendFeFunc(feComponentTransfer,"feFuncA",aTable)}#getRGB(color){return this.#defs.style.color=color,getRGB(getComputedStyle(this.#defs).getPropertyValue("color"))}}class BaseStandardFontDataFactory{constructor({baseUrl=null}){this.baseUrl=baseUrl}async fetch({filename}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!filename)throw new Error("Font filename must be specified.");const url2=`${this. baseUrl}${filename}`;return this._fetch(url2).catch(reason=>{throw new Error(`Unable to load font data at: ${url2}`)})}async _fetch(url2){unreachable("Abstract method `_fetch` called.")}}class DOMStandardFontDataFactory extends BaseStandardFontDataFactory{async _fetch(url2){const data=await fetchData(url2,"arraybuffer");return new Uint8Array(data)}}class BaseWasmFactory{constructor({baseUrl=null}){this.baseUrl=baseUrl}async fetch({filename}){if(!this.baseUrl)throw new Error("Ensure that the `was\ mUrl` API parameter is provided.");if(!filename)throw new Error("Wasm filename must be specified.");const url2=`${this.baseUrl}${filename}`;return this._fetch(url2).catch(reason=>{throw new Error(`Unable to load wasm data at: ${url2}`)})}async _fetch(url2){unreachable("Abstract method `_fetch` called.")}}class DOMWasmFactory extends BaseWasmFactory{async _fetch(url2){const data=await fetchData(url2,"arraybuffer");return new Uint8Array(data)}}isNodeJS&&warn("Please use the `legacy` build in Node.\ js environments.");async function node_utils_fetchData(url2){const data=await process.getBuiltinModule("fs").promises.readFile(url2);return new Uint8Array(data)}class NodeFilterFactory extends BaseFilterFactory{}class NodeCanvasFactory extends BaseCanvasFactory{_createCanvas(width,height){return process.getBuiltinModule("module").createRequire(import.meta.url)("@napi-rs/canvas").createCanvas(width,height)}}class NodeCMapReaderFactory extends BaseCMapReaderFactory{async _fetch(url2){return node_utils_fetchData( url2)}}class NodeStandardFontDataFactory extends BaseStandardFontDataFactory{async _fetch(url2){return node_utils_fetchData(url2)}}class NodeWasmFactory extends BaseWasmFactory{async _fetch(url2){return node_utils_fetchData(url2)}}const PathType={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function applyBoundingBox(ctx,bbox){if(!bbox)return;const width=bbox[2]-bbox[0],height=bbox[3]-bbox[1],region=new Path2D;region.rect(bbox[0],bbox[1],width,height),ctx.clip(region)}class BaseShadingPattern{isModifyingCurrentTransform(){ return!1}getPattern(){unreachable("Abstract method `getPattern` called.")}}class RadialAxialShadingPattern extends BaseShadingPattern{constructor(IR){super(),this._type=IR[1],this._bbox=IR[2],this._colorStops=IR[3],this._p0=IR[4],this._p1=IR[5],this._r0=IR[6],this._r1=IR[7],this.matrix=null}_createGradient(ctx){let grad;this._type==="axial"?grad=ctx.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(grad=ctx.createRadialGradient(this._p0[0],this._p0[1], this._r0,this._p1[0],this._p1[1],this._r1));for(const colorStop of this._colorStops)grad.addColorStop(colorStop[0],colorStop[1]);return grad}getPattern(ctx,owner,inverse,pathType){let pattern2;if(pathType===PathType.STROKE||pathType===PathType.FILL){const ownerBBox=owner.current.getClippedPathBoundingBox(pathType,getCurrentTransform(ctx))||[0,0,0,0],width=Math.ceil(ownerBBox[2]-ownerBBox[0])||1,height=Math.ceil(ownerBBox[3]-ownerBBox[1])||1,tmpCanvas=owner.cachedCanvases.getCanvas("pattern",width, height),tmpCtx=tmpCanvas.context;tmpCtx.clearRect(0,0,tmpCtx.canvas.width,tmpCtx.canvas.height),tmpCtx.beginPath(),tmpCtx.rect(0,0,tmpCtx.canvas.width,tmpCtx.canvas.height),tmpCtx.translate(-ownerBBox[0],-ownerBBox[1]),inverse=Util.transform(inverse,[1,0,0,1,ownerBBox[0],ownerBBox[1]]),tmpCtx.transform(...owner.baseTransform),this.matrix&&tmpCtx.transform(...this.matrix),applyBoundingBox(tmpCtx,this._bbox),tmpCtx.fillStyle=this._createGradient(tmpCtx),tmpCtx.fill(),pattern2=ctx.createPattern(tmpCanvas. canvas,"no-repeat");const domMatrix=new DOMMatrix(inverse);pattern2.setTransform(domMatrix)}else applyBoundingBox(ctx,this._bbox),pattern2=this._createGradient(ctx);return pattern2}}function drawTriangle(data,context,p1,p2,p3,c1,c2,c3){const coords=context.coords,colors=context.colors,bytes=data.data,rowSize=data.width*4;let tmp;coords[p1+1]>coords[p2+1]&&(tmp=p1,p1=p2,p2=tmp,tmp=c1,c1=c2,c2=tmp),coords[p2+1]>coords[p3+1]&&(tmp=p2,p2=p3,p3=tmp,tmp=c2,c2=c3,c3=tmp),coords[p1+1]>coords[p2+1]&&(tmp= p1,p1=p2,p2=tmp,tmp=c1,c1=c2,c2=tmp);const x1=(coords[p1]+context.offsetX)*context.scaleX,y1=(coords[p1+1]+context.offsetY)*context.scaleY,x2=(coords[p2]+context.offsetX)*context.scaleX,y2=(coords[p2+1]+context.offsetY)*context.scaleY,x3=(coords[p3]+context.offsetX)*context.scaleX,y3=(coords[p3+1]+context.offsetY)*context.scaleY;if(y1>=y3)return;const c1r=colors[c1],c1g=colors[c1+1],c1b=colors[c1+2],c2r=colors[c2],c2g=colors[c2+1],c2b=colors[c2+2],c3r=colors[c3],c3g=colors[c3+1],c3b=colors[c3+2], minY=Math.round(y1),maxY=Math.round(y3);let xa,car,cag,cab,xb,cbr,cbg,cbb;for(let y=minY;y<=maxY;y++){if(yy3?k2=1:y2===y3?k2=0:k2=(y2-y)/(y2-y3),xa=x2-(x2-x3)*k2,car=c2r-(c2r-c3r)*k2,cag=c2g-(c2g-c3g)*k2,cab=c2b-(c2b-c3b)*k2}let k;yy3?k=1:k=(y1-y)/(y1-y3),xb=x1-(x1-x3)*k,cbr=c1r-(c1r-c3r)*k,cbg=c1g-(c1g-c3g)*k,cbb=c1b-(c1b-c3b)*k;const x1_=Math.round(Math.min( xa,xb)),x2_=Math.round(Math.max(xa,xb));let j=rowSize*y+x1_*4;for(let x=x1_;x<=x2_;x++)k=(xa-x)/(xa-xb),k<0?k=0:k>1&&(k=1),bytes[j++]=car-(car-cbr)*k|0,bytes[j++]=cag-(cag-cbg)*k|0,bytes[j++]=cab-(cab-cbb)*k|0,bytes[j++]=255}}function drawFigure(data,figure,context){const ps=figure.coords,cs=figure.colors;let i,ii;switch(figure.type){case"lattice":const verticesPerRow=figure.verticesPerRow,rows=Math.floor(ps.length/verticesPerRow)-1,cols=verticesPerRow-1;for(i=0;i=xScaledWidth?canvasWidth=xstep:redrawHorizontally=!0,yScaledStep>=yScaledHeight?canvasHeight=ystep:redrawVertically=!0;const dimx=this.getSizeAndScale(canvasWidth,this.ctx.canvas.width,combinedScaleX),dimy=this.getSizeAndScale(canvasHeight,this.ctx.canvas.height, combinedScaleY),tmpCanvas=owner.cachedCanvases.getCanvas("pattern",dimx.size,dimy.size),tmpCtx=tmpCanvas.context,graphics=canvasGraphicsFactory.createCanvasGraphics(tmpCtx);if(graphics.groupLevel=owner.groupLevel,this.setFillAndStrokeStyleToContext(graphics,paintType,color),tmpCtx.translate(-dimx.scale*x0,-dimy.scale*y0),graphics.transform(dimx.scale,0,0,dimy.scale,0,0),tmpCtx.save(),this.clipBbox(graphics,x0,y0,x1,y1),graphics.baseTransform=getCurrentTransform(graphics.ctx),graphics.executeOperatorList( operatorList),graphics.endDrawing(),tmpCtx.restore(),redrawHorizontally||redrawVertically){const image2=tmpCanvas.canvas;redrawHorizontally&&(canvasWidth=xstep),redrawVertically&&(canvasHeight=ystep);const dimx2=this.getSizeAndScale(canvasWidth,this.ctx.canvas.width,combinedScaleX),dimy2=this.getSizeAndScale(canvasHeight,this.ctx.canvas.height,combinedScaleY),xSize=dimx2.size,ySize=dimy2.size,tmpCanvas2=owner.cachedCanvases.getCanvas("pattern-workaround",xSize,ySize),tmpCtx2=tmpCanvas2.context,ii=redrawHorizontally? Math.floor(width/xstep):0,jj=redrawVertically?Math.floor(height/ystep):0;for(let i=0;i<=ii;i++)for(let j=0;j<=jj;j++)tmpCtx2.drawImage(image2,xSize*i,ySize*j,xSize,ySize,0,0,xSize,ySize);return{canvas:tmpCanvas2.canvas,scaleX:dimx2.scale,scaleY:dimy2.scale,offsetX:x0,offsetY:y0}}return{canvas:tmpCanvas.canvas,scaleX:dimx.scale,scaleY:dimy.scale,offsetX:x0,offsetY:y0}}getSizeAndScale(step,realOutputSize,scale2){const maxSize=Math.max(TilingPattern.MAX_PATTERN_SIZE,realOutputSize);let size2=Math.ceil( step*scale2);return size2>=maxSize?size2=maxSize:scale2=size2/step,{scale:scale2,size:size2}}clipBbox(graphics,x0,y0,x1,y1){const bboxWidth=x1-x0,bboxHeight=y1-y0;graphics.ctx.rect(x0,y0,bboxWidth,bboxHeight),Util.axialAlignedBoundingBox([x0,y0,x1,y1],getCurrentTransform(graphics.ctx),graphics.current.minMax),graphics.clip(),graphics.endPath()}setFillAndStrokeStyleToContext(graphics,paintType,color){const context=graphics.ctx,current2=graphics.current;switch(paintType){case PaintType.COLORED:const{ fillStyle,strokeStyle}=this.ctx;context.fillStyle=current2.fillColor=fillStyle,context.strokeStyle=current2.strokeColor=strokeStyle;break;case PaintType.UNCOLORED:context.fillStyle=context.strokeStyle=color,current2.fillColor=current2.strokeColor=color;break;default:throw new FormatError(`Unsupported paint type: ${paintType}`)}}isModifyingCurrentTransform(){return!1}getPattern(ctx,owner,inverse,pathType){let matrix=inverse;pathType!==PathType.SHADING&&(matrix=Util.transform(matrix,owner.baseTransform), this.matrix&&(matrix=Util.transform(matrix,this.matrix)));const temporaryPatternCanvas=this.createPatternCanvas(owner);let domMatrix=new DOMMatrix(matrix);domMatrix=domMatrix.translate(temporaryPatternCanvas.offsetX,temporaryPatternCanvas.offsetY),domMatrix=domMatrix.scale(1/temporaryPatternCanvas.scaleX,1/temporaryPatternCanvas.scaleY);const pattern2=ctx.createPattern(temporaryPatternCanvas.canvas,"repeat");return pattern2.setTransform(domMatrix),pattern2}}function convertBlackAndWhiteToRGBA({src, srcPos=0,dest,width,height,nonBlackColor=4294967295,inverseDecode=!1}){const black=util_FeatureTest.isLittleEndian?4278190080:255,[zeroMapping,oneMapping]=inverseDecode?[nonBlackColor,black]:[black,nonBlackColor],widthInSource=width>>3,widthRemainder=width&7,srcLength=src.length;dest=new Uint32Array(dest.buffer);let destPos=0;for(let i=0;i{ctx.save=ctx.__originalSave,ctx.restore=ctx.__originalRestore,ctx.rotate=ctx.__originalRotate,ctx.scale= ctx.__originalScale,ctx.translate=ctx.__originalTranslate,ctx.transform=ctx.__originalTransform,ctx.setTransform=ctx.__originalSetTransform,ctx.resetTransform=ctx.__originalResetTransform,ctx.clip=ctx.__originalClip,ctx.moveTo=ctx.__originalMoveTo,ctx.lineTo=ctx.__originalLineTo,ctx.bezierCurveTo=ctx.__originalBezierCurveTo,ctx.rect=ctx.__originalRect,ctx.closePath=ctx.__originalClosePath,ctx.beginPath=ctx.__originalBeginPath,delete ctx._removeMirroring},ctx.save=function(){destCtx.save(),this.__originalSave()}, ctx.restore=function(){destCtx.restore(),this.__originalRestore()},ctx.translate=function(x,y){destCtx.translate(x,y),this.__originalTranslate(x,y)},ctx.scale=function(x,y){destCtx.scale(x,y),this.__originalScale(x,y)},ctx.transform=function(a,b,c2,d2,e,f){destCtx.transform(a,b,c2,d2,e,f),this.__originalTransform(a,b,c2,d2,e,f)},ctx.setTransform=function(a,b,c2,d2,e,f){destCtx.setTransform(a,b,c2,d2,e,f),this.__originalSetTransform(a,b,c2,d2,e,f)},ctx.resetTransform=function(){destCtx.resetTransform(), this.__originalResetTransform()},ctx.rotate=function(angle){destCtx.rotate(angle),this.__originalRotate(angle)},ctx.clip=function(rule){destCtx.clip(rule),this.__originalClip(rule)},ctx.moveTo=function(x,y){destCtx.moveTo(x,y),this.__originalMoveTo(x,y)},ctx.lineTo=function(x,y){destCtx.lineTo(x,y),this.__originalLineTo(x,y)},ctx.bezierCurveTo=function(cp1x,cp1y,cp2x,cp2y,x,y){destCtx.bezierCurveTo(cp1x,cp1y,cp2x,cp2y,x,y),this.__originalBezierCurveTo(cp1x,cp1y,cp2x,cp2y,x,y)},ctx.rect=function(x,y,width,height){ destCtx.rect(x,y,width,height),this.__originalRect(x,y,width,height)},ctx.closePath=function(){destCtx.closePath(),this.__originalClosePath()},ctx.beginPath=function(){destCtx.beginPath(),this.__originalBeginPath()}}class CachedCanvases{constructor(canvasFactory){this.canvasFactory=canvasFactory,this.cache=Object.create(null)}getCanvas(id2,width,height){let canvasEntry;return this.cache[id2]!==void 0?(canvasEntry=this.cache[id2],this.canvasFactory.reset(canvasEntry,width,height)):(canvasEntry=this. canvasFactory.create(width,height),this.cache[id2]=canvasEntry),canvasEntry}delete(id2){delete this.cache[id2]}clear(){for(const id2 in this.cache){const canvasEntry=this.cache[id2];this.canvasFactory.destroy(canvasEntry),delete this.cache[id2]}}}function drawImageAtIntegerCoords(ctx,srcImg,srcX,srcY,srcW,srcH,destX,destY,destW,destH){const[a,b,c2,d2,tx,ty]=getCurrentTransform(ctx);if(b===0&&c2===0){const tlX=destX*a+tx,rTlX=Math.round(tlX),tlY=destY*d2+ty,rTlY=Math.round(tlY),brX=(destX+destW)* a+tx,rWidth=Math.abs(Math.round(brX)-rTlX)||1,brY=(destY+destH)*d2+ty,rHeight=Math.abs(Math.round(brY)-rTlY)||1;return ctx.setTransform(Math.sign(a),0,0,Math.sign(d2),rTlX,rTlY),ctx.drawImage(srcImg,srcX,srcY,srcW,srcH,0,0,rWidth,rHeight),ctx.setTransform(a,b,c2,d2,tx,ty),[rWidth,rHeight]}if(a===0&&d2===0){const tlX=destY*c2+tx,rTlX=Math.round(tlX),tlY=destX*b+ty,rTlY=Math.round(tlY),brX=(destY+destH)*c2+tx,rWidth=Math.abs(Math.round(brX)-rTlX)||1,brY=(destX+destW)*b+ty,rHeight=Math.abs(Math.round( brY)-rTlY)||1;return ctx.setTransform(0,Math.sign(b),Math.sign(c2),0,rTlX,rTlY),ctx.drawImage(srcImg,srcX,srcY,srcW,srcH,0,0,rHeight,rWidth),ctx.setTransform(a,b,c2,d2,tx,ty),[rHeight,rWidth]}ctx.drawImage(srcImg,srcX,srcY,srcW,srcH,destX,destY,destW,destH);const scaleX=Math.hypot(a,b),scaleY=Math.hypot(c2,d2);return[scaleX*destW,scaleY*destH]}class CanvasExtraState{alphaIsShape=!1;fontSize=0;fontSizeScale=1;textMatrix=null;textMatrixScale=1;fontMatrix=FONT_IDENTITY_MATRIX;leading=0;x=0;y=0;lineX=0;lineY=0;charSpacing=0;wordSpacing=0;textHScale=1;textRenderingMode=TextRenderingMode. FILL;textRise=0;fillColor="#000000";strokeColor="#000000";patternFill=!1;patternStroke=!1;fillAlpha=1;strokeAlpha=1;lineWidth=1;activeSMask=null;transferMaps="none";constructor(width,height){this.clipBox=new Float32Array([0,0,width,height]),this.minMax=MIN_MAX_INIT.slice()}clone(){const clone2=Object.create(this);return clone2.clipBox=this.clipBox.slice(),clone2.minMax=this.minMax.slice(),clone2}getPathBoundingBox(pathType=PathType.FILL,transform2=null){const box2=this.minMax.slice();if(pathType=== PathType.STROKE){transform2||unreachable("Stroke bounding box must include transform."),Util.singularValueDecompose2dScale(transform2,XY);const xStrokePad=XY[0]*this.lineWidth/2,yStrokePad=XY[1]*this.lineWidth/2;box2[0]-=xStrokePad,box2[1]-=yStrokePad,box2[2]+=xStrokePad,box2[3]+=yStrokePad}return box2}updateClipFromPath(){const intersect=Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(intersect||[0,0,0,0])}isEmptyClip(){return this.minMax[0]===1/0}startNewPathAndClipBox(box2){ this.clipBox.set(box2,0),this.minMax.set(MIN_MAX_INIT,0)}getClippedPathBoundingBox(pathType=PathType.FILL,transform2=null){return Util.intersect(this.clipBox,this.getPathBoundingBox(pathType,transform2))}}function putBinaryImageData(ctx,imgData){if(imgData instanceof ImageData){ctx.putImageData(imgData,0,0);return}const height=imgData.height,width=imgData.width,partialChunkHeight=height%FULL_CHUNK_HEIGHT,fullChunks=(height-partialChunkHeight)/FULL_CHUNK_HEIGHT,totalChunks=partialChunkHeight===0? fullChunks:fullChunks+1,chunkImgData=ctx.createImageData(width,FULL_CHUNK_HEIGHT);let srcPos=0,destPos;const src=imgData.data,dest=chunkImgData.data;let i,j,thisChunkHeight,elemsInThisChunk;if(imgData.kind===util_ImageKind.GRAYSCALE_1BPP){const srcLength=src.byteLength,dest32=new Uint32Array(dest.buffer,0,dest.byteLength>>2),dest32DataLength=dest32.length,fullSrcDiff=width+7>>3,white=4294967295,black=util_FeatureTest.isLittleEndian?4278190080:255;for(i=0;ifullSrcDiff?width:srcDiff*8-7,kEndUnrolled=kEnd&-8;let mask=0,srcByte=0;for(;k>=1}for(;destPos=fullChunks&&(thisChunkHeight=partialChunkHeight,elemsInThisChunk=width*thisChunkHeight),destPos=0,j=elemsInThisChunk;j--;)dest[destPos++]= src[srcPos++],dest[destPos++]=src[srcPos++],dest[destPos++]=src[srcPos++],dest[destPos++]=255;ctx.putImageData(chunkImgData,0,i*FULL_CHUNK_HEIGHT)}else throw new Error(`bad image kind: ${imgData.kind}`)}function putBinaryImageMask(ctx,imgData){if(imgData.bitmap){ctx.drawImage(imgData.bitmap,0,0);return}const height=imgData.height,width=imgData.width,partialChunkHeight=height%FULL_CHUNK_HEIGHT,fullChunks=(height-partialChunkHeight)/FULL_CHUNK_HEIGHT,totalChunks=partialChunkHeight===0?fullChunks:fullChunks+ 1,chunkImgData=ctx.createImageData(width,FULL_CHUNK_HEIGHT);let srcPos=0;const src=imgData.data,dest=chunkImgData.data;for(let i=0;iEXECUTION_STEPS&&typeof continueCallback=="function",endTime=chunkOperations?Date.now()+ EXECUTION_TIME:0;let steps=0;const commonObjs=this.commonObjs,objs=this.objs;let fnId;for(;;){if(stepper!==void 0&&i===stepper.nextBreakPoint)return stepper.breakIt(i,continueCallback),i;if(fnId=fnArray[i],fnId!==OPS.dependency)this[fnId].apply(this,argsArray[i]);else for(const depObjId of argsArray[i]){const objsPool=depObjId.startsWith("g_")?commonObjs:objs;if(!objsPool.has(depObjId))return objsPool.get(depObjId,continueCallback),i}if(i++,i===argsArrayLen)return i;if(chunkOperations&&++steps>EXECUTION_STEPS){ if(Date.now()>endTime)return continueCallback(),i;steps=0}}}#restoreInitialState(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}endDrawing(){this.#restoreInitialState(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const cache2 of this. _cachedBitmapsMap.values()){for(const canvas of cache2.values())typeof HTMLCanvasElement<"u"&&canvas instanceof HTMLCanvasElement&&(canvas.width=canvas.height=0);cache2.clear()}this._cachedBitmapsMap.clear(),this.#drawFilter()}#drawFilter(){if(this.pageColors){const hcmFilterId=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(hcmFilterId!=="none"){const savedFilter=this.ctx.filter;this.ctx.filter=hcmFilterId,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx. filter=savedFilter}}}_scaleImage(img,inverseTransform){const width=img.width??img.displayWidth,height=img.height??img.displayHeight;let widthScale=Math.max(Math.hypot(inverseTransform[0],inverseTransform[1]),1),heightScale=Math.max(Math.hypot(inverseTransform[2],inverseTransform[3]),1),paintWidth=width,paintHeight=height,tmpCanvasId="prescale1",tmpCanvas,tmpCtx;for(;widthScale>2&&paintWidth>1||heightScale>2&&paintHeight>1;){let newWidth=paintWidth,newHeight=paintHeight;widthScale>2&&paintWidth>1&& (newWidth=paintWidth>=16384?Math.floor(paintWidth/2)-1||1:Math.ceil(paintWidth/2),widthScale/=paintWidth/newWidth),heightScale>2&&paintHeight>1&&(newHeight=paintHeight>=16384?Math.floor(paintHeight/2)-1||1:Math.ceil(paintHeight)/2,heightScale/=paintHeight/newHeight),tmpCanvas=this.cachedCanvases.getCanvas(tmpCanvasId,newWidth,newHeight),tmpCtx=tmpCanvas.context,tmpCtx.clearRect(0,0,newWidth,newHeight),tmpCtx.drawImage(img,0,0,paintWidth,paintHeight,0,0,newWidth,newHeight),img=tmpCanvas.canvas,paintWidth= newWidth,paintHeight=newHeight,tmpCanvasId=tmpCanvasId==="prescale1"?"prescale2":"prescale1"}return{img,paintWidth,paintHeight}}_createMaskCanvas(img){const ctx=this.ctx,{width,height}=img,fillColor=this.current.fillColor,isPatternFill=this.current.patternFill,currentTransform=getCurrentTransform(ctx);let cache2,cacheKey,scaled,maskCanvas;if((img.bitmap||img.data)&&img.count>1){const mainKey=img.bitmap||img.data.buffer;cacheKey=JSON.stringify(isPatternFill?currentTransform:[currentTransform.slice( 0,4),fillColor]),cache2=this._cachedBitmapsMap.get(mainKey),cache2||(cache2=new Map,this._cachedBitmapsMap.set(mainKey,cache2));const cachedImage=cache2.get(cacheKey);if(cachedImage&&!isPatternFill){const offsetX2=Math.round(Math.min(currentTransform[0],currentTransform[2])+currentTransform[4]),offsetY2=Math.round(Math.min(currentTransform[1],currentTransform[3])+currentTransform[5]);return{canvas:cachedImage,offsetX:offsetX2,offsetY:offsetY2}}scaled=cachedImage}scaled||(maskCanvas=this.cachedCanvases. getCanvas("maskCanvas",width,height),putBinaryImageMask(maskCanvas.context,img));let maskToCanvas=Util.transform(currentTransform,[1/width,0,0,-1/height,0,0]);maskToCanvas=Util.transform(maskToCanvas,[1,0,0,1,0,-height]);const minMax=MIN_MAX_INIT.slice();Util.axialAlignedBoundingBox([0,0,width,height],maskToCanvas,minMax);const[minX,minY,maxX,maxY]=minMax,drawnWidth=Math.round(maxX-minX)||1,drawnHeight=Math.round(maxY-minY)||1,fillCanvas=this.cachedCanvases.getCanvas("fillCanvas",drawnWidth,drawnHeight), fillCtx=fillCanvas.context,offsetX=minX,offsetY=minY;fillCtx.translate(-offsetX,-offsetY),fillCtx.transform(...maskToCanvas),scaled||(scaled=this._scaleImage(maskCanvas.canvas,getCurrentTransformInverse(fillCtx)),scaled=scaled.img,cache2&&isPatternFill&&cache2.set(cacheKey,scaled)),fillCtx.imageSmoothingEnabled=getImageSmoothingEnabled(getCurrentTransform(fillCtx),img.interpolate),drawImageAtIntegerCoords(fillCtx,scaled,0,0,scaled.width,scaled.height,0,0,width,height),fillCtx.globalCompositeOperation= "source-in";const inverse=Util.transform(getCurrentTransformInverse(fillCtx),[1,0,0,1,-offsetX,-offsetY]);return fillCtx.fillStyle=isPatternFill?fillColor.getPattern(ctx,this,inverse,PathType.FILL):fillColor,fillCtx.fillRect(0,0,width,height),cache2&&!isPatternFill&&(this.cachedCanvases.delete("fillCanvas"),cache2.set(cacheKey,fillCanvas.canvas)),{canvas:fillCanvas.canvas,offsetX:Math.round(offsetX),offsetY:Math.round(offsetY)}}setLineWidth(width){width!==this.current.lineWidth&&(this._cachedScaleForStroking[0]= -1),this.current.lineWidth=width,this.ctx.lineWidth=width}setLineCap(style2){this.ctx.lineCap=LINE_CAP_STYLES[style2]}setLineJoin(style2){this.ctx.lineJoin=LINE_JOIN_STYLES[style2]}setMiterLimit(limit2){this.ctx.miterLimit=limit2}setDash(dashArray,dashPhase){const ctx=this.ctx;ctx.setLineDash!==void 0&&(ctx.setLineDash(dashArray),ctx.lineDashOffset=dashPhase)}setRenderingIntent(intent){}setFlatness(flatness){}setGState(states){for(const[key2,value]of states)switch(key2){case"LW":this.setLineWidth( value);break;case"LC":this.setLineCap(value);break;case"LJ":this.setLineJoin(value);break;case"ML":this.setMiterLimit(value);break;case"D":this.setDash(value[0],value[1]);break;case"RI":this.setRenderingIntent(value);break;case"FL":this.setFlatness(value);break;case"Font":this.setFont(value[0],value[1]);break;case"CA":this.current.strokeAlpha=value;break;case"ca":this.ctx.globalAlpha=this.current.fillAlpha=value;break;case"BM":this.ctx.globalCompositeOperation=value;break;case"SMask":this.current. activeSMask=value?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(value);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const inSMaskMode=this.inSMaskMode;this.current.activeSMask&&!inSMaskMode?this.beginSMaskMode():!this.current.activeSMask&&inSMaskMode&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mo\ de");const drawnWidth=this.ctx.canvas.width,drawnHeight=this.ctx.canvas.height,cacheId="smaskGroupAt"+this.groupLevel,scratchCanvas=this.cachedCanvases.getCanvas(cacheId,drawnWidth,drawnHeight);this.suspendedCtx=this.ctx;const ctx=this.ctx=scratchCanvas.context;ctx.setTransform(this.suspendedCtx.getTransform()),copyCtxState(this.suspendedCtx,ctx),mirrorContextOperations(ctx,this.suspendedCtx),this.setGState([["BM","source-over"]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode\ called while not in smask mode");this.ctx._removeMirroring(),copyCtxState(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(dirtyBox){if(!this.current.activeSMask)return;dirtyBox?(dirtyBox[0]=Math.floor(dirtyBox[0]),dirtyBox[1]=Math.floor(dirtyBox[1]),dirtyBox[2]=Math.ceil(dirtyBox[2]),dirtyBox[3]=Math.ceil(dirtyBox[3])):dirtyBox=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const smask=this.current.activeSMask,suspendedCtx=this.suspendedCtx;this.composeSMask( suspendedCtx,smask,this.ctx,dirtyBox),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(ctx,smask,layerCtx,layerBox){const layerOffsetX=layerBox[0],layerOffsetY=layerBox[1],layerWidth=layerBox[2]-layerOffsetX,layerHeight=layerBox[3]-layerOffsetY;layerWidth===0||layerHeight===0||(this.genericComposeSMask(smask.context,layerCtx,layerWidth,layerHeight,smask.subtype,smask.backdrop,smask.transferMap, layerOffsetX,layerOffsetY,smask.offsetX,smask.offsetY),ctx.save(),ctx.globalAlpha=1,ctx.globalCompositeOperation="source-over",ctx.setTransform(1,0,0,1,0,0),ctx.drawImage(layerCtx.canvas,0,0),ctx.restore())}genericComposeSMask(maskCtx,layerCtx,width,height,subtype,backdrop,transferMap,layerOffsetX,layerOffsetY,maskOffsetX,maskOffsetY){let maskCanvas=maskCtx.canvas,maskX=layerOffsetX-maskOffsetX,maskY=layerOffsetY-maskOffsetY;if(backdrop)if(maskX<0||maskY<0||maskX+width>maskCanvas.width||maskY+height> maskCanvas.height){const canvas=this.cachedCanvases.getCanvas("maskExtension",width,height),ctx=canvas.context;ctx.drawImage(maskCanvas,-maskX,-maskY),ctx.globalCompositeOperation="destination-atop",ctx.fillStyle=backdrop,ctx.fillRect(0,0,width,height),ctx.globalCompositeOperation="source-over",maskCanvas=canvas.canvas,maskX=maskY=0}else{maskCtx.save(),maskCtx.globalAlpha=1,maskCtx.setTransform(1,0,0,1,0,0);const clip2=new Path2D;clip2.rect(maskX,maskY,width,height),maskCtx.clip(clip2),maskCtx.globalCompositeOperation= "destination-atop",maskCtx.fillStyle=backdrop,maskCtx.fillRect(maskX,maskY,width,height),maskCtx.restore()}layerCtx.save(),layerCtx.globalAlpha=1,layerCtx.setTransform(1,0,0,1,0,0),subtype==="Alpha"&&transferMap?layerCtx.filter=this.filterFactory.addAlphaFilter(transferMap):subtype==="Luminosity"&&(layerCtx.filter=this.filterFactory.addLuminosityFilter(transferMap));const clip=new Path2D;clip.rect(layerOffsetX,layerOffsetY,width,height),layerCtx.clip(clip),layerCtx.globalCompositeOperation="dest\ ination-in",layerCtx.drawImage(maskCanvas,maskX,maskY,width,height,layerOffsetX,layerOffsetY,width,height),layerCtx.restore()}save(){this.inSMaskMode&©CtxState(this.ctx,this.suspendedCtx),this.ctx.save();const old=this.current;this.stateStack.push(old),this.current=old.clone()}restore(){if(this.stateStack.length===0){this.inSMaskMode&&this.endSMaskMode();return}this.current=this.stateStack.pop(),this.ctx.restore(),this.inSMaskMode&©CtxState(this.suspendedCtx,this.ctx),this.checkSMaskState(), this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}transform(a,b,c2,d2,e,f){this.ctx.transform(a,b,c2,d2,e,f),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(op2,data,minMax){let[path2]=data;if(!minMax){path2||=data[0]=new Path2D,this[op2](path2);return}if(!(path2 instanceof Path2D)){const path2d=data[0]=new Path2D;for(let i=0,ii=path2.length;i MAX_FONT_SIZE&&(browserFontSize=MAX_FONT_SIZE),this.current.fontSizeScale=size2/browserFontSize,this.ctx.font=`${italic} ${bold} ${browserFontSize}px ${typeface}`}setTextRenderingMode(mode){this.current.textRenderingMode=mode}setTextRise(rise){this.current.textRise=rise}moveText(x,y){this.current.x=this.current.lineX+=x,this.current.y=this.current.lineY+=y}setLeadingMoveText(x,y){this.setLeading(-y),this.moveText(x,y)}setTextMatrix(matrix){const{current:current2}=this;current2.textMatrix=matrix, current2.textMatrixScale=Math.hypot(matrix[0],matrix[1]),current2.x=current2.lineX=0,current2.y=current2.lineY=0}nextLine(){this.moveText(0,this.current.leading)}#getScaledPath(path2,currentTransform,transform2){const newPath=new Path2D;return newPath.addPath(path2,new DOMMatrix(transform2).invertSelf().multiplySelf(currentTransform)),newPath}paintChar(character,x,y,patternFillTransform,patternStrokeTransform){const ctx=this.ctx,current2=this.current,font=current2.font,textRenderingMode=current2. textRenderingMode,fontSize=current2.fontSize/current2.fontSizeScale,fillStrokeMode=textRenderingMode&TextRenderingMode.FILL_STROKE_MASK,isAddToPathSet=!!(textRenderingMode&TextRenderingMode.ADD_TO_PATH_FLAG),patternFill=current2.patternFill&&!font.missingFile,patternStroke=current2.patternStroke&&!font.missingFile;let path2;if((font.disableFontFace||isAddToPathSet||patternFill||patternStroke)&&!font.missingFile&&(path2=font.getPathGenerator(this.commonObjs,character)),path2&&(font.disableFontFace|| patternFill||patternStroke)){ctx.save(),ctx.translate(x,y),ctx.scale(fontSize,-fontSize);let currentTransform;if((fillStrokeMode===TextRenderingMode.FILL||fillStrokeMode===TextRenderingMode.FILL_STROKE)&&(patternFillTransform?(currentTransform=ctx.getTransform(),ctx.setTransform(...patternFillTransform),ctx.fill(this.#getScaledPath(path2,currentTransform,patternFillTransform))):ctx.fill(path2)),fillStrokeMode===TextRenderingMode.STROKE||fillStrokeMode===TextRenderingMode.FILL_STROKE)if(patternStrokeTransform){ currentTransform||=ctx.getTransform(),ctx.setTransform(...patternStrokeTransform);const{a,b,c:c2,d:d2}=currentTransform,invPatternTransform=Util.inverseTransform(patternStrokeTransform),transf=Util.transform([a,b,c2,d2,0,0],invPatternTransform);Util.singularValueDecompose2dScale(transf,XY),ctx.lineWidth*=Math.max(XY[0],XY[1])/fontSize,ctx.stroke(this.#getScaledPath(path2,currentTransform,patternStrokeTransform))}else ctx.lineWidth/=fontSize,ctx.stroke(path2);ctx.restore()}else(fillStrokeMode===TextRenderingMode. FILL||fillStrokeMode===TextRenderingMode.FILL_STROKE)&&ctx.fillText(character,x,y),(fillStrokeMode===TextRenderingMode.STROKE||fillStrokeMode===TextRenderingMode.FILL_STROKE)&&ctx.strokeText(character,x,y);isAddToPathSet&&(this.pendingTextPaths||=[]).push({transform:getCurrentTransform(ctx),x,y,fontSize,path:path2})}get isFontSubpixelAAEnabled(){const{context:ctx}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);ctx.scale(1.5,1),ctx.fillText("I",0,10);const data=ctx.getImageData(0, 0,10,10).data;let enabled=!1;for(let i=3;i0&&data[i]<255){enabled=!0;break}return shadow(this,"isFontSubpixelAAEnabled",enabled)}showText(glyphs){const current2=this.current,font=current2.font;if(font.isType3Font)return this.showType3Text(glyphs);const fontSize=current2.fontSize;if(fontSize===0)return;const ctx=this.ctx,fontSizeScale=current2.fontSizeScale,charSpacing=current2.charSpacing,wordSpacing=current2.wordSpacing,fontDirection=current2.fontDirection,textHScale=current2. textHScale*fontDirection,glyphsLength=glyphs.length,vertical=font.vertical,spacingDir=vertical?1:-1,defaultVMetrics=font.defaultVMetrics,widthAdvanceScale=fontSize*current2.fontMatrix[0],simpleFillText=current2.textRenderingMode===TextRenderingMode.FILL&&!font.disableFontFace&&!current2.patternFill;ctx.save(),current2.textMatrix&&ctx.transform(...current2.textMatrix),ctx.translate(current2.x,current2.y+current2.textRise),fontDirection>0?ctx.scale(textHScale,-1):ctx.scale(textHScale,1);let patternFillTransform, patternStrokeTransform;if(current2.patternFill){ctx.save();const pattern2=current2.fillColor.getPattern(ctx,this,getCurrentTransformInverse(ctx),PathType.FILL);patternFillTransform=getCurrentTransform(ctx),ctx.restore(),ctx.fillStyle=pattern2}if(current2.patternStroke){ctx.save();const pattern2=current2.strokeColor.getPattern(ctx,this,getCurrentTransformInverse(ctx),PathType.STROKE);patternStrokeTransform=getCurrentTransform(ctx),ctx.restore(),ctx.strokeStyle=pattern2}let lineWidth=current2.lineWidth; const scale2=current2.textMatrixScale;if(scale2===0||lineWidth===0){const fillStrokeMode=current2.textRenderingMode&TextRenderingMode.FILL_STROKE_MASK;(fillStrokeMode===TextRenderingMode.STROKE||fillStrokeMode===TextRenderingMode.FILL_STROKE)&&(lineWidth=this.getSinglePixelWidth())}else lineWidth/=scale2;if(fontSizeScale!==1&&(ctx.scale(fontSizeScale,fontSizeScale),lineWidth/=fontSizeScale),ctx.lineWidth=lineWidth,font.isInvalidPDFjsFont){const chars=[];let width=0;for(const glyph of glyphs)chars. push(glyph.unicode),width+=glyph.width;ctx.fillText(chars.join(""),0,0),current2.x+=width*widthAdvanceScale*textHScale,ctx.restore(),this.compose();return}let x=0,i;for(i=0;i0){const measuredWidth=ctx.measureText(character).width*1e3/fontSize*fontSizeScale;if(widthnew CanvasGraphics(ctx,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};pattern2=new TilingPattern(IR,this.ctx,canvasGraphicsFactory,baseTransform)}else pattern2=this._getPattern(IR[1],IR[2]);return pattern2}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments),this.current.patternStroke=!0}setFillColorN(){ this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(color){this.ctx.strokeStyle=this.current.strokeColor=color,this.current.patternStroke=!1}setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(color){this.ctx.fillStyle=this.current.fillColor=color,this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill= !1}_getPattern(objId,matrix=null){let pattern2;return this.cachedPatterns.has(objId)?pattern2=this.cachedPatterns.get(objId):(pattern2=getShadingPattern(this.getObject(objId)),this.cachedPatterns.set(objId,pattern2)),matrix&&(pattern2.matrix=matrix),pattern2}shadingFill(objId){if(!this.contentVisible)return;const ctx=this.ctx;this.save();const pattern2=this._getPattern(objId);ctx.fillStyle=pattern2.getPattern(ctx,this,getCurrentTransformInverse(ctx),PathType.SHADING);const inv=getCurrentTransformInverse( ctx);if(inv){const{width,height}=ctx.canvas,minMax=MIN_MAX_INIT.slice();Util.axialAlignedBoundingBox([0,0,width,height],inv,minMax);const[x0,y0,x1,y1]=minMax;this.ctx.fillRect(x0,y0,x1-x0,y1-y0)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){unreachable("Should not call beginInlineImage")}beginImageData(){unreachable("Should not call beginImageData")}paintFormXObjectBegin(matrix,bbox){if(this.contentVisible&& (this.save(),this.baseTransformStack.push(this.baseTransform),matrix&&this.transform(...matrix),this.baseTransform=getCurrentTransform(this.ctx),bbox)){Util.axialAlignedBoundingBox(bbox,this.baseTransform,this.current.minMax);const[x0,y0,x1,y1]=bbox,clip=new Path2D;clip.rect(x0,y0,x1-x0,y1-y0),this.ctx.clip(clip),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(group){if(!this.contentVisible)return;this.save(), this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const currentCtx=this.ctx;group.isolated||info("TODO: Support non-isolated groups."),group.knockout&&warn("Knockout groups not supported.");const currentTransform=getCurrentTransform(currentCtx);if(group.matrix&¤tCtx.transform(...group.matrix),!group.bbox)throw new Error("Bounding box is required.");let bounds=MIN_MAX_INIT.slice();Util.axialAlignedBoundingBox(group.bbox,getCurrentTransform(currentCtx),bounds);const canvasBounds=[ 0,0,currentCtx.canvas.width,currentCtx.canvas.height];bounds=Util.intersect(bounds,canvasBounds)||[0,0,0,0];const offsetX=Math.floor(bounds[0]),offsetY=Math.floor(bounds[1]),drawnWidth=Math.max(Math.ceil(bounds[2])-offsetX,1),drawnHeight=Math.max(Math.ceil(bounds[3])-offsetY,1);this.current.startNewPathAndClipBox([0,0,drawnWidth,drawnHeight]);let cacheId="groupAt"+this.groupLevel;group.smask&&(cacheId+="_smask_"+this.smaskCounter++%2);const scratchCanvas=this.cachedCanvases.getCanvas(cacheId,drawnWidth, drawnHeight),groupCtx=scratchCanvas.context;groupCtx.translate(-offsetX,-offsetY),groupCtx.transform(...currentTransform);let clip=new Path2D;const[x0,y0,x1,y1]=group.bbox;if(clip.rect(x0,y0,x1-x0,y1-y0),group.matrix){const path2=new Path2D;path2.addPath(clip,new DOMMatrix(group.matrix)),clip=path2}groupCtx.clip(clip),group.smask?this.smaskStack.push({canvas:scratchCanvas.canvas,context:groupCtx,offsetX,offsetY,subtype:group.smask.subtype,backdrop:group.smask.backdrop,transferMap:group.smask.transferMap|| null,startTransformInverse:null}):(currentCtx.setTransform(1,0,0,1,0,0),currentCtx.translate(offsetX,offsetY),currentCtx.save()),copyCtxState(currentCtx,groupCtx),this.ctx=groupCtx,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(currentCtx),this.groupLevel++}endGroup(group){if(!this.contentVisible)return;this.groupLevel--;const groupCtx=this.ctx,ctx=this.groupStack.pop();if(this.ctx=ctx,this.ctx.imageSmoothingEnabled=!1,group.smask)this.tempSMask=this.smaskStack.pop(), this.restore();else{this.ctx.restore();const currentMtx=getCurrentTransform(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...currentMtx);const dirtyBox=MIN_MAX_INIT.slice();Util.axialAlignedBoundingBox([0,0,groupCtx.canvas.width,groupCtx.canvas.height],currentMtx,dirtyBox),this.ctx.drawImage(groupCtx.canvas,0,0),this.ctx.restore(),this.compose(dirtyBox)}}beginAnnotation(id2,rect,transform2,matrix,hasOwnCanvas){if(this.#restoreInitialState(),resetCtxToDefault(this.ctx),this.ctx.save(), this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),rect){const width=rect[2]-rect[0],height=rect[3]-rect[1];if(hasOwnCanvas&&this.annotationCanvasMap){transform2=transform2.slice(),transform2[4]-=rect[0],transform2[5]-=rect[1],rect=rect.slice(),rect[0]=rect[1]=0,rect[2]=width,rect[3]=height,Util.singularValueDecompose2dScale(getCurrentTransform(this.ctx),XY);const{viewportScale}=this,canvasWidth=Math.ceil(width*this.outputScaleX*viewportScale),canvasHeight=Math.ceil(height* this.outputScaleY*viewportScale);this.annotationCanvas=this.canvasFactory.create(canvasWidth,canvasHeight);const{canvas,context}=this.annotationCanvas;this.annotationCanvasMap.set(id2,canvas),this.annotationCanvas.savedCtx=this.ctx,this.ctx=context,this.ctx.save(),this.ctx.setTransform(XY[0],0,0,-XY[1],0,height*XY[1]),resetCtxToDefault(this.ctx)}else{resetCtxToDefault(this.ctx),this.endPath();const clip=new Path2D;clip.rect(rect[0],rect[1],width,height),this.ctx.clip(clip)}}this.current=new CanvasExtraState( this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...transform2),this.transform(...matrix)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),this.#drawFilter(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(img){if(!this.contentVisible)return;const count=img.count;img=this.getObject(img.data,img),img.count=count;const ctx=this.ctx,mask=this._createMaskCanvas(img),maskCanvas=mask.canvas;ctx.save(), ctx.setTransform(1,0,0,1,0,0),ctx.drawImage(maskCanvas,mask.offsetX,mask.offsetY),ctx.restore(),this.compose()}paintImageMaskXObjectRepeat(img,scaleX,skewX=0,skewY=0,scaleY,positions){if(!this.contentVisible)return;img=this.getObject(img.data,img);const ctx=this.ctx;ctx.save();const currentTransform=getCurrentTransform(ctx);ctx.transform(scaleX,skewX,skewY,scaleY,0,0);const mask=this._createMaskCanvas(img);ctx.setTransform(1,0,0,1,mask.offsetX-currentTransform[4],mask.offsetY-currentTransform[5]); for(let i=0,ii=positions.length;i baseArea?normY/baseArea:1,scaleY=normX>baseArea?normX/baseArea:1}}this._cachedScaleForStroking[0]=scaleX,this._cachedScaleForStroking[1]=scaleY}return this._cachedScaleForStroking}rescaleAndStroke(path2,saveRestore){const{ctx,current:{lineWidth}}=this,[scaleX,scaleY]=this.getScaleForStroking();if(scaleX===scaleY){ctx.lineWidth=(lineWidth||1)*scaleX,ctx.stroke(path2);return}const dashes=ctx.getLineDash();saveRestore&&ctx.save(),ctx.scale(scaleX,scaleY),SCALE_MATRIX.a=1/scaleX,SCALE_MATRIX.d=1/scaleY; const newPath=new Path2D;if(newPath.addPath(path2,SCALE_MATRIX),dashes.length>0){const scale2=Math.max(scaleX,scaleY);ctx.setLineDash(dashes.map(x=>x/scale2)),ctx.lineDashOffset/=scale2}ctx.lineWidth=lineWidth||1,ctx.stroke(newPath),saveRestore&&ctx.restore()}isContentVisible(){for(let i=this.markedContentStack.length-1;i>=0;i--)if(!this.markedContentStack[i].visible)return!1;return!0}}for(const op2 in OPS)CanvasGraphics.prototype[op2]!==void 0&&(CanvasGraphics.prototype[OPS[op2]]=CanvasGraphics. prototype[op2]);class GlobalWorkerOptions{static#port=null;static#src="";static get workerPort(){return this.#port}static set workerPort(val){if(!(typeof Worker<"u"&&val instanceof Worker)&&val!==null)throw new Error("Invalid `workerPort` type.");this.#port=val}static get workerSrc(){return this.#src}static set workerSrc(val){if(typeof val!="string")throw new Error("Invalid `workerSrc` type.");this.#src=val}}class Metadata{#map;#data;constructor({parsedData,rawData}){this.#map=parsedData,this.#data= rawData}getRaw(){return this.#data}get(name){return this.#map.get(name)??null}[Symbol.iterator](){return this.#map.entries()}}const INTERNAL=Symbol("INTERNAL");class OptionalContentGroup{#isDisplay=!1;#isPrint=!1;#userSet=!1;#visible=!0;constructor(renderingIntent,{name,intent,usage,rbGroups}){this.#isDisplay=!!(renderingIntent&RenderingIntentFlag.DISPLAY),this.#isPrint=!!(renderingIntent&RenderingIntentFlag.PRINT),this.name=name,this.intent=intent,this.usage=usage,this.rbGroups=rbGroups}get visible(){ if(this.#userSet)return this.#visible;if(!this.#visible)return!1;const{print,view}=this.usage;return this.#isDisplay?view?.viewState!=="OFF":this.#isPrint?print?.printState!=="OFF":!0}_setVisible(internal,visible,userSet=!1){internal!==INTERNAL&&unreachable("Internal method `_setVisible` called."),this.#userSet=userSet,this.#visible=visible}}class OptionalContentConfig{#cachedGetHash=null;#groups=new Map;#initialHash=null;#order=null;constructor(data,renderingIntent=RenderingIntentFlag.DISPLAY){ if(this.renderingIntent=renderingIntent,this.name=null,this.creator=null,data!==null){this.name=data.name,this.creator=data.creator,this.#order=data.order;for(const group of data.groups)this.#groups.set(group.id,new OptionalContentGroup(renderingIntent,group));if(data.baseState==="OFF")for(const group of this.#groups.values())group._setVisible(INTERNAL,!1);for(const on2 of data.on)this.#groups.get(on2)._setVisible(INTERNAL,!0);for(const off of data.off)this.#groups.get(off)._setVisible(INTERNAL, !1);this.#initialHash=this.getHash()}}#evaluateVisibilityExpression(array2){const length=array2.length;if(length<2)return!0;const operator2=array2[0];for(let i=1;i0){const buffer=initialData instanceof Uint8Array&&initialData.byteLength===initialData.buffer.byteLength?initialData.buffer:new Uint8Array(initialData).buffer;this._queuedChunks.push(buffer)}this._pdfDataRangeTransport=pdfDataRangeTransport,this._isStreamingSupported=!disableStream,this._isRangeSupported=!disableRange,this._contentLength=length,this._fullRequestReader=null,this._rangeReaders= [],pdfDataRangeTransport.addRangeListener((begin,chunk)=>{this._onReceiveData({begin,chunk})}),pdfDataRangeTransport.addProgressListener((loaded,total)=>{this._onProgress({loaded,total})}),pdfDataRangeTransport.addProgressiveReadListener(chunk=>{this._onReceiveData({chunk})}),pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),pdfDataRangeTransport.transportReady()}_onReceiveData({begin,chunk}){const buffer=chunk instanceof Uint8Array&&chunk.byteLength===chunk.buffer. byteLength?chunk.buffer:new Uint8Array(chunk).buffer;if(begin===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(buffer):this._queuedChunks.push(buffer);else{const found=this._rangeReaders.some(function(rangeReader){return rangeReader._begin!==begin?!1:(rangeReader._enqueue(buffer),!0)});assert$1(found,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(evt){evt.total===void 0? this._rangeReaders[0]?.onProgress?.({loaded:evt.loaded}):this._fullRequestReader?.onProgress?.({loaded:evt.loaded,total:evt.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(reader){const i=this._rangeReaders.indexOf(reader);i>=0&&this._rangeReaders.splice(i,1)}getFullReader(){assert$1(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const queuedChunks=this._queuedChunks;return this._queuedChunks= null,new PDFDataTransportStreamReader(this,queuedChunks,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(begin,end){if(end<=this._progressiveDataLength)return null;const reader=new PDFDataTransportStreamRangeReader(this,begin,end);return this._pdfDataRangeTransport.requestDataRange(begin,end),this._rangeReaders.push(reader),reader}cancelAllRequests(reason){this._fullRequestReader?.cancel(reason);for(const reader of this._rangeReaders.slice(0))reader.cancel(reason);this._pdfDataRangeTransport. abort()}}class PDFDataTransportStreamReader{constructor(stream,queuedChunks,progressiveDone=!1,contentDispositionFilename=null){this._stream=stream,this._done=progressiveDone||!1,this._filename=isPdfFile(contentDispositionFilename)?contentDispositionFilename:null,this._queuedChunks=queuedChunks||[],this._loaded=0;for(const chunk of this._queuedChunks)this._loaded+=chunk.byteLength;this._requests=[],this._headersReady=Promise.resolve(),stream._fullRequestReader=this,this.onProgress=null}_enqueue(chunk){ this._done||(this._requests.length>0?this._requests.shift().resolve({value:chunk,done:!1}):this._queuedChunks.push(chunk),this._loaded+=chunk.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(), done:!1};if(this._done)return{value:void 0,done:!0};const requestCapability=Promise.withResolvers();return this._requests.push(requestCapability),requestCapability.promise}cancel(reason){this._done=!0;for(const requestCapability of this._requests)requestCapability.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class PDFDataTransportStreamRangeReader{constructor(stream,begin,end){this._stream=stream,this._begin=begin,this._end=end,this._queuedChunk= null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(chunk){if(!this._done){if(this._requests.length===0)this._queuedChunk=chunk;else{this._requests.shift().resolve({value:chunk,done:!1});for(const requestCapability of this._requests)requestCapability.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const chunk=this._queuedChunk;return this._queuedChunk= null,{value:chunk,done:!1}}if(this._done)return{value:void 0,done:!0};const requestCapability=Promise.withResolvers();return this._requests.push(requestCapability),requestCapability.promise}cancel(reason){this._done=!0;for(const requestCapability of this._requests)requestCapability.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function getFilenameFromContentDispositionHeader(contentDisposition){let needsEncodingFixup=!0,tmp=toParamRegExp("filename\ \\*","i").exec(contentDisposition);if(tmp){tmp=tmp[1];let filename=rfc2616unquote(tmp);return filename=unescape(filename),filename=rfc5987decode(filename),filename=rfc2047decode(filename),fixupEncoding(filename)}if(tmp=rfc2231getparam(contentDisposition),tmp){const filename=rfc2047decode(tmp);return fixupEncoding(filename)}if(tmp=toParamRegExp("filename","i").exec(contentDisposition),tmp){tmp=tmp[1];let filename=rfc2616unquote(tmp);return filename=rfc2047decode(filename),fixupEncoding(filename)} function toParamRegExp(attributePattern,flags2){return new RegExp("(?:^|;)\\s*"+attributePattern+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',flags2)}function textdecode(encoding,value){if(encoding){if(!/^[\x00-\xFF]+$/.test(value))return value;try{const decoder=new TextDecoder(encoding,{fatal:!0}),buffer=stringToBytes(value);value=decoder.decode(buffer),needsEncodingFixup=!1}catch{}}return value}function fixupEncoding(value){return needsEncodingFixup&&/[\x80-\xff]/.test(value)&&(value= textdecode("utf-8",value),needsEncodingFixup&&(value=textdecode("iso-8859-1",value))),value}function rfc2231getparam(contentDispositionStr){const matches2=[];let match;const iter=toParamRegExp("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(match=iter.exec(contentDispositionStr))!==null;){let[,n,quot,part]=match;if(n=parseInt(n,10),n in matches2){if(n===0)break;continue}matches2[n]=[quot,part]}const parts=[];for(let n=0;n{ if(stream._responseOrigin=getResponseOrigin(response.url),!validateResponseStatus(response.status))throw createResponseError(response.status,url2);this._reader=response.body.getReader(),this._headersCapability.resolve();const responseHeaders=response.headers,{allowRangeRequests,suggestedLength}=validateRangeRequestCapabilities({responseHeaders,isHttp:stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=allowRangeRequests,this._contentLength=suggestedLength|| this._contentLength,this._filename=extractFilenameFromHeader(responseHeaders),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){ await this._headersCapability.promise;const{value,done}=await this._reader.read();return done?{value,done}:(this._loaded+=value.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:getArrayBuffer(value),done:!1})}cancel(reason){this._reader?.cancel(reason),this._abortController.abort()}}class PDFFetchStreamRangeReader{constructor(stream,begin,end){this._stream=stream,this._reader=null,this._loaded=0;const source2=stream.source;this._withCredentials=source2.withCredentials|| !1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!source2.disableStream,this._abortController=new AbortController;const headers=new Headers(stream.headers);headers.append("Range",`bytes=${begin}-${end-1}`);const url2=source2.url;fetch(url2,createFetchOptions(headers,this._withCredentials,this._abortController)).then(response=>{const responseOrigin=getResponseOrigin(response.url);if(responseOrigin!==stream._responseOrigin)throw new Error(`Expected range response-origin "${responseOrigin}\ " to match "${stream._responseOrigin}".`);if(!validateResponseStatus(response.status))throw createResponseError(response.status,url2);this._readCapability.resolve(),this._reader=response.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value,done}=await this._reader.read();return done?{value,done}:(this._loaded+=value.byteLength,this.onProgress?.({loaded:this. _loaded}),{value:getArrayBuffer(value),done:!1})}cancel(reason){this._reader?.cancel(reason),this._abortController.abort()}}const OK_RESPONSE=200,PARTIAL_CONTENT_RESPONSE=206;function network_getArrayBuffer(xhr){const data=xhr.response;return typeof data!="string"?data:stringToBytes(data).buffer}class NetworkManager{_responseOrigin=null;constructor({url:url2,httpHeaders,withCredentials}){this.url=url2,this.isHttp=/^https?:/i.test(url2),this.headers=createHeaders(this.isHttp,httpHeaders),this.withCredentials= withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}request(args){const xhr=new XMLHttpRequest,xhrId=this.currXhrId++,pendingRequest=this.pendingRequests[xhrId]={xhr};xhr.open("GET",this.url),xhr.withCredentials=this.withCredentials;for(const[key2,val]of this.headers)xhr.setRequestHeader(key2,val);return this.isHttp&&"begin"in args&&"end"in args?(xhr.setRequestHeader("Range",`bytes=${args.begin}-${args.end-1}`),pendingRequest.expectedStatus=PARTIAL_CONTENT_RESPONSE):pendingRequest. expectedStatus=OK_RESPONSE,xhr.responseType="arraybuffer",assert$1(args.onError,"Expected `onError` callback to be provided."),xhr.onerror=()=>{args.onError(xhr.status)},xhr.onreadystatechange=this.onStateChange.bind(this,xhrId),xhr.onprogress=this.onProgress.bind(this,xhrId),pendingRequest.onHeadersReceived=args.onHeadersReceived,pendingRequest.onDone=args.onDone,pendingRequest.onError=args.onError,pendingRequest.onProgress=args.onProgress,xhr.send(null),xhrId}onProgress(xhrId,evt){const pendingRequest=this. pendingRequests[xhrId];pendingRequest&&pendingRequest.onProgress?.(evt)}onStateChange(xhrId,evt){const pendingRequest=this.pendingRequests[xhrId];if(!pendingRequest)return;const xhr=pendingRequest.xhr;if(xhr.readyState>=2&&pendingRequest.onHeadersReceived&&(pendingRequest.onHeadersReceived(),delete pendingRequest.onHeadersReceived),xhr.readyState!==4||!(xhrId in this.pendingRequests))return;if(delete this.pendingRequests[xhrId],xhr.status===0&&this.isHttp){pendingRequest.onError(xhr.status);return} const xhrStatus=xhr.status||OK_RESPONSE;if(!(xhrStatus===OK_RESPONSE&&pendingRequest.expectedStatus===PARTIAL_CONTENT_RESPONSE)&&xhrStatus!==pendingRequest.expectedStatus){pendingRequest.onError(xhr.status);return}const chunk=network_getArrayBuffer(xhr);if(xhrStatus===PARTIAL_CONTENT_RESPONSE){const rangeHeader=xhr.getResponseHeader("Content-Range"),matches2=/bytes (\d+)-(\d+)\/(\d+)/.exec(rangeHeader);matches2?pendingRequest.onDone({begin:parseInt(matches2[1],10),chunk}):(warn('Missing or inval\ id "Content-Range" header.'),pendingRequest.onError(0))}else chunk?pendingRequest.onDone({begin:0,chunk}):pendingRequest.onError(xhr.status)}getRequestXhr(xhrId){return this.pendingRequests[xhrId].xhr}isPendingRequest(xhrId){return xhrId in this.pendingRequests}abortRequest(xhrId){const xhr=this.pendingRequests[xhrId].xhr;delete this.pendingRequests[xhrId],xhr.abort()}}class PDFNetworkStream{constructor(source2){this._source=source2,this._manager=new NetworkManager(source2),this._rangeChunkSize= source2.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(reader){const i=this._rangeRequestReaders.indexOf(reader);i>=0&&this._rangeRequestReaders.splice(i,1)}getFullReader(){return assert$1(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new PDFNetworkStreamFullRequestReader(this._manager,this._source),this._fullRequestReader}getRangeReader(begin,end){const reader=new PDFNetworkStreamRangeRequestReader( this._manager,begin,end);return reader.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(reader),reader}cancelAllRequests(reason){this._fullRequestReader?.cancel(reason);for(const reader of this._rangeRequestReaders.slice(0))reader.cancel(reason)}}class PDFNetworkStreamFullRequestReader{constructor(manager,source2){this._manager=manager,this._url=source2.url,this._fullRequestId=manager.request({onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone. bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._headersCapability=Promise.withResolvers(),this._disableRange=source2.disableRange||!1,this._contentLength=source2.length,this._rangeChunkSize=source2.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){ const fullRequestXhrId=this._fullRequestId,fullRequestXhr=this._manager.getRequestXhr(fullRequestXhrId);this._manager._responseOrigin=getResponseOrigin(fullRequestXhr.responseURL);const rawResponseHeaders=fullRequestXhr.getAllResponseHeaders(),responseHeaders=new Headers(rawResponseHeaders?rawResponseHeaders.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map(x=>{const[key2,...val]=x.split(": ");return[key2,val.join(": ")]}):[]),{allowRangeRequests,suggestedLength}=validateRangeRequestCapabilities( {responseHeaders,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});allowRangeRequests&&(this._isRangeSupported=!0),this._contentLength=suggestedLength||this._contentLength,this._filename=extractFilenameFromHeader(responseHeaders),this._isRangeSupported&&this._manager.abortRequest(fullRequestXhrId),this._headersCapability.resolve()}_onDone(data){if(data&&(this._requests.length>0?this._requests.shift().resolve({value:data.chunk,done:!1}):this._cachedChunks. push(data.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const requestCapability of this._requests)requestCapability.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(status){this._storedError=createResponseError(status,this._url),this._headersCapability.reject(this._storedError);for(const requestCapability of this._requests)requestCapability.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(evt){this.onProgress?.({loaded:evt.loaded, total:evt.lengthComputable?evt.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}async read(){if(await this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done) return{value:void 0,done:!0};const requestCapability=Promise.withResolvers();return this._requests.push(requestCapability),requestCapability.promise}cancel(reason){this._done=!0,this._headersCapability.reject(reason);for(const requestCapability of this._requests)requestCapability.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class PDFNetworkStreamRangeRequestReader{constructor(manager,begin,end){ this._manager=manager,this._url=manager.url,this._requestId=manager.request({begin,end,onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_onHeadersReceived(){const responseOrigin=getResponseOrigin(this._manager.getRequestXhr(this._requestId)?.responseURL);responseOrigin!== this._manager._responseOrigin&&(this._storedError=new Error(`Expected range response-origin "${responseOrigin}" to match "${this._manager._responseOrigin}".`),this._onError(0))}_close(){this.onClosed?.(this)}_onDone(data){const chunk=data.chunk;this._requests.length>0?this._requests.shift().resolve({value:chunk,done:!1}):this._queuedChunk=chunk,this._done=!0;for(const requestCapability of this._requests)requestCapability.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(status){ this._storedError??=createResponseError(status,this._url);for(const requestCapability of this._requests)requestCapability.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(evt){this.isStreamingSupported||this.onProgress?.({loaded:evt.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const chunk=this._queuedChunk;return this._queuedChunk=null,{value:chunk,done:!1}}if(this._done)return{ value:void 0,done:!0};const requestCapability=Promise.withResolvers();return this._requests.push(requestCapability),requestCapability.promise}cancel(reason){this._done=!0;for(const requestCapability of this._requests)requestCapability.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const urlRegex=/^[a-z][a-z0-9\-+.]+:/i;function parseUrlOrPath(sourceUrl){if(urlRegex.test(sourceUrl)) return new URL(sourceUrl);const url2=process.getBuiltinModule("url");return new URL(url2.pathToFileURL(sourceUrl))}class PDFNodeStream{constructor(source2){this.source=source2,this.url=parseUrlOrPath(source2.url),assert$1(this.url.protocol==="file:","PDFNodeStream only supports file:// URLs."),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return assert$1(!this._fullRequestReader,"PDFNodeStream.get\ FullReader can only be called once."),this._fullRequestReader=new PDFNodeStreamFsFullReader(this),this._fullRequestReader}getRangeReader(start2,end){if(end<=this._progressiveDataLength)return null;const rangeReader=new PDFNodeStreamFsRangeReader(this,start2,end);return this._rangeRequestReaders.push(rangeReader),rangeReader}cancelAllRequests(reason){this._fullRequestReader?.cancel(reason);for(const reader of this._rangeRequestReaders.slice(0))reader.cancel(reason)}}class PDFNodeStreamFsFullReader{constructor(stream){ this._url=stream.url,this._done=!1,this._storedError=null,this.onProgress=null;const source2=stream.source;this._contentLength=source2.length,this._loaded=0,this._filename=null,this._disableRange=source2.disableRange||!1,this._rangeChunkSize=source2.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!source2.disableStream,this._isRangeSupported=!source2.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this. _headersCapability=Promise.withResolvers();const fs=process.getBuiltinModule("fs");fs.promises.lstat(this._url).then(stat=>{this._contentLength=stat.size,this._setReadableStream(fs.createReadStream(this._url)),this._headersCapability.resolve()},error2=>{error2.code==="ENOENT"&&(error2=createResponseError(0,this._url.href)),this._storedError=error2,this._headersCapability.reject(error2)})}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){ return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const chunk=this._readableStream.read();return chunk===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=chunk.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array( chunk).buffer,done:!1})}cancel(reason){if(!this._readableStream){this._error(reason);return}this._readableStream.destroy(reason)}_error(reason){this._storedError=reason,this._readCapability.resolve()}_setReadableStream(readableStream){this._readableStream=readableStream,readableStream.on("readable",()=>{this._readCapability.resolve()}),readableStream.on("end",()=>{readableStream.destroy(),this._done=!0,this._readCapability.resolve()}),readableStream.on("error",reason=>{this._error(reason)}),!this. _isStreamingSupported&&this._isRangeSupported&&this._error(new AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class PDFNodeStreamFsRangeReader{constructor(stream,start2,end){this._url=stream.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const source2=stream.source;this._isStreamingSupported=!source2.disableStream;const fs=process.getBuiltinModule( "fs");this._setReadableStream(fs.createReadStream(this._url,{start:start2,end:end-1}))}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const chunk=this._readableStream.read();return chunk===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=chunk.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(chunk). buffer,done:!1})}cancel(reason){if(!this._readableStream){this._error(reason);return}this._readableStream.destroy(reason)}_error(reason){this._storedError=reason,this._readCapability.resolve()}_setReadableStream(readableStream){this._readableStream=readableStream,readableStream.on("readable",()=>{this._readCapability.resolve()}),readableStream.on("end",()=>{readableStream.destroy(),this._done=!0,this._readCapability.resolve()}),readableStream.on("error",reason=>{this._error(reason)}),this._storedError&& this._readableStream.destroy(this._storedError)}}const INITIAL_DATA=Symbol("INITIAL_DATA");class PDFObjects{#objs=Object.create(null);#ensureObj(objId){return this.#objs[objId]||={...Promise.withResolvers(),data:INITIAL_DATA}}get(objId,callback=null){if(callback){const obj2=this.#ensureObj(objId);return obj2.promise.then(()=>callback(obj2.data)),null}const obj=this.#objs[objId];if(!obj||obj.data===INITIAL_DATA)throw new Error(`Requesting object that isn't resolved yet ${objId}.`);return obj.data}has(objId){ const obj=this.#objs[objId];return!!obj&&obj.data!==INITIAL_DATA}delete(objId){const obj=this.#objs[objId];return!obj||obj.data===INITIAL_DATA?!1:(delete this.#objs[objId],!0)}resolve(objId,data=null){const obj=this.#ensureObj(objId);obj.data=data,obj.resolve()}clear(){for(const objId in this.#objs){const{data}=this.#objs[objId];data?.bitmap?.close()}this.#objs=Object.create(null)}*[Symbol.iterator](){for(const objId in this.#objs){const{data}=this.#objs[objId];data!==INITIAL_DATA&&(yield[objId, data])}}}const MAX_TEXT_DIVS_TO_RENDER=1e5,DEFAULT_FONT_SIZE=30;class TextLayer{#capability=Promise.withResolvers();#container=null;#disableProcessItems=!1;#fontInspectorEnabled=!!globalThis.FontInspector?.enabled;#lang=null;#layoutTextParams=null;#pageHeight=0;#pageWidth=0;#reader=null;#rootContainer=null;#rotation=0;#scale=0;#styleCache=Object.create(null);#textContentItemsStr=[];#textContentSource=null;#textDivs=[];#textDivProperties=new WeakMap;#transform=null;static#ascentCache=new Map;static#canvasContexts=new Map;static#canvasCtxFonts=new WeakMap;static#minFontSize=null;static#pendingTextLayers=new Set;constructor({ textContentSource,container:container2,viewport}){if(textContentSource instanceof ReadableStream)this.#textContentSource=textContentSource;else if(typeof textContentSource=="object")this.#textContentSource=new ReadableStream({start(controller){controller.enqueue(textContentSource),controller.close()}});else throw new Error('No "textContentSource" parameter specified.');this.#container=this.#rootContainer=container2,this.#scale=viewport.scale*OutputScale.pixelRatio,this.#rotation=viewport.rotation, this.#layoutTextParams={div:null,properties:null,ctx:null};const{pageWidth,pageHeight,pageX,pageY}=viewport.rawDims;this.#transform=[1,0,0,-1,-pageX,pageY+pageHeight],this.#pageWidth=pageWidth,this.#pageHeight=pageHeight,TextLayer.#ensureMinFontSizeComputed(),setLayerDimensions(container2,viewport),this.#capability.promise.finally(()=>{TextLayer.#pendingTextLayers.delete(this),this.#layoutTextParams=null,this.#styleCache=null}).catch(()=>{})}static get fontFamilyMap(){const{isWindows,isFirefox}=util_FeatureTest. platform;return shadow(this,"fontFamilyMap",new Map([["sans-serif",`${isWindows&&isFirefox?"Calibri, ":""}sans-serif`],["monospace",`${isWindows&&isFirefox?"Lucida Console, ":""}monospace`]]))}render(){const pump=()=>{this.#reader.read().then(({value,done})=>{if(done){this.#capability.resolve();return}this.#lang??=value.lang,Object.assign(this.#styleCache,value.styles),this.#processItems(value.items),pump()},this.#capability.reject)};return this.#reader=this.#textContentSource.getReader(),TextLayer.#pendingTextLayers. add(this),pump(),this.#capability.promise}update({viewport,onBefore=null}){const scale2=viewport.scale*OutputScale.pixelRatio,rotation=viewport.rotation;if(rotation!==this.#rotation&&(onBefore?.(),this.#rotation=rotation,setLayerDimensions(this.#rootContainer,{rotation})),scale2!==this.#scale){onBefore?.(),this.#scale=scale2;const params={div:null,properties:null,ctx:TextLayer.#getCtx(this.#lang)};for(const div of this.#textDivs)params.properties=this.#textDivProperties.get(div),params.div=div,this.#layout( params)}}cancel(){const abortEx=new AbortException("TextLayer task cancelled.");this.#reader?.cancel(abortEx).catch(()=>{}),this.#reader=null,this.#capability.reject(abortEx)}get textDivs(){return this.#textDivs}get textContentItemsStr(){return this.#textContentItemsStr}#processItems(items2){if(this.#disableProcessItems)return;this.#layoutTextParams.ctx??=TextLayer.#getCtx(this.#lang);const textDivs=this.#textDivs,textContentItemsStr=this.#textContentItemsStr;for(const item of items2){if(textDivs. length>MAX_TEXT_DIVS_TO_RENDER){warn("Ignoring additional textDivs for performance reasons."),this.#disableProcessItems=!0;return}if(item.str===void 0){if(item.type==="beginMarkedContentProps"||item.type==="beginMarkedContent"){const parent=this.#container;this.#container=document.createElement("span"),this.#container.classList.add("markedContent"),item.id&&this.#container.setAttribute("id",`${item.id}`),parent.append(this.#container)}else item.type==="endMarkedContent"&&(this.#container=this.#container. parentNode);continue}textContentItemsStr.push(item.str),this.#appendText(item)}}#appendText(geom){const textDiv=document.createElement("span"),textDivProperties={angle:0,canvasWidth:0,hasText:geom.str!=="",hasEOL:geom.hasEOL,fontSize:0};this.#textDivs.push(textDiv);const tx=Util.transform(this.#transform,geom.transform);let angle=Math.atan2(tx[1],tx[0]);const style2=this.#styleCache[geom.fontName];style2.vertical&&(angle+=Math.PI/2);let fontFamily=this.#fontInspectorEnabled&&style2.fontSubstitution|| style2.fontFamily;fontFamily=TextLayer.fontFamilyMap.get(fontFamily)||fontFamily;const fontHeight=Math.hypot(tx[2],tx[3]),fontAscent=fontHeight*TextLayer.#getAscent(fontFamily,style2,this.#lang);let left,top;angle===0?(left=tx[4],top=tx[5]-fontAscent):(left=tx[4]+fontAscent*Math.sin(angle),top=tx[5]-fontAscent*Math.cos(angle));const scaleFactorStr="calc(var(--total-scale-factor) *",divStyle=textDiv.style;this.#container===this.#rootContainer?(divStyle.left=`${(100*left/this.#pageWidth).toFixed(2)}\ %`,divStyle.top=`${(100*top/this.#pageHeight).toFixed(2)}%`):(divStyle.left=`${scaleFactorStr}${left.toFixed(2)}px)`,divStyle.top=`${scaleFactorStr}${top.toFixed(2)}px)`),divStyle.fontSize=`${scaleFactorStr}${(TextLayer.#minFontSize*fontHeight).toFixed(2)}px)`,divStyle.fontFamily=fontFamily,textDivProperties.fontSize=fontHeight,textDiv.setAttribute("role","presentation"),textDiv.textContent=geom.str,textDiv.dir=geom.dir,this.#fontInspectorEnabled&&(textDiv.dataset.fontName=style2.fontSubstitutionLoadedName|| geom.fontName),angle!==0&&(textDivProperties.angle=angle*(180/Math.PI));let shouldScaleText=!1;if(geom.str.length>1)shouldScaleText=!0;else if(geom.str!==" "&&geom.transform[0]!==geom.transform[3]){const absScaleX=Math.abs(geom.transform[0]),absScaleY=Math.abs(geom.transform[3]);absScaleX!==absScaleY&&Math.max(absScaleX,absScaleY)/Math.min(absScaleX,absScaleY)>1.5&&(shouldScaleText=!0)}if(shouldScaleText&&(textDivProperties.canvasWidth=style2.vertical?geom.height:geom.width),this.#textDivProperties. set(textDiv,textDivProperties),this.#layoutTextParams.div=textDiv,this.#layoutTextParams.properties=textDivProperties,this.#layout(this.#layoutTextParams),textDivProperties.hasText&&this.#container.append(textDiv),textDivProperties.hasEOL){const br2=document.createElement("br");br2.setAttribute("role","presentation"),this.#container.append(br2)}}#layout(params){const{div,properties:properties2,ctx}=params,{style:style2}=div;let transform2="";if(TextLayer.#minFontSize>1&&(transform2=`scale(${1/TextLayer.#minFontSize}\ )`),properties2.canvasWidth!==0&&properties2.hasText){const{fontFamily}=style2,{canvasWidth,fontSize}=properties2;TextLayer.#ensureCtxFont(ctx,fontSize*this.#scale,fontFamily);const{width}=ctx.measureText(div.textContent);width>0&&(transform2=`scaleX(${canvasWidth*this.#scale/width}) ${transform2}`)}properties2.angle!==0&&(transform2=`rotate(${properties2.angle}deg) ${transform2}`),transform2.length>0&&(style2.transform=transform2)}static cleanup(){if(!(this.#pendingTextLayers.size>0)){this.#ascentCache. clear();for(const{canvas}of this.#canvasContexts.values())canvas.remove();this.#canvasContexts.clear()}}static#getCtx(lang=null){let ctx=this.#canvasContexts.get(lang||="");if(!ctx){const canvas=document.createElement("canvas");canvas.className="hiddenCanvasElement",canvas.lang=lang,document.body.append(canvas),ctx=canvas.getContext("2d",{alpha:!1,willReadFrequently:!0}),this.#canvasContexts.set(lang,ctx),this.#canvasCtxFonts.set(ctx,{size:0,family:""})}return ctx}static#ensureCtxFont(ctx,size2,family){ const cached2=this.#canvasCtxFonts.get(ctx);size2===cached2.size&&family===cached2.family||(ctx.font=`${size2}px ${family}`,cached2.size=size2,cached2.family=family)}static#ensureMinFontSizeComputed(){if(this.#minFontSize!==null)return;const div=document.createElement("div");div.style.opacity=0,div.style.lineHeight=1,div.style.fontSize="1px",div.style.position="absolute",div.textContent="X",document.body.append(div),this.#minFontSize=div.getBoundingClientRect().height,div.remove()}static#getAscent(fontFamily,style2,lang){ const cachedAscent=this.#ascentCache.get(fontFamily);if(cachedAscent)return cachedAscent;const ctx=this.#getCtx(lang);ctx.canvas.width=ctx.canvas.height=DEFAULT_FONT_SIZE,this.#ensureCtxFont(ctx,DEFAULT_FONT_SIZE,fontFamily);const metrics=ctx.measureText(""),ascent=metrics.fontBoundingBoxAscent,descent=Math.abs(metrics.fontBoundingBoxDescent);ctx.canvas.width=ctx.canvas.height=0;let ratio=.8;return ascent?ratio=ascent/(ascent+descent):(util_FeatureTest.platform.isFirefox&&warn("Enable the `dom.t\ extMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."),style2.ascent?ratio=style2.ascent:style2.descent&&(ratio=1+style2.descent)),this.#ascentCache.set(fontFamily,ratio),ratio}}class XfaText{static textContent(xfa){const items2=[],output={items:items2,styles:Object.create(null)};function walk(node2){if(!node2)return;let str=null;const name=node2.name;if(name==="#text")str=node2.value;else if(XfaText.shouldBuildText(name))node2?.attributes?.textContent? str=node2.attributes.textContent:node2.value&&(str=node2.value);else return;if(str!==null&&items2.push({str}),!!node2.children)for(const child2 of node2.children)walk(child2)}return walk(xfa),output}static shouldBuildText(name){return!(name==="textarea"||name==="input"||name==="option"||name==="select")}}const RENDERING_CANCELLED_TIMEOUT=100;function getDocument(src={}){typeof src=="string"||src instanceof URL?src={url:src}:(src instanceof ArrayBuffer||ArrayBuffer.isView(src))&&(src={data:src}); const task=new PDFDocumentLoadingTask,{docId}=task,url2=src.url?getUrlProp(src.url):null,data=src.data?getDataProp(src.data):null,httpHeaders=src.httpHeaders||null,withCredentials=src.withCredentials===!0,password=src.password??null,rangeTransport=src.range instanceof PDFDataRangeTransport?src.range:null,rangeChunkSize=Number.isInteger(src.rangeChunkSize)&&src.rangeChunkSize>0?src.rangeChunkSize:2**16;let worker=src.worker instanceof PDFWorker?src.worker:null;const verbosity2=src.verbosity,docBaseUrl=typeof src. docBaseUrl=="string"&&!isDataScheme(src.docBaseUrl)?src.docBaseUrl:null,cMapUrl=getFactoryUrlProp(src.cMapUrl),cMapPacked=src.cMapPacked!==!1,CMapReaderFactory=src.CMapReaderFactory||(isNodeJS?NodeCMapReaderFactory:DOMCMapReaderFactory),iccUrl=getFactoryUrlProp(src.iccUrl),standardFontDataUrl=getFactoryUrlProp(src.standardFontDataUrl),StandardFontDataFactory=src.StandardFontDataFactory||(isNodeJS?NodeStandardFontDataFactory:DOMStandardFontDataFactory),wasmUrl=getFactoryUrlProp(src.wasmUrl),WasmFactory=src. WasmFactory||(isNodeJS?NodeWasmFactory:DOMWasmFactory),ignoreErrors=src.stopAtErrors!==!0,maxImageSize=Number.isInteger(src.maxImageSize)&&src.maxImageSize>-1?src.maxImageSize:-1,isEvalSupported2=src.isEvalSupported!==!1,isOffscreenCanvasSupported=typeof src.isOffscreenCanvasSupported=="boolean"?src.isOffscreenCanvasSupported:!isNodeJS,isImageDecoderSupported=typeof src.isImageDecoderSupported=="boolean"?src.isImageDecoderSupported:!isNodeJS&&(util_FeatureTest.platform.isFirefox||!globalThis.chrome), canvasMaxAreaInBytes=Number.isInteger(src.canvasMaxAreaInBytes)?src.canvasMaxAreaInBytes:-1,disableFontFace=typeof src.disableFontFace=="boolean"?src.disableFontFace:isNodeJS,fontExtraProperties=src.fontExtraProperties===!0,enableXfa=src.enableXfa===!0,ownerDocument=src.ownerDocument||globalThis.document,disableRange=src.disableRange===!0,disableStream=src.disableStream===!0,disableAutoFetch=src.disableAutoFetch===!0,pdfBug=src.pdfBug===!0,CanvasFactory=src.CanvasFactory||(isNodeJS?NodeCanvasFactory: DOMCanvasFactory),FilterFactory=src.FilterFactory||(isNodeJS?NodeFilterFactory:DOMFilterFactory),enableHWA=src.enableHWA===!0,useWasm=src.useWasm!==!1,length=rangeTransport?rangeTransport.length:src.length??NaN,useSystemFonts=typeof src.useSystemFonts=="boolean"?src.useSystemFonts:!isNodeJS&&!disableFontFace,useWorkerFetch=typeof src.useWorkerFetch=="boolean"?src.useWorkerFetch:!!(CMapReaderFactory===DOMCMapReaderFactory&&StandardFontDataFactory===DOMStandardFontDataFactory&&WasmFactory===DOMWasmFactory&& cMapUrl&&standardFontDataUrl&&wasmUrl&&isValidFetchUrl(cMapUrl,document.baseURI)&&isValidFetchUrl(standardFontDataUrl,document.baseURI)&&isValidFetchUrl(wasmUrl,document.baseURI)),styleElement2=null;setVerbosityLevel(verbosity2);const transportFactory={canvasFactory:new CanvasFactory({ownerDocument,enableHWA}),filterFactory:new FilterFactory({docId,ownerDocument}),cMapReaderFactory:useWorkerFetch?null:new CMapReaderFactory({baseUrl:cMapUrl,isCompressed:cMapPacked}),standardFontDataFactory:useWorkerFetch? null:new StandardFontDataFactory({baseUrl:standardFontDataUrl}),wasmFactory:useWorkerFetch?null:new WasmFactory({baseUrl:wasmUrl})};worker||(worker=PDFWorker.create({verbosity:verbosity2,port:GlobalWorkerOptions.workerPort}),task._worker=worker);const docParams={docId,apiVersion:"5.4.54",data,password,disableAutoFetch,rangeChunkSize,length,docBaseUrl,enableXfa,evaluatorOptions:{maxImageSize,disableFontFace,ignoreErrors,isEvalSupported:isEvalSupported2,isOffscreenCanvasSupported,isImageDecoderSupported, canvasMaxAreaInBytes,fontExtraProperties,useSystemFonts,useWasm,useWorkerFetch,cMapUrl,iccUrl,standardFontDataUrl,wasmUrl}},transportParams={ownerDocument,pdfBug,styleElement:styleElement2,loadingParams:{disableAutoFetch,enableXfa}};return worker.promise.then(function(){if(task.destroyed)throw new Error("Loading aborted");if(worker.destroyed)throw new Error("Worker was destroyed");const workerIdPromise=worker.messageHandler.sendWithPromise("GetDocRequest",docParams,data?[data.buffer]:null);let networkStream; if(rangeTransport)networkStream=new PDFDataTransportStream(rangeTransport,{disableRange,disableStream});else if(!data){if(!url2)throw new Error("getDocument - no `url` parameter provided.");const NetworkStream=isValidFetchUrl(url2)?PDFFetchStream:isNodeJS?PDFNodeStream:PDFNetworkStream;networkStream=new NetworkStream({url:url2,length,httpHeaders,withCredentials,rangeChunkSize,disableRange,disableStream})}return workerIdPromise.then(workerId=>{if(task.destroyed)throw new Error("Loading aborted"); if(worker.destroyed)throw new Error("Worker was destroyed");const messageHandler=new MessageHandler(docId,workerId,worker.port),transport=new WorkerTransport(messageHandler,task,networkStream,transportParams,transportFactory,enableHWA);task._transport=transport,messageHandler.send("Ready",null)})}).catch(task._capability.reject),task}class PDFDocumentLoadingTask{static#docId=0;_capability=Promise.withResolvers();_transport=null;_worker=null;docId=`d${PDFDocumentLoadingTask.#docId++}`;destroyed=!1;onPassword=null;onProgress=null;get promise(){ return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),await this._transport?.destroy()}catch(ex){throw this._worker?.port&&delete this._worker._pendingDestroy,ex}this._transport=null,this._worker?.destroy(),this._worker=null}async getData(){return this._transport.getData()}}class PDFDataRangeTransport{#capability=Promise.withResolvers();#progressiveDoneListeners=[];#progressiveReadListeners=[];#progressListeners=[];#rangeListeners=[];constructor(length,initialData,progressiveDone=!1,contentDispositionFilename=null){ this.length=length,this.initialData=initialData,this.progressiveDone=progressiveDone,this.contentDispositionFilename=contentDispositionFilename}addRangeListener(listener){this.#rangeListeners.push(listener)}addProgressListener(listener){this.#progressListeners.push(listener)}addProgressiveReadListener(listener){this.#progressiveReadListeners.push(listener)}addProgressiveDoneListener(listener){this.#progressiveDoneListeners.push(listener)}onDataRange(begin,chunk){for(const listener of this.#rangeListeners) listener(begin,chunk)}onDataProgress(loaded,total){this.#capability.promise.then(()=>{for(const listener of this.#progressListeners)listener(loaded,total)})}onDataProgressiveRead(chunk){this.#capability.promise.then(()=>{for(const listener of this.#progressiveReadListeners)listener(chunk)})}onDataProgressiveDone(){this.#capability.promise.then(()=>{for(const listener of this.#progressiveDoneListeners)listener()})}transportReady(){this.#capability.resolve()}requestDataRange(begin,end){unreachable( "Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}class PDFDocumentProxy{constructor(pdfInfo,transport){this._pdfInfo=pdfInfo,this._transport=transport}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return shadow(this,"isPureXfa",!!this. _transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(pageNumber){return this._transport.getPage(pageNumber)}getPageIndex(ref2){return this._transport.getPageIndex(ref2)}getDestinations(){return this._transport.getDestinations()}getDestination(id2){return this._transport.getDestination(id2)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){ return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent="display"}={}){const{renderingIntent}=this._transport.getRenderingIntent(intent);return this._transport.getOptionalContentConfig(renderingIntent)}getPermissions(){return this._transport.getPermissions()}getMetadata(){ return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(keepLoadedFonts=!1){return this._transport.startCleanup(keepLoadedFonts||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(ref2){return this._transport.cachedPageNumber(ref2)}get loadingParams(){return this._transport. loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}class PDFPageProxy{#pendingCleanup=!1;constructor(pageIndex,pageInfo,transport,pdfBug=!1){this._pageIndex=pageIndex,this._pageInfo=pageInfo,this._transport=transport,this._stats=pdfBug?new StatTimer:null,this._pdfBug=pdfBug,this.commonObjs=transport. commonObjs,this.objs=new PDFObjects,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:scale2,rotation=this.rotate,offsetX=0,offsetY=0,dontFlip=!1}={}){return new PageViewport({viewBox:this.view,userUnit:this.userUnit,scale:scale2,rotation,offsetX,offsetY,dontFlip})}getAnnotations({ intent="display"}={}){const{renderingIntent}=this._transport.getRenderingIntent(intent);return this._transport.getAnnotations(this._pageIndex,renderingIntent)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return shadow(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render({canvasContext,canvas=canvasContext.canvas,viewport, intent="display",annotationMode=AnnotationMode.ENABLE,transform:transform2=null,background=null,optionalContentConfigPromise=null,annotationCanvasMap=null,pageColors=null,printAnnotationStorage=null,isEditing:isEditing2=!1}){this._stats?.time("Overall");const intentArgs=this._transport.getRenderingIntent(intent,annotationMode,printAnnotationStorage,isEditing2),{renderingIntent,cacheKey}=intentArgs;this.#pendingCleanup=!1,optionalContentConfigPromise||=this._transport.getOptionalContentConfig(renderingIntent); let intentState=this._intentStates.get(cacheKey);intentState||(intentState=Object.create(null),this._intentStates.set(cacheKey,intentState)),intentState.streamReaderCancelTimeout&&(clearTimeout(intentState.streamReaderCancelTimeout),intentState.streamReaderCancelTimeout=null);const intentPrint=!!(renderingIntent&RenderingIntentFlag.PRINT);intentState.displayReadyCapability||(intentState.displayReadyCapability=Promise.withResolvers(),intentState.operatorList={fnArray:[],argsArray:[],lastChunk:!1, separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(intentArgs));const complete=error2=>{intentState.renderTasks.delete(internalRenderTask),intentPrint&&(this.#pendingCleanup=!0),this.#tryCleanup(),error2?(internalRenderTask.capability.reject(error2),this._abortOperatorList({intentState,reason:error2 instanceof Error?error2:new Error(error2)})):internalRenderTask.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),globalThis. Stats?.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},internalRenderTask=new InternalRenderTask({callback:complete,params:{canvas,canvasContext,viewport,transform:transform2,background},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap,operatorList:intentState.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!intentPrint,pdfBug:this._pdfBug,pageColors,enableHWA:this._transport. enableHWA});(intentState.renderTasks||=new Set).add(internalRenderTask);const renderTask=internalRenderTask.task;return Promise.all([intentState.displayReadyCapability.promise,optionalContentConfigPromise]).then(([transparency,optionalContentConfig])=>{if(this.destroyed){complete();return}if(this._stats?.time("Rendering"),!(optionalContentConfig.renderingIntent&renderingIntent))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOp\ tionalContentConfig` methods.");internalRenderTask.initializeGraphics({transparency,optionalContentConfig}),internalRenderTask.operatorListChanged()}).catch(complete),renderTask}getOperatorList({intent="display",annotationMode=AnnotationMode.ENABLE,printAnnotationStorage=null,isEditing:isEditing2=!1}={}){function operatorListChanged(){intentState.operatorList.lastChunk&&(intentState.opListReadCapability.resolve(intentState.operatorList),intentState.renderTasks.delete(opListTask))}const intentArgs=this. _transport.getRenderingIntent(intent,annotationMode,printAnnotationStorage,isEditing2,!0);let intentState=this._intentStates.get(intentArgs.cacheKey);intentState||(intentState=Object.create(null),this._intentStates.set(intentArgs.cacheKey,intentState));let opListTask;return intentState.opListReadCapability||(opListTask=Object.create(null),opListTask.operatorListChanged=operatorListChanged,intentState.opListReadCapability=Promise.withResolvers(),(intentState.renderTasks||=new Set).add(opListTask), intentState.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(intentArgs)),intentState.opListReadCapability.promise}streamTextContent({includeMarkedContent=!1,disableNormalization=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:includeMarkedContent===!0,disableNormalization:disableNormalization===!0},{highWaterMark:100,size(textContent){return textContent. items.length}})}getTextContent(params={}){if(this._transport._htmlForXfa)return this.getXfa().then(xfa=>XfaText.textContent(xfa));const readableStream=this.streamTextContent(params);return new Promise(function(resolve2,reject){function pump(){reader.read().then(function({value,done}){if(done){resolve2(textContent);return}textContent.lang??=value.lang,Object.assign(textContent.styles,value.styles),textContent.items.push(...value.items),pump()},reject)}const reader=readableStream.getReader(),textContent={ items:[],styles:Object.create(null),lang:null};pump()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const waitOn=[];for(const intentState of this._intentStates.values())if(this._abortOperatorList({intentState,reason:new Error("Page was destroyed."),force:!0}),!intentState.opListReadCapability)for(const internalRenderTask of intentState.renderTasks)waitOn.push(internalRenderTask.completed),internalRenderTask.cancel();return this.objs.clear(), this.#pendingCleanup=!1,Promise.all(waitOn)}cleanup(resetStats=!1){this.#pendingCleanup=!0;const success=this.#tryCleanup();return resetStats&&success&&(this._stats&&=new StatTimer),success}#tryCleanup(){if(!this.#pendingCleanup||this.destroyed)return!1;for(const{renderTasks,operatorList}of this._intentStates.values())if(renderTasks.size>0||!operatorList.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this.#pendingCleanup=!1,!0}_startRenderPage(transparency,cacheKey){const intentState=this. _intentStates.get(cacheKey);intentState&&(this._stats?.timeEnd("Page Request"),intentState.displayReadyCapability?.resolve(transparency))}_renderPageChunk(operatorListChunk,intentState){for(let i=0,ii=operatorListChunk.length;i{reader.read().then(({value,done})=>{if(done){intentState.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(value,intentState),pump())},reason=>{if(intentState.streamReader=null,!this._transport.destroyed){if(intentState.operatorList){intentState.operatorList.lastChunk=!0;for(const internalRenderTask of intentState.renderTasks)internalRenderTask.operatorListChanged();this.#tryCleanup()}if(intentState.displayReadyCapability) intentState.displayReadyCapability.reject(reason);else if(intentState.opListReadCapability)intentState.opListReadCapability.reject(reason);else throw reason}})};pump()}_abortOperatorList({intentState,reason,force=!1}){if(intentState.streamReader){if(intentState.streamReaderCancelTimeout&&(clearTimeout(intentState.streamReaderCancelTimeout),intentState.streamReaderCancelTimeout=null),!force){if(intentState.renderTasks.size>0)return;if(reason instanceof RenderingCancelledException){let delay=RENDERING_CANCELLED_TIMEOUT; reason.extraDelay>0&&reason.extraDelay<1e3&&(delay+=reason.extraDelay),intentState.streamReaderCancelTimeout=setTimeout(()=>{intentState.streamReaderCancelTimeout=null,this._abortOperatorList({intentState,reason,force:!0})},delay);return}}if(intentState.streamReader.cancel(new AbortException(reason.message)).catch(()=>{}),intentState.streamReader=null,!this._transport.destroyed){for(const[curCacheKey,curIntentState]of this._intentStates)if(curIntentState===intentState){this._intentStates.delete( curCacheKey);break}this.cleanup()}}}get stats(){return this._stats}}var _capability,_messageHandler,_port,_webWorker,_fakeWorkerId,_isWorkerDisabled,_workerPorts,_PDFWorker_instances,resolve_fn,initializeFromPort_fn,initialize_fn,setupFakeWorker_fn,_PDFWorker_static,mainThreadWorkerMessageHandler_get;const _PDFWorker=class _PDFWorker{constructor({name=null,port=null,verbosity:verbosity2=getVerbosityLevel()}={}){__privateAdd(this,_PDFWorker_instances);__privateAdd(this,_capability,Promise.withResolvers()); __privateAdd(this,_messageHandler,null);__privateAdd(this,_port,null);__privateAdd(this,_webWorker,null);if(this.name=name,this.destroyed=!1,this.verbosity=verbosity2,port){if(__privateGet(_PDFWorker,_workerPorts).has(port))throw new Error("Cannot use more than one PDFWorker per port.");__privateGet(_PDFWorker,_workerPorts).set(port,this),__privateMethod(this,_PDFWorker_instances,initializeFromPort_fn).call(this,port)}else __privateMethod(this,_PDFWorker_instances,initialize_fn).call(this)}get promise(){ return __privateGet(this,_capability).promise}get port(){return __privateGet(this,_port)}get messageHandler(){return __privateGet(this,_messageHandler)}destroy(){this.destroyed=!0,__privateGet(this,_webWorker)?.terminate(),__privateSet(this,_webWorker,null),__privateGet(_PDFWorker,_workerPorts).delete(__privateGet(this,_port)),__privateSet(this,_port,null),__privateGet(this,_messageHandler)?.destroy(),__privateSet(this,_messageHandler,null)}static create(params){const cachedPort=__privateGet(this, _workerPorts).get(params?.port);if(cachedPort){if(cachedPort._pendingDestroy)throw new Error("PDFWorker.create - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return cachedPort}return new _PDFWorker(params)}static get workerSrc(){if(GlobalWorkerOptions.workerSrc)return GlobalWorkerOptions.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return shadow(this,"_setupFakeWorkerGlobal", (async()=>__privateGet(this,_PDFWorker_static,mainThreadWorkerMessageHandler_get)?__privateGet(this,_PDFWorker_static,mainThreadWorkerMessageHandler_get):(await import(this.workerSrc)).WorkerMessageHandler)())}};_capability=new WeakMap,_messageHandler=new WeakMap,_port=new WeakMap,_webWorker=new WeakMap,_fakeWorkerId=new WeakMap,_isWorkerDisabled=new WeakMap,_workerPorts=new WeakMap,_PDFWorker_instances=new WeakSet,resolve_fn=function(){__privateGet(this,_capability).resolve(),__privateGet(this, _messageHandler).send("configure",{verbosity:this.verbosity})},initializeFromPort_fn=function(port){__privateSet(this,_port,port),__privateSet(this,_messageHandler,new MessageHandler("main","worker",port)),__privateGet(this,_messageHandler).on("ready",()=>{}),__privateMethod(this,_PDFWorker_instances,resolve_fn).call(this)},initialize_fn=function(){if(__privateGet(_PDFWorker,_isWorkerDisabled)||__privateGet(_PDFWorker,_PDFWorker_static,mainThreadWorkerMessageHandler_get)){__privateMethod(this,_PDFWorker_instances, setupFakeWorker_fn).call(this);return}let{workerSrc}=_PDFWorker;try{_PDFWorker._isSameOrigin(window.location,workerSrc)||(workerSrc=_PDFWorker._createCDNWrapper(new URL(workerSrc,window.location).href));const worker=new Worker(workerSrc,{type:"module"}),messageHandler=new MessageHandler("main","worker",worker),terminateEarly=()=>{ac.abort(),messageHandler.destroy(),worker.terminate(),this.destroyed?__privateGet(this,_capability).reject(new Error("Worker was destroyed")):__privateMethod(this,_PDFWorker_instances, setupFakeWorker_fn).call(this)},ac=new AbortController;worker.addEventListener("error",()=>{__privateGet(this,_webWorker)||terminateEarly()},{signal:ac.signal}),messageHandler.on("test",data=>{if(ac.abort(),this.destroyed||!data){terminateEarly();return}__privateSet(this,_messageHandler,messageHandler),__privateSet(this,_port,worker),__privateSet(this,_webWorker,worker),__privateMethod(this,_PDFWorker_instances,resolve_fn).call(this)}),messageHandler.on("ready",data=>{if(ac.abort(),this.destroyed){ terminateEarly();return}try{sendTest()}catch{__privateMethod(this,_PDFWorker_instances,setupFakeWorker_fn).call(this)}});const sendTest=()=>{const testObj=new Uint8Array;messageHandler.send("test",testObj,[testObj.buffer])};sendTest();return}catch{info("The worker has been disabled.")}__privateMethod(this,_PDFWorker_instances,setupFakeWorker_fn).call(this)},setupFakeWorker_fn=function(){__privateGet(_PDFWorker,_isWorkerDisabled)||(warn("Setting up fake worker."),__privateSet(_PDFWorker,_isWorkerDisabled, !0)),_PDFWorker._setupFakeWorkerGlobal.then(WorkerMessageHandler=>{if(this.destroyed){__privateGet(this,_capability).reject(new Error("Worker was destroyed"));return}const port=new LoopbackPort;__privateSet(this,_port,port);const id2=`fake${__privateWrapper(_PDFWorker,_fakeWorkerId)._++}`,workerHandler=new MessageHandler(id2+"_worker",id2,port);WorkerMessageHandler.setup(workerHandler,port),__privateSet(this,_messageHandler,new MessageHandler(id2,id2+"_worker",port)),__privateMethod(this,_PDFWorker_instances, resolve_fn).call(this)}).catch(reason=>{__privateGet(this,_capability).reject(new Error(`Setting up fake worker failed: "${reason.message}".`))})},_PDFWorker_static=new WeakSet,mainThreadWorkerMessageHandler_get=function(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}},__privateAdd(_PDFWorker,_PDFWorker_static),__privateAdd(_PDFWorker,_fakeWorkerId,0),__privateAdd(_PDFWorker,_isWorkerDisabled,!1),__privateAdd(_PDFWorker,_workerPorts,new WeakMap),isNodeJS&&(__privateSet( _PDFWorker,_isWorkerDisabled,!0),GlobalWorkerOptions.workerSrc||="./pdf.worker.mjs"),_PDFWorker._isSameOrigin=(baseUrl,otherUrl)=>{const base2=URL.parse(baseUrl);if(!base2?.origin||base2.origin==="null")return!1;const other=new URL(otherUrl,base2);return base2.origin===other.origin},_PDFWorker._createCDNWrapper=url2=>{const wrapper=`await import("${url2}");`;return URL.createObjectURL(new Blob([wrapper],{type:"text/javascript"}))},_PDFWorker.fromPort=params=>{if(deprecated("`PDFWorker.fromPort` \ - please use `PDFWorker.create` instead."),!params?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return _PDFWorker.create(params)};let PDFWorker=_PDFWorker;class WorkerTransport{#methodPromises=new Map;#pageCache=new Map;#pagePromises=new Map;#pageRefCache=new Map;#passwordCapability=null;constructor(messageHandler,loadingTask,networkStream,params,factory,enableHWA){this.messageHandler=messageHandler,this.loadingTask=loadingTask,this.commonObjs=new PDFObjects,this.fontLoader= new FontLoader({ownerDocument:params.ownerDocument,styleElement:params.styleElement}),this.loadingParams=params.loadingParams,this._params=params,this.canvasFactory=factory.canvasFactory,this.filterFactory=factory.filterFactory,this.cMapReaderFactory=factory.cMapReaderFactory,this.standardFontDataFactory=factory.standardFontDataFactory,this.wasmFactory=factory.wasmFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=networkStream,this._fullReader=null,this._lastProgress=null, this.downloadInfoCapability=Promise.withResolvers(),this.enableHWA=enableHWA,this.setupMessageHandler()}#cacheSimpleMethod(name,data=null){const cachedPromise=this.#methodPromises.get(name);if(cachedPromise)return cachedPromise;const promise=this.messageHandler.sendWithPromise(name,data);return this.#methodPromises.set(name,promise),promise}get annotationStorage(){return shadow(this,"annotationStorage",new AnnotationStorage)}getRenderingIntent(intent,annotationMode=AnnotationMode.ENABLE,printAnnotationStorage=null,isEditing2=!1,isOpList=!1){ let renderingIntent=RenderingIntentFlag.DISPLAY,annotationStorageSerializable=SerializableEmpty;switch(intent){case"any":renderingIntent=RenderingIntentFlag.ANY;break;case"display":break;case"print":renderingIntent=RenderingIntentFlag.PRINT;break;default:warn(`getRenderingIntent - invalid intent: ${intent}`)}const annotationStorage=renderingIntent&RenderingIntentFlag.PRINT&&printAnnotationStorage instanceof PrintAnnotationStorage?printAnnotationStorage:this.annotationStorage;switch(annotationMode){case AnnotationMode. DISABLE:renderingIntent+=RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case AnnotationMode.ENABLE:break;case AnnotationMode.ENABLE_FORMS:renderingIntent+=RenderingIntentFlag.ANNOTATIONS_FORMS;break;case AnnotationMode.ENABLE_STORAGE:renderingIntent+=RenderingIntentFlag.ANNOTATIONS_STORAGE,annotationStorageSerializable=annotationStorage.serializable;break;default:warn(`getRenderingIntent - invalid annotationMode: ${annotationMode}`)}isEditing2&&(renderingIntent+=RenderingIntentFlag.IS_EDITING),isOpList&& (renderingIntent+=RenderingIntentFlag.OPLIST);const{ids:modifiedIds,hash:modifiedIdsHash}=annotationStorage.modifiedIds,cacheKeyBuf=[renderingIntent,annotationStorageSerializable.hash,modifiedIdsHash];return{renderingIntent,cacheKey:cacheKeyBuf.join("_"),annotationStorageSerializable,modifiedIds}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),this.#passwordCapability?.reject(new Error("Worker was destroye\ d during onPassword callback"));const waitOn=[];for(const page2 of this.#pageCache.values())waitOn.push(page2._destroy());this.#pageCache.clear(),this.#pagePromises.clear(),this.#pageRefCache.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const terminated=this.messageHandler.sendWithPromise("Terminate",null);return waitOn.push(terminated),Promise.all(waitOn).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#methodPromises.clear(),this.filterFactory. destroy(),TextLayer.cleanup(),this._networkStream?.cancelAllRequests(new AbortException("Worker was terminated.")),this.messageHandler?.destroy(),this.messageHandler=null,this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler,loadingTask}=this;messageHandler.on("GetReader",(data,sink)=>{assert$1(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(), this._fullReader.onProgress=evt=>{this._lastProgress={loaded:evt.loaded,total:evt.total}},sink.onPull=()=>{this._fullReader.read().then(function({value,done}){if(done){sink.close();return}assert$1(value instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),sink.enqueue(new Uint8Array(value),1,[value])}).catch(reason=>{sink.error(reason)})},sink.onCancel=reason=>{this._fullReader.cancel(reason),sink.ready.catch(readyReason=>{if(!this.destroyed)throw readyReason})}}),messageHandler.on("Re\ aderHeadersReady",async data=>{await this._fullReader.headersReady;const{isStreamingSupported,isRangeSupported,contentLength}=this._fullReader;return(!isStreamingSupported||!isRangeSupported)&&(this._lastProgress&&loadingTask.onProgress?.(this._lastProgress),this._fullReader.onProgress=evt=>{loadingTask.onProgress?.({loaded:evt.loaded,total:evt.total})}),{isStreamingSupported,isRangeSupported,contentLength}}),messageHandler.on("GetRangeReader",(data,sink)=>{assert$1(this._networkStream,"GetRange\ Reader - no `IPDFStream` instance available.");const rangeReader=this._networkStream.getRangeReader(data.begin,data.end);if(!rangeReader){sink.close();return}sink.onPull=()=>{rangeReader.read().then(function({value,done}){if(done){sink.close();return}assert$1(value instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),sink.enqueue(new Uint8Array(value),1,[value])}).catch(reason=>{sink.error(reason)})},sink.onCancel=reason=>{rangeReader.cancel(reason),sink.ready.catch(readyReason=>{ if(!this.destroyed)throw readyReason})}}),messageHandler.on("GetDoc",({pdfInfo})=>{this._numPages=pdfInfo.numPages,this._htmlForXfa=pdfInfo.htmlForXfa,delete pdfInfo.htmlForXfa,loadingTask._capability.resolve(new PDFDocumentProxy(pdfInfo,this))}),messageHandler.on("DocException",ex=>{loadingTask._capability.reject(wrapReason(ex))}),messageHandler.on("PasswordRequest",ex=>{this.#passwordCapability=Promise.withResolvers();try{if(!loadingTask.onPassword)throw wrapReason(ex);const updatePassword=password=>{ password instanceof Error?this.#passwordCapability.reject(password):this.#passwordCapability.resolve({password})};loadingTask.onPassword(updatePassword,ex.code)}catch(err){this.#passwordCapability.reject(err)}return this.#passwordCapability.promise}),messageHandler.on("DataLoaded",data=>{loadingTask.onProgress?.({loaded:data.length,total:data.length}),this.downloadInfoCapability.resolve(data)}),messageHandler.on("StartRenderPage",data=>{if(this.destroyed)return;this.#pageCache.get(data.pageIndex). _startRenderPage(data.transparency,data.cacheKey)}),messageHandler.on("commonobj",([id2,type2,exportedData])=>{if(this.destroyed||this.commonObjs.has(id2))return null;switch(type2){case"Font":if("error"in exportedData){const exportedError=exportedData.error;warn(`Error during font loading: ${exportedError}`),this.commonObjs.resolve(id2,exportedError);break}const inspectFont=this._params.pdfBug&&globalThis.FontInspector?.enabled?(font2,url2)=>globalThis.FontInspector.fontAdded(font2,url2):null,font=new FontFaceObject( exportedData,inspectFont);this.fontLoader.bind(font).catch(()=>messageHandler.sendWithPromise("FontFallback",{id:id2})).finally(()=>{!font.fontExtraProperties&&font.data&&(font.data=null),this.commonObjs.resolve(id2,font)});break;case"CopyLocalImage":const{imageRef}=exportedData;assert$1(imageRef,"The imageRef must be defined.");for(const pageProxy of this.#pageCache.values())for(const[,data]of pageProxy.objs)if(data?.ref===imageRef)return data.dataLen?(this.commonObjs.resolve(id2,structuredClone( data)),data.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(id2,exportedData);break;default:throw new Error(`Got unknown common object type ${type2}`)}return null}),messageHandler.on("obj",([id2,pageIndex,type2,imageData])=>{if(this.destroyed)return;const pageProxy=this.#pageCache.get(pageIndex);if(!pageProxy.objs.has(id2)){if(pageProxy._intentStates.size===0){imageData?.bitmap?.close();return}switch(type2){case"Image":case"Pattern":pageProxy.objs.resolve(id2, imageData);break;default:throw new Error(`Got unknown object type ${type2}`)}}}),messageHandler.on("DocProgress",data=>{this.destroyed||loadingTask.onProgress?.({loaded:data.loaded,total:data.total})}),messageHandler.on("FetchBinaryData",async data=>{if(this.destroyed)throw new Error("Worker was destroyed.");const factory=this[data.type];if(!factory)throw new Error(`${data.type} not initialized, see the \`useWorkerFetch\` parameter.`);return factory.fetch(data)})}getData(){return this.messageHandler. sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&warn("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:map2,transfer}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:map2,filename:this._fullReader?.filename??null},transfer).finally(()=>{this.annotationStorage.resetModified()})}getPage(pageNumber){ if(!Number.isInteger(pageNumber)||pageNumber<=0||pageNumber>this._numPages)return Promise.reject(new Error("Invalid page request."));const pageIndex=pageNumber-1,cachedPromise=this.#pagePromises.get(pageIndex);if(cachedPromise)return cachedPromise;const promise=this.messageHandler.sendWithPromise("GetPage",{pageIndex}).then(pageInfo=>{if(this.destroyed)throw new Error("Transport destroyed");pageInfo.refStr&&this.#pageRefCache.set(pageInfo.refStr,pageNumber);const page2=new PDFPageProxy(pageIndex, pageInfo,this,this._params.pdfBug);return this.#pageCache.set(pageIndex,page2),page2});return this.#pagePromises.set(pageIndex,promise),promise}getPageIndex(ref2){return isRefProxy(ref2)?this.messageHandler.sendWithPromise("GetPageIndex",{num:ref2.num,gen:ref2.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(pageIndex,intent){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex,intent})}getFieldObjects(){return this.#cacheSimpleMethod("GetFieldObject\ s")}hasJSActions(){return this.#cacheSimpleMethod("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(id2){return typeof id2!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:id2})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){ return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return this.#cacheSimpleMethod("GetDocJSActions")}getPageJSActions(pageIndex){return this. messageHandler.sendWithPromise("GetPageJSActions",{pageIndex})}getStructTree(pageIndex){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(renderingIntent){return this.#cacheSimpleMethod("GetOptionalContentConfig").then(data=>new OptionalContentConfig(data,renderingIntent))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const name="\ GetMetadata",cachedPromise=this.#methodPromises.get(name);if(cachedPromise)return cachedPromise;const promise=this.messageHandler.sendWithPromise(name,null).then(results=>({info:results[0],metadata:results[1]?new Metadata(results[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null}));return this.#methodPromises.set(name,promise),promise}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(keepLoadedFonts=!1){ if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const page2 of this.#pageCache.values())if(!page2.cleanup())throw new Error(`startCleanup: Page ${page2.pageNumber} is currently rendering.`);this.commonObjs.clear(),keepLoadedFonts||this.fontLoader.clear(),this.#methodPromises.clear(),this.filterFactory.destroy(!0),TextLayer.cleanup()}}cachedPageNumber(ref2){if(!isRefProxy(ref2))return null;const refStr=ref2.gen===0?`${ref2.num}R`:`${ref2.num}R${ref2.gen}`;return this.#pageRefCache. get(refStr)??null}}class RenderTask{#internalRenderTask=null;onContinue=null;onError=null;constructor(internalRenderTask){this.#internalRenderTask=internalRenderTask}get promise(){return this.#internalRenderTask.capability.promise}cancel(extraDelay=0){this.#internalRenderTask.cancel(null,extraDelay)}get separateAnnots(){const{separateAnnots}=this.#internalRenderTask.operatorList;if(!separateAnnots)return!1;const{annotationCanvasMap}=this.#internalRenderTask;return separateAnnots.form||separateAnnots. canvas&&annotationCanvasMap?.size>0}}class InternalRenderTask{#rAF=null;static#canvasInUse=new WeakSet;constructor({callback,params,objs,commonObjs,annotationCanvasMap,operatorList,pageIndex,canvasFactory,filterFactory,useRequestAnimationFrame=!1,pdfBug=!1,pageColors=null,enableHWA=!1}){this.callback=callback,this.params=params,this.objs=objs,this.commonObjs=commonObjs,this.annotationCanvasMap=annotationCanvasMap,this.operatorListIdx=null,this.operatorList=operatorList,this._pageIndex=pageIndex, this.canvasFactory=canvasFactory,this.filterFactory=filterFactory,this._pdfBug=pdfBug,this.pageColors=pageColors,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=useRequestAnimationFrame===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound= this._next.bind(this),this._canvas=params.canvas,this._canvasContext=params.canvas?null:params.canvasContext,this._enableHWA=enableHWA}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency=!1,optionalContentConfig}){if(this.cancelled)return;if(this._canvas){if(InternalRenderTask.#canvasInUse.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancel\ led or completed.");InternalRenderTask.#canvasInUse.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{viewport,transform:transform2,background}=this.params,canvasContext=this._canvasContext||this._canvas.getContext("2d",{alpha:!1,willReadFrequently:!this._enableHWA});this.gfx=new CanvasGraphics(canvasContext,this. commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:transform2,viewport,transparency,background}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(error2=null,extraDelay=0){this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),this.#rAF&&(window.cancelAnimationFrame(this.#rAF),this.#rAF=null),InternalRenderTask.#canvasInUse.delete(this._canvas),error2||=new RenderingCancelledException( `Rendering cancelled, page ${this._pageIndex+1}`,extraDelay),this.callback(error2),this.task.onError?.(error2)}operatorListChanged(){if(!this.graphicsReady){this.graphicsReadyCallback||=this._continueBound;return}this.stepper?.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?this.#rAF=window.requestAnimationFrame( ()=>{this.#rAF=null,this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),InternalRenderTask.#canvasInUse.delete(this._canvas),this.callback())))}}const version$1="\ 5.4.54",build="295fb3ec4";class ColorPicker{#button=null;#buttonSwatch=null;#defaultColor;#dropdown=null;#dropdownWasFromKeyboard=!1;#isMainColorPicker=!1;#editor=null;#eventBus;#openDropdownAC=null;#uiManager=null;static#l10nColor=null;static get _keyboardManager(){return shadow(this,"_keyboardManager",new KeyboardManager([[["Escape","mac+Escape"],ColorPicker.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],ColorPicker.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+Arrow\ Down","mac+ArrowRight"],ColorPicker.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],ColorPicker.prototype._moveToPrevious],[["Home","mac+Home"],ColorPicker.prototype._moveToBeginning],[["End","mac+End"],ColorPicker.prototype._moveToEnd]]))}constructor({editor=null,uiManager=null}){editor?(this.#isMainColorPicker=!1,this.#editor=editor):this.#isMainColorPicker=!0,this.#uiManager=editor?._uiManager||uiManager,this.#eventBus=this.#uiManager._eventBus,this.#defaultColor= editor?.color?.toUpperCase()||this.#uiManager?.highlightColors.values().next().value||"#FFFF98",ColorPicker.#l10nColor||=Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"})}renderButton(){const button=this.#button=document.createElement("button");button.className="colorPicker",button.tabIndex="0",button.setAttribute("data-l10n-id","pdfjs-editor\ -colorpicker-button"),button.ariaHasPopup="true",this.#editor&&(button.ariaControls=`${this.#editor.id}_colorpicker_dropdown`);const signal=this.#uiManager._signal;button.addEventListener("click",this.#openDropdown.bind(this),{signal}),button.addEventListener("keydown",this.#keyDown.bind(this),{signal});const swatch=this.#buttonSwatch=document.createElement("span");return swatch.className="swatch",swatch.ariaHidden="true",swatch.style.backgroundColor=this.#defaultColor,button.append(swatch),button}renderMainDropdown(){ const dropdown=this.#dropdown=this.#getDropdownRoot();return dropdown.ariaOrientation="horizontal",dropdown.ariaLabelledBy="highlightColorPickerLabel",dropdown}#getDropdownRoot(){const div=document.createElement("div"),signal=this.#uiManager._signal;div.addEventListener("contextmenu",noContextMenu,{signal}),div.className="dropdown",div.role="listbox",div.ariaMultiSelectable="false",div.ariaOrientation="vertical",div.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown"),this.#editor&&(div. id=`${this.#editor.id}_colorpicker_dropdown`);for(const[name,color]of this.#uiManager.highlightColors){const button=document.createElement("button");button.tabIndex="0",button.role="option",button.setAttribute("data-color",color),button.title=name,button.setAttribute("data-l10n-id",ColorPicker.#l10nColor[name]);const swatch=document.createElement("span");button.append(swatch),swatch.className="swatch",swatch.style.backgroundColor=color,button.ariaSelected=color===this.#defaultColor,button.addEventListener( "click",this.#colorSelect.bind(this,color),{signal}),div.append(button)}return div.addEventListener("keydown",this.#keyDown.bind(this),{signal}),div}#colorSelect(color,event2){event2.stopPropagation(),this.#eventBus.dispatch("switchannotationeditorparams",{source:this,type:AnnotationEditorParamsType.HIGHLIGHT_COLOR,value:color}),this.updateColor(color)}_colorSelectFromKeyboard(event2){if(event2.target===this.#button){this.#openDropdown(event2);return}const color=event2.target.getAttribute("data-\ color");color&&this.#colorSelect(color,event2)}_moveToNext(event2){if(!this.#isDropdownVisible){this.#openDropdown(event2);return}if(event2.target===this.#button){this.#dropdown.firstChild?.focus();return}event2.target.nextSibling?.focus()}_moveToPrevious(event2){if(event2.target===this.#dropdown?.firstChild||event2.target===this.#button){this.#isDropdownVisible&&this._hideDropdownFromKeyboard();return}this.#isDropdownVisible||this.#openDropdown(event2),event2.target.previousSibling?.focus()}_moveToBeginning(event2){ if(!this.#isDropdownVisible){this.#openDropdown(event2);return}this.#dropdown.firstChild?.focus()}_moveToEnd(event2){if(!this.#isDropdownVisible){this.#openDropdown(event2);return}this.#dropdown.lastChild?.focus()}#keyDown(event2){ColorPicker._keyboardManager.exec(this,event2)}#openDropdown(event2){if(this.#isDropdownVisible){this.hideDropdown();return}if(this.#dropdownWasFromKeyboard=event2.detail===0,this.#openDropdownAC||(this.#openDropdownAC=new AbortController,window.addEventListener("point\ erdown",this.#pointerDown.bind(this),{signal:this.#uiManager.combinedSignal(this.#openDropdownAC)})),this.#button.ariaExpanded="true",this.#dropdown){this.#dropdown.classList.remove("hidden");return}const root2=this.#dropdown=this.#getDropdownRoot();this.#button.append(root2)}#pointerDown(event2){this.#dropdown?.contains(event2.target)||this.hideDropdown()}hideDropdown(){this.#dropdown?.classList.add("hidden"),this.#button.ariaExpanded="false",this.#openDropdownAC?.abort(),this.#openDropdownAC=null}get#isDropdownVisible(){ return this.#dropdown&&!this.#dropdown.classList.contains("hidden")}_hideDropdownFromKeyboard(){if(!this.#isMainColorPicker){if(!this.#isDropdownVisible){this.#editor?.unselect();return}this.hideDropdown(),this.#button.focus({preventScroll:!0,focusVisible:this.#dropdownWasFromKeyboard})}}updateColor(color){if(this.#buttonSwatch&&(this.#buttonSwatch.style.backgroundColor=color),!this.#dropdown)return;const i=this.#uiManager.highlightColors.values();for(const child2 of this.#dropdown.children)child2. ariaSelected=i.next().value===color.toUpperCase()}destroy(){this.#button?.remove(),this.#button=null,this.#buttonSwatch=null,this.#dropdown?.remove(),this.#dropdown=null}}class BasicColorPicker{#input=null;#editor=null;#uiManager=null;static#l10nColor=null;constructor(editor){this.#editor=editor,this.#uiManager=editor._uiManager,BasicColorPicker.#l10nColor||=Object.freeze({freetext:"pdfjs-editor-color-picker-free-text-input",ink:"pdfjs-editor-color-picker-ink-input"})}renderButton(){if(this.#input) return this.#input;const{editorType,colorType,colorValue}=this.#editor,input=this.#input=document.createElement("input");return input.type="color",input.value=colorValue||"#000000",input.className="basicColorPicker",input.tabIndex=0,input.setAttribute("data-l10n-id",BasicColorPicker.#l10nColor[editorType]),input.addEventListener("input",()=>{this.#uiManager.updateParams(colorType,input.value)},{signal:this.#uiManager._signal}),input}update(value){this.#input&&(this.#input.value=value)}destroy(){ this.#input?.remove(),this.#input=null}hideDropdown(){}}function makeColorComp(n){return Math.floor(Math.max(0,Math.min(1,n))*255).toString(16).padStart(2,"0")}function scaleAndClamp(x){return Math.max(0,Math.min(255,255*x))}class ColorConverters{static CMYK_G([c2,y,m,k]){return["G",1-Math.min(1,.3*c2+.59*m+.11*y+k)]}static G_CMYK([g]){return["CMYK",0,0,0,1-g]}static G_RGB([g]){return["RGB",g,g,g]}static G_rgb([g]){return g=scaleAndClamp(g),[g,g,g]}static G_HTML([g]){const G=makeColorComp(g);return`\ #${G}${G}${G}`}static RGB_G([r2,g,b]){return["G",.3*r2+.59*g+.11*b]}static RGB_rgb(color){return color.map(scaleAndClamp)}static RGB_HTML(color){return`#${color.map(makeColorComp).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([c2,y,m,k]){return["RGB",1-Math.min(1,c2+k),1-Math.min(1,m+k),1-Math.min(1,y+k)]}static CMYK_rgb([c2,y,m,k]){return[scaleAndClamp(1-Math.min(1,c2+k)),scaleAndClamp(1-Math.min(1,m+k)),scaleAndClamp(1-Math.min(1,y+k))]}static CMYK_HTML(components2){ const rgb=this.CMYK_RGB(components2).slice(1);return this.RGB_HTML(rgb)}static RGB_CMYK([r2,g,b]){const c2=1-r2,m=1-g,y=1-b,k=Math.min(c2,m,y);return["CMYK",c2,m,y,k]}}class BaseSVGFactory{create(width,height,skipDimensions=!1){if(width<=0||height<=0)throw new Error("Invalid SVG dimensions");const svg2=this._createSVG("svg:svg");return svg2.setAttribute("version","1.1"),skipDimensions||(svg2.setAttribute("width",`${width}px`),svg2.setAttribute("height",`${height}px`)),svg2.setAttribute("preserve\ AspectRatio","none"),svg2.setAttribute("viewBox",`0 0 ${width} ${height}`),svg2}createElement(type2){if(typeof type2!="string")throw new Error("Invalid SVG element type");return this._createSVG(type2)}_createSVG(type2){unreachable("Abstract method `_createSVG` called.")}}class DOMSVGFactory extends BaseSVGFactory{_createSVG(type2){return document.createElementNS(SVG_NS,type2)}}class XfaLayer{static setupStorage(html2,id2,element2,storage,intent){const storedData=storage.getValue(id2,{value:null}); switch(element2.name){case"textarea":if(storedData.value!==null&&(html2.textContent=storedData.value),intent==="print")break;html2.addEventListener("input",event2=>{storage.setValue(id2,{value:event2.target.value})});break;case"input":if(element2.attributes.type==="radio"||element2.attributes.type==="checkbox"){if(storedData.value===element2.attributes.xfaOn?html2.setAttribute("checked",!0):storedData.value===element2.attributes.xfaOff&&html2.removeAttribute("checked"),intent==="print")break;html2. addEventListener("change",event2=>{storage.setValue(id2,{value:event2.target.checked?event2.target.getAttribute("xfaOn"):event2.target.getAttribute("xfaOff")})})}else{if(storedData.value!==null&&html2.setAttribute("value",storedData.value),intent==="print")break;html2.addEventListener("input",event2=>{storage.setValue(id2,{value:event2.target.value})})}break;case"select":if(storedData.value!==null){html2.setAttribute("value",storedData.value);for(const option2 of element2.children)option2.attributes. value===storedData.value?option2.attributes.selected=!0:option2.attributes.hasOwnProperty("selected")&&delete option2.attributes.selected}html2.addEventListener("input",event2=>{const options=event2.target.options,value=options.selectedIndex===-1?"":options[options.selectedIndex].value;storage.setValue(id2,{value})});break}}static setAttributes({html:html2,element:element2,storage=null,intent,linkService}){const{attributes}=element2,isHTMLAnchorElement=html2 instanceof HTMLAnchorElement;attributes. type==="radio"&&(attributes.name=`${attributes.name}-${intent}`);for(const[key2,value]of Object.entries(attributes))if(value!=null)switch(key2){case"class":value.length&&html2.setAttribute(key2,value.join(" "));break;case"dataId":break;case"id":html2.setAttribute("data-element-id",value);break;case"style":Object.assign(html2.style,value);break;case"textContent":html2.textContent=value;break;default:(!isHTMLAnchorElement||key2!=="href"&&key2!=="newWindow")&&html2.setAttribute(key2,value)}isHTMLAnchorElement&& linkService.addLinkAttributes(html2,attributes.href,attributes.newWindow),storage&&attributes.dataId&&this.setupStorage(html2,attributes.dataId,element2,storage)}static render(parameters){const storage=parameters.annotationStorage,linkService=parameters.linkService,root2=parameters.xfaHtml,intent=parameters.intent||"display",rootHtml=document.createElement(root2.name);root2.attributes&&this.setAttributes({html:rootHtml,element:root2,intent,linkService});const isNotForRichText=intent!=="richText", rootDiv=parameters.div;if(rootDiv.append(rootHtml),parameters.viewport){const transform2=`matrix(${parameters.viewport.transform.join(",")})`;rootDiv.style.transform=transform2}isNotForRichText&&rootDiv.setAttribute("class","xfaLayer xfaFont");const textDivs=[];if(root2.children.length===0){if(root2.value){const node2=document.createTextNode(root2.value);rootHtml.append(node2),isNotForRichText&&XfaText.shouldBuildText(root2.name)&&textDivs.push(node2)}return{textDivs}}const stack=[[root2,-1,rootHtml]]; for(;stack.length>0;){const[parent,i,html2]=stack.at(-1);if(i+1===parent.children.length){stack.pop();continue}const child2=parent.children[++stack.at(-1)[1]];if(child2===null)continue;const{name}=child2;if(name==="#text"){const node2=document.createTextNode(child2.value);textDivs.push(node2),html2.append(node2);continue}const childHtml=child2?.attributes?.xmlns?document.createElementNS(child2.attributes.xmlns,name):document.createElement(name);if(html2.append(childHtml),child2.attributes&&this. setAttributes({html:childHtml,element:child2,storage,intent,linkService}),child2.children?.length>0)stack.push([child2,-1,childHtml]);else if(child2.value){const node2=document.createTextNode(child2.value);isNotForRichText&&XfaText.shouldBuildText(name)&&textDivs.push(node2),childHtml.append(node2)}}for(const el of rootDiv.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))el.setAttribute("readOnly",!0);return{textDivs}}static update(parameters){const transform2=`matrix(${parameters. viewport.transform.join(",")})`;parameters.div.style.transform=transform2,parameters.div.hidden=!1}}const annotation_layer_DEFAULT_FONT_SIZE=9,GetElementsByNameSet=new WeakSet,TIMEZONE_OFFSET=new Date().getTimezoneOffset()*60*1e3;class AnnotationElementFactory{static create(parameters){switch(parameters.data.annotationType){case AnnotationType.LINK:return new LinkAnnotationElement(parameters);case AnnotationType.TEXT:return new TextAnnotationElement(parameters);case AnnotationType.WIDGET:switch(parameters. data.fieldType){case"Tx":return new TextWidgetAnnotationElement(parameters);case"Btn":return parameters.data.radioButton?new RadioButtonWidgetAnnotationElement(parameters):parameters.data.checkBox?new CheckboxWidgetAnnotationElement(parameters):new PushButtonWidgetAnnotationElement(parameters);case"Ch":return new ChoiceWidgetAnnotationElement(parameters);case"Sig":return new SignatureWidgetAnnotationElement(parameters)}return new WidgetAnnotationElement(parameters);case AnnotationType.POPUP:return new PopupAnnotationElement( parameters);case AnnotationType.FREETEXT:return new FreeTextAnnotationElement(parameters);case AnnotationType.LINE:return new LineAnnotationElement(parameters);case AnnotationType.SQUARE:return new SquareAnnotationElement(parameters);case AnnotationType.CIRCLE:return new CircleAnnotationElement(parameters);case AnnotationType.POLYLINE:return new PolylineAnnotationElement(parameters);case AnnotationType.CARET:return new CaretAnnotationElement(parameters);case AnnotationType.INK:return new InkAnnotationElement( parameters);case AnnotationType.POLYGON:return new PolygonAnnotationElement(parameters);case AnnotationType.HIGHLIGHT:return new HighlightAnnotationElement(parameters);case AnnotationType.UNDERLINE:return new UnderlineAnnotationElement(parameters);case AnnotationType.SQUIGGLY:return new SquigglyAnnotationElement(parameters);case AnnotationType.STRIKEOUT:return new StrikeOutAnnotationElement(parameters);case AnnotationType.STAMP:return new StampAnnotationElement(parameters);case AnnotationType.FILEATTACHMENT: return new FileAttachmentAnnotationElement(parameters);default:return new AnnotationElement(parameters)}}}class AnnotationElement{#updates=null;#hasBorder=!1;#popupElement=null;constructor(parameters,{isRenderable=!1,ignoreBorder=!1,createQuadrilaterals=!1}={}){this.isRenderable=isRenderable,this.data=parameters.data,this.layer=parameters.layer,this.linkService=parameters.linkService,this.downloadManager=parameters.downloadManager,this.imageResourcesPath=parameters.imageResourcesPath,this.renderForms= parameters.renderForms,this.svgFactory=parameters.svgFactory,this.annotationStorage=parameters.annotationStorage,this.enableScripting=parameters.enableScripting,this.hasJSActions=parameters.hasJSActions,this._fieldObjects=parameters.fieldObjects,this.parent=parameters.parent,isRenderable&&(this.container=this._createContainer(ignoreBorder)),createQuadrilaterals&&this._createQuadrilaterals()}static _hasPopupData({contentsObj,richText}){return!!(contentsObj?.str||richText?.str)}get _isEditable(){return this. data.isEditable}get hasPopupData(){return AnnotationElement._hasPopupData(this.data)}updateEdited(params){if(!this.container)return;params.rect&&(this.#updates||={rect:this.data.rect.slice(0)});const{rect,popup:newPopup}=params;rect&&this.#setRectEdited(rect);let popup=this.#popupElement?.popup||this.popup;!popup&&newPopup?.text&&(this._createPopup(newPopup),popup=this.#popupElement.popup),popup&&(popup.updateEdited(params),newPopup?.deleted&&(popup.remove(),this.#popupElement=null,this.popup=null))}resetEdited(){ this.#updates&&(this.#setRectEdited(this.#updates.rect),this.#popupElement?.popup.resetEdited(),this.#updates=null)}#setRectEdited(rect){const{container:{style:style2},data:{rect:currentRect,rotation},parent:{viewport:{rawDims:{pageWidth,pageHeight,pageX,pageY}}}}=this;currentRect?.splice(0,4,...rect),style2.left=`${100*(rect[0]-pageX)/pageWidth}%`,style2.top=`${100*(pageHeight-rect[3]+pageY)/pageHeight}%`,rotation===0?(style2.width=`${100*(rect[2]-rect[0])/pageWidth}%`,style2.height=`${100*(rect[3]- rect[1])/pageHeight}%`):this.setRotation(rotation)}_createContainer(ignoreBorder){const{data,parent:{page:page2,viewport}}=this,container2=document.createElement("section");container2.setAttribute("data-annotation-id",data.id),!(this instanceof WidgetAnnotationElement)&&!(this instanceof LinkAnnotationElement)&&(container2.tabIndex=0);const{style:style2}=container2;if(style2.zIndex=this.parent.zIndex++,data.alternativeText&&(container2.title=data.alternativeText),data.noRotate&&container2.classList. add("norotate"),!data.rect||this instanceof PopupAnnotationElement){const{rotation:rotation2}=data;return!data.hasOwnCanvas&&rotation2!==0&&this.setRotation(rotation2,container2),container2}const{width,height}=this;if(!ignoreBorder&&data.borderStyle.width>0){style2.borderWidth=`${data.borderStyle.width}px`;const horizontalRadius=data.borderStyle.horizontalCornerRadius,verticalRadius=data.borderStyle.verticalCornerRadius;if(horizontalRadius>0||verticalRadius>0){const radius=`calc(${horizontalRadius}\ px * var(--total-scale-factor)) / calc(${verticalRadius}px * var(--total-scale-factor))`;style2.borderRadius=radius}else if(this instanceof RadioButtonWidgetAnnotationElement){const radius=`calc(${width}px * var(--total-scale-factor)) / calc(${height}px * var(--total-scale-factor))`;style2.borderRadius=radius}switch(data.borderStyle.style){case AnnotationBorderStyleType.SOLID:style2.borderStyle="solid";break;case AnnotationBorderStyleType.DASHED:style2.borderStyle="dashed";break;case AnnotationBorderStyleType. BEVELED:warn("Unimplemented border style: beveled");break;case AnnotationBorderStyleType.INSET:warn("Unimplemented border style: inset");break;case AnnotationBorderStyleType.UNDERLINE:style2.borderBottomStyle="solid";break}const borderColor=data.borderColor||null;borderColor?(this.#hasBorder=!0,style2.borderColor=Util.makeHexColor(borderColor[0]|0,borderColor[1]|0,borderColor[2]|0)):style2.borderWidth=0}const rect=Util.normalizeRect([data.rect[0],page2.view[3]-data.rect[1]+page2.view[1],data.rect[2], page2.view[3]-data.rect[3]+page2.view[1]]),{pageWidth,pageHeight,pageX,pageY}=viewport.rawDims;style2.left=`${100*(rect[0]-pageX)/pageWidth}%`,style2.top=`${100*(rect[1]-pageY)/pageHeight}%`;const{rotation}=data;return data.hasOwnCanvas||rotation===0?(style2.width=`${100*width/pageWidth}%`,style2.height=`${100*height/pageHeight}%`):this.setRotation(rotation,container2),container2}setRotation(angle,container2=this.container){if(!this.data.rect)return;const{pageWidth,pageHeight}=this.parent.viewport. rawDims;let{width,height}=this;angle%180!==0&&([width,height]=[height,width]),container2.style.width=`${100*width/pageWidth}%`,container2.style.height=`${100*height/pageHeight}%`,container2.setAttribute("data-main-rotation",(360-angle)%360)}get _commonActions(){const setColor=(jsName,styleName,event2)=>{const color=event2.detail[jsName],colorType=color[0],colorArray=color.slice(1);event2.target.style[styleName]=ColorConverters[`${colorType}_HTML`](colorArray),this.annotationStorage.setValue(this. data.id,{[styleName]:ColorConverters[`${colorType}_rgb`](colorArray)})};return shadow(this,"_commonActions",{display:event2=>{const{display}=event2.detail,hidden2=display%2===1;this.container.style.visibility=hidden2?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:hidden2,noPrint:display===1||display===2})},print:event2=>{this.annotationStorage.setValue(this.data.id,{noPrint:!event2.detail.print})},hidden:event2=>{const{hidden:hidden2}=event2.detail;this.container.style.visibility= hidden2?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:hidden2,noView:hidden2})},focus:event2=>{setTimeout(()=>event2.target.focus({preventScroll:!1}),0)},userName:event2=>{event2.target.title=event2.detail.userName},readonly:event2=>{event2.target.disabled=event2.detail.readonly},required:event2=>{this._setRequired(event2.target,event2.detail.required)},bgColor:event2=>{setColor("bgColor","backgroundColor",event2)},fillColor:event2=>{setColor("fillColor","backgroundCol\ or",event2)},fgColor:event2=>{setColor("fgColor","color",event2)},textColor:event2=>{setColor("textColor","color",event2)},borderColor:event2=>{setColor("borderColor","borderColor",event2)},strokeColor:event2=>{setColor("strokeColor","borderColor",event2)},rotation:event2=>{const angle=event2.detail.rotation;this.setRotation(angle),this.annotationStorage.setValue(this.data.id,{rotation:angle})}})}_dispatchEventFromSandbox(actions,jsEvent){const commonActions=this._commonActions;for(const name of Object. keys(jsEvent.detail))(actions[name]||commonActions[name])?.(jsEvent)}_setDefaultPropertiesFromJS(element2){if(!this.enableScripting)return;const storedData=this.annotationStorage.getRawValue(this.data.id);if(!storedData)return;const commonActions=this._commonActions;for(const[actionName,detail]of Object.entries(storedData)){const action2=commonActions[actionName];if(action2){const eventProxy={detail:{[actionName]:detail},target:element2};action2(eventProxy),delete storedData[actionName]}}}_createQuadrilaterals(){ if(!this.container)return;const{quadPoints}=this.data;if(!quadPoints)return;const[rectBlX,rectBlY,rectTrX,rectTrY]=this.data.rect.map(x=>Math.fround(x));if(quadPoints.length===8){const[trX,trY,blX,blY]=quadPoints.subarray(2,6);if(rectTrX===trX&&rectTrY===trY&&rectBlX===blX&&rectBlY===blY)return}const{style:style2}=this.container;let svgBuffer;if(this.#hasBorder){const{borderColor,borderWidth}=style2;style2.borderWidth=0,svgBuffer=["url('data:image/svg+xml;utf8,",'',``],this.container.classList.add("hasBorder")}const width=rectTrX-rectBlX,height=rectTrY-rectBlY,{svgFactory}=this,svg2=svgFactory.createElement("svg");svg2.classList.add("quadrilateralsContainer"),svg2.setAttribute("width",0),svg2.setAttribute("height",0),svg2.role="none";const defs=svgFactory.createElement("defs");svg2.append(defs);const clipPath=svgFactory.createElement( "clipPath"),id2=`clippath_${this.data.id}`;clipPath.setAttribute("id",id2),clipPath.setAttribute("clipPathUnits","objectBoundingBox"),defs.append(clipPath);for(let i=2,ii=quadPoints.length;i`)}this.#hasBorder&&(svgBuffer.push("')"),style2.backgroundImage=svgBuffer.join("")),this.container.append(svg2),this.container.style.clipPath=`url(#${id2})`}_createPopup(popupData=null){const{data}=this;let contentsObj,modificationDate;popupData?(contentsObj={str:popupData.text},modificationDate=popupData. date):(contentsObj=data.contentsObj,modificationDate=data.modificationDate);const popup=this.#popupElement=new PopupAnnotationElement({data:{color:data.color,titleObj:data.titleObj,modificationDate,contentsObj,richText:data.richText,parentRect:data.rect,borderStyle:0,id:`popup_${data.id}`,rotation:data.rotation,noRotate:!0},linkService:this.linkService,parent:this.parent,elements:[this]});this.parent.div.append(popup.render())}get hasPopupElement(){return!!(this.#popupElement||this.popup||this.data. popupRef)}render(){unreachable("Abstract method `AnnotationElement.render` called")}_getElementsByName(name,skipId=null){const fields=[];if(this._fieldObjects){const fieldObj=this._fieldObjects[name];if(fieldObj)for(const{page:page2,id:id2,exportValues}of fieldObj){if(page2===-1||id2===skipId)continue;const exportValue=typeof exportValues=="string"?exportValues:null,domElement=document.querySelector(`[data-element-id="${id2}"]`);if(domElement&&!GetElementsByNameSet.has(domElement)){warn(`_getEle\ mentsByName - element not allowed: ${id2}`);continue}fields.push({id:id2,exportValue,domElement})}return fields}for(const domElement of document.getElementsByName(name)){const{exportValue}=domElement,id2=domElement.getAttribute("data-element-id");id2!==skipId&&GetElementsByNameSet.has(domElement)&&fields.push({id:id2,exportValue,domElement})}return fields}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){ return this.container}addHighlightArea(){const triggers=this.getElementsToTriggerPopup();if(Array.isArray(triggers))for(const element2 of triggers)element2.classList.add("highlightArea");else triggers.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:mode,data:{id:editId}}=this;this.container.addEventListener("dblclick",()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode,editId,mustEnterInEditMode:!0})})}get width(){ return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}}class LinkAnnotationElement extends AnnotationElement{constructor(parameters,options=null){super(parameters,{isRenderable:!0,ignoreBorder:!!options?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=parameters.data.isTooltipOnly}render(){const{data,linkService}=this,link2=document.createElement("a");link2.setAttribute("data-element-id",data.id);let isBound=!1;return data.url?(linkService.addLinkAttributes( link2,data.url,data.newWindow),isBound=!0):data.action?(this._bindNamedAction(link2,data.action,data.overlaidText),isBound=!0):data.attachment?(this.#bindAttachment(link2,data.attachment,data.overlaidText,data.attachmentDest),isBound=!0):data.setOCGState?(this.#bindSetOCGState(link2,data.setOCGState,data.overlaidText),isBound=!0):data.dest?(this._bindLink(link2,data.dest,data.overlaidText),isBound=!0):(data.actions&&(data.actions.Action||data.actions["Mouse Up"]||data.actions["Mouse Down"])&&this. enableScripting&&this.hasJSActions&&(this._bindJSAction(link2,data),isBound=!0),data.resetForm?(this._bindResetFormAction(link2,data.resetForm),isBound=!0):this.isTooltipOnly&&!isBound&&(this._bindLink(link2,""),isBound=!0)),this.container.classList.add("linkAnnotation"),isBound&&this.container.append(link2),this.container}#setInternalLink(){this.container.setAttribute("data-internal-link","")}_bindLink(link2,destination,overlaidText=""){link2.href=this.linkService.getDestinationHash(destination), link2.onclick=()=>(destination&&this.linkService.goToDestination(destination),!1),(destination||destination==="")&&this.#setInternalLink(),overlaidText&&(link2.title=overlaidText)}_bindNamedAction(link2,action2,overlaidText=""){link2.href=this.linkService.getAnchorUrl(""),link2.onclick=()=>(this.linkService.executeNamedAction(action2),!1),overlaidText&&(link2.title=overlaidText),this.#setInternalLink()}#bindAttachment(link2,attachment,overlaidText="",dest=null){link2.href=this.linkService.getAnchorUrl( ""),attachment.description?link2.title=attachment.description:overlaidText&&(link2.title=overlaidText),link2.onclick=()=>(this.downloadManager?.openOrDownloadData(attachment.content,attachment.filename,dest),!1),this.#setInternalLink()}#bindSetOCGState(link2,action2,overlaidText=""){link2.href=this.linkService.getAnchorUrl(""),link2.onclick=()=>(this.linkService.executeSetOCGState(action2),!1),overlaidText&&(link2.title=overlaidText),this.#setInternalLink()}_bindJSAction(link2,data){link2.href=this. linkService.getAnchorUrl("");const map2=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const name of Object.keys(data.actions)){const jsName=map2.get(name);jsName&&(link2[jsName]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:data.id,name}}),!1))}data.overlaidText&&(link2.title=data.overlaidText),link2.onclick||(link2.onclick=()=>!1),this.#setInternalLink()}_bindResetFormAction(link2,resetForm){const otherClickAction=link2. onclick;if(otherClickAction||(link2.href=this.linkService.getAnchorUrl("")),this.#setInternalLink(),!this._fieldObjects){warn('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),otherClickAction||(link2.onclick=()=>!1);return}link2.onclick=()=>{otherClickAction?.();const{fields:resetFormFields,refs:resetFormRefs,include}=resetForm,allFields=[];if(resetFormFields.length!==0||resetFormRefs.length!==0){const fieldIds=new Set(resetFormRefs); for(const fieldName of resetFormFields){const fields=this._fieldObjects[fieldName]||[];for(const{id:id2}of fields)fieldIds.add(id2)}for(const fields of Object.values(this._fieldObjects))for(const field of fields)fieldIds.has(field.id)===include&&allFields.push(field)}else for(const fields of Object.values(this._fieldObjects))allFields.push(...fields);const storage=this.annotationStorage,allIds=[];for(const field of allFields){const{id:id2}=field;switch(allIds.push(id2),field.type){case"text":{const value=field. defaultValue||"";storage.setValue(id2,{value});break}case"checkbox":case"radiobutton":{const value=field.defaultValue===field.exportValues;storage.setValue(id2,{value});break}case"combobox":case"listbox":{const value=field.defaultValue||"";storage.setValue(id2,{value});break}default:continue}const domElement=document.querySelector(`[data-element-id="${id2}"]`);if(domElement){if(!GetElementsByNameSet.has(domElement)){warn(`_bindResetFormAction - element not allowed: ${id2}`);continue}}else continue; domElement.dispatchEvent(new Event("resetform"))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:allIds,name:"ResetForm"}}),!1}}}class TextAnnotationElement extends AnnotationElement{constructor(parameters){super(parameters,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const image2=document.createElement("img");return image2.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+ ".svg",image2.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),image2.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(image2),this.container}}class WidgetAnnotationElement extends AnnotationElement{render(){return this.container}showElementAndHideCanvas(element2){this.data.hasOwnCanvas&&(element2.previousSibling?.nodeName==="CANVAS"&&(element2.previousSibling.hidden=!0),element2.hidden= !1)}_getKeyModifier(event2){return util_FeatureTest.platform.isMac?event2.metaKey:event2.ctrlKey}_setEventListener(element2,elementData,baseName,eventName,valueGetter){baseName.includes("mouse")?element2.addEventListener(baseName,event2=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:eventName,value:valueGetter(event2),shift:event2.shiftKey,modifier:this._getKeyModifier(event2)}})}):element2.addEventListener(baseName,event2=>{if(baseName=== "blur"){if(!elementData.focused||!event2.relatedTarget)return;elementData.focused=!1}else if(baseName==="focus"){if(elementData.focused)return;elementData.focused=!0}valueGetter&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:eventName,value:valueGetter(event2)}})})}_setEventListeners(element2,elementData,names2,getter){for(const[baseName,eventName]of names2)(eventName==="Action"||this.data.actions?.[eventName])&&((eventName==="Focus"||eventName=== "Blur")&&(elementData||={focused:!1}),this._setEventListener(element2,elementData,baseName,eventName,getter),eventName==="Focus"&&!this.data.actions?.Blur?this._setEventListener(element2,elementData,"blur","Blur",null):eventName==="Blur"&&!this.data.actions?.Focus&&this._setEventListener(element2,elementData,"focus","Focus",null))}_setBackgroundColor(element2){const color=this.data.backgroundColor||null;element2.style.backgroundColor=color===null?"transparent":Util.makeHexColor(color[0],color[1], color[2])}_setTextStyle(element2){const TEXT_ALIGNMENT=["left","center","right"],{fontColor}=this.data.defaultAppearanceData,fontSize=this.data.defaultAppearanceData.fontSize||annotation_layer_DEFAULT_FONT_SIZE,style2=element2.style;let computedFontSize;const BORDER_SIZE=2,roundToOneDecimal=x=>Math.round(10*x)/10;if(this.data.multiLine){const height=Math.abs(this.data.rect[3]-this.data.rect[1]-BORDER_SIZE),numberOfLines=Math.round(height/(LINE_FACTOR*fontSize))||1,lineHeight=height/numberOfLines; computedFontSize=Math.min(fontSize,roundToOneDecimal(lineHeight/LINE_FACTOR))}else{const height=Math.abs(this.data.rect[3]-this.data.rect[1]-BORDER_SIZE);computedFontSize=Math.min(fontSize,roundToOneDecimal(height/LINE_FACTOR))}style2.fontSize=`calc(${computedFontSize}px * var(--total-scale-factor))`,style2.color=Util.makeHexColor(fontColor[0],fontColor[1],fontColor[2]),this.data.textAlignment!==null&&(style2.textAlign=TEXT_ALIGNMENT[this.data.textAlignment])}_setRequired(element2,isRequired){isRequired? element2.setAttribute("required",!0):element2.removeAttribute("required"),element2.setAttribute("aria-required",isRequired)}}class TextWidgetAnnotationElement extends WidgetAnnotationElement{constructor(parameters){const isRenderable=parameters.renderForms||parameters.data.hasOwnCanvas||!parameters.data.hasAppearance&&!!parameters.data.fieldValue;super(parameters,{isRenderable})}setPropertyOnSiblings(base2,key2,value,keyInStorage){const storage=this.annotationStorage;for(const element2 of this._getElementsByName( base2.name,base2.id))element2.domElement&&(element2.domElement[key2]=value),storage.setValue(element2.id,{[keyInStorage]:value})}render(){const storage=this.annotationStorage,id2=this.data.id;this.container.classList.add("textWidgetAnnotation");let element2=null;if(this.renderForms){const storedData=storage.getValue(id2,{value:this.data.fieldValue});let textContent=storedData.value||"";const maxLen=storage.getValue(id2,{charLimit:this.data.maxLen}).charLimit;maxLen&&textContent.length>maxLen&&(textContent= textContent.slice(0,maxLen));let fieldFormattedValues=storedData.formattedValue||this.data.textContent?.join(` `)||null;fieldFormattedValues&&this.data.comb&&(fieldFormattedValues=fieldFormattedValues.replaceAll(/\s+/g,""));const elementData={userValue:textContent,formattedValue:fieldFormattedValues,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(element2=document.createElement("textarea"),element2.textContent=fieldFormattedValues??textContent,this.data.doNotScroll&&(element2.style.overflowY="hidden")):(element2=document.createElement("input"),element2.type=this.data.password?"passwo\ rd":"text",element2.setAttribute("value",fieldFormattedValues??textContent),this.data.doNotScroll&&(element2.style.overflowX="hidden")),this.data.hasOwnCanvas&&(element2.hidden=!0),GetElementsByNameSet.add(element2),element2.setAttribute("data-element-id",id2),element2.disabled=this.data.readOnly,element2.name=this.data.fieldName,element2.tabIndex=0;const{datetimeFormat,datetimeType,timeStep}=this.data,hasDateOrTime=!!datetimeType&&this.enableScripting;datetimeFormat&&(element2.title=datetimeFormat), this._setRequired(element2,this.data.required),maxLen&&(element2.maxLength=maxLen),element2.addEventListener("input",event2=>{storage.setValue(id2,{value:event2.target.value}),this.setPropertyOnSiblings(element2,"value",event2.target.value,"value"),elementData.formattedValue=null}),element2.addEventListener("resetform",event2=>{const defaultValue=this.data.defaultFieldValue??"";element2.value=elementData.userValue=defaultValue,elementData.formattedValue=null});let blurListener=event2=>{const{formattedValue}=elementData; formattedValue!=null&&(event2.target.value=formattedValue),event2.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){element2.addEventListener("focus",event2=>{if(elementData.focused)return;const{target:target2}=event2;if(hasDateOrTime&&(target2.type=datetimeType,timeStep&&(target2.step=timeStep)),elementData.userValue){const value=elementData.userValue;if(hasDateOrTime)if(datetimeType==="time"){const date2=new Date(value),parts=[date2.getHours(),date2.getMinutes(),date2.getSeconds()]; target2.value=parts.map(v=>v.toString().padStart(2,"0")).join(":")}else target2.value=new Date(value-TIMEZONE_OFFSET).toISOString().split(datetimeType==="date"?"T":".",1)[0];else target2.value=value}elementData.lastCommittedValue=target2.value,elementData.commitKey=1,this.data.actions?.Focus||(elementData.focused=!0)}),element2.addEventListener("updatefromsandbox",jsEvent=>{this.showElementAndHideCanvas(jsEvent.target);const actions={value(event2){elementData.userValue=event2.detail.value??"",hasDateOrTime|| storage.setValue(id2,{value:elementData.userValue.toString()}),event2.target.value=elementData.userValue},formattedValue(event2){const{formattedValue}=event2.detail;elementData.formattedValue=formattedValue,formattedValue!=null&&event2.target!==document.activeElement&&(event2.target.value=formattedValue);const data={formattedValue};hasDateOrTime&&(data.value=formattedValue),storage.setValue(id2,data)},selRange(event2){event2.target.setSelectionRange(...event2.detail.selRange)},charLimit:event2=>{ const{charLimit}=event2.detail,{target:target2}=event2;if(charLimit===0){target2.removeAttribute("maxLength");return}target2.setAttribute("maxLength",charLimit);let value=elementData.userValue;!value||value.length<=charLimit||(value=value.slice(0,charLimit),target2.value=elementData.userValue=value,storage.setValue(id2,{value}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:id2,name:"Keystroke",value,willCommit:!0,commitKey:1,selStart:target2.selectionStart, selEnd:target2.selectionEnd}}))}};this._dispatchEventFromSandbox(actions,jsEvent)}),element2.addEventListener("keydown",event2=>{elementData.commitKey=1;let commitKey=-1;if(event2.key==="Escape"?commitKey=0:event2.key==="Enter"&&!this.data.multiLine?commitKey=2:event2.key==="Tab"&&(elementData.commitKey=3),commitKey===-1)return;const{value}=event2.target;elementData.lastCommittedValue!==value&&(elementData.lastCommittedValue=value,elementData.userValue=value,this.linkService.eventBus?.dispatch("\ dispatcheventinsandbox",{source:this,detail:{id:id2,name:"Keystroke",value,willCommit:!0,commitKey,selStart:event2.target.selectionStart,selEnd:event2.target.selectionEnd}}))});const _blurListener=blurListener;blurListener=null,element2.addEventListener("blur",event2=>{if(!elementData.focused||!event2.relatedTarget)return;this.data.actions?.Blur||(elementData.focused=!1);const{target:target2}=event2;let{value}=target2;if(hasDateOrTime){if(value&&datetimeType==="time"){const parts=value.split(":"). map(v=>parseInt(v,10));value=new Date(2e3,0,1,parts[0],parts[1],parts[2]||0).valueOf(),target2.step=""}else value=new Date(value).valueOf();target2.type="text"}elementData.userValue=value,elementData.lastCommittedValue!==value&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:id2,name:"Keystroke",value,willCommit:!0,commitKey:elementData.commitKey,selStart:event2.target.selectionStart,selEnd:event2.target.selectionEnd}}),_blurListener(event2)}),this.data.actions?. Keystroke&&element2.addEventListener("beforeinput",event2=>{elementData.lastCommittedValue=null;const{data,target:target2}=event2,{value,selectionStart,selectionEnd}=target2;let selStart=selectionStart,selEnd=selectionEnd;switch(event2.inputType){case"deleteWordBackward":{const match=value.substring(0,selectionStart).match(/\w*[^\w]*$/);match&&(selStart-=match[0].length);break}case"deleteWordForward":{const match=value.substring(selectionStart).match(/^[^\w]*\w*/);match&&(selEnd+=match[0].length); break}case"deleteContentBackward":selectionStart===selectionEnd&&(selStart-=1);break;case"deleteContentForward":selectionStart===selectionEnd&&(selEnd+=1);break}event2.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:id2,name:"Keystroke",value,change:data||"",willCommit:!1,selStart,selEnd}})}),this._setEventListeners(element2,elementData,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","M\ ouse Exit"],["mouseup","Mouse Up"]],event2=>event2.target.value)}if(blurListener&&element2.addEventListener("blur",blurListener),this.data.comb){const combWidth=(this.data.rect[2]-this.data.rect[0])/maxLen;element2.classList.add("comb"),element2.style.letterSpacing=`calc(${combWidth}px * var(--total-scale-factor) - 1ch)`}}else element2=document.createElement("div"),element2.textContent=this.data.fieldValue,element2.style.verticalAlign="middle",element2.style.display="table-cell",this.data.hasOwnCanvas&& (element2.hidden=!0);return this._setTextStyle(element2),this._setBackgroundColor(element2),this._setDefaultPropertiesFromJS(element2),this.container.append(element2),this.container}}class SignatureWidgetAnnotationElement extends WidgetAnnotationElement{constructor(parameters){super(parameters,{isRenderable:!!parameters.data.hasOwnCanvas})}}class CheckboxWidgetAnnotationElement extends WidgetAnnotationElement{constructor(parameters){super(parameters,{isRenderable:parameters.renderForms})}render(){ const storage=this.annotationStorage,data=this.data,id2=data.id;let value=storage.getValue(id2,{value:data.exportValue===data.fieldValue}).value;typeof value=="string"&&(value=value!=="Off",storage.setValue(id2,{value})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const element2=document.createElement("input");return GetElementsByNameSet.add(element2),element2.setAttribute("data-element-id",id2),element2.disabled=data.readOnly,this._setRequired(element2,this.data.required), element2.type="checkbox",element2.name=data.fieldName,value&&element2.setAttribute("checked",!0),element2.setAttribute("exportValue",data.exportValue),element2.tabIndex=0,element2.addEventListener("change",event2=>{const{name,checked}=event2.target;for(const checkbox of this._getElementsByName(name,id2)){const curChecked=checked&&checkbox.exportValue===data.exportValue;checkbox.domElement&&(checkbox.domElement.checked=curChecked),storage.setValue(checkbox.id,{value:curChecked})}storage.setValue( id2,{value:checked})}),element2.addEventListener("resetform",event2=>{const defaultValue=data.defaultFieldValue||"Off";event2.target.checked=defaultValue===data.exportValue}),this.enableScripting&&this.hasJSActions&&(element2.addEventListener("updatefromsandbox",jsEvent=>{const actions={value(event2){event2.target.checked=event2.detail.value!=="Off",storage.setValue(id2,{value:event2.target.checked})}};this._dispatchEventFromSandbox(actions,jsEvent)}),this._setEventListeners(element2,null,[["cha\ nge","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],event2=>event2.target.checked)),this._setBackgroundColor(element2),this._setDefaultPropertiesFromJS(element2),this.container.append(element2),this.container}}class RadioButtonWidgetAnnotationElement extends WidgetAnnotationElement{constructor(parameters){super(parameters,{isRenderable:parameters.renderForms})}render(){this. container.classList.add("buttonWidgetAnnotation","radioButton");const storage=this.annotationStorage,data=this.data,id2=data.id;let value=storage.getValue(id2,{value:data.fieldValue===data.buttonValue}).value;if(typeof value=="string"&&(value=value!==data.buttonValue,storage.setValue(id2,{value})),value)for(const radio of this._getElementsByName(data.fieldName,id2))storage.setValue(radio.id,{value:!1});const element2=document.createElement("input");if(GetElementsByNameSet.add(element2),element2. setAttribute("data-element-id",id2),element2.disabled=data.readOnly,this._setRequired(element2,this.data.required),element2.type="radio",element2.name=data.fieldName,value&&element2.setAttribute("checked",!0),element2.tabIndex=0,element2.addEventListener("change",event2=>{const{name,checked}=event2.target;for(const radio of this._getElementsByName(name,id2))storage.setValue(radio.id,{value:!1});storage.setValue(id2,{value:checked})}),element2.addEventListener("resetform",event2=>{const defaultValue=data. defaultFieldValue;event2.target.checked=defaultValue!=null&&defaultValue===data.buttonValue}),this.enableScripting&&this.hasJSActions){const pdfButtonValue=data.buttonValue;element2.addEventListener("updatefromsandbox",jsEvent=>{const actions={value:event2=>{const checked=pdfButtonValue===event2.detail.value;for(const radio of this._getElementsByName(event2.target.name)){const curChecked=checked&&radio.id===id2;radio.domElement&&(radio.domElement.checked=curChecked),storage.setValue(radio.id,{value:curChecked})}}}; this._dispatchEventFromSandbox(actions,jsEvent)}),this._setEventListeners(element2,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],event2=>event2.target.checked)}return this._setBackgroundColor(element2),this._setDefaultPropertiesFromJS(element2),this.container.append(element2),this.container}}class PushButtonWidgetAnnotationElement extends LinkAnnotationElement{constructor(parameters){ super(parameters,{ignoreBorder:parameters.data.hasAppearance})}render(){const container2=super.render();container2.classList.add("buttonWidgetAnnotation","pushButton");const linkElement=container2.lastChild;return this.enableScripting&&this.hasJSActions&&linkElement&&(this._setDefaultPropertiesFromJS(linkElement),linkElement.addEventListener("updatefromsandbox",jsEvent=>{this._dispatchEventFromSandbox({},jsEvent)})),container2}}class ChoiceWidgetAnnotationElement extends WidgetAnnotationElement{constructor(parameters){ super(parameters,{isRenderable:parameters.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const storage=this.annotationStorage,id2=this.data.id,storedData=storage.getValue(id2,{value:this.data.fieldValue}),selectElement=document.createElement("select");GetElementsByNameSet.add(selectElement),selectElement.setAttribute("data-element-id",id2),selectElement.disabled=this.data.readOnly,this._setRequired(selectElement,this.data.required),selectElement.name=this.data.fieldName, selectElement.tabIndex=0;let addAnEmptyEntry=this.data.combo&&this.data.options.length>0;this.data.combo||(selectElement.size=this.data.options.length,this.data.multiSelect&&(selectElement.multiple=!0)),selectElement.addEventListener("resetform",event2=>{const defaultValue=this.data.defaultFieldValue;for(const option2 of selectElement.options)option2.selected=option2.value===defaultValue});for(const option2 of this.data.options){const optionElement=document.createElement("option");optionElement. textContent=option2.displayValue,optionElement.value=option2.exportValue,storedData.value.includes(option2.exportValue)&&(optionElement.setAttribute("selected",!0),addAnEmptyEntry=!1),selectElement.append(optionElement)}let removeEmptyEntry=null;if(addAnEmptyEntry){const noneOptionElement=document.createElement("option");noneOptionElement.value=" ",noneOptionElement.setAttribute("hidden",!0),noneOptionElement.setAttribute("selected",!0),selectElement.prepend(noneOptionElement),removeEmptyEntry=()=>{ noneOptionElement.remove(),selectElement.removeEventListener("input",removeEmptyEntry),removeEmptyEntry=null},selectElement.addEventListener("input",removeEmptyEntry)}const getValue=isExport=>{const name=isExport?"value":"textContent",{options,multiple}=selectElement;return multiple?Array.prototype.filter.call(options,option2=>option2.selected).map(option2=>option2[name]):options.selectedIndex===-1?null:options[options.selectedIndex][name]};let selectedValues=getValue(!1);const getItems=event2=>{ const options=event2.target.options;return Array.prototype.map.call(options,option2=>({displayValue:option2.textContent,exportValue:option2.value}))};return this.enableScripting&&this.hasJSActions?(selectElement.addEventListener("updatefromsandbox",jsEvent=>{const actions={value(event2){removeEmptyEntry?.();const value=event2.detail.value,values=new Set(Array.isArray(value)?value:[value]);for(const option2 of selectElement.options)option2.selected=values.has(option2.value);storage.setValue(id2,{ value:getValue(!0)}),selectedValues=getValue(!1)},multipleSelection(event2){selectElement.multiple=!0},remove(event2){const options=selectElement.options,index2=event2.detail.remove;options[index2].selected=!1,selectElement.remove(index2),options.length>0&&Array.prototype.findIndex.call(options,option2=>option2.selected)===-1&&(options[0].selected=!0),storage.setValue(id2,{value:getValue(!0),items:getItems(event2)}),selectedValues=getValue(!1)},clear(event2){for(;selectElement.length!==0;)selectElement. remove(0);storage.setValue(id2,{value:null,items:[]}),selectedValues=getValue(!1)},insert(event2){const{index:index2,displayValue,exportValue}=event2.detail.insert,selectChild=selectElement.children[index2],optionElement=document.createElement("option");optionElement.textContent=displayValue,optionElement.value=exportValue,selectChild?selectChild.before(optionElement):selectElement.append(optionElement),storage.setValue(id2,{value:getValue(!0),items:getItems(event2)}),selectedValues=getValue(!1)}, items(event2){const{items:items2}=event2.detail;for(;selectElement.length!==0;)selectElement.remove(0);for(const item of items2){const{displayValue,exportValue}=item,optionElement=document.createElement("option");optionElement.textContent=displayValue,optionElement.value=exportValue,selectElement.append(optionElement)}selectElement.options.length>0&&(selectElement.options[0].selected=!0),storage.setValue(id2,{value:getValue(!0),items:getItems(event2)}),selectedValues=getValue(!1)},indices(event2){ const indices=new Set(event2.detail.indices);for(const option2 of event2.target.options)option2.selected=indices.has(option2.index);storage.setValue(id2,{value:getValue(!0)}),selectedValues=getValue(!1)},editable(event2){event2.target.disabled=!event2.detail.editable}};this._dispatchEventFromSandbox(actions,jsEvent)}),selectElement.addEventListener("input",event2=>{const exportValue=getValue(!0),change=getValue(!1);storage.setValue(id2,{value:exportValue}),event2.preventDefault(),this.linkService. eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:id2,name:"Keystroke",value:selectedValues,change,changeEx:exportValue,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(selectElement,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],event2=>event2.target.value)):selectElement.addEventListener("input",function(event2){storage. setValue(id2,{value:getValue(!0)})}),this.data.combo&&this._setTextStyle(selectElement),this._setBackgroundColor(selectElement),this._setDefaultPropertiesFromJS(selectElement),this.container.append(selectElement),this.container}}class PopupAnnotationElement extends AnnotationElement{constructor(parameters){const{data,elements}=parameters;super(parameters,{isRenderable:AnnotationElement._hasPopupData(data)}),this.elements=elements,this.popup=null}render(){const{container:container2}=this;container2. classList.add("popupAnnotation"),container2.role="comment";const popup=this.popup=new PopupElement({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate||this.data.creationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),elementIds=[];for(const element2 of this.elements)element2.popup=popup,element2. container.ariaHasPopup="dialog",elementIds.push(element2.data.id),element2.addHighlightArea();return this.container.setAttribute("aria-controls",elementIds.map(id2=>`${AnnotationPrefix}${id2}`).join(",")),this.container}}class PopupElement{#boundKeyDown=this.#keyDown.bind(this);#boundHide=this.#hide.bind(this);#boundShow=this.#show.bind(this);#boundToggle=this.#toggle.bind(this);#color=null;#container=null;#contentsObj=null;#dateObj=null;#elements=null;#parent=null;#parentRect=null;#pinned=!1;#popup=null;#popupAbortController=null;#position=null;#rect=null;#richText=null;#titleObj=null;#updates=null;#wasVisible=!1;constructor({ container:container2,color,elements,titleObj,modificationDate,contentsObj,richText,parent,rect,parentRect,open:open2}){this.#container=container2,this.#titleObj=titleObj,this.#contentsObj=contentsObj,this.#richText=richText,this.#parent=parent,this.#color=color,this.#rect=rect,this.#parentRect=parentRect,this.#elements=elements,this.#dateObj=PDFDateString.toDateObject(modificationDate),this.trigger=elements.flatMap(e=>e.getElementsToTriggerPopup()),this.#addEventListeners(),this.#container.hidden= !0,open2&&this.#toggle()}#addEventListeners(){if(this.#popupAbortController)return;this.#popupAbortController=new AbortController;const{signal}=this.#popupAbortController;for(const element2 of this.trigger)element2.addEventListener("click",this.#boundToggle,{signal}),element2.addEventListener("mouseenter",this.#boundShow,{signal}),element2.addEventListener("mouseleave",this.#boundHide,{signal}),element2.classList.add("popupTriggerArea");for(const element2 of this.#elements)element2.container?.addEventListener( "keydown",this.#boundKeyDown,{signal})}render(){if(this.#popup)return;const popup=this.#popup=document.createElement("div");if(popup.className="popup",this.#color){const baseColor=popup.style.outlineColor=Util.makeHexColor(...this.#color);popup.style.backgroundColor=`color-mix(in srgb, ${baseColor} 30%, white)`}const header=document.createElement("span");if(header.className="header",this.#titleObj?.str){const title2=document.createElement("span");title2.className="title",header.append(title2),{dir:title2. dir,str:title2.textContent}=this.#titleObj}if(popup.append(header),this.#dateObj){const modificationDate=document.createElement("time");modificationDate.className="popupDate",modificationDate.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),modificationDate.setAttribute("data-l10n-args",JSON.stringify({dateObj:this.#dateObj.valueOf()})),modificationDate.dateTime=this.#dateObj.toISOString(),header.append(modificationDate)}const html2=this.#html;if(html2)XfaLayer.render({xfaHtml:html2, intent:"richText",div:popup}),popup.lastChild.classList.add("richText","popupContent");else{const contents=this._formatContents(this.#contentsObj);popup.append(contents)}this.#container.append(popup)}get#html(){const richText=this.#richText,contentsObj=this.#contentsObj;return richText?.str&&(!contentsObj?.str||contentsObj.str===richText.str)&&this.#richText.html||null}get#fontSize(){return this.#html?.attributes?.style?.fontSize||0}get#fontColor(){return this.#html?.attributes?.style?.color||null}#makePopupContent(text2){ const popupLines=[],popupContent={str:text2,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:popupLines}]}},lineAttributes={style:{color:this.#fontColor,fontSize:this.#fontSize?`calc(${this.#fontSize}px * var(--total-scale-factor))`:""}};for(const line of text2.split(` `))popupLines.push({name:"span",value:line,attributes:lineAttributes});return popupContent}_formatContents({str,dir}){const p2=document.createElement("p");p2.classList.add("popupContent"),p2.dir=dir;const lines=str.split(/(?:\r\n?|\n)/);for(let i=0,ii=lines.length;i=0&&g.setAttribute("stroke-width",thickness||1),points)for(let i=0,ii=this.#polylines.length;i{evt.key==="Enter"&&(isMac?evt.metaKey:evt. ctrlKey)&&this.#download()}),!data.popupRef&&this.hasPopupData?this._createPopup():trigger.classList.add("popupTriggerArea"),container2.append(trigger),container2}getElementsToTriggerPopup(){return this.#trigger}addHighlightArea(){this.container.classList.add("highlightArea")}#download(){this.downloadManager?.openOrDownloadData(this.content,this.filename)}}class AnnotationLayer{#accessibilityManager=null;#annotationCanvasMap=null;#editableAnnotations=new Map;#structTreeLayer=null;constructor({div, accessibilityManager,annotationCanvasMap,annotationEditorUIManager,page:page2,viewport,structTreeLayer}){this.div=div,this.#accessibilityManager=accessibilityManager,this.#annotationCanvasMap=annotationCanvasMap,this.#structTreeLayer=structTreeLayer||null,this.page=page2,this.viewport=viewport,this.zIndex=0,this._annotationEditorUIManager=annotationEditorUIManager}hasEditableAnnotations(){return this.#editableAnnotations.size>0}async#appendElement(element2,id2,popupElements){const contentElement=element2. firstChild||element2,annotationId=contentElement.id=`${AnnotationPrefix}${id2}`,ariaAttributes=await this.#structTreeLayer?.getAriaAttributes(annotationId);if(ariaAttributes)for(const[key2,value]of ariaAttributes)contentElement.setAttribute(key2,value);popupElements?popupElements.at(-1).container.after(element2):(this.div.append(element2),this.#accessibilityManager?.moveElementInDOM(this.div,element2,contentElement,!1))}async render(params){const{annotations}=params,layer=this.div;setLayerDimensions( layer,this.viewport);const popupToElements=new Map,elementParams={data:null,layer,linkService:params.linkService,downloadManager:params.downloadManager,imageResourcesPath:params.imageResourcesPath||"",renderForms:params.renderForms!==!1,svgFactory:new DOMSVGFactory,annotationStorage:params.annotationStorage||new AnnotationStorage,enableScripting:params.enableScripting===!0,hasJSActions:params.hasJSActions,fieldObjects:params.fieldObjects,parent:this,elements:null};for(const data of annotations){ if(data.noHTML)continue;const isPopupAnnotation=data.annotationType===AnnotationType.POPUP;if(isPopupAnnotation){const elements=popupToElements.get(data.id);if(!elements)continue;elementParams.elements=elements}else if(data.rect[2]===data.rect[0]||data.rect[3]===data.rect[1])continue;elementParams.data=data;const element2=AnnotationElementFactory.create(elementParams);if(!element2.isRenderable)continue;if(!isPopupAnnotation&&data.popupRef){const elements=popupToElements.get(data.popupRef);elements? elements.push(element2):popupToElements.set(data.popupRef,[element2])}const rendered=element2.render();data.hidden&&(rendered.style.visibility="hidden"),await this.#appendElement(rendered,data.id,elementParams.elements),element2._isEditable&&(this.#editableAnnotations.set(element2.data.id,element2),this._annotationEditorUIManager?.renderAnnotationElement(element2))}this.#setAnnotationCanvasMap()}async addLinkAnnotations(annotations,linkService){const elementParams={data:null,layer:this.div,linkService, svgFactory:new DOMSVGFactory,parent:this};for(const data of annotations){data.borderStyle||=AnnotationLayer._defaultBorderStyle,elementParams.data=data;const element2=AnnotationElementFactory.create(elementParams);if(!element2.isRenderable)continue;const rendered=element2.render();await this.#appendElement(rendered,data.id,null)}}update({viewport}){const layer=this.div;this.viewport=viewport,setLayerDimensions(layer,{rotation:viewport.rotation}),this.#setAnnotationCanvasMap(),layer.hidden=!1}#setAnnotationCanvasMap(){ if(!this.#annotationCanvasMap)return;const layer=this.div;for(const[id2,canvas]of this.#annotationCanvasMap){const element2=layer.querySelector(`[data-annotation-id="${id2}"]`);if(!element2)continue;canvas.className="annotationContent";const{firstChild}=element2;firstChild?firstChild.nodeName==="CANVAS"?firstChild.replaceWith(canvas):firstChild.classList.contains("annotationContent")?firstChild.after(canvas):firstChild.before(canvas):element2.append(canvas);const editableAnnotation=this.#editableAnnotations. get(id2);editableAnnotation&&(editableAnnotation._hasNoCanvas?(this._annotationEditorUIManager?.setMissingCanvas(id2,element2.id,canvas),editableAnnotation._hasNoCanvas=!1):editableAnnotation.canvas=canvas)}this.#annotationCanvasMap.clear()}getEditableAnnotations(){return Array.from(this.#editableAnnotations.values())}getEditableAnnotation(id2){return this.#editableAnnotations.get(id2)}static get _defaultBorderStyle(){return shadow(this,"_defaultBorderStyle",Object.freeze({width:1,rawWidth:1,style:AnnotationBorderStyleType. SOLID,dashArray:[3],horizontalCornerRadius:0,verticalCornerRadius:0}))}}const EOL_PATTERN=/\r\n?|\n/g;class FreeTextEditor extends AnnotationEditor{#color;#content="";#editorDivId=`${this.id}-editor`;#editModeAC=null;#fontSize;_colorPicker=null;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){const proto=FreeTextEditor.prototype,arrowChecker=self2=>self2.isEmpty(),small=AnnotationEditorUIManager.TRANSLATE_SMALL, big=AnnotationEditorUIManager.TRANSLATE_BIG;return shadow(this,"_keyboardManager",new KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],proto.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],proto.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],proto._translateEmpty,{args:[-small,0],checker:arrowChecker}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],proto._translateEmpty,{args:[-big,0],checker:arrowChecker}],[["ArrowRight","mac+ArrowRight"],proto._translateEmpty, {args:[small,0],checker:arrowChecker}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],proto._translateEmpty,{args:[big,0],checker:arrowChecker}],[["ArrowUp","mac+ArrowUp"],proto._translateEmpty,{args:[0,-small],checker:arrowChecker}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],proto._translateEmpty,{args:[0,-big],checker:arrowChecker}],[["ArrowDown","mac+ArrowDown"],proto._translateEmpty,{args:[0,small],checker:arrowChecker}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],proto._translateEmpty,{args:[0,big],checker:arrowChecker}]]))}static _type="\ freetext";static _editorType=AnnotationEditorType.FREETEXT;constructor(params){super({...params,name:"freeTextEditor"}),this.#color=params.color||FreeTextEditor._defaultColor||AnnotationEditor._defaultLineColor,this.#fontSize=params.fontSize||FreeTextEditor._defaultFontSize,this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-freetext-added-alert")}static initialize(l10n,uiManager){AnnotationEditor.initialize(l10n,uiManager);const style2=getComputedStyle(document.documentElement);this. _internalPadding=parseFloat(style2.getPropertyValue("--freetext-padding"))}static updateDefaultParams(type2,value){switch(type2){case AnnotationEditorParamsType.FREETEXT_SIZE:FreeTextEditor._defaultFontSize=value;break;case AnnotationEditorParamsType.FREETEXT_COLOR:FreeTextEditor._defaultColor=value;break}}updateParams(type2,value){switch(type2){case AnnotationEditorParamsType.FREETEXT_SIZE:this.#updateFontSize(value);break;case AnnotationEditorParamsType.FREETEXT_COLOR:this.#updateColor(value); break}}static get defaultPropertiesToUpdate(){return[[AnnotationEditorParamsType.FREETEXT_SIZE,FreeTextEditor._defaultFontSize],[AnnotationEditorParamsType.FREETEXT_COLOR,FreeTextEditor._defaultColor||AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[AnnotationEditorParamsType.FREETEXT_SIZE,this.#fontSize],[AnnotationEditorParamsType.FREETEXT_COLOR,this.#color]]}get toolbarButtons(){return this._colorPicker||=new BasicColorPicker(this),[["colorPicker",this._colorPicker]]}get colorType(){ return AnnotationEditorParamsType.FREETEXT_COLOR}get colorValue(){return this.#color}#updateFontSize(fontSize){const setFontsize=size2=>{this.editorDiv.style.fontSize=`calc(${size2}px * var(--total-scale-factor))`,this.translate(0,-(size2-this.#fontSize)*this.parentScale),this.#fontSize=size2,this.#setEditorDimensions()},savedFontsize=this.#fontSize;this.addCommands({cmd:setFontsize.bind(this,fontSize),undo:setFontsize.bind(this,savedFontsize),post:this._uiManager.updateUI.bind(this._uiManager,this), mustExec:!0,type:AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}#updateColor(color){const setColor=col=>{this.#color=this.editorDiv.style.color=col,this._colorPicker?.update(col)},savedColor=this.#color;this.addCommands({cmd:setColor.bind(this,color),undo:setColor.bind(this,savedColor),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(x,y){this._uiManager. translateSelectedEditors(x,y,!0)}getInitialTranslation(){const scale2=this.parentScale;return[-FreeTextEditor._internalPadding*scale2,-(FreeTextEditor._internalPadding+this.#fontSize)*scale2]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(!super.enableEditMode())return!1;this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.#editModeAC= new AbortController;const signal=this._uiManager.combinedSignal(this.#editModeAC);return this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal}),!0}disableEditMode(){ return super.disableEditMode()?(this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#editorDivId),this._isDraggable=!0,this.#editModeAC?.abort(),this.#editModeAC=null,this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"),!0):!1}focusin(event2){this._focusEventsAllowed&&(super.focusin(event2),event2.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(focus2){this.width|| (this.enableEditMode(),focus2&&this.editorDiv.focus(),this._initialOptions?.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}#extractText(){const buffer=[];this.editorDiv.normalize();let prevChild=null;for(const child2 of this.editorDiv.childNodes)prevChild?.nodeType===Node.TEXT_NODE&&child2. nodeName==="BR"||(buffer.push(FreeTextEditor.#getNodeContent(child2)),prevChild=child2);return buffer.join(` `)}#setEditorDimensions(){const[parentWidth,parentHeight]=this.parentDimensions;let rect;if(this.isAttachedToDOM)rect=this.div.getBoundingClientRect();else{const{currentLayer,div}=this,savedDisplay=div.style.display,savedVisibility=div.classList.contains("hidden");div.classList.remove("hidden"),div.style.display="hidden",currentLayer.div.append(this.div),rect=div.getBoundingClientRect(),div.remove(),div.style.display=savedDisplay,div.classList.toggle("hidden",savedVisibility)}this.rotation%180=== this.parentRotation%180?(this.width=rect.width/parentWidth,this.height=rect.height/parentHeight):(this.width=rect.height/parentWidth,this.height=rect.width/parentHeight),this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const savedText=this.#content,newText=this.#content=this.#extractText().trimEnd();if(savedText===newText)return;const setText=text2=>{if(this.#content=text2,!text2){this.remove();return}this.#setContent(),this._uiManager.rebuild( this),this.#setEditorDimensions()};this.addCommands({cmd:()=>{setText(newText)},undo:()=>{setText(savedText)},mustExec:!1}),this.#setEditorDimensions()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}keydown(event2){event2.target===this.div&&event2.key==="Enter"&&(this.enterInEditMode(),event2.preventDefault())}editorDivKeydown(event2){FreeTextEditor._keyboardManager.exec(this,event2)}editorDivFocus(event2){this.isEditing=!0}editorDivBlur(event2){ this.isEditing=!1}editorDivInput(event2){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}get canChangeContent(){return!0}render(){if(this.div)return this.div;let baseX,baseY;(this._isCopy||this.annotationElementId)&&(baseX=this.x,baseY=this.y),super.render(), this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#editorDivId),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:style2}=this.editorDiv;if(style2.fontSize=`calc(${this.#fontSize}px * var(--total-scale-factor))`,style2.color=this.#color,this.div.append(this.editorDiv),this.overlayDiv=document. createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),this._isCopy||this.annotationElementId){const[parentWidth,parentHeight]=this.parentDimensions;if(this.annotationElementId){const{position:position2}=this._initialData;let[tx,ty]=this.getInitialTranslation();[tx,ty]=this.pageTranslationToScreen(tx,ty);const[pageWidth,pageHeight]=this.pageDimensions,[pageX,pageY]=this.pageTranslation;let posX,posY;switch(this.rotation){case 0:posX=baseX+(position2[0]- pageX)/pageWidth,posY=baseY+this.height-(position2[1]-pageY)/pageHeight;break;case 90:posX=baseX+(position2[0]-pageX)/pageWidth,posY=baseY-(position2[1]-pageY)/pageHeight,[tx,ty]=[ty,-tx];break;case 180:posX=baseX-this.width+(position2[0]-pageX)/pageWidth,posY=baseY-(position2[1]-pageY)/pageHeight,[tx,ty]=[-tx,-ty];break;case 270:posX=baseX+(position2[0]-pageX-this.height*pageHeight)/pageWidth,posY=baseY+(position2[1]-pageY-this.width*pageWidth)/pageHeight,[tx,ty]=[-ty,tx];break}this.setAt(posX* parentWidth,posY*parentHeight,tx,ty)}else this._moveAfterPaste(baseX,baseY);this.#setContent(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}static#getNodeContent(node2){return(node2.nodeType===Node.TEXT_NODE?node2.nodeValue:node2.innerText).replaceAll(EOL_PATTERN,"")}editorDivPaste(event2){const clipboardData=event2.clipboardData||window.clipboardData,{types:types2}=clipboardData;if(types2.length===1&&types2[0]=== "text/plain")return;event2.preventDefault();const paste=FreeTextEditor.#deserializeContent(clipboardData.getData("text")||"").replaceAll(EOL_PATTERN,` `);if(!paste)return;const selection=window.getSelection();if(!selection.rangeCount)return;this.editorDiv.normalize(),selection.deleteFromDocument();const range=selection.getRangeAt(0);if(!paste.includes(` `)){range.insertNode(document.createTextNode(paste)),this.editorDiv.normalize(),selection.collapseToStart();return}const{startContainer,startOffset}=range,bufferBefore=[],bufferAfter=[];if(startContainer.nodeType===Node.TEXT_NODE){const parent=startContainer.parentElement;if(bufferAfter.push(startContainer.nodeValue.slice(startOffset).replaceAll(EOL_PATTERN,"")),parent!==this.editorDiv){let buffer=bufferBefore;for(const child2 of this.editorDiv.childNodes){if(child2===parent){buffer=bufferAfter; continue}buffer.push(FreeTextEditor.#getNodeContent(child2))}}bufferBefore.push(startContainer.nodeValue.slice(0,startOffset).replaceAll(EOL_PATTERN,""))}else if(startContainer===this.editorDiv){let buffer=bufferBefore,i=0;for(const child2 of this.editorDiv.childNodes)i++===startOffset&&(buffer=bufferAfter),buffer.push(FreeTextEditor.#getNodeContent(child2))}this.#content=`${bufferBefore.join(` `)}${paste}${bufferAfter.join(` `)}`,this.#setContent();const newRange=new Range;let beforeLength=Math.sumPrecise(bufferBefore.map(line=>line.length));for(const{firstChild}of this.editorDiv.childNodes)if(firstChild.nodeType===Node.TEXT_NODE){const length=firstChild.nodeValue.length;if(beforeLength<=length){newRange.setStart(firstChild,beforeLength),newRange.setEnd(firstChild,beforeLength);break}beforeLength-=length}selection.removeAllRanges(),selection.addRange(newRange)}#setContent(){if(this.editorDiv.replaceChildren(),!!this.#content) for(const line of this.#content.split(` `)){const div=document.createElement("div");div.append(line?document.createTextNode(line):document.createElement("br")),this.editorDiv.append(div)}}#serializeContent(){return this.#content.replaceAll(" "," ")}static#deserializeContent(content2){return content2.replaceAll(" "," ")}get contentDiv(){return this.editorDiv}static async deserialize(data,parent,uiManager){let initialData=null;if(data instanceof FreeTextAnnotationElement){const{data:{defaultAppearanceData:{fontSize,fontColor},rect,rotation, id:id2,popupRef,contentsObj},textContent,textPosition,parent:{page:{pageNumber}}}=data;if(!textContent||textContent.length===0)return null;initialData=data={annotationType:AnnotationEditorType.FREETEXT,color:Array.from(fontColor),fontSize,value:textContent.join(` `),position:textPosition,pageIndex:pageNumber-1,rect:rect.slice(0),rotation,annotationElementId:id2,id:id2,deleted:!1,popupRef,comment:contentsObj?.str||null}}const editor=await super.deserialize(data,parent,uiManager);return editor.#fontSize=data.fontSize,editor.#color=Util.makeHexColor(...data.color),editor.#content=FreeTextEditor.#deserializeContent(data.value),editor._initialData=initialData,data.comment&&editor.setCommentData(data.comment),editor}serialize(isForCopying=!1){if(this.isEmpty()) return null;if(this.deleted)return this.serializeDeleted();const padding=FreeTextEditor._internalPadding*this.parentScale,rect=this.getRect(padding,padding),color=AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.#color),serialized={annotationType:AnnotationEditorType.FREETEXT,color,fontSize:this.#fontSize,value:this.#serializeContent(),pageIndex:this.pageIndex,rect,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return this. addComment(serialized),isForCopying?(serialized.isCopy=!0,serialized):this.annotationElementId&&!this.#hasElementChanged(serialized)?null:(serialized.id=this.annotationElementId,serialized)}#hasElementChanged(serialized){const{value,fontSize,color,pageIndex}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||serialized.value!==value||serialized.fontSize!==fontSize||serialized.color.some((c2,i)=>c2!==color[i])||serialized.pageIndex!==pageIndex}renderAnnotationElement(annotation){ const content2=super.renderAnnotationElement(annotation),{style:style2}=content2;style2.fontSize=`calc(${this.#fontSize}px * var(--total-scale-factor))`,style2.color=this.#color,content2.replaceChildren();for(const line of this.#content.split(` `)){const div=document.createElement("div");div.append(line?document.createTextNode(line):document.createElement("br")),content2.append(div)}const padding=FreeTextEditor._internalPadding*this.parentScale,params={rect:this.getRect(padding,padding)};return params.popup=this.hasEditedComment?this.comment:{text:this.#content},annotation.updateEdited(params),content2}resetAnnotationElement(annotation){super.resetAnnotationElement(annotation),annotation.resetEdited()}}class Outline{static PRECISION=1e-4;toSVGPath(){ unreachable("Abstract method `toSVGPath` must be implemented.")}get box(){unreachable("Abstract getter `box` must be implemented.")}serialize(_bbox,_rotation){unreachable("Abstract method `serialize` must be implemented.")}static _rescale(src,tx,ty,sx,sy,dest){dest||=new Float32Array(src.length);for(let i=0,ii=src.length;i=6;i-=6)isNaN(bottom[i])?buffer.push(`L${bottom[i+4]} ${bottom[i+5]}`):buffer.push(`C${bottom[i]} ${bottom[i+1]} ${bottom[i+2]} ${bottom[i+3]} ${bottom[i+4]} ${bottom[i+5]}`);return this.#toSVGPathStart(buffer),buffer.join(" ")}#toSVGPathTwoPoints(){const[x,y,width,height]=this.#box,[lastTopX,lastTopY,lastBottomX,lastBottomY]=this.#getLastCoords();return`M${(this.#last[2]-x)/width} ${(this.#last[3]-y)/height} L${(this.#last[4]-x)/width} ${(this.#last[5]-y)/height} L${lastTopX}\ ${lastTopY} L${lastBottomX} ${lastBottomY} L${(this.#last[16]-x)/width} ${(this.#last[17]-y)/height} L${(this.#last[14]-x)/width} ${(this.#last[15]-y)/height} Z`}#toSVGPathStart(buffer){const bottom=this.#bottom;buffer.push(`L${bottom[4]} ${bottom[5]} Z`)}#toSVGPathEnd(buffer){const[x,y,width,height]=this.#box,lastTop=this.#last.subarray(4,6),lastBottom=this.#last.subarray(16,18),[lastTopX,lastTopY,lastBottomX,lastBottomY]=this.#getLastCoords();buffer.push(`L${(lastTop[0]-x)/width} ${(lastTop[1]- y)/height} L${lastTopX} ${lastTopY} L${lastBottomX} ${lastBottomY} L${(lastBottom[0]-x)/width} ${(lastBottom[1]-y)/height}`)}newFreeDrawOutline(outline,points,box2,scaleFactor,innerMargin,isLTR){return new FreeDrawOutline(outline,points,box2,scaleFactor,innerMargin,isLTR)}getOutlines(){const top=this.#top,bottom=this.#bottom,last=this.#last,[layerX,layerY,layerWidth,layerHeight]=this.#box,points=new Float32Array((this.#points?.length??0)+2);for(let i=0,ii=points.length-2;i=6;i-=6)for(let j=0;j<6;j+=2){if(isNaN(bottom[i+j])){outline[N]=outline[N+1]=NaN,N+=2;continue}outline[N]=bottom[i+j],outline[N+1]=bottom[i+j+1],N+=2}return this.#getOutlineStart(outline,N),this.newFreeDrawOutline(outline,points,this.#box,this.#scaleFactor,this.#innerMargin,this.#isLTR)}#getOutlineTwoPoints(points){const last=this.#last,[layerX,layerY,layerWidth,layerHeight]=this.#box,[lastTopX,lastTopY,lastBottomX,lastBottomY]=this.#getLastCoords(),outline=new Float32Array(36);return outline. set([NaN,NaN,NaN,NaN,(last[2]-layerX)/layerWidth,(last[3]-layerY)/layerHeight,NaN,NaN,NaN,NaN,(last[4]-layerX)/layerWidth,(last[5]-layerY)/layerHeight,NaN,NaN,NaN,NaN,lastTopX,lastTopY,NaN,NaN,NaN,NaN,lastBottomX,lastBottomY,NaN,NaN,NaN,NaN,(last[16]-layerX)/layerWidth,(last[17]-layerY)/layerHeight,NaN,NaN,NaN,NaN,(last[14]-layerX)/layerWidth,(last[15]-layerY)/layerHeight],0),this.newFreeDrawOutline(outline,points,this.#box,this.#scaleFactor,this.#innerMargin,this.#isLTR)}#getOutlineStart(outline,pos){ const bottom=this.#bottom;return outline.set([NaN,NaN,NaN,NaN,bottom[4],bottom[5]],pos),pos+=6}#getOutlineEnd(outline,pos){const lastTop=this.#last.subarray(4,6),lastBottom=this.#last.subarray(16,18),[layerX,layerY,layerWidth,layerHeight]=this.#box,[lastTopX,lastTopY,lastBottomX,lastBottomY]=this.#getLastCoords();return outline.set([NaN,NaN,NaN,NaN,(lastTop[0]-layerX)/layerWidth,(lastTop[1]-layerY)/layerHeight,NaN,NaN,NaN,NaN,lastTopX,lastTopY,NaN,NaN,NaN,NaN,lastBottomX,lastBottomY,NaN,NaN,NaN, NaN,(lastBottom[0]-layerX)/layerWidth,(lastBottom[1]-layerY)/layerHeight],pos),pos+=24}}class FreeDrawOutline extends Outline{#box;#bbox=new Float32Array(4);#innerMargin;#isLTR;#points;#scaleFactor;#outline;constructor(outline,points,box2,scaleFactor,innerMargin,isLTR){super(),this.#outline=outline,this.#points=points,this.#box=box2,this.#scaleFactor=scaleFactor,this.#innerMargin=innerMargin,this.#isLTR=isLTR,this.lastPoint=[NaN,NaN],this.#computeMinMax(isLTR);const[x,y,width,height]=this.#bbox; for(let i=0,ii=outline.length;ia[0]-b[0]||a[1]-b[1]||a[2]-b[2]);const outlineVerticalEdges=[]; for(const edge of this.#verticalEdges)edge[3]?(outlineVerticalEdges.push(...this.#breakEdge(edge)),this.#insert(edge)):(this.#remove(edge),outlineVerticalEdges.push(...this.#breakEdge(edge)));return this.#getOutlines(outlineVerticalEdges)}#getOutlines(outlineVerticalEdges){const edges=[],allEdges=new Set;for(const edge of outlineVerticalEdges){const[x,y1,y2]=edge;edges.push([x,y1,edge],[x,y2,edge])}edges.sort((a,b)=>a[1]-b[1]||a[0]-b[0]);for(let i=0,ii=edges.length;i0;){const edge=allEdges.values().next().value;let[x,y1,y2,edge1,edge2]=edge;allEdges.delete(edge);let lastPointX=x,lastPointY=y1;for(outline=[x,y2],outlines.push(outline);;){let e;if(allEdges.has(edge1))e=edge1;else if(allEdges.has(edge2))e=edge2;else break;allEdges.delete(e),[x,y1,y2,edge1,edge2]=e,lastPointX!==x&&(outline.push(lastPointX,lastPointY,x, lastPointY===y1?y1:y2),lastPointX=x),lastPointY=lastPointY===y1?y2:y1}outline.push(lastPointX,lastPointY)}return new HighlightOutline(outlines,this.#box,this.#lastPoint)}#binarySearch(y){const array2=this.#intervals;let start2=0,end=array2.length-1;for(;start2<=end;){const middle=start2+end>>1,y1=array2[middle][0];if(y1===y)return middle;y1=0;i--){const[start2,end]=this.#intervals[i];if(start2!==y1)break;if(start2===y1&&end===y2){this.#intervals.splice(i,1);return}}}#breakEdge(edge){const[x,y1,y2]=edge,results=[[x,y1,y2]],index2=this.#binarySearch(y2);for(let i=0;i=start2){if(y4>end)results[j][1]=end;else{if(jj===1)return[];results.splice(j,1),j--,jj--}continue}results[j][2]=start2,y4>end&&results.push([x,end,y4])}}}return results}}class HighlightOutline extends Outline{#box;#outlines;constructor(outlines,box2,lastPoint){super(),this.#outlines=outlines,this.#box=box2,this.lastPoint=lastPoint}toSVGPath(){const buffer=[];for(const polygon of this.#outlines){let[ prevX,prevY]=polygon;buffer.push(`M${prevX} ${prevY}`);for(let i=2;i-1?(this.#isFreeHighlight=!0,this.#createFreeOutlines(params),this.#addToDrawLayer()):this.#boxes&& (this.#anchorNode=params.anchorNode,this.#anchorOffset=params.anchorOffset,this.#focusNode=params.focusNode,this.#focusOffset=params.focusOffset,this.#createOutlines(),this.#addToDrawLayer(),this.rotate(this.rotation)),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-highlight-added-alert")}get telemetryInitialData(){return{action:"added",type:this.#isFreeHighlight?"free_highlight":"highlight",color:this._uiManager.getNonHCMColorName(this.color),thickness:this.#thickness,methodOfCreation:this.#methodOfCreation}}get telemetryFinalData(){ return{type:"highlight",color:this._uiManager.getNonHCMColorName(this.color)}}get commentColor(){return this.color}static computeTelemetryFinalData(data){return{numberOfColors:data.get("color").size}}#createOutlines(){const outliner=new HighlightOutliner(this.#boxes,.001);this.#highlightOutlines=outliner.getOutlines(),[this.x,this.y,this.width,this.height]=this.#highlightOutlines.box;const outlinerForOutline=new HighlightOutliner(this.#boxes,.0025,.001,this._uiManager.direction==="ltr");this.#focusOutlines= outlinerForOutline.getOutlines();const{lastPoint}=this.#focusOutlines;this.#lastPoint=[(lastPoint[0]-this.x)/this.width,(lastPoint[1]-this.y)/this.height]}#createFreeOutlines({highlightOutlines,highlightId,clipPathId}){this.#highlightOutlines=highlightOutlines;const extraThickness=1.5;if(this.#focusOutlines=highlightOutlines.getNewOutline(this.#thickness/2+extraThickness,.0025),highlightId>=0)this.#id=highlightId,this.#clipPathId=clipPathId,this.parent.drawLayer.finalizeDraw(highlightId,{bbox:highlightOutlines. box,path:{d:highlightOutlines.toSVGPath()}}),this.#outlineId=this.parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:!0},bbox:this.#focusOutlines.box,path:{d:this.#focusOutlines.toSVGPath()}},!0);else if(this.parent){const angle=this.parent.viewport.rotation;this.parent.drawLayer.updateProperties(this.#id,{bbox:HighlightEditor.#rotateBbox(this.#highlightOutlines.box,(angle-this.rotation+360)%360),path:{d:highlightOutlines.toSVGPath()}}),this.parent.drawLayer.updateProperties(this.#outlineId, {bbox:HighlightEditor.#rotateBbox(this.#focusOutlines.box,angle),path:{d:this.#focusOutlines.toSVGPath()}})}const[x,y,width,height]=highlightOutlines.box;switch(this.rotation){case 0:this.x=x,this.y=y,this.width=width,this.height=height;break;case 90:{const[pageWidth,pageHeight]=this.parentDimensions;this.x=y,this.y=1-x,this.width=width*pageHeight/pageWidth,this.height=height*pageWidth/pageHeight;break}case 180:this.x=1-x,this.y=1-y,this.width=width,this.height=height;break;case 270:{const[pageWidth, pageHeight]=this.parentDimensions;this.x=1-y,this.y=x,this.width=width*pageHeight/pageWidth,this.height=height*pageWidth/pageHeight;break}}const{lastPoint}=this.#focusOutlines;this.#lastPoint=[(lastPoint[0]-x)/width,(lastPoint[1]-y)/height]}static initialize(l10n,uiManager){AnnotationEditor.initialize(l10n,uiManager),HighlightEditor._defaultColor||=uiManager.highlightColors?.values().next().value||"#fff066"}static updateDefaultParams(type2,value){switch(type2){case AnnotationEditorParamsType.HIGHLIGHT_COLOR: HighlightEditor._defaultColor=value;break;case AnnotationEditorParamsType.HIGHLIGHT_THICKNESS:HighlightEditor._defaultThickness=value;break}}translateInPage(x,y){}get toolbarPosition(){return this.#lastPoint}updateParams(type2,value){switch(type2){case AnnotationEditorParamsType.HIGHLIGHT_COLOR:this.#updateColor(value);break;case AnnotationEditorParamsType.HIGHLIGHT_THICKNESS:this.#updateThickness(value);break}}static get defaultPropertiesToUpdate(){return[[AnnotationEditorParamsType.HIGHLIGHT_COLOR, HighlightEditor._defaultColor],[AnnotationEditorParamsType.HIGHLIGHT_THICKNESS,HighlightEditor._defaultThickness]]}get propertiesToUpdate(){return[[AnnotationEditorParamsType.HIGHLIGHT_COLOR,this.color||HighlightEditor._defaultColor],[AnnotationEditorParamsType.HIGHLIGHT_THICKNESS,this.#thickness||HighlightEditor._defaultThickness],[AnnotationEditorParamsType.HIGHLIGHT_FREE,this.#isFreeHighlight]]}#updateColor(color){const setColorAndOpacity=(col,opa)=>{this.color=col,this.#opacity=opa,this.parent?. drawLayer.updateProperties(this.#id,{root:{fill:col,"fill-opacity":opa}}),this.#colorPicker?.updateColor(col)},savedColor=this.color,savedOpacity=this.#opacity;this.addCommands({cmd:setColorAndOpacity.bind(this,color,HighlightEditor._defaultOpacity),undo:setColorAndOpacity.bind(this,savedColor,savedOpacity),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:AnnotationEditorParamsType.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_\ changed",color:this._uiManager.getNonHCMColorName(color)},!0)}#updateThickness(thickness){const savedThickness=this.#thickness,setThickness=th=>{this.#thickness=th,this.#changeThickness(th)};this.addCommands({cmd:setThickness.bind(this,thickness),undo:setThickness.bind(this,savedThickness),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness}, !0)}get toolbarButtons(){return this._uiManager.highlightColors?[["colorPicker",this.#colorPicker=new ColorPicker({editor:this})]]:super.toolbarButtons}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(this.#getRotation())}getBaseTranslation(){return[0,0]}getRect(tx,ty){return super.getRect(tx,ty,this.#getRotation())}onceAdded(focus2){this. annotationElementId||this.parent.addUndoableEditor(this),focus2&&this.div.focus()}remove(){this.#cleanDrawLayer(),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.#addToDrawLayer(),this.isAttachedToDOM||this.parent.add(this)))}setParent(parent){let mustBeSelected=!1;this.parent&&!parent?this.#cleanDrawLayer():parent&&(this.#addToDrawLayer(parent),mustBeSelected=!this.parent&&this.div?.classList.contains("selectedEditor")),super. setParent(parent),this.show(this._isVisible),mustBeSelected&&this.select()}#changeThickness(thickness){if(!this.#isFreeHighlight)return;this.#createFreeOutlines({highlightOutlines:this.#highlightOutlines.getNewOutline(thickness/2)}),this.fixAndSetPosition();const[parentWidth,parentHeight]=this.parentDimensions;this.setDims(this.width*parentWidth,this.height*parentHeight)}#cleanDrawLayer(){this.#id===null||!this.parent||(this.parent.drawLayer.remove(this.#id),this.#id=null,this.parent.drawLayer.remove( this.#outlineId),this.#outlineId=null)}#addToDrawLayer(parent=this.parent){this.#id===null&&({id:this.#id,clipPathId:this.#clipPathId}=parent.drawLayer.draw({bbox:this.#highlightOutlines.box,root:{viewBox:"0 0 1 1",fill:this.color,"fill-opacity":this.#opacity},rootClass:{highlight:!0,free:this.#isFreeHighlight},path:{d:this.#highlightOutlines.toSVGPath()}},!1,!0),this.#outlineId=parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:this.#isFreeHighlight},bbox:this.#focusOutlines.box, path:{d:this.#focusOutlines.toSVGPath()}},this.#isFreeHighlight),this.#highlightDiv&&(this.#highlightDiv.style.clipPath=this.#clipPathId))}static#rotateBbox([x,y,width,height],angle){switch(angle){case 90:return[1-y-height,x,height,width];case 180:return[1-x-width,1-y-height,width,height];case 270:return[y,1-x-width,height,width]}return[x,y,width,height]}rotate(angle){const{drawLayer}=this.parent;let box2;this.#isFreeHighlight?(angle=(angle-this.rotation+360)%360,box2=HighlightEditor.#rotateBbox( this.#highlightOutlines.box,angle)):box2=HighlightEditor.#rotateBbox([this.x,this.y,this.width,this.height],angle),drawLayer.updateProperties(this.#id,{bbox:box2,root:{"data-main-rotation":angle}}),drawLayer.updateProperties(this.#outlineId,{bbox:HighlightEditor.#rotateBbox(this.#focusOutlines.box,angle),root:{"data-main-rotation":angle}})}render(){if(this.div)return this.div;const div=super.render();this.#text&&(div.setAttribute("aria-label",this.#text),div.setAttribute("role","mark")),this.#isFreeHighlight? div.classList.add("free"):this.div.addEventListener("keydown",this.#keydown.bind(this),{signal:this._uiManager._signal});const highlightDiv=this.#highlightDiv=document.createElement("div");div.append(highlightDiv),highlightDiv.setAttribute("aria-hidden","true"),highlightDiv.className="internal",highlightDiv.style.clipPath=this.#clipPathId;const[parentWidth,parentHeight]=this.parentDimensions;return this.setDims(this.width*parentWidth,this.height*parentHeight),bindEvents(this,this.#highlightDiv,[ "pointerover","pointerleave"]),this.enableEditing(),div}pointerover(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#outlineId,{rootClass:{hovered:!0}})}pointerleave(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#outlineId,{rootClass:{hovered:!1}})}#keydown(event2){HighlightEditor._keyboardManager.exec(this,event2)}_moveCaret(direction){switch(this.parent.unselect(this),direction){case 0:case 2:this.#setCaret(!0);break;case 1:case 3:this.#setCaret(!1);break}}#setCaret(start2){ if(!this.#anchorNode)return;const selection=window.getSelection();start2?selection.setPosition(this.#anchorNode,this.#anchorOffset):selection.setPosition(this.#focusNode,this.#focusOffset)}select(){super.select(),this.#outlineId&&this.parent?.drawLayer.updateProperties(this.#outlineId,{rootClass:{hovered:!1,selected:!0}})}unselect(){super.unselect(),this.#outlineId&&(this.parent?.drawLayer.updateProperties(this.#outlineId,{rootClass:{selected:!1}}),this.#isFreeHighlight||this.#setCaret(!1))}get _mustFixPosition(){ return!this.#isFreeHighlight}show(visible=this._isVisible){super.show(visible),this.parent&&(this.parent.drawLayer.updateProperties(this.#id,{rootClass:{hidden:!visible}}),this.parent.drawLayer.updateProperties(this.#outlineId,{rootClass:{hidden:!visible}}))}#getRotation(){return this.#isFreeHighlight?this.rotation:0}#serializeBoxes(){if(this.#isFreeHighlight)return null;const[pageWidth,pageHeight]=this.pageDimensions,[pageX,pageY]=this.pageTranslation,boxes=this.#boxes,quadPoints=new Float32Array( boxes.length*8);let i=0;for(const{x,y,width,height}of boxes){const sx=x*pageWidth+pageX,sy=(1-y)*pageHeight+pageY;quadPoints[i]=quadPoints[i+4]=sx,quadPoints[i+1]=quadPoints[i+3]=sy,quadPoints[i+2]=quadPoints[i+6]=sx+width*pageWidth,quadPoints[i+5]=quadPoints[i+7]=sy-height*pageHeight,i+=8}return quadPoints}#serializeOutlines(rect){return this.#highlightOutlines.serialize(rect,this.#getRotation())}static startHighlighting(parent,isLTR,{target:textLayer,x,y}){const{x:layerX,y:layerY,width:parentWidth, height:parentHeight}=textLayer.getBoundingClientRect(),ac=new AbortController,signal=parent.combinedSignal(ac),pointerUpCallback=e=>{ac.abort(),this.#endHighlight(parent,e)};window.addEventListener("blur",pointerUpCallback,{signal}),window.addEventListener("pointerup",pointerUpCallback,{signal}),window.addEventListener("pointerdown",stopEvent,{capture:!0,passive:!1,signal}),window.addEventListener("contextmenu",noContextMenu,{signal}),textLayer.addEventListener("pointermove",this.#highlightMove. bind(this,parent),{signal}),this._freeHighlight=new FreeHighlightOutliner({x,y},[layerX,layerY,parentWidth,parentHeight],parent.scale,this._defaultThickness/2,isLTR,.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=parent.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:this._defaultColor,"fill-opacity":this._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:this._freeHighlight.toSVGPath()}},!0,!0)}static#highlightMove(parent,event2){this._freeHighlight.add( event2)&&parent.drawLayer.updateProperties(this._freeHighlightId,{path:{d:this._freeHighlight.toSVGPath()}})}static#endHighlight(parent,event2){this._freeHighlight.isEmpty()?parent.drawLayer.remove(this._freeHighlightId):parent.createAndAddNewEditor(event2,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""}static async deserialize(data,parent,uiManager){ let initialData=null;if(data instanceof HighlightAnnotationElement){const{data:{quadPoints:quadPoints2,rect,rotation,id:id2,color:color2,opacity:opacity2,popupRef,contentsObj},parent:{page:{pageNumber}}}=data;initialData=data={annotationType:AnnotationEditorType.HIGHLIGHT,color:Array.from(color2),opacity:opacity2,quadPoints:quadPoints2,boxes:null,pageIndex:pageNumber-1,rect:rect.slice(0),rotation,annotationElementId:id2,id:id2,deleted:!1,popupRef,comment:contentsObj?.str||null}}else if(data instanceof InkAnnotationElement){const{data:{inkLists:inkLists2,rect,rotation,id:id2,color:color2,borderStyle:{rawWidth:thickness},popupRef,contentsObj},parent:{page:{pageNumber}}}=data;initialData=data={annotationType:AnnotationEditorType.HIGHLIGHT,color:Array.from(color2),thickness,inkLists:inkLists2,boxes:null,pageIndex:pageNumber-1,rect:rect.slice(0),rotation,annotationElementId:id2,id:id2,deleted:!1,popupRef,comment:contentsObj?.str||null}}const{color,quadPoints,inkLists,opacity}=data,editor=await super. deserialize(data,parent,uiManager);editor.color=Util.makeHexColor(...color),editor.#opacity=opacity||1,inkLists&&(editor.#thickness=data.thickness),editor._initialData=initialData,data.comment&&editor.setCommentData(data.comment);const[pageWidth,pageHeight]=editor.pageDimensions,[pageX,pageY]=editor.pageTranslation;if(quadPoints){const boxes=editor.#boxes=[];for(let i=0;ic2!==color[i])}renderAnnotationElement(annotation){const params={rect:this.getRect(0,0)};return this.hasEditedComment&&(params.popup=this.comment),annotation.updateEdited(params),null}static canCreateNewEmptyEditor(){return!1}}class DrawingOptions{#svgProperties=Object.create(null);updateProperty(name,value){ this[name]=value,this.updateSVGProperty(name,value)}updateProperties(properties2){if(properties2)for(const[name,value]of Object.entries(properties2))name.startsWith("_")||this.updateProperty(name,value)}updateSVGProperty(name,value){this.#svgProperties[name]=value}toSVGProperties(){const root2=this.#svgProperties;return this.#svgProperties=Object.create(null),{root:root2}}reset(){this.#svgProperties=Object.create(null)}updateAll(options=this){this.updateProperties(options)}clone(){unreachable("N\ ot implemented")}}class DrawingEditor extends AnnotationEditor{#drawOutlines=null;#mustBeCommitted;_colorPicker=null;_drawId=null;static _currentDrawId=-1;static _currentParent=null;static#currentDraw=null;static#currentDrawingAC=null;static#currentDrawingOptions=null;static#currentPointerId=NaN;static#currentPointerType=null;static#currentPointerIds=null;static#currentMoveTimestamp=NaN;static _INNER_MARGIN=3;constructor(params){super(params),this.#mustBeCommitted=params.mustBeCommitted||!1,this. _addOutlines(params)}_addOutlines(params){params.drawOutlines&&(this.#createDrawOutlines(params),this.#addToDrawLayer())}#createDrawOutlines({drawOutlines,drawId,drawingOptions}){this.#drawOutlines=drawOutlines,this._drawingOptions||=drawingOptions,this.annotationElementId||this._uiManager.a11yAlert(`pdfjs-editor-${this.editorType}-added-alert`),drawId>=0?(this._drawId=drawId,this.parent.drawLayer.finalizeDraw(drawId,drawOutlines.defaultProperties)):this._drawId=this.#createDrawing(drawOutlines, this.parent),this.#updateBbox(drawOutlines.box)}#createDrawing(drawOutlines,parent){const{id:id2}=parent.drawLayer.draw(DrawingEditor._mergeSVGProperties(this._drawingOptions.toSVGProperties(),drawOutlines.defaultSVGProperties),!1,!1);return id2}static _mergeSVGProperties(p1,p2){const p1Keys=new Set(Object.keys(p1));for(const[key2,value]of Object.entries(p2))p1Keys.has(key2)?Object.assign(p1[key2],value):p1[key2]=value;return p1}static getDefaultDrawingOptions(_options){unreachable("Not implemen\ ted")}static get typesMap(){unreachable("Not implemented")}static get isDrawer(){return!0}static get supportMultipleDrawings(){return!1}static updateDefaultParams(type2,value){const propertyName=this.typesMap.get(type2);propertyName&&this._defaultDrawingOptions.updateProperty(propertyName,value),this._currentParent&&(DrawingEditor.#currentDraw.updateProperty(propertyName,value),this._currentParent.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}updateParams(type2,value){ const propertyName=this.constructor.typesMap.get(type2);propertyName&&this._updateProperty(type2,propertyName,value)}static get defaultPropertiesToUpdate(){const properties2=[],options=this._defaultDrawingOptions;for(const[type2,name]of this.typesMap)properties2.push([type2,options[name]]);return properties2}get propertiesToUpdate(){const properties2=[],{_drawingOptions}=this;for(const[type2,name]of this.constructor.typesMap)properties2.push([type2,_drawingOptions[name]]);return properties2}_updateProperty(type2,name,value){ const options=this._drawingOptions,savedValue=options[name],setter=val=>{options.updateProperty(name,val);const bbox=this.#drawOutlines.updateProperty(name,val);bbox&&this.#updateBbox(bbox),this.parent?.drawLayer.updateProperties(this._drawId,options.toSVGProperties()),type2===this.colorType&&this._colorPicker?.update(val)};this.addCommands({cmd:setter.bind(this,value),undo:setter.bind(this,savedValue),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:type2,overwriteIfSameType:!0, keepUndo:!0})}_onResizing(){this.parent?.drawLayer.updateProperties(this._drawId,DrawingEditor._mergeSVGProperties(this.#drawOutlines.getPathResizingSVGProperties(this.#convertToDrawSpace()),{bbox:this.#rotateBox()}))}_onResized(){this.parent?.drawLayer.updateProperties(this._drawId,DrawingEditor._mergeSVGProperties(this.#drawOutlines.getPathResizedSVGProperties(this.#convertToDrawSpace()),{bbox:this.#rotateBox()}))}_onTranslating(_x,_y){this.parent?.drawLayer.updateProperties(this._drawId,{bbox:this.#rotateBox()})}_onTranslated(){ this.parent?.drawLayer.updateProperties(this._drawId,DrawingEditor._mergeSVGProperties(this.#drawOutlines.getPathTranslatedSVGProperties(this.#convertToDrawSpace(),this.parentDimensions),{bbox:this.#rotateBox()}))}_onStartDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!0}})}_onStopDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!1}})}commit(){super.commit(),this.disableEditMode(),this.disableEditing()}disableEditing(){super.disableEditing(), this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}getBaseTranslation(){return[0,0]}get isResizable(){return!0}onceAdded(focus2){this.annotationElementId||this.parent.addUndoableEditor(this),this._isDraggable=!0,this.#mustBeCommitted&&(this.#mustBeCommitted=!1,this.commit(),this.parent.setSelected(this),focus2&&this.isOnScreen&&this.div.focus())}remove(){this.#cleanDrawLayer(),super.remove()}rebuild(){this.parent&&(super.rebuild(), this.div!==null&&(this.#addToDrawLayer(),this.#updateBbox(this.#drawOutlines.box),this.isAttachedToDOM||this.parent.add(this)))}setParent(parent){let mustBeSelected=!1;this.parent&&!parent?(this._uiManager.removeShouldRescale(this),this.#cleanDrawLayer()):parent&&(this._uiManager.addShouldRescale(this),this.#addToDrawLayer(parent),mustBeSelected=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(parent),mustBeSelected&&this.select()}#cleanDrawLayer(){this._drawId===null|| !this.parent||(this.parent.drawLayer.remove(this._drawId),this._drawId=null,this._drawingOptions.reset())}#addToDrawLayer(parent=this.parent){if(!(this._drawId!==null&&this.parent===parent)){if(this._drawId!==null){this.parent.drawLayer.updateParent(this._drawId,parent.drawLayer);return}this._drawingOptions.updateAll(),this._drawId=this.#createDrawing(this.#drawOutlines,parent)}}#convertToParentSpace([x,y,width,height]){const{parentDimensions:[pW,pH],rotation}=this;switch(rotation){case 90:return[ y,1-x,width*(pH/pW),height*(pW/pH)];case 180:return[1-x,1-y,width,height];case 270:return[1-y,x,width*(pH/pW),height*(pW/pH)];default:return[x,y,width,height]}}#convertToDrawSpace(){const{x,y,width,height,parentDimensions:[pW,pH],rotation}=this;switch(rotation){case 90:return[1-y,x,width*(pW/pH),height*(pH/pW)];case 180:return[1-x,1-y,width,height];case 270:return[y,1-x,width*(pW/pH),height*(pH/pW)];default:return[x,y,width,height]}}#updateBbox(bbox){if([this.x,this.y,this.width,this.height]=this.#convertToParentSpace( bbox),this.div){this.fixAndSetPosition();const[parentWidth,parentHeight]=this.parentDimensions;this.setDims(this.width*parentWidth,this.height*parentHeight)}this._onResized()}#rotateBox(){const{x,y,width,height,rotation,parentRotation,parentDimensions:[pW,pH]}=this;switch((rotation*4+parentRotation)/90){case 1:return[1-y-height,x,height,width];case 2:return[1-x-width,1-y-height,width,height];case 3:return[y,1-x-width,height,width];case 4:return[x,y-width*(pW/pH),height*(pH/pW),width*(pW/pH)];case 5: return[1-y,x,width*(pW/pH),height*(pH/pW)];case 6:return[1-x-height*(pH/pW),1-y,height*(pH/pW),width*(pW/pH)];case 7:return[y-width*(pW/pH),1-x-height*(pH/pW),width*(pW/pH),height*(pH/pW)];case 8:return[x-width,y-height,width,height];case 9:return[1-y,x-width,height,width];case 10:return[1-x,1-y,width,height];case 11:return[y-height,1-x,height,width];case 12:return[x-height*(pH/pW),y,height*(pH/pW),width*(pW/pH)];case 13:return[1-y-width*(pW/pH),x-height*(pH/pW),width*(pW/pH),height*(pH/pW)];case 14: return[1-x,1-y-width*(pW/pH),height*(pH/pW),width*(pW/pH)];case 15:return[y,1-x,width*(pW/pH),height*(pH/pW)];default:return[x,y,width,height]}}rotate(){this.parent&&this.parent.drawLayer.updateProperties(this._drawId,DrawingEditor._mergeSVGProperties({bbox:this.#rotateBox()},this.#drawOutlines.updateRotation((this.parentRotation-this.rotation+360)%360)))}onScaleChanging(){this.parent&&this.#updateBbox(this.#drawOutlines.updateParentDimensions(this.parentDimensions,this.parent.scale))}static onScaleChangingWhenDrawing(){}render(){ if(this.div)return this.div;let baseX,baseY;this._isCopy&&(baseX=this.x,baseY=this.y);const div=super.render();div.classList.add("draw");const drawDiv=document.createElement("div");div.append(drawDiv),drawDiv.setAttribute("aria-hidden","true"),drawDiv.className="internal";const[parentWidth,parentHeight]=this.parentDimensions;return this.setDims(this.width*parentWidth,this.height*parentHeight),this._uiManager.addShouldRescale(this),this.disableEditing(),this._isCopy&&this._moveAfterPaste(baseX,baseY), div}static createDrawerInstance(_x,_y,_parentWidth,_parentHeight,_rotation){unreachable("Not implemented")}static startDrawing(parent,uiManager,_isLTR,event2){const{target:target2,offsetX:x,offsetY:y,pointerId,pointerType}=event2;if(DrawingEditor.#currentPointerType&&DrawingEditor.#currentPointerType!==pointerType)return;const{viewport:{rotation}}=parent,{width:parentWidth,height:parentHeight}=target2.getBoundingClientRect(),ac=DrawingEditor.#currentDrawingAC=new AbortController,signal=parent.combinedSignal( ac);if(DrawingEditor.#currentPointerId||=pointerId,DrawingEditor.#currentPointerType??=pointerType,window.addEventListener("pointerup",e=>{DrawingEditor.#currentPointerId===e.pointerId?this._endDraw(e):DrawingEditor.#currentPointerIds?.delete(e.pointerId)},{signal}),window.addEventListener("pointercancel",e=>{DrawingEditor.#currentPointerId===e.pointerId?this._currentParent.endDrawingSession():DrawingEditor.#currentPointerIds?.delete(e.pointerId)},{signal}),window.addEventListener("pointerdown", e=>{DrawingEditor.#currentPointerType===e.pointerType&&((DrawingEditor.#currentPointerIds||=new Set).add(e.pointerId),DrawingEditor.#currentDraw.isCancellable()&&(DrawingEditor.#currentDraw.removeLastElement(),DrawingEditor.#currentDraw.isEmpty()?this._currentParent.endDrawingSession(!0):this._endDraw(null)))},{capture:!0,passive:!1,signal}),window.addEventListener("contextmenu",noContextMenu,{signal}),target2.addEventListener("pointermove",this._drawMove.bind(this),{signal}),target2.addEventListener( "touchmove",e=>{e.timeStamp===DrawingEditor.#currentMoveTimestamp&&stopEvent(e)},{signal}),parent.toggleDrawing(),uiManager._editorUndoBar?.hide(),DrawingEditor.#currentDraw){parent.drawLayer.updateProperties(this._currentDrawId,DrawingEditor.#currentDraw.startNew(x,y,parentWidth,parentHeight,rotation));return}uiManager.updateUIForDefaultProperties(this),DrawingEditor.#currentDraw=this.createDrawerInstance(x,y,parentWidth,parentHeight,rotation),DrawingEditor.#currentDrawingOptions=this.getDefaultDrawingOptions(), this._currentParent=parent,{id:this._currentDrawId}=parent.drawLayer.draw(this._mergeSVGProperties(DrawingEditor.#currentDrawingOptions.toSVGProperties(),DrawingEditor.#currentDraw.defaultSVGProperties),!0,!1)}static _drawMove(event2){if(DrawingEditor.#currentMoveTimestamp=-1,!DrawingEditor.#currentDraw)return;const{offsetX,offsetY,pointerId}=event2;if(DrawingEditor.#currentPointerId===pointerId){if(DrawingEditor.#currentPointerIds?.size>=1){this._endDraw(event2);return}this._currentParent.drawLayer. updateProperties(this._currentDrawId,DrawingEditor.#currentDraw.add(offsetX,offsetY)),DrawingEditor.#currentMoveTimestamp=event2.timeStamp,stopEvent(event2)}}static _cleanup(all2){all2&&(this._currentDrawId=-1,this._currentParent=null,DrawingEditor.#currentDraw=null,DrawingEditor.#currentDrawingOptions=null,DrawingEditor.#currentPointerType=null,DrawingEditor.#currentMoveTimestamp=NaN),DrawingEditor.#currentDrawingAC&&(DrawingEditor.#currentDrawingAC.abort(),DrawingEditor.#currentDrawingAC=null, DrawingEditor.#currentPointerId=NaN,DrawingEditor.#currentPointerIds=null)}static _endDraw(event2){const parent=this._currentParent;if(parent){if(parent.toggleDrawing(!0),this._cleanup(!1),event2?.target===parent.div&&parent.drawLayer.updateProperties(this._currentDrawId,DrawingEditor.#currentDraw.end(event2.offsetX,event2.offsetY)),this.supportMultipleDrawings){const draw=DrawingEditor.#currentDraw,drawId=this._currentDrawId,lastElement=draw.getLastElement();parent.addCommands({cmd:()=>{parent. drawLayer.updateProperties(drawId,draw.setLastElement(lastElement))},undo:()=>{parent.drawLayer.updateProperties(drawId,draw.removeLastElement())},mustExec:!1,type:AnnotationEditorParamsType.DRAW_STEP});return}this.endDrawing(!1)}}static endDrawing(isAborted){const parent=this._currentParent;if(!parent)return null;if(parent.toggleDrawing(!0),parent.cleanUndoStack(AnnotationEditorParamsType.DRAW_STEP),!DrawingEditor.#currentDraw.isEmpty()){const{pageDimensions:[pageWidth,pageHeight],scale:scale2}=parent, editor=parent.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:DrawingEditor.#currentDraw.getOutlines(pageWidth*scale2,pageHeight*scale2,scale2,this._INNER_MARGIN),drawingOptions:DrawingEditor.#currentDrawingOptions,mustBeCommitted:!isAborted});return this._cleanup(!0),editor}return parent.drawLayer.remove(this._currentDrawId),this._cleanup(!0),null}createDrawingOptions(_data){}static deserializeDraw(_pageX,_pageY,_pageWidth,_pageHeight,_innerWidth,_data){unreachable( "Not implemented")}static async deserialize(data,parent,uiManager){const{rawDims:{pageWidth,pageHeight,pageX,pageY}}=parent.viewport,drawOutlines=this.deserializeDraw(pageX,pageY,pageWidth,pageHeight,this._INNER_MARGIN,data),editor=await super.deserialize(data,parent,uiManager);return editor.createDrawingOptions(data),editor.#createDrawOutlines({drawOutlines}),editor.#addToDrawLayer(),editor.onScaleChanging(),editor.rotate(),editor}serializeDraw(isForCopying){const[pageX,pageY]=this.pageTranslation, [pageWidth,pageHeight]=this.pageDimensions;return this.#drawOutlines.serialize([pageX,pageY,pageWidth,pageHeight],isForCopying)}renderAnnotationElement(annotation){return annotation.updateEdited({rect:this.getRect(0,0)}),null}static canCreateNewEmptyEditor(){return!1}}class InkDrawOutliner{#last=new Float64Array(6);#line;#lines;#rotation;#thickness;#points;#lastSVGPath="";#lastIndex=0;#outlines=new InkDrawOutline;#parentWidth;#parentHeight;constructor(x,y,parentWidth,parentHeight,rotation,thickness){ this.#parentWidth=parentWidth,this.#parentHeight=parentHeight,this.#rotation=rotation,this.#thickness=thickness,[x,y]=this.#normalizePoint(x,y);const line=this.#line=[NaN,NaN,NaN,NaN,x,y];this.#points=[x,y],this.#lines=[{line,points:this.#points}],this.#last.set(line,0)}updateProperty(name,value){name==="stroke-width"&&(this.#thickness=value)}#normalizePoint(x,y){return Outline._normalizePoint(x,y,this.#parentWidth,this.#parentHeight,this.#rotation)}isEmpty(){return!this.#lines||this.#lines.length=== 0}isCancellable(){return this.#points.length<=10}add(x,y){[x,y]=this.#normalizePoint(x,y);const[x1,y1,x2,y2]=this.#last.subarray(2,6),diffX=x-x2,diffY=y-y2;return Math.hypot(this.#parentWidth*diffX,this.#parentHeight*diffY)<=2?null:(this.#points.push(x,y),isNaN(x1)?(this.#last.set([x2,y2,x,y],2),this.#line.push(NaN,NaN,NaN,NaN,x,y),{path:{d:this.toSVGPath()}}):(isNaN(this.#last[0])&&this.#line.splice(6,6),this.#last.set([x1,y1,x2,y2,x,y],0),this.#line.push(...Outline.createBezierPoints(x1,y1,x2, y2,x,y)),{path:{d:this.toSVGPath()}}))}end(x,y){const change=this.add(x,y);return change||(this.#points.length===2?{path:{d:this.toSVGPath()}}:null)}startNew(x,y,parentWidth,parentHeight,rotation){this.#parentWidth=parentWidth,this.#parentHeight=parentHeight,this.#rotation=rotation,[x,y]=this.#normalizePoint(x,y);const line=this.#line=[NaN,NaN,NaN,NaN,x,y];this.#points=[x,y];const last=this.#lines.at(-1);return last&&(last.line=new Float32Array(last.line),last.points=new Float32Array(last.points)), this.#lines.push({line,points:this.#points}),this.#last.set(line,0),this.#lastIndex=0,this.toSVGPath(),null}getLastElement(){return this.#lines.at(-1)}setLastElement(element2){return this.#lines?(this.#lines.push(element2),this.#line=element2.line,this.#points=element2.points,this.#lastIndex=0,{path:{d:this.toSVGPath()}}):this.#outlines.setLastElement(element2)}removeLastElement(){if(!this.#lines)return this.#outlines.removeLastElement();this.#lines.pop(),this.#lastSVGPath="";for(let i=0,ii=this.#lines. length;ix??NaN),tx,ty,sx,sy),points:rescaleFn(points[i].map(x=>x??NaN),tx,ty,sx,sy)});const outlines=new this.prototype.constructor;return outlines.build(newLines,pageWidth,pageHeight,1,rotation,thickness,innerMargin), outlines}#getMarginComponents(thickness=this.#thickness){const margin=this.#innerMargin+thickness/2*this.#parentScale;return this.#rotation%180===0?[margin/this.#parentWidth,margin/this.#parentHeight]:[margin/this.#parentHeight,margin/this.#parentWidth]}#getBBoxWithNoMargin(){const[x,y,width,height]=this.#bbox,[marginX,marginY]=this.#getMarginComponents(0);return[x+marginX,y+marginY,width-2*marginX,height-2*marginY]}#computeBbox(){const bbox=this.#bbox=new Float32Array([1/0,1/0,-1/0,-1/0]);for(const{ line}of this.#lines){if(line.length<=12){for(let i=4,ii=line.length;ic2!==color[i])||serialized.thickness!==thickness||serialized.opacity!==opacity||serialized.pageIndex!==pageIndex}renderAnnotationElement(annotation){ const{points,rect}=this.serializeDraw(!1),params={rect,thickness:this._drawingOptions["stroke-width"],points};return this.hasEditedComment&&(params.popup=this.comment),annotation.updateEdited(params),null}}class ContourDrawOutline extends InkDrawOutline{toSVGPath(){let path2=super.toSVGPath();return path2.endsWith("Z")||(path2+="Z"),path2}}const BASE_HEADER_LENGTH=8,POINTS_PROPERTIES_NUMBER=3;class SignatureExtractor{static#PARAMETERS={maxDim:512,sigmaSFactor:.02,sigmaR:25,kernelSize:16};static#neighborIndexToId(i0,j0,i,j){ return i-=i0,j-=j0,i===0?j>0?0:4:i===1?j+6:2-j}static#neighborIdToIndex=new Int32Array([0,1,-1,1,-1,0,-1,-1,0,-1,1,-1,1,0,1,1]);static#clockwiseNonZero(buf,width,i0,j0,i,j,offset2){const id2=this.#neighborIndexToId(i0,j0,i,j);for(let k=0;k<8;k++){const kk=(-k+id2-offset2+16)%8,shiftI=this.#neighborIdToIndex[2*kk],shiftJ=this.#neighborIdToIndex[2*kk+1];if(buf[(i0+shiftI)*width+(j0+shiftJ)]!==0)return kk}return-1}static#counterClockwiseNonZero(buf,width,i0,j0,i,j,offset2){const id2=this.#neighborIndexToId( i0,j0,i,j);for(let k=0;k<8;k++){const kk=(k+id2+offset2+16)%8,shiftI=this.#neighborIdToIndex[2*kk],shiftJ=this.#neighborIdToIndex[2*kk+1];if(buf[(i0+shiftI)*width+(j0+shiftJ)]!==0)return kk}return-1}static#findContours(buf,width,height,threshold){const N=buf.length,types2=new Int32Array(N);for(let i=0;i=1&&types2[ij+1]===0)nbd+=1,j2+=1,pix>1&&(lnbd=pix);else{pix!==1&&(lnbd=Math.abs(pix));continue}const points=[j,i],isHole=j2===j+1,contour={isHole,points,id:nbd,parent:0};contours.push(contour);let contour0;for(const c2 of contours)if(c2.id===lnbd){contour0=c2;break}contour0?contour0.isHole?contour.parent=isHole?contour0. parent:lnbd:contour.parent=isHole?lnbd:contour0.parent:contour.parent=isHole?lnbd:0;const k=this.#clockwiseNonZero(types2,width,i,j,i2,j2,0);if(k===-1){types2[ij]=-nbd,types2[ij]!==1&&(lnbd=Math.abs(types2[ij]));continue}let shiftI=this.#neighborIdToIndex[2*k],shiftJ=this.#neighborIdToIndex[2*k+1];const i1=i+shiftI,j1=j+shiftJ;i2=i1,j2=j1;let i3=i,j3=j;for(;;){const kk=this.#counterClockwiseNonZero(types2,width,i3,j3,i2,j2,1);shiftI=this.#neighborIdToIndex[2*kk],shiftJ=this.#neighborIdToIndex[2* kk+1];const i4=i3+shiftI,j4=j3+shiftJ;points.push(j4,i4);const ij3=i3*width+j3;if(types2[ij3+1]===0?types2[ij3]=-nbd:types2[ij3]===1&&(types2[ij3]=nbd),i4===i&&j4===j&&i3===i1&&j3===j1){types2[ij]!==1&&(lnbd=Math.abs(types2[ij]));break}else i2=i3,j2=j3,i3=i4,j3=j4}}}return contours}static#douglasPeuckerHelper(points,start2,end,output){if(end-start2<=4){for(let i=start2;idmax&&(index2=i,dmax=d2)}dmax>(dist2*partialPhi)** 2?(this.#douglasPeuckerHelper(points,start2,index2+2,output),this.#douglasPeuckerHelper(points,index2,end,output)):output.push(ax,ay)}static#douglasPeucker(points){const output=[],len=points.length;return this.#douglasPeuckerHelper(points,0,len,output),output.push(points[len-2],points[len-1]),output.length<=4?null:output}static#bilateralFilter(buf,width,height,sigmaS,sigmaR,kernelSize){const kernel=new Float32Array(kernelSize**2),sigmaS2=-2*sigmaS**2,halfSize=kernelSize>>1;for(let i=0;i=height))for(let l=0;l=width)continue;const neighbour=buf[y*width+x],w=kernel[k*kernelSize+l]*rangeValues[Math.abs(neighbour-center)];sum+=neighbour*w,norm+=w}}const pix=out[ij]=Math.round(sum/norm);histogram[pix]++}return[out,histogram]}static#getHistogram(buf){const histogram=new Uint32Array(256);for(const g of buf)histogram[g]++;return histogram}static#toUint8(buf){const N=buf.length,out=new Uint8ClampedArray(N>>2);let max2=-1/0,min2=1/0;for(let i=0,ii=out.length;iv!==0);let pos=min2,spos=min2;for(i=min2;i<256;i++){const v=histogram[i];v>M&&(i-pos>L&&(L=i-pos,spos=i-1),M=v,pos=i)}for(i=spos-1;i>=0&&!(histogram[i]>histogram[i+1]);i--);return i}static#getGrayPixels(bitmap){const originalBitmap=bitmap,{width,height}=bitmap, {maxDim}=this.#PARAMETERS;let newWidth=width,newHeight=height;if(width>maxDim||height>maxDim){let prevWidth=width,prevHeight=height,steps=Math.log2(Math.max(width,height)/maxDim);const isteps=Math.floor(steps);steps=steps===isteps?isteps-1:isteps;for(let i=0;i=-128&&maxDiff<=127?bufferType=Int8Array:minDiff>=-32768&&maxDiff<=32767?bufferType=Int16Array:bufferType=Int32Array;const len=outlines.length,headerLength=BASE_HEADER_LENGTH+POINTS_PROPERTIES_NUMBER* len,header=new Uint32Array(headerLength);let offset2=0;header[offset2++]=headerLength*Uint32Array.BYTES_PER_ELEMENT+(outlinesLength-2*len)*bufferType.BYTES_PER_ELEMENT,header[offset2++]=0,header[offset2++]=width,header[offset2++]=height,header[offset2++]=areContours?0:1,header[offset2++]=Math.max(0,Math.floor(thickness??0)),header[offset2++]=len,header[offset2++]=bufferType.BYTES_PER_ELEMENT;for(const points of outlines)header[offset2++]=points.length-2,header[offset2++]=points[0],header[offset2++]= points[1];const cs=new CompressionStream("deflate-raw"),writer=cs.writable.getWriter();await writer.ready,writer.write(header);const BufferCtor=bufferType.prototype.constructor;for(const points of outlines){const diffs=new BufferCtor(points.length-2);for(let i=2,ii=points.length;i{await writer.ready,await writer.close()}).catch(()=>{});let data=null,offset2=0;for await(const chunk of readable)data||=new Uint8Array(new Uint32Array(chunk.buffer,0,4)[0]),data.set(chunk,offset2),offset2+=chunk.length;const header=new Uint32Array(data.buffer,0,data.length>>2),version2=header[1];if(version2!== 0)throw new Error(`Invalid version: ${version2}`);const width=header[2],height=header[3],areContours=header[4]===0,thickness=header[5],numberOfDrawings=header[6],bufferType=header[7],outlines=[],diffsOffset=(BASE_HEADER_LENGTH+POINTS_PROPERTIES_NUMBER*numberOfDrawings)*Uint32Array.BYTES_PER_ELEMENT;let diffs;switch(bufferType){case Int8Array.BYTES_PER_ELEMENT:diffs=new Int8Array(data.buffer,diffsOffset);break;case Int16Array.BYTES_PER_ELEMENT:diffs=new Int16Array(data.buffer,diffsOffset);break;case Int32Array. BYTES_PER_ELEMENT:diffs=new Int32Array(data.buffer,diffsOffset);break}offset2=0;for(let i=0;i{toolbar?.updateEditSignatureButton(description2)}))}getSignaturePreview(){const{newCurves,areContours,thickness,width,height}=this.#signatureData,maxDim=Math.max(width,height),outlineData=SignatureExtractor.processDrawnLines({lines:{curves:newCurves.map(points=>({points})),thickness,width,height},pageWidth:maxDim,pageHeight:maxDim,rotation:0,innerMargin:0,mustSmooth:!1,areContours});return{areContours,outline:outlineData.outline}}get toolbarButtons(){return this._uiManager.signatureManager? [["editSignature",this._uiManager.signatureManager]]:super.toolbarButtons}addSignature(data,heightInPage,description2,uuid2){const{x:savedX,y:savedY}=this,{outline}=this.#signatureData=data;this.#isExtracted=outline instanceof ContourDrawOutline,this.description=description2;let drawingOptions;this.#isExtracted?drawingOptions=SignatureEditor.getDefaultDrawingOptions():(drawingOptions=SignatureEditor._defaultDrawnSignatureOptions.clone(),drawingOptions.updateProperties({"stroke-width":outline.thickness})), this._addOutlines({drawOutlines:outline,drawingOptions});const[parentWidth,parentHeight]=this.parentDimensions,[,pageHeight]=this.pageDimensions;let newHeight=heightInPage/pageHeight;newHeight=newHeight>=1?.5:newHeight,this.width*=newHeight/this.height,this.width>=1&&(newHeight*=.9/this.width,this.width=.9),this.height=newHeight,this.setDims(parentWidth*this.width,parentHeight*this.height),this.x=savedX,this.y=savedY,this.center(),this._onResized(),this.onScaleChanging(),this.rotate(),this._uiManager. addToAnnotationStorage(this),this.setUuid(uuid2),this._reportTelemetry({action:"pdfjs.signature.inserted",data:{hasBeenSaved:!!uuid2,hasDescription:!!description2}}),this.div.hidden=!1}getFromImage(bitmap){const{rawDims:{pageWidth,pageHeight},rotation}=this.parent.viewport;return SignatureExtractor.process(bitmap,pageWidth,pageHeight,rotation,SignatureEditor._INNER_MARGIN)}getFromText(text2,fontInfo){const{rawDims:{pageWidth,pageHeight},rotation}=this.parent.viewport;return SignatureExtractor.extractContoursFromText( text2,fontInfo,pageWidth,pageHeight,rotation,SignatureEditor._INNER_MARGIN)}getDrawnSignature(curves){const{rawDims:{pageWidth,pageHeight},rotation}=this.parent.viewport;return SignatureExtractor.processDrawnLines({lines:curves,pageWidth,pageHeight,rotation,innerMargin:SignatureEditor._INNER_MARGIN,mustSmooth:!1,areContours:!1})}createDrawingOptions({areContours,thickness}){areContours?this._drawingOptions=SignatureEditor.getDefaultDrawingOptions():(this._drawingOptions=SignatureEditor._defaultDrawnSignatureOptions. clone(),this._drawingOptions.updateProperties({"stroke-width":thickness}))}serialize(isForCopying=!1){if(this.isEmpty())return null;const{lines,points,rect}=this.serializeDraw(isForCopying),{_drawingOptions:{"stroke-width":thickness}}=this,serialized={annotationType:AnnotationEditorType.SIGNATURE,isSignature:!0,areContours:this.#isExtracted,color:[0,0,0],thickness:this.#isExtracted?0:thickness,pageIndex:this.pageIndex,rect,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return this. addComment(serialized),isForCopying?(serialized.paths={lines,points},serialized.uuid=this.#signatureUUID,serialized.isCopy=!0):serialized.lines=lines,this.#description&&(serialized.accessibilityData={type:"Figure",alt:this.#description}),serialized}static deserializeDraw(pageX,pageY,pageWidth,pageHeight,innerMargin,data){return data.areContours?ContourDrawOutline.deserialize(pageX,pageY,pageWidth,pageHeight,innerMargin,data):InkDrawOutline.deserialize(pageX,pageY,pageWidth,pageHeight,innerMargin, data)}static async deserialize(data,parent,uiManager){const editor=await super.deserialize(data,parent,uiManager);return editor.#isExtracted=data.areContours,editor.description=data.accessibilityData?.alt||"",editor.#signatureUUID=data.uuid,editor}}class StampEditor extends AnnotationEditor{#bitmap=null;#bitmapId=null;#bitmapPromise=null;#bitmapUrl=null;#bitmapFile=null;#bitmapFileName="";#canvas=null;#missingCanvas=!1;#resizeTimeoutId=null;#isSvg=!1;#hasBeenAddedInUndoStack=!1;static _type="sta\ mp";static _editorType=AnnotationEditorType.STAMP;constructor(params){super({...params,name:"stampEditor"}),this.#bitmapUrl=params.bitmapUrl,this.#bitmapFile=params.bitmapFile,this.defaultL10nId="pdfjs-editor-stamp-editor"}static initialize(l10n,uiManager){AnnotationEditor.initialize(l10n,uiManager)}static isHandlingMimeForPasting(mime){return SupportedImageMimeTypes.includes(mime)}static paste(item,parent){parent.pasteEditor({mode:AnnotationEditorType.STAMP},{bitmapFile:item.getAsFile()})}altTextFinish(){ this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){return{type:"stamp",hasAltText:!!this.altTextData?.altText}}static computeTelemetryFinalData(data){const hasAltTextStats=data.get("hasAltText");return{hasAltText:hasAltTextStats.get(!0)??0,hasNoAltText:hasAltTextStats.get(!1)??0}}#getBitmapFetched(data,fromId=!1){if(!data){this.remove();return}this.#bitmap=data.bitmap,fromId||(this.#bitmapId=data.id,this.#isSvg=data.isSvg),data.file&&(this.#bitmapFileName= data.file.name),this.#createCanvas()}#getBitmapDone(){if(this.#bitmapPromise=null,this._uiManager.enableWaiting(!1),!!this.#canvas){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#bitmap){this.addEditToolbar().then(()=>{this._editToolbar.hide(),this._uiManager.editAltText(this,!0)});return}if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#bitmap){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1, alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}}async mlGuessAltText(imageData=null,updateAltTextData=!0){if(this.hasAltTextData())return null;const{mlManager}=this._uiManager;if(!mlManager)throw new Error("No ML.");if(!await mlManager.isEnabledFor("altText"))throw new Error("ML isn't enabled for alt text.");const{data,width,height}=imageData||this.copyCanvas(null,null,!0).imageData,response=await mlManager.guess({name:"altText",request:{data,width,height,channels:data. length/(width*height)}});if(!response)throw new Error("No response from the AI service.");if(response.error)throw new Error("Error from the AI service.");if(response.cancel)return null;if(!response.output)throw new Error("No valid response from the AI service.");const altText=response.output;return await this.setGuessedAltText(altText),updateAltTextData&&!this.hasAltTextData()&&(this.altTextData={alt:altText,decorative:!1}),altText}#getBitmap(){if(this.#bitmapId){this._uiManager.enableWaiting(!0), this._uiManager.imageManager.getFromId(this.#bitmapId).then(data=>this.#getBitmapFetched(data,!0)).finally(()=>this.#getBitmapDone());return}if(this.#bitmapUrl){const url2=this.#bitmapUrl;this.#bitmapUrl=null,this._uiManager.enableWaiting(!0),this.#bitmapPromise=this._uiManager.imageManager.getFromUrl(url2).then(data=>this.#getBitmapFetched(data)).finally(()=>this.#getBitmapDone());return}if(this.#bitmapFile){const file=this.#bitmapFile;this.#bitmapFile=null,this._uiManager.enableWaiting(!0),this.#bitmapPromise= this._uiManager.imageManager.getFromFile(file).then(data=>this.#getBitmapFetched(data)).finally(()=>this.#getBitmapDone());return}const input=document.createElement("input");input.type="file",input.accept=SupportedImageMimeTypes.join(",");const signal=this._uiManager._signal;this.#bitmapPromise=new Promise(resolve2=>{input.addEventListener("change",async()=>{if(!input.files||input.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const data=await this._uiManager.imageManager. getFromFile(input.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),this.#getBitmapFetched(data)}resolve2()},{signal}),input.addEventListener("cancel",()=>{this.remove(),resolve2()},{signal})}).finally(()=>this.#getBitmapDone()),input.click()}remove(){this.#bitmapId&&(this.#bitmap=null,this._uiManager.imageManager.deleteId(this.#bitmapId),this.#canvas?.remove(),this.#canvas=null,this.#resizeTimeoutId&&(clearTimeout(this.#resizeTimeoutId), this.#resizeTimeoutId=null)),super.remove()}rebuild(){if(!this.parent){this.#bitmapId&&this.#getBitmap();return}super.rebuild(),this.div!==null&&(this.#bitmapId&&this.#canvas===null&&this.#getBitmap(),this.isAttachedToDOM||this.parent.add(this))}onceAdded(focus2){this._isDraggable=!0,focus2&&this.div.focus()}isEmpty(){return!(this.#bitmapPromise||this.#bitmap||this.#bitmapUrl||this.#bitmapFile||this.#bitmapId||this.#missingCanvas)}get toolbarButtons(){return[["altText",this.createAltText()]]}get isResizable(){ return!0}render(){if(this.div)return this.div;let baseX,baseY;return this._isCopy&&(baseX=this.x,baseY=this.y),super.render(),this.div.hidden=!0,this.createAltText(),this.#missingCanvas||(this.#bitmap?this.#createCanvas():this.#getBitmap()),this._isCopy&&this._moveAfterPaste(baseX,baseY),this._uiManager.addShouldRescale(this),this.div}setCanvas(annotationElementId,canvas){const{id:bitmapId,bitmap}=this._uiManager.imageManager.getFromCanvas(annotationElementId,canvas);canvas.remove(),bitmapId&&this. _uiManager.imageManager.isValidId(bitmapId)&&(this.#bitmapId=bitmapId,bitmap&&(this.#bitmap=bitmap),this.#missingCanvas=!1,this.#createCanvas())}_onResized(){this.onScaleChanging()}onScaleChanging(){if(!this.parent)return;this.#resizeTimeoutId!==null&&clearTimeout(this.#resizeTimeoutId);const TIME_TO_WAIT=200;this.#resizeTimeoutId=setTimeout(()=>{this.#resizeTimeoutId=null,this.#drawBitmap()},TIME_TO_WAIT)}#createCanvas(){const{div}=this;let{width,height}=this.#bitmap;const[pageWidth,pageHeight]=this. pageDimensions,MAX_RATIO=.75;if(this.width)width=this.width*pageWidth,height=this.height*pageHeight;else if(width>MAX_RATIO*pageWidth||height>MAX_RATIO*pageHeight){const factor=Math.min(MAX_RATIO*pageWidth/width,MAX_RATIO*pageHeight/height);width*=factor,height*=factor}const[parentWidth,parentHeight]=this.parentDimensions;this.setDims(width*parentWidth/pageWidth,height*parentHeight/pageHeight),this._uiManager.enableWaiting(!1);const canvas=this.#canvas=document.createElement("canvas");canvas.setAttribute( "role","img"),this.addContainer(canvas),this.width=width/pageWidth,this.height=height/pageHeight,this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,(!this._uiManager.useNewAltTextWhenAddingImage||!this._uiManager.useNewAltTextFlow||this.annotationElementId)&&(div.hidden=!1),this.#drawBitmap(),this.#hasBeenAddedInUndoStack||(this.parent.addUndoableEditor(this),this.#hasBeenAddedInUndoStack=!0),this._reportTelemetry({action:"inserted_image"}),this.#bitmapFileName&& this.div.setAttribute("aria-description",this.#bitmapFileName),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-stamp-added-alert")}copyCanvas(maxDataDimension,maxPreviewDimension,createImageData=!1){maxDataDimension||(maxDataDimension=224);const{width:bitmapWidth,height:bitmapHeight}=this.#bitmap,outputScale=new OutputScale;let bitmap=this.#bitmap,width=bitmapWidth,height=bitmapHeight,canvas=null;if(maxPreviewDimension){if(bitmapWidth>maxPreviewDimension||bitmapHeight>maxPreviewDimension){ const ratio=Math.min(maxPreviewDimension/bitmapWidth,maxPreviewDimension/bitmapHeight);width=Math.floor(bitmapWidth*ratio),height=Math.floor(bitmapHeight*ratio)}canvas=document.createElement("canvas");const scaledWidth=canvas.width=Math.ceil(width*outputScale.sx),scaledHeight=canvas.height=Math.ceil(height*outputScale.sy);this.#isSvg||(bitmap=this.#scaleBitmap(scaledWidth,scaledHeight));const ctx=canvas.getContext("2d");ctx.filter=this._uiManager.hcmFilter;let white="white",black="#cfcfd8";this. _uiManager.hcmFilter!=="none"?black="black":window.matchMedia?.("(prefers-color-scheme: dark)").matches&&(white="#8f8f9d",black="#42414d");const boxDim=15,boxDimWidth=boxDim*outputScale.sx,boxDimHeight=boxDim*outputScale.sy,pattern2=new OffscreenCanvas(boxDimWidth*2,boxDimHeight*2),patternCtx=pattern2.getContext("2d");patternCtx.fillStyle=white,patternCtx.fillRect(0,0,boxDimWidth*2,boxDimHeight*2),patternCtx.fillStyle=black,patternCtx.fillRect(0,0,boxDimWidth,boxDimHeight),patternCtx.fillRect(boxDimWidth, boxDimHeight,boxDimWidth,boxDimHeight),ctx.fillStyle=ctx.createPattern(pattern2,"repeat"),ctx.fillRect(0,0,scaledWidth,scaledHeight),ctx.drawImage(bitmap,0,0,bitmap.width,bitmap.height,0,0,scaledWidth,scaledHeight)}let imageData=null;if(createImageData){let dataWidth,dataHeight;if(outputScale.symmetric&&bitmap.widthmaxDataDimension||bitmapHeight>maxDataDimension){ const ratio=Math.min(maxDataDimension/bitmapWidth,maxDataDimension/bitmapHeight);dataWidth=Math.floor(bitmapWidth*ratio),dataHeight=Math.floor(bitmapHeight*ratio),this.#isSvg||(bitmap=this.#scaleBitmap(dataWidth,dataHeight))}const offscreenCtx=new OffscreenCanvas(dataWidth,dataHeight).getContext("2d",{willReadFrequently:!0});offscreenCtx.drawImage(bitmap,0,0,bitmap.width,bitmap.height,0,0,dataWidth,dataHeight),imageData={width:dataWidth,height:dataHeight,data:offscreenCtx.getImageData(0,0,dataWidth, dataHeight).data}}return{canvas,width,height,imageData}}#scaleBitmap(width,height){const{width:bitmapWidth,height:bitmapHeight}=this.#bitmap;let newWidth=bitmapWidth,newHeight=bitmapHeight,bitmap=this.#bitmap;for(;newWidth>2*width||newHeight>2*height;){const prevWidth=newWidth,prevHeight=newHeight;newWidth>2*width&&(newWidth=newWidth>=16384?Math.floor(newWidth/2)-1:Math.ceil(newWidth/2)),newHeight>2*height&&(newHeight=newHeight>=16384?Math.floor(newHeight/2)-1:Math.ceil(newHeight/2));const offscreen=new OffscreenCanvas( newWidth,newHeight);offscreen.getContext("2d").drawImage(bitmap,0,0,prevWidth,prevHeight,0,0,newWidth,newHeight),bitmap=offscreen.transferToImageBitmap()}return bitmap}#drawBitmap(){const[parentWidth,parentHeight]=this.parentDimensions,{width,height}=this,outputScale=new OutputScale,scaledWidth=Math.ceil(width*parentWidth*outputScale.sx),scaledHeight=Math.ceil(height*parentHeight*outputScale.sy),canvas=this.#canvas;if(!canvas||canvas.width===scaledWidth&&canvas.height===scaledHeight)return;canvas. width=scaledWidth,canvas.height=scaledHeight;const bitmap=this.#isSvg?this.#bitmap:this.#scaleBitmap(scaledWidth,scaledHeight),ctx=canvas.getContext("2d");ctx.filter=this._uiManager.hcmFilter,ctx.drawImage(bitmap,0,0,bitmap.width,bitmap.height,0,0,scaledWidth,scaledHeight)}#serializeBitmap(toUrl){if(toUrl){if(this.#isSvg){const url2=this._uiManager.imageManager.getSvgUrl(this.#bitmapId);if(url2)return url2}const canvas=document.createElement("canvas");return{width:canvas.width,height:canvas.height}= this.#bitmap,canvas.getContext("2d").drawImage(this.#bitmap,0,0),canvas.toDataURL()}if(this.#isSvg){const[pageWidth,pageHeight]=this.pageDimensions,width=Math.round(this.width*pageWidth*PixelsPerInch.PDF_TO_CSS_UNITS),height=Math.round(this.height*pageHeight*PixelsPerInch.PDF_TO_CSS_UNITS),offscreen=new OffscreenCanvas(width,height);return offscreen.getContext("2d").drawImage(this.#bitmap,0,0,this.#bitmap.width,this.#bitmap.height,0,0,width,height),offscreen.transferToImageBitmap()}return structuredClone( this.#bitmap)}static async deserialize(data,parent,uiManager){let initialData=null,missingCanvas=!1;if(data instanceof StampAnnotationElement){const{data:{rect:rect2,rotation,id:id2,structParent,popupRef,contentsObj},container:container2,parent:{page:{pageNumber}},canvas}=data;let bitmapId2,bitmap2;canvas?(delete data.canvas,{id:bitmapId2,bitmap:bitmap2}=uiManager.imageManager.getFromCanvas(container2.id,canvas),canvas.remove()):(missingCanvas=!0,data._hasNoCanvas=!0);const altText=(await parent. _structTree.getAriaAttributes(`${AnnotationPrefix}${id2}`))?.get("aria-label")||"";initialData=data={annotationType:AnnotationEditorType.STAMP,bitmapId:bitmapId2,bitmap:bitmap2,pageIndex:pageNumber-1,rect:rect2.slice(0),rotation,annotationElementId:id2,id:id2,deleted:!1,accessibilityData:{decorative:!1,altText},isSvg:!1,structParent,popupRef,comment:contentsObj?.str||null}}const editor=await super.deserialize(data,parent,uiManager),{rect,bitmap,bitmapUrl,bitmapId,isSvg,accessibilityData}=data;missingCanvas? (uiManager.addMissingCanvas(data.id,editor),editor.#missingCanvas=!0):bitmapId&&uiManager.imageManager.isValidId(bitmapId)?(editor.#bitmapId=bitmapId,bitmap&&(editor.#bitmap=bitmap)):editor.#bitmapUrl=bitmapUrl,editor.#isSvg=isSvg;const[parentWidth,parentHeight]=editor.pageDimensions;return editor.width=(rect[2]-rect[0])/parentWidth,editor.height=(rect[3]-rect[1])/parentHeight,accessibilityData&&(editor.altTextData=accessibilityData),editor._initialData=initialData,data.comment&&editor.setCommentData( data.comment),editor.#hasBeenAddedInUndoStack=!!initialData,editor}serialize(isForCopying=!1,context=null){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const serialized={annotationType:AnnotationEditorType.STAMP,bitmapId:this.#bitmapId,pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:this.#isSvg,structTreeParentId:this._structTreeParentId};if(this.addComment(serialized),isForCopying)return serialized.bitmapUrl=this.#serializeBitmap(!0), serialized.accessibilityData=this.serializeAltText(!0),serialized.isCopy=!0,serialized;const{decorative,altText}=this.serializeAltText(!1);if(!decorative&&altText&&(serialized.accessibilityData={type:"Figure",alt:altText}),this.annotationElementId){const changes=this.#hasElementChanged(serialized);if(changes.isSame)return null;changes.isSameAltText?delete serialized.accessibilityData:serialized.accessibilityData.structParent=this._initialData.structParent??-1}if(serialized.id=this.annotationElementId, context===null)return serialized;context.stamps||=new Map;const area=this.#isSvg?(serialized.rect[2]-serialized.rect[0])*(serialized.rect[3]-serialized.rect[1]):null;if(!context.stamps.has(this.#bitmapId))context.stamps.set(this.#bitmapId,{area,serialized}),serialized.bitmap=this.#serializeBitmap(!1);else if(this.#isSvg){const prevData=context.stamps.get(this.#bitmapId);area>prevData.area&&(prevData.area=area,prevData.serialized.bitmap.close(),prevData.serialized.bitmap=this.#serializeBitmap(!1))} return serialized}#hasElementChanged(serialized){const{pageIndex,accessibilityData:{altText}}=this._initialData,isSamePageIndex=serialized.pageIndex===pageIndex,isSameAltText=(serialized.accessibilityData?.alt||"")===altText;return{isSame:!this.hasEditedComment&&!this._hasBeenMoved&&!this._hasBeenResized&&isSamePageIndex&&isSameAltText,isSameAltText}}renderAnnotationElement(annotation){const params={rect:this.getRect(0,0)};return this.hasEditedComment&&(params.popup=this.comment),annotation.updateEdited( params),null}}class AnnotationEditorLayer{#accessibilityManager;#allowClick=!1;#annotationLayer=null;#clickAC=null;#editorFocusTimeoutId=null;#editors=new Map;#hadPointerDown=!1;#isDisabling=!1;#isEnabling=!1;#drawingAC=null;#focusedElement=null;#textLayer=null;#textSelectionAC=null;#textLayerDblClickAC=null;#lastPointerDownTimestamp=-1;#uiManager;static _initialized=!1;static#editorTypes=new Map([FreeTextEditor,InkEditor,StampEditor,HighlightEditor,SignatureEditor].map(type2=>[type2._editorType, type2]));constructor({uiManager,pageIndex,div,structTreeLayer,accessibilityManager,annotationLayer,drawLayer,textLayer,viewport,l10n}){const editorTypes=[...AnnotationEditorLayer.#editorTypes.values()];if(!AnnotationEditorLayer._initialized){AnnotationEditorLayer._initialized=!0;for(const editorType of editorTypes)editorType.initialize(l10n,uiManager)}uiManager.registerEditorTypes(editorTypes),this.#uiManager=uiManager,this.pageIndex=pageIndex,this.div=div,this.#accessibilityManager=accessibilityManager, this.#annotationLayer=annotationLayer,this.viewport=viewport,this.#textLayer=textLayer,this.drawLayer=drawLayer,this._structTree=structTreeLayer,this.#uiManager.addLayer(this)}get isEmpty(){return this.#editors.size===0}get isInvisible(){return this.isEmpty&&this.#uiManager.getMode()===AnnotationEditorType.NONE}updateToolbar(options){this.#uiManager.updateToolbar(options)}updateMode(mode=this.#uiManager.getMode()){switch(this.#cleanup(),mode){case AnnotationEditorType.NONE:this.disableTextSelection(), this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case AnnotationEditorType.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case AnnotationEditorType.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList}=this.div;for(const editorType of AnnotationEditorLayer.#editorTypes. values())classList.toggle(`${editorType._type}Editing`,mode===editorType._editorType);this.div.hidden=!1}hasTextLayer(textLayer){return textLayer===this.#textLayer?.div}setEditingState(isEditing2){this.#uiManager.setEditingState(isEditing2)}addCommands(params){this.#uiManager.addCommands(params)}cleanUndoStack(type2){this.#uiManager.cleanUndoStack(type2)}toggleDrawing(enabled=!1){this.div.classList.toggle("drawing",!enabled)}togglePointerEvents(enabled=!1){this.div.classList.toggle("disabled",!enabled)}toggleAnnotationLayerPointerEvents(enabled=!1){ this.#annotationLayer?.div.classList.toggle("disabled",!enabled)}async enable(){this.#isEnabling=!0,this.div.tabIndex=0,this.togglePointerEvents(!0),this.#textLayerDblClickAC?.abort(),this.#textLayerDblClickAC=null;const annotationElementIds=new Set;for(const editor of this.#editors.values())editor.enableEditing(),editor.show(!0),editor.annotationElementId&&(this.#uiManager.removeChangedExistingAnnotation(editor),annotationElementIds.add(editor.annotationElementId));if(!this.#annotationLayer){this.#isEnabling= !1;return}const editables=this.#annotationLayer.getEditableAnnotations();for(const editable of editables){if(editable.hide(),this.#uiManager.isDeletedAnnotationElement(editable.data.id)||annotationElementIds.has(editable.data.id))continue;const editor=await this.deserialize(editable);editor&&(this.addOrRebuild(editor),editor.enableEditing())}this.#isEnabling=!1}disable(){if(this.#isDisabling=!0,this.div.tabIndex=-1,this.togglePointerEvents(!1),this.#textLayer&&!this.#textLayerDblClickAC){this.#textLayerDblClickAC= new AbortController;const signal=this.#uiManager.combinedSignal(this.#textLayerDblClickAC);this.#textLayer.div.addEventListener("pointerdown",e=>{const{clientX,clientY,timeStamp}=e,lastPointerDownTimestamp=this.#lastPointerDownTimestamp;if(timeStamp-lastPointerDownTimestamp>500){this.#lastPointerDownTimestamp=timeStamp;return}this.#lastPointerDownTimestamp=-1;const{classList:classList2}=this.div;classList2.toggle("getElements",!0);const elements=document.elementsFromPoint(clientX,clientY);if(classList2. toggle("getElements",!1),!this.div.contains(elements[0]))return;let id2;const regex=new RegExp(`^${AnnotationEditorPrefix}[0-9]+$`);for(const element2 of elements)if(regex.test(element2.id)){id2=element2.id;break}if(!id2)return;const editor=this.#editors.get(id2);editor?.annotationElementId===null&&(e.stopPropagation(),e.preventDefault(),editor.dblclick())},{signal,capture:!0})}const changedAnnotations=new Map,resetAnnotations=new Map;for(const editor of this.#editors.values())if(editor.disableEditing(), !!editor.annotationElementId){if(editor.serialize()!==null){changedAnnotations.set(editor.annotationElementId,editor);continue}else resetAnnotations.set(editor.annotationElementId,editor);this.getEditableAnnotation(editor.annotationElementId)?.show(),editor.remove()}if(this.#annotationLayer){const editables=this.#annotationLayer.getEditableAnnotations();for(const editable of editables){const{id:id2}=editable.data;if(this.#uiManager.isDeletedAnnotationElement(id2)){editable.updateEdited({deleted:!0}); continue}let editor=resetAnnotations.get(id2);if(editor){editor.resetAnnotationElement(editable),editor.show(!1),editable.show();continue}editor=changedAnnotations.get(id2),editor&&(this.#uiManager.addChangedExistingAnnotation(editor),editor.renderAnnotationElement(editable)&&editor.show(!1)),editable.show()}}this.#cleanup(),this.isEmpty&&(this.div.hidden=!0);const{classList}=this.div;for(const editorType of AnnotationEditorLayer.#editorTypes.values())classList.remove(`${editorType._type}Editing`); this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),this.#isDisabling=!1}getEditableAnnotation(id2){return this.#annotationLayer?.getEditableAnnotation(id2)||null}setActiveEditor(editor){this.#uiManager.getActive()!==editor&&this.#uiManager.setActiveEditor(editor)}enableTextSelection(){if(this.div.tabIndex=-1,this.#textLayer?.div&&!this.#textSelectionAC){this.#textSelectionAC=new AbortController;const signal=this.#uiManager.combinedSignal(this.#textSelectionAC);this.#textLayer. div.addEventListener("pointerdown",this.#textLayerPointerDown.bind(this),{signal}),this.#textLayer.div.classList.add("highlighting")}}disableTextSelection(){this.div.tabIndex=0,this.#textLayer?.div&&this.#textSelectionAC&&(this.#textSelectionAC.abort(),this.#textSelectionAC=null,this.#textLayer.div.classList.remove("highlighting"))}#textLayerPointerDown(event2){this.#uiManager.unselectAll();const{target:target2}=event2;if(target2===this.#textLayer.div||(target2.getAttribute("role")==="img"||target2. classList.contains("endOfContent"))&&this.#textLayer.div.contains(target2)){const{isMac}=util_FeatureTest.platform;if(event2.button!==0||event2.ctrlKey&&isMac)return;this.#uiManager.showAllEditors("highlight",!0,!0),this.#textLayer.div.classList.add("free"),this.toggleDrawing(),HighlightEditor.startHighlighting(this,this.#uiManager.direction==="ltr",{target:this.#textLayer.div,x:event2.x,y:event2.y}),this.#textLayer.div.addEventListener("pointerup",()=>{this.#textLayer.div.classList.remove("free"), this.toggleDrawing(!0)},{once:!0,signal:this.#uiManager._signal}),event2.preventDefault()}}enableClick(){if(this.#clickAC)return;this.#clickAC=new AbortController;const signal=this.#uiManager.combinedSignal(this.#clickAC);this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal});const pointerup=this.pointerup.bind(this);this.div.addEventListener("pointerup",pointerup,{signal}),this.div.addEventListener("pointercancel",pointerup,{signal})}disableClick(){this.#clickAC?.abort(), this.#clickAC=null}attach(editor){this.#editors.set(editor.id,editor);const{annotationElementId}=editor;annotationElementId&&this.#uiManager.isDeletedAnnotationElement(annotationElementId)&&this.#uiManager.removeDeletedAnnotationElement(editor)}detach(editor){this.#editors.delete(editor.id),this.#accessibilityManager?.removePointerInTextLayer(editor.contentDiv),!this.#isDisabling&&editor.annotationElementId&&this.#uiManager.addDeletedAnnotationElement(editor)}remove(editor){this.detach(editor),this.#uiManager. removeEditor(editor),editor.div.remove(),editor.isAttachedToDOM=!1}changeParent(editor){editor.parent!==this&&(editor.parent&&editor.annotationElementId&&(this.#uiManager.addDeletedAnnotationElement(editor.annotationElementId),AnnotationEditor.deleteAnnotationElement(editor),editor.annotationElementId=null),this.attach(editor),editor.parent?.detach(editor),editor.setParent(this),editor.div&&editor.isAttachedToDOM&&(editor.div.remove(),this.div.append(editor.div)))}add(editor){if(!(editor.parent=== this&&editor.isAttachedToDOM)){if(this.changeParent(editor),this.#uiManager.addEditor(editor),this.attach(editor),!editor.isAttachedToDOM){const div=editor.render();this.div.append(div),editor.isAttachedToDOM=!0}editor.fixAndSetPosition(),editor.onceAdded(!this.#isEnabling),this.#uiManager.addToAnnotationStorage(editor),editor._reportTelemetry(editor.telemetryInitialData)}}moveEditorInDOM(editor){if(!editor.isAttachedToDOM)return;const{activeElement}=document;editor.div.contains(activeElement)&& !this.#editorFocusTimeoutId&&(editor._focusEventsAllowed=!1,this.#editorFocusTimeoutId=setTimeout(()=>{this.#editorFocusTimeoutId=null,editor.div.contains(document.activeElement)?editor._focusEventsAllowed=!0:(editor.div.addEventListener("focusin",()=>{editor._focusEventsAllowed=!0},{once:!0,signal:this.#uiManager._signal}),activeElement.focus())},0)),editor._structTreeParentId=this.#accessibilityManager?.moveElementInDOM(this.div,editor.div,editor.contentDiv,!0)}addOrRebuild(editor){editor.needsToBeRebuilt()? (editor.parent||=this,editor.rebuild(),editor.show()):this.add(editor)}addUndoableEditor(editor){const cmd=()=>editor._uiManager.rebuild(editor),undo=()=>{editor.remove()};this.addCommands({cmd,undo,mustExec:!1})}getNextId(){return this.#uiManager.getId()}get#currentEditorType(){return AnnotationEditorLayer.#editorTypes.get(this.#uiManager.getMode())}combinedSignal(ac){return this.#uiManager.combinedSignal(ac)}#createNewEditor(params){const editorType=this.#currentEditorType;return editorType?new editorType. prototype.constructor(params):null}canCreateNewEmptyEditor(){return this.#currentEditorType?.canCreateNewEmptyEditor()}async pasteEditor(options,params){this.updateToolbar(options),await this.#uiManager.updateMode(options.mode);const{offsetX,offsetY}=this.#getCenterPoint(),id2=this.getNextId(),editor=this.#createNewEditor({parent:this,id:id2,x:offsetX,y:offsetY,uiManager:this.#uiManager,isCentered:!0,...params});editor&&this.add(editor)}async deserialize(data){return await AnnotationEditorLayer.#editorTypes. get(data.annotationType??data.annotationEditorType)?.deserialize(data,this,this.#uiManager)||null}createAndAddNewEditor(event2,isCentered,data={}){const id2=this.getNextId(),editor=this.#createNewEditor({parent:this,id:id2,x:event2.offsetX,y:event2.offsetY,uiManager:this.#uiManager,isCentered,...data});return editor&&this.add(editor),editor}#getCenterPoint(){const{x,y,width,height}=this.div.getBoundingClientRect(),tlX=Math.max(0,x),tlY=Math.max(0,y),brX=Math.min(window.innerWidth,x+width),brY=Math. min(window.innerHeight,y+height),centerX=(tlX+brX)/2-x,centerY=(tlY+brY)/2-y,[offsetX,offsetY]=this.viewport.rotation%180===0?[centerX,centerY]:[centerY,centerX];return{offsetX,offsetY}}addNewEditor(data={}){this.createAndAddNewEditor(this.#getCenterPoint(),!0,data)}setSelected(editor){this.#uiManager.setSelected(editor)}toggleSelected(editor){this.#uiManager.toggleSelected(editor)}unselect(editor){this.#uiManager.unselect(editor)}pointerup(event2){const{isMac}=util_FeatureTest.platform;if(event2. button!==0||event2.ctrlKey&&isMac||event2.target!==this.div||!this.#hadPointerDown||(this.#hadPointerDown=!1,this.#currentEditorType?.isDrawer&&this.#currentEditorType.supportMultipleDrawings))return;if(!this.#allowClick){this.#allowClick=!0;return}const currentMode=this.#uiManager.getMode();if(currentMode===AnnotationEditorType.STAMP||currentMode===AnnotationEditorType.SIGNATURE){this.#uiManager.unselectAll();return}this.createAndAddNewEditor(event2,!1)}pointerdown(event2){if(this.#uiManager.getMode()=== AnnotationEditorType.HIGHLIGHT&&this.enableTextSelection(),this.#hadPointerDown){this.#hadPointerDown=!1;return}const{isMac}=util_FeatureTest.platform;if(event2.button!==0||event2.ctrlKey&&isMac||event2.target!==this.div)return;if(this.#hadPointerDown=!0,this.#currentEditorType?.isDrawer){this.startDrawingSession(event2);return}const editor=this.#uiManager.getActive();this.#allowClick=!editor||editor.isEmpty()}startDrawingSession(event2){if(this.div.focus({preventScroll:!0}),this.#drawingAC){this.#currentEditorType. startDrawing(this,this.#uiManager,!1,event2);return}this.#uiManager.setCurrentDrawingSession(this),this.#drawingAC=new AbortController;const signal=this.#uiManager.combinedSignal(this.#drawingAC);this.div.addEventListener("blur",({relatedTarget})=>{relatedTarget&&!this.div.contains(relatedTarget)&&(this.#focusedElement=null,this.commitOrRemove())},{signal}),this.#currentEditorType.startDrawing(this,this.#uiManager,!1,event2)}pause(on2){if(on2){const{activeElement}=document;this.div.contains(activeElement)&& (this.#focusedElement=activeElement);return}this.#focusedElement&&setTimeout(()=>{this.#focusedElement?.focus(),this.#focusedElement=null},0)}endDrawingSession(isAborted=!1){return this.#drawingAC?(this.#uiManager.setCurrentDrawingSession(null),this.#drawingAC.abort(),this.#drawingAC=null,this.#focusedElement=null,this.#currentEditorType.endDrawing(isAborted)):null}findNewParent(editor,x,y){const layer=this.#uiManager.findParent(x,y);return layer===null||layer===this?!1:(layer.changeParent(editor), !0)}commitOrRemove(){return this.#drawingAC?(this.endDrawingSession(),!0):!1}onScaleChanging(){this.#drawingAC&&this.#currentEditorType.onScaleChangingWhenDrawing(this)}destroy(){this.commitOrRemove(),this.#uiManager.getActive()?.parent===this&&(this.#uiManager.commitOrRemove(),this.#uiManager.setActiveEditor(null)),this.#editorFocusTimeoutId&&(clearTimeout(this.#editorFocusTimeoutId),this.#editorFocusTimeoutId=null);for(const editor of this.#editors.values())this.#accessibilityManager?.removePointerInTextLayer( editor.contentDiv),editor.setParent(null),editor.isAttachedToDOM=!1,editor.div.remove();this.div=null,this.#editors.clear(),this.#uiManager.removeLayer(this)}#cleanup(){for(const editor of this.#editors.values())editor.isEmpty()&&editor.remove()}render({viewport}){this.viewport=viewport,setLayerDimensions(this.div,viewport);for(const editor of this.#uiManager.getEditors(this.pageIndex))this.add(editor),editor.rebuild();this.updateMode()}update({viewport}){this.#uiManager.commitOrRemove(),this.#cleanup(); const oldRotation=this.viewport.rotation,rotation=viewport.rotation;if(this.viewport=viewport,setLayerDimensions(this.div,{rotation}),oldRotation!==rotation)for(const editor of this.#editors.values())editor.rotate(rotation)}get pageDimensions(){const{pageWidth,pageHeight}=this.viewport.rawDims;return[pageWidth,pageHeight]}get scale(){return this.#uiManager.viewParameters.realScale}}class DrawLayer{#parent=null;#mapping=new Map;#toUpdate=new Map;static#id=0;constructor({pageIndex}){this.pageIndex= pageIndex}setParent(parent){if(!this.#parent){this.#parent=parent;return}if(this.#parent!==parent){if(this.#mapping.size>0)for(const root2 of this.#mapping.values())root2.remove(),parent.append(root2);this.#parent=parent}}static get _svgFactory(){return shadow(this,"_svgFactory",new DOMSVGFactory)}static#setBox(element2,[x,y,width,height]){const{style:style2}=element2;style2.top=`${100*y}%`,style2.left=`${100*x}%`,style2.width=`${100*width}%`,style2.height=`${100*height}%`}#createSVG(){const svg2=DrawLayer. _svgFactory.create(1,1,!0);return this.#parent.append(svg2),svg2.setAttribute("aria-hidden",!0),svg2}#createClipPath(defs,pathId){const clipPath=DrawLayer._svgFactory.createElement("clipPath");defs.append(clipPath);const clipPathId=`clip_${pathId}`;clipPath.setAttribute("id",clipPathId),clipPath.setAttribute("clipPathUnits","objectBoundingBox");const clipPathUse=DrawLayer._svgFactory.createElement("use");return clipPath.append(clipPathUse),clipPathUse.setAttribute("href",`#${pathId}`),clipPathUse. classList.add("clip"),clipPathId}#updateProperties(element2,properties2){for(const[key2,value]of Object.entries(properties2))value===null?element2.removeAttribute(key2):element2.setAttribute(key2,value)}draw(properties2,isPathUpdatable=!1,hasClip=!1){const id2=DrawLayer.#id++,root2=this.#createSVG(),defs=DrawLayer._svgFactory.createElement("defs");root2.append(defs);const path2=DrawLayer._svgFactory.createElement("path");defs.append(path2);const pathId=`path_p${this.pageIndex}_${id2}`;path2.setAttribute( "id",pathId),path2.setAttribute("vector-effect","non-scaling-stroke"),isPathUpdatable&&this.#toUpdate.set(id2,path2);const clipPathId=hasClip?this.#createClipPath(defs,pathId):null,use=DrawLayer._svgFactory.createElement("use");return root2.append(use),use.setAttribute("href",`#${pathId}`),this.updateProperties(root2,properties2),this.#mapping.set(id2,root2),{id:id2,clipPathId:`url(#${clipPathId})`}}drawOutline(properties2,mustRemoveSelfIntersections){const id2=DrawLayer.#id++,root2=this.#createSVG(), defs=DrawLayer._svgFactory.createElement("defs");root2.append(defs);const path2=DrawLayer._svgFactory.createElement("path");defs.append(path2);const pathId=`path_p${this.pageIndex}_${id2}`;path2.setAttribute("id",pathId),path2.setAttribute("vector-effect","non-scaling-stroke");let maskId;if(mustRemoveSelfIntersections){const mask=DrawLayer._svgFactory.createElement("mask");defs.append(mask),maskId=`mask_p${this.pageIndex}_${id2}`,mask.setAttribute("id",maskId),mask.setAttribute("maskUnits","obje\ ctBoundingBox");const rect=DrawLayer._svgFactory.createElement("rect");mask.append(rect),rect.setAttribute("width","1"),rect.setAttribute("height","1"),rect.setAttribute("fill","white");const use=DrawLayer._svgFactory.createElement("use");mask.append(use),use.setAttribute("href",`#${pathId}`),use.setAttribute("stroke","none"),use.setAttribute("fill","black"),use.setAttribute("fill-rule","nonzero"),use.classList.add("mask")}const use1=DrawLayer._svgFactory.createElement("use");root2.append(use1), use1.setAttribute("href",`#${pathId}`),maskId&&use1.setAttribute("mask",`url(#${maskId})`);const use2=use1.cloneNode();return root2.append(use2),use1.classList.add("mainOutline"),use2.classList.add("secondaryOutline"),this.updateProperties(root2,properties2),this.#mapping.set(id2,root2),id2}finalizeDraw(id2,properties2){this.#toUpdate.delete(id2),this.updateProperties(id2,properties2)}updateProperties(elementOrId,properties2){if(!properties2)return;const{root:root2,bbox,rootClass,path:path2}=properties2, element2=typeof elementOrId=="number"?this.#mapping.get(elementOrId):elementOrId;if(element2){if(root2&&this.#updateProperties(element2,root2),bbox&&DrawLayer.#setBox(element2,bbox),rootClass){const{classList}=element2;for(const[className,value]of Object.entries(rootClass))classList.toggle(className,value)}if(path2){const pathElement=element2.firstChild.firstChild;this.#updateProperties(pathElement,path2)}}}updateParent(id2,layer){if(layer===this)return;const root2=this.#mapping.get(id2);root2&& (layer.#parent.append(root2),this.#mapping.delete(id2),layer.#mapping.set(id2,root2))}remove(id2){this.#toUpdate.delete(id2),this.#parent!==null&&(this.#mapping.get(id2).remove(),this.#mapping.delete(id2))}destroy(){this.#parent=null;for(const root2 of this.#mapping.values())root2.remove();this.#mapping.clear(),this.#toUpdate.clear()}}globalThis._pdfjsTestingUtils={HighlightOutliner};globalThis.pdfjsLib={AbortException,AnnotationEditorLayer,AnnotationEditorParamsType,AnnotationEditorType,AnnotationEditorUIManager, AnnotationLayer,AnnotationMode,AnnotationType,build,ColorPicker,createValidAbsoluteUrl,DOMSVGFactory,DrawLayer,FeatureTest:util_FeatureTest,fetchData,getDocument,getFilenameFromUrl,getPdfFilenameFromUrl,getRGB,getUuid,getXfaPageViewport,GlobalWorkerOptions,ImageKind:util_ImageKind,InvalidPDFException,isDataScheme,isPdfFile,isValidExplicitDest,MathClamp,noContextMenu,normalizeUnicode,OPS,OutputScale,PasswordResponses,PDFDataRangeTransport,PDFDateString,PDFWorker,PermissionFlag,PixelsPerInch,RenderingCancelledException, ResponseException,setLayerDimensions,shadow,SignatureExtractor,stopEvent,SupportedImageMimeTypes,TextLayer,TouchManager,updateUrlHash,Util,VerbosityLevel,version:version$1,XfaLayer};__vitePreload(()=>Promise.resolve().then(()=>pdf_worker_min$1),[],import.meta.url).then(workerModule=>{const workerBlob=new Blob([workerModule.default],{type:"application/javascript"});GlobalWorkerOptions.workerSrc=URL.createObjectURL(workerBlob)}).catch(()=>{console.warn("Failed to load PDF.js worker, \ PDF processing may not work")});async function getFileAsBuffer(file){return new Promise((resolve2,reject)=>{const reader=new FileReader;reader.onload=event2=>{event2.target?.result?resolve2(event2.target.result):reject(new Error("Failed to read file."))},reader.onerror=()=>{reject(new Error("Failed to read file."))},reader.readAsArrayBuffer(file)})}async function convertPDFToText(file){try{const buffer=await getFileAsBuffer(file),pdf=await getDocument(buffer).promise,numPages=pdf.numPages,textContentPromises=[]; for(let i=1;i<=numPages;i++)textContentPromises.push(pdf.getPage(i).then(page2=>page2.getTextContent()));return(await Promise.all(textContentPromises)).flatMap(textContent=>textContent.items.map(item=>item.str??"")).join(` `)}catch(error2){throw console.error("Error converting PDF to text:",error2),new Error(`Failed to convert PDF to text: ${error2 instanceof Error?error2.message:"Unknown error"}`)}}async function convertPDFToImage(file,scale2=1.5){try{const buffer=await getFileAsBuffer(file),doc=await getDocument(buffer).promise,pages=[];for(let i=1;i<=doc.numPages;i++){const page2=await doc.getPage(i),viewport=page2.getViewport({scale:scale2}),canvas=document.createElement("canvas"),ctx=canvas.getContext("2d");if(canvas. width=viewport.width,canvas.height=viewport.height,!ctx)throw new Error("Failed to get 2D context from canvas");const task=page2.render({canvasContext:ctx,viewport,canvas});pages.push(task.promise.then(()=>canvas.toDataURL(MimeTypeImage.PNG)))}return await Promise.all(pages)}catch(error2){throw console.error("Error converting PDF to images:",error2),new Error(`Failed to convert PDF to images: ${error2 instanceof Error?error2.message:"Unknown error"}`)}}function svgBase64UrlToPngDataURL(base64UrlSvg,backgroundColor="\ white"){return new Promise((resolve2,reject)=>{try{const img=new Image;img.onload=()=>{const canvas=document.createElement("canvas"),ctx=canvas.getContext("2d");if(!ctx){reject(new Error("Failed to get 2D canvas context."));return}const targetWidth=img.naturalWidth||300,targetHeight=img.naturalHeight||300;canvas.width=targetWidth,canvas.height=targetHeight,backgroundColor&&(ctx.fillStyle=backgroundColor,ctx.fillRect(0,0,canvas.width,canvas.height)),ctx.drawImage(img,0,0,targetWidth,targetHeight), resolve2(canvas.toDataURL(MimeTypeImage.PNG))},img.onerror=()=>{reject(new Error("Failed to load SVG image. Ensure the SVG data is valid."))},img.src=base64UrlSvg}catch(error2){const errorMessage=`Error converting SVG to PNG: ${error2 instanceof Error?error2.message:String(error2)}`;console.error(errorMessage,error2),reject(new Error(errorMessage))}})}function isSvgMimeType(mimeType){return mimeType===MimeTypeImage.SVG}function webpBase64UrlToPngDataURL(base64UrlWebp,backgroundColor="white"){return new Promise( (resolve2,reject)=>{try{const img=new Image;img.onload=()=>{const canvas=document.createElement("canvas"),ctx=canvas.getContext("2d");if(!ctx){reject(new Error("Failed to get 2D canvas context."));return}const targetWidth=img.naturalWidth||300,targetHeight=img.naturalHeight||300;canvas.width=targetWidth,canvas.height=targetHeight,backgroundColor&&(ctx.fillStyle=backgroundColor,ctx.fillRect(0,0,canvas.width,canvas.height)),ctx.drawImage(img,0,0,targetWidth,targetHeight),resolve2(canvas.toDataURL( MimeTypeImage.PNG))},img.onerror=()=>{reject(new Error("Failed to load WebP image. Ensure the WebP data is valid."))},img.src=base64UrlWebp}catch(error2){const errorMessage=`Error converting WebP to PNG: ${error2 instanceof Error?error2.message:String(error2)}`;console.error(errorMessage,error2),reject(new Error(errorMessage))}})}function isWebpMimeType(mimeType){return mimeType===MimeTypeImage.WEBP}class ChatService{static async sendMessage(messages,options={},conversationId,signal){const{stream, onChunk,onComplete,onError,onReasoningChunk,onToolCallChunk,onModel,onTimings,tools,temperature,max_tokens,dynatemp_range,dynatemp_exponent,top_k,top_p,min_p,xtc_probability,xtc_threshold,typ_p,repeat_last_n,repeat_penalty,presence_penalty,frequency_penalty,dry_multiplier,dry_base,dry_allowed_length,dry_penalty_last_n,samplers,backend_sampling,custom:custom2,timings_per_token,disableReasoningParsing,excludeReasoningFromContext}=options,normalizedMessages=messages.map(msg=>{if("id"in msg&&"convId"in msg&&"timestamp"in msg){const dbMsg=msg;return ChatService.convertDbMessageToApiChatMessageData(dbMsg)}else return msg}).filter(msg=>msg.role===MessageRole.SYSTEM?(typeof msg.content=="string"?msg.content:"").trim().length>0:!0);options.model&&!modelsStore.modelSupportsVision(options.model)&&normalizedMessages.forEach(msg=>{Array.isArray(msg.content)&&(msg.content=msg.content.filter(part=>part.type===ContentPartType.IMAGE_URL?(console.info(`[ChatService] Skipping image attachment in message hist\ ory (model "${options.model}" does not support vision)`),!1):!0),msg.content.length===1&&msg.content[0].type===ContentPartType.TEXT&&(msg.content=msg.content[0].text))});const requestBody={messages:normalizedMessages.map(msg=>{const mapped={role:msg.role,content:msg.content,tool_calls:msg.tool_calls,tool_call_id:msg.tool_call_id};return!excludeReasoningFromContext&&msg.reasoning_content&&(mapped.reasoning_content=msg.reasoning_content),mapped}),stream,return_progress:stream?!0:void 0,tools:tools&& tools.length>0?tools:void 0};if(options.model&&(requestBody.model=options.model),requestBody.reasoning_format=disableReasoningParsing?ReasoningFormat.NONE:ReasoningFormat.AUTO,temperature!==void 0&&(requestBody.temperature=temperature),max_tokens!==void 0&&(requestBody.max_tokens=max_tokens!==null&&max_tokens!==0?max_tokens:-1),dynatemp_range!==void 0&&(requestBody.dynatemp_range=dynatemp_range),dynatemp_exponent!==void 0&&(requestBody.dynatemp_exponent=dynatemp_exponent),top_k!==void 0&&(requestBody. top_k=top_k),top_p!==void 0&&(requestBody.top_p=top_p),min_p!==void 0&&(requestBody.min_p=min_p),xtc_probability!==void 0&&(requestBody.xtc_probability=xtc_probability),xtc_threshold!==void 0&&(requestBody.xtc_threshold=xtc_threshold),typ_p!==void 0&&(requestBody.typ_p=typ_p),repeat_last_n!==void 0&&(requestBody.repeat_last_n=repeat_last_n),repeat_penalty!==void 0&&(requestBody.repeat_penalty=repeat_penalty),presence_penalty!==void 0&&(requestBody.presence_penalty=presence_penalty),frequency_penalty!== void 0&&(requestBody.frequency_penalty=frequency_penalty),dry_multiplier!==void 0&&(requestBody.dry_multiplier=dry_multiplier),dry_base!==void 0&&(requestBody.dry_base=dry_base),dry_allowed_length!==void 0&&(requestBody.dry_allowed_length=dry_allowed_length),dry_penalty_last_n!==void 0&&(requestBody.dry_penalty_last_n=dry_penalty_last_n),samplers!==void 0&&(requestBody.samplers=typeof samplers=="string"?samplers.split(";").filter(s2=>s2.trim()):samplers),backend_sampling!==void 0&&(requestBody.backend_sampling= backend_sampling),timings_per_token!==void 0&&(requestBody.timings_per_token=timings_per_token),custom2)try{const customParams=typeof custom2=="string"?JSON.parse(custom2):custom2;Object.assign(requestBody,customParams)}catch(error2){console.warn("Failed to parse custom parameters:",error2)}try{const response=await fetch("./v1/chat/completions",{method:"POST",headers:getJsonHeaders(),body:JSON.stringify(requestBody),signal});if(!response.ok){const error2=await ChatService.parseErrorResponse(response); throw onError&&onError(error2),error2}if(stream){await ChatService.handleStreamResponse(response,onChunk,onComplete,onError,onReasoningChunk,onToolCallChunk,onModel,onTimings,conversationId,signal);return}else return ChatService.handleNonStreamResponse(response,onComplete,onError,onToolCallChunk,onModel)}catch(error2){if(isAbortError(error2)){console.log("Chat completion request was aborted");return}let userFriendlyError;throw error2 instanceof Error?error2.name==="TypeError"&&error2.message.includes( "fetch")?(userFriendlyError=new Error("Unable to connect to server - please check if the server is running"),userFriendlyError.name="NetworkError"):error2.message.includes("ECONNREFUSED")?(userFriendlyError=new Error("Connection refused - server may be offline"),userFriendlyError.name="NetworkError"):error2.message.includes("ETIMEDOUT")?(userFriendlyError=new Error("Request timed out - the server took too long to respond"),userFriendlyError.name="TimeoutError"):userFriendlyError=error2:userFriendlyError= new Error("Unknown error occurred while sending message"),console.error("Error in sendMessage:",error2),onError&&onError(userFriendlyError),userFriendlyError}}static async areAllSlotsIdle(model,signal){try{const url2=model?`./slots?model=${encodeURIComponent(model)}`:"./slots",res=await fetch(url2,{signal});return res.ok?(await res.json()).every(s2=>!s2.is_processing):!0}catch{return!0}}static async preEncode(messages,model,excludeReasoning,signal){const requestBody={messages:messages.map(msg=>"\ id"in msg&&"convId"in msg&&"timestamp"in msg?ChatService.convertDbMessageToApiChatMessageData(msg):msg).filter(msg=>msg.role===MessageRole.SYSTEM?(typeof msg.content=="string"?msg.content:"").trim().length>0:!0).map(msg=>{const mapped={role:msg.role,content:excludeReasoning?ChatService.stripReasoningContent(msg.content):msg.content,tool_calls:msg.tool_calls,tool_call_id:msg.tool_call_id};return!excludeReasoning&&msg.reasoning_content&&(mapped.reasoning_content=msg.reasoning_content),mapped}),stream:!1, n_predict:0};model&&(requestBody.model=model);try{await fetch("./v1/chat/completions",{method:"POST",headers:getJsonHeaders(),body:JSON.stringify(requestBody),signal})}catch(error2){isAbortError(error2)||console.warn("[ChatService] Pre-encode request failed:",error2)}}static async handleStreamResponse(response,onChunk,onComplete,onError,onReasoningChunk,onToolCallChunk,onModel,onTimings,conversationId,abortSignal){const reader=response.body?.getReader();if(!reader)throw new Error("No response bo\ dy");const decoder=new TextDecoder;let aggregatedContent="",fullReasoningContent="",aggregatedToolCalls=[],lastTimings,streamFinished=!1,modelEmitted=!1,toolCallIndexOffset=0,hasOpenToolCallBatch=!1;const finalizeOpenToolCallBatch=()=>{hasOpenToolCallBatch&&(toolCallIndexOffset=aggregatedToolCalls.length,hasOpenToolCallBatch=!1)},processToolCallDelta=toolCalls=>{if(!toolCalls||toolCalls.length===0||(aggregatedToolCalls=ChatService.mergeToolCallDeltas(aggregatedToolCalls,toolCalls,toolCallIndexOffset), aggregatedToolCalls.length===0))return;hasOpenToolCallBatch=!0;const serializedToolCalls=JSON.stringify(aggregatedToolCalls);serializedToolCalls&&(abortSignal?.aborted||onToolCallChunk?.(serializedToolCalls))};try{let chunk="";for(;!abortSignal?.aborted;){const{done,value}=await reader.read();if(done||abortSignal?.aborted)break;chunk+=decoder.decode(value,{stream:!0});const lines=chunk.split(` `);chunk=lines.pop()||"";for(const line of lines){if(abortSignal?.aborted)break;if(line.startsWith(UrlProtocol.DATA)){const data=line.slice(6);if(data==="[DONE]"){streamFinished=!0;continue}try{const parsed=JSON.parse(data),content2=parsed.choices[0]?.delta?.content,reasoningContent=parsed.choices[0]?.delta?.reasoning_content,toolCalls=parsed.choices[0]?.delta?.tool_calls,timings=parsed.timings,promptProgress=parsed.prompt_progress,chunkModel=ChatService.extractModelName(parsed);chunkModel&&!modelEmitted&& (modelEmitted=!0,onModel?.(chunkModel)),promptProgress&&ChatService.notifyTimings(void 0,promptProgress,onTimings),timings&&(ChatService.notifyTimings(timings,promptProgress,onTimings),lastTimings=timings),content2&&(finalizeOpenToolCallBatch(),aggregatedContent+=content2,abortSignal?.aborted||onChunk?.(content2)),reasoningContent&&(finalizeOpenToolCallBatch(),fullReasoningContent+=reasoningContent,abortSignal?.aborted||onReasoningChunk?.(reasoningContent)),processToolCallDelta(toolCalls)}catch(e){ console.error("Error parsing JSON chunk:",e)}}}if(abortSignal?.aborted)break}if(abortSignal?.aborted)return;if(streamFinished){finalizeOpenToolCallBatch();const finalToolCalls=aggregatedToolCalls.length>0?JSON.stringify(aggregatedToolCalls):void 0;onComplete?.(aggregatedContent,fullReasoningContent||void 0,lastTimings,finalToolCalls)}}catch(error2){const err=error2 instanceof Error?error2:new Error("Stream error");throw onError?.(err),err}finally{reader.releaseLock()}}static async handleNonStreamResponse(response,onComplete,onError,onToolCallChunk,onModel){ try{const responseText=await response.text();if(!responseText.trim())throw new Error("No response received from server. Please try again.");const data=JSON.parse(responseText),responseModel=ChatService.extractModelName(data);responseModel&&onModel?.(responseModel);const content2=data.choices[0]?.message?.content||"",reasoningContent=data.choices[0]?.message?.reasoning_content,toolCalls=data.choices[0]?.message?.tool_calls;let serializedToolCalls;if(toolCalls&&toolCalls.length>0){const mergedToolCalls=ChatService. mergeToolCallDeltas([],toolCalls);mergedToolCalls.length>0&&(serializedToolCalls=JSON.stringify(mergedToolCalls),serializedToolCalls&&onToolCallChunk?.(serializedToolCalls))}if(!content2.trim()&&!serializedToolCalls)throw new Error("No response received from server. Please try again.");return onComplete?.(content2,reasoningContent,void 0,serializedToolCalls),content2}catch(error2){const err=error2 instanceof Error?error2:new Error("Parse error");throw onError?.(err),err}}static mergeToolCallDeltas(existing,deltas,indexOffset=0){ const result=existing.map(call=>({...call,function:call.function?{...call.function}:void 0}));for(const delta of deltas){const index2=typeof delta.index=="number"&&delta.index>=0?delta.index+indexOffset:result.length;for(;result.length<=index2;)result.push({function:void 0});const target2=result[index2];if(delta.id&&(target2.id=delta.id),delta.type&&(target2.type=delta.type),delta.function){const fn=target2.function?{...target2.function}:{};delta.function.name&&(fn.name=delta.function.name),delta. function.arguments&&(fn.arguments=(fn.arguments??"")+delta.function.arguments),target2.function=fn}}return result}static convertDbMessageToApiChatMessageData(message){if(message.role===MessageRole.TOOL&&message.toolCallId)return{role:MessageRole.TOOL,content:message.content,tool_call_id:message.toolCallId};let toolCalls;if(message.toolCalls)try{toolCalls=JSON.parse(message.toolCalls)}catch{}if(!message.extra||message.extra.length===0){const result2={role:message.role,content:message.content};return message. reasoningContent&&(result2.reasoning_content=message.reasoningContent),toolCalls&&toolCalls.length>0&&(result2.tool_calls=toolCalls),result2}const contentParts=[];message.content&&contentParts.push({type:ContentPartType.TEXT,text:message.content});const imageFiles=message.extra.filter(extra=>extra.type===AttachmentType.IMAGE);for(const image2 of imageFiles)contentParts.push({type:ContentPartType.IMAGE_URL,image_url:{url:image2.base64Url}});const textFiles=message.extra.filter(extra=>extra.type=== AttachmentType.TEXT);for(const textFile of textFiles)contentParts.push({type:ContentPartType.TEXT,text:formatAttachmentText("File",textFile.name,textFile.content)});const legacyContextFiles=message.extra.filter(extra=>extra.type===AttachmentType.LEGACY_CONTEXT);for(const legacyContextFile of legacyContextFiles)contentParts.push({type:ContentPartType.TEXT,text:formatAttachmentText("File",legacyContextFile.name,legacyContextFile.content)});const audioFiles=message.extra.filter(extra=>extra.type=== AttachmentType.AUDIO);for(const audio of audioFiles)contentParts.push({type:ContentPartType.INPUT_AUDIO,input_audio:{data:audio.base64Data,format:audio.mimeType.includes("wav")?"wav":"mp3"}});const pdfFiles=message.extra.filter(extra=>extra.type===AttachmentType.PDF);for(const pdfFile of pdfFiles)if(pdfFile.processedAsImages&&pdfFile.images)for(let i=0;iextra.type===AttachmentType.MCP_PROMPT);for(const mcpPrompt of mcpPrompts)contentParts.push({type:ContentPartType.TEXT,text:formatAttachmentText(ATTACHMENT_LABEL_MCP_PROMPT,mcpPrompt.name,mcpPrompt.content,mcpPrompt.serverName)});const mcpResources2=message.extra.filter(extra=>extra.type===AttachmentType.MCP_RESOURCE);for(const mcpResource of mcpResources2)contentParts. push({type:ContentPartType.TEXT,text:formatAttachmentText(ATTACHMENT_LABEL_MCP_RESOURCE,mcpResource.name,mcpResource.content,mcpResource.serverName)});const result={role:message.role,content:contentParts};return message.reasoningContent&&(result.reasoning_content=message.reasoningContent),toolCalls&&toolCalls.length>0&&(result.tool_calls=toolCalls),result}static stripReasoningContent(content2){const stripFromString=text2=>text2.replace(LEGACY_AGENTIC_REGEX.REASONING_BLOCK,"").trim();return typeof content2== "string"?stripFromString(content2):content2.map(part=>part.type===ContentPartType.TEXT&&part.text?{...part,text:stripFromString(part.text)}:part)}static async parseErrorResponse(response){try{const errorText=await response.text(),errorData=JSON.parse(errorText),message=errorData.error?.message||"Unknown server error",error2=new Error(message);return error2.name=response.status===400?"ServerError":"HttpError",errorData.error&&"n_prompt_tokens"in errorData.error&&"n_ctx"in errorData.error&&(error2. contextInfo={n_prompt_tokens:errorData.error.n_prompt_tokens,n_ctx:errorData.error.n_ctx}),error2}catch{const fallback2=new Error(`Server error (${response.status}): ${response.statusText}`);return fallback2.name="HttpError",fallback2}}static extractModelName(data){const asRecord=value=>typeof value=="object"&&value!==null?value:void 0,getTrimmedString=value=>typeof value=="string"&&value.trim()?value.trim():void 0,root2=asRecord(data);if(!root2)return;const rootModel=getTrimmedString(root2.model); if(rootModel)return rootModel;const firstChoice=Array.isArray(root2.choices)?asRecord(root2.choices[0]):void 0;if(!firstChoice)return;const deltaModel=getTrimmedString(asRecord(firstChoice.delta)?.model);if(deltaModel)return deltaModel;const messageModel=getTrimmedString(asRecord(firstChoice.message)?.model);if(messageModel)return messageModel}static notifyTimings(timings,promptProgress,onTimingsCallback){!onTimingsCallback||!timings&&!promptProgress||onTimingsCallback(timings,promptProgress)}}class ModelsService{static async list(){ return apiFetch(API_MODELS.LIST)}static async listRouter(){return apiFetch(API_MODELS.LIST)}static async load(modelId,extraArgs){const payload={model:modelId};return extraArgs&&extraArgs.length>0&&(payload.extra_args=extraArgs),apiPost(API_MODELS.LOAD,payload)}static async unload(modelId){return apiPost(API_MODELS.UNLOAD,{model:modelId})}static isModelLoaded(model){return model.status.value===ServerModelStatus.LOADED}static isModelLoading(model){return model.status.value===ServerModelStatus.LOADING}static parseModelId(modelId){ const result={raw:modelId,orgName:null,modelName:null,params:null,activatedParams:null,quantization:null,tags:[]},colonIdx=modelId.indexOf(MODEL_ID_QUANTIZATION_SEPARATOR);let modelPath;colonIdx!==MODEL_ID_NOT_FOUND?(result.quantization=modelId.slice(colonIdx+1)||null,modelPath=modelId.slice(0,colonIdx)):modelPath=modelId;const slashIdx=modelPath.indexOf(MODEL_ID_ORG_SEPARATOR);let modelStr;slashIdx!==MODEL_ID_NOT_FOUND?(result.orgName=modelPath.slice(0,slashIdx),modelStr=modelPath.slice(slashIdx+ 1)):modelStr=modelPath;const dotIdx=modelStr.lastIndexOf(".");if(dotIdx!==MODEL_ID_NOT_FOUND&&!result.quantization){const afterDot=modelStr.slice(dotIdx+1);MODEL_QUANTIZATION_SEGMENT_RE.test(afterDot)&&(result.quantization=afterDot,modelStr=modelStr.slice(0,dotIdx))}const segments=modelStr.split(MODEL_ID_SEGMENT_SEPARATOR);if(!result.quantization&&segments.length>1){const last=segments[segments.length-1],secondLast=segments.length>2?segments[segments.length-2]:null;MODEL_QUANTIZATION_SEGMENT_RE. test(last)&&(secondLast&&MODEL_CUSTOM_QUANTIZATION_PREFIX_RE.test(secondLast)?(result.quantization=`${secondLast}-${last}`,segments.splice(segments.length-2,2)):(result.quantization=last,segments.pop()))}let paramsIdx=MODEL_ID_NOT_FOUND,activatedParamsIdx=MODEL_ID_NOT_FOUND;for(let i=0;i{const absIdx=paramsIdx+1+relIdx;return absIdx===activatedParamsIdx?!1:!MODEL_IGNORED_SEGMENTS.has(segments[absIdx].toUpperCase())})),result}}class ModelsStore{#models=state$1(proxy( []));get models(){return get$4(this.#models)}set models(value){set$1(this.#models,value,!0)}#routerModels=state$1(proxy([]));get routerModels(){return get$4(this.#routerModels)}set routerModels(value){set$1(this.#routerModels,value,!0)}#loading=state$1(!1);get loading(){return get$4(this.#loading)}set loading(value){set$1(this.#loading,value,!0)}#updating=state$1(!1);get updating(){return get$4(this.#updating)}set updating(value){set$1(this.#updating,value,!0)}#error=state$1(null);get error(){return get$4( this.#error)}set error(value){set$1(this.#error,value,!0)}#selectedModelId=state$1(null);get selectedModelId(){return get$4(this.#selectedModelId)}set selectedModelId(value){set$1(this.#selectedModelId,value,!0)}#selectedModelName=state$1(null);get selectedModelName(){return get$4(this.#selectedModelName)}set selectedModelName(value){set$1(this.#selectedModelName,value,!0)}#modelUsage=state$1(proxy(new Map));get modelUsage(){return get$4(this.#modelUsage)}set modelUsage(value){set$1(this.#modelUsage, value,!0)}modelLoadingStates=new SvelteMap;#favoriteModelIds=state$1(proxy(this.loadFavoritesFromStorage()));get favoriteModelIds(){return get$4(this.#favoriteModelIds)}set favoriteModelIds(value){set$1(this.#favoriteModelIds,value,!0)}modelPropsCache=new TTLCache({ttlMs:MODEL_PROPS_CACHE_TTL_MS,maxEntries:MODEL_PROPS_CACHE_MAX_ENTRIES});#modelPropsFetching=state$1(proxy(new Set));get modelPropsFetching(){return get$4(this.#modelPropsFetching)}set modelPropsFetching(value){set$1(this.#modelPropsFetching, value,!0)}#propsCacheVersion=state$1(0);get propsCacheVersion(){return get$4(this.#propsCacheVersion)}set propsCacheVersion(value){set$1(this.#propsCacheVersion,value,!0)}get selectedModel(){return this.selectedModelId?this.models.find(model=>model.id===this.selectedModelId)??null:null}get loadedModelIds(){return this.routerModels.filter(m=>m.status.value===ServerModelStatus.LOADED||m.status.value===ServerModelStatus.SLEEPING).map(m=>m.id)}get loadingModelIds(){return Array.from(this.modelLoadingStates. entries()).filter(([,loading])=>loading).map(([id2])=>id2)}get singleModelName(){if(serverStore.isRouterMode)return null;const props=serverStore.props;return props?.model_alias?props.model_alias:props?.model_path&&props.model_path.split(/(\\|\/)/).pop()||null}getModelModalities(modelId){const model=this.models.find(m=>m.model===modelId||m.id===modelId);if(model?.modalities)return model.modalities;const props=this.modelPropsCache.get(modelId);return props?.modalities?{vision:props.modalities.vision?? !1,audio:props.modalities.audio??!1}:null}modelSupportsVision(modelId){return this.getModelModalities(modelId)?.vision??!1}modelSupportsAudio(modelId){return this.getModelModalities(modelId)?.audio??!1}getModelModalitiesArray(modelId){const modalities=this.getModelModalities(modelId);if(!modalities)return[];const result=[];return modalities.vision&&result.push(ModelModality.VISION),modalities.audio&&result.push(ModelModality.AUDIO),result}getModelProps(modelId){return this.modelPropsCache.get(modelId)}getModelContextSize(modelId){ const nCtx=this.getModelProps(modelId)?.default_generation_settings?.n_ctx;return typeof nCtx=="number"?nCtx:null}get selectedModelContextSize(){return this.selectedModelName?this.getModelContextSize(this.selectedModelName):null}isModelPropsFetching(modelId){return this.modelPropsFetching.has(modelId)}isModelLoaded(modelId){const model=this.routerModels.find(m=>m.id===modelId);return model?.status.value===ServerModelStatus.LOADED||model?.status.value===ServerModelStatus.SLEEPING||!1}isModelOperationInProgress(modelId){ return this.modelLoadingStates.get(modelId)??!1}getModelStatus(modelId){return this.routerModels.find(m=>m.id===modelId)?.status.value??null}getModelUsage(modelId){return this.modelUsage.get(modelId)??new SvelteSet}isModelInUse(modelId){const usage=this.modelUsage.get(modelId);return usage!==void 0&&usage.size>0}async fetch(force=!1){if(!this.loading&&!(this.models.length>0&&!force)){this.loading=!0,this.error=null;try{serverStore.props||await serverStore.fetch();const response=await ModelsService. list(),models=response.data.map((item,index2)=>{const details=response.models?.[index2],rawCapabilities=Array.isArray(details?.capabilities)?details?.capabilities:[],displayNameSource=details?.name&&details.name.trim().length>0?details.name:item.id,displayName=this.toDisplayName(displayNameSource),modelId=details?.model||item.id;return{id:item.id,name:displayName,model:modelId,description:details?.description,capabilities:rawCapabilities.filter(value=>!!value),details:details?.details,meta:item. meta??null,parsedId:ModelsService.parseModelId(modelId),aliases:item.aliases??[],tags:item.tags??[]}});this.models=models;const serverProps2=serverStore.props;if(serverStore.isModelMode&&this.models.length>0&&serverProps2?.modalities){const modalities={vision:serverProps2.modalities.vision??!1,audio:serverProps2.modalities.audio??!1};this.modelPropsCache.set(this.models[0].model,serverProps2),this.models=this.models.map((model,index2)=>index2===0?{...model,modalities}:model)}}catch(error2){throw this. models=[],this.error=error2 instanceof Error?error2.message:"Failed to load models",error2}finally{this.loading=!1}}}async fetchRouterModels(){try{const response=await ModelsService.listRouter();this.routerModels=response.data,await this.fetchModalitiesForLoadedModels();const o=this.models.filter(option2=>this.getModelProps(option2.model)?.webui!==!1);o.length===1&&this.isModelLoaded(o[0].model)&&this.selectModelById(o[0].id)}catch(error2){console.warn("Failed to fetch router models:",error2),this. routerModels=[]}}async fetchModelProps(modelId){const cached2=this.modelPropsCache.get(modelId);if(cached2)return cached2;if(serverStore.isRouterMode&&!this.isModelLoaded(modelId)||this.modelPropsFetching.has(modelId))return null;this.modelPropsFetching.add(modelId);try{const props=await PropsService.fetchForModel(modelId);return this.modelPropsCache.set(modelId,props),props}catch(error2){return console.warn(`Failed to fetch props for model ${modelId}:`,error2),null}finally{this.modelPropsFetching. delete(modelId)}}async fetchModalitiesForLoadedModels(){const loadedModelIds2=this.loadedModelIds;if(loadedModelIds2.length===0)return;const propsPromises=loadedModelIds2.map(modelId=>this.fetchModelProps(modelId));try{const results=await Promise.all(propsPromises);this.models=this.models.map(model=>{const modelIndex=loadedModelIds2.indexOf(model.model);if(modelIndex===-1)return model;const props=results[modelIndex];if(!props?.modalities)return model;const modalities={vision:props.modalities.vision?? !1,audio:props.modalities.audio??!1};return{...model,modalities}}),this.propsCacheVersion++}catch(error2){console.warn("Failed to fetch modalities for loaded models:",error2)}}async updateModelModalities(modelId){try{const props=await this.fetchModelProps(modelId);if(!props?.modalities)return;const modalities={vision:props.modalities.vision??!1,audio:props.modalities.audio??!1};this.models=this.models.map(model=>model.model===modelId?{...model,modalities}:model),this.propsCacheVersion++}catch(error2){ console.warn(`Failed to update modalities for model ${modelId}:`,error2)}}async selectModelById(modelId){if(!modelId||this.updating||this.selectedModelId===modelId)return;const option2=this.models.find(model=>model.id===modelId);if(!option2)throw new Error("Selected model is not available");this.updating=!0,this.error=null;try{this.selectedModelId=option2.id,this.selectedModelName=option2.model}finally{this.updating=!1}}selectModelByName(modelName){const option2=this.models.find(model=>model.model=== modelName);option2&&(this.selectedModelId=option2.id,this.selectedModelName=option2.model)}clearSelection(){this.selectedModelId=null,this.selectedModelName=null}findModelByName(modelName){return this.models.find(model=>model.model===modelName)??null}findModelById(modelId){return this.models.find(model=>model.id===modelId)??null}hasModel(modelName){return this.models.some(model=>model.model===modelName)}static STATUS_POLL_INTERVAL=500;async pollForModelStatus(modelId,expectedStatus){let attempt=0; for(;;){await this.fetchRouterModels();const currentStatus=this.getModelStatus(modelId);if(currentStatus===expectedStatus)return;if(currentStatus===ServerModelStatus.FAILED)throw new Error(`Model failed to ${expectedStatus===ServerModelStatus.LOADED?"load":"unload"}`);if(expectedStatus===ServerModelStatus.LOADED&¤tStatus===ServerModelStatus.UNLOADED&&attempt>2)throw new Error("Model was unloaded unexpectedly during loading");attempt++,await new Promise(resolve2=>setTimeout(resolve2,ModelsStore. STATUS_POLL_INTERVAL))}}async loadModel(modelId){if(!this.isModelLoaded(modelId)&&!this.modelLoadingStates.get(modelId)){this.modelLoadingStates.set(modelId,!0),this.error=null;try{await ModelsService.load(modelId),await this.pollForModelStatus(modelId,ServerModelStatus.LOADED),await this.updateModelModalities(modelId),toast.success(`Model loaded: ${this.toDisplayName(modelId)}`)}catch(error2){throw this.error=error2 instanceof Error?error2.message:"Failed to load model",toast.error(`Failed to l\ oad model: ${this.toDisplayName(modelId)}`),error2}finally{this.modelLoadingStates.set(modelId,!1)}}}async unloadModel(modelId){if(this.isModelLoaded(modelId)&&!this.modelLoadingStates.get(modelId)){this.modelLoadingStates.set(modelId,!0),this.error=null;try{await ModelsService.unload(modelId),await this.pollForModelStatus(modelId,ServerModelStatus.UNLOADED),toast.info(`Model unloaded: ${this.toDisplayName(modelId)}`)}catch(error2){throw this.error=error2 instanceof Error?error2.message:"Failed \ to unload model",toast.error(`Failed to unload model: ${this.toDisplayName(modelId)}`),error2}finally{this.modelLoadingStates.set(modelId,!1)}}}async ensureModelLoaded(modelId){this.isModelLoaded(modelId)||await this.loadModel(modelId)}isFavorite(modelId){return this.favoriteModelIds.has(modelId)}toggleFavorite(modelId){const next2=new SvelteSet(this.favoriteModelIds);next2.has(modelId)?next2.delete(modelId):next2.add(modelId),this.favoriteModelIds=next2;try{localStorage.setItem(FAVORITE_MODELS_LOCALSTORAGE_KEY, JSON.stringify([...next2]))}catch{toast.error("Failed to save favorite models to local storage")}}loadFavoritesFromStorage(){try{const raw2=localStorage.getItem(FAVORITE_MODELS_LOCALSTORAGE_KEY);return raw2?new Set(JSON.parse(raw2)):new Set}catch{return toast.error("Failed to load favorite models from local storage"),new Set}}toDisplayName(id2){const candidate=id2.split(/\\|\//).pop();return candidate&&candidate.trim().length>0?candidate:id2}clear(){this.models=[],this.routerModels=[],this.loading= !1,this.updating=!1,this.error=null,this.selectedModelId=null,this.selectedModelName=null,this.modelUsage.clear(),this.modelLoadingStates.clear(),this.modelPropsCache.clear(),this.modelPropsFetching.clear()}pruneExpiredCache(){return this.modelPropsCache.prune()}}const modelsStore=new ModelsStore,modelOptions=()=>modelsStore.models,routerModels=()=>modelsStore.routerModels,modelsLoading=()=>modelsStore.loading,modelsUpdating=()=>modelsStore.updating,selectedModelId=()=>modelsStore.selectedModelId, selectedModelName=()=>modelsStore.selectedModelName,singleModelName=()=>modelsStore.singleModelName,selectedModelContextSize=()=>modelsStore.selectedModelContextSize;function readFileAsBase64(file){return new Promise((resolve2,reject)=>{const reader=new FileReader;reader.onload=()=>{const base642=reader.result.split(",")[1];resolve2(base642)},reader.onerror=()=>reject(reader.error),reader.readAsDataURL(file)})}async function parseFilesToMessageExtras(files,activeModelId){const extras=[],emptyFiles=[]; for(const file of files){if(file.type===SpecialFileType.MCP_PROMPT&&file.mcpPrompt){extras.push({type:AttachmentType.MCP_PROMPT,name:file.name,serverName:file.mcpPrompt.serverName,promptName:file.mcpPrompt.promptName,content:file.textContent??"",arguments:file.mcpPrompt.arguments});continue}if(getFileTypeCategory(file.type)===FileTypeCategory.IMAGE){if(file.preview){let base64Url=file.preview;if(isSvgMimeType(file.type))try{base64Url=await svgBase64UrlToPngDataURL(base64Url)}catch(error2){console. error("Failed to convert SVG to PNG for database storage:",error2)}else if(isWebpMimeType(file.type))try{base64Url=await webpBase64UrlToPngDataURL(base64Url)}catch(error2){console.error("Failed to convert WebP to PNG for database storage:",error2)}extras.push({type:AttachmentType.IMAGE,name:file.name,base64Url})}}else if(getFileTypeCategory(file.type)===FileTypeCategory.AUDIO)try{const base64Data=await readFileAsBase64(file.file);extras.push({type:AttachmentType.AUDIO,name:file.name,base64Data,mimeType:file. type})}catch(error2){console.error(`Failed to process audio file ${file.name}:`,error2)}else if(getFileTypeCategory(file.type)===FileTypeCategory.PDF)try{const base64Data=await readFileAsBase64(file.file),currentConfig=config$1(),hasVisionSupport=activeModelId?modelsStore.modelSupportsVision(activeModelId):!1;let shouldProcessAsImages=!!currentConfig.pdfAsImage&&hasVisionSupport;if(currentConfig.pdfAsImage&&!hasVisionSupport&&(console.log("Non-vision model detected: forcing PDF-to-text mode and \ updating settings"),settingsStore.updateConfig("pdfAsImage",!1),toast.warning("PDF setting changed: Non-vision model detected, PDFs will be processed as text instead of images.",{duration:5e3}),shouldProcessAsImages=!1),shouldProcessAsImages)try{const images=await convertPDFToImage(file.file);toast.success(`PDF "${file.name}" processed as ${images.length} images for vision model.`,{duration:3e3}),extras.push({type:AttachmentType.PDF,name:file.name,content:`PDF file with ${images.length} pages`,images, processedAsImages:!0,base64Data})}catch(imageError){console.warn(`Failed to process PDF ${file.name} as images, falling back to text:`,imageError);const content2=await convertPDFToText(file.file);extras.push({type:AttachmentType.PDF,name:file.name,content:content2,processedAsImages:!1,base64Data})}else{const content2=await convertPDFToText(file.file);toast.success(`PDF "${file.name}" processed as text content.`,{duration:3e3}),extras.push({type:AttachmentType.PDF,name:file.name,content:content2, processedAsImages:!1,base64Data})}}catch(error2){console.error(`Failed to process PDF file ${file.name}:`,error2)}else try{const content2=await readFileAsText(file.file);content2.trim()===""?(console.warn(`File ${file.name} is empty and will be skipped`),emptyFiles.push(file.name)):isLikelyTextFile(content2)?extras.push({type:AttachmentType.TEXT,name:file.name,content:content2}):console.warn(`File ${file.name} appears to be binary and will be skipped`)}catch(error2){console.error(`Failed to read\ file ${file.name}:`,error2)}}return{extras,emptyFiles}}function readFileAsDataURL(file){return new Promise((resolve2,reject)=>{const reader=new FileReader;reader.onload=()=>resolve2(reader.result),reader.onerror=()=>reject(reader.error),reader.readAsDataURL(file)})}function readFileAsUTF8(file){return new Promise((resolve2,reject)=>{const reader=new FileReader;reader.onload=()=>resolve2(reader.result),reader.onerror=()=>reject(reader.error),reader.readAsText(file)})}async function processFilesToChatUploaded(files,activeModelId){ const results=[];for(const file of files){const base2={id:Date.now().toString()+Math.random().toString(36).substr(2,9),name:file.name,size:file.size,type:file.type,file};try{if(getFileTypeCategory(file.type)===FileTypeCategory.IMAGE){let preview=await readFileAsDataURL(file);if(isSvgMimeType(file.type))try{preview=await svgBase64UrlToPngDataURL(preview)}catch(err){console.error("Failed to convert SVG to PNG:",err)}else if(isWebpMimeType(file.type))try{preview=await webpBase64UrlToPngDataURL(preview)}catch(err){ console.error("Failed to convert WebP to PNG:",err)}results.push({...base2,preview})}else if(getFileTypeCategory(file.type)===FileTypeCategory.PDF){try{const textContent=await convertPDFToText(file);results.push({...base2,textContent})}catch(err){console.warn("Failed to extract text from PDF, adding without content:",err),results.push(base2)}const hasVisionSupport=activeModelId?modelsStore.modelSupportsVision(activeModelId):!1,currentConfig=settingsStore.config;hasVisionSupport&&!currentConfig.pdfAsImage&& toast.info("You can enable parsing PDF as images with vision models.",{duration:8e3,action:{label:"Enable PDF as Images",onClick:()=>{settingsStore.updateConfig("pdfAsImage",!0),toast.success("PDF parsing as images enabled!",{duration:3e3})}}})}else if(getFileTypeCategory(file.type)===FileTypeCategory.AUDIO){const preview=await readFileAsDataURL(file);results.push({...base2,preview})}else try{const textContent=await readFileAsUTF8(file);results.push({...base2,textContent})}catch(err){console.warn( "Failed to read file as text, adding without content:",err),results.push(base2)}}catch(error2){console.error("Error processing file",file.name,error2),results.push(base2)}}return results}var root_2$11=from_html(" Text",1),root_4$x=from_html('
      '),root_3$T=from_html(" Pages",1),root_1$V=from_html('
      '),root_6$y=from_html('
      '),root_12$9=from_html('The selected model does not support vision. Only the extracted text will be sent to the model.'),root_10$i=from_html(" ",1),root_13$d=from_html('

      Converting PDF to images...

      '),root_15$6=from_html('

      Failed to load PDF images

      '),root_19$3=from_html('

      '),root_18$6=from_html('
      '),root_20$a=from_html('

      No PDF pages available

      '),root_8$o=from_html(" ",1),root_25=from_html(''),root_27$2=from_html(''),root_28$4=from_html('

      Audio preview not available

      '),root_24$3=from_html('

      '),root_29$2=from_html('

      Preview not available for this file type

      '),root$1q=from_html('
      ');function ChatAttachmentPreview($$anchor,$$props){push$1($$props,!0);let hasVisionModality=user_derived(()=>$$props.activeModelId?modelsStore.modelSupportsVision($$props.activeModelId):!1),displayName=user_derived(()=>$$props.uploadedFile?.name||$$props.attachment?.name||$$props.name||"Unknown File"),isAudio=user_derived(()=>isAudioFile($$props. attachment,$$props.uploadedFile)),isImage2=user_derived(()=>isImageFile($$props.attachment,$$props.uploadedFile)),isPdf=user_derived(()=>isPdfFile$1($$props.attachment,$$props.uploadedFile)),isText=user_derived(()=>isTextFile($$props.attachment,$$props.uploadedFile)),displayPreview=user_derived(()=>$$props.uploadedFile?.preview||(get$4(isImage2)&&$$props.attachment&&"base64Url"in $$props.attachment?$$props.attachment.base64Url:$$props.preview)),displayTextContent=user_derived(()=>$$props.uploadedFile?. textContent||($$props.attachment&&"content"in $$props.attachment?$$props.attachment.content:$$props.textContent)),language2=user_derived(()=>getLanguageFromFilename(get$4(displayName))),IconComponent=user_derived(()=>()=>get$4(isImage2)?Image$1:get$4(isText)||get$4(isPdf)?File_text:get$4(isAudio)?Music:File$1),pdfViewMode=state$1("pages"),pdfImages=state$1(proxy([])),pdfImagesLoading=state$1(!1),pdfImagesError=state$1(null);async function loadPdfImages(){if(!(!get$4(isPdf)||get$4(pdfImages).length> 0||get$4(pdfImagesLoading))){set$1(pdfImagesLoading,!0),set$1(pdfImagesError,null);try{let file=null;if($$props.uploadedFile?.file)file=$$props.uploadedFile.file;else if(get$4(isPdf)&&$$props.attachment){if("images"in $$props.attachment&&$$props.attachment.images&&Array.isArray($$props.attachment.images)&&$$props.attachment.images.length>0){set$1(pdfImages,$$props.attachment.images,!0);return}if("base64Data"in $$props.attachment&&$$props.attachment.base64Data){const base64Data=$$props.attachment. base64Data,byteCharacters=atob(base64Data),byteNumbers=new Array(byteCharacters.length);for(let i=0;i{get$4(isPdf)&&get$4(pdfViewMode)==="pages"&&loadPdfImages()});var $$exports={reset:reset$1},div=root$1q(),div_1=child(div),node2=child(div_1);{var consequent_1=$$anchor2=>{var div_2=root_1$V(),node_1=child(div_2);{let $0=user_derived(()=>get$4(pdfViewMode)==="text"?"default":"outline");Button(node_1,{get variant(){ return get$4($0)},size:"sm",onclick:()=>set$1(pdfViewMode,"text"),get disabled(){return get$4(pdfImagesLoading)},children:($$anchor3,$$slotProps)=>{var fragment=root_2$11(),node_2=first_child(fragment);File_text(node_2,{class:"mr-1 h-4 w-4"}),next$1(),append($$anchor3,fragment)},$$slots:{default:!0}})}var node_3=sibling(node_1,2);{let $0=user_derived(()=>get$4(pdfViewMode)==="pages"?"default":"outline");Button(node_3,{get variant(){return get$4($0)},size:"sm",onclick:()=>{set$1(pdfViewMode,"page\ s"),loadPdfImages()},get disabled(){return get$4(pdfImagesLoading)},children:($$anchor3,$$slotProps)=>{var fragment_1=root_3$T(),node_4=first_child(fragment_1);{var consequent=$$anchor4=>{var div_3=root_4$x();append($$anchor4,div_3)},alternate=$$anchor4=>{Eye($$anchor4,{class:"mr-1 h-4 w-4"})};if_block(node_4,$$render=>{get$4(pdfImagesLoading)?$$render(consequent):$$render(alternate,!1)})}next$1(),append($$anchor3,fragment_1)},$$slots:{default:!0}})}reset(div_2),append($$anchor2,div_2)};if_block( node2,$$render=>{get$4(isPdf)&&$$render(consequent_1)})}reset(div_1);var div_4=sibling(div_1,2),node_5=child(div_4);{var consequent_2=$$anchor2=>{var div_5=root_6$y(),img=child(div_5);reset(div_5),template_effect(()=>{set_attribute(img,"src",get$4(displayPreview)),set_attribute(img,"alt",get$4(displayName))}),append($$anchor2,div_5)},alternate_9=$$anchor2=>{var fragment_3=comment$2(),node_6=first_child(fragment_3);{var consequent_7=$$anchor3=>{var fragment_4=root_8$o(),node_7=first_child(fragment_4); {var consequent_3=$$anchor4=>{var fragment_5=comment$2(),node_8=first_child(fragment_5);component(node_8,()=>Alert,($$anchor5,Alert_Root)=>{Alert_Root($$anchor5,{class:"mb-4",children:($$anchor6,$$slotProps)=>{var fragment_6=root_10$i(),node_9=first_child(fragment_6);Info$1(node_9,{class:"h-4 w-4"});var node_10=sibling(node_9,2);component(node_10,()=>Alert_title,($$anchor7,Alert_Title)=>{Alert_Title($$anchor7,{children:($$anchor8,$$slotProps2)=>{next$1();var text2=text$8("Preview only");append($$anchor8, text2)},$$slots:{default:!0}})});var node_11=sibling(node_10,2);component(node_11,()=>Alert_description,($$anchor7,Alert_Description)=>{Alert_Description($$anchor7,{children:($$anchor8,$$slotProps2)=>{var span=root_12$9(),span_1=sibling(child(span));span_1.__click=()=>set$1(pdfViewMode,"text"),next$1(),reset(span),append($$anchor8,span)},$$slots:{default:!0}})}),append($$anchor6,fragment_6)},$$slots:{default:!0}})}),append($$anchor4,fragment_5)};if_block(node_7,$$render=>{!get$4(hasVisionModality)&& $$props.activeModelId&&$$render(consequent_3)})}var node_12=sibling(node_7,2);{var consequent_4=$$anchor4=>{var div_6=root_13$d();append($$anchor4,div_6)},alternate_3=$$anchor4=>{var fragment_7=comment$2(),node_13=first_child(fragment_7);{var consequent_5=$$anchor5=>{var div_7=root_15$6(),div_8=child(div_7),node_14=child(div_8);File_text(node_14,{class:"mx-auto mb-4 h-16 w-16 text-muted-foreground"});var p2=sibling(node_14,4),text_1=child(p2,!0);reset(p2);var node_15=sibling(p2,2);Button(node_15, {class:"mt-4",onclick:()=>set$1(pdfViewMode,"text"),children:($$anchor6,$$slotProps)=>{next$1();var text_2=text$8("View as Text");append($$anchor6,text_2)},$$slots:{default:!0}}),reset(div_8),reset(div_7),template_effect(()=>set_text(text_1,get$4(pdfImagesError))),append($$anchor5,div_7)},alternate_2=$$anchor5=>{var fragment_8=comment$2(),node_16=first_child(fragment_8);{var consequent_6=$$anchor6=>{var div_9=root_18$6();each(div_9,22,()=>get$4(pdfImages),image2=>image2,($$anchor7,image2,index2)=>{ var div_10=root_19$3(),p_1=child(div_10),text_3=child(p_1);reset(p_1);var img_1=sibling(p_1,2);reset(div_10),template_effect(()=>{set_text(text_3,`Page ${get$4(index2)+1}`),set_attribute(img_1,"src",image2),set_attribute(img_1,"alt",`PDF Page ${get$4(index2)+1}`)}),append($$anchor7,div_10)}),reset(div_9),append($$anchor6,div_9)},alternate_1=$$anchor6=>{var div_11=root_20$a(),div_12=child(div_11),node_17=child(div_12);File_text(node_17,{class:"mx-auto mb-4 h-16 w-16 text-muted-foreground"}),next$1( 2),reset(div_12),reset(div_11),append($$anchor6,div_11)};if_block(node_16,$$render=>{get$4(pdfImages).length>0?$$render(consequent_6):$$render(alternate_1,!1)},!0)}append($$anchor5,fragment_8)};if_block(node_13,$$render=>{get$4(pdfImagesError)?$$render(consequent_5):$$render(alternate_2,!1)},!0)}append($$anchor4,fragment_7)};if_block(node_12,$$render=>{get$4(pdfImagesLoading)?$$render(consequent_4):$$render(alternate_3,!1)})}append($$anchor3,fragment_4)},alternate_8=$$anchor3=>{var fragment_9=comment$2(), node_18=first_child(fragment_9);{var consequent_8=$$anchor4=>{SyntaxHighlightedCode($$anchor4,{get code(){return get$4(displayTextContent)},get language(){return get$4(language2)},maxWidth:"calc(69rem - 2rem)"})},alternate_7=$$anchor4=>{var fragment_11=comment$2(),node_19=first_child(fragment_11);{var consequent_11=$$anchor5=>{var div_13=root_24$3(),div_14=child(div_13),node_20=child(div_14);Music(node_20,{class:"mx-auto mb-4 h-16 w-16 text-muted-foreground"});var node_21=sibling(node_20,2);{var consequent_9=$$anchor6=>{ var audio=root_25();template_effect(()=>set_attribute(audio,"src",$$props.uploadedFile.preview)),append($$anchor6,audio)},alternate_5=$$anchor6=>{var fragment_12=comment$2(),node_22=first_child(fragment_12);{var consequent_10=$$anchor7=>{var audio_1=root_27$2();template_effect($0=>set_attribute(audio_1,"src",$0),[()=>createBase64DataUrl($$props.attachment.mimeType,$$props.attachment.base64Data)]),append($$anchor7,audio_1)},alternate_4=$$anchor7=>{var p_2=root_28$4();append($$anchor7,p_2)};if_block( node_22,$$render=>{get$4(isAudio)&&$$props.attachment&&"mimeType"in $$props.attachment&&"base64Data"in $$props.attachment?$$render(consequent_10):$$render(alternate_4,!1)},!0)}append($$anchor6,fragment_12)};if_block(node_21,$$render=>{$$props.uploadedFile?.preview?$$render(consequent_9):$$render(alternate_5,!1)})}var p_3=sibling(node_21,2),text_4=child(p_3,!0);reset(p_3),reset(div_14),reset(div_13),template_effect(()=>set_text(text_4,get$4(displayName))),append($$anchor5,div_13)},alternate_6=$$anchor5=>{ var div_15=root_29$2(),div_16=child(div_15),node_23=child(div_16);{var consequent_12=$$anchor6=>{var fragment_13=comment$2(),node_24=first_child(fragment_13);component(node_24,()=>get$4(IconComponent),($$anchor7,IconComponent_1)=>{IconComponent_1($$anchor7,{class:"mx-auto mb-4 h-16 w-16 text-muted-foreground"})}),append($$anchor6,fragment_13)};if_block(node_23,$$render=>{get$4(IconComponent)&&$$render(consequent_12)})}next$1(2),reset(div_16),reset(div_15),append($$anchor5,div_15)};if_block(node_19, $$render=>{get$4(isAudio)?$$render(consequent_11):$$render(alternate_6,!1)},!0)}append($$anchor4,fragment_11)};if_block(node_18,$$render=>{(get$4(isText)||get$4(isPdf)&&get$4(pdfViewMode)==="text")&&get$4(displayTextContent)?$$render(consequent_8):$$render(alternate_7,!1)},!0)}append($$anchor3,fragment_9)};if_block(node_6,$$render=>{get$4(isPdf)&&get$4(pdfViewMode)==="pages"?$$render(consequent_7):$$render(alternate_8,!1)},!0)}append($$anchor2,fragment_3)};if_block(node_5,$$render=>{get$4(isImage2)&& get$4(displayPreview)?$$render(consequent_2):$$render(alternate_9,!1)})}return reset(div_4),reset(div),append($$anchor,div),pop($$exports)}delegate(["click"]);var root_1$U=from_html("
      ");function ChatAttachmentMcpResources($$anchor,$$props){push$1($$props,!0);const attachments=user_derived(mcpResourceAttachments),hasAttachments=user_derived(mcpHasResourceAttachments);function handleRemove(attachmentId){mcpStore.removeResourceAttachment(attachmentId)}function handleResourceClick(uri2){ $$props.onResourceClick?.(uri2)}var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var div=root_1$U(),node_1=child(div);HorizontalScrollCarousel(node_1,{gapSize:"2",children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_2=first_child(fragment_1);each(node_2,19,()=>get$4(attachments),attachment=>attachment.id,($$anchor4,attachment,i)=>{{let $0=user_derived(()=>get$4(i)===0?"ml-3":"");ChatAttachmentMcpResource($$anchor4,{get class(){return get$4($0)},get attachment(){ return get$4(attachment)},onRemove:handleRemove,onClick:()=>handleResourceClick(get$4(attachment).resource.uri)})}}),append($$anchor3,fragment_1)},$$slots:{default:!0}}),reset(div),template_effect(()=>set_class(div,1,clsx($$props.class))),append($$anchor2,div)};if_block(node2,$$render=>{get$4(hasAttachments)&&$$render(consequent)})}append($$anchor,fragment),pop()}var root_3$S=from_html(' '),root_5$u=from_html('
      '),root_4$w=from_html('
      '),root_2$10=from_html(''),root_8$n=from_html('
      '),root_7$r=from_html('
      '),root_6$x=from_html(''),root_10$h=from_html(' '),root_12$8=from_html(' '),root_13$c=from_html('
      '),root_9$l=from_html('');function ChatAttachmentThumbnailFile($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),readonly2=prop($$props,"readonly",3,!1),isText=user_derived(()=>isTextFile($$props.attachment,$$props.uploadedFile)),fileTypeLabel=user_derived(()=>{if($$props.uploadedFile?.type)return getFileTypeLabel($$props.uploadedFile.type);if($$props. attachment){if("mimeType"in $$props.attachment&&$$props.attachment.mimeType)return getFileTypeLabel($$props.attachment.mimeType);if($$props.attachment.type)return getFileTypeLabel($$props.attachment.type)}return getFileTypeLabel($$props.name)}),pdfProcessingMode=user_derived(()=>$$props.attachment?.type===AttachmentType.PDF?$$props.attachment.processedAsImages?"Sent as Image":"Sent as Text":null);var fragment=comment$2(),node2=first_child(fragment);{var consequent_6=$$anchor2=>{var fragment_1=comment$2(), node_1=first_child(fragment_1);{var consequent_3=$$anchor3=>{var button=root_2$10();button.__click=function(...$$args){$$props.onClick?.apply(this,$$args)};var div=child(button),div_1=child(div),span=child(div_1),text2=child(span,!0);reset(span);var node_2=sibling(span,2);{var consequent=$$anchor4=>{var span_1=root_3$S(),text_1=child(span_1,!0);reset(span_1),template_effect($0=>set_text(text_1,$0),[()=>formatFileSize($$props.size)]),append($$anchor4,span_1)};if_block(node_2,$$render=>{$$props.size&& $$render(consequent)})}var node_3=sibling(node_2,2);{var consequent_2=$$anchor4=>{var div_2=root_4$w(),div_3=child(div_2),text_2=child(div_3,!0);reset(div_3);var node_4=sibling(div_3,2);{var consequent_1=$$anchor5=>{var div_4=root_5$u();append($$anchor5,div_4)};if_block(node_4,$$render=>{$$props.textContent.length>150&&$$render(consequent_1)})}reset(div_2),template_effect($0=>set_text(text_2,$0),[()=>getPreviewText($$props.textContent)]),append($$anchor4,div_2)};if_block(node_3,$$render=>{$$props. textContent&&$$render(consequent_2)})}reset(div_1),reset(div),reset(button),template_effect(()=>{set_class(button,1,`cursor-pointer rounded-lg border border-border bg-muted p-3 transition-shadow hover:shadow-md ${className()??""} w-full max-w-2xl`),set_attribute(button,"aria-label",`Preview ${$$props.name}`),set_text(text2,$$props.name)}),append($$anchor3,button)},alternate=$$anchor3=>{var button_1=root_6$x();button_1.__click=function(...$$args){$$props.onClick?.apply(this,$$args)};var div_5=child( button_1),node_5=child(div_5);ActionIconRemove(node_5,{get id(){return $$props.id},get onRemove(){return $$props.onRemove}}),reset(div_5);var div_6=sibling(div_5,2),span_2=child(div_6),text_3=child(span_2,!0);reset(span_2);var node_6=sibling(span_2,2);{var consequent_5=$$anchor4=>{var div_7=root_7$r(),div_8=child(div_7),text_4=child(div_8,!0);reset(div_8);var node_7=sibling(div_8,2);{var consequent_4=$$anchor5=>{var div_9=root_8$n();append($$anchor5,div_9)};if_block(node_7,$$render=>{$$props.textContent. length>150&&$$render(consequent_4)})}reset(div_7),template_effect($0=>set_text(text_4,$0),[()=>getPreviewText($$props.textContent)]),append($$anchor4,div_7)};if_block(node_6,$$render=>{$$props.textContent&&$$render(consequent_5)})}reset(div_6),reset(button_1),template_effect(()=>{set_class(button_1,1,`group relative rounded-lg border border-border bg-muted p-3 ${className()??""} ${$$props.textContent?"max-h-24 max-w-72":"max-w-36"} cursor-pointer text-left`),set_text(text_3,$$props.name)}),append( $$anchor3,button_1)};if_block(node_1,$$render=>{readonly2()?$$render(consequent_3):$$render(alternate,!1)})}append($$anchor2,fragment_1)},alternate_2=$$anchor2=>{var button_2=root_9$l();button_2.__click=function(...$$args){$$props.onClick?.apply(this,$$args)};var div_10=child(button_2),text_5=child(div_10,!0);reset(div_10);var div_11=sibling(div_10,2),span_3=child(div_11),text_6=child(span_3,!0);reset(span_3);var node_8=sibling(span_3,2);{var consequent_7=$$anchor3=>{var span_4=root_10$h(),text_7=child( span_4,!0);reset(span_4),template_effect(()=>set_text(text_7,get$4(pdfProcessingMode))),append($$anchor3,span_4)},alternate_1=$$anchor3=>{var fragment_2=comment$2(),node_9=first_child(fragment_2);{var consequent_8=$$anchor4=>{var span_5=root_12$8(),text_8=child(span_5,!0);reset(span_5),template_effect($0=>set_text(text_8,$0),[()=>formatFileSize($$props.size)]),append($$anchor4,span_5)};if_block(node_9,$$render=>{$$props.size&&$$render(consequent_8)},!0)}append($$anchor3,fragment_2)};if_block(node_8, $$render=>{get$4(pdfProcessingMode)?$$render(consequent_7):$$render(alternate_1,!1)})}reset(div_11);var node_10=sibling(div_11,2);{var consequent_9=$$anchor3=>{var div_12=root_13$c(),node_11=child(div_12);ActionIconRemove(node_11,{get id(){return $$props.id},get onRemove(){return $$props.onRemove}}),reset(div_12),append($$anchor3,div_12)};if_block(node_10,$$render=>{readonly2()||$$render(consequent_9)})}reset(button_2),template_effect(()=>{set_class(button_2,1,`group flex items-center gap-3 roun\ ded-lg border border-border bg-muted p-3 ${className()??""} relative`),set_text(text_5,get$4(fileTypeLabel)),set_class(span_3,1,`max-w-24 truncate text-sm font-medium text-foreground ${readonly2()?"":"group-hover:pr-6"} md:max-w-32`),set_text(text_6,$$props.name)}),append($$anchor2,button_2)};if_block(node2,$$render=>{get$4(isText)?$$render(consequent_6):$$render(alternate_2,!1)})}append($$anchor,fragment),pop()}delegate(["click"]);var root_1$T=from_html(''),root_2$$=from_html(""),root_3$R=from_html('
      '),root$1p=from_html("
      ");function ChatAttachmentThumbnailImage($$anchor,$$props){let readonly2=prop($$props,"readonly",3,!1),className=prop($$props,"class",3,""),width=prop($$props,"width",3,"\ w-auto"),height=prop($$props,"height",3,"h-16"),imageClass=prop($$props,"imageClass",3,"");var div=root$1p(),node2=child(div);{var consequent=$$anchor2=>{var button=root_1$T();button.__click=function(...$$args){$$props.onClick?.apply(this,$$args)};var img=child(button);reset(button),template_effect(()=>{set_attribute(button,"aria-label",`Preview ${$$props.name??""}`),set_attribute(img,"src",$$props.preview),set_attribute(img,"alt",$$props.name),set_class(img,1,`${height()??""} ${width()??""} cur\ sor-pointer object-cover ${imageClass()??""}`)}),append($$anchor2,button)},alternate=$$anchor2=>{var img_1=root_2$$();template_effect(()=>{set_attribute(img_1,"src",$$props.preview),set_attribute(img_1,"alt",$$props.name),set_class(img_1,1,`${height()??""} ${width()??""} cursor-pointer object-cover ${imageClass()??""}`)}),append($$anchor2,img_1)};if_block(node2,$$render=>{$$props.onClick?$$render(consequent):$$render(alternate,!1)})}var node_1=sibling(node2,2);{var consequent_1=$$anchor2=>{var div_1=root_3$R(), node_2=child(div_1);ActionIconRemove(node_2,{get id(){return $$props.id},get onRemove(){return $$props.onRemove},class:"text-white"}),reset(div_1),append($$anchor2,div_1)};if_block(node_1,$$render=>{readonly2()||$$render(consequent_1)})}reset(div),template_effect(()=>set_class(div,1,`group relative overflow-hidden rounded-lg bg-muted shadow-lg dark:border dark:border-muted ${className()??""}`)),append($$anchor,div)}delegate(["click"]);var root_1$S=from_html('

      '),root_3$Q=from_html('

      '),root$1o=from_html('
      ',1);function ChatAttachmentsViewAll($$anchor,$$props){push$1($$props,!0);let uploadedFiles=prop($$props,"uploadedFiles",19,()=>[]),attachments=prop( $$props,"attachments",19,()=>[]),readonly2=prop($$props,"readonly",3,!1),imageHeight=prop($$props,"imageHeight",3,"h-24"),imageWidth=prop($$props,"imageWidth",3,"w-auto"),imageClass=prop($$props,"imageClass",3,""),previewDialogOpen=state$1(!1),previewItem=state$1(null),displayItems=user_derived(()=>getAttachmentDisplayItems({uploadedFiles:uploadedFiles(),attachments:attachments()})),imageItems=user_derived(()=>get$4(displayItems).filter(item=>item.isImage)),fileItems=user_derived(()=>get$4(displayItems). filter(item=>!item.isImage));function openPreview(item,event2){event2&&(event2.preventDefault(),event2.stopPropagation()),set$1(previewItem,{uploadedFile:item.uploadedFile,attachment:item.attachment,preview:item.preview,name:item.name,size:item.size,textContent:item.textContent},!0),set$1(previewDialogOpen,!0)}var fragment=root$1o(),div=first_child(fragment),div_1=child(div),node2=child(div_1);{var consequent=$$anchor2=>{var div_2=root_1$S(),h3=child(div_2),text2=child(h3);reset(h3);var div_3=sibling( h3,2);each(div_3,21,()=>get$4(fileItems),item=>item.id,($$anchor3,item)=>{ChatAttachmentThumbnailFile($$anchor3,{class:"cursor-pointer",get id(){return get$4(item).id},get name(){return get$4(item).name},get size(){return get$4(item).size},get readonly(){return readonly2()},get onRemove(){return $$props.onFileRemove},get textContent(){return get$4(item).textContent},get attachment(){return get$4(item).attachment},get uploadedFile(){return get$4(item).uploadedFile},onClick:event2=>openPreview(get$4( item),event2)})}),reset(div_3),reset(div_2),template_effect(()=>set_text(text2,`Files (${get$4(fileItems).length??""})`)),append($$anchor2,div_2)};if_block(node2,$$render=>{get$4(fileItems).length>0&&$$render(consequent)})}var node_1=sibling(node2,2);{var consequent_2=$$anchor2=>{var div_4=root_3$Q(),h3_1=child(div_4),text_1=child(h3_1);reset(h3_1);var div_5=sibling(h3_1,2);each(div_5,21,()=>get$4(imageItems),item=>item.id,($$anchor3,item)=>{var fragment_2=comment$2(),node_2=first_child(fragment_2); {var consequent_1=$$anchor4=>{ChatAttachmentThumbnailImage($$anchor4,{class:"cursor-pointer",get id(){return get$4(item).id},get name(){return get$4(item).name},get preview(){return get$4(item).preview},get readonly(){return readonly2()},get onRemove(){return $$props.onFileRemove},get height(){return imageHeight()},get width(){return imageWidth()},get imageClass(){return imageClass()},onClick:event2=>openPreview(get$4(item),event2)})};if_block(node_2,$$render=>{get$4(item).preview&&$$render(consequent_1)})} append($$anchor3,fragment_2)}),reset(div_5),reset(div_4),template_effect(()=>set_text(text_1,`Images (${get$4(imageItems).length??""})`)),append($$anchor2,div_4)};if_block(node_1,$$render=>{get$4(imageItems).length>0&&$$render(consequent_2)})}reset(div_1),reset(div);var node_3=sibling(div,2);{var consequent_3=$$anchor2=>{DialogChatAttachmentPreview($$anchor2,{get uploadedFile(){return get$4(previewItem).uploadedFile},get attachment(){return get$4(previewItem).attachment},get preview(){return get$4( previewItem).preview},get name(){return get$4(previewItem).name},get size(){return get$4(previewItem).size},get textContent(){return get$4(previewItem).textContent},get activeModelId(){return $$props.activeModelId},get open(){return get$4(previewDialogOpen)},set open($$value){set$1(previewDialogOpen,$$value,!0)}})};if_block(node_3,$$render=>{get$4(previewItem)&&$$render(consequent_3)})}append($$anchor,fragment),pop()}function Dialog_title($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props, "ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("text-lg leading-none font-semibold",$$props.class));component(node2,()=>Dialog_title$1,($$anchor2,DialogPrimitive_Title)=>{DialogPrimitive_Title($$anchor2,spread_props({"data-slot":"dialog-title",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment), pop()}var root$1n=from_html("
      ");function Dialog_footer($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$1n();attribute_effect(div,$0=>({"data-slot":"dialog-footer",class:$0,...restProps}),[()=>cn$1("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div, $$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}var root$1m=from_html("
      ");function Dialog_header($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$1m();attribute_effect(div,$0=>({"data-slot":"dialog-header",class:$0,...restProps}),[()=>cn$1("flex flex-col gap-2 text-center sm:text-left",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props. children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}function Dialog_overlay($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=\ open]:fade-in-0",$$props.class));component(node2,()=>Dialog_overlay$1,($$anchor2,DialogPrimitive_Overlay)=>{DialogPrimitive_Overlay($$anchor2,spread_props({"data-slot":"dialog-overlay",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}var root_4$v=from_html(' Close',1),root_2$_=from_html(" ",1),root_1$R=from_html(" ",1);function Dialog_content($$anchor,$$props){push$1( $$props,!0);let ref2=prop($$props,"ref",15,null),showCloseButton=prop($$props,"showCloseButton",3,!0),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","portalProps","children","showCloseButton"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Portal$1,($$anchor2,Dialog_Portal)=>{Dialog_Portal($$anchor2,spread_props(()=>$$props.portalProps,{children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$R(),node_1=first_child(fragment_1);component(node_1, ()=>Dialog_overlay,($$anchor4,Dialog_Overlay)=>{Dialog_Overlay($$anchor4,{})});var node_2=sibling(node_1,2);{let $0=user_derived(()=>cn$1("fixed top-[50%] left-[50%] z-50 grid max-h-[100dvh] w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 overflow-y-auto rounded-lg border border-border/30 bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:\ fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg md:max-h-[100vh]",$$props.class));component(node_2,()=>Dialog_content$1,($$anchor4,DialogPrimitive_Content)=>{DialogPrimitive_Content($$anchor4,spread_props({"data-slot":"dialog-content",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$_(),node_3=first_child(fragment_2);snippet(node_3,()=>$$props.children??noop$3);var node_4=sibling(node_3, 2);{var consequent=$$anchor6=>{var fragment_3=comment$2(),node_5=first_child(fragment_3);component(node_5,()=>Dialog_close,($$anchor7,DialogPrimitive_Close)=>{DialogPrimitive_Close($$anchor7,{class:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:($$anchor8,$$slotProps3)=>{ var fragment_4=root_4$v(),node_6=first_child(fragment_4);X(node_6,{}),next$1(2),append($$anchor8,fragment_4)},$$slots:{default:!0}})}),append($$anchor6,fragment_3)};if_block(node_4,$$render=>{showCloseButton()&&$$render(consequent)})}append($$anchor5,fragment_2)},$$slots:{default:!0}}))})}append($$anchor3,fragment_1)},$$slots:{default:!0}}))}),append($$anchor,fragment),pop()}function Dialog_description($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props( $$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("text-sm text-muted-foreground",$$props.class));component(node2,()=>Dialog_description$1,($$anchor2,DialogPrimitive_Description)=>{DialogPrimitive_Description($$anchor2,spread_props({"data-slot":"dialog-description",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}const Root$4=Dialog, Portal$1=Portal$2;function DialogChatSettings($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",3,!1),chatSettingsRef=state$1(void 0);function handleClose(){$$props.onOpenChange?.(!1)}function handleSave(){$$props.onOpenChange?.(!1)}user_effect(()=>{open2()&&get$4(chatSettingsRef)&&get$4(chatSettingsRef).reset()});var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$4,($$anchor2,Dialog_Root)=>{Dialog_Root($$anchor2,{get open(){return open2()},onOpenChange:handleClose, children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Dialog_content,($$anchor4,Dialog_Content)=>{Dialog_Content($$anchor4,{class:`z-999999 flex h-[100dvh] max-h-[100dvh] min-h-[100dvh] max-w-4xl! flex-col gap-0 rounded-none p-0 md:h-[64vh] md:max-h-[64vh] md:min-h-0 md:rounded-lg`,children:($$anchor5,$$slotProps2)=>{bind_this(ChatSettings($$anchor5,{onSave:handleSave,get initialSection(){return $$props.initialSection}}),$$value=>set$1(chatSettingsRef,$$value,!0),()=>get$4(chatSettingsRef))},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}function Alert_dialog_title($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props( $$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("text-lg font-semibold",$$props.class));component(node2,()=>Dialog_title$1,($$anchor2,AlertDialogPrimitive_Title)=>{AlertDialogPrimitive_Title($$anchor2,spread_props({"data-slot":"alert-dialog-title",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}function Alert_dialog_action($$anchor,$$props){ push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1(buttonVariants(),$$props.class));component(node2,()=>Alert_dialog_action$1,($$anchor2,AlertDialogPrimitive_Action)=>{AlertDialogPrimitive_Action($$anchor2,spread_props({"data-slot":"alert-dialog-action",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ ref2($$value)}}))})}append($$anchor,fragment),pop()}function Alert_dialog_cancel($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1(buttonVariants({variant:"outline"}),$$props.class));component(node2,()=>Alert_dialog_cancel$1,($$anchor2,AlertDialogPrimitive_Cancel)=>{AlertDialogPrimitive_Cancel($$anchor2,spread_props( {"data-slot":"alert-dialog-cancel",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}var root$1l=from_html("
      ");function Alert_dialog_footer($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$1l();attribute_effect(div,$0=>({"data-slot":"alert-dialog-footer",class:$0,...restProps}), [()=>cn$1("mt-6 flex flex-row gap-2 sm:mt-0 sm:justify-end [&>*]:flex-1 sm:[&>*]:flex-none",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}var root$1k=from_html("
      ");function Alert_dialog_header($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$1k(); attribute_effect(div,$0=>({"data-slot":"alert-dialog-header",class:$0,...restProps}),[()=>cn$1("flex flex-col gap-2 text-center sm:text-left",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}function Alert_dialog_overlay($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(), node2=first_child(fragment);{let $0=user_derived(()=>cn$1("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",$$props.class));component(node2,()=>Dialog_overlay$1,($$anchor2,AlertDialogPrimitive_Overlay)=>{AlertDialogPrimitive_Overlay($$anchor2,spread_props({"data-slot":"alert-dialog-overlay",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})} append($$anchor,fragment),pop()}var root_1$Q=from_html(" ",1);function Alert_dialog_content($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","portalProps"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Portal$2,($$anchor2,AlertDialogPrimitive_Portal)=>{AlertDialogPrimitive_Portal($$anchor2,spread_props(()=>$$props.portalProps,{children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$Q(), node_1=first_child(fragment_1);Alert_dialog_overlay(node_1,{});var node_2=sibling(node_1,2);{let $0=user_derived(()=>cn$1("fixed z-[999999] grid w-full gap-4 border bg-background p-6 shadow-lg duration-200","right-0 bottom-0 left-0 max-h-[100dvh] translate-x-0 translate-y-0 overflow-y-auto rounded-t-lg","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-bottom-full","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:slide-in-\ from-bottom-full","sm:top-[50%] sm:right-auto sm:bottom-auto sm:left-[50%] sm:max-h-[100vh] sm:max-w-lg sm:translate-x-[-50%] sm:translate-y-[-50%] sm:rounded-lg","sm:data-[state=closed]:slide-out-to-bottom-0 sm:data-[state=closed]:zoom-out-95","sm:data-[state=open]:slide-in-from-bottom-0 sm:data-[state=open]:zoom-in-95",$$props.class));component(node_2,()=>Alert_dialog_content$1,($$anchor4,AlertDialogPrimitive_Content)=>{AlertDialogPrimitive_Content($$anchor4,spread_props({"data-slot":"alert-di\ alog-content",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor3,fragment_1)},$$slots:{default:!0}}))}),append($$anchor,fragment),pop()}function Alert_dialog_description($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("text-sm text-muted-f\ oreground",$$props.class));component(node2,()=>Dialog_description$1,($$anchor2,AlertDialogPrimitive_Description)=>{AlertDialogPrimitive_Description($$anchor2,spread_props({"data-slot":"alert-dialog-description",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}const Root$3=Alert_dialog,Portal=Portal$2;var root_4$u=from_html(" ",1),root_3$P=from_html(" ",1),root_8$m=from_html(" ",1),root_2$Z=from_html( " ",1);function DialogConfirmation($$anchor,$$props){push$1($$props,!0);let confirmText=prop($$props,"confirmText",3,"Confirm"),cancelText=prop($$props,"cancelText",3,"Cancel"),variant=prop($$props,"variant",3,"default");function handleKeydown(event2){event2.key===KeyboardKey.ENTER&&(event2.preventDefault(),$$props.onConfirm()),$$props.onKeydown?.(event2)}function handleOpenChange(newOpen){newOpen||$$props.onCancel()}var fragment=comment$2(),node2=first_child(fragment);component(node2, ()=>Root$3,($$anchor2,AlertDialog_Root)=>{AlertDialog_Root($$anchor2,{get open(){return $$props.open},onOpenChange:handleOpenChange,children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Alert_dialog_content,($$anchor4,AlertDialog_Content)=>{AlertDialog_Content($$anchor4,{onkeydown:handleKeydown,children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$Z(),node_2=first_child(fragment_2);component(node_2,()=>Alert_dialog_header,($$anchor6,AlertDialog_Header)=>{ AlertDialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$P(),node_3=first_child(fragment_3);component(node_3,()=>Alert_dialog_title,($$anchor8,AlertDialog_Title)=>{AlertDialog_Title($$anchor8,{class:"flex items-center gap-2",children:($$anchor9,$$slotProps4)=>{var fragment_4=root_4$u(),node_4=first_child(fragment_4);{var consequent=$$anchor10=>{const IconComponent=user_derived(()=>$$props.icon);var fragment_5=comment$2(),node_5=first_child(fragment_5);{let $0=user_derived( ()=>variant()==="destructive"?"text-destructive":"");component(node_5,()=>get$4(IconComponent),($$anchor11,IconComponent_1)=>{IconComponent_1($$anchor11,{get class(){return`h-5 w-5 ${get$4($0)??""}`}})})}append($$anchor10,fragment_5)};if_block(node_4,$$render=>{$$props.icon&&$$render(consequent)})}var text2=sibling(node_4);template_effect(()=>set_text(text2,` ${$$props.title??""}`)),append($$anchor9,fragment_4)},$$slots:{default:!0}})});var node_6=sibling(node_3,2);component(node_6,()=>Alert_dialog_description, ($$anchor8,AlertDialog_Description)=>{AlertDialog_Description($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text_1=text$8();template_effect(()=>set_text(text_1,$$props.description)),append($$anchor9,text_1)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var node_7=sibling(node_2,2);{var consequent_1=$$anchor6=>{var fragment_7=comment$2(),node_8=first_child(fragment_7);snippet(node_8,()=>$$props.children),append($$anchor6,fragment_7)};if_block(node_7, $$render=>{$$props.children&&$$render(consequent_1)})}var node_9=sibling(node_7,2);component(node_9,()=>Alert_dialog_footer,($$anchor6,AlertDialog_Footer)=>{AlertDialog_Footer($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_8=root_8$m(),node_10=first_child(fragment_8);component(node_10,()=>Alert_dialog_cancel,($$anchor8,AlertDialog_Cancel)=>{AlertDialog_Cancel($$anchor8,{get onclick(){return $$props.onCancel},children:($$anchor9,$$slotProps4)=>{next$1();var text_2=text$8();template_effect( ()=>set_text(text_2,cancelText())),append($$anchor9,text_2)},$$slots:{default:!0}})});var node_11=sibling(node_10,2);{let $0=user_derived(()=>variant()==="destructive"?"bg-destructive text-white hover:bg-destructive/80":"");component(node_11,()=>Alert_dialog_action,($$anchor8,AlertDialog_Action)=>{AlertDialog_Action($$anchor8,{get onclick(){return $$props.onConfirm},get class(){return get$4($0)},children:($$anchor9,$$slotProps4)=>{next$1();var text_3=text$8();template_effect(()=>set_text(text_3, confirmText())),append($$anchor9,text_3)},$$slots:{default:!0}})})}append($$anchor7,fragment_8)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_3$O=from_html(" ",1),root_6$w=from_html(" ",1),root_2$Y=from_html('

      Current title:

      New title would be:

      ',1);function DialogConversationTitleUpdate($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$3,($$anchor2,AlertDialog_Root)=>{AlertDialog_Root($$anchor2,{get open(){return open2()}, set open($$value){open2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Alert_dialog_content,($$anchor4,AlertDialog_Content)=>{AlertDialog_Content($$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$Y(),node_2=first_child(fragment_2);component(node_2,()=>Alert_dialog_header,($$anchor6,AlertDialog_Header)=>{AlertDialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$O(),node_3=first_child( fragment_3);component(node_3,()=>Alert_dialog_title,($$anchor8,AlertDialog_Title)=>{AlertDialog_Title($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text2=text$8("Update Conversation Title?");append($$anchor9,text2)},$$slots:{default:!0}})});var node_4=sibling(node_3,2);component(node_4,()=>Alert_dialog_description,($$anchor8,AlertDialog_Description)=>{AlertDialog_Description($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text_1=text$8("Do you want to update the convers\ ation title to match the first message content?");append($$anchor9,text_1)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var div=sibling(node_2,2),div_1=child(div),p2=sibling(child(div_1),2),text_2=child(p2,!0);reset(p2),reset(div_1);var div_2=sibling(div_1,2),p_1=sibling(child(div_2),2),text_3=child(p_1,!0);reset(p_1),reset(div_2),reset(div);var node_5=sibling(div,2);component(node_5,()=>Alert_dialog_footer,($$anchor6,AlertDialog_Footer)=>{AlertDialog_Footer($$anchor6, {children:($$anchor7,$$slotProps3)=>{var fragment_4=root_6$w(),node_6=first_child(fragment_4);Button(node_6,{variant:"outline",get onclick(){return $$props.onCancel},children:($$anchor8,$$slotProps4)=>{next$1();var text_4=text$8("Keep Current Title");append($$anchor8,text_4)},$$slots:{default:!0}});var node_7=sibling(node_6,2);Button(node_7,{get onclick(){return $$props.onConfirm},children:($$anchor8,$$slotProps4)=>{next$1();var text_5=text$8("Update Title");append($$anchor8,text_5)},$$slots:{default:!0}}), append($$anchor7,fragment_4)},$$slots:{default:!0}})}),template_effect(()=>{set_text(text_2,$$props.currentTitle),set_text(text_3,$$props.newTitle)}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_4$t=from_html(' Close preview',1),root_3$N=from_html(' ',1),root_2$X=from_html(" ",1);function DialogCodePreview($$anchor,$$props){ push$1($$props,!0);let open2=prop($$props,"open",15),iframeRef=state$1(null);user_effect(()=>{get$4(iframeRef)&&(open2()?get$4(iframeRef).srcdoc=$$props.code:get$4(iframeRef).srcdoc="")});function handleOpenChange(nextOpen){open2(nextOpen),$$props.onOpenChange?.(nextOpen)}var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Dialog,($$anchor2,DialogPrimitive_Root)=>{DialogPrimitive_Root($$anchor2,{get open(){return open2()},onOpenChange:handleOpenChange,children:($$anchor3,$$slotProps)=>{ var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Portal$2,($$anchor4,DialogPrimitive_Portal)=>{DialogPrimitive_Portal($$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$X(),node_2=first_child(fragment_2);component(node_2,()=>Dialog_overlay$1,($$anchor6,DialogPrimitive_Overlay)=>{DialogPrimitive_Overlay($$anchor6,{class:"code-preview-overlay"})});var node_3=sibling(node_2,2);component(node_3,()=>Dialog_content$1,($$anchor6,DialogPrimitive_Content)=>{ DialogPrimitive_Content($$anchor6,{class:"code-preview-content",children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$N(),iframe=first_child(fragment_3);bind_this(iframe,$$value=>set$1(iframeRef,$$value),()=>get$4(iframeRef));var node_4=sibling(iframe,2);component(node_4,()=>Dialog_close,($$anchor8,DialogPrimitive_Close)=>{DialogPrimitive_Close($$anchor8,{class:"code-preview-close absolute top-4 right-4 border-none bg-transparent text-white opacity-70 mix-blend-difference transition-opacity \ hover:opacity-100 focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:outline-none disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-8","aria-label":"Close preview",children:($$anchor9,$$slotProps4)=>{var fragment_4=root_4$t(),node_5=first_child(fragment_4);X(node_5,{}),next$1(2),append($$anchor9,fragment_4)},$$slots:{default:!0}})}),template_effect(()=>set_attribute(iframe,"title",`Preview ${$$props.language??""}`)),append($$anchor7, fragment_3)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_3$M=from_html(" ",1),root_2$W=from_html(" ",1);function DialogChatAttachmentPreview($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15),chatAttachmentPreviewRef=state$1(void 0),displayName=user_derived(()=>$$props.uploadedFile?.name||$$props.attachment?.name||$$props.name||"Unkno\ wn File"),displaySize=user_derived(()=>$$props.uploadedFile?.size||$$props.size);user_effect(()=>{open2()&&get$4(chatAttachmentPreviewRef)&&get$4(chatAttachmentPreviewRef).reset()});var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$4,($$anchor2,Dialog_Root)=>{Dialog_Root($$anchor2,{get onOpenChange(){return $$props.onOpenChange},get open(){return open2()},set open($$value){open2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child( fragment_1);component(node_1,()=>Dialog_content,($$anchor4,Dialog_Content)=>{Dialog_Content($$anchor4,{class:"grid max-h-[90vh] max-w-5xl overflow-hidden sm:w-auto sm:max-w-6xl",children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$W(),node_2=first_child(fragment_2);component(node_2,()=>Dialog_header,($$anchor6,Dialog_Header)=>{Dialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$M(),node_3=first_child(fragment_3);component(node_3,()=>Dialog_title,($$anchor8,Dialog_Title)=>{ Dialog_Title($$anchor8,{class:"pr-8",children:($$anchor9,$$slotProps4)=>{next$1();var text2=text$8();template_effect(()=>set_text(text2,get$4(displayName))),append($$anchor9,text2)},$$slots:{default:!0}})});var node_4=sibling(node_3,2);component(node_4,()=>Dialog_description,($$anchor8,Dialog_Description)=>{Dialog_Description($$anchor8,{children:($$anchor9,$$slotProps4)=>{var fragment_5=comment$2(),node_5=first_child(fragment_5);{var consequent=$$anchor10=>{var text_1=text$8();template_effect($0=>set_text( text_1,$0),[()=>formatFileSize(get$4(displaySize))]),append($$anchor10,text_1)};if_block(node_5,$$render=>{get$4(displaySize)&&$$render(consequent)})}append($$anchor9,fragment_5)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var node_6=sibling(node_2,2);bind_this(ChatAttachmentPreview(node_6,{get uploadedFile(){return $$props.uploadedFile},get attachment(){return $$props.attachment},get preview(){return $$props.preview},get name(){return get$4(displayName)},get textContent(){ return $$props.textContent},get activeModelId(){return $$props.activeModelId}}),$$value=>set$1(chatAttachmentPreviewRef,$$value,!0),()=>get$4(chatAttachmentPreviewRef)),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_4$s=from_html(" ",1),root_3$L=from_html(" ",1),root_2$V=from_html(" ",1);function DialogChatAttachmentsViewAll($$anchor,$$props){push$1($$props,!0);let open2=prop( $$props,"open",15,!1),uploadedFiles=prop($$props,"uploadedFiles",19,()=>[]),attachments=prop($$props,"attachments",19,()=>[]),readonly2=prop($$props,"readonly",3,!1),imageHeight=prop($$props,"imageHeight",3,"h-24"),imageWidth=prop($$props,"imageWidth",3,"w-auto"),imageClass=prop($$props,"imageClass",3,""),totalCount=user_derived(()=>uploadedFiles().length+attachments().length);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$4,($$anchor2,Dialog_Root)=>{Dialog_Root($$anchor2, {get open(){return open2()},set open($$value){open2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Portal$1,($$anchor4,Dialog_Portal)=>{Dialog_Portal($$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$V(),node_2=first_child(fragment_2);component(node_2,()=>Dialog_overlay,($$anchor6,Dialog_Overlay)=>{Dialog_Overlay($$anchor6,{})});var node_3=sibling(node_2,2);component(node_3,()=>Dialog_content,($$anchor6,Dialog_Content)=>{ Dialog_Content($$anchor6,{class:"flex !max-h-[90vh] !max-w-6xl flex-col",children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$L(),node_4=first_child(fragment_3);component(node_4,()=>Dialog_header,($$anchor8,Dialog_Header)=>{Dialog_Header($$anchor8,{children:($$anchor9,$$slotProps4)=>{var fragment_4=root_4$s(),node_5=first_child(fragment_4);component(node_5,()=>Dialog_title,($$anchor10,Dialog_Title)=>{Dialog_Title($$anchor10,{children:($$anchor11,$$slotProps5)=>{next$1();var text2=text$8();template_effect( ()=>set_text(text2,`All Attachments (${get$4(totalCount)??""})`)),append($$anchor11,text2)},$$slots:{default:!0}})});var node_6=sibling(node_5,2);component(node_6,()=>Dialog_description,($$anchor10,Dialog_Description)=>{Dialog_Description($$anchor10,{children:($$anchor11,$$slotProps5)=>{next$1();var text_1=text$8("View and manage all attached files");append($$anchor11,text_1)},$$slots:{default:!0}})}),append($$anchor9,fragment_4)},$$slots:{default:!0}})});var node_7=sibling(node_4,2);ChatAttachmentsViewAll( node_7,{get uploadedFiles(){return uploadedFiles()},get attachments(){return attachments()},get readonly(){return readonly2()},get onFileRemove(){return $$props.onFileRemove},get imageHeight(){return imageHeight()},get imageWidth(){return imageWidth()},get imageClass(){return imageClass()},get activeModelId(){return $$props.activeModelId}}),append($$anchor7,fragment_3)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}), append($$anchor,fragment),pop()}var root_4$r=from_html(" ",1),root_3$K=from_html(" ",1),root_9$k=from_html('

      Context size:

      '),root_8$l=from_html('

      Prompt tokens:

      '),root_2$U=from_html('

      ',1);function DialogChatError($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15);const isTimeout=user_derived( ()=>$$props.type===ErrorDialogType.TIMEOUT),title2=user_derived(()=>get$4(isTimeout)?"TCP Timeout":"Server Error"),description2=user_derived(()=>get$4(isTimeout)?"The request did not receive a response from the server before timing out.":"The server responded with an error message. Review the details below."),iconClass=user_derived(()=>get$4(isTimeout)?"text-destructive":"text-amber-500"),badgeClass=user_derived(()=>get$4(isTimeout)?"border-destructive/40 bg-destructive/10 text-destructive":"bor\ der-amber-500/40 bg-amber-500/10 text-amber-600 dark:text-amber-400");function handleOpenChange(newOpen){open2(newOpen),$$props.onOpenChange?.(newOpen)}var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$3,($$anchor2,AlertDialog_Root)=>{AlertDialog_Root($$anchor2,{get open(){return open2()},onOpenChange:handleOpenChange,children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Alert_dialog_content,($$anchor4,AlertDialog_Content)=>{ AlertDialog_Content($$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$U(),node_2=first_child(fragment_2);component(node_2,()=>Alert_dialog_header,($$anchor6,AlertDialog_Header)=>{AlertDialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$K(),node_3=first_child(fragment_3);component(node_3,()=>Alert_dialog_title,($$anchor8,AlertDialog_Title)=>{AlertDialog_Title($$anchor8,{class:"flex items-center gap-2",children:($$anchor9,$$slotProps4)=>{var fragment_4=root_4$r(), node_4=first_child(fragment_4);{var consequent=$$anchor10=>{{let $0=user_derived(()=>`h-5 w-5 ${get$4(iconClass)}`);Timer_off($$anchor10,{get class(){return get$4($0)}})}},alternate=$$anchor10=>{{let $0=user_derived(()=>`h-5 w-5 ${get$4(iconClass)}`);Triangle_alert($$anchor10,{get class(){return get$4($0)}})}};if_block(node_4,$$render=>{get$4(isTimeout)?$$render(consequent):$$render(alternate,!1)})}var text2=sibling(node_4);template_effect(()=>set_text(text2,` ${get$4(title2)??""}`)),append($$anchor9, fragment_4)},$$slots:{default:!0}})});var node_5=sibling(node_3,2);component(node_5,()=>Alert_dialog_description,($$anchor8,AlertDialog_Description)=>{AlertDialog_Description($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text_1=text$8();template_effect(()=>set_text(text_1,get$4(description2))),append($$anchor9,text_1)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var div=sibling(node_2,2),p2=child(div),text_2=child(p2,!0);reset(p2);var node_6=sibling( p2,2);{var consequent_2=$$anchor6=>{var div_1=root_8$l(),p_1=child(div_1),text_3=sibling(child(p_1));reset(p_1);var node_7=sibling(p_1,2);{var consequent_1=$$anchor7=>{var p_2=root_9$k(),text_4=sibling(child(p_2));reset(p_2),template_effect($0=>set_text(text_4,` ${$0??""}`),[()=>$$props.contextInfo.n_ctx.toLocaleString()]),append($$anchor7,p_2)};if_block(node_7,$$render=>{$$props.contextInfo.n_ctx&&$$render(consequent_1)})}reset(div_1),template_effect($0=>set_text(text_3,` ${$0??""}`),[()=>$$props. contextInfo.n_prompt_tokens.toLocaleString()]),append($$anchor6,div_1)};if_block(node_6,$$render=>{$$props.contextInfo&&$$render(consequent_2)})}reset(div);var node_8=sibling(div,2);component(node_8,()=>Alert_dialog_footer,($$anchor6,AlertDialog_Footer)=>{AlertDialog_Footer($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_8=comment$2(),node_9=first_child(fragment_8);component(node_9,()=>Alert_dialog_action,($$anchor8,AlertDialog_Action)=>{AlertDialog_Action($$anchor8,{onclick:()=>handleOpenChange( !1),children:($$anchor9,$$slotProps4)=>{next$1();var text_5=text$8("Close");append($$anchor9,text_5)},$$slots:{default:!0}})}),append($$anchor7,fragment_8)},$$slots:{default:!0}})}),template_effect(()=>{set_class(div,1,`rounded-lg border px-4 py-3 text-sm ${get$4(badgeClass)}`),set_text(text_2,$$props.message)}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_4$q=from_html(" Empty Files Dete\ cted",1),root_3$J=from_html(" ",1),root_6$v=from_html('
    1. '),root_2$T=from_html('
      Empty Files:
        What happened:
        • Empty files cannot be processed or sent to the AI model\
        • These files have been automatically removed from your attachments
        • You can try uploading files with content instead
        ',1);function DialogEmptyFileAlert($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15);function handleOpenChange(newOpen){open2(newOpen),$$props.onOpenChange?.(newOpen)}var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$3,($$anchor2,AlertDialog_Root)=>{AlertDialog_Root($$anchor2,{get open(){return open2()}, onOpenChange:handleOpenChange,children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Alert_dialog_content,($$anchor4,AlertDialog_Content)=>{AlertDialog_Content($$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$T(),node_2=first_child(fragment_2);component(node_2,()=>Alert_dialog_header,($$anchor6,AlertDialog_Header)=>{AlertDialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$J(),node_3=first_child( fragment_3);component(node_3,()=>Alert_dialog_title,($$anchor8,AlertDialog_Title)=>{AlertDialog_Title($$anchor8,{class:"flex items-center gap-2",children:($$anchor9,$$slotProps4)=>{var fragment_4=root_4$q(),node_4=first_child(fragment_4);File_x(node_4,{class:"h-5 w-5 text-destructive"}),next$1(),append($$anchor9,fragment_4)},$$slots:{default:!0}})});var node_5=sibling(node_3,2);component(node_5,()=>Alert_dialog_description,($$anchor8,AlertDialog_Description)=>{AlertDialog_Description($$anchor8,{ children:($$anchor9,$$slotProps4)=>{next$1();var text2=text$8("The following files are empty and have been removed from your attachments:");append($$anchor9,text2)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var div=sibling(node_2,2),div_1=child(div),ul=sibling(child(div_1),2);each(ul,20,()=>$$props.emptyFiles,fileName=>fileName,($$anchor6,fileName)=>{var li2=root_6$v(),text_1=child(li2,!0);reset(li2),template_effect(()=>set_text(text_1,fileName)),append($$anchor6, li2)}),reset(ul),reset(div_1),next$1(2),reset(div);var node_6=sibling(div,2);component(node_6,()=>Alert_dialog_footer,($$anchor6,AlertDialog_Footer)=>{AlertDialog_Footer($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_5=comment$2(),node_7=first_child(fragment_5);component(node_7,()=>Alert_dialog_action,($$anchor8,AlertDialog_Action)=>{AlertDialog_Action($$anchor8,{onclick:()=>handleOpenChange(!1),children:($$anchor9,$$slotProps4)=>{next$1();var text_2=text$8("Got it");append($$anchor9, text_2)},$$slots:{default:!0}})}),append($$anchor7,fragment_5)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_4$p=from_html(" Model Not Available",1),root_3$I=from_html(" ",1),root_7$q=from_html(''),root_6$u=from_html('

        Select an available model:

        '),root_2$S=from_html('

        Requested:\

        ',1);function DialogModelNotAvailable($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15),availableModels=prop($$props,"availableModels",19,()=>[]);function handleOpenChange(newOpen){open2(newOpen),$$props.onOpenChange?.(newOpen)}function handleSelectModel(model){const url2=new URL(page$1.url);url2.searchParams.set("model",model),handleOpenChange(!1),goto(url2.toString())}var fragment=comment$2(), node2=first_child(fragment);component(node2,()=>Root$3,($$anchor2,AlertDialog_Root)=>{AlertDialog_Root($$anchor2,{get open(){return open2()},onOpenChange:handleOpenChange,children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Alert_dialog_content,($$anchor4,AlertDialog_Content)=>{AlertDialog_Content($$anchor4,{class:"max-w-lg",children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$S(),node_2=first_child(fragment_2);component(node_2,()=>Alert_dialog_header, ($$anchor6,AlertDialog_Header)=>{AlertDialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$I(),node_3=first_child(fragment_3);component(node_3,()=>Alert_dialog_title,($$anchor8,AlertDialog_Title)=>{AlertDialog_Title($$anchor8,{class:"flex items-center gap-2",children:($$anchor9,$$slotProps4)=>{var fragment_4=root_4$p(),node_4=first_child(fragment_4);Triangle_alert(node_4,{class:"h-5 w-5 text-amber-500"}),next$1(),append($$anchor9,fragment_4)},$$slots:{default:!0}})}); var node_5=sibling(node_3,2);component(node_5,()=>Alert_dialog_description,($$anchor8,AlertDialog_Description)=>{AlertDialog_Description($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text2=text$8("The requested model could not be found. Select an available model to continue.");append($$anchor9,text2)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var div=sibling(node_2,2),div_1=child(div),p2=child(div_1),code2=sibling(child(p2)),text_1=child(code2, !0);reset(code2),reset(p2),reset(div_1);var node_6=sibling(div_1,2);{var consequent=$$anchor6=>{var div_2=root_6$u(),div_3=sibling(child(div_2),2);each(div_3,20,availableModels,model=>model,($$anchor7,model)=>{var button=root_7$q();button.__click=()=>handleSelectModel(model);var span=child(button),text_2=child(span,!0);reset(span);var node_7=sibling(span,2);Arrow_right(node_7,{class:"h-4 w-4 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"}),reset(button),template_effect( ()=>set_text(text_2,model)),append($$anchor7,button)}),reset(div_3),reset(div_2),append($$anchor6,div_2)};if_block(node_6,$$render=>{availableModels().length>0&&$$render(consequent)})}reset(div);var node_8=sibling(div,2);component(node_8,()=>Alert_dialog_footer,($$anchor6,AlertDialog_Footer)=>{AlertDialog_Footer($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_5=comment$2(),node_9=first_child(fragment_5);component(node_9,()=>Alert_dialog_action,($$anchor8,AlertDialog_Action)=>{AlertDialog_Action( $$anchor8,{onclick:()=>handleOpenChange(!1),children:($$anchor9,$$slotProps4)=>{next$1();var text_3=text$8("Cancel");append($$anchor9,text_3)},$$slots:{default:!0}})}),append($$anchor7,fragment_5)},$$slots:{default:!0}})}),template_effect(()=>set_text(text_1,$$props.modelName)),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}delegate(["click"]);var root_4$o=from_html(" ",1),root_3$H=from_html("\ ",1),root_2$R=from_html(" ",1);function DialogConversationSelection($$anchor,$$props){push$1($$props,!0);let messageCountMap=prop($$props,"messageCountMap",19,()=>new Map),open2=prop($$props,"open",15,!1),conversationSelectionRef=state$1(void 0),previousOpen=state$1(!1);user_effect(()=>{open2()&&!get$4(previousOpen)&&get$4(conversationSelectionRef)?get$4(conversationSelectionRef).reset():!open2()&&get$4(previousOpen)&&$$props.onCancel(),set$1(previousOpen,open2(),!0)});var fragment=comment$2(), node2=first_child(fragment);component(node2,()=>Root$4,($$anchor2,Dialog_Root)=>{Dialog_Root($$anchor2,{get open(){return open2()},set open($$value){open2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Portal$1,($$anchor4,Dialog_Portal)=>{Dialog_Portal($$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$R(),node_2=first_child(fragment_2);component(node_2,()=>Dialog_overlay,($$anchor6,Dialog_Overlay)=>{Dialog_Overlay( $$anchor6,{class:"z-[1000000]"})});var node_3=sibling(node_2,2);component(node_3,()=>Dialog_content,($$anchor6,Dialog_Content)=>{Dialog_Content($$anchor6,{class:"z-[1000001] max-w-2xl",children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$H(),node_4=first_child(fragment_3);component(node_4,()=>Dialog_header,($$anchor8,Dialog_Header)=>{Dialog_Header($$anchor8,{children:($$anchor9,$$slotProps4)=>{var fragment_4=root_4$o(),node_5=first_child(fragment_4);component(node_5,()=>Dialog_title,($$anchor10,Dialog_Title)=>{ Dialog_Title($$anchor10,{children:($$anchor11,$$slotProps5)=>{next$1();var text2=text$8();template_effect(()=>set_text(text2,`Select Conversations to ${$$props.mode==="export"?"Export":"Import"}`)),append($$anchor11,text2)},$$slots:{default:!0}})});var node_6=sibling(node_5,2);component(node_6,()=>Dialog_description,($$anchor10,Dialog_Description)=>{Dialog_Description($$anchor10,{children:($$anchor11,$$slotProps5)=>{var fragment_6=comment$2(),node_7=first_child(fragment_6);{var consequent=$$anchor12=>{ var text_1=text$8(`Choose which conversations you want to export. Selected conversations will be downloaded as a JSON file.`);append($$anchor12,text_1)},alternate=$$anchor12=>{var text_2=text$8(`Choose which conversations you want to import. Selected conversations will be merged with your existing conversations.`);append($$anchor12,text_2)};if_block(node_7,$$render=>{$$props.mode==="export"?$$render(consequent):$$render(alternate,!1)})}append($$anchor11,fragment_6)},$$slots:{default:!0}})}),append($$anchor9,fragment_4)},$$slots:{default:!0}})});var node_8=sibling(node_4,2);bind_this(ConversationSelection(node_8,{get conversations(){return $$props.conversations},get messageCountMap(){return messageCountMap()},get mode(){return $$props.mode},get onCancel(){return $$props. onCancel},get onConfirm(){return $$props.onConfirm}}),$$value=>set$1(conversationSelectionRef,$$value,!0),()=>get$4(conversationSelectionRef)),append($$anchor7,fragment_3)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root$1j=from_html('
        ');function Table($$anchor,$$props){push$1( $$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$1j(),table2=child(div);attribute_effect(table2,$0=>({"data-slot":"table",class:$0,...restProps}),[()=>cn$1("w-full caption-bottom text-sm",$$props.class)]);var node2=child(table2);snippet(node2,()=>$$props.children??noop$3),reset(table2),bind_this(table2,$$value=>ref2($$value),()=>ref2()),reset(div),append($$anchor,div),pop()}var root$1i=from_html( "");function Table_body($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var tbody2=root$1i();attribute_effect(tbody2,$0=>({"data-slot":"table-body",class:$0,...restProps}),[()=>cn$1("[&_tr:last-child]:border-0",$$props.class)]);var node2=child(tbody2);snippet(node2,()=>$$props.children??noop$3),reset(tbody2),bind_this(tbody2,$$value=>ref2($$value),()=>ref2()),append( $$anchor,tbody2),pop()}var root$1h=from_html("");function Table_cell($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var td=root$1h();attribute_effect(td,$0=>({"data-slot":"table-cell",class:$0,...restProps}),[()=>cn$1("bg-clip-padding p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pe-0",$$props.class)]);var node2=child(td);snippet(node2,()=>$$props.children?? noop$3),reset(td),bind_this(td,$$value=>ref2($$value),()=>ref2()),append($$anchor,td),pop()}var root$1g=from_html("");function Table_head($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var th=root$1g();attribute_effect(th,$0=>({"data-slot":"table-head",class:$0,...restProps}),[()=>cn$1("h-10 bg-clip-padding px-2 text-left align-middle font-medium whitespace-nowrap text-\ foreground [&:has([role=checkbox])]:pe-0",$$props.class)]);var node2=child(th);snippet(node2,()=>$$props.children??noop$3),reset(th),bind_this(th,$$value=>ref2($$value),()=>ref2()),append($$anchor,th),pop()}var root$1f=from_html("");function Table_header($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var thead2=root$1f();attribute_effect(thead2,$0=>({"data-slot":"\ table-header",class:$0,...restProps}),[()=>cn$1("[&_tr]:border-b",$$props.class)]);var node2=child(thead2);snippet(node2,()=>$$props.children??noop$3),reset(thead2),bind_this(thead2,$$value=>ref2($$value),()=>ref2()),append($$anchor,thead2),pop()}var root$1e=from_html("");function Table_row($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var tr2=root$1e();attribute_effect( tr2,$0=>({"data-slot":"table-row",class:$0,...restProps}),[()=>cn$1("border-b transition-colors data-[state=selected]:bg-muted hover:[&,&>svelte-css-wrapper]:[&>th,td]:bg-muted/50",$$props.class)]);var node2=child(tr2);snippet(node2,()=>$$props.children??noop$3),reset(tr2),bind_this(tr2,$$value=>ref2($$value),()=>ref2()),append($$anchor,tr2),pop()}var root_3$G=from_html(" ",1),root_6$t=from_html('
        \ Loading model information...
        '),root_14$8=from_html('
        '),root_12$7=from_html(" ",1),root_18$5=from_html(' ',1),root_16$7=from_html(" ",1),root_20$9=from_html(" ",1),root_24$2=from_html(" ",1),root_28$3=from_html(" ",1),root_32$1=from_html(" ",1),root_36=from_html( " ",1),root_40$1=from_html(" ",1),root_44$1=from_html(" ",1),root_48=from_html(" ",1),root_51=from_html(" ",1),root_57=from_html('
        '),root_55=from_html(" ",1),root_58=from_html(" ",1),root_64=from_html('
         
        '),root_62=from_html(" ",1),root_15$5=from_html(" ",1),root_10$g=from_html( " ",1),root_66=from_html('
        No model information available
        '),root_2$Q=from_html(`
        `,1);function DialogModelInformation($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15),modelId=prop($$props,"modelId",3,null),isRouter=user_derived(()=>serverStore.isRouterMode),routerModelProps=state$1(null),isLoadingRouterProps=state$1(!1),serverProps2=user_derived(()=>get$4(isRouter)&&modelId()?get$4(routerModelProps):serverStore.props),modelName=user_derived(()=>get$4(isRouter)&&modelId()?modelId():modelsStore.singleModelName), models=user_derived(modelOptions),isLoadingModels=user_derived(modelsLoading),firstModel=user_derived(()=>get$4(isRouter)&&modelId()?get$4(models).find(m=>m.model===modelId())??null:get$4(models)[0]??null),modalities=user_derived(()=>get$4(firstModel)?.id?modelsStore.getModelModalitiesArray(get$4(firstModel).id):[]);user_effect(()=>{open2()&&get$4(models).length===0&&modelsStore.fetch()}),user_effect(()=>{open2()&&get$4(isRouter)&&modelId()&&(set$1(isLoadingRouterProps,!0),modelsStore.fetchModelProps( modelId()).then(props=>{set$1(routerModelProps,props,!0)}).catch(()=>{set$1(routerModelProps,null)}).finally(()=>{set$1(isLoadingRouterProps,!1)})),open2()||set$1(routerModelProps,null)});var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$4,($$anchor2,Dialog_Root)=>{Dialog_Root($$anchor2,{get onOpenChange(){return $$props.onOpenChange},get open(){return open2()},set open($$value){open2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child( fragment_1);component(node_1,()=>Dialog_content,($$anchor4,Dialog_Content)=>{Dialog_Content($$anchor4,{class:"@container z-9999 !max-h-[80dvh] !max-w-[60rem] max-w-full",children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$Q(),node_2=sibling(first_child(fragment_2),2);component(node_2,()=>Dialog_header,($$anchor6,Dialog_Header)=>{Dialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$G(),node_3=first_child(fragment_3);component(node_3,()=>Dialog_title,($$anchor8,Dialog_Title)=>{ Dialog_Title($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text2=text$8("Model Information");append($$anchor9,text2)},$$slots:{default:!0}})});var node_4=sibling(node_3,2);component(node_4,()=>Dialog_description,($$anchor8,Dialog_Description)=>{Dialog_Description($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text_1=text$8("Current model details and capabilities");append($$anchor9,text_1)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})}); var div=sibling(node_2,2),node_5=child(div);{var consequent=$$anchor6=>{var div_1=root_6$t();append($$anchor6,div_1)},alternate_2=$$anchor6=>{var fragment_4=comment$2(),node_6=first_child(fragment_4);{var consequent_11=$$anchor7=>{const modelMeta=user_derived(()=>get$4(firstModel).meta);var fragment_5=comment$2(),node_7=first_child(fragment_5);{var consequent_10=$$anchor8=>{var fragment_6=comment$2(),node_8=first_child(fragment_6);component(node_8,()=>Table,($$anchor9,Table_Root)=>{Table_Root($$anchor9, {children:($$anchor10,$$slotProps3)=>{var fragment_7=root_10$g(),node_9=first_child(fragment_7);component(node_9,()=>Table_header,($$anchor11,Table_Header)=>{Table_Header($$anchor11,{children:($$anchor12,$$slotProps4)=>{var fragment_8=comment$2(),node_10=first_child(fragment_8);component(node_10,()=>Table_row,($$anchor13,Table_Row)=>{Table_Row($$anchor13,{children:($$anchor14,$$slotProps5)=>{var fragment_9=root_12$7(),node_11=first_child(fragment_9);component(node_11,()=>Table_head,($$anchor15,Table_Head)=>{ Table_Head($$anchor15,{class:"w-[10rem]",children:($$anchor16,$$slotProps6)=>{next$1();var text_2=text$8("Model");append($$anchor16,text_2)},$$slots:{default:!0}})});var node_12=sibling(node_11,2);component(node_12,()=>Table_head,($$anchor15,Table_Head_1)=>{Table_Head_1($$anchor15,{children:($$anchor16,$$slotProps6)=>{var div_2=root_14$8(),span=child(div_2);set_style(span,"",{},{"--threshold":"12rem"});var text_3=child(span,!0);reset(span);var node_13=sibling(span,2);{let $0=user_derived(()=>get$4( modelName)||""),$1=user_derived(()=>!!get$4(modelName));ActionIconCopyToClipboard(node_13,{get text(){return get$4($0)},get canCopy(){return get$4($1)},ariaLabel:"Copy model name to clipboard"})}reset(div_2),template_effect(()=>set_text(text_3,get$4(modelName))),append($$anchor16,div_2)},$$slots:{default:!0}})}),append($$anchor14,fragment_9)},$$slots:{default:!0}})}),append($$anchor12,fragment_8)},$$slots:{default:!0}})});var node_14=sibling(node_9,2);component(node_14,()=>Table_body,($$anchor11,Table_Body)=>{ Table_Body($$anchor11,{children:($$anchor12,$$slotProps4)=>{var fragment_10=root_15$5(),node_15=first_child(fragment_10);component(node_15,()=>Table_row,($$anchor13,Table_Row_1)=>{Table_Row_1($$anchor13,{children:($$anchor14,$$slotProps5)=>{var fragment_11=root_16$7(),node_16=first_child(fragment_11);component(node_16,()=>Table_cell,($$anchor15,Table_Cell)=>{Table_Cell($$anchor15,{class:"h-10 align-middle font-medium",children:($$anchor16,$$slotProps6)=>{next$1();var text_4=text$8("File Path");append( $$anchor16,text_4)},$$slots:{default:!0}})});var node_17=sibling(node_16,2);component(node_17,()=>Table_cell,($$anchor15,Table_Cell_1)=>{Table_Cell_1($$anchor15,{class:"inline-flex h-10 items-center gap-2 align-middle font-mono text-xs",children:($$anchor16,$$slotProps6)=>{var fragment_12=root_18$5(),span_1=first_child(fragment_12);set_style(span_1,"",{},{"--threshold":"14rem"});var text_5=child(span_1,!0);reset(span_1);var node_18=sibling(span_1,2);ActionIconCopyToClipboard(node_18,{get text(){ return get$4(serverProps2).model_path},ariaLabel:"Copy model path to clipboard"}),template_effect(()=>set_text(text_5,get$4(serverProps2).model_path)),append($$anchor16,fragment_12)},$$slots:{default:!0}})}),append($$anchor14,fragment_11)},$$slots:{default:!0}})});var node_19=sibling(node_15,2);{var consequent_1=$$anchor13=>{var fragment_13=comment$2(),node_20=first_child(fragment_13);component(node_20,()=>Table_row,($$anchor14,Table_Row_2)=>{Table_Row_2($$anchor14,{children:($$anchor15,$$slotProps5)=>{ var fragment_14=root_20$9(),node_21=first_child(fragment_14);component(node_21,()=>Table_cell,($$anchor16,Table_Cell_2)=>{Table_Cell_2($$anchor16,{class:"h-10 align-middle font-medium",children:($$anchor17,$$slotProps6)=>{next$1();var text_6=text$8("Context Size");append($$anchor17,text_6)},$$slots:{default:!0}})});var node_22=sibling(node_21,2);component(node_22,()=>Table_cell,($$anchor16,Table_Cell_3)=>{Table_Cell_3($$anchor16,{children:($$anchor17,$$slotProps6)=>{next$1();var text_7=text$8(); template_effect($0=>set_text(text_7,`${$0??""} tokens`),[()=>formatNumber(get$4(serverProps2).default_generation_settings.n_ctx)]),append($$anchor17,text_7)},$$slots:{default:!0}})}),append($$anchor15,fragment_14)},$$slots:{default:!0}})}),append($$anchor13,fragment_13)},alternate=$$anchor13=>{var fragment_16=comment$2(),node_23=first_child(fragment_16);component(node_23,()=>Table_row,($$anchor14,Table_Row_3)=>{Table_Row_3($$anchor14,{children:($$anchor15,$$slotProps5)=>{var fragment_17=root_24$2(), node_24=first_child(fragment_17);component(node_24,()=>Table_cell,($$anchor16,Table_Cell_4)=>{Table_Cell_4($$anchor16,{class:"h-10 align-middle font-medium text-red-500",children:($$anchor17,$$slotProps6)=>{next$1();var text_8=text$8("Context Size");append($$anchor17,text_8)},$$slots:{default:!0}})});var node_25=sibling(node_24,2);component(node_25,()=>Table_cell,($$anchor16,Table_Cell_5)=>{Table_Cell_5($$anchor16,{class:"text-red-500",children:($$anchor17,$$slotProps6)=>{next$1();var text_9=text$8( "Not available");append($$anchor17,text_9)},$$slots:{default:!0}})}),append($$anchor15,fragment_17)},$$slots:{default:!0}})}),append($$anchor13,fragment_16)};if_block(node_19,$$render=>{get$4(serverProps2)?.default_generation_settings?.n_ctx?$$render(consequent_1):$$render(alternate,!1)})}var node_26=sibling(node_19,2);{var consequent_2=$$anchor13=>{var fragment_18=comment$2(),node_27=first_child(fragment_18);component(node_27,()=>Table_row,($$anchor14,Table_Row_4)=>{Table_Row_4($$anchor14,{children:($$anchor15,$$slotProps5)=>{ var fragment_19=root_28$3(),node_28=first_child(fragment_19);component(node_28,()=>Table_cell,($$anchor16,Table_Cell_6)=>{Table_Cell_6($$anchor16,{class:"h-10 align-middle font-medium",children:($$anchor17,$$slotProps6)=>{next$1();var text_10=text$8("Training Context");append($$anchor17,text_10)},$$slots:{default:!0}})});var node_29=sibling(node_28,2);component(node_29,()=>Table_cell,($$anchor16,Table_Cell_7)=>{Table_Cell_7($$anchor16,{children:($$anchor17,$$slotProps6)=>{next$1();var text_11=text$8(); template_effect($0=>set_text(text_11,`${$0??""} tokens`),[()=>formatNumber(get$4(modelMeta).n_ctx_train)]),append($$anchor17,text_11)},$$slots:{default:!0}})}),append($$anchor15,fragment_19)},$$slots:{default:!0}})}),append($$anchor13,fragment_18)};if_block(node_26,$$render=>{get$4(modelMeta)?.n_ctx_train&&$$render(consequent_2)})}var node_30=sibling(node_26,2);{var consequent_3=$$anchor13=>{var fragment_21=comment$2(),node_31=first_child(fragment_21);component(node_31,()=>Table_row,($$anchor14,Table_Row_5)=>{ Table_Row_5($$anchor14,{children:($$anchor15,$$slotProps5)=>{var fragment_22=root_32$1(),node_32=first_child(fragment_22);component(node_32,()=>Table_cell,($$anchor16,Table_Cell_8)=>{Table_Cell_8($$anchor16,{class:"h-10 align-middle font-medium",children:($$anchor17,$$slotProps6)=>{next$1();var text_12=text$8("Model Size");append($$anchor17,text_12)},$$slots:{default:!0}})});var node_33=sibling(node_32,2);component(node_33,()=>Table_cell,($$anchor16,Table_Cell_9)=>{Table_Cell_9($$anchor16,{children:($$anchor17,$$slotProps6)=>{ next$1();var text_13=text$8();template_effect($0=>set_text(text_13,$0),[()=>formatFileSize(get$4(modelMeta).size)]),append($$anchor17,text_13)},$$slots:{default:!0}})}),append($$anchor15,fragment_22)},$$slots:{default:!0}})}),append($$anchor13,fragment_21)};if_block(node_30,$$render=>{get$4(modelMeta)?.size&&$$render(consequent_3)})}var node_34=sibling(node_30,2);{var consequent_4=$$anchor13=>{var fragment_24=comment$2(),node_35=first_child(fragment_24);component(node_35,()=>Table_row,($$anchor14,Table_Row_6)=>{ Table_Row_6($$anchor14,{children:($$anchor15,$$slotProps5)=>{var fragment_25=root_36(),node_36=first_child(fragment_25);component(node_36,()=>Table_cell,($$anchor16,Table_Cell_10)=>{Table_Cell_10($$anchor16,{class:"h-10 align-middle font-medium",children:($$anchor17,$$slotProps6)=>{next$1();var text_14=text$8("Parameters");append($$anchor17,text_14)},$$slots:{default:!0}})});var node_37=sibling(node_36,2);component(node_37,()=>Table_cell,($$anchor16,Table_Cell_11)=>{Table_Cell_11($$anchor16,{children:($$anchor17,$$slotProps6)=>{ next$1();var text_15=text$8();template_effect($0=>set_text(text_15,$0),[()=>formatParameters(get$4(modelMeta).n_params)]),append($$anchor17,text_15)},$$slots:{default:!0}})}),append($$anchor15,fragment_25)},$$slots:{default:!0}})}),append($$anchor13,fragment_24)};if_block(node_34,$$render=>{get$4(modelMeta)?.n_params&&$$render(consequent_4)})}var node_38=sibling(node_34,2);{var consequent_5=$$anchor13=>{var fragment_27=comment$2(),node_39=first_child(fragment_27);component(node_39,()=>Table_row, ($$anchor14,Table_Row_7)=>{Table_Row_7($$anchor14,{children:($$anchor15,$$slotProps5)=>{var fragment_28=root_40$1(),node_40=first_child(fragment_28);component(node_40,()=>Table_cell,($$anchor16,Table_Cell_12)=>{Table_Cell_12($$anchor16,{class:"align-middle font-medium",children:($$anchor17,$$slotProps6)=>{next$1();var text_16=text$8("Embedding Size");append($$anchor17,text_16)},$$slots:{default:!0}})});var node_41=sibling(node_40,2);component(node_41,()=>Table_cell,($$anchor16,Table_Cell_13)=>{Table_Cell_13( $$anchor16,{children:($$anchor17,$$slotProps6)=>{next$1();var text_17=text$8();template_effect($0=>set_text(text_17,$0),[()=>formatNumber(get$4(modelMeta).n_embd)]),append($$anchor17,text_17)},$$slots:{default:!0}})}),append($$anchor15,fragment_28)},$$slots:{default:!0}})}),append($$anchor13,fragment_27)};if_block(node_38,$$render=>{get$4(modelMeta)?.n_embd&&$$render(consequent_5)})}var node_42=sibling(node_38,2);{var consequent_6=$$anchor13=>{var fragment_30=comment$2(),node_43=first_child(fragment_30); component(node_43,()=>Table_row,($$anchor14,Table_Row_8)=>{Table_Row_8($$anchor14,{children:($$anchor15,$$slotProps5)=>{var fragment_31=root_44$1(),node_44=first_child(fragment_31);component(node_44,()=>Table_cell,($$anchor16,Table_Cell_14)=>{Table_Cell_14($$anchor16,{class:"align-middle font-medium",children:($$anchor17,$$slotProps6)=>{next$1();var text_18=text$8("Vocabulary Size");append($$anchor17,text_18)},$$slots:{default:!0}})});var node_45=sibling(node_44,2);component(node_45,()=>Table_cell, ($$anchor16,Table_Cell_15)=>{Table_Cell_15($$anchor16,{children:($$anchor17,$$slotProps6)=>{next$1();var text_19=text$8();template_effect($0=>set_text(text_19,`${$0??""} tokens`),[()=>formatNumber(get$4(modelMeta).n_vocab)]),append($$anchor17,text_19)},$$slots:{default:!0}})}),append($$anchor15,fragment_31)},$$slots:{default:!0}})}),append($$anchor13,fragment_30)};if_block(node_42,$$render=>{get$4(modelMeta)?.n_vocab&&$$render(consequent_6)})}var node_46=sibling(node_42,2);{var consequent_7=$$anchor13=>{ var fragment_33=comment$2(),node_47=first_child(fragment_33);component(node_47,()=>Table_row,($$anchor14,Table_Row_9)=>{Table_Row_9($$anchor14,{children:($$anchor15,$$slotProps5)=>{var fragment_34=root_48(),node_48=first_child(fragment_34);component(node_48,()=>Table_cell,($$anchor16,Table_Cell_16)=>{Table_Cell_16($$anchor16,{class:"align-middle font-medium",children:($$anchor17,$$slotProps6)=>{next$1();var text_20=text$8("Vocabulary Type");append($$anchor17,text_20)},$$slots:{default:!0}})});var node_49=sibling( node_48,2);component(node_49,()=>Table_cell,($$anchor16,Table_Cell_17)=>{Table_Cell_17($$anchor16,{class:"align-middle capitalize",children:($$anchor17,$$slotProps6)=>{next$1();var text_21=text$8();template_effect(()=>set_text(text_21,get$4(modelMeta).vocab_type)),append($$anchor17,text_21)},$$slots:{default:!0}})}),append($$anchor15,fragment_34)},$$slots:{default:!0}})}),append($$anchor13,fragment_33)};if_block(node_46,$$render=>{get$4(modelMeta)?.vocab_type&&$$render(consequent_7)})}var node_50=sibling( node_46,2);component(node_50,()=>Table_row,($$anchor13,Table_Row_10)=>{Table_Row_10($$anchor13,{children:($$anchor14,$$slotProps5)=>{var fragment_36=root_51(),node_51=first_child(fragment_36);component(node_51,()=>Table_cell,($$anchor15,Table_Cell_18)=>{Table_Cell_18($$anchor15,{class:"align-middle font-medium",children:($$anchor16,$$slotProps6)=>{next$1();var text_22=text$8("Parallel Slots");append($$anchor16,text_22)},$$slots:{default:!0}})});var node_52=sibling(node_51,2);component(node_52,()=>Table_cell, ($$anchor15,Table_Cell_19)=>{Table_Cell_19($$anchor15,{children:($$anchor16,$$slotProps6)=>{next$1();var text_23=text$8();template_effect(()=>set_text(text_23,get$4(serverProps2).total_slots)),append($$anchor16,text_23)},$$slots:{default:!0}})}),append($$anchor14,fragment_36)},$$slots:{default:!0}})});var node_53=sibling(node_50,2);{var consequent_8=$$anchor13=>{var fragment_38=comment$2(),node_54=first_child(fragment_38);component(node_54,()=>Table_row,($$anchor14,Table_Row_11)=>{Table_Row_11($$anchor14, {children:($$anchor15,$$slotProps5)=>{var fragment_39=root_55(),node_55=first_child(fragment_39);component(node_55,()=>Table_cell,($$anchor16,Table_Cell_20)=>{Table_Cell_20($$anchor16,{class:"align-middle font-medium",children:($$anchor17,$$slotProps6)=>{next$1();var text_24=text$8("Modalities");append($$anchor17,text_24)},$$slots:{default:!0}})});var node_56=sibling(node_55,2);component(node_56,()=>Table_cell,($$anchor16,Table_Cell_21)=>{Table_Cell_21($$anchor16,{children:($$anchor17,$$slotProps6)=>{ var div_3=root_57(),node_57=child(div_3);BadgeModality(node_57,{get modalities(){return get$4(modalities)}}),reset(div_3),append($$anchor17,div_3)},$$slots:{default:!0}})}),append($$anchor15,fragment_39)},$$slots:{default:!0}})}),append($$anchor13,fragment_38)};if_block(node_53,$$render=>{get$4(modalities).length>0&&$$render(consequent_8)})}var node_58=sibling(node_53,2);component(node_58,()=>Table_row,($$anchor13,Table_Row_12)=>{Table_Row_12($$anchor13,{children:($$anchor14,$$slotProps5)=>{var fragment_40=root_58(), node_59=first_child(fragment_40);component(node_59,()=>Table_cell,($$anchor15,Table_Cell_22)=>{Table_Cell_22($$anchor15,{class:"align-middle font-medium",children:($$anchor16,$$slotProps6)=>{next$1();var text_25=text$8("Build Info");append($$anchor16,text_25)},$$slots:{default:!0}})});var node_60=sibling(node_59,2);component(node_60,()=>Table_cell,($$anchor15,Table_Cell_23)=>{Table_Cell_23($$anchor15,{class:"align-middle font-mono text-xs",children:($$anchor16,$$slotProps6)=>{next$1();var text_26=text$8(); template_effect(()=>set_text(text_26,get$4(serverProps2).build_info)),append($$anchor16,text_26)},$$slots:{default:!0}})}),append($$anchor14,fragment_40)},$$slots:{default:!0}})});var node_61=sibling(node_58,2);{var consequent_9=$$anchor13=>{var fragment_42=comment$2(),node_62=first_child(fragment_42);component(node_62,()=>Table_row,($$anchor14,Table_Row_13)=>{Table_Row_13($$anchor14,{children:($$anchor15,$$slotProps5)=>{var fragment_43=root_62(),node_63=first_child(fragment_43);component(node_63, ()=>Table_cell,($$anchor16,Table_Cell_24)=>{Table_Cell_24($$anchor16,{class:"align-middle font-medium",children:($$anchor17,$$slotProps6)=>{next$1();var text_27=text$8("Chat Template");append($$anchor17,text_27)},$$slots:{default:!0}})});var node_64=sibling(node_63,2);component(node_64,()=>Table_cell,($$anchor16,Table_Cell_25)=>{Table_Cell_25($$anchor16,{class:"py-10",children:($$anchor17,$$slotProps6)=>{var div_4=root_64(),pre=child(div_4),text_28=child(pre,!0);reset(pre),reset(div_4),template_effect( ()=>set_text(text_28,get$4(serverProps2).chat_template)),append($$anchor17,div_4)},$$slots:{default:!0}})}),append($$anchor15,fragment_43)},$$slots:{default:!0}})}),append($$anchor13,fragment_42)};if_block(node_61,$$render=>{get$4(serverProps2).chat_template&&$$render(consequent_9)})}append($$anchor12,fragment_10)},$$slots:{default:!0}})}),append($$anchor10,fragment_7)},$$slots:{default:!0}})}),append($$anchor8,fragment_6)};if_block(node_7,$$render=>{get$4(serverProps2)&&$$render(consequent_10)})} append($$anchor7,fragment_5)},alternate_1=$$anchor7=>{var fragment_44=comment$2(),node_65=first_child(fragment_44);{var consequent_12=$$anchor8=>{var div_5=root_66();append($$anchor8,div_5)};if_block(node_65,$$render=>{get$4(isLoadingModels)||$$render(consequent_12)},!0)}append($$anchor7,fragment_44)};if_block(node_6,$$render=>{get$4(firstModel)?$$render(consequent_11):$$render(alternate_1,!1)},!0)}append($$anchor6,fragment_4)};if_block(node_5,$$render=>{get$4(isLoadingModels)||get$4(isLoadingRouterProps)? $$render(consequent):$$render(alternate_2,!1)})}reset(div),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}class ConversationsStore{#conversations=state$1(proxy([]));get conversations(){return get$4(this.#conversations)}set conversations(value){set$1(this.#conversations,value,!0)}#activeConversation=state$1(null);get activeConversation(){return get$4(this.#activeConversation)}set activeConversation(value){ set$1(this.#activeConversation,value,!0)}#activeMessages=state$1(proxy([]));get activeMessages(){return get$4(this.#activeMessages)}set activeMessages(value){set$1(this.#activeMessages,value,!0)}#isInitialized=state$1(!1);get isInitialized(){return get$4(this.#isInitialized)}set isInitialized(value){set$1(this.#isInitialized,value,!0)}#pendingMcpServerOverrides=state$1(proxy(ConversationsStore.loadMcpDefaults()));get pendingMcpServerOverrides(){return get$4(this.#pendingMcpServerOverrides)}set pendingMcpServerOverrides(value){ set$1(this.#pendingMcpServerOverrides,value,!0)}static loadMcpDefaults(){if(typeof globalThis.localStorage>"u")return[];try{const raw2=localStorage.getItem(MCP_DEFAULT_ENABLED_LOCALSTORAGE_KEY);if(!raw2)return[];const parsed=JSON.parse(raw2);return Array.isArray(parsed)?parsed.filter(o=>typeof o=="object"&&o!==null&&"serverId"in o&&"enabled"in o):[]}catch{return[]}}saveMcpDefaults(){if(typeof globalThis.localStorage>"u")return;const plain=this.pendingMcpServerOverrides.map(o=>({serverId:o.serverId, enabled:o.enabled}));plain.length>0?localStorage.setItem(MCP_DEFAULT_ENABLED_LOCALSTORAGE_KEY,JSON.stringify(plain)):localStorage.removeItem(MCP_DEFAULT_ENABLED_LOCALSTORAGE_KEY)}titleUpdateConfirmationCallback;messageUpdateCallback=null;async init(){if(!this.isInitialized)try{await runLegacyMigration(),await this.loadConversations(),this.isInitialized=!0}catch(error2){console.error("Failed to initialize conversations:",error2)}}async initialize(){return this.init()}registerMessageUpdateCallback(callback){ this.messageUpdateCallback=callback}addMessageToActive(message){this.activeMessages.push(message)}updateMessageAtIndex(index2,updates){index2!==-1&&this.activeMessages[index2]&&(this.activeMessages[index2]={...this.activeMessages[index2],...updates})}findMessageIndex(messageId){return this.activeMessages.findIndex(m=>m.id===messageId)}sliceActiveMessages(startIndex){this.activeMessages=this.activeMessages.slice(0,startIndex)}removeMessageAtIndex(index2){if(index2!==-1)return this.activeMessages. splice(index2,1)[0]}setTitleUpdateConfirmationCallback(callback){this.titleUpdateConfirmationCallback=callback}async loadConversations(){const conversations2=await DatabaseService.getAllConversations();this.conversations=conversations2}async createConversation(name){const conversationName=name||`Chat ${new Date().toLocaleString()}`,conversation=await DatabaseService.createConversation(conversationName);if(this.pendingMcpServerOverrides.length>0){const plainOverrides=this.pendingMcpServerOverrides. map(o=>({serverId:o.serverId,enabled:o.enabled}));conversation.mcpServerOverrides=plainOverrides,await DatabaseService.updateConversation(conversation.id,{mcpServerOverrides:plainOverrides}),this.pendingMcpServerOverrides=[]}return this.conversations=[conversation,...this.conversations],this.activeConversation=conversation,this.activeMessages=[],await goto(`#/chat/${conversation.id}`),conversation.id}async loadConversation(convId){try{const conversation=await DatabaseService.getConversation(convId); if(!conversation)return!1;if(this.pendingMcpServerOverrides=[],this.activeConversation=conversation,conversation.currNode){const allMessages=await DatabaseService.getConversationMessages(convId),filteredMessages=filterByLeafNodeId(allMessages,conversation.currNode,!1);this.activeMessages=filteredMessages}else{const messages=await DatabaseService.getConversationMessages(convId);this.activeMessages=messages}return!0}catch(error2){return console.error("Failed to load conversation:",error2),!1}}clearActiveConversation(){ this.activeConversation=null,this.activeMessages=[],this.pendingMcpServerOverrides=ConversationsStore.loadMcpDefaults()}async deleteConversation(convId,options){try{if(await DatabaseService.deleteConversation(convId,options),options?.deleteWithForks){const idsToRemove=new SvelteSet([convId]),queue=[convId];for(;queue.length>0;){const parentId=queue.pop();for(const c2 of this.conversations)c2.forkedFromConversationId===parentId&&!idsToRemove.has(c2.id)&&(idsToRemove.add(c2.id),queue.push(c2.id))} this.conversations=this.conversations.filter(c2=>!idsToRemove.has(c2.id)),this.activeConversation&&idsToRemove.has(this.activeConversation.id)&&(this.clearActiveConversation(),await goto("?new_chat=true#/"))}else{const newParent=this.conversations.find(c2=>c2.id===convId)?.forkedFromConversationId;this.conversations=this.conversations.filter(c2=>c2.id!==convId).map(c2=>c2.forkedFromConversationId===convId?{...c2,forkedFromConversationId:newParent}:c2),this.activeConversation?.id===convId&&(this. clearActiveConversation(),await goto("?new_chat=true#/"))}}catch(error2){console.error("Failed to delete conversation:",error2)}}async deleteAll(){try{const allConversations=await DatabaseService.getAllConversations();for(const conv of allConversations)await DatabaseService.deleteConversation(conv.id);this.clearActiveConversation(),this.conversations=[],toast.success("All conversations deleted"),await goto("?new_chat=true#/")}catch(error2){console.error("Failed to delete all conversations:",error2), toast.error("Failed to delete conversations")}}async refreshActiveMessages(){if(!this.activeConversation)return;const allMessages=await DatabaseService.getConversationMessages(this.activeConversation.id);if(allMessages.length===0){this.activeMessages=[];return}const leafNodeId=this.activeConversation.currNode||allMessages.reduce((latest,msg)=>msg.timestamp>latest.timestamp?msg:latest).id,currentPath=filterByLeafNodeId(allMessages,leafNodeId,!1);this.activeMessages=currentPath}async getConversationMessages(convId){ return await DatabaseService.getConversationMessages(convId)}async updateConversationName(convId,name){try{await DatabaseService.updateConversation(convId,{name});const convIndex=this.conversations.findIndex(c2=>c2.id===convId);convIndex!==-1&&(this.conversations[convIndex].name=name,this.conversations=[...this.conversations]),this.activeConversation?.id===convId&&(this.activeConversation={...this.activeConversation,name})}catch(error2){console.error("Failed to update conversation name:",error2)}}async updateConversationTitleWithConfirmation(convId,newTitle){ try{if(config$1().askForTitleConfirmation&&this.titleUpdateConfirmationCallback){const conversation=await DatabaseService.getConversation(convId);if(!conversation||!await this.titleUpdateConfirmationCallback(conversation.name,newTitle))return!1}return await this.updateConversationName(convId,newTitle),!0}catch(error2){return console.error("Failed to update conversation title with confirmation:",error2),!1}}updateConversationTimestamp(){if(!this.activeConversation)return;const chatIndex=this.conversations. findIndex(c2=>c2.id===this.activeConversation.id);if(chatIndex!==-1){this.conversations[chatIndex].lastModified=Date.now();const updatedConv=this.conversations.splice(chatIndex,1)[0];this.conversations=[updatedConv,...this.conversations]}}async updateCurrentNode(nodeId){this.activeConversation&&(await DatabaseService.updateCurrentNode(this.activeConversation.id,nodeId),this.activeConversation={...this.activeConversation,currNode:nodeId})}async navigateToSibling(siblingId){if(!this.activeConversation) return;const allMessages=await DatabaseService.getConversationMessages(this.activeConversation.id),rootMessage=allMessages.find(m=>m.type==="root"&&m.parent===null),currentFirstUserMessage=this.activeMessages.find(m=>m.role===MessageRole.USER&&m.parent===rootMessage?.id),currentLeafNodeId=findLeafNode(allMessages,siblingId);if(await DatabaseService.updateCurrentNode(this.activeConversation.id,currentLeafNodeId),this.activeConversation={...this.activeConversation,currNode:currentLeafNodeId},await this. refreshActiveMessages(),rootMessage&&this.activeMessages.length>0){const newFirstUserMessage=this.activeMessages.find(m=>m.role===MessageRole.USER&&m.parent===rootMessage.id);newFirstUserMessage&&newFirstUserMessage.content.trim()&&(!currentFirstUserMessage||newFirstUserMessage.id!==currentFirstUserMessage.id||newFirstUserMessage.content.trim()!==currentFirstUserMessage.content.trim())&&await this.updateConversationTitleWithConfirmation(this.activeConversation.id,newFirstUserMessage.content.trim())}}getMcpServerOverride(serverId){ return this.activeConversation?this.activeConversation.mcpServerOverrides?.find(o=>o.serverId===serverId):this.pendingMcpServerOverrides.find(o=>o.serverId===serverId)}getAllMcpServerOverrides(){return this.activeConversation?.mcpServerOverrides?this.activeConversation.mcpServerOverrides:this.pendingMcpServerOverrides}isMcpServerEnabledForChat(serverId){return this.getMcpServerOverride(serverId)?.enabled??!1}async setMcpServerOverride(serverId,enabled){if(!this.activeConversation){this.setPendingMcpServerOverride( serverId,enabled);return}const currentOverrides=(this.activeConversation.mcpServerOverrides||[]).map(o=>({serverId:o.serverId,enabled:o.enabled}));let newOverrides;if(enabled===void 0)newOverrides=currentOverrides.filter(o=>o.serverId!==serverId);else{const existingIndex=currentOverrides.findIndex(o=>o.serverId===serverId);existingIndex>=0?(newOverrides=[...currentOverrides],newOverrides[existingIndex]={serverId,enabled}):newOverrides=[...currentOverrides,{serverId,enabled}]}await DatabaseService. updateConversation(this.activeConversation.id,{mcpServerOverrides:newOverrides.length>0?newOverrides:void 0}),this.activeConversation={...this.activeConversation,mcpServerOverrides:newOverrides.length>0?newOverrides:void 0};const convIndex=this.conversations.findIndex(c2=>c2.id===this.activeConversation.id);convIndex!==-1&&(this.conversations[convIndex].mcpServerOverrides=newOverrides.length>0?newOverrides:void 0,this.conversations=[...this.conversations])}setPendingMcpServerOverride(serverId,enabled){ if(enabled===void 0)this.pendingMcpServerOverrides=this.pendingMcpServerOverrides.filter(o=>o.serverId!==serverId);else{const existingIndex=this.pendingMcpServerOverrides.findIndex(o=>o.serverId===serverId);if(existingIndex>=0){const newOverrides=[...this.pendingMcpServerOverrides];newOverrides[existingIndex]={serverId,enabled},this.pendingMcpServerOverrides=newOverrides}else this.pendingMcpServerOverrides=[...this.pendingMcpServerOverrides,{serverId,enabled}]}this.saveMcpDefaults()}async toggleMcpServerForChat(serverId){ const currentEnabled=this.isMcpServerEnabledForChat(serverId);await this.setMcpServerOverride(serverId,!currentEnabled)}async removeMcpServerOverride(serverId){await this.setMcpServerOverride(serverId,void 0)}clearPendingMcpServerOverrides(){this.pendingMcpServerOverrides=[],this.saveMcpDefaults()}async forkConversation(messageId,options){if(!this.activeConversation)return null;try{const newConv=await DatabaseService.forkConversation(this.activeConversation.id,messageId,options);return this.conversations= [newConv,...this.conversations],await goto(`#/chat/${newConv.id}`),toast.success("Conversation forked"),newConv.id}catch(error2){return console.error("Failed to fork conversation:",error2),toast.error("Failed to fork conversation"),null}}generateConversationFilename(conversation,msgs){const sanitizedName=(conversation.name??"").trim().toLowerCase().replace(NON_ALPHANUMERIC_REGEX,EXPORT_CONV_NONALNUM_REPLACEMENT).replace(MULTIPLE_UNDERSCORE_REGEX,"_").substring(0,EXPORT_CONV_NAME_SUFFIX_MAX_LENGTH), formattedDate=(msgs?.length?new Date(Math.max(...msgs.map(m=>m.timestamp))):new Date).toISOString().slice(0,ISO_TIMESTAMP_SLICE_LENGTH).replace(ISO_DATE_TIME_SEPARATOR,ISO_DATE_TIME_SEPARATOR_REPLACEMENT).replaceAll(ISO_TIME_SEPARATOR,ISO_TIME_SEPARATOR_REPLACEMENT),trimmedConvId=conversation.id?.slice(0,EXPORT_CONV_ID_TRIM_LENGTH)??"";return`${formattedDate}_conv_${trimmedConvId}_${sanitizedName}.json`}downloadConversationFile(data,filename){const conversation="conv"in data?data.conv:Array.isArray( data)?data[0]?.conv:void 0,msgs="messages"in data?data.messages:Array.isArray(data)?data[0]?.messages:void 0;if(!conversation){console.error("Invalid data: missing conversation");return}const downloadFilename=filename??this.generateConversationFilename(conversation,msgs),blob=new Blob([JSON.stringify(data,null,2)],{type:"application/json"}),url2=URL.createObjectURL(blob),a=document.createElement("a");a.href=url2,a.download=downloadFilename,document.body.appendChild(a),a.click(),document.body.removeChild( a),URL.revokeObjectURL(url2)}async downloadConversation(convId){let conversation,messages;if(this.activeConversation?.id===convId)conversation=this.activeConversation,messages=this.activeMessages;else{if(conversation=await DatabaseService.getConversation(convId),!conversation)return;messages=await DatabaseService.getConversationMessages(convId)}this.downloadConversationFile({conv:conversation,messages})}async importConversations(){return new Promise((resolve2,reject)=>{const input=document.createElement( "input");input.type="file",input.accept=".json",input.onchange=async e=>{const file=e.target?.files?.[0];if(!file){reject(new Error("No file selected"));return}try{const text2=await file.text(),parsedData=JSON.parse(text2);let importedData;if(Array.isArray(parsedData))importedData=parsedData;else if(parsedData&&typeof parsedData=="object"&&"conv"in parsedData&&"messages"in parsedData)importedData=[parsedData];else throw new Error("Invalid file format");const result=await DatabaseService.importConversations( importedData);toast.success(`Imported ${result.imported} conversation(s), skipped ${result.skipped}`),await this.loadConversations();const importedConversations=(Array.isArray(importedData)?importedData:[importedData]).map(item=>item.conv);resolve2(importedConversations)}catch(err){const message=err instanceof Error?err.message:"Unknown error";console.error("Failed to import conversations:",err),toast.error("Import failed",{description:message}),reject(new Error(`Import failed: ${message}`))}},input. click()})}async importConversationsData(data){const result=await DatabaseService.importConversations(data);return await this.loadConversations(),result}}const conversationsStore=new ConversationsStore;conversationsStore.init();const conversations=()=>conversationsStore.conversations,activeConversation=()=>conversationsStore.activeConversation,activeMessages=()=>conversationsStore.activeMessages,isConversationsInitialized=()=>conversationsStore.isInitialized;function buildConversationTree(convs){ const childrenByParent=new SvelteMap,forkIds=new SvelteSet;for(const conv of convs)if(conv.forkedFromConversationId){forkIds.add(conv.id);const siblings2=childrenByParent.get(conv.forkedFromConversationId)||[];siblings2.push(conv),childrenByParent.set(conv.forkedFromConversationId,siblings2)}const result=[],visited=new SvelteSet;function walk(conv,depth){visited.add(conv.id),result.push({conversation:conv,depth});const children=childrenByParent.get(conv.id);if(children){children.sort((a,b)=>b.lastModified- a.lastModified);for(const child2 of children)walk(child2,depth+1)}}const roots=convs.filter(c2=>!forkIds.has(c2.id));for(const root2 of roots)walk(root2,0);for(const conv of convs)visited.has(conv.id)||walk(conv,1);return result}var root_5$t=from_html(' '),root_4$n=from_html(" MCP Resources ",1),root_3$F=from_html(" ",1),root_8$k=from_html('

        '),root_9$j=from_html( '
        '),root_11$b=from_html('
        '),root_7$p=from_html('

        \

        '),root_19$2=from_html('
        '),root_22$6=from_html('
        Select a resource to preview
        '),root_26$4=from_html(" Attach Resource",1),root_30$2=from_html(" ",1),root_23$4=from_html(" ",1),root_2$P=from_html('
        ',1);function DialogMcpResources($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),selectedResources=new SvelteSet,lastSelectedUri=state$1(null),isAttaching=state$1(!1),selectedTemplate=state$1(null),templatePreviewUri=state$1(null),templatePreviewContent=state$1(null),templatePreviewLoading=state$1(!1),templatePreviewError=state$1(null);const totalCount=user_derived(mcpTotalResourceCount);user_effect(()=>{open2()&&(loadResources(), $$props.preSelectedUri&&(selectedResources.clear(),selectedResources.add($$props.preSelectedUri),set$1(lastSelectedUri,$$props.preSelectedUri,!0)))});async function loadResources(){const perChatOverrides=conversationsStore.getAllMcpServerOverrides();await mcpStore.ensureInitialized(perChatOverrides)&&await mcpStore.fetchAllResources()}function handleOpenChange(newOpen){open2(newOpen),$$props.onOpenChange?.(newOpen),newOpen||(selectedResources.clear(),set$1(lastSelectedUri,null),clearTemplateState())} function clearTemplateState(){set$1(selectedTemplate,null),set$1(templatePreviewUri,null),set$1(templatePreviewContent,null),set$1(templatePreviewLoading,!1),set$1(templatePreviewError,null)}function handleTemplateSelect(template){if(selectedResources.clear(),set$1(lastSelectedUri,null),get$4(selectedTemplate)?.uriTemplate===template.uriTemplate&&get$4(selectedTemplate)?.serverName===template.serverName){clearTemplateState();return}set$1(selectedTemplate,template,!0),set$1(templatePreviewUri,null), set$1(templatePreviewContent,null),set$1(templatePreviewLoading,!1),set$1(templatePreviewError,null)}async function handleTemplateResolve(uri2,serverName){set$1(templatePreviewUri,uri2,!0),set$1(templatePreviewContent,null),set$1(templatePreviewLoading,!0),set$1(templatePreviewError,null);try{const content2=await mcpStore.readResourceByUri(serverName,uri2);content2?set$1(templatePreviewContent,content2,!0):set$1(templatePreviewError,"Failed to read resource")}catch(error2){set$1(templatePreviewError, error2 instanceof Error?error2.message:"Unknown error",!0)}finally{set$1(templatePreviewLoading,!1)}}function handleTemplateCancelForm(){clearTemplateState()}async function handleAttachTemplateResource(){if(!(!get$4(templatePreviewUri)||!get$4(selectedTemplate)||!get$4(templatePreviewContent))){set$1(isAttaching,!0);try{const knownResource=mcpResourceStore.findResourceByUri(get$4(templatePreviewUri));if(knownResource)mcpResourceStore.isAttached(knownResource.uri)||await mcpStore.attachResource(knownResource. uri),toast.success(`Resource attached: ${knownResource.title||knownResource.name}`);else{if(mcpResourceStore.isAttached(get$4(templatePreviewUri))){toast.info("Resource already attached"),handleOpenChange(!1);return}const resourceInfo={uri:get$4(templatePreviewUri),name:get$4(templatePreviewUri).split("/").pop()||get$4(templatePreviewUri),serverName:get$4(selectedTemplate).serverName},attachment=mcpResourceStore.addAttachment(resourceInfo);mcpResourceStore.updateAttachmentContent(attachment.id,get$4( templatePreviewContent)),toast.success(`Resource attached: ${resourceInfo.name}`)}handleOpenChange(!1)}catch(error2){console.error("Failed to attach template resource:",error2)}finally{set$1(isAttaching,!1)}}}function handleResourceSelect(resource,shiftKey=!1){if(clearTemplateState(),shiftKey&&get$4(lastSelectedUri)){const allResources=getAllResourcesFlatInTreeOrder(),lastIndex=allResources.findIndex(r2=>r2.uri===get$4(lastSelectedUri)),currentIndex=allResources.findIndex(r2=>r2.uri===resource.uri); if(lastIndex!==-1&¤tIndex!==-1){const start2=Math.min(lastIndex,currentIndex),end=Math.max(lastIndex,currentIndex);for(let i=start2;i<=end;i++)selectedResources.add(allResources[i].uri)}}else selectedResources.clear(),selectedResources.add(resource.uri),set$1(lastSelectedUri,resource.uri,!0)}function handleResourceToggle(resource,checked){clearTemplateState(),checked?selectedResources.add(resource.uri):selectedResources.delete(resource.uri),set$1(lastSelectedUri,resource.uri,!0)}function getAllResourcesFlatInTreeOrder(){ const allResources=[],resourcesMap=mcpResources();for(const[serverName,serverRes]of resourcesMap.entries())for(const resource of serverRes.resources)allResources.push({...resource,serverName});return allResources.sort((a,b)=>{const aName=getResourceDisplayName(a),bName=getResourceDisplayName(b);return aName.localeCompare(bName)})}async function handleAttach(){if(selectedResources.size!==0){set$1(isAttaching,!0);try{const resourcesToAttach=getAllResourcesFlatInTreeOrder().filter(r2=>selectedResources. has(r2.uri));for(const resource of resourcesToAttach)await mcpStore.attachResource(resource.uri),$$props.onAttach?.(resource);const count=resourcesToAttach.length;toast.success(count===1?`Resource attached: ${resourcesToAttach[0].name}`:`${count} resources attached`),handleOpenChange(!1)}catch(error2){console.error("Failed to attach resources:",error2)}finally{set$1(isAttaching,!1)}}}const selectedTemplateUri=user_derived(()=>get$4(selectedTemplate)?.uriTemplate??null),hasTemplateResult=user_derived( ()=>!!get$4(selectedTemplate)&&!!get$4(templatePreviewContent)&&!!get$4(templatePreviewUri));var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$4,($$anchor2,Dialog_Root)=>{Dialog_Root($$anchor2,{get open(){return open2()},onOpenChange:handleOpenChange,children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Dialog_content,($$anchor4,Dialog_Content)=>{Dialog_Content($$anchor4,{class:"max-h-[80vh] !max-w-4xl overfl\ ow-hidden p-0",children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$P(),node_2=first_child(fragment_2);component(node_2,()=>Dialog_header,($$anchor6,Dialog_Header)=>{Dialog_Header($$anchor6,{class:"border-b border-border/30 px-6 py-4",children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$F(),node_3=first_child(fragment_3);component(node_3,()=>Dialog_title,($$anchor8,Dialog_Title)=>{Dialog_Title($$anchor8,{class:"flex items-center gap-2",children:($$anchor9,$$slotProps4)=>{var fragment_4=root_4$n(), node_4=first_child(fragment_4);Folder_open(node_4,{class:"h-5 w-5"});var node_5=sibling(node_4,4);{var consequent=$$anchor10=>{var span=root_5$t(),text2=child(span);reset(span),template_effect(()=>set_text(text2,`(${get$4(totalCount)??""})`)),append($$anchor10,span)};if_block(node_5,$$render=>{get$4(totalCount)>0&&$$render(consequent)})}append($$anchor9,fragment_4)},$$slots:{default:!0}})});var node_6=sibling(node_3,2);component(node_6,()=>Dialog_description,($$anchor8,Dialog_Description)=>{Dialog_Description( $$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text_1=text$8("Browse and attach resources from connected MCP servers to your chat context.");append($$anchor9,text_1)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var div=sibling(node_2,2),div_1=child(div),node_7=child(div_1);McpResourceBrowser(node_7,{onSelect:handleResourceSelect,onToggle:handleResourceToggle,onTemplateSelect:handleTemplateSelect,get selectedUris(){return selectedResources},get selectedTemplateUri(){ return get$4(selectedTemplateUri)},get expandToUri(){return $$props.preSelectedUri}}),reset(div_1);var div_2=sibling(div_1,2),node_8=child(div_2);{var consequent_4=$$anchor6=>{var div_3=root_7$p(),div_4=child(div_3),node_9=child(div_4);Braces(node_9,{class:"h-4 w-4 text-muted-foreground"});var span_1=sibling(node_9,2),text_2=child(span_1,!0);reset(span_1),reset(div_4);var node_10=sibling(div_4,2);{var consequent_1=$$anchor7=>{var p2=root_8$k(),text_3=child(p2,!0);reset(p2),template_effect(()=>set_text( text_3,get$4(selectedTemplate).description)),append($$anchor7,p2)};if_block(node_10,$$render=>{get$4(selectedTemplate).description&&$$render(consequent_1)})}var div_5=sibling(node_10,2),p_1=child(div_5),text_4=child(p_1,!0);reset(p_1),reset(div_5);var node_11=sibling(div_5,2);{var consequent_2=$$anchor7=>{var div_6=root_9$j(),node_12=child(div_6);Loader_circle(node_12,{class:"h-6 w-6 animate-spin text-muted-foreground"}),reset(div_6),append($$anchor7,div_6)},alternate_1=$$anchor7=>{var fragment_5=comment$2(), node_13=first_child(fragment_5);{var consequent_3=$$anchor8=>{var div_7=root_11$b(),span_2=child(div_7),text_5=child(span_2,!0);reset(span_2);var node_14=sibling(span_2,2);Button(node_14,{size:"sm",variant:"outline",onclick:()=>{set$1(templatePreviewError,null)},children:($$anchor9,$$slotProps3)=>{next$1();var text_6=text$8("Try again");append($$anchor9,text_6)},$$slots:{default:!0}}),reset(div_7),template_effect(()=>set_text(text_5,get$4(templatePreviewError))),append($$anchor8,div_7)},alternate=$$anchor8=>{ McpResourceTemplateForm($$anchor8,{get template(){return get$4(selectedTemplate)},onResolve:handleTemplateResolve,onCancel:handleTemplateCancelForm})};if_block(node_13,$$render=>{get$4(templatePreviewError)?$$render(consequent_3):$$render(alternate,!1)},!0)}append($$anchor7,fragment_5)};if_block(node_11,$$render=>{get$4(templatePreviewLoading)?$$render(consequent_2):$$render(alternate_1,!1)})}reset(div_3),template_effect(()=>{set_text(text_2,get$4(selectedTemplate).title||get$4(selectedTemplate). name),set_text(text_4,get$4(selectedTemplate).uriTemplate)}),append($$anchor6,div_3)},alternate_5=$$anchor6=>{var fragment_7=comment$2(),node_15=first_child(fragment_7);{var consequent_5=$$anchor7=>{{let $0=user_derived(()=>({uri:get$4(templatePreviewUri)??"",name:get$4(templatePreviewUri)?.split("/").pop()||(get$4(templatePreviewUri)??""),serverName:get$4(selectedTemplate)?.serverName||""}));McpResourcePreview($$anchor7,{get resource(){return get$4($0)},get preloadedContent(){return get$4(templatePreviewContent)}})}}, alternate_4=$$anchor7=>{var fragment_9=comment$2(),node_16=first_child(fragment_9);{var consequent_6=$$anchor8=>{const allResources=user_derived(getAllResourcesFlatInTreeOrder),selectedResource=user_derived(()=>get$4(allResources).find(r2=>selectedResources.has(r2.uri)));{let $0=user_derived(()=>get$4(selectedResource)??null);McpResourcePreview($$anchor8,{get resource(){return get$4($0)}})}},alternate_3=$$anchor8=>{var fragment_11=comment$2(),node_17=first_child(fragment_11);{var consequent_8=$$anchor9=>{ var div_8=root_19$2();each(div_8,21,getAllResourcesFlatInTreeOrder,resource=>resource.uri,($$anchor10,resource)=>{var fragment_12=comment$2(),node_18=first_child(fragment_12);{var consequent_7=$$anchor11=>{McpResourcePreview($$anchor11,{get resource(){return get$4(resource)}})};if_block(node_18,$$render=>{selectedResources.has(get$4(resource).uri)&&$$render(consequent_7)})}append($$anchor10,fragment_12)}),reset(div_8),append($$anchor9,div_8)},alternate_2=$$anchor9=>{var div_9=root_22$6();append( $$anchor9,div_9)};if_block(node_17,$$render=>{selectedResources.size>1?$$render(consequent_8):$$render(alternate_2,!1)},!0)}append($$anchor8,fragment_11)};if_block(node_16,$$render=>{selectedResources.size===1?$$render(consequent_6):$$render(alternate_3,!1)},!0)}append($$anchor7,fragment_9)};if_block(node_15,$$render=>{get$4(hasTemplateResult)?$$render(consequent_5):$$render(alternate_4,!1)},!0)}append($$anchor6,fragment_7)};if_block(node_8,$$render=>{get$4(selectedTemplate)&&!get$4(templatePreviewContent)? $$render(consequent_4):$$render(alternate_5,!1)})}reset(div_2),reset(div);var node_19=sibling(div,2);component(node_19,()=>Dialog_footer,($$anchor6,Dialog_Footer)=>{Dialog_Footer($$anchor6,{class:"border-t border-border/30 px-6 py-4",children:($$anchor7,$$slotProps3)=>{var fragment_14=root_23$4(),node_20=first_child(fragment_14);Button(node_20,{variant:"outline",onclick:()=>handleOpenChange(!1),children:($$anchor8,$$slotProps4)=>{next$1();var text_7=text$8("Cancel");append($$anchor8,text_7)},$$slots:{ default:!0}});var node_21=sibling(node_20,2);{var consequent_10=$$anchor8=>{Button($$anchor8,{onclick:handleAttachTemplateResource,get disabled(){return get$4(isAttaching)},children:($$anchor9,$$slotProps4)=>{var fragment_16=root_26$4(),node_22=first_child(fragment_16);{var consequent_9=$$anchor10=>{Loader_circle($$anchor10,{class:"mr-2 h-4 w-4 animate-spin"})},alternate_6=$$anchor10=>{Plus($$anchor10,{class:"mr-2 h-4 w-4"})};if_block(node_22,$$render=>{get$4(isAttaching)?$$render(consequent_9): $$render(alternate_6,!1)})}next$1(),append($$anchor9,fragment_16)},$$slots:{default:!0}})},alternate_8=$$anchor8=>{{let $0=user_derived(()=>selectedResources.size===0||get$4(isAttaching));Button($$anchor8,{onclick:handleAttach,get disabled(){return get$4($0)},children:($$anchor9,$$slotProps4)=>{var fragment_20=root_30$2(),node_23=first_child(fragment_20);{var consequent_11=$$anchor10=>{Loader_circle($$anchor10,{class:"mr-2 h-4 w-4 animate-spin"})},alternate_7=$$anchor10=>{Plus($$anchor10,{class:"\ mr-2 h-4 w-4"})};if_block(node_23,$$render=>{get$4(isAttaching)?$$render(consequent_11):$$render(alternate_7,!1)})}var text_8=sibling(node_23);template_effect(()=>set_text(text_8,` Attach ${selectedResources.size>0?`(${selectedResources.size})`:"Resource"}`)),append($$anchor9,fragment_20)},$$slots:{default:!0}})}};if_block(node_21,$$render=>{get$4(hasTemplateResult)?$$render(consequent_10):$$render(alternate_8,!1)})}append($$anchor7,fragment_14)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)}, $$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_7$o=from_html(''),root_6$s=from_html('· '),root_8$j=from_html(' '),root_5$s=from_html('
        '), root_3$E=from_html(" ",1),root_10$f=from_html('
        '),root_14$7=from_html('
         
        '),root_15$4=from_html('
        No content available
        '),root_2$O=from_html('
        ',1);function DialogMcpResourcePreview($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15);const serverName=user_derived(()=>mcpStore.getServerDisplayName($$props.extra.serverName)),favicon=user_derived(()=>mcpStore.getServerFavicon($$props.extra.serverName));function getLanguage(){if($$props.extra.mimeType?.includes(MimeTypeIncludes.JSON))return MimeTypeIncludes.JSON;if($$props.extra.mimeType?.includes(MimeTypeIncludes. JAVASCRIPT))return MimeTypeIncludes.JAVASCRIPT;if($$props.extra.mimeType?.includes(MimeTypeIncludes.TYPESCRIPT))return MimeTypeIncludes.TYPESCRIPT;const name=$$props.extra.name||$$props.extra.uri||"";return getLanguageFromFilename(name)||"plaintext"}function handleDownload(){$$props.extra.content&&downloadResourceContent($$props.extra.content,$$props.extra.mimeType||MimeTypeText.PLAIN,$$props.extra.name||DEFAULT_RESOURCE_FILENAME)}var fragment=comment$2(),node2=first_child(fragment);component(node2, ()=>Root$4,($$anchor2,Dialog_Root)=>{Dialog_Root($$anchor2,{get onOpenChange(){return $$props.onOpenChange},get open(){return open2()},set open($$value){open2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Dialog_content,($$anchor4,Dialog_Content)=>{Dialog_Content($$anchor4,{class:"grid max-h-[90vh] max-w-5xl overflow-hidden sm:w-auto sm:max-w-6xl",children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$O(),node_2=first_child( fragment_2);component(node_2,()=>Dialog_header,($$anchor6,Dialog_Header)=>{Dialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$E(),node_3=first_child(fragment_3);component(node_3,()=>Dialog_title,($$anchor8,Dialog_Title)=>{Dialog_Title($$anchor8,{class:"pr-8",children:($$anchor9,$$slotProps4)=>{next$1();var text2=text$8();template_effect(()=>set_text(text2,$$props.extra.name)),append($$anchor9,text2)},$$slots:{default:!0}})});var node_4=sibling(node_3,2);component( node_4,()=>Dialog_description,($$anchor8,Dialog_Description)=>{Dialog_Description($$anchor8,{children:($$anchor9,$$slotProps4)=>{var div=root_5$s(),span=child(div),text_1=child(span,!0);reset(span);var node_5=sibling(span,2);{var consequent_1=$$anchor10=>{var span_1=root_6$s(),node_6=sibling(child(span_1));{var consequent=$$anchor11=>{var img=root_7$o();template_effect(()=>set_attribute(img,"src",get$4(favicon))),event("error",img,e=>{e.currentTarget.style.display="none"}),replay_events(img),append( $$anchor11,img)};if_block(node_6,$$render=>{get$4(favicon)&&$$render(consequent)})}var text_2=sibling(node_6);reset(span_1),template_effect(()=>set_text(text_2,` ${get$4(serverName)??""}`)),append($$anchor10,span_1)};if_block(node_5,$$render=>{get$4(serverName)&&$$render(consequent_1)})}var node_7=sibling(node_5,2);{var consequent_2=$$anchor10=>{var span_2=root_8$j(),text_3=child(span_2,!0);reset(span_2),template_effect(()=>set_text(text_3,$$props.extra.mimeType)),append($$anchor10,span_2)};if_block( node_7,$$render=>{$$props.extra.mimeType&&$$render(consequent_2)})}reset(div),template_effect(()=>set_text(text_1,$$props.extra.uri)),append($$anchor9,div)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var div_1=sibling(node_2,2),node_8=child(div_1);{let $0=user_derived(()=>!!$$props.extra.content);ActionIconCopyToClipboard(node_8,{get text(){return $$props.extra.content},get canCopy(){return get$4($0)},ariaLabel:"Copy content"})}var node_9=sibling(node_8,2);{let $0=user_derived( ()=>!$$props.extra.content);Button(node_9,{variant:"ghost",size:"sm",class:"h-7 w-7 p-0",onclick:handleDownload,get disabled(){return get$4($0)},title:"Download content",children:($$anchor6,$$slotProps3)=>{Download($$anchor6,{class:"h-3.5 w-3.5"})},$$slots:{default:!0}})}reset(div_1);var div_2=sibling(div_1,2),node_10=child(div_2);{var consequent_3=$$anchor6=>{var div_3=root_10$f(),img_1=child(div_3);reset(div_3),template_effect($0=>{set_attribute(img_1,"src",$0),set_attribute(img_1,"alt",$$props. extra.name)},[()=>$$props.extra.content.startsWith("data:")?$$props.extra.content:`data:${$$props.extra.mimeType||"image/png"};base64,${$$props.extra.content}`]),append($$anchor6,div_3)},alternate_2=$$anchor6=>{var fragment_6=comment$2(),node_11=first_child(fragment_6);{var consequent_4=$$anchor7=>{{let $0=user_derived(getLanguage);SyntaxHighlightedCode($$anchor7,{get code(){return $$props.extra.content},get language(){return get$4($0)},maxHeight:"70vh"})}},alternate_1=$$anchor7=>{var fragment_8=comment$2(), node_12=first_child(fragment_8);{var consequent_5=$$anchor8=>{var pre=root_14$7(),text_4=child(pre,!0);reset(pre),template_effect(()=>set_text(text_4,$$props.extra.content)),append($$anchor8,pre)},alternate=$$anchor8=>{var div_4=root_15$4();append($$anchor8,div_4)};if_block(node_12,$$render=>{$$props.extra.content?$$render(consequent_5):$$render(alternate,!1)},!0)}append($$anchor7,fragment_8)};if_block(node_11,$$render=>{isCodeResource($$props.extra.mimeType,$$props.extra.uri)&&$$props.extra.content? $$render(consequent_4):$$render(alternate_1,!1)},!0)}append($$anchor6,fragment_6)};if_block(node_10,$$render=>{isImageResource($$props.extra.mimeType,$$props.extra.uri)&&$$props.extra.content?$$render(consequent_3):$$render(alternate_2,!1)})}reset(div_2),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}function createDefaultSession(){return{isRunning:!1,currentTurn:0,totalToolCalls:0,lastError:null,streamingToolCall:null}} function toAgenticMessages(messages){return messages.map(message=>message.role===MessageRole.ASSISTANT&&message.tool_calls&&message.tool_calls.length>0?{role:MessageRole.ASSISTANT,content:message.content,tool_calls:message.tool_calls.map((call,index2)=>({id:call.id??`call_${index2}`,type:call.type??ToolCallType.FUNCTION,function:{name:call.function?.name??"",arguments:call.function?.arguments??""}}))}:message.role===MessageRole.TOOL&&message.tool_call_id?{role:MessageRole.TOOL,tool_call_id:message. tool_call_id,content:typeof message.content=="string"?message.content:""}:{role:message.role,content:message.content})}class AgenticStore{#_sessions=state$1(proxy(new Map));get _sessions(){return get$4(this.#_sessions)}set _sessions(value){set$1(this.#_sessions,value,!0)}get isReady(){return!0}get isAnyRunning(){for(const session of this._sessions.values())if(session.isRunning)return!0;return!1}getSession(conversationId){let session=this._sessions.get(conversationId);return session||(session=createDefaultSession(), this._sessions.set(conversationId,session)),session}updateSession(conversationId,update2){const session=this.getSession(conversationId);this._sessions.set(conversationId,{...session,...update2})}clearSession(conversationId){this._sessions.delete(conversationId)}getActiveSessions(){const active=[];for(const[conversationId,session]of this._sessions.entries())session.isRunning&&active.push({conversationId,session});return active}isRunning(conversationId){return this.getSession(conversationId).isRunning}currentTurn(conversationId){ return this.getSession(conversationId).currentTurn}totalToolCalls(conversationId){return this.getSession(conversationId).totalToolCalls}lastError(conversationId){return this.getSession(conversationId).lastError}streamingToolCall(conversationId){return this.getSession(conversationId).streamingToolCall}clearError(conversationId){this.updateSession(conversationId,{lastError:null})}getConfig(settings,perChatOverrides){const maxTurns=Number(settings.agenticMaxTurns)||DEFAULT_AGENTIC_CONFIG.maxTurns,maxToolPreviewLines=Number( settings.agenticMaxToolPreviewLines)||DEFAULT_AGENTIC_CONFIG.maxToolPreviewLines;return{enabled:mcpStore.hasEnabledServers(perChatOverrides)&&DEFAULT_AGENTIC_CONFIG.enabled,maxTurns,maxToolPreviewLines}}async runAgenticFlow(params){const{conversationId,messages,options={},callbacks,signal,perChatOverrides}=params,agenticConfig=this.getConfig(config$1(),perChatOverrides);if(!agenticConfig.enabled)return{handled:!1};if(!await mcpStore.ensureInitialized(perChatOverrides))return console.log("[Agenti\ cStore] MCP not initialized, falling back to standard chat"),{handled:!1};const tools=mcpStore.getToolDefinitionsForLLM();if(tools.length===0)return console.log("[AgenticStore] No tools available, falling back to standard chat"),{handled:!1};console.log(`[AgenticStore] Starting agentic flow with ${tools.length} tools`);const normalizedMessages=messages.map(msg=>"id"in msg&&"convId"in msg&&"timestamp"in msg?ChatService.convertDbMessageToApiChatMessageData(msg):msg).filter(msg=>msg.role===MessageRole. SYSTEM?(typeof msg.content=="string"?msg.content:"").trim().length>0:!0);this.updateSession(conversationId,{isRunning:!0,currentTurn:0,totalToolCalls:0,lastError:null}),mcpStore.acquireConnection();try{return await this.executeAgenticLoop({conversationId,messages:normalizedMessages,options,tools,agenticConfig,callbacks,signal}),{handled:!0}}catch(error2){const normalizedError=error2 instanceof Error?error2:new Error(String(error2));return this.updateSession(conversationId,{lastError:normalizedError}), callbacks.onError?.(normalizedError),{handled:!0,error:normalizedError}}finally{this.updateSession(conversationId,{isRunning:!1}),await mcpStore.releaseConnection().catch(err=>console.warn("[AgenticStore] Failed to release MCP connection:",err))}}async executeAgenticLoop(params){const{conversationId,messages,options,tools,agenticConfig,callbacks,signal}=params,{onChunk,onReasoningChunk,onToolCallsStreaming,onAttachments,onModel,onAssistantTurnComplete,createToolResultMessage,createAssistantMessage, onFlowComplete,onTimings,onTurnComplete}=callbacks,sessionMessages=toAgenticMessages(messages);let capturedTimings,totalToolCallCount=0;const agenticTimings={turns:0,toolCallsCount:0,toolsMs:0,toolCalls:[],perTurn:[],llm:{predicted_n:0,predicted_ms:0,prompt_n:0,prompt_ms:0}},maxTurns=agenticConfig.maxTurns,effectiveModel=options.model||modelsStore.models[0]?.model||"";for(let turn=0;turn0&&createAssistantMessage&&await createAssistantMessage();let turnContent="",turnReasoningContent="",turnToolCalls=[],lastStreamingToolCallName="",lastStreamingToolCallArgsLength=0,turnTimings;const turnStats={turn:turn+1,llm:{predicted_n:0,predicted_ms:0,prompt_n:0,prompt_ms:0},toolCalls:[],toolsMs:0};try{await ChatService.sendMessage(sessionMessages,{...options,stream:!0,tools:tools.length>0?tools:void 0, onChunk:chunk=>{turnContent+=chunk,onChunk?.(chunk)},onReasoningChunk:chunk=>{turnReasoningContent+=chunk,onReasoningChunk?.(chunk)},onToolCallChunk:serialized=>{try{if(turnToolCalls=JSON.parse(serialized),onToolCallsStreaming?.(turnToolCalls),turnToolCalls.length>0&&turnToolCalls[0]?.function){const name=turnToolCalls[0].function.name||"",args=turnToolCalls[0].function.arguments||"",argsLengthBucket=Math.floor(args.length/100);(name!==lastStreamingToolCallName||argsLengthBucket!==lastStreamingToolCallArgsLength)&& (lastStreamingToolCallName=name,lastStreamingToolCallArgsLength=argsLengthBucket,this.updateSession(conversationId,{streamingToolCall:{name,arguments:args}}))}}catch{}},onModel,onTimings:(timings,progress)=>{onTimings?.(timings,progress),timings&&(capturedTimings=timings,turnTimings=timings)},onComplete:()=>{},onError:error2=>{throw error2}},void 0,signal),this.updateSession(conversationId,{streamingToolCall:null}),turnTimings&&(agenticTimings.llm.predicted_n+=turnTimings.predicted_n||0,agenticTimings. llm.predicted_ms+=turnTimings.predicted_ms||0,agenticTimings.llm.prompt_n+=turnTimings.prompt_n||0,agenticTimings.llm.prompt_ms+=turnTimings.prompt_ms||0,turnStats.llm.predicted_n=turnTimings.predicted_n||0,turnStats.llm.predicted_ms=turnTimings.predicted_ms||0,turnStats.llm.prompt_n=turnTimings.prompt_n||0,turnStats.llm.prompt_ms=turnTimings.prompt_ms||0)}catch(error2){if(signal?.aborted){await onAssistantTurnComplete?.(turnContent,turnReasoningContent||void 0,this.buildFinalTimings(capturedTimings, agenticTimings),void 0),onFlowComplete?.(this.buildFinalTimings(capturedTimings,agenticTimings));return}const normalizedError=error2 instanceof Error?error2:new Error("LLM stream error");throw onChunk?.(`${LLM_ERROR_BLOCK_START}${normalizedError.message}${LLM_ERROR_BLOCK_END}`),await onAssistantTurnComplete?.(turnContent+`${LLM_ERROR_BLOCK_START}${normalizedError.message}${LLM_ERROR_BLOCK_END}`,turnReasoningContent||void 0,this.buildFinalTimings(capturedTimings,agenticTimings),void 0),onFlowComplete?.( this.buildFinalTimings(capturedTimings,agenticTimings)),normalizedError}if(turnToolCalls.length===0){agenticTimings.perTurn.push(turnStats);const finalTimings=this.buildFinalTimings(capturedTimings,agenticTimings);await onAssistantTurnComplete?.(turnContent,turnReasoningContent||void 0,finalTimings,void 0),finalTimings&&onTurnComplete?.(finalTimings),onFlowComplete?.(finalTimings);return}const normalizedCalls=this.normalizeToolCalls(turnToolCalls);if(normalizedCalls.length===0){await onAssistantTurnComplete?.( turnContent,turnReasoningContent||void 0,this.buildFinalTimings(capturedTimings,agenticTimings),void 0),onFlowComplete?.(this.buildFinalTimings(capturedTimings,agenticTimings));return}totalToolCallCount+=normalizedCalls.length,this.updateSession(conversationId,{totalToolCalls:totalToolCallCount}),await onAssistantTurnComplete?.(turnContent,turnReasoningContent||void 0,turnTimings,normalizedCalls),sessionMessages.push({role:MessageRole.ASSISTANT,content:turnContent||void 0,reasoning_content:turnReasoningContent|| void 0,tool_calls:normalizedCalls});for(const toolCall of normalizedCalls){if(signal?.aborted){onFlowComplete?.(this.buildFinalTimings(capturedTimings,agenticTimings));return}const toolStartTime=performance.now(),mcpCall={id:toolCall.id,function:{name:toolCall.function.name,arguments:toolCall.function.arguments}};let result,toolSuccess=!0;try{result=(await mcpStore.executeTool(mcpCall,signal)).content}catch(error2){if(isAbortError(error2)){onFlowComplete?.(this.buildFinalTimings(capturedTimings, agenticTimings));return}result=`Error: ${error2 instanceof Error?error2.message:String(error2)}`,toolSuccess=!1}const toolDurationMs=performance.now()-toolStartTime,toolTiming={name:toolCall.function.name,duration_ms:Math.round(toolDurationMs),success:toolSuccess};if(agenticTimings.toolCalls.push(toolTiming),agenticTimings.toolCallsCount++,agenticTimings.toolsMs+=Math.round(toolDurationMs),turnStats.toolCalls.push(toolTiming),turnStats.toolsMs+=Math.round(toolDurationMs),signal?.aborted){onFlowComplete?.( this.buildFinalTimings(capturedTimings,agenticTimings));return}const{cleanedResult,attachments}=this.extractBase64Attachments(result);let toolResultMessage;createToolResultMessage&&(toolResultMessage=await createToolResultMessage(toolCall.id,cleanedResult,attachments.length>0?attachments:void 0)),attachments.length>0&&toolResultMessage&&onAttachments?.(toolResultMessage.id,attachments);const contentParts=[{type:ContentPartType.TEXT,text:cleanedResult}];for(const attachment of attachments)attachment. type===AttachmentType.IMAGE&&(modelsStore.modelSupportsVision(effectiveModel)?contentParts.push({type:ContentPartType.IMAGE_URL,image_url:{url:attachment.base64Url}}):console.info(`[AgenticStore] Skipping image attachment (model "${effectiveModel}" does not support vision)`));sessionMessages.push({role:MessageRole.TOOL,tool_call_id:toolCall.id,content:contentParts.length===1?cleanedResult:contentParts})}if(turnStats.toolCalls.length>0){agenticTimings.perTurn.push(turnStats);const intermediateTimings=this. buildFinalTimings(capturedTimings,agenticTimings);intermediateTimings&&onTurnComplete?.(intermediateTimings)}}onChunk?.(TURN_LIMIT_MESSAGE),await onAssistantTurnComplete?.(TURN_LIMIT_MESSAGE,void 0,this.buildFinalTimings(capturedTimings,agenticTimings),void 0),onFlowComplete?.(this.buildFinalTimings(capturedTimings,agenticTimings))}buildFinalTimings(capturedTimings,agenticTimings){return agenticTimings.toolCallsCount===0?capturedTimings:{predicted_n:capturedTimings?.predicted_n,predicted_ms:capturedTimings?. predicted_ms,prompt_n:capturedTimings?.prompt_n,prompt_ms:capturedTimings?.prompt_ms,cache_n:capturedTimings?.cache_n,agentic:agenticTimings}}normalizeToolCalls(toolCalls){return toolCalls?toolCalls.map((call,index2)=>({id:call?.id??`tool_${index2}`,type:call?.type??ToolCallType.FUNCTION,function:{name:call?.function?.name??"",arguments:call?.function?.arguments??""}})):[]}extractBase64Attachments(result){if(!result.trim())return{cleanedResult:result,attachments:[]};const lines=result.split(NEWLINE_SEPARATOR), attachments=[];let attachmentIndex=0;return{cleanedResult:lines.map(line=>{const trimmedLine=line.trim(),match=trimmedLine.match(DATA_URI_BASE64_REGEX);if(!match)return line;const mimeType=match[1].toLowerCase();if(!match[2])return line;attachmentIndex+=1;const name=this.buildAttachmentName(mimeType,attachmentIndex);return mimeType.startsWith(MimeTypePrefix.IMAGE)?(attachments.push({type:AttachmentType.IMAGE,name,base64Url:trimmedLine}),`[Attachment saved: ${name}]`):line}).join(NEWLINE_SEPARATOR), attachments}}buildAttachmentName(mimeType,index2){const extension2=IMAGE_MIME_TO_EXTENSION[mimeType]??DEFAULT_IMAGE_EXTENSION;return`${MCP_ATTACHMENT_NAME_PREFIX}-${Date.now()}-${index2}.${extension2}`}}const agenticStore=new AgenticStore;class ChatStore{#activeProcessingState=state$1(null);get activeProcessingState(){return get$4(this.#activeProcessingState)}set activeProcessingState(value){set$1(this.#activeProcessingState,value,!0)}#currentResponse=state$1("");get currentResponse(){return get$4( this.#currentResponse)}set currentResponse(value){set$1(this.#currentResponse,value,!0)}#errorDialogState=state$1(null);get errorDialogState(){return get$4(this.#errorDialogState)}set errorDialogState(value){set$1(this.#errorDialogState,value,!0)}#isLoading=state$1(!1);get isLoading(){return get$4(this.#isLoading)}set isLoading(value){set$1(this.#isLoading,value,!0)}chatLoadingStates=new SvelteMap;chatStreamingStates=new SvelteMap;abortControllers=new SvelteMap;preEncodeAbortController=null;processingStates=new SvelteMap;conversationStateTimestamps=new SvelteMap;#activeConversationId=state$1( null);get activeConversationId(){return get$4(this.#activeConversationId)}set activeConversationId(value){set$1(this.#activeConversationId,value,!0)}#isStreamingActive=state$1(!1);get isStreamingActive(){return get$4(this.#isStreamingActive)}set isStreamingActive(value){set$1(this.#isStreamingActive,value,!0)}#isEditModeActive=state$1(!1);get isEditModeActive(){return get$4(this.#isEditModeActive)}set isEditModeActive(value){set$1(this.#isEditModeActive,value,!0)}#addFilesHandler=state$1(null);get addFilesHandler(){ return get$4(this.#addFilesHandler)}set addFilesHandler(value){set$1(this.#addFilesHandler,value,!0)}#pendingEditMessageId=state$1(null);get pendingEditMessageId(){return get$4(this.#pendingEditMessageId)}set pendingEditMessageId(value){set$1(this.#pendingEditMessageId,value,!0)}messageUpdateCallback=null;#_pendingDraftMessage=state$1("");get _pendingDraftMessage(){return get$4(this.#_pendingDraftMessage)}set _pendingDraftMessage(value){set$1(this.#_pendingDraftMessage,value,!0)}#_pendingDraftFiles=state$1( proxy([]));get _pendingDraftFiles(){return get$4(this.#_pendingDraftFiles)}set _pendingDraftFiles(value){set$1(this.#_pendingDraftFiles,value,!0)}setChatLoading(convId,loading){this.touchConversationState(convId),loading?(this.chatLoadingStates.set(convId,!0),convId===conversationsStore.activeConversation?.id&&(this.isLoading=!0)):(this.chatLoadingStates.delete(convId),convId===conversationsStore.activeConversation?.id&&(this.isLoading=!1))}setChatStreaming(convId,response,messageId){this.touchConversationState( convId),this.chatStreamingStates.set(convId,{response,messageId}),convId===conversationsStore.activeConversation?.id&&(this.currentResponse=response)}clearChatStreaming(convId){this.chatStreamingStates.delete(convId),convId===conversationsStore.activeConversation?.id&&(this.currentResponse="")}getChatStreaming(convId){return this.chatStreamingStates.get(convId)}syncLoadingStateForChat(convId){this.isLoading=this.chatLoadingStates.get(convId)||!1;const s2=this.chatStreamingStates.get(convId);if(this. currentResponse=s2?.response||"",this.isStreamingActive=s2!==void 0,this.setActiveProcessingConversation(convId),s2?.response&&s2?.messageId){const idx=conversationsStore.findMessageIndex(s2.messageId);idx!==-1&&conversationsStore.updateMessageAtIndex(idx,{content:s2.response})}}clearUIState(){this.isLoading=!1,this.currentResponse="",this.isStreamingActive=!1}setActiveProcessingConversation(conversationId){this.activeConversationId=conversationId,this.activeProcessingState=conversationId&&this. processingStates.get(conversationId)||null}getProcessingState(conversationId){return this.processingStates.get(conversationId)||null}setProcessingState(conversationId,state2){state2===null?this.processingStates.delete(conversationId):this.processingStates.set(conversationId,state2),conversationId===this.activeConversationId&&(this.activeProcessingState=state2)}clearProcessingState(conversationId){this.processingStates.delete(conversationId),conversationId===this.activeConversationId&&(this.activeProcessingState= null)}getActiveProcessingState(){return this.activeProcessingState}getCurrentProcessingStateSync(){return this.activeProcessingState}setStreamingActive(active){this.isStreamingActive=active}isStreaming(){return this.isStreamingActive}getOrCreateAbortController(convId){let c2=this.abortControllers.get(convId);return(!c2||c2.signal.aborted)&&(c2=new AbortController,this.abortControllers.set(convId,c2)),c2}abortRequest(convId){if(convId){const c2=this.abortControllers.get(convId);c2&&(c2.abort(),this. abortControllers.delete(convId))}else{for(const c2 of this.abortControllers.values())c2.abort();this.abortControllers.clear()}}showErrorDialog(state2){this.errorDialogState=state2}dismissErrorDialog(){this.errorDialogState=null}clearEditMode(){this.isEditModeActive=!1,this.addFilesHandler=null}isEditing(){return this.isEditModeActive}setEditModeActive(handler){this.isEditModeActive=!0,this.addFilesHandler=handler}getAddFilesHandler(){return this.addFilesHandler}clearPendingEditMessageId(){this.pendingEditMessageId= null}savePendingDraft(message,files){this._pendingDraftMessage=message,this._pendingDraftFiles=[...files]}consumePendingDraft(){if(!this._pendingDraftMessage&&this._pendingDraftFiles.length===0)return null;const d2={message:this._pendingDraftMessage,files:[...this._pendingDraftFiles]};return this._pendingDraftMessage="",this._pendingDraftFiles=[],d2}hasPendingDraft(){return!!this._pendingDraftMessage||this._pendingDraftFiles.length>0}getAllLoadingChats(){return Array.from(this.chatLoadingStates. keys())}getAllStreamingChats(){return Array.from(this.chatStreamingStates.keys())}getChatStreamingPublic(convId){return this.getChatStreaming(convId)}isChatLoadingPublic(convId){return this.chatLoadingStates.get(convId)||!1}isChatLoadingInternal(convId){return this.chatStreamingStates.has(convId)}touchConversationState(convId){this.conversationStateTimestamps.set(convId,{lastAccessed:Date.now()})}cleanupOldConversationStates(activeConversationIds){const now2=Date.now(),activeIdsList=activeConversationIds?? [],preserveIds=this.activeConversationId?[...activeIdsList,this.activeConversationId]:activeIdsList,allConvIds=[...new Set([...this.chatLoadingStates.keys(),...this.chatStreamingStates.keys(),...this.abortControllers.keys(),...this.processingStates.keys(),...this.conversationStateTimestamps.keys()])],cleanupCandidates=[];for(const convId of allConvIds){if(preserveIds.includes(convId)||this.chatLoadingStates.get(convId)||this.chatStreamingStates.has(convId))continue;const ts=this.conversationStateTimestamps. get(convId);cleanupCandidates.push({convId,lastAccessed:ts?.lastAccessed??0})}cleanupCandidates.sort((a,b)=>a.lastAccessed-b.lastAccessed);let cleanedUp=0;for(const{convId,lastAccessed}of cleanupCandidates)(cleanupCandidates.length-cleanedUp>MAX_INACTIVE_CONVERSATION_STATES||now2-lastAccessed>INACTIVE_CONVERSATION_STATE_MAX_AGE_MS)&&(this.cleanupConversationState(convId),cleanedUp++);return cleanedUp}cleanupConversationState(convId){const c2=this.abortControllers.get(convId);c2&&!c2.signal.aborted&& c2.abort(),this.chatLoadingStates.delete(convId),this.chatStreamingStates.delete(convId),this.abortControllers.delete(convId),this.processingStates.delete(convId),this.conversationStateTimestamps.delete(convId)}getTrackedConversationCount(){return new Set([...this.chatLoadingStates.keys(),...this.chatStreamingStates.keys(),...this.abortControllers.keys(),...this.processingStates.keys()]).size}getMessageByIdWithRole(messageId,expectedRole){const index2=conversationsStore.findMessageIndex(messageId); if(index2===-1)return null;const message=conversationsStore.activeMessages[index2];return expectedRole&&message.role!==expectedRole?null:{message,index:index2}}async addMessage(role,content2,type2=MessageType.TEXT,parent="-1",extras){const activeConv=conversationsStore.activeConversation;if(!activeConv)throw new Error("No active conversation");let parentId=null;if(parent==="-1"){const am=conversationsStore.activeMessages;if(am.length>0)parentId=am[am.length-1].id;else{const r2=(await conversationsStore. getConversationMessages(activeConv.id)).find(m=>m.parent===null&&m.type==="root");parentId=r2?r2.id:await DatabaseService.createRootMessage(activeConv.id)}}else parentId=parent;const message=await DatabaseService.createMessageBranch({convId:activeConv.id,role,content:content2,type:type2,timestamp:Date.now(),toolCalls:"",children:[],extra:extras},parentId);return conversationsStore.addMessageToActive(message),await conversationsStore.updateCurrentNode(message.id),conversationsStore.updateConversationTimestamp(), message}async addSystemPrompt(){let activeConv=conversationsStore.activeConversation;if(activeConv||(await conversationsStore.createConversation(),activeConv=conversationsStore.activeConversation),!!activeConv)try{const allMessages=await conversationsStore.getConversationMessages(activeConv.id),rootMessage=allMessages.find(m=>m.type==="root"&&m.parent===null),rootId=rootMessage?rootMessage.id:await DatabaseService.createRootMessage(activeConv.id),existingSystemMessage=allMessages.find(m=>m.role=== MessageRole.SYSTEM&&m.parent===rootId);if(existingSystemMessage){this.pendingEditMessageId=existingSystemMessage.id,conversationsStore.activeMessages.some(m=>m.id===existingSystemMessage.id)||conversationsStore.activeMessages.unshift(existingSystemMessage);return}const firstActiveMessage=conversationsStore.activeMessages.find(m=>m.parent===rootId),systemMessage=await DatabaseService.createSystemMessage(activeConv.id,SYSTEM_MESSAGE_PLACEHOLDER,rootId);if(firstActiveMessage){await DatabaseService. updateMessage(firstActiveMessage.id,{parent:systemMessage.id}),await DatabaseService.updateMessage(systemMessage.id,{children:[firstActiveMessage.id]});const updatedRootChildren=rootMessage?rootMessage.children.filter(id2=>id2!==firstActiveMessage.id):[];await DatabaseService.updateMessage(rootId,{children:[...updatedRootChildren.filter(id2=>id2!==systemMessage.id),systemMessage.id]});const firstMsgIndex=conversationsStore.findMessageIndex(firstActiveMessage.id);firstMsgIndex!==-1&&conversationsStore. updateMessageAtIndex(firstMsgIndex,{parent:systemMessage.id})}conversationsStore.activeMessages.unshift(systemMessage),this.pendingEditMessageId=systemMessage.id,conversationsStore.updateConversationTimestamp()}catch(error2){console.error("Failed to add system prompt:",error2)}}async removeSystemPromptPlaceholder(messageId){const activeConv=conversationsStore.activeConversation;if(!activeConv)return!1;try{const allMessages=await conversationsStore.getConversationMessages(activeConv.id),systemMessage=findMessageById( allMessages,messageId);if(!systemMessage||systemMessage.role!==MessageRole.SYSTEM)return!1;const rootMessage=allMessages.find(m=>m.type==="root"&&m.parent===null);if(!rootMessage)return!1;if(allMessages.length===2&&systemMessage.children.length===0)return await conversationsStore.deleteConversation(activeConv.id),!0;for(const childId of systemMessage.children){await DatabaseService.updateMessage(childId,{parent:rootMessage.id});const childIndex=conversationsStore.findMessageIndex(childId);childIndex!== -1&&conversationsStore.updateMessageAtIndex(childIndex,{parent:rootMessage.id})}await DatabaseService.updateMessage(rootMessage.id,{children:[...rootMessage.children.filter(id2=>id2!==messageId),...systemMessage.children]}),await DatabaseService.deleteMessage(messageId);const systemIndex=conversationsStore.findMessageIndex(messageId);return systemIndex!==-1&&conversationsStore.activeMessages.splice(systemIndex,1),conversationsStore.updateConversationTimestamp(),!1}catch(error2){return console.error( "Failed to remove system prompt placeholder:",error2),!1}}async createAssistantMessage(parentId){const activeConv=conversationsStore.activeConversation;if(!activeConv)throw new Error("No active conversation");return await DatabaseService.createMessageBranch({convId:activeConv.id,type:MessageType.TEXT,role:MessageRole.ASSISTANT,content:"",timestamp:Date.now(),toolCalls:"",children:[],model:null},parentId||null)}async sendMessage(content2,extras){if(!content2.trim()&&(!extras||extras.length===0))return; const activeConv=conversationsStore.activeConversation;if(activeConv&&this.isChatLoadingInternal(activeConv.id))return;this.cancelPreEncode();const resourceExtras=mcpStore.consumeResourceAttachmentsAsExtras(),allExtras=resourceExtras.length>0?[...extras||[],...resourceExtras]:extras;let isNewConversation=!1;activeConv||(await conversationsStore.createConversation(),isNewConversation=!0);const currentConv=conversationsStore.activeConversation;if(currentConv){this.showErrorDialog(null),this.setChatLoading( currentConv.id,!0),this.clearChatStreaming(currentConv.id);try{let parentIdForUserMessage;if(isNewConversation){const rootId=await DatabaseService.createRootMessage(currentConv.id),systemPrompt=config$1().systemMessage?.toString().trim();if(systemPrompt){const systemMessage=await DatabaseService.createSystemMessage(currentConv.id,systemPrompt,rootId);conversationsStore.addMessageToActive(systemMessage),parentIdForUserMessage=systemMessage.id}else parentIdForUserMessage=rootId}const userMessage=await this. addMessage(MessageRole.USER,content2,MessageType.TEXT,parentIdForUserMessage??"-1",allExtras);isNewConversation&&content2&&await conversationsStore.updateConversationName(currentConv.id,content2.trim());const assistantMessage=await this.createAssistantMessage(userMessage.id);conversationsStore.addMessageToActive(assistantMessage),await this.streamChatCompletion(conversationsStore.activeMessages.slice(0,-1),assistantMessage)}catch(error2){if(isAbortError(error2)){this.setChatLoading(currentConv.id, !1);return}console.error("Failed to send message:",error2),this.setChatLoading(currentConv.id,!1);const dialogType=error2 instanceof Error&&error2.name==="TimeoutError"?ErrorDialogType.TIMEOUT:ErrorDialogType.SERVER,contextInfo=error2.contextInfo;this.showErrorDialog({type:dialogType,message:error2 instanceof Error?error2.message:"Unknown error",contextInfo})}}}async streamChatCompletion(allMessages,assistantMessage,onComplete,onError,modelOverride){let effectiveModel=modelOverride;if(isRouterMode()&& !effectiveModel){const conversationModel=this.getConversationModel(allMessages);effectiveModel=selectedModelName()||conversationModel}isRouterMode()&&effectiveModel&&(modelsStore.getModelProps(effectiveModel)||await modelsStore.fetchModelProps(effectiveModel));let currentMessageId=assistantMessage.id,streamedContent="",streamedReasoningContent="",resolvedModel=null,modelPersisted=!1;const convId=assistantMessage.convId,recordModel=(modelName,persistImmediately=!0)=>{if(!modelName)return;const n=normalizeModelName( modelName);if(!n||n===resolvedModel)return;resolvedModel=n;const idx=conversationsStore.findMessageIndex(currentMessageId);conversationsStore.updateMessageAtIndex(idx,{model:n}),persistImmediately&&!modelPersisted&&(modelPersisted=!0,DatabaseService.updateMessage(currentMessageId,{model:n}).catch(()=>{modelPersisted=!1,resolvedModel=null}))},updateStreamingUI=()=>{this.setChatStreaming(convId,streamedContent,currentMessageId);const idx=conversationsStore.findMessageIndex(currentMessageId);conversationsStore. updateMessageAtIndex(idx,{content:streamedContent})},cleanupStreamingState=()=>{this.setStreamingActive(!1),this.setChatLoading(convId,!1),this.clearChatStreaming(convId),this.setProcessingState(convId,null)};this.setStreamingActive(!0),this.setActiveProcessingConversation(convId);const abortController=this.getOrCreateAbortController(convId),streamCallbacks={onChunk:chunk=>{streamedContent+=chunk,updateStreamingUI()},onReasoningChunk:chunk=>{streamedReasoningContent+=chunk;const idx=conversationsStore. findMessageIndex(currentMessageId);conversationsStore.updateMessageAtIndex(idx,{reasoningContent:streamedReasoningContent})},onToolCallsStreaming:toolCalls=>{const idx=conversationsStore.findMessageIndex(currentMessageId);conversationsStore.updateMessageAtIndex(idx,{toolCalls:JSON.stringify(toolCalls)})},onAttachments:(messageId,extras)=>{if(!extras.length)return;const idx=conversationsStore.findMessageIndex(messageId);if(idx===-1)return;const updatedExtras=[...conversationsStore.activeMessages[idx]. extra||[],...extras];conversationsStore.updateMessageAtIndex(idx,{extra:updatedExtras}),DatabaseService.updateMessage(messageId,{extra:updatedExtras}).catch(console.error)},onModel:modelName=>recordModel(modelName),onTurnComplete:intermediateTimings=>{const idx=conversationsStore.findMessageIndex(assistantMessage.id);conversationsStore.updateMessageAtIndex(idx,{timings:intermediateTimings})},onTimings:(timings,promptProgress)=>{const tokensPerSecond=timings?.predicted_ms&&timings?.predicted_n?timings. predicted_n/timings.predicted_ms*1e3:0;this.updateProcessingStateFromTimings({prompt_n:timings?.prompt_n||0,prompt_ms:timings?.prompt_ms,predicted_n:timings?.predicted_n||0,predicted_per_second:tokensPerSecond,cache_n:timings?.cache_n||0,prompt_progress:promptProgress},convId)},onAssistantTurnComplete:async(content2,reasoningContent,timings,toolCalls)=>{const updateData={content:content2,reasoningContent:reasoningContent||void 0,toolCalls:toolCalls?JSON.stringify(toolCalls):"",timings};resolvedModel&& !modelPersisted&&(updateData.model=resolvedModel),await DatabaseService.updateMessage(currentMessageId,updateData);const idx=conversationsStore.findMessageIndex(currentMessageId),uiUpdate={content:content2,reasoningContent:reasoningContent||void 0,toolCalls:toolCalls?JSON.stringify(toolCalls):""};timings&&(uiUpdate.timings=timings),resolvedModel&&(uiUpdate.model=resolvedModel),conversationsStore.updateMessageAtIndex(idx,uiUpdate),await conversationsStore.updateCurrentNode(currentMessageId)},createToolResultMessage:async(toolCallId,content2,extras)=>{ const msg=await DatabaseService.createMessageBranch({convId,type:MessageType.TEXT,role:MessageRole.TOOL,content:content2,toolCallId,timestamp:Date.now(),toolCalls:"",children:[],extra:extras},currentMessageId);return conversationsStore.addMessageToActive(msg),await conversationsStore.updateCurrentNode(msg.id),msg},createAssistantMessage:async()=>{streamedContent="",streamedReasoningContent="";const lastMsg=conversationsStore.activeMessages[conversationsStore.activeMessages.length-1],msg=await DatabaseService. createMessageBranch({convId,type:MessageType.TEXT,role:MessageRole.ASSISTANT,content:"",timestamp:Date.now(),toolCalls:"",children:[],model:resolvedModel},lastMsg.id);return conversationsStore.addMessageToActive(msg),currentMessageId=msg.id,msg},onFlowComplete:finalTimings=>{if(finalTimings){const idx=conversationsStore.findMessageIndex(assistantMessage.id);conversationsStore.updateMessageAtIndex(idx,{timings:finalTimings}),DatabaseService.updateMessage(assistantMessage.id,{timings:finalTimings}). catch(console.error)}cleanupStreamingState(),onComplete&&onComplete(streamedContent),isRouterMode()&&modelsStore.fetchRouterModels().catch(console.error),config$1().preEncodeConversation&&this.triggerPreEncode(allMessages,assistantMessage,streamedContent,effectiveModel,!!config$1().excludeReasoningFromContext)},onError:error2=>{if(this.setStreamingActive(!1),isAbortError(error2)){cleanupStreamingState();return}console.error("Streaming error:",error2),cleanupStreamingState();const idx=conversationsStore. findMessageIndex(assistantMessage.id);if(idx!==-1){const failedMessage=conversationsStore.removeMessageAtIndex(idx);failedMessage&&DatabaseService.deleteMessage(failedMessage.id).catch(console.error)}const contextInfo=error2.contextInfo;this.showErrorDialog({type:error2.name==="TimeoutError"?ErrorDialogType.TIMEOUT:ErrorDialogType.SERVER,message:error2.message,contextInfo}),onError&&onError(error2)}},perChatOverrides=conversationsStore.activeConversation?.mcpServerOverrides;agenticStore.getConfig( config$1(),perChatOverrides).enabled&&(await agenticStore.runAgenticFlow({conversationId:convId,messages:allMessages,options:{...this.getApiOptions(),...effectiveModel?{model:effectiveModel}:{}},callbacks:streamCallbacks,signal:abortController.signal,perChatOverrides})).handled||await ChatService.sendMessage(allMessages,{...this.getApiOptions(),...effectiveModel?{model:effectiveModel}:{},stream:!0,onChunk:streamCallbacks.onChunk,onReasoningChunk:streamCallbacks.onReasoningChunk,onModel:streamCallbacks. onModel,onTimings:streamCallbacks.onTimings,onComplete:async(finalContent,reasoningContent,timings,toolCalls)=>{const content2=streamedContent||finalContent||"",reasoning=streamedReasoningContent||reasoningContent,updateData={content:content2,reasoningContent:reasoning||void 0,toolCalls:toolCalls||"",timings};resolvedModel&&!modelPersisted&&(updateData.model=resolvedModel),await DatabaseService.updateMessage(currentMessageId,updateData);const idx=conversationsStore.findMessageIndex(currentMessageId), uiUpdate={content:content2,reasoningContent:reasoning||void 0,toolCalls:toolCalls||""};timings&&(uiUpdate.timings=timings),resolvedModel&&(uiUpdate.model=resolvedModel),conversationsStore.updateMessageAtIndex(idx,uiUpdate),await conversationsStore.updateCurrentNode(currentMessageId),cleanupStreamingState(),onComplete&&await onComplete(content2),isRouterMode()&&modelsStore.fetchRouterModels().catch(console.error)},onError:streamCallbacks.onError},convId,abortController.signal)}async stopGeneration(){ const activeConv=conversationsStore.activeConversation;activeConv&&await this.stopGenerationForChat(activeConv.id)}async stopGenerationForChat(convId){await this.savePartialResponseIfNeeded(convId),this.setStreamingActive(!1),this.abortRequest(convId),this.setChatLoading(convId,!1),this.clearChatStreaming(convId),this.setProcessingState(convId,null)}async savePartialResponseIfNeeded(convId){const conversationId=convId||conversationsStore.activeConversation?.id;if(!conversationId)return;const streamingState=this. getChatStreaming(conversationId);if(!streamingState||!streamingState.response.trim())return;const messages=conversationId===conversationsStore.activeConversation?.id?conversationsStore.activeMessages:await conversationsStore.getConversationMessages(conversationId);if(!messages.length)return;const lastMessage=messages[messages.length-1];if(lastMessage?.role===MessageRole.ASSISTANT)try{const updateData={content:streamingState.response},lastKnownState=this.getProcessingState(conversationId);lastKnownState&& (updateData.timings={prompt_n:lastKnownState.promptTokens||0,prompt_ms:lastKnownState.promptMs,predicted_n:lastKnownState.tokensDecoded||0,cache_n:lastKnownState.cacheTokens||0,predicted_ms:lastKnownState.tokensPerSecond&&lastKnownState.tokensDecoded?lastKnownState.tokensDecoded/lastKnownState.tokensPerSecond*1e3:void 0}),await DatabaseService.updateMessage(lastMessage.id,updateData),lastMessage.content=streamingState.response,updateData.timings&&(lastMessage.timings=updateData.timings)}catch(error2){ lastMessage.content=streamingState.response,console.error("Failed to save partial response:",error2)}}async updateMessage(messageId,newContent){const activeConv=conversationsStore.activeConversation;if(!activeConv)return;this.isChatLoadingInternal(activeConv.id)&&await this.stopGeneration();const result=this.getMessageByIdWithRole(messageId,MessageRole.USER);if(!result)return;const{message:messageToUpdate,index:messageIndex}=result,originalContent=messageToUpdate.content;try{const rootMessage=(await conversationsStore. getConversationMessages(activeConv.id)).find(m=>m.type==="root"&&m.parent===null),isFirstUserMessage=rootMessage&&messageToUpdate.parent===rootMessage.id;conversationsStore.updateMessageAtIndex(messageIndex,{content:newContent}),await DatabaseService.updateMessage(messageId,{content:newContent}),isFirstUserMessage&&newContent.trim()&&await conversationsStore.updateConversationTitleWithConfirmation(activeConv.id,newContent.trim());const messagesToRemove=conversationsStore.activeMessages.slice(messageIndex+ 1);for(const message of messagesToRemove)await DatabaseService.deleteMessage(message.id);conversationsStore.sliceActiveMessages(messageIndex+1),conversationsStore.updateConversationTimestamp(),this.setChatLoading(activeConv.id,!0),this.clearChatStreaming(activeConv.id);const assistantMessage=await this.createAssistantMessage();conversationsStore.addMessageToActive(assistantMessage),await conversationsStore.updateCurrentNode(assistantMessage.id),await this.streamChatCompletion(conversationsStore. activeMessages.slice(0,-1),assistantMessage,void 0,()=>{conversationsStore.updateMessageAtIndex(conversationsStore.findMessageIndex(messageId),{content:originalContent})})}catch(error2){isAbortError(error2)||console.error("Failed to update message:",error2)}}async regenerateMessage(messageId){const activeConv=conversationsStore.activeConversation;if(!activeConv||this.isChatLoadingInternal(activeConv.id))return;this.cancelPreEncode();const result=this.getMessageByIdWithRole(messageId,MessageRole. ASSISTANT);if(!result)return;const{index:messageIndex}=result;try{const messagesToRemove=conversationsStore.activeMessages.slice(messageIndex);for(const message of messagesToRemove)await DatabaseService.deleteMessage(message.id);conversationsStore.sliceActiveMessages(messageIndex),conversationsStore.updateConversationTimestamp(),this.setChatLoading(activeConv.id,!0),this.clearChatStreaming(activeConv.id);const parentMessageId=conversationsStore.activeMessages.length>0?conversationsStore.activeMessages[conversationsStore. activeMessages.length-1].id:void 0,assistantMessage=await this.createAssistantMessage(parentMessageId);conversationsStore.addMessageToActive(assistantMessage),await this.streamChatCompletion(conversationsStore.activeMessages.slice(0,-1),assistantMessage)}catch(error2){isAbortError(error2)||console.error("Failed to regenerate message:",error2),this.setChatLoading(activeConv?.id||"",!1)}}async regenerateMessageWithBranching(messageId,modelOverride){const activeConv=conversationsStore.activeConversation; if(!(!activeConv||this.isChatLoadingInternal(activeConv.id))){this.cancelPreEncode();try{const idx=conversationsStore.findMessageIndex(messageId);if(idx===-1)return;const msg=conversationsStore.activeMessages[idx];if(msg.role!==MessageRole.ASSISTANT)return;const allMessages=await conversationsStore.getConversationMessages(activeConv.id),parentMessage=findMessageById(allMessages,msg.parent);if(!parentMessage)return;this.setChatLoading(activeConv.id,!0),this.clearChatStreaming(activeConv.id);const newAssistantMessage=await DatabaseService. createMessageBranch({convId:msg.convId,type:msg.type,timestamp:Date.now(),role:msg.role,content:"",toolCalls:"",children:[],model:null},parentMessage.id);await conversationsStore.updateCurrentNode(newAssistantMessage.id),conversationsStore.updateConversationTimestamp(),await conversationsStore.refreshActiveMessages();const conversationPath=filterByLeafNodeId(allMessages,parentMessage.id,!1),modelToUse=modelOverride||msg.model||void 0;await this.streamChatCompletion(conversationPath,newAssistantMessage, void 0,void 0,modelToUse)}catch(error2){isAbortError(error2)||console.error("Failed to regenerate message with branching:",error2),this.setChatLoading(activeConv?.id||"",!1)}}}async getDeletionInfo(messageId){const activeConv=conversationsStore.activeConversation;if(!activeConv)return{totalCount:0,userMessages:0,assistantMessages:0,messageTypes:[]};const allMessages=await conversationsStore.getConversationMessages(activeConv.id);if(findMessageById(allMessages,messageId)?.role===MessageRole.SYSTEM){ const messagesToDelete2=allMessages.filter(m=>m.id===messageId);let userMessages2=0,assistantMessages2=0;const messageTypes2=[];for(const msg of messagesToDelete2)msg.role===MessageRole.USER?(userMessages2++,messageTypes2.includes("user message")||messageTypes2.push("user message")):msg.role===MessageRole.ASSISTANT&&(assistantMessages2++,messageTypes2.includes("assistant response")||messageTypes2.push("assistant response"));return{totalCount:1,userMessages:userMessages2,assistantMessages:assistantMessages2, messageTypes:messageTypes2}}const descendants=findDescendantMessages(allMessages,messageId),allToDelete=[messageId,...descendants],messagesToDelete=allMessages.filter(m=>allToDelete.includes(m.id));let userMessages=0,assistantMessages=0;const messageTypes=[];for(const msg of messagesToDelete)msg.role===MessageRole.USER?(userMessages++,messageTypes.includes("user message")||messageTypes.push("user message")):msg.role===MessageRole.ASSISTANT&&(assistantMessages++,messageTypes.includes("assistant r\ esponse")||messageTypes.push("assistant response"));return{totalCount:allToDelete.length,userMessages,assistantMessages,messageTypes}}async deleteMessage(messageId){const activeConv=conversationsStore.activeConversation;if(activeConv)try{const allMessages=await conversationsStore.getConversationMessages(activeConv.id),messageToDelete=findMessageById(allMessages,messageId);if(!messageToDelete)return;if(filterByLeafNodeId(allMessages,activeConv.currNode||"",!1).some(m=>m.id===messageId)&&messageToDelete. parent){const siblings2=allMessages.filter(m=>m.parent===messageToDelete.parent&&m.id!==messageId);if(siblings2.length>0){const latestSibling=siblings2.reduce((latest,sibling2)=>sibling2.timestamp>latest.timestamp?sibling2:latest);await conversationsStore.updateCurrentNode(findLeafNode(allMessages,latestSibling.id))}else messageToDelete.parent&&await conversationsStore.updateCurrentNode(findLeafNode(allMessages,messageToDelete.parent))}await DatabaseService.deleteMessageCascading(activeConv.id,messageId), await conversationsStore.refreshActiveMessages(),conversationsStore.updateConversationTimestamp()}catch(error2){console.error("Failed to delete message:",error2)}}async continueAssistantMessage(messageId){const activeConv=conversationsStore.activeConversation;if(!activeConv||this.isChatLoadingInternal(activeConv.id))return;const result=this.getMessageByIdWithRole(messageId,MessageRole.ASSISTANT);if(!result)return;const{message:msg,index:idx}=result;try{this.showErrorDialog(null),this.setChatLoading( activeConv.id,!0),this.clearChatStreaming(activeConv.id);const allMessages=await conversationsStore.getConversationMessages(activeConv.id),dbMessage=findMessageById(allMessages,messageId);if(!dbMessage){this.setChatLoading(activeConv.id,!1);return}const originalContent=dbMessage.content,originalReasoning=dbMessage.reasoningContent||"",contextWithContinue=[...conversationsStore.activeMessages.slice(0,idx),{role:MessageRole.ASSISTANT,content:originalContent}];let appendedContent="",appendedReasoning="", hasReceivedContent=!1;const updateStreamingContent=fullContent=>{this.setChatStreaming(msg.convId,fullContent,msg.id),conversationsStore.updateMessageAtIndex(idx,{content:fullContent})},abortController=this.getOrCreateAbortController(msg.convId);await ChatService.sendMessage(contextWithContinue,{...this.getApiOptions(),onChunk:chunk=>{appendedContent+=chunk,hasReceivedContent=!0,updateStreamingContent(originalContent+appendedContent)},onReasoningChunk:chunk=>{appendedReasoning+=chunk,hasReceivedContent= !0,conversationsStore.updateMessageAtIndex(idx,{reasoningContent:originalReasoning+appendedReasoning})},onTimings:(timings,promptProgress)=>{const tokensPerSecond=timings?.predicted_ms&&timings?.predicted_n?timings.predicted_n/timings.predicted_ms*1e3:0;this.updateProcessingStateFromTimings({prompt_n:timings?.prompt_n||0,prompt_ms:timings?.prompt_ms,predicted_n:timings?.predicted_n||0,predicted_per_second:tokensPerSecond,cache_n:timings?.cache_n||0,prompt_progress:promptProgress},msg.convId)},onComplete:async(finalContent,reasoningContent,timings)=>{ const finalAppendedContent=hasReceivedContent?appendedContent:finalContent||"",finalAppendedReasoning=hasReceivedContent?appendedReasoning:reasoningContent||"",fullContent=originalContent+finalAppendedContent,fullReasoning=originalReasoning+finalAppendedReasoning||void 0;await DatabaseService.updateMessage(msg.id,{content:fullContent,reasoningContent:fullReasoning,timestamp:Date.now(),timings}),conversationsStore.updateMessageAtIndex(idx,{content:fullContent,reasoningContent:fullReasoning,timestamp:Date. now(),timings}),conversationsStore.updateConversationTimestamp(),this.setChatLoading(msg.convId,!1),this.clearChatStreaming(msg.convId),this.setProcessingState(msg.convId,null)},onError:async error2=>{if(isAbortError(error2)){hasReceivedContent&&appendedContent&&(await DatabaseService.updateMessage(msg.id,{content:originalContent+appendedContent,reasoningContent:originalReasoning+appendedReasoning||void 0,timestamp:Date.now()}),conversationsStore.updateMessageAtIndex(idx,{content:originalContent+ appendedContent,reasoningContent:originalReasoning+appendedReasoning||void 0,timestamp:Date.now()})),this.setChatLoading(msg.convId,!1),this.clearChatStreaming(msg.convId),this.setProcessingState(msg.convId,null);return}console.error("Continue generation error:",error2),conversationsStore.updateMessageAtIndex(idx,{content:originalContent}),await DatabaseService.updateMessage(msg.id,{content:originalContent}),this.setChatLoading(msg.convId,!1),this.clearChatStreaming(msg.convId),this.setProcessingState( msg.convId,null),this.showErrorDialog({type:error2.name==="TimeoutError"?ErrorDialogType.TIMEOUT:ErrorDialogType.SERVER,message:error2.message})}},msg.convId,abortController.signal)}catch(error2){isAbortError(error2)||console.error("Failed to continue message:",error2),activeConv&&this.setChatLoading(activeConv.id,!1)}}async editAssistantMessage(messageId,newContent,shouldBranch){const activeConv=conversationsStore.activeConversation;if(!activeConv||this.isChatLoadingInternal(activeConv.id))return; const result=this.getMessageByIdWithRole(messageId,MessageRole.ASSISTANT);if(!result)return;const{message:msg,index:idx}=result;try{if(shouldBranch){const newMessage=await DatabaseService.createMessageBranch({convId:msg.convId,type:msg.type,timestamp:Date.now(),role:msg.role,content:newContent,toolCalls:msg.toolCalls||"",children:[],model:msg.model},msg.parent);await conversationsStore.updateCurrentNode(newMessage.id)}else await DatabaseService.updateMessage(msg.id,{content:newContent}),conversationsStore. updateMessageAtIndex(idx,{content:newContent});conversationsStore.updateConversationTimestamp(),await conversationsStore.refreshActiveMessages()}catch(error2){console.error("Failed to edit assistant message:",error2)}}async editUserMessagePreserveResponses(messageId,newContent,newExtras){const activeConv=conversationsStore.activeConversation;if(!activeConv)return;const result=this.getMessageByIdWithRole(messageId,MessageRole.USER);if(!result)return;const{message:msg,index:idx}=result;try{const updateData={ content:newContent};newExtras!==void 0&&(updateData.extra=JSON.parse(JSON.stringify(newExtras))),await DatabaseService.updateMessage(messageId,updateData),conversationsStore.updateMessageAtIndex(idx,updateData);const rootMessage=(await conversationsStore.getConversationMessages(activeConv.id)).find(m=>m.type==="root"&&m.parent===null);rootMessage&&msg.parent===rootMessage.id&&newContent.trim()&&await conversationsStore.updateConversationTitleWithConfirmation(activeConv.id,newContent.trim()),conversationsStore. updateConversationTimestamp()}catch(error2){console.error("Failed to edit user message:",error2)}}async editMessageWithBranching(messageId,newContent,newExtras){const activeConv=conversationsStore.activeConversation;if(!activeConv||this.isChatLoadingInternal(activeConv.id))return;let result=this.getMessageByIdWithRole(messageId,MessageRole.USER);if(result||(result=this.getMessageByIdWithRole(messageId,MessageRole.SYSTEM)),!result)return;const{message:msg,index:idx}=result;try{const allMessages=await conversationsStore. getConversationMessages(activeConv.id),rootMessage=allMessages.find(m=>m.type==="root"&&m.parent===null),isFirstUserMessage=msg.role===MessageRole.USER&&rootMessage&&msg.parent===rootMessage.id,extrasToUse=newExtras!==void 0?JSON.parse(JSON.stringify(newExtras)):msg.extra?JSON.parse(JSON.stringify(msg.extra)):void 0;let messageIdForResponse;const dbMsg=findMessageById(allMessages,msg.id);if(dbMsg?dbMsg.children.length>0:msg.children.length>0){const parentId=msg.parent||rootMessage?.id;if(!parentId) return;const newMessage=await DatabaseService.createMessageBranch({convId:msg.convId,type:msg.type,timestamp:Date.now(),role:msg.role,content:newContent,toolCalls:msg.toolCalls||"",children:[],extra:extrasToUse,model:msg.model},parentId);await conversationsStore.updateCurrentNode(newMessage.id),messageIdForResponse=newMessage.id}else{const updates={content:newContent,timestamp:Date.now(),extra:extrasToUse};await DatabaseService.updateMessage(msg.id,updates),conversationsStore.updateMessageAtIndex( idx,updates),messageIdForResponse=msg.id}conversationsStore.updateConversationTimestamp(),isFirstUserMessage&&newContent.trim()&&await conversationsStore.updateConversationTitleWithConfirmation(activeConv.id,newContent.trim()),await conversationsStore.refreshActiveMessages(),msg.role===MessageRole.USER&&await this.generateResponseForMessage(messageIdForResponse)}catch(error2){console.error("Failed to edit message with branching:",error2)}}async generateResponseForMessage(userMessageId){const activeConv=conversationsStore. activeConversation;if(activeConv){this.showErrorDialog(null),this.setChatLoading(activeConv.id,!0),this.clearChatStreaming(activeConv.id);try{const allMessages=await conversationsStore.getConversationMessages(activeConv.id),conversationPath=filterByLeafNodeId(allMessages,userMessageId,!1),assistantMessage=await DatabaseService.createMessageBranch({convId:activeConv.id,type:MessageType.TEXT,timestamp:Date.now(),role:MessageRole.ASSISTANT,content:"",toolCalls:"",children:[],model:null},userMessageId); conversationsStore.addMessageToActive(assistantMessage),await this.streamChatCompletion(conversationPath,assistantMessage)}catch(error2){console.error("Failed to generate response:",error2),this.setChatLoading(activeConv.id,!1)}}}getContextTotal(){const activeConvId=this.activeConversationId,activeState=activeConvId?this.getProcessingState(activeConvId):null;if(activeState&&typeof activeState.contextTotal=="number"&&activeState.contextTotal>0)return activeState.contextTotal;if(isRouterMode()){const modelContextSize=selectedModelContextSize(); if(typeof modelContextSize=="number"&&modelContextSize>0)return modelContextSize}else{const propsContextSize=contextSize();if(typeof propsContextSize=="number"&&propsContextSize>0)return propsContextSize}return null}updateProcessingStateFromTimings(timingData,conversationId){const processingState=this.parseTimingData(timingData);if(processingState===null){console.warn("Failed to parse timing data - skipping update");return}const targetId=conversationId||this.activeConversationId;targetId&&this.setProcessingState( targetId,processingState)}parseTimingData(timingData){const promptTokens=timingData.prompt_n||0,promptMs=timingData.prompt_ms||void 0,predictedTokens=timingData.predicted_n||0,tokensPerSecond=timingData.predicted_per_second||0,cacheTokens=timingData.cache_n||0,promptProgress=timingData.prompt_progress,contextTotal=this.getContextTotal(),currentConfig=config$1(),outputTokensMax=currentConfig.max_tokens||-1,contextUsed=promptTokens+cacheTokens+predictedTokens,outputTokensUsed=predictedTokens,progressCache=promptProgress?. cache||0,progressActualDone=(promptProgress?.processed??0)-progressCache,progressActualTotal=(promptProgress?.total??0)-progressCache,progressPercent=promptProgress?Math.round(progressActualDone/progressActualTotal*100):void 0;return{status:predictedTokens>0?"generating":promptProgress?"preparing":"idle",tokensDecoded:predictedTokens,tokensRemaining:outputTokensMax-predictedTokens,contextUsed,contextTotal,outputTokensUsed,outputTokensMax,hasNextToken:predictedTokens>0,tokensPerSecond,temperature:currentConfig. temperature??.8,topP:currentConfig.top_p??.95,speculative:!1,progressPercent,promptProgress,promptTokens,promptMs,cacheTokens}}restoreProcessingStateFromMessages(messages,conversationId){for(let i=messages.length-1;i>=0;i--){const message=messages[i];if(message.role===MessageRole.ASSISTANT&&message.timings){const restoredState=this.parseTimingData({prompt_n:message.timings.prompt_n||0,prompt_ms:message.timings.prompt_ms,predicted_n:message.timings.predicted_n||0,predicted_per_second:message.timings. predicted_n&&message.timings.predicted_ms?message.timings.predicted_n/message.timings.predicted_ms*1e3:0,cache_n:message.timings.cache_n||0});if(restoredState){this.setProcessingState(conversationId,restoredState);return}}}}getConversationModel(messages){for(let i=messages.length-1;i>=0;i--){const message=messages[i];if(message.role===MessageRole.ASSISTANT&&message.model)return message.model}return null}getApiOptions(){const currentConfig=config$1(),hasValue=value=>value!=null&&value!=="",apiOptions={ stream:!0,timings_per_token:!0};if(isRouterMode()){const modelName=selectedModelName();modelName&&(apiOptions.model=modelName)}return currentConfig.systemMessage&&(apiOptions.systemMessage=currentConfig.systemMessage),currentConfig.disableReasoningParsing&&(apiOptions.disableReasoningParsing=!0),currentConfig.excludeReasoningFromContext&&(apiOptions.excludeReasoningFromContext=!0),hasValue(currentConfig.temperature)&&(apiOptions.temperature=Number(currentConfig.temperature)),hasValue(currentConfig. max_tokens)&&(apiOptions.max_tokens=Number(currentConfig.max_tokens)),hasValue(currentConfig.dynatemp_range)&&(apiOptions.dynatemp_range=Number(currentConfig.dynatemp_range)),hasValue(currentConfig.dynatemp_exponent)&&(apiOptions.dynatemp_exponent=Number(currentConfig.dynatemp_exponent)),hasValue(currentConfig.top_k)&&(apiOptions.top_k=Number(currentConfig.top_k)),hasValue(currentConfig.top_p)&&(apiOptions.top_p=Number(currentConfig.top_p)),hasValue(currentConfig.min_p)&&(apiOptions.min_p=Number( currentConfig.min_p)),hasValue(currentConfig.xtc_probability)&&(apiOptions.xtc_probability=Number(currentConfig.xtc_probability)),hasValue(currentConfig.xtc_threshold)&&(apiOptions.xtc_threshold=Number(currentConfig.xtc_threshold)),hasValue(currentConfig.typ_p)&&(apiOptions.typ_p=Number(currentConfig.typ_p)),hasValue(currentConfig.repeat_last_n)&&(apiOptions.repeat_last_n=Number(currentConfig.repeat_last_n)),hasValue(currentConfig.repeat_penalty)&&(apiOptions.repeat_penalty=Number(currentConfig. repeat_penalty)),hasValue(currentConfig.presence_penalty)&&(apiOptions.presence_penalty=Number(currentConfig.presence_penalty)),hasValue(currentConfig.frequency_penalty)&&(apiOptions.frequency_penalty=Number(currentConfig.frequency_penalty)),hasValue(currentConfig.dry_multiplier)&&(apiOptions.dry_multiplier=Number(currentConfig.dry_multiplier)),hasValue(currentConfig.dry_base)&&(apiOptions.dry_base=Number(currentConfig.dry_base)),hasValue(currentConfig.dry_allowed_length)&&(apiOptions.dry_allowed_length= Number(currentConfig.dry_allowed_length)),hasValue(currentConfig.dry_penalty_last_n)&&(apiOptions.dry_penalty_last_n=Number(currentConfig.dry_penalty_last_n)),currentConfig.samplers&&(apiOptions.samplers=currentConfig.samplers),apiOptions.backend_sampling=currentConfig.backend_sampling,currentConfig.custom&&(apiOptions.custom=currentConfig.custom),apiOptions}cancelPreEncode(){this.preEncodeAbortController&&(this.preEncodeAbortController.abort(),this.preEncodeAbortController=null)}async triggerPreEncode(allMessages,assistantMessage,assistantContent,model,excludeReasoning){ this.cancelPreEncode(),this.preEncodeAbortController=new AbortController;const signal=this.preEncodeAbortController.signal;try{if(!await ChatService.areAllSlotsIdle(model,signal)||signal.aborted)return;const messagesWithAssistant=[...allMessages,{...assistantMessage,content:assistantContent}];await ChatService.preEncode(messagesWithAssistant,model,excludeReasoning,signal)}catch(err){isAbortError(err)||console.warn("[ChatStore] Pre-encode failed:",err)}}}const chatStore=new ChatStore,activeProcessingState=()=>chatStore. activeProcessingState,errorDialog=()=>chatStore.errorDialogState,getAddFilesHandler=()=>chatStore.getAddFilesHandler(),getAllLoadingChats=()=>chatStore.getAllLoadingChats(),isChatStreaming=()=>chatStore.isStreaming(),isEditing=()=>chatStore.isEditing(),isLoading=()=>chatStore.isLoading,pendingEditMessageId=()=>chatStore.pendingEditMessageId;var root$1d=from_html('
        ',1);function ChatForm($$anchor,$$props){push$1($$props,!0);let attachments=prop($$props,"attachments",19,()=>[]),className=prop($$props,"class",3,""),disabled=prop($$props,"disabled",3,!1),isLoading2=prop($$props,"isLoading",3,!1),placeholder=prop($$props,"placeholder",3,"Type a message..."),showMcpPromptButton=prop($$props,"showMcpPromptButton",3,!1),uploadedFiles=prop($$props,"uploadedFiles",31,()=>proxy( [])),value=prop($$props,"value",15,""),audioRecorder,chatFormActionsRef=state$1(void 0),fileInputRef=state$1(void 0),promptPickerRef=state$1(void 0),resourcePickerRef=state$1(void 0),textareaRef=state$1(void 0),isRecording=state$1(!1),recordingSupported=state$1(!1),isPromptPickerOpen=state$1(!1),promptSearchQuery=state$1(""),isInlineResourcePickerOpen=state$1(!1),resourceSearchQuery=state$1(""),isResourceDialogOpen=state$1(!1),preSelectedResourceUri=state$1(void 0),currentConfig=user_derived(config$1), pasteLongTextToFileLength=user_derived(()=>{const n=Number(get$4(currentConfig).pasteLongTextToFileLen);return Number.isNaN(n)?Number(SETTING_CONFIG_DEFAULT.pasteLongTextToFileLen):n}),isRouter=user_derived(isRouterMode),conversationModel=user_derived(()=>chatStore.getConversationModel(activeMessages())),activeModelId=user_derived(()=>{const options=modelOptions();if(!get$4(isRouter))return options.length>0?options[0].model:null;const selectedId=selectedModelId();if(selectedId){const model=options. find(m=>m.id===selectedId);if(model)return model.model}if(get$4(conversationModel)){const model=options.find(m=>m.model===get$4(conversationModel));if(model)return model.model}return null}),hasModelSelected=user_derived(()=>!get$4(isRouter)||!!get$4(conversationModel)||!!selectedModelId()),hasLoadingAttachments=user_derived(()=>uploadedFiles().some(f=>f.isLoading)),hasAttachments=user_derived(()=>attachments()&&attachments().length>0||uploadedFiles()&&uploadedFiles().length>0),canSubmit=user_derived( ()=>value().trim().length>0||get$4(hasAttachments));onMount$1(()=>{set$1(recordingSupported,isAudioRecordingSupported(),!0),audioRecorder=new AudioRecorder});function focus2(){get$4(textareaRef)?.focus()}function resetTextareaHeight(){get$4(textareaRef)?.resetHeight()}function openModelSelector(){get$4(chatFormActionsRef)?.openModelSelector()}function checkModelSelected(){return get$4(hasModelSelected)?!0:(get$4(chatFormActionsRef)?.openModelSelector(),!1)}function handleFileSelect(files){$$props. onFilesAdd?.(files)}function handleFileUpload(){get$4(fileInputRef)?.click()}function handleFileRemove(fileId){if(fileId.startsWith("attachment-")){const index2=parseInt(fileId.replace("attachment-",""),10);!isNaN(index2)&&index2>=0&&index2item.kind==="file").map(item=>item. getAsFile()).filter(file=>file!==null);if(files.length>0){event2.preventDefault(),$$props.onFilesAdd?.(files);return}const text2=event2.clipboardData.getData(MimeTypeText.PLAIN);if(text2.startsWith(CLIPBOARD_CONTENT_QUOTE_PREFIX)){const parsed=parseClipboardContent(text2);if(parsed.textAttachments.length>0||parsed.mcpPromptAttachments.length>0){if(event2.preventDefault(),value(parsed.message),$$props.onValueChange?.(parsed.message),parsed.textAttachments.length>0){const attachmentFiles=parsed.textAttachments. map(att=>new File([att.content],att.name,{type:MimeTypeText.PLAIN}));$$props.onFilesAdd?.(attachmentFiles)}if(parsed.mcpPromptAttachments.length>0){const mcpPromptFiles=parsed.mcpPromptAttachments.map(att=>({id:uuid$1(),name:att.name,size:att.content.length,type:SpecialFileType.MCP_PROMPT,file:new File([att.content],`${att.name}${FileExtensionText.TXT}`,{type:MimeTypeText.PLAIN}),isLoading:!1,textContent:att.content,mcpPrompt:{serverName:att.serverName,promptName:att.promptName,arguments:att.arguments}})); uploadedFiles([...uploadedFiles(),...mcpPromptFiles]),$$props.onUploadedFilesChange?.(uploadedFiles())}setTimeout(()=>{get$4(textareaRef)?.focus()},10);return}}if(text2.length>0&&get$4(pasteLongTextToFileLength)>0&&text2.length>get$4(pasteLongTextToFileLength)){event2.preventDefault();const textFile=new File([text2],"Pasted",{type:MimeTypeText.PLAIN});$$props.onFilesAdd?.([textFile])}}function handlePromptLoadStart(placeholderId,promptInfo,args){value().startsWith(PROMPT_TRIGGER_PREFIX)&&(value( ""),$$props.onValueChange?.("")),set$1(isPromptPickerOpen,!1),set$1(promptSearchQuery,"");const promptName=promptInfo.title||promptInfo.name,placeholder2={id:placeholderId,name:promptName,size:INITIAL_FILE_SIZE,type:SpecialFileType.MCP_PROMPT,file:new File([],"loading"),isLoading:!0,mcpPrompt:{serverName:promptInfo.serverName,promptName:promptInfo.name,arguments:args?{...args}:void 0}};uploadedFiles([...uploadedFiles(),placeholder2]),$$props.onUploadedFilesChange?.(uploadedFiles()),get$4(textareaRef)?. focus()}function handlePromptLoadComplete(placeholderId,result){const promptText=result.messages?.map(msg=>typeof msg.content=="string"?msg.content:msg.content.type===ContentPartType.TEXT?msg.content.text:"").filter(Boolean).join(PROMPT_CONTENT_SEPARATOR);uploadedFiles(uploadedFiles().map(f=>f.id===placeholderId?{...f,isLoading:!1,textContent:promptText,size:promptText.length,file:new File([promptText],`${f.name}${FileExtensionText.TXT}`,{type:MimeTypeText.PLAIN})}:f)),$$props.onUploadedFilesChange?.( uploadedFiles())}function handlePromptLoadError(placeholderId,error2){uploadedFiles(uploadedFiles().map(f=>f.id===placeholderId?{...f,isLoading:!1,loadError:error2}:f)),$$props.onUploadedFilesChange?.(uploadedFiles())}function handlePromptPickerClose(){set$1(isPromptPickerOpen,!1),set$1(promptSearchQuery,""),get$4(textareaRef)?.focus()}function handleInlineResourcePickerClose(){set$1(isInlineResourcePickerOpen,!1),set$1(resourceSearchQuery,""),get$4(textareaRef)?.focus()}function handleInlineResourceSelect(){ value().startsWith(RESOURCE_TRIGGER_PREFIX)&&(value(""),$$props.onValueChange?.("")),set$1(isInlineResourcePickerOpen,!1),set$1(resourceSearchQuery,""),get$4(textareaRef)?.focus()}function handleBrowseResources(){set$1(isInlineResourcePickerOpen,!1),set$1(resourceSearchQuery,""),value().startsWith(RESOURCE_TRIGGER_PREFIX)&&(value(""),$$props.onValueChange?.("")),set$1(isResourceDialogOpen,!0)}async function handleMicClick(){if(!audioRecorder||!get$4(recordingSupported)){console.warn("Audio recor\ ding not supported");return}if(get$4(isRecording))try{const audioBlob=await audioRecorder.stopRecording(),wavBlob=await convertToWav(audioBlob),audioFile=createAudioFile(wavBlob);$$props.onFilesAdd?.([audioFile]),set$1(isRecording,!1)}catch(error2){console.error("Failed to stop recording:",error2),set$1(isRecording,!1)}else try{await audioRecorder.startRecording(),set$1(isRecording,!0)}catch(error2){console.error("Failed to start recording:",error2)}}var $$exports={focus:focus2,resetTextareaHeight, openModelSelector,checkModelSelected},fragment=root$1d(),node2=first_child(fragment);bind_this(ChatFormFileInputInvisible(node2,{onFileSelect:handleFileSelect}),$$value=>set$1(fileInputRef,$$value,!0),()=>get$4(fileInputRef));var form=sibling(node2,2),node_1=child(form);bind_this(ChatFormPromptPicker(node_1,{get isOpen(){return get$4(isPromptPickerOpen)},get searchQuery(){return get$4(promptSearchQuery)},onClose:handlePromptPickerClose,onPromptLoadStart:handlePromptLoadStart,onPromptLoadComplete:handlePromptLoadComplete, onPromptLoadError:handlePromptLoadError}),$$value=>set$1(promptPickerRef,$$value,!0),()=>get$4(promptPickerRef));var node_2=sibling(node_1,2);bind_this(ChatFormResourcePicker(node_2,{get isOpen(){return get$4(isInlineResourcePickerOpen)},get searchQuery(){return get$4(resourceSearchQuery)},onClose:handleInlineResourcePickerClose,onResourceSelect:handleInlineResourceSelect,onBrowse:handleBrowseResources}),$$value=>set$1(resourcePickerRef,$$value,!0),()=>get$4(resourcePickerRef));var div=sibling(node_2, 2),node_3=child(div);{let $0=user_derived(()=>get$4(activeModelId)??void 0);ChatAttachmentsList(node_3,{get attachments(){return attachments()},onFileRemove:handleFileRemove,limitToSingleRow:!0,class:"py-5",style:"scroll-padding: 1rem;",get activeModelId(){return get$4($0)},get uploadedFiles(){return uploadedFiles()},set uploadedFiles($$value){uploadedFiles($$value)}})}var div_1=sibling(node_3,2),node_4=child(div_1);bind_this(ChatFormTextarea(node_4,{class:"px-5 py-1.5 md:pt-0",onKeydown:handleKeydown, onInput:()=>{handleInput(),$$props.onValueChange?.(value())},get disabled(){return disabled()},get placeholder(){return placeholder()},get value(){return value()},set value($$value){value($$value)}}),$$value=>set$1(textareaRef,$$value,!0),()=>get$4(textareaRef));var node_5=sibling(node_4,2);{var consequent=$$anchor2=>{ChatAttachmentMcpResources($$anchor2,{class:"mb-3",onResourceClick:uri2=>{set$1(preSelectedResourceUri,uri2,!0),set$1(isResourceDialogOpen,!0)}})};if_block(node_5,$$render=>{mcpHasResourceAttachments()&& $$render(consequent)})}var node_6=sibling(node_5,2);{let $0=user_derived(()=>value().trim().length>0),$1=user_derived(()=>showMcpPromptButton()?()=>set$1(isPromptPickerOpen,!0):void 0);bind_this(ChatFormActions(node_6,{class:"px-3",get canSend(){return get$4(canSubmit)},get hasText(){return get$4($0)},get disabled(){return disabled()},get isLoading(){return isLoading2()},get isRecording(){return get$4(isRecording)},get uploadedFiles(){return uploadedFiles()},onFileUpload:handleFileUpload,onMicClick:handleMicClick, get onStop(){return $$props.onStop},onSystemPromptClick:()=>$$props.onSystemPromptClick?.({message:value(),files:uploadedFiles()}),get onMcpPromptClick(){return get$4($1)},onMcpResourcesClick:()=>set$1(isResourceDialogOpen,!0)}),$$value=>set$1(chatFormActionsRef,$$value,!0),()=>get$4(chatFormActionsRef))}reset(div_1),reset(div),reset(form);var node_7=sibling(form,2);return DialogMcpResources(node_7,{get preSelectedUri(){return get$4(preSelectedResourceUri)},onAttach:resource=>{mcpStore.attachResource( resource.uri)},onOpenChange:newOpen=>{newOpen||set$1(preSelectedResourceUri,void 0)},get open(){return get$4(isResourceDialogOpen)},set open($$value){set$1(isResourceDialogOpen,$$value,!0)}}),template_effect(()=>{set_class(form,1,`relative ${className()??""}`),set_class(div,1,`${INPUT_CLASSES??""} overflow-hidden rounded-3xl backdrop-blur-md ${disabled()?"cursor-not-allowed opacity-60":""}`)}),event("submit",form,e=>{e.preventDefault(),!(!get$4(canSubmit)||disabled()||isLoading2()||get$4(hasLoadingAttachments))&& $$props.onSubmit?.()}),event("paste",div_1,handlePaste),append($$anchor,fragment),pop($$exports)}function Dropdown_menu_content($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),sideOffset=prop($$props,"sideOffset",3,4),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","sideOffset","portalProps","class"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Portal$2,($$anchor2,DropdownMenuPrimitive_Portal)=>{DropdownMenuPrimitive_Portal( $$anchor2,spread_props(()=>$$props.portalProps,{children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>cn$1("z-50 max-h-(--bits-dropdown-menu-content-available-height) min-w-[8rem] origin-(--bits-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover p-1.5 text-popover-foreground shadow-md outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-r\ ight-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 dark:border-border/20",$$props.class));component(node_1,()=>Dropdown_menu_content$1,($$anchor4,DropdownMenuPrimitive_Content)=>{DropdownMenuPrimitive_Content($$anchor4,spread_props({"data-slot":"dropdown-menu-content",get sideOffset(){ return sideOffset()},get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor3,fragment_1)},$$slots:{default:!0}}))}),append($$anchor,fragment),pop()}function Dropdown_menu_item($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),variant=prop($$props,"variant",3,"default"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","inset","variant"]);var fragment=comment$2(),node2=first_child( fragment);{let $0=user_derived(()=>cn$1("relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 data-[variant=destructive]:data-highlighted:text-destructive dark:data-[variant=destructive]:data-h\ ighlighted:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:!text-destructive",$$props.class));component(node2,()=>Menu_item,($$anchor2,DropdownMenuPrimitive_Item)=>{DropdownMenuPrimitive_Item($$anchor2,spread_props({"data-slot":"dropdown-menu-item",get"data-inset"(){return $$props.inset},get"data-variant"(){return variant()},get class(){return get$4($0)}},()=>restProps, {get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}function Dropdown_menu_separator($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("-mx-1 my-1 h-px bg-border/20",$$props.class));component(node2,()=>Menu_separator,($$anchor2,DropdownMenuPrimitive_Separator)=>{DropdownMenuPrimitive_Separator( $$anchor2,spread_props({"data-slot":"dropdown-menu-separator",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}function Dropdown_menu_trigger($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Menu_trigger,($$anchor2,DropdownMenuPrimitive_Trigger)=>{ DropdownMenuPrimitive_Trigger($$anchor2,spread_props({"data-slot":"dropdown-menu-trigger"},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))}),append($$anchor,fragment),pop()}function Dropdown_menu_sub_content($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("z-50 min-w-[8rem] origin-(--b\ its-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",$$props.class));component(node2,()=>Menu_sub_content, ($$anchor2,DropdownMenuPrimitive_SubContent)=>{DropdownMenuPrimitive_SubContent($$anchor2,spread_props({"data-slot":"dropdown-menu-sub-content",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}var root_1$P=from_html(" ",1);function Dropdown_menu_sub_trigger($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","cl\ ass","inset","children"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:s\ ize-4 [&_svg:not([class*='text-'])]:text-muted-foreground",$$props.class));component(node2,()=>Menu_sub_trigger,($$anchor2,DropdownMenuPrimitive_SubTrigger)=>{DropdownMenuPrimitive_SubTrigger($$anchor2,spread_props({"data-slot":"dropdown-menu-sub-trigger",get"data-inset"(){return $$props.inset},get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$P(),node_1=first_child(fragment_1);snippet(node_1, ()=>$$props.children??noop$3);var node_2=sibling(node_1,2);Chevron_right(node_2,{class:"ml-auto size-4"}),append($$anchor3,fragment_1)},$$slots:{default:!0}}))})}append($$anchor,fragment),pop()}const Sub=Menu_sub,Root$2=Menu;function Switch($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),checked=prop($$props,"checked",15,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","checked"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived( ()=>cn$1("peer inline-flex h-[1.15rem] w-8 shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",$$props.class));component(node2,()=>Switch$1,($$anchor2,SwitchPrimitive_Root)=>{SwitchPrimitive_Root($$anchor2,spread_props( {"data-slot":"switch",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},get checked(){return checked()},set checked($$value){checked($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $02=user_derived(()=>cn$1("pointer-events-none block size-4 rounded-full bg-background ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark\ :data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground"));component(node_1,()=>Switch_thumb,($$anchor4,SwitchPrimitive_Thumb)=>{SwitchPrimitive_Thumb($$anchor4,{"data-slot":"switch-thumb",get class(){return get$4($02)}})})}append($$anchor3,fragment_1)},$$slots:{default:!0}}))})}append($$anchor,fragment),pop()}var root_5$r=from_html(' ',1),root_6$r=from_html("

        "),root_3$D=from_html(" ",1),root_9$i=from_html(" Imag\ es",1),root_13$b=from_html(" Images",1),root_14$6=from_html("

        Image processing requires a vision model

        "),root_11$a=from_html(" ",1),root_16$6=from_html(" Audio Files",1),root_20$8=from_html(" Audio Files",1),root_21$4=from_html("

        Audio files processing requires an audio model

        "),root_18$4=from_html(" ",1),root_22$5=from_html(" Text Files",1),root_24$1=from_html(" PDF Files",1),root_28$2=from_html( " PDF Files",1),root_29$1=from_html("

        PDFs will be converted to text. Image-based PDFs may not work properly.

        "),root_26$3=from_html(" ",1),root_32=from_html(" System Message",1),root_33$1=from_html("

        "),root_30$1=from_html(" ",1),root_35=from_html(" MCP Servers",1),root_38=from_html(" Manage MCP Servers",1),root_41=from_html(''),root_42=from_html('Error'),root_40=from_html(''),root_39=from_html('
        '),root_34=from_html( " ",1),root_44=from_html(" MCP Prompt",1),root_46=from_html(" MCP Resources",1),root_7$n=from_html(" ",1),root_1$O=from_html(" ",1),root$1c=from_html("
        ");function ChatFormActionAttachmentsDropdown($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),disabled=prop($$props,"disabled",3,!1),hasAudioModality=prop($$props,"hasAudioModality",3,!1),hasVisionModality=prop($$props,"hasVisi\ onModality",3,!1),hasMcpPromptsSupport=prop($$props,"hasMcpPromptsSupport",3,!1),hasMcpResourcesSupport=prop($$props,"hasMcpResourcesSupport",3,!1),isNewChat=user_derived(()=>!page$1.params.id),systemMessageTooltip=user_derived(()=>get$4(isNewChat)?"Add custom system message for a new conversation":"Inject custom system message at the beginning of the conversation"),dropdownOpen=state$1(!1),mcpServers=user_derived(()=>mcpStore.getServersSorted().filter(s2=>s2.enabled)),hasMcpServers=user_derived( ()=>get$4(mcpServers).length>0),mcpSearchQuery=state$1(""),filteredMcpServers=user_derived(()=>{const query=get$4(mcpSearchQuery).toLowerCase().trim();return query?get$4(mcpServers).filter(s2=>{const name=getServerLabel(s2).toLowerCase(),url2=s2.url.toLowerCase();return name.includes(query)||url2.includes(query)}):get$4(mcpServers)});function getServerLabel(server){return mcpStore.getServerLabel(server)}function isServerEnabledForChat(serverId){return conversationsStore.isMcpServerEnabledForChat( serverId)}async function toggleServerForChat(serverId){await conversationsStore.toggleMcpServerForChat(serverId)}function handleMcpSubMenuOpen(open2){open2&&(set$1(mcpSearchQuery,""),mcpStore.runHealthChecksForServers(get$4(mcpServers)))}function handleMcpPromptClick(){set$1(dropdownOpen,!1),$$props.onMcpPromptClick?.()}function handleMcpSettingsClick(){set$1(dropdownOpen,!1),$$props.onMcpSettingsClick?.()}function handleMcpResourcesClick(){set$1(dropdownOpen,!1),$$props.onMcpResourcesClick?.()} var div=root$1c(),node2=child(div);component(node2,()=>Root$2,($$anchor2,DropdownMenu_Root)=>{DropdownMenu_Root($$anchor2,{get open(){return get$4(dropdownOpen)},set open($$value){set$1(dropdownOpen,$$value,!0)},children:($$anchor3,$$slotProps)=>{var fragment=root_1$O(),node_1=first_child(fragment);component(node_1,()=>Dropdown_menu_trigger,($$anchor4,DropdownMenu_Trigger)=>{DropdownMenu_Trigger($$anchor4,{name:"Attach files",get disabled(){return disabled()},children:($$anchor5,$$slotProps2)=>{ var fragment_1=comment$2(),node_2=first_child(fragment_1);component(node_2,()=>Root$5,($$anchor6,Tooltip_Root)=>{Tooltip_Root($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_2=root_3$D(),node_3=first_child(fragment_2);component(node_3,()=>Tooltip_trigger,($$anchor8,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor8,{class:"w-full",children:($$anchor9,$$slotProps4)=>{Button($$anchor9,{class:"file-upload-button h-8 w-8 rounded-full p-0",get disabled(){return disabled()},variant:"secondary",type:"\ button",children:($$anchor10,$$slotProps5)=>{var fragment_4=root_5$r(),span=first_child(fragment_4);span.textContent="Add files, system prompt or MCP Servers";var node_4=sibling(span,2);Plus(node_4,{class:"h-4 w-4"}),append($$anchor10,fragment_4)},$$slots:{default:!0}})},$$slots:{default:!0}})});var node_5=sibling(node_3,2);component(node_5,()=>Tooltip_content,($$anchor8,Tooltip_Content)=>{Tooltip_Content($$anchor8,{children:($$anchor9,$$slotProps4)=>{var p2=root_6$r();p2.textContent="Add files,\ system prompt or MCP Servers",append($$anchor9,p2)},$$slots:{default:!0}})}),append($$anchor7,fragment_2)},$$slots:{default:!0}})}),append($$anchor5,fragment_1)},$$slots:{default:!0}})});var node_6=sibling(node_1,2);component(node_6,()=>Dropdown_menu_content,($$anchor4,DropdownMenu_Content)=>{DropdownMenu_Content($$anchor4,{align:"start",class:"w-48",children:($$anchor5,$$slotProps2)=>{var fragment_5=root_7$n(),node_7=first_child(fragment_5);{var consequent=$$anchor6=>{var fragment_6=comment$2(), node_8=first_child(fragment_6);component(node_8,()=>Dropdown_menu_item,($$anchor7,DropdownMenu_Item)=>{DropdownMenu_Item($$anchor7,{class:"images-button flex cursor-pointer items-center gap-2",onclick:()=>$$props.onFileUpload?.(),children:($$anchor8,$$slotProps3)=>{var fragment_7=root_9$i(),node_9=first_child(fragment_7);component(node_9,()=>FILE_TYPE_ICONS.image,($$anchor9,FILE_TYPE_ICONS_image)=>{FILE_TYPE_ICONS_image($$anchor9,{class:"h-4 w-4"})}),next$1(2),append($$anchor8,fragment_7)},$$slots:{ default:!0}})}),append($$anchor6,fragment_6)},alternate=$$anchor6=>{var fragment_8=comment$2(),node_10=first_child(fragment_8);component(node_10,()=>Root$5,($$anchor7,Tooltip_Root_1)=>{Tooltip_Root_1($$anchor7,{get delayDuration(){return TOOLTIP_DELAY_DURATION},children:($$anchor8,$$slotProps3)=>{var fragment_9=root_11$a(),node_11=first_child(fragment_9);component(node_11,()=>Tooltip_trigger,($$anchor9,Tooltip_Trigger_1)=>{Tooltip_Trigger_1($$anchor9,{class:"w-full",children:($$anchor10,$$slotProps4)=>{ var fragment_10=comment$2(),node_12=first_child(fragment_10);component(node_12,()=>Dropdown_menu_item,($$anchor11,DropdownMenu_Item_1)=>{DropdownMenu_Item_1($$anchor11,{class:"images-button flex cursor-pointer items-center gap-2",disabled:!0,children:($$anchor12,$$slotProps5)=>{var fragment_11=root_13$b(),node_13=first_child(fragment_11);component(node_13,()=>FILE_TYPE_ICONS.image,($$anchor13,FILE_TYPE_ICONS_image_1)=>{FILE_TYPE_ICONS_image_1($$anchor13,{class:"h-4 w-4"})}),next$1(2),append($$anchor12, fragment_11)},$$slots:{default:!0}})}),append($$anchor10,fragment_10)},$$slots:{default:!0}})});var node_14=sibling(node_11,2);component(node_14,()=>Tooltip_content,($$anchor9,Tooltip_Content_1)=>{Tooltip_Content_1($$anchor9,{side:"right",children:($$anchor10,$$slotProps4)=>{var p_1=root_14$6();append($$anchor10,p_1)},$$slots:{default:!0}})}),append($$anchor8,fragment_9)},$$slots:{default:!0}})}),append($$anchor6,fragment_8)};if_block(node_7,$$render=>{hasVisionModality()?$$render(consequent):$$render( alternate,!1)})}var node_15=sibling(node_7,2);{var consequent_1=$$anchor6=>{var fragment_12=comment$2(),node_16=first_child(fragment_12);component(node_16,()=>Dropdown_menu_item,($$anchor7,DropdownMenu_Item_2)=>{DropdownMenu_Item_2($$anchor7,{class:"audio-button flex cursor-pointer items-center gap-2",onclick:()=>$$props.onFileUpload?.(),children:($$anchor8,$$slotProps3)=>{var fragment_13=root_16$6(),node_17=first_child(fragment_13);component(node_17,()=>FILE_TYPE_ICONS.audio,($$anchor9,FILE_TYPE_ICONS_audio)=>{ FILE_TYPE_ICONS_audio($$anchor9,{class:"h-4 w-4"})}),next$1(2),append($$anchor8,fragment_13)},$$slots:{default:!0}})}),append($$anchor6,fragment_12)},alternate_1=$$anchor6=>{var fragment_14=comment$2(),node_18=first_child(fragment_14);component(node_18,()=>Root$5,($$anchor7,Tooltip_Root_2)=>{Tooltip_Root_2($$anchor7,{get delayDuration(){return TOOLTIP_DELAY_DURATION},children:($$anchor8,$$slotProps3)=>{var fragment_15=root_18$4(),node_19=first_child(fragment_15);component(node_19,()=>Tooltip_trigger, ($$anchor9,Tooltip_Trigger_2)=>{Tooltip_Trigger_2($$anchor9,{class:"w-full",children:($$anchor10,$$slotProps4)=>{var fragment_16=comment$2(),node_20=first_child(fragment_16);component(node_20,()=>Dropdown_menu_item,($$anchor11,DropdownMenu_Item_3)=>{DropdownMenu_Item_3($$anchor11,{class:"audio-button flex cursor-pointer items-center gap-2",disabled:!0,children:($$anchor12,$$slotProps5)=>{var fragment_17=root_20$8(),node_21=first_child(fragment_17);component(node_21,()=>FILE_TYPE_ICONS.audio,($$anchor13,FILE_TYPE_ICONS_audio_1)=>{ FILE_TYPE_ICONS_audio_1($$anchor13,{class:"h-4 w-4"})}),next$1(2),append($$anchor12,fragment_17)},$$slots:{default:!0}})}),append($$anchor10,fragment_16)},$$slots:{default:!0}})});var node_22=sibling(node_19,2);component(node_22,()=>Tooltip_content,($$anchor9,Tooltip_Content_2)=>{Tooltip_Content_2($$anchor9,{side:"right",children:($$anchor10,$$slotProps4)=>{var p_2=root_21$4();append($$anchor10,p_2)},$$slots:{default:!0}})}),append($$anchor8,fragment_15)},$$slots:{default:!0}})}),append($$anchor6, fragment_14)};if_block(node_15,$$render=>{hasAudioModality()?$$render(consequent_1):$$render(alternate_1,!1)})}var node_23=sibling(node_15,2);component(node_23,()=>Dropdown_menu_item,($$anchor6,DropdownMenu_Item_4)=>{DropdownMenu_Item_4($$anchor6,{class:"flex cursor-pointer items-center gap-2",onclick:()=>$$props.onFileUpload?.(),children:($$anchor7,$$slotProps3)=>{var fragment_18=root_22$5(),node_24=first_child(fragment_18);component(node_24,()=>FILE_TYPE_ICONS.text,($$anchor8,FILE_TYPE_ICONS_text)=>{ FILE_TYPE_ICONS_text($$anchor8,{class:"h-4 w-4"})}),next$1(2),append($$anchor7,fragment_18)},$$slots:{default:!0}})});var node_25=sibling(node_23,2);{var consequent_2=$$anchor6=>{var fragment_19=comment$2(),node_26=first_child(fragment_19);component(node_26,()=>Dropdown_menu_item,($$anchor7,DropdownMenu_Item_5)=>{DropdownMenu_Item_5($$anchor7,{class:"flex cursor-pointer items-center gap-2",onclick:()=>$$props.onFileUpload?.(),children:($$anchor8,$$slotProps3)=>{var fragment_20=root_24$1(),node_27=first_child( fragment_20);component(node_27,()=>FILE_TYPE_ICONS.pdf,($$anchor9,FILE_TYPE_ICONS_pdf)=>{FILE_TYPE_ICONS_pdf($$anchor9,{class:"h-4 w-4"})}),next$1(2),append($$anchor8,fragment_20)},$$slots:{default:!0}})}),append($$anchor6,fragment_19)},alternate_2=$$anchor6=>{var fragment_21=comment$2(),node_28=first_child(fragment_21);component(node_28,()=>Root$5,($$anchor7,Tooltip_Root_3)=>{Tooltip_Root_3($$anchor7,{get delayDuration(){return TOOLTIP_DELAY_DURATION},children:($$anchor8,$$slotProps3)=>{var fragment_22=root_26$3(), node_29=first_child(fragment_22);component(node_29,()=>Tooltip_trigger,($$anchor9,Tooltip_Trigger_3)=>{Tooltip_Trigger_3($$anchor9,{class:"w-full",children:($$anchor10,$$slotProps4)=>{var fragment_23=comment$2(),node_30=first_child(fragment_23);component(node_30,()=>Dropdown_menu_item,($$anchor11,DropdownMenu_Item_6)=>{DropdownMenu_Item_6($$anchor11,{class:"flex cursor-pointer items-center gap-2",onclick:()=>$$props.onFileUpload?.(),children:($$anchor12,$$slotProps5)=>{var fragment_24=root_28$2(), node_31=first_child(fragment_24);component(node_31,()=>FILE_TYPE_ICONS.pdf,($$anchor13,FILE_TYPE_ICONS_pdf_1)=>{FILE_TYPE_ICONS_pdf_1($$anchor13,{class:"h-4 w-4"})}),next$1(2),append($$anchor12,fragment_24)},$$slots:{default:!0}})}),append($$anchor10,fragment_23)},$$slots:{default:!0}})});var node_32=sibling(node_29,2);component(node_32,()=>Tooltip_content,($$anchor9,Tooltip_Content_3)=>{Tooltip_Content_3($$anchor9,{side:"right",children:($$anchor10,$$slotProps4)=>{var p_3=root_29$1();append($$anchor10, p_3)},$$slots:{default:!0}})}),append($$anchor8,fragment_22)},$$slots:{default:!0}})}),append($$anchor6,fragment_21)};if_block(node_25,$$render=>{hasVisionModality()?$$render(consequent_2):$$render(alternate_2,!1)})}var node_33=sibling(node_25,2);component(node_33,()=>Root$5,($$anchor6,Tooltip_Root_4)=>{Tooltip_Root_4($$anchor6,{get delayDuration(){return TOOLTIP_DELAY_DURATION},children:($$anchor7,$$slotProps3)=>{var fragment_25=root_30$1(),node_34=first_child(fragment_25);component(node_34,()=>Tooltip_trigger, ($$anchor8,Tooltip_Trigger_4)=>{Tooltip_Trigger_4($$anchor8,{class:"w-full",children:($$anchor9,$$slotProps4)=>{var fragment_26=comment$2(),node_35=first_child(fragment_26);component(node_35,()=>Dropdown_menu_item,($$anchor10,DropdownMenu_Item_7)=>{DropdownMenu_Item_7($$anchor10,{class:"flex cursor-pointer items-center gap-2",onclick:()=>$$props.onSystemPromptClick?.(),children:($$anchor11,$$slotProps5)=>{var fragment_27=root_32(),node_36=first_child(fragment_27);Message_square(node_36,{class:"h\ -4 w-4"}),next$1(2),append($$anchor11,fragment_27)},$$slots:{default:!0}})}),append($$anchor9,fragment_26)},$$slots:{default:!0}})});var node_37=sibling(node_34,2);component(node_37,()=>Tooltip_content,($$anchor8,Tooltip_Content_4)=>{Tooltip_Content_4($$anchor8,{side:"right",children:($$anchor9,$$slotProps4)=>{var p_4=root_33$1(),text2=child(p_4,!0);reset(p_4),template_effect(()=>set_text(text2,get$4(systemMessageTooltip))),append($$anchor9,p_4)},$$slots:{default:!0}})}),append($$anchor7,fragment_25)}, $$slots:{default:!0}})});var node_38=sibling(node_33,2);component(node_38,()=>Dropdown_menu_separator,($$anchor6,DropdownMenu_Separator)=>{DropdownMenu_Separator($$anchor6,{})});var node_39=sibling(node_38,2);component(node_39,()=>Sub,($$anchor6,DropdownMenu_Sub)=>{DropdownMenu_Sub($$anchor6,{onOpenChange:handleMcpSubMenuOpen,children:($$anchor7,$$slotProps3)=>{var fragment_28=root_34(),node_40=first_child(fragment_28);component(node_40,()=>Dropdown_menu_sub_trigger,($$anchor8,DropdownMenu_SubTrigger)=>{ DropdownMenu_SubTrigger($$anchor8,{class:"flex cursor-pointer items-center gap-2",children:($$anchor9,$$slotProps4)=>{var fragment_29=root_35(),node_41=first_child(fragment_29);McpLogo(node_41,{class:"h-4 w-4"}),next$1(2),append($$anchor9,fragment_29)},$$slots:{default:!0}})});var node_42=sibling(node_40,2);component(node_42,()=>Dropdown_menu_sub_content,($$anchor8,DropdownMenu_SubContent)=>{DropdownMenu_SubContent($$anchor8,{class:"w-72 pt-0",children:($$anchor9,$$slotProps4)=>{{const footer2=$$anchor10=>{ var fragment_31=comment$2(),node_43=first_child(fragment_31);component(node_43,()=>Dropdown_menu_item,($$anchor11,DropdownMenu_Item_8)=>{DropdownMenu_Item_8($$anchor11,{class:"flex cursor-pointer items-center gap-2",onclick:handleMcpSettingsClick,children:($$anchor12,$$slotProps5)=>{var fragment_32=root_38(),node_44=first_child(fragment_32);Settings$1(node_44,{class:"h-4 w-4"}),next$1(2),append($$anchor12,fragment_32)},$$slots:{default:!0}})}),append($$anchor10,fragment_31)};let $0=user_derived( ()=>get$4(hasMcpServers)?"No servers found":"No MCP servers configured"),$1=user_derived(()=>get$4(filteredMcpServers).length===0);DropdownMenuSearchable($$anchor9,{placeholder:"Search servers...",get emptyMessage(){return get$4($0)},get isEmpty(){return get$4($1)},get searchValue(){return get$4(mcpSearchQuery)},set searchValue($$value){set$1(mcpSearchQuery,$$value,!0)},footer:footer2,children:($$anchor10,$$slotProps5)=>{var div_1=root_39();each(div_1,21,()=>get$4(filteredMcpServers),server=>server. id,($$anchor11,server)=>{const healthState=user_derived(()=>mcpStore.getHealthCheckState(get$4(server).id)),hasError=user_derived(()=>get$4(healthState).status===HealthCheckStatus.ERROR),isEnabledForChat=user_derived(()=>isServerEnabledForChat(get$4(server).id));var button=root_40();button.__click=()=>!get$4(hasError)&&toggleServerForChat(get$4(server).id);var div_2=child(button),node_45=child(div_2);{var consequent_3=$$anchor12=>{var img=root_41();template_effect($02=>set_attribute(img,"src",$02), [()=>mcpStore.getServerFavicon(get$4(server).id)]),event("error",img,e=>{e.currentTarget.style.display="none"}),replay_events(img),append($$anchor12,img)};if_block(node_45,$$render=>{mcpStore.getServerFavicon(get$4(server).id)&&$$render(consequent_3)})}var span_1=sibling(node_45,2),text_1=child(span_1,!0);reset(span_1);var node_46=sibling(span_1,2);{var consequent_4=$$anchor12=>{var span_2=root_42();append($$anchor12,span_2)};if_block(node_46,$$render=>{get$4(hasError)&&$$render(consequent_4)})} reset(div_2);var node_47=sibling(div_2,2);Switch(node_47,{get checked(){return get$4(isEnabledForChat)},get disabled(){return get$4(hasError)},onclick:e=>e.stopPropagation(),onCheckedChange:()=>toggleServerForChat(get$4(server).id)}),reset(button),template_effect($02=>{button.disabled=get$4(hasError),set_text(text_1,$02)},[()=>getServerLabel(get$4(server))]),append($$anchor11,button)}),reset(div_1),append($$anchor10,div_1)},$$slots:{footer:!0,default:!0}})}},$$slots:{default:!0}})}),append($$anchor7, fragment_28)},$$slots:{default:!0}})});var node_48=sibling(node_39,2);{var consequent_5=$$anchor6=>{var fragment_33=comment$2(),node_49=first_child(fragment_33);component(node_49,()=>Dropdown_menu_item,($$anchor7,DropdownMenu_Item_9)=>{DropdownMenu_Item_9($$anchor7,{class:"flex cursor-pointer items-center gap-2",onclick:handleMcpPromptClick,children:($$anchor8,$$slotProps3)=>{var fragment_34=root_44(),node_50=first_child(fragment_34);Zap(node_50,{class:"h-4 w-4"}),next$1(2),append($$anchor8,fragment_34)}, $$slots:{default:!0}})}),append($$anchor6,fragment_33)};if_block(node_48,$$render=>{hasMcpPromptsSupport()&&$$render(consequent_5)})}var node_51=sibling(node_48,2);{var consequent_6=$$anchor6=>{var fragment_35=comment$2(),node_52=first_child(fragment_35);component(node_52,()=>Dropdown_menu_item,($$anchor7,DropdownMenu_Item_10)=>{DropdownMenu_Item_10($$anchor7,{class:"flex cursor-pointer items-center gap-2",onclick:handleMcpResourcesClick,children:($$anchor8,$$slotProps3)=>{var fragment_36=root_46(), node_53=first_child(fragment_36);Folder_open(node_53,{class:"h-4 w-4"}),next$1(2),append($$anchor8,fragment_36)},$$slots:{default:!0}})}),append($$anchor6,fragment_35)};if_block(node_51,$$render=>{hasMcpResourcesSupport()&&$$render(consequent_6)})}append($$anchor5,fragment_5)},$$slots:{default:!0}})}),append($$anchor3,fragment)},$$slots:{default:!0}})}),reset(div),template_effect(()=>set_class(div,1,`flex items-center gap-1 ${className()??""}`)),append($$anchor,div),pop()}delegate(["click"]);function Sheet_overlay($$anchor,$$props){ push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",$$props.class));component(node2,()=>Dialog_overlay$1,($$anchor2,SheetPrimitive_Overlay)=>{SheetPrimitive_Overlay($$anchor2,spread_props( {"data-slot":"sheet-overlay",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}const sheetVariants=tv({base:`border-border/30 dark:border-border/20 data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-sm transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 ${PANEL_CLASSES}`,variants:{side:{top:"data-[state=closed]:slide-out-to-t\ op data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",bottom:"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",left:"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}); var root_3$C=from_html(' Close',1),root_2$N=from_html(" ",1),root_1$N=from_html(" ",1);function Sheet_content($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),side=prop($$props,"side",3,"right"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","side","portalProps","children"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Portal$2,($$anchor2,SheetPrimitive_Portal)=>{SheetPrimitive_Portal( $$anchor2,spread_props(()=>$$props.portalProps,{children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$N(),node_1=first_child(fragment_1);Sheet_overlay(node_1,{});var node_2=sibling(node_1,2);{let $0=user_derived(()=>cn$1(sheetVariants({side:side()}),$$props.class));component(node_2,()=>Dialog_content$1,($$anchor4,SheetPrimitive_Content)=>{SheetPrimitive_Content($$anchor4,spread_props({"data-slot":"sheet-content",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ ref2($$value)},children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$N(),node_3=first_child(fragment_2);snippet(node_3,()=>$$props.children??noop$3);var node_4=sibling(node_3,2);component(node_4,()=>Dialog_close,($$anchor6,SheetPrimitive_Close)=>{SheetPrimitive_Close($$anchor6,{class:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-hidden dis\ abled:pointer-events-none",children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$C(),node_5=first_child(fragment_3);X(node_5,{class:"size-4"}),next$1(2),append($$anchor7,fragment_3)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}}))})}append($$anchor3,fragment_1)},$$slots:{default:!0}}))}),append($$anchor,fragment),pop()}var root$1b=from_html("
        ");function Sheet_header($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props( $$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$1b();attribute_effect(div,$0=>({"data-slot":"sheet-header",class:$0,...restProps}),[()=>cn$1("flex flex-col gap-1.5 p-4",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}function Sheet_title($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$s\ lots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("font-semibold text-foreground",$$props.class));component(node2,()=>Dialog_title$1,($$anchor2,SheetPrimitive_Title)=>{SheetPrimitive_Title($$anchor2,spread_props({"data-slot":"sheet-title",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}function Sheet_description($$anchor,$$props){ push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("text-sm text-muted-foreground",$$props.class));component(node2,()=>Dialog_description$1,($$anchor2,SheetPrimitive_Description)=>{SheetPrimitive_Description($$anchor2,spread_props({"data-slot":"sheet-description",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()}, set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}const Root$1=Dialog;var root_2$M=from_html(' ',1),root_4$m=from_html(" ",1),root_7$m=from_html('Requires vision model'),root_8$i=from_html('Requires audio model'),root_9$h=from_html('Text-only'),root_10$e=from_html('\ '),root_11$9=from_html(''),root_3$B=from_html('
        ',1),root_1$M=from_html(" ",1),root$1a=from_html("
        ");function ChatFormActionAttachmentsSheet($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),disabled=prop($$props,"disabled",3,!1),hasAudioModality=prop($$props,"hasAudioModality",3,!1),hasVisionModality=prop($$props,"hasVisionModality",3,!1),hasMcpPromptsSupport=prop($$props,"hasMcpPrompt\ sSupport",3,!1),hasMcpResourcesSupport=prop($$props,"hasMcpResourcesSupport",3,!1),sheetOpen=state$1(!1);function handleMcpPromptClick(){set$1(sheetOpen,!1),$$props.onMcpPromptClick?.()}function handleMcpSettingsClick(){$$props.onMcpSettingsClick?.()}function handleMcpResourcesClick(){set$1(sheetOpen,!1),$$props.onMcpResourcesClick?.()}function handleSheetFileUpload(){set$1(sheetOpen,!1),$$props.onFileUpload?.()}function handleSheetSystemPromptClick(){set$1(sheetOpen,!1),$$props.onSystemPromptClick?.()} const sheetItemClass="flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm transition-colors hover:bg-accent active:bg-accent disabled:cursor-not-allowed disabled:opacity-50";var div=root$1a(),node2=child(div);component(node2,()=>Root$1,($$anchor2,Sheet_Root)=>{Sheet_Root($$anchor2,{get open(){return get$4(sheetOpen)},set open($$value){set$1(sheetOpen,$$value,!0)},children:($$anchor3,$$slotProps)=>{var fragment=root_1$M(),node_1=first_child(fragment);Button(node_1,{class:"file\ -upload-button h-8 w-8 rounded-full p-0",get disabled(){return disabled()},variant:"secondary",type:"button",onclick:()=>set$1(sheetOpen,!0),children:($$anchor4,$$slotProps2)=>{var fragment_1=root_2$M(),span=first_child(fragment_1);span.textContent="Add files, system prompt or MCP Servers";var node_2=sibling(span,2);Plus(node_2,{class:"h-4 w-4"}),append($$anchor4,fragment_1)},$$slots:{default:!0}});var node_3=sibling(node_1,2);component(node_3,()=>Sheet_content,($$anchor4,Sheet_Content)=>{Sheet_Content( $$anchor4,{side:"bottom",class:"max-h-[85vh] gap-0",children:($$anchor5,$$slotProps2)=>{var fragment_2=root_3$B(),node_4=first_child(fragment_2);component(node_4,()=>Sheet_header,($$anchor6,Sheet_Header)=>{Sheet_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_3=root_4$m(),node_5=first_child(fragment_3);component(node_5,()=>Sheet_title,($$anchor8,Sheet_Title)=>{Sheet_Title($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text2=text$8("Add to chat");append($$anchor9,text2)}, $$slots:{default:!0}})});var node_6=sibling(node_5,2);component(node_6,()=>Sheet_description,($$anchor8,Sheet_Description)=>{Sheet_Description($$anchor8,{class:"sr-only",children:($$anchor9,$$slotProps4)=>{next$1();var text_1=text$8("Add files, system prompt or configure MCP servers");append($$anchor9,text_1)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var div_1=sibling(node_4,2),button=child(div_1);set_class(button,1,clsx(sheetItemClass)),button.__click=handleSheetFileUpload; var node_7=child(button);component(node_7,()=>FILE_TYPE_ICONS.image,($$anchor6,FILE_TYPE_ICONS_image)=>{FILE_TYPE_ICONS_image($$anchor6,{class:"h-4 w-4 shrink-0"})});var node_8=sibling(node_7,4);{var consequent=$$anchor6=>{var span_1=root_7$m();append($$anchor6,span_1)};if_block(node_8,$$render=>{hasVisionModality()||$$render(consequent)})}reset(button);var button_1=sibling(button,2);set_class(button_1,1,clsx(sheetItemClass)),button_1.__click=handleSheetFileUpload;var node_9=child(button_1);component( node_9,()=>FILE_TYPE_ICONS.audio,($$anchor6,FILE_TYPE_ICONS_audio)=>{FILE_TYPE_ICONS_audio($$anchor6,{class:"h-4 w-4 shrink-0"})});var node_10=sibling(node_9,4);{var consequent_1=$$anchor6=>{var span_2=root_8$i();append($$anchor6,span_2)};if_block(node_10,$$render=>{hasAudioModality()||$$render(consequent_1)})}reset(button_1);var button_2=sibling(button_1,2);set_class(button_2,1,clsx(sheetItemClass)),button_2.__click=handleSheetFileUpload;var node_11=child(button_2);component(node_11,()=>FILE_TYPE_ICONS. text,($$anchor6,FILE_TYPE_ICONS_text)=>{FILE_TYPE_ICONS_text($$anchor6,{class:"h-4 w-4 shrink-0"})}),next$1(2),reset(button_2);var button_3=sibling(button_2,2);set_class(button_3,1,clsx(sheetItemClass)),button_3.__click=handleSheetFileUpload;var node_12=child(button_3);component(node_12,()=>FILE_TYPE_ICONS.pdf,($$anchor6,FILE_TYPE_ICONS_pdf)=>{FILE_TYPE_ICONS_pdf($$anchor6,{class:"h-4 w-4 shrink-0"})});var node_13=sibling(node_12,4);{var consequent_2=$$anchor6=>{var span_3=root_9$h();append($$anchor6, span_3)};if_block(node_13,$$render=>{hasVisionModality()||$$render(consequent_2)})}reset(button_3);var button_4=sibling(button_3,2);set_class(button_4,1,clsx(sheetItemClass)),button_4.__click=handleSheetSystemPromptClick;var node_14=child(button_4);Message_square(node_14,{class:"h-4 w-4 shrink-0"}),next$1(2),reset(button_4);var button_5=sibling(button_4,2);set_class(button_5,1,clsx(sheetItemClass)),button_5.__click=handleMcpSettingsClick;var node_15=child(button_5);McpLogo(node_15,{class:"h-4 w-\ 4 shrink-0"}),next$1(2),reset(button_5);var node_16=sibling(button_5,2);{var consequent_3=$$anchor6=>{var button_6=root_10$e();set_class(button_6,1,clsx(sheetItemClass)),button_6.__click=handleMcpPromptClick;var node_17=child(button_6);Zap(node_17,{class:"h-4 w-4 shrink-0"}),next$1(2),reset(button_6),append($$anchor6,button_6)};if_block(node_16,$$render=>{hasMcpPromptsSupport()&&$$render(consequent_3)})}var node_18=sibling(node_16,2);{var consequent_4=$$anchor6=>{var button_7=root_11$9();set_class( button_7,1,clsx(sheetItemClass)),button_7.__click=handleMcpResourcesClick;var node_19=child(button_7);Folder_open(node_19,{class:"h-4 w-4 shrink-0"}),next$1(2),reset(button_7),append($$anchor6,button_7)};if_block(node_18,$$render=>{hasMcpResourcesSupport()&&$$render(consequent_4)})}reset(div_1),template_effect(()=>{button.disabled=!hasVisionModality(),button_1.disabled=!hasAudioModality()}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment)},$$slots:{default:!0}})}), reset(div),template_effect(()=>set_class(div,1,`flex items-center gap-1 ${className()??""}`)),append($$anchor,div),pop()}delegate(["click"]);var root_3$A=from_html(' ',1),root_7$l=from_html("

        Current model does not support audio

        "),root_1$L=from_html(" ",1),root$19=from_html("
        ");function ChatFormActionRecord($$anchor,$$props){let className=prop($$props,"class",3,""),disabled=prop($$props,"disabled",3,!1),hasAudioModality=prop($$props,"has\ AudioModality",3,!1),isLoading2=prop($$props,"isLoading",3,!1),isRecording=prop($$props,"isRecording",3,!1);var div=root$19(),node2=child(div);component(node2,()=>Root$5,($$anchor2,Tooltip_Root)=>{Tooltip_Root($$anchor2,{children:($$anchor3,$$slotProps)=>{var fragment=root_1$L(),node_1=first_child(fragment);component(node_1,()=>Tooltip_trigger,($$anchor4,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor4,{children:($$anchor5,$$slotProps2)=>{{let $0=user_derived(()=>isRecording()?"animate-pulse bg-red-\ 500 text-white hover:bg-red-600":""),$1=user_derived(()=>disabled()||isLoading2()||!hasAudioModality());Button($$anchor5,{get class(){return`h-8 w-8 rounded-full p-0 ${get$4($0)??""}`},get disabled(){return get$4($1)},get onclick(){return $$props.onMicClick},type:"button",children:($$anchor6,$$slotProps3)=>{var fragment_2=root_3$A(),span=first_child(fragment_2),text2=child(span,!0);reset(span);var node_2=sibling(span,2);{var consequent=$$anchor7=>{Square($$anchor7,{class:"h-4 w-4 animate-pulse f\ ill-white"})},alternate=$$anchor7=>{Mic($$anchor7,{class:"h-4 w-4"})};if_block(node_2,$$render=>{isRecording()?$$render(consequent):$$render(alternate,!1)})}template_effect(()=>set_text(text2,isRecording()?"Stop recording":"Start recording")),append($$anchor6,fragment_2)},$$slots:{default:!0}})}},$$slots:{default:!0}})});var node_3=sibling(node_1,2);{var consequent_1=$$anchor4=>{var fragment_5=comment$2(),node_4=first_child(fragment_5);component(node_4,()=>Tooltip_content,($$anchor5,Tooltip_Content)=>{ Tooltip_Content($$anchor5,{children:($$anchor6,$$slotProps2)=>{var p2=root_7$l();append($$anchor6,p2)},$$slots:{default:!0}})}),append($$anchor4,fragment_5)};if_block(node_3,$$render=>{hasAudioModality()||$$render(consequent_1)})}append($$anchor3,fragment)},$$slots:{default:!0}})}),reset(div),template_effect(()=>set_class(div,1,`flex items-center gap-1 ${className()??""}`)),append($$anchor,div)}const MESSAGE_EDIT_KEY=Symbol.for(CONTEXT_KEY_MESSAGE_EDIT);function setMessageEditContext(ctx){return setContext( MESSAGE_EDIT_KEY,ctx)}function getMessageEditContext(){return getContext(MESSAGE_EDIT_KEY)}const CHAT_ACTIONS_KEY=Symbol.for(CONTEXT_KEY_CHAT_ACTIONS);function setChatActionsContext(ctx){return setContext(CHAT_ACTIONS_KEY,ctx)}function getChatActionsContext(){return getContext(CHAT_ACTIONS_KEY)}const CHAT_SETTINGS_DIALOG_KEY=Symbol.for(CONTEXT_KEY_CHAT_SETTINGS_DIALOG);function setChatSettingsDialogContext(ctx){return setContext(CHAT_SETTINGS_DIALOG_KEY,ctx)}function getChatSettingsDialogContext(){ return getContext(CHAT_SETTINGS_DIALOG_KEY)}var root_6$q=from_html('Stop ',1),root$18=from_html('
        ');function ChatFormActions($$anchor,$$props){push$1($$props,!0);let canSend=prop($$props,"canSend",3,!1),className=prop($$props,"class",3,""),disabled=prop($$props,"disabled",3,!1),isLoading2=prop($$props, "isLoading",3,!1),isRecording=prop($$props,"isRecording",3,!1),hasText=prop($$props,"hasText",3,!1),uploadedFiles=prop($$props,"uploadedFiles",19,()=>[]),currentConfig=user_derived(config$1),isRouter=user_derived(isRouterMode),isOffline=user_derived(()=>!!serverError()),conversationModel=user_derived(()=>chatStore.getConversationModel(activeMessages())),lastSyncedConversationModel=null;user_effect(()=>{if(get$4(conversationModel)&&get$4(conversationModel)!==lastSyncedConversationModel)lastSyncedConversationModel= get$4(conversationModel),modelsStore.selectModelByName(get$4(conversationModel));else if(get$4(isRouter)&&!modelsStore.selectedModelId&&modelsStore.loadedModelIds.length>0){lastSyncedConversationModel=null;const first=modelOptions().find(m=>modelsStore.loadedModelIds.includes(m.model));first&&modelsStore.selectModelById(first.id)}});let activeModelId=user_derived(()=>{const options=modelOptions();if(!get$4(isRouter))return options.length>0?options[0].model:null;const selectedId=selectedModelId(); if(selectedId){const model=options.find(m=>m.id===selectedId);if(model)return model.model}if(get$4(conversationModel)){const model=options.find(m=>m.model===get$4(conversationModel));if(model)return model.model}return null}),modelPropsVersion=state$1(0);user_effect(()=>{get$4(activeModelId)&&(modelsStore.getModelProps(get$4(activeModelId))||modelsStore.fetchModelProps(get$4(activeModelId)).then(()=>{update$1(modelPropsVersion)}))});let hasAudioModality=user_derived(()=>get$4(activeModelId)?(get$4( modelPropsVersion),modelsStore.modelSupportsAudio(get$4(activeModelId))):!1),hasVisionModality=user_derived(()=>get$4(activeModelId)?(get$4(modelPropsVersion),modelsStore.modelSupportsVision(get$4(activeModelId))):!1),hasAudioAttachments=user_derived(()=>uploadedFiles().some(file=>getFileTypeCategory(file.type)===FileTypeCategory.AUDIO)),shouldShowRecordButton=user_derived(()=>get$4(hasAudioModality)&&!hasText()&&!get$4(hasAudioAttachments)&&get$4(currentConfig).autoMicOnEmpty),hasModelSelected=user_derived( ()=>!get$4(isRouter)||!!get$4(conversationModel)||!!selectedModelId()),isSelectedModelInCache=user_derived(()=>{if(!get$4(isRouter))return!0;if(get$4(conversationModel))return modelOptions().some(option2=>option2.model===get$4(conversationModel));const currentModelId=selectedModelId();return currentModelId?modelOptions().some(option2=>option2.id===currentModelId):!1}),submitTooltip=user_derived(()=>get$4(hasModelSelected)?get$4(isSelectedModelInCache)?"":"Selected model is not available, please \ select another":"Please select a model first"),selectorModelRef=state$1(void 0),isMobile=new IsMobile;function openModelSelector(){get$4(selectorModelRef)?.open()}const chatSettingsDialog=getChatSettingsDialogContext();let hasMcpPromptsSupport=user_derived(()=>{const perChatOverrides=conversationsStore.getAllMcpServerOverrides();return mcpStore.hasPromptsCapability(perChatOverrides)}),hasMcpResourcesSupport=user_derived(()=>{const perChatOverrides=conversationsStore.getAllMcpServerOverrides();return mcpStore. hasResourcesCapability(perChatOverrides)});var $$exports={openModelSelector},div=root$18(),div_1=child(div),node2=child(div_1);{var consequent=$$anchor2=>{ChatFormActionAttachmentsSheet($$anchor2,{get disabled(){return disabled()},get hasAudioModality(){return get$4(hasAudioModality)},get hasVisionModality(){return get$4(hasVisionModality)},get hasMcpPromptsSupport(){return get$4(hasMcpPromptsSupport)},get hasMcpResourcesSupport(){return get$4(hasMcpResourcesSupport)},get onFileUpload(){return $$props. onFileUpload},get onSystemPromptClick(){return $$props.onSystemPromptClick},get onMcpPromptClick(){return $$props.onMcpPromptClick},get onMcpResourcesClick(){return $$props.onMcpResourcesClick},onMcpSettingsClick:()=>chatSettingsDialog.open(SETTINGS_SECTION_TITLES.MCP)})},alternate=$$anchor2=>{ChatFormActionAttachmentsDropdown($$anchor2,{get disabled(){return disabled()},get hasAudioModality(){return get$4(hasAudioModality)},get hasVisionModality(){return get$4(hasVisionModality)},get hasMcpPromptsSupport(){ return get$4(hasMcpPromptsSupport)},get hasMcpResourcesSupport(){return get$4(hasMcpResourcesSupport)},get onFileUpload(){return $$props.onFileUpload},get onSystemPromptClick(){return $$props.onSystemPromptClick},get onMcpPromptClick(){return $$props.onMcpPromptClick},get onMcpResourcesClick(){return $$props.onMcpResourcesClick},onMcpSettingsClick:()=>chatSettingsDialog.open(SETTINGS_SECTION_TITLES.MCP)})};if_block(node2,$$render=>{isMobile.current?$$render(consequent):$$render(alternate,!1)})}var node_1=sibling( node2,2);McpServersSelector(node_1,{get disabled(){return disabled()},onSettingsClick:()=>chatSettingsDialog.open(SETTINGS_SECTION_TITLES.MCP)}),reset(div_1);var div_2=sibling(div_1,2),node_2=child(div_2);{var consequent_1=$$anchor2=>{{let $0=user_derived(()=>disabled()||get$4(isOffline));bind_this(ModelsSelectorSheet($$anchor2,{get disabled(){return get$4($0)},get currentModel(){return get$4(conversationModel)},forceForegroundText:!0,useGlobalSelection:!0}),$$value=>set$1(selectorModelRef,$$value, !0),()=>get$4(selectorModelRef))}},alternate_1=$$anchor2=>{{let $0=user_derived(()=>disabled()||get$4(isOffline));bind_this(ModelsSelector($$anchor2,{get disabled(){return get$4($0)},get currentModel(){return get$4(conversationModel)},forceForegroundText:!0,useGlobalSelection:!0}),$$value=>set$1(selectorModelRef,$$value,!0),()=>get$4(selectorModelRef))}};if_block(node_2,$$render=>{isMobile.current?$$render(consequent_1):$$render(alternate_1,!1)})}reset(div_2);var node_3=sibling(div_2,2);{var consequent_2=$$anchor2=>{ Button($$anchor2,{type:"button",variant:"secondary",get onclick(){return $$props.onStop},class:"group h-8 w-8 rounded-full p-0 hover:bg-destructive/10!",children:($$anchor3,$$slotProps)=>{var fragment_5=root_6$q(),node_4=sibling(first_child(fragment_5),2);Square(node_4,{class:"h-8 w-8 fill-muted-foreground stroke-muted-foreground group-hover:fill-destructive group-hover:stroke-destructive hover:fill-destructive hover:stroke-destructive"}),append($$anchor3,fragment_5)},$$slots:{default:!0}})},alternate_3=$$anchor2=>{ var fragment_6=comment$2(),node_5=first_child(fragment_6);{var consequent_3=$$anchor3=>{ChatFormActionRecord($$anchor3,{get disabled(){return disabled()},get hasAudioModality(){return get$4(hasAudioModality)},get isLoading(){return isLoading2()},get isRecording(){return isRecording()},get onMicClick(){return $$props.onMicClick}})},alternate_2=$$anchor3=>{{let $0=user_derived(()=>canSend()&&get$4(hasModelSelected)&&get$4(isSelectedModelInCache)),$1=user_derived(()=>get$4(hasModelSelected)&&!get$4( isSelectedModelInCache));ChatFormActionSubmit($$anchor3,{get canSend(){return get$4($0)},get disabled(){return disabled()},get isLoading(){return isLoading2()},get tooltipLabel(){return get$4(submitTooltip)},get showErrorState(){return get$4($1)}})}};if_block(node_5,$$render=>{get$4(shouldShowRecordButton)?$$render(consequent_3):$$render(alternate_2,!1)},!0)}append($$anchor2,fragment_6)};if_block(node_3,$$render=>{isLoading2()?$$render(consequent_2):$$render(alternate_3,!1)})}return reset(div),template_effect( ()=>set_class(div,1,`flex w-full items-center gap-3 ${className()??""}`)),append($$anchor,div),pop($$exports)}var root_2$L=from_html('Send ',1),root_6$p=from_html("

        "),root_4$l=from_html(" ",1);function ChatFormActionSubmit($$anchor,$$props){push$1($$props,!0);const submitButton=($$anchor2,$$arg0)=>{let props=derived_safe_equal(()=>fallback($$arg0?.(),()=>({}),!0));{let $0=user_derived(()=>cn$1("h-8 w-8 rounded-full p-0",showErrorState()?"bg-red-400/1\ 0 text-red-400 hover:bg-red-400/20 hover:text-red-400 disabled:opacity-100":""));Button($$anchor2,spread_props({type:"submit",get disabled(){return get$4(isDisabled)},get class(){return get$4($0)}},()=>get$4(props),{children:($$anchor3,$$slotProps)=>{var fragment_1=root_2$L(),node2=sibling(first_child(fragment_1),2);Arrow_up(node2,{class:"h-12 w-12"}),append($$anchor3,fragment_1)},$$slots:{default:!0}}))}};let canSend=prop($$props,"canSend",3,!1),disabled=prop($$props,"disabled",3,!1),isLoading2=prop( $$props,"isLoading",3,!1),showErrorState=prop($$props,"showErrorState",3,!1),isDisabled=user_derived(()=>!canSend()||disabled()||isLoading2());var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent=$$anchor2=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);component(node_2,()=>Root$5,($$anchor3,Tooltip_Root)=>{Tooltip_Root($$anchor3,{children:($$anchor4,$$slotProps)=>{var fragment_4=root_4$l(),node_3=first_child(fragment_4);component(node_3,()=>Tooltip_trigger,($$anchor5,Tooltip_Trigger)=>{ Tooltip_Trigger($$anchor5,{children:($$anchor6,$$slotProps2)=>{submitButton($$anchor6)},$$slots:{default:!0}})});var node_4=sibling(node_3,2);component(node_4,()=>Tooltip_content,($$anchor5,Tooltip_Content)=>{Tooltip_Content($$anchor5,{children:($$anchor6,$$slotProps2)=>{var p2=root_6$p(),text2=child(p2,!0);reset(p2),template_effect(()=>set_text(text2,$$props.tooltipLabel)),append($$anchor6,p2)},$$slots:{default:!0}})}),append($$anchor4,fragment_4)},$$slots:{default:!0}})}),append($$anchor2,fragment_3)}, alternate=$$anchor2=>{submitButton($$anchor2)};if_block(node_1,$$render=>{$$props.tooltipLabel?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment_2),pop()}var root$17=from_html('');function ChatFormFileInputInvisible($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),multiple=prop($$props,"multiple",3,!0),fileInputElement;function click(){fileInputElement?.click()}function handleFileSelect(event2){const input=event2.target;input. files&&$$props.onFileSelect?.(Array.from(input.files))}var $$exports={click},input_1=root$17();return input_1.__change=handleFileSelect,bind_this(input_1,$$value=>fileInputElement=$$value,()=>fileInputElement),template_effect(()=>{input_1.multiple=multiple(),set_class(input_1,1,`hidden ${className()??""}`)}),append($$anchor,input_1),pop($$exports)}delegate(["change"]);var root_2$K=from_html('

        Press Enter to send, Shift + Enter for new line

        '),root_3$z=from_html(`

        Press to send, Enter for new line

        `),root_1$K=from_html("
        ");function ChatFormHelperText($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),show=prop($$props,"show",3,!0),sendOnEnter=user_derived(()=>config$1().sendOnEnter!==!1),modKey=/Mac|iPhone|iPad|iPod/.test(navigator.platform)?"Cmd":"Ctrl";var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{var div=root_1$K(), node_1=child(div);{var consequent=$$anchor3=>{var p2=root_2$K();append($$anchor3,p2)},alternate=$$anchor3=>{var p_1=root_3$z(),kbd=sibling(child(p_1)),text2=child(kbd);reset(kbd),next$1(3),reset(p_1),template_effect(()=>set_text(text2,`${modKey} + Enter`)),append($$anchor3,p_1)};if_block(node_1,$$render=>{get$4(sendOnEnter)?$$render(consequent):$$render(alternate,!1)})}reset(div),template_effect(()=>set_class(div,1,`mt-6 items-center justify-center ${className()??""} hidden md:flex`)),append($$anchor2, div)};if_block(node2,$$render=>{show()&&$$render(consequent_1)})}append($$anchor,fragment),pop()}var root$16=from_html('
        ');function ChatFormTextarea($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),disabled=prop($$props,"disabled",3,!1),placeholder=prop($$props,"placeholder",3,"Ask anything..."),value=prop($$props,"value",15,""),textareaElement;onMount$1(()=>{textareaElement&&(autoResizeTextarea( textareaElement),textareaElement.focus())});function getElement(){return textareaElement}function focus2(){textareaElement?.focus()}function resetHeight(){textareaElement&&(textareaElement.style.height="1rem")}var $$exports={getElement,focus:focus2,resetHeight},div=root$16(),textarea=child(div);remove_textarea_child(textarea);let classes;return textarea.__keydown=function(...$$args){$$props.onKeydown?.apply(this,$$args)},textarea.__input=event2=>{autoResizeTextarea(event2.currentTarget),$$props. onInput?.()},bind_this(textarea,$$value=>textareaElement=$$value,()=>textareaElement),reset(div),template_effect(()=>{set_class(div,1,`flex-1 ${className()??""}`),classes=set_class(textarea,1,"text-md min-h-12 w-full resize-none border-0 bg-transparent p-0 leading-6 outline-none placeholder:text-muted-foreground focus-visible:ring-0 focus-visible:ring-offset-0",null,classes,{"cursor-not-allowed":disabled()}),textarea.disabled=disabled(),set_attribute(textarea,"placeholder",placeholder())}),event( "paste",textarea,function(...$$args){$$props.onPaste?.apply(this,$$args)}),bind_value(textarea,value),append($$anchor,div),pop($$exports)}delegate(["keydown","input"]);const badgeVariants=tv({base:"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-md border px-2 py-0.5 text-xs font-medium t\ ransition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3",variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent",tertiary:"bg-foreground/15 dark:bg-foreground/10 text-foreground [a&]:hover:bg-foreground/25 border-transparent",destructive:"bg-destructive [a&]:hover:bg-destructive/90 focus-visible:ring-destruct\ ive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/70 border-transparent text-white",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Badge($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),variant=prop($$props,"variant",3,"default"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","href","class","variant","children"]);var fragment=comment$2(),node2=first_child( fragment);element$4(node2,()=>$$props.href?"a":"span",!1,($$element,$$anchor2)=>{bind_this($$element,$$value=>ref2($$value),()=>ref2()),attribute_effect($$element,$0=>({"data-slot":"badge",href:$$props.href,class:$0,...restProps}),[()=>cn$1(badgeVariants({variant:variant()}),$$props.class,"backdrop-blur-sm")]);var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.children??noop$3),append($$anchor2,fragment_1)}),append($$anchor,fragment),pop()}var root_2$J=from_html( '
        ');function ChatFormPromptPicker($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),isOpen=prop($$props,"isOpen",7,!1),searchQuery=prop($$props,"searchQuery",3,""),prompts=state$1(proxy([])),isLoading2=state$1(!1),selectedPrompt=state$1(null),promptArgs=state$1(proxy({})),selectedIndex=state$1(0),internalSearchQuery=state$1(""),promptError=state$1(null),selectedIndexBeforeArgumentForm=state$1(null),suggestions=proxy({}),loadingSuggestions=proxy( {}),activeAutocomplete=state$1(null),autocompleteIndex=state$1(0),serverSettingsMap=user_derived(()=>{const servers=mcpStore.getServers(),map2=new SvelteMap;for(const server of servers)map2.set(server.id,server);return map2});user_effect(()=>{isOpen()?(loadPrompts(),set$1(selectedIndex,0)):(set$1(selectedPrompt,null),set$1(promptArgs,{},!0),set$1(promptError,null))}),user_effect(()=>{get$4(filteredPrompts).length>0&&get$4(selectedIndex)>=get$4(filteredPrompts).length&&set$1(selectedIndex,0)});async function loadPrompts(){ set$1(isLoading2,!0);try{const perChatOverrides=conversationsStore.getAllMcpServerOverrides();if(!await mcpStore.ensureInitialized(perChatOverrides)){set$1(prompts,[],!0);return}set$1(prompts,await mcpStore.getAllPrompts(),!0)}catch(error2){console.error("[ChatFormPromptPicker] Failed to load prompts:",error2),set$1(prompts,[],!0)}finally{set$1(isLoading2,!1)}}function handlePromptClick(prompt){const args=prompt.arguments??[];args.length>0?(set$1(selectedIndexBeforeArgumentForm,get$4(selectedIndex), !0),set$1(selectedPrompt,prompt,!0),set$1(promptArgs,{},!0),set$1(promptError,null),requestAnimationFrame(()=>{const firstInput=document.querySelector(`#arg-${args[0].name}`);firstInput&&firstInput.focus()})):executePrompt(prompt,{})}async function executePrompt(prompt,args){set$1(promptError,null);const placeholderId=uuid$1(),nonEmptyArgs=Object.fromEntries(Object.entries(args).filter(([,value])=>value.trim()!=="")),argsToPass=Object.keys(nonEmptyArgs).length>0?nonEmptyArgs:void 0;$$props.onPromptLoadStart?.( placeholderId,prompt,argsToPass),$$props.onClose?.();try{const result=await mcpStore.getPrompt(prompt.serverName,prompt.name,args);$$props.onPromptLoadComplete?.(placeholderId,result)}catch(error2){const errorMessage=error2 instanceof Error?error2.message:"Unknown error executing prompt";$$props.onPromptLoadError?.(placeholderId,errorMessage)}}function handleArgumentSubmit(event2){event2.preventDefault(),get$4(selectedPrompt)&&executePrompt(get$4(selectedPrompt),get$4(promptArgs))}const fetchCompletions=debounce( async(argName,value)=>{if(!get$4(selectedPrompt)||value.length<1){suggestions[argName]=[];return}loadingSuggestions[argName]=!0;try{const result=await mcpStore.getPromptCompletions(get$4(selectedPrompt).serverName,get$4(selectedPrompt).name,argName,value);if(result&&result.values.length>0){const filteredValues=result.values.filter(v=>v.trim()!=="");filteredValues.length>0?(suggestions[argName]=filteredValues,set$1(activeAutocomplete,argName,!0),set$1(autocompleteIndex,0)):suggestions[argName]=[]}else suggestions[argName]=[]}catch(error2){console.error("[ChatFormPromptPicker] Failed to fetch completions:",error2),suggestions[argName]=[]}finally{loadingSuggestions[argName]=!1}},200);function handleArgInput(argName,value){get$4(promptArgs)[argName]=value,fetchCompletions(argName,value)}function selectSuggestion(argName,value){get$4(promptArgs)[argName]=value,suggestions[argName]=[],set$1(activeAutocomplete,null)}function handleArgKeydown(event2,argName){const argSuggestions=suggestions[argName]?? [];if(event2.key===KeyboardKey.ESCAPE){event2.preventDefault(),event2.stopPropagation(),handleCancelArgumentForm();return}argSuggestions.length===0||get$4(activeAutocomplete)!==argName||(event2.key===KeyboardKey.ARROW_DOWN?(event2.preventDefault(),set$1(autocompleteIndex,Math.min(get$4(autocompleteIndex)+1,argSuggestions.length-1),!0)):event2.key===KeyboardKey.ARROW_UP?(event2.preventDefault(),set$1(autocompleteIndex,Math.max(get$4(autocompleteIndex)-1,0),!0)):event2.key===KeyboardKey.ENTER&&argSuggestions[get$4( autocompleteIndex)]&&(event2.preventDefault(),event2.stopPropagation(),selectSuggestion(argName,argSuggestions[get$4(autocompleteIndex)])))}function handleArgBlur(argName){setTimeout(()=>{get$4(activeAutocomplete)===argName&&(suggestions[argName]=[],set$1(activeAutocomplete,null))},150)}function handleArgFocus(argName){(suggestions[argName]?.length??0)>0&&set$1(activeAutocomplete,argName,!0)}function handleCancelArgumentForm(){get$4(selectedIndexBeforeArgumentForm)!==null&&(set$1(selectedIndex,get$4( selectedIndexBeforeArgumentForm),!0),set$1(selectedIndexBeforeArgumentForm,null)),set$1(selectedPrompt,null),set$1(promptArgs,{},!0),set$1(promptError,null)}function handleKeydown(event2){return isOpen()?event2.key===KeyboardKey.ESCAPE?(event2.preventDefault(),get$4(selectedPrompt)?handleCancelArgumentForm():$$props.onClose?.(),!0):event2.key===KeyboardKey.ARROW_DOWN?(event2.preventDefault(),get$4(filteredPrompts).length>0&&set$1(selectedIndex,(get$4(selectedIndex)+1)%get$4(filteredPrompts).length), !0):event2.key===KeyboardKey.ARROW_UP?(event2.preventDefault(),get$4(filteredPrompts).length>0&&set$1(selectedIndex,get$4(selectedIndex)===0?get$4(filteredPrompts).length-1:get$4(selectedIndex)-1,!0),!0):event2.key===KeyboardKey.ENTER&&!get$4(selectedPrompt)?(event2.preventDefault(),get$4(filteredPrompts)[get$4(selectedIndex)]&&handlePromptClick(get$4(filteredPrompts)[get$4(selectedIndex)]),!0):!1:!1}let filteredPrompts=user_derived(()=>{const sortedServers=mcpStore.getServersSorted(),serverOrderMap=new Map( sortedServers.map((server,index2)=>[server.id,index2])),sortedPrompts=[...get$4(prompts)].sort((a,b)=>{const orderA=serverOrderMap.get(a.serverName)??Number.MAX_SAFE_INTEGER,orderB=serverOrderMap.get(b.serverName)??Number.MAX_SAFE_INTEGER;return orderA-orderB}),query=(searchQuery()||get$4(internalSearchQuery)).toLowerCase();return query?sortedPrompts.filter(prompt=>prompt.name.toLowerCase().includes(query)||prompt.title?.toLowerCase().includes(query)||prompt.description?.toLowerCase().includes(query)): sortedPrompts}),showSearchInput=user_derived(()=>get$4(prompts).length>3);var $$exports={handleKeydown};return ChatFormPickerPopover($$anchor,{get class(){return className()},srLabel:"Open prompt picker",get onClose(){return $$props.onClose},onKeydown:handleKeydown,get isOpen(){return isOpen()},set isOpen($$value){isOpen($$value)},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);{var consequent_1=$$anchor3=>{const prompt=user_derived(()=>get$4(selectedPrompt)), server=user_derived(()=>get$4(serverSettingsMap).get(get$4(prompt).serverName)),serverLabel=user_derived(()=>get$4(server)?mcpStore.getServerLabel(get$4(server)):get$4(prompt).serverName);var div=root_2$J(),node_1=child(div);{const titleExtra=$$anchor4=>{var fragment_2=comment$2(),node_2=first_child(fragment_2);{var consequent=$$anchor5=>{Badge($$anchor5,{variant:"secondary",children:($$anchor6,$$slotProps2)=>{next$1();var text2=text$8();template_effect(()=>set_text(text2,`${get$4(prompt).arguments. length??""} arg${get$4(prompt).arguments.length>1?"s":""}`)),append($$anchor6,text2)},$$slots:{default:!0}})};if_block(node_2,$$render=>{get$4(prompt).arguments?.length&&$$render(consequent)})}append($$anchor4,fragment_2)};let $0=user_derived(()=>get$4(prompt).title||get$4(prompt).name);ChatFormPickerItemHeader(node_1,{get server(){return get$4(server)},get serverLabel(){return get$4(serverLabel)},get title(){return get$4($0)},get description(){return get$4(prompt).description},titleExtra,$$slots:{ titleExtra:!0}})}var node_3=sibling(node_1,2);ChatFormPromptPickerArgumentForm(node_3,{get prompt(){return get$4(selectedPrompt)},get promptArgs(){return get$4(promptArgs)},get suggestions(){return suggestions},get loadingSuggestions(){return loadingSuggestions},get activeAutocomplete(){return get$4(activeAutocomplete)},get autocompleteIndex(){return get$4(autocompleteIndex)},get promptError(){return get$4(promptError)},onArgInput:handleArgInput,onArgKeydown:handleArgKeydown,onArgBlur:handleArgBlur, onArgFocus:handleArgFocus,onSelectSuggestion:selectSuggestion,onSubmit:handleArgumentSubmit,onCancel:handleCancelArgumentForm}),reset(div),append($$anchor3,div)},alternate=$$anchor3=>{ChatFormPickerList($$anchor3,{get items(){return get$4(filteredPrompts)},get isLoading(){return get$4(isLoading2)},get selectedIndex(){return get$4(selectedIndex)},get showSearchInput(){return get$4(showSearchInput)},searchPlaceholder:"Search prompts...",emptyMessage:"No MCP prompts available",itemKey:prompt=>prompt. serverName+":"+prompt.name,get searchQuery(){return get$4(internalSearchQuery)},set searchQuery($$value){set$1(internalSearchQuery,$$value,!0)},item:($$anchor4,prompt=noop$3,index2=noop$3,isSelected=noop$3)=>{const server=user_derived(()=>get$4(serverSettingsMap).get(prompt().serverName)),serverLabel=user_derived(()=>get$4(server)?mcpStore.getServerLabel(get$4(server)):prompt().serverName);ChatFormPickerListItem($$anchor4,{get dataIndex(){return index2()},get isSelected(){return isSelected()},onClick:()=>handlePromptClick( prompt()),children:($$anchor5,$$slotProps2)=>{{const titleExtra=$$anchor6=>{var fragment_8=comment$2(),node_4=first_child(fragment_8);{var consequent_2=$$anchor7=>{Badge($$anchor7,{variant:"secondary",children:($$anchor8,$$slotProps3)=>{next$1();var text_1=text$8();template_effect(()=>set_text(text_1,`${prompt().arguments.length??""} arg${prompt().arguments.length>1?"s":""}`)),append($$anchor8,text_1)},$$slots:{default:!0}})};if_block(node_4,$$render=>{prompt().arguments?.length&&$$render(consequent_2)})} append($$anchor6,fragment_8)};let $0=user_derived(()=>prompt().title||prompt().name);ChatFormPickerItemHeader($$anchor5,{get server(){return get$4(server)},get serverLabel(){return get$4(serverLabel)},get title(){return get$4($0)},get description(){return prompt().description},titleExtra,$$slots:{titleExtra:!0}})}},$$slots:{default:!0}})},skeleton:$$anchor4=>{ChatFormPickerListItemSkeleton($$anchor4,{titleWidth:"w-32",showBadge:!0})},$$slots:{item:!0,skeleton:!0}})};if_block(node2,$$render=>{get$4( selectedPrompt)?$$render(consequent_1):$$render(alternate,!1)})}append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop($$exports)}const linear=x=>x;function cubic_out(t){const f=t-1;return f*f*f+1}function split_css_unit(value){const split=typeof value=="string"&&value.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return split?[parseFloat(split[1]),split[2]||"px"]:[value,"px"]}function fade(node2,{delay=0,duration:duration2=400,easing=linear}={}){const o=+getComputedStyle(node2).opacity;return{delay,duration:duration2, easing,css:t=>`opacity: ${t*o}`}}function fly(node2,{delay=0,duration:duration2=400,easing=cubic_out,x=0,y=0,opacity=0}={}){const style2=getComputedStyle(node2),target_opacity=+style2.opacity,transform2=style2.transform==="none"?"":style2.transform,od=target_opacity*(1-opacity),[x_value,x_unit]=split_css_unit(x),[y_value,y_unit]=split_css_unit(y);return{delay,duration:duration2,easing,css:(t,u)=>` transform: ${transform2} translate(${(1-t)*x_value}${x_unit}, ${(1-t)*y_value}${y_unit}); opacity: ${target_opacity-od*u}`}}function slide(node2,{delay=0,duration:duration2=400,easing=cubic_out,axis="y"}={}){const style2=getComputedStyle(node2),opacity=+style2.opacity,primary_property=axis==="y"?"height":"width",primary_property_value=parseFloat(style2[primary_property]),secondary_properties=axis==="y"?["top","bottom"]:["left","right"],capitalized_secondary_properties=secondary_properties.map(e=>`${e[0].toUpperCase()}${e.slice(1)}`),padding_start_value=parseFloat(style2[`padding${capitalized_secondary_properties[0]}`]), padding_end_value=parseFloat(style2[`padding${capitalized_secondary_properties[1]}`]),margin_start_value=parseFloat(style2[`margin${capitalized_secondary_properties[0]}`]),margin_end_value=parseFloat(style2[`margin${capitalized_secondary_properties[1]}`]),border_width_start_value=parseFloat(style2[`border${capitalized_secondary_properties[0]}Width`]),border_width_end_value=parseFloat(style2[`border${capitalized_secondary_properties[1]}Width`]);return{delay,duration:duration2,easing,css:t=>`overf\ low: hidden;opacity: ${Math.min(t*20,1)*opacity};${primary_property}: ${t*primary_property_value}px;padding-${secondary_properties[0]}: ${t*padding_start_value}px;padding-${secondary_properties[1]}: ${t*padding_end_value}px;margin-${secondary_properties[0]}: ${t*margin_start_value}px;margin-${secondary_properties[1]}: ${t*margin_end_value}px;border-${secondary_properties[0]}-width: ${t*border_width_start_value}px;border-${secondary_properties[1]}-width: ${t*border_width_end_value}px;min-${primary_property}\ : 0`}}function scale(node2,{delay=0,duration:duration2=400,easing=cubic_out,start:start2=0,opacity=0}={}){const style2=getComputedStyle(node2),target_opacity=+style2.opacity,transform2=style2.transform==="none"?"":style2.transform,sd=1-start2,od=target_opacity*(1-opacity);return{delay,duration:duration2,easing,css:(_t,u)=>` transform: ${transform2} scale(${1-sd*u}); opacity: ${target_opacity-od*u} `}}var root_1$J=from_html(""),root_2$I=from_html("");function Input($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),value=prop($$props,"value",15),files=prop($$props,"files",15),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","value","type","files","class"]);var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var input=root_1$J();attribute_effect(input,$0=>({"data-slot":"input",class:$0,type:"file",...restProps}), [()=>cn$1("flex h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 pt-1.5 text-sm font-medium shadow-xs ring-offset-background transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20\ dark:aria-invalid:ring-destructive/40",$$props.class)],void 0,void 0,void 0,!0),bind_this(input,$$value=>ref2($$value),()=>ref2()),bind_files(input,files),bind_value(input,value),append($$anchor2,input)},alternate=$$anchor2=>{var input_1=root_2$I();attribute_effect(input_1,$0=>({"data-slot":"input",class:$0,style:"backdrop-filter: blur(0.5rem);",type:$$props.type,...restProps}),[()=>cn$1("flex h-9 w-full min-w-0 rounded-md border border-input bg-background px-3 py-1 text-base shadow-xs ring-off\ set-background transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",$$props.class)],void 0,void 0,void 0,!0),bind_this(input_1,$$value=>ref2($$value),()=>ref2()), bind_value(input_1,value),append($$anchor2,input_1)};if_block(node2,$$render=>{$$props.type==="file"?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}function Label($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("flex items-center gap-2 text-sm leading-none font-medium select-none g\ roup-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",$$props.class));component(node2,()=>Label$1,($$anchor2,LabelPrimitive_Root)=>{LabelPrimitive_Root($$anchor2,spread_props({"data-slot":"label",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}var root_2$H=from_html('*'),root_3$y=from_html( '...'),root_1$I=from_html(" ",1),root_5$q=from_html(''),root_4$k=from_html('
        '),root$15=from_html('
        ');function ChatFormPromptPickerArgumentInput($$anchor,$$props){push$1($$props,!0);let value=prop($$props, "value",3,""),suggestions=prop($$props,"suggestions",19,()=>[]),isLoadingSuggestions=prop($$props,"isLoadingSuggestions",3,!1),isAutocompleteActive=prop($$props,"isAutocompleteActive",3,!1),autocompleteIndex=prop($$props,"autocompleteIndex",3,0);var div=root$15(),node2=child(div);Label(node2,{get for(){return`arg-${$$props.argument.name??""}`},class:"mb-1 text-muted-foreground",children:($$anchor2,$$slotProps)=>{var fragment=root_1$I(),span=first_child(fragment),text2=child(span),node_1=sibling( text2);{var consequent=$$anchor3=>{var span_1=root_2$H();append($$anchor3,span_1)};if_block(node_1,$$render=>{$$props.argument.required&&$$render(consequent)})}reset(span);var node_2=sibling(span,2);{var consequent_1=$$anchor3=>{var span_2=root_3$y();append($$anchor3,span_2)};if_block(node_2,$$render=>{isLoadingSuggestions()&&$$render(consequent_1)})}template_effect(()=>set_text(text2,`${$$props.argument.name??""} `)),append($$anchor2,fragment)},$$slots:{default:!0}});var node_3=sibling(node2,2); {let $0=user_derived(()=>$$props.argument.description||$$props.argument.name);Input(node_3,{get id(){return`arg-${$$props.argument.name??""}`},type:"text",get value(){return value()},oninput:e=>$$props.onInput(e.currentTarget.value),get onkeydown(){return $$props.onKeydown},get onblur(){return $$props.onBlur},get onfocus(){return $$props.onFocus},get placeholder(){return get$4($0)},get required(){return $$props.argument.required},autocomplete:"off"})}var node_4=sibling(node_3,2);{var consequent_2=$$anchor2=>{ var div_1=root_4$k();each(div_1,22,suggestions,suggestion=>suggestion,($$anchor3,suggestion,i)=>{var button=root_5$q();button.__mousedown=()=>$$props.onSelectSuggestion(suggestion);var text_1=child(button,!0);reset(button),template_effect(()=>{set_class(button,1,`w-full px-3 py-1.5 text-left text-sm hover:bg-accent ${get$4(i)===autocompleteIndex()?"bg-accent":""}`),set_text(text_1,suggestion)}),append($$anchor3,button)}),reset(div_1),transition(3,div_1,()=>fly,()=>({y:-5,duration:100})),append($$anchor2, div_1)};if_block(node_4,$$render=>{isAutocompleteActive()&&suggestions().length>0&&$$render(consequent_2)})}reset(div),append($$anchor,div),pop()}delegate(["mousedown"]);var root_2$G=from_html(''),root$14=from_html('
        ');function ChatFormPromptPickerArgumentForm($$anchor,$$props){push$1($$props,!0);var form=root$14(),node2=child(form);each(node2,17,()=>$$props.prompt.arguments??[],arg=>arg.name,($$anchor2,arg)=>{{let $0=user_derived(()=>$$props.promptArgs[get$4(arg).name]??""),$1=user_derived(()=>$$props.suggestions[get$4(arg).name]??[]),$2=user_derived(()=>$$props.loadingSuggestions[get$4(arg).name]??!1),$3=user_derived(()=>$$props.activeAutocomplete===get$4(arg).name),$4=user_derived(()=>$$props.activeAutocomplete=== get$4(arg).name?$$props.autocompleteIndex:0);ChatFormPromptPickerArgumentInput($$anchor2,{get argument(){return get$4(arg)},get value(){return get$4($0)},get suggestions(){return get$4($1)},get isLoadingSuggestions(){return get$4($2)},get isAutocompleteActive(){return get$4($3)},get autocompleteIndex(){return get$4($4)},onInput:value=>$$props.onArgInput(get$4(arg).name,value),onKeydown:e=>$$props.onArgKeydown(e,get$4(arg).name),onBlur:()=>$$props.onArgBlur(get$4(arg).name),onFocus:()=>$$props.onArgFocus( get$4(arg).name),onSelectSuggestion:value=>$$props.onSelectSuggestion(get$4(arg).name,value)})}});var node_1=sibling(node2,2);{var consequent=$$anchor2=>{var div=root_2$G(),span=sibling(child(div),2),text2=child(span,!0);reset(span),reset(div),template_effect(()=>set_text(text2,$$props.promptError)),append($$anchor2,div)};if_block(node_1,$$render=>{$$props.promptError&&$$render(consequent)})}var div_1=sibling(node_1,2),node_2=child(div_1);Button(node_2,{type:"button",size:"sm",get onclick(){return $$props. onCancel},variant:"secondary",children:($$anchor2,$$slotProps)=>{next$1();var text_1=text$8("Cancel");append($$anchor2,text_1)},$$slots:{default:!0}});var node_3=sibling(node_2,2);Button(node_3,{size:"sm",type:"submit",children:($$anchor2,$$slotProps)=>{next$1();var text_2=text$8("Use Prompt");append($$anchor2,text_2)},$$slots:{default:!0}}),reset(div_1),reset(form),event("submit",form,function(...$$args){$$props.onSubmit?.apply(this,$$args)}),append($$anchor,form),pop()}function Popover($$anchor,$$props){ push$1($$props,!0);let open2=prop($$props,"open",15,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","open"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Popover$1,($$anchor2,PopoverPrimitive_Root)=>{PopoverPrimitive_Root($$anchor2,spread_props(()=>restProps,{get open(){return open2()},set open($$value){open2($$value)}}))}),append($$anchor,fragment),pop()}function Popover_portal($$anchor,$$props){let restProps=rest_props($$props,["$$slots","$$events", "$$legacy"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Portal$2,($$anchor2,PopoverPrimitive_Portal)=>{PopoverPrimitive_Portal($$anchor2,spread_props(()=>restProps))}),append($$anchor,fragment)}function Popover_content($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),sideOffset=prop($$props,"sideOffset",3,4),align=prop($$props,"align",3,"center"),collisionPadding=prop($$props,"collisionPadding",3,8),avoidCollisions=prop($$props,"avoidCollisi\ ons",3,!0),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","sideOffset","side","align","collisionPadding","avoidCollisions","portalProps"]);Popover_portal($$anchor,spread_props(()=>$$props.portalProps,{children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);{let $0=user_derived(()=>cn$1("z-50 w-72 origin-(--bits-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[\ side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",$$props.class));component(node2,()=>Popover_content$1,($$anchor3,PopoverPrimitive_Content)=>{PopoverPrimitive_Content($$anchor3,spread_props({"data-slot":"popover-conten\ t",get sideOffset(){return sideOffset()},get side(){return $$props.side},get align(){return align()},get collisionPadding(){return collisionPadding()},get avoidCollisions(){return avoidCollisions()},get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Popover_trigger($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$s\ lots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("",$$props.class));component(node2,()=>Popover_trigger$1,($$anchor2,PopoverPrimitive_Trigger)=>{PopoverPrimitive_Trigger($$anchor2,spread_props({"data-slot":"popover-trigger",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}var root_2$F=from_html(' '),root_1$H=from_html( " ",1);function ChatFormPickerPopover($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),isOpen=prop($$props,"isOpen",15,!1),srLabel=prop($$props,"srLabel",3,"Open picker");var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Popover,($$anchor2,Popover_Root)=>{Popover_Root($$anchor2,{onOpenChange:open2=>{open2||$$props.onClose?.()},get open(){return isOpen()},set open($$value){isOpen($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$H(), node_1=first_child(fragment_1);component(node_1,()=>Popover_trigger,($$anchor4,Popover_Trigger)=>{Popover_Trigger($$anchor4,{class:"pointer-events-none absolute inset-0 opacity-0",children:($$anchor5,$$slotProps2)=>{var span=root_2$F(),text2=child(span,!0);reset(span),template_effect(()=>set_text(text2,srLabel())),append($$anchor5,span)},$$slots:{default:!0}})});var node_2=sibling(node_1,2);component(node_2,()=>Popover_content,($$anchor4,Popover_Content)=>{Popover_Content($$anchor4,{side:"top",align:"\ start",sideOffset:12,get class(){return`w-[var(--bits-popover-anchor-width)] max-w-none rounded-xl border-border/50 p-0 shadow-xl ${className()??""}`},get onkeydown(){return $$props.onKeydown},onOpenAutoFocus:e=>e.preventDefault(),children:($$anchor5,$$slotProps2)=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);snippet(node_3,()=>$$props.children),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()} var root_1$G=from_html(" ",1);function Scroll_area_scrollbar($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),orientation=prop($$props,"orientation",3,"vertical"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","orientation","children"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("flex touch-none p-px transition-colors select-none",orientation()==="vertical"&&"h-full w-2.5 border-l border-l-transpa\ rent",orientation()==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",$$props.class));component(node2,()=>Scroll_area_scrollbar$1,($$anchor2,ScrollAreaPrimitive_Scrollbar)=>{ScrollAreaPrimitive_Scrollbar($$anchor2,spread_props({"data-slot":"scroll-area-scrollbar",get orientation(){return orientation()},get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$G(),node_1=first_child( fragment_1);snippet(node_1,()=>$$props.children??noop$3);var node_2=sibling(node_1,2);component(node_2,()=>Scroll_area_thumb,($$anchor4,ScrollAreaPrimitive_Thumb)=>{ScrollAreaPrimitive_Thumb($$anchor4,{"data-slot":"scroll-area-thumb",class:"relative flex-1 rounded-full bg-border"})}),append($$anchor3,fragment_1)},$$slots:{default:!0}}))})}append($$anchor,fragment),pop()}var root_1$F=from_html(" ",1);function Scroll_area($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"re\ f",15,null),orientation=prop($$props,"orientation",3,"vertical"),scrollbarXClasses=prop($$props,"scrollbarXClasses",3,""),scrollbarYClasses=prop($$props,"scrollbarYClasses",3,""),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","orientation","scrollbarXClasses","scrollbarYClasses","children"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("relative",$$props.class));component(node2,()=>Scroll_area$1,($$anchor2,ScrollAreaPrimitive_Root)=>{ ScrollAreaPrimitive_Root($$anchor2,spread_props({"data-slot":"scroll-area",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$F(),node_1=first_child(fragment_1);component(node_1,()=>Scroll_area_viewport,($$anchor4,ScrollAreaPrimitive_Viewport)=>{ScrollAreaPrimitive_Viewport($$anchor4,{"data-slot":"scroll-area-viewport",class:"size-full rounded-[inherit] ring-ring/10 outline-ring/50 transi\ tion-[color,box-shadow] focus-visible:ring-4 focus-visible:outline-1 dark:ring-ring/20 dark:outline-ring/40",children:($$anchor5,$$slotProps2)=>{var fragment_2=comment$2(),node_2=first_child(fragment_2);snippet(node_2,()=>$$props.children??noop$3),append($$anchor5,fragment_2)},$$slots:{default:!0}})});var node_3=sibling(node_1,2);{var consequent=$$anchor4=>{Scroll_area_scrollbar($$anchor4,{orientation:"vertical",get class(){return scrollbarYClasses()}})};if_block(node_3,$$render=>{(orientation()=== "vertical"||orientation()==="both")&&$$render(consequent)})}var node_4=sibling(node_3,2);{var consequent_1=$$anchor4=>{Scroll_area_scrollbar($$anchor4,{orientation:"horizontal",get class(){return scrollbarXClasses()}})};if_block(node_4,$$render=>{(orientation()==="horizontal"||orientation()==="both")&&$$render(consequent_1)})}var node_5=sibling(node_4,2);component(node_5,()=>Scroll_area_corner,($$anchor4,ScrollAreaPrimitive_Corner)=>{ScrollAreaPrimitive_Corner($$anchor4,{})}),append($$anchor3,fragment_1)}, $$slots:{default:!0}}))})}append($$anchor,fragment),pop()}var root_2$E=from_html('
        '),root_6$o=from_html('
        '),root_1$E=from_html("
        ",1);function ChatFormPickerList($$anchor,$$props){push$1($$props,!0);let searchQuery=prop($$props,"searchQuery",15),searchPlaceholder=prop($$props,"searchPlaceholder",3,"Search..."),emptyMessage=prop($$props,"emptyMe\ ssage",3,"No items available"),listContainer=state$1(null);user_effect(()=>{if(get$4(listContainer)&&$$props.selectedIndex>=0&&$$props.selectedIndex<$$props.items.length){const selectedElement=get$4(listContainer).querySelector(`[data-picker-index="${$$props.selectedIndex}"]`);selectedElement&&selectedElement.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})}}),Scroll_area($$anchor,{children:($$anchor2,$$slotProps)=>{var fragment_1=root_1$E(),node2=first_child(fragment_1);{var consequent=$$anchor3=>{ var div=root_2$E(),node_1=child(div);SearchInput(node_1,{get placeholder(){return searchPlaceholder()},get value(){return searchQuery()},set value($$value){searchQuery($$value)}}),reset(div),append($$anchor3,div)};if_block(node2,$$render=>{$$props.showSearchInput&&$$render(consequent)})}var div_1=sibling(node2,2);let classes;var node_2=child(div_1);{var consequent_2=$$anchor3=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);{var consequent_1=$$anchor4=>{var fragment_3=comment$2(),node_4=first_child( fragment_3);snippet(node_4,()=>$$props.skeleton),append($$anchor4,fragment_3)};if_block(node_3,$$render=>{$$props.skeleton&&$$render(consequent_1)})}append($$anchor3,fragment_2)},alternate_1=$$anchor3=>{var fragment_4=comment$2(),node_5=first_child(fragment_4);{var consequent_3=$$anchor4=>{var div_2=root_6$o(),text2=child(div_2,!0);reset(div_2),template_effect(()=>set_text(text2,emptyMessage())),append($$anchor4,div_2)},alternate=$$anchor4=>{var fragment_5=comment$2(),node_6=first_child(fragment_5); each(node_6,19,()=>$$props.items,(itemData,index2)=>$$props.itemKey(itemData,index2),($$anchor5,itemData,index2)=>{var fragment_6=comment$2(),node_7=first_child(fragment_6);snippet(node_7,()=>$$props.item,()=>get$4(itemData),()=>get$4(index2),()=>get$4(index2)===$$props.selectedIndex),append($$anchor5,fragment_6)}),append($$anchor4,fragment_5)};if_block(node_5,$$render=>{$$props.items.length===0?$$render(consequent_3):$$render(alternate,!1)},!0)}append($$anchor3,fragment_4)};if_block(node_2,$$render=>{ $$props.isLoading?$$render(consequent_2):$$render(alternate_1,!1)})}reset(div_1),bind_this(div_1,$$value=>set$1(listContainer,$$value),()=>get$4(listContainer));var node_8=sibling(div_1,2);{var consequent_4=$$anchor3=>{var fragment_7=comment$2(),node_9=first_child(fragment_7);snippet(node_9,()=>$$props.footer),append($$anchor3,fragment_7)};if_block(node_8,$$render=>{$$props.footer&&$$render(consequent_4)})}template_effect(()=>classes=set_class(div_1,1,`${CHAT_FORM_POPOVER_MAX_HEIGHT} p-2`,null,classes, {"pt-13":$$props.showSearchInput})),append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}var root$13=from_html('');function ChatFormPickerListItem($$anchor,$$props){let isSelected=prop($$props,"isSelected",3,!1);var button=root$13();button.__click=function(...$$args){$$props.onClick?.apply(this,$$args)};var node2=child(button);snippet(node2,()=>$$props.children),reset(button),template_effect(()=>{set_attribute(button,"data-picker-index",$$props.dataIndex), set_class(button,1,`flex w-full cursor-pointer items-start gap-3 rounded-lg px-3 py-2 text-left hover:bg-accent/50 ${isSelected()?"bg-accent/50":""}`)}),append($$anchor,button)}delegate(["click"]);var root_1$D=from_html(''),root_3$x=from_html('

        '),root$12=from_html('
        <\ /div>
        ');function ChatFormPickerItemHeader($$anchor,$$props){push$1($$props,!0);let faviconUrl=user_derived(()=>$$props.server?mcpStore.getServerFavicon($$props.server.id):null);var div=root$12(),div_1=child(div),node2=child(div_1);{var consequent=$$anchor2=>{var img=root_1$D();template_effect(()=>set_attribute(img,"src",get$4(faviconUrl))),event("error",img,e=>{e.currentTarget.style.display="none"}),replay_events( img),append($$anchor2,img)};if_block(node2,$$render=>{get$4(faviconUrl)&&$$render(consequent)})}var span=sibling(node2,2),text2=child(span,!0);reset(span),reset(div_1);var div_2=sibling(div_1,2),span_1=child(div_2),text_1=child(span_1,!0);reset(span_1);var node_1=sibling(span_1,2);{var consequent_1=$$anchor2=>{var fragment=comment$2(),node_2=first_child(fragment);snippet(node_2,()=>$$props.titleExtra),append($$anchor2,fragment)};if_block(node_1,$$render=>{$$props.titleExtra&&$$render(consequent_1)})} reset(div_2);var node_3=sibling(div_2,2);{var consequent_2=$$anchor2=>{var p2=root_3$x(),text_2=child(p2,!0);reset(p2),template_effect(()=>set_text(text_2,$$props.description)),append($$anchor2,p2)};if_block(node_3,$$render=>{$$props.description&&$$render(consequent_2)})}var node_4=sibling(node_3,2);{var consequent_3=$$anchor2=>{var fragment_1=comment$2(),node_5=first_child(fragment_1);snippet(node_5,()=>$$props.subtitle),append($$anchor2,fragment_1)};if_block(node_4,$$render=>{$$props.subtitle&& $$render(consequent_3)})}reset(div),template_effect(()=>{set_text(text2,$$props.serverLabel),set_text(text_1,$$props.title)}),append($$anchor,div),pop()}var root_1$C=from_html('
        '),root$11=from_html('
        ');function ChatFormPickerListItemSkeleton($$anchor,$$props){let titleWidth=prop($$props,"titleWidth",3,"w-48"),showBadge=prop($$props,"showBadge",3,!1);var div=root$11(),div_1=child(div),div_2=sibling(child(div_1),2),div_3=child(div_2),node2=sibling(div_3,2);{var consequent=$$anchor2=>{var div_4=root_1$C();append($$anchor2, div_4)};if_block(node2,$$render=>{showBadge()&&$$render(consequent)})}reset(div_2),next$1(2),reset(div_1),reset(div),template_effect(()=>set_class(div_3,1,`h-4 ${titleWidth()??""} animate-pulse rounded bg-muted`)),append($$anchor,div)}var root_5$p=from_html('attached'),root_6$n=from_html('

        '),root_10$d=from_html( " Browse all",1);function ChatFormResourcePicker($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),isOpen=prop($$props,"isOpen",7,!1),searchQuery=prop($$props,"searchQuery",3,""),resources=state$1(proxy([])),isLoading2=state$1(!1),selectedIndex=state$1(0),internalSearchQuery=state$1(""),serverSettingsMap=user_derived(()=>{const servers=mcpStore.getServers(),map2=new SvelteMap;for(const server of servers)map2.set(server.id,server);return map2});user_effect(()=>{isOpen()&& (loadResources(),set$1(selectedIndex,0))}),user_effect(()=>{get$4(filteredResources).length>0&&get$4(selectedIndex)>=get$4(filteredResources).length&&set$1(selectedIndex,0)});async function loadResources(){set$1(isLoading2,!0);try{const perChatOverrides=conversationsStore.getAllMcpServerOverrides();if(!await mcpStore.ensureInitialized(perChatOverrides)){set$1(resources,[],!0);return}await mcpStore.fetchAllResources(),set$1(resources,mcpResourceStore.getAllResourceInfos(),!0)}catch(error2){console. error("[ChatFormResourcePicker] Failed to load resources:",error2),set$1(resources,[],!0)}finally{set$1(isLoading2,!1)}}function handleResourceClick(resource){mcpStore.attachResource(resource.uri),$$props.onResourceSelect?.(resource),$$props.onClose?.()}function isResourceAttached(uri2){return mcpResourceStore.isAttached(uri2)}function handleKeydown(event2){return isOpen()?event2.key===KeyboardKey.ESCAPE?(event2.preventDefault(),$$props.onClose?.(),!0):event2.key===KeyboardKey.ARROW_DOWN?(event2. preventDefault(),get$4(filteredResources).length>0&&set$1(selectedIndex,(get$4(selectedIndex)+1)%get$4(filteredResources).length),!0):event2.key===KeyboardKey.ARROW_UP?(event2.preventDefault(),get$4(filteredResources).length>0&&set$1(selectedIndex,get$4(selectedIndex)===0?get$4(filteredResources).length-1:get$4(selectedIndex)-1,!0),!0):event2.key===KeyboardKey.ENTER?(event2.preventDefault(),get$4(filteredResources)[get$4(selectedIndex)]&&handleResourceClick(get$4(filteredResources)[get$4(selectedIndex)]), !0):!1:!1}let filteredResources=user_derived(()=>{const sortedServers=mcpStore.getServersSorted(),serverOrderMap=new Map(sortedServers.map((server,index2)=>[server.id,index2])),sortedResources=[...get$4(resources)].sort((a,b)=>{const orderA=serverOrderMap.get(a.serverName)??Number.MAX_SAFE_INTEGER,orderB=serverOrderMap.get(b.serverName)??Number.MAX_SAFE_INTEGER;return orderA-orderB}),query=(searchQuery()||get$4(internalSearchQuery)).toLowerCase();return query?sortedResources.filter(resource=>resource. name.toLowerCase().includes(query)||resource.title?.toLowerCase().includes(query)||resource.description?.toLowerCase().includes(query)||resource.uri.toLowerCase().includes(query)):sortedResources}),showSearchInput=user_derived(()=>get$4(resources).length>3);var $$exports={handleKeydown};return ChatFormPickerPopover($$anchor,{get class(){return className()},srLabel:"Open resource picker",get onClose(){return $$props.onClose},onKeydown:handleKeydown,get isOpen(){return isOpen()},set isOpen($$value){ isOpen($$value)},children:($$anchor2,$$slotProps)=>{ChatFormPickerList($$anchor2,{get items(){return get$4(filteredResources)},get isLoading(){return get$4(isLoading2)},get selectedIndex(){return get$4(selectedIndex)},get showSearchInput(){return get$4(showSearchInput)},searchPlaceholder:"Search resources...",emptyMessage:"No MCP resources available",itemKey:resource=>resource.serverName+":"+resource.uri,get searchQuery(){return get$4(internalSearchQuery)},set searchQuery($$value){set$1(internalSearchQuery, $$value,!0)},item:($$anchor3,resource=noop$3,index2=noop$3,isSelected=noop$3)=>{const server=user_derived(()=>get$4(serverSettingsMap).get(resource().serverName)),serverLabel=user_derived(()=>get$4(server)?mcpStore.getServerLabel(get$4(server)):resource().serverName);ChatFormPickerListItem($$anchor3,{get dataIndex(){return index2()},get isSelected(){return isSelected()},onClick:()=>handleResourceClick(resource()),children:($$anchor4,$$slotProps2)=>{{const titleExtra=$$anchor5=>{var fragment_4=comment$2(), node2=first_child(fragment_4);{var consequent=$$anchor6=>{var span=root_5$p();append($$anchor6,span)};if_block(node2,$$render=>{isResourceAttached(resource().uri)&&$$render(consequent)})}append($$anchor5,fragment_4)},subtitle=$$anchor5=>{var p2=root_6$n(),text2=child(p2,!0);reset(p2),template_effect(()=>set_text(text2,resource().uri)),append($$anchor5,p2)};let $0=user_derived(()=>resource().title||resource().name);ChatFormPickerItemHeader($$anchor4,{get server(){return get$4(server)},get serverLabel(){ return get$4(serverLabel)},get title(){return get$4($0)},get description(){return resource().description},titleExtra,subtitle,$$slots:{titleExtra:!0,subtitle:!0}})}},$$slots:{default:!0}})},skeleton:$$anchor3=>{ChatFormPickerListItemSkeleton($$anchor3,{})},footer:$$anchor3=>{var fragment_6=comment$2(),node_1=first_child(fragment_6);{var consequent_1=$$anchor4=>{Button($$anchor4,{class:"fixed right-3 bottom-3",type:"button",get onclick(){return $$props.onBrowse},variant:"secondary",size:"sm",children:($$anchor5,$$slotProps2)=>{ var fragment_8=root_10$d(),node_2=first_child(fragment_8);Folder_open(node_2,{class:"h-3 w-3"}),next$1(),append($$anchor5,fragment_8)},$$slots:{default:!0}})};if_block(node_1,$$render=>{$$props.onBrowse&&get$4(resources).length>3&&$$render(consequent_1)})}append($$anchor3,fragment_6)},$$slots:{item:!0,skeleton:!0,footer:!0}})},$$slots:{default:!0}}),pop($$exports)}function fadeInView(node2,options={}){const{duration:duration2=300,y=0,skipIfVisible=!1}=options;if(skipIfVisible){const rect=node2.getBoundingClientRect(); if(rect.top0&&rect.left0)return}node2.style.opacity="0",node2.style.transform=`translateY(${y}px)`,node2.style.transition=`opacity ${duration2}ms ease-out, transform ${duration2}ms ease-out`,user_effect(()=>{const observer=new IntersectionObserver(entries=>{for(const entry of entries)entry.isIntersecting&&(requestAnimationFrame(()=>{node2.style.opacity="1",node2.style.transform="translateY(0)"}),observer.disconnect())},{threshold:.05}); return observer.observe(node2),()=>{observer.disconnect()}})}var root_1$B=from_html("
        "),root$10=from_html('
        ');function ChatMessages($$anchor,$$props){push$1($$props,!0);let messages=prop($$props,"messages",19,()=>[]),allConversationMessages=state$1(proxy([]));const currentConfig=config$1();setChatActionsContext({copy:async message=>{const asPlainText=!!currentConfig.copyTextAttachmentsAsPlainText,clipboardContent=formatMessageForClipboard( message.content,message.extra,asPlainText);await copyToClipboard(clipboardContent,"Message copied to clipboard")},delete:async message=>{await chatStore.deleteMessage(message.id),refreshAllMessages()},navigateToSibling:async siblingId=>{await conversationsStore.navigateToSibling(siblingId)},editWithBranching:async(message,newContent,newExtras)=>{$$props.onUserAction?.(),await chatStore.editMessageWithBranching(message.id,newContent,newExtras),refreshAllMessages()},editWithReplacement:async(message,newContent,shouldBranch)=>{ $$props.onUserAction?.(),await chatStore.editAssistantMessage(message.id,newContent,shouldBranch),refreshAllMessages()},editUserMessagePreserveResponses:async(message,newContent,newExtras)=>{$$props.onUserAction?.(),await chatStore.editUserMessagePreserveResponses(message.id,newContent,newExtras),refreshAllMessages()},regenerateWithBranching:async(message,modelOverride)=>{$$props.onUserAction?.(),await chatStore.regenerateMessageWithBranching(message.id,modelOverride),refreshAllMessages()},continueAssistantMessage:async message=>{ $$props.onUserAction?.(),await chatStore.continueAssistantMessage(message.id),refreshAllMessages()},forkConversation:async(message,options)=>{await conversationsStore.forkConversation(message.id,options)}});function refreshAllMessages(){const conversation=activeConversation();conversation?conversationsStore.getConversationMessages(conversation.id).then(messages2=>{set$1(allConversationMessages,messages2,!0)}):set$1(allConversationMessages,[],!0)}user_effect(()=>{activeConversation()&&refreshAllMessages()}); let displayMessages=user_derived(()=>{if(!messages().length)return[];const filteredMessages=currentConfig.showSystemMessage?messages():messages().filter(msg=>msg.type!==MessageRole.SYSTEM),result=[];for(let i=0;i=0;i--)if(result[i].message.role===MessageRole.ASSISTANT){result[i].isLastAssistantMessage=!0;break}return result});var div=root$10();each(div,21,()=>get$4(displayMessages),({message,toolMessages,isLastAssistantMessage,siblingInfo})=>message.id,($$anchor2,$$item)=>{let message=()=>get$4($$item).message,toolMessages=()=>get$4($$item).toolMessages,isLastAssistantMessage=()=>get$4($$item).isLastAssistantMessage,siblingInfo=()=>get$4($$item).siblingInfo; var div_1=root_1$B(),node2=child(div_1);ChatMessage(node2,{class:"mx-auto w-full max-w-[48rem]",get message(){return message()},get toolMessages(){return toolMessages()},get isLastAssistantMessage(){return isLastAssistantMessage()},get siblingInfo(){return siblingInfo()}}),reset(div_1),action(div_1,$$node=>fadeInView?.($$node)),append($$anchor2,div_1)}),reset(div),template_effect(()=>set_class(div,1,`flex h-full flex-col space-y-10 pt-24 ${$$props.class??""}`)),append($$anchor,div),pop()}function ChatMessage($$anchor,$$props){ push$1($$props,!0);let className=prop($$props,"class",3,""),toolMessages=prop($$props,"toolMessages",19,()=>[]),isLastAssistantMessage=prop($$props,"isLastAssistantMessage",3,!1),siblingInfo=prop($$props,"siblingInfo",3,null);const chatActions=getChatActionsContext();let deletionInfo=state$1(null),editedContent=user_derived(()=>$$props.message.content),editedExtras=user_derived(()=>$$props.message.extra?[...$$props.message.extra]:[]),editedUploadedFiles=state$1(proxy([])),isEditing2=state$1(!1), showDeleteDialog=state$1(!1),shouldBranchAfterEdit=state$1(!1),textareaElement=state$1(void 0),showSaveOnlyOption=user_derived(()=>$$props.message.role===MessageRole.USER);setMessageEditContext({get isEditing(){return get$4(isEditing2)},get editedContent(){return get$4(editedContent)},get editedExtras(){return get$4(editedExtras)},get editedUploadedFiles(){return get$4(editedUploadedFiles)},get originalContent(){return $$props.message.content},get originalExtras(){return $$props.message.extra||[]}, get showSaveOnlyOption(){return get$4(showSaveOnlyOption)},setContent:content2=>{set$1(editedContent,content2)},setExtras:extras=>{set$1(editedExtras,extras)},setUploadedFiles:files=>{set$1(editedUploadedFiles,files,!0)},save:handleSaveEdit,saveOnly:handleSaveEditOnly,cancel:handleCancelEdit,startEdit:handleEdit});let mcpPromptExtra=user_derived(()=>{if($$props.message.role!==MessageRole.USER||$$props.message.content.trim()||!$$props.message.extra||$$props.message.extra.length!==1)return null;const extra=$$props. message.extra[0];return extra.type===AttachmentType.MCP_PROMPT?extra:null});user_effect(()=>{const pendingId=pendingEditMessageId();pendingId&&pendingId===$$props.message.id&&!get$4(isEditing2)&&(handleEdit(),chatStore.clearPendingEditMessageId())});async function handleCancelEdit(){if(set$1(isEditing2,!1),$$props.message.role===MessageRole.SYSTEM){await chatStore.removeSystemPromptPlaceholder($$props.message.id)&&goto(`${base}/`);return}set$1(editedContent,$$props.message.content),set$1(editedExtras, $$props.message.extra?[...$$props.message.extra]:[]),set$1(editedUploadedFiles,[],!0)}function handleCopy(){chatActions.copy($$props.message)}async function handleConfirmDelete(){$$props.message.role===MessageRole.SYSTEM?await chatStore.removeSystemPromptPlaceholder($$props.message.id)&&goto(`${base}/`):chatActions.delete($$props.message),set$1(showDeleteDialog,!1)}async function handleDelete2(){set$1(deletionInfo,await chatStore.getDeletionInfo($$props.message.id),!0),set$1(showDeleteDialog,!0)} function handleEdit(){set$1(isEditing2,!0),set$1(editedContent,$$props.message.role===MessageRole.SYSTEM&&$$props.message.content===SYSTEM_MESSAGE_PLACEHOLDER?"":$$props.message.content),get$4(textareaElement)?.focus(),set$1(editedExtras,$$props.message.extra?[...$$props.message.extra]:[]),set$1(editedUploadedFiles,[],!0),setTimeout(()=>{get$4(textareaElement)&&(get$4(textareaElement).focus(),get$4(textareaElement).setSelectionRange(get$4(textareaElement).value.length,get$4(textareaElement).value. length))},0)}function handleRegenerate(modelOverride){chatActions.regenerateWithBranching($$props.message,modelOverride)}function handleContinue(){chatActions.continueAssistantMessage($$props.message)}function handleForkConversation(options){chatActions.forkConversation($$props.message,options)}function handleNavigateToSibling(siblingId){chatActions.navigateToSibling(siblingId)}async function handleSaveEdit(){if($$props.message.role===MessageRole.SYSTEM){const newContent=get$4(editedContent).trim(); if(!newContent){const conversationDeleted=await chatStore.removeSystemPromptPlaceholder($$props.message.id);set$1(isEditing2,!1),conversationDeleted&&goto(`${base}/`);return}await DatabaseService.updateMessage($$props.message.id,{content:newContent});const index2=conversationsStore.findMessageIndex($$props.message.id);index2!==-1&&conversationsStore.updateMessageAtIndex(index2,{content:newContent})}else if($$props.message.role===MessageRole.USER){const finalExtras=await getMergedExtras();chatActions. editWithBranching($$props.message,get$4(editedContent).trim(),finalExtras)}else chatActions.editWithReplacement($$props.message,get$4(editedContent),get$4(shouldBranchAfterEdit));set$1(isEditing2,!1),set$1(shouldBranchAfterEdit,!1),set$1(editedUploadedFiles,[],!0)}async function handleSaveEditOnly(){if($$props.message.role===MessageRole.USER){const finalExtras=await getMergedExtras();chatActions.editUserMessagePreserveResponses($$props.message,get$4(editedContent).trim(),finalExtras)}set$1(isEditing2, !1),set$1(editedUploadedFiles,[],!0)}async function getMergedExtras(){if(get$4(editedUploadedFiles).length===0)return get$4(editedExtras);const plainFiles=snapshot(get$4(editedUploadedFiles)),newExtras=(await parseFilesToMessageExtras(plainFiles))?.extras||[];return[...get$4(editedExtras),...newExtras]}function handleShowDeleteDialogChange(show){set$1(showDeleteDialog,show,!0)}var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{ChatMessageSystem($$anchor2,{get class(){ return className()},get deletionInfo(){return get$4(deletionInfo)},get message(){return $$props.message},onConfirmDelete:handleConfirmDelete,onCopy:handleCopy,onDelete:handleDelete2,onEdit:handleEdit,onNavigateToSibling:handleNavigateToSibling,onShowDeleteDialogChange:handleShowDeleteDialogChange,get showDeleteDialog(){return get$4(showDeleteDialog)},get siblingInfo(){return siblingInfo()},get textareaElement(){return get$4(textareaElement)},set textareaElement($$value){set$1(textareaElement,$$value, !0)}})},alternate_2=$$anchor2=>{var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent_1=$$anchor3=>{ChatMessageMcpPrompt($$anchor3,{get class(){return className()},get deletionInfo(){return get$4(deletionInfo)},get message(){return $$props.message},get mcpPrompt(){return get$4(mcpPromptExtra)},onConfirmDelete:handleConfirmDelete,onCopy:handleCopy,onDelete:handleDelete2,onEdit:handleEdit,onNavigateToSibling:handleNavigateToSibling,onShowDeleteDialogChange:handleShowDeleteDialogChange, get showDeleteDialog(){return get$4(showDeleteDialog)},get siblingInfo(){return siblingInfo()}})},alternate_1=$$anchor3=>{var fragment_4=comment$2(),node_2=first_child(fragment_4);{var consequent_2=$$anchor4=>{ChatMessageUser($$anchor4,{get class(){return className()},get deletionInfo(){return get$4(deletionInfo)},get message(){return $$props.message},onConfirmDelete:handleConfirmDelete,onCopy:handleCopy,onDelete:handleDelete2,onEdit:handleEdit,onForkConversation:handleForkConversation,onNavigateToSibling:handleNavigateToSibling, onShowDeleteDialogChange:handleShowDeleteDialogChange,get showDeleteDialog(){return get$4(showDeleteDialog)},get siblingInfo(){return siblingInfo()}})},alternate=$$anchor4=>{ChatMessageAssistant($$anchor4,{get class(){return className()},get deletionInfo(){return get$4(deletionInfo)},get isLastAssistantMessage(){return isLastAssistantMessage()},get message(){return $$props.message},get toolMessages(){return toolMessages()},get messageContent(){return $$props.message.content},onConfirmDelete:handleConfirmDelete, onContinue:handleContinue,onCopy:handleCopy,onDelete:handleDelete2,onEdit:handleEdit,onForkConversation:handleForkConversation,onNavigateToSibling:handleNavigateToSibling,onRegenerate:handleRegenerate,onShowDeleteDialogChange:handleShowDeleteDialogChange,get showDeleteDialog(){return get$4(showDeleteDialog)},get siblingInfo(){return siblingInfo()},get textareaElement(){return get$4(textareaElement)},set textareaElement($$value){set$1(textareaElement,$$value,!0)}})};if_block(node_2,$$render=>{$$props. message.role===MessageRole.USER?$$render(consequent_2):$$render(alternate,!1)},!0)}append($$anchor3,fragment_4)};if_block(node_1,$$render=>{get$4(mcpPromptExtra)?$$render(consequent_1):$$render(alternate_1,!1)},!0)}append($$anchor2,fragment_2)};if_block(node2,$$render=>{$$props.message.role===MessageRole.SYSTEM?$$render(consequent):$$render(alternate_2,!1)})}append($$anchor,fragment),pop()}var root_2$D=from_html('
        '),root_9$g=from_html('
        Receiving arguments...
        '),root_10$c=from_html('
        Response was truncated
        '),root_5$o=from_html('
        Arguments:
        '),root_14$5=from_html('
        Arguments:
        \
        '),root_18$3=from_html(''),root_17$4=from_html('
        ',1),root_16$5=from_html('
        '),root_20$7=from_html('
        Waiting for result...
        '),root_13$a=from_html('
        Result:
        ',1),root_23$3=from_html('
        '),root_26$2=from_html('
        '),root_30=from_html('
        '),root_28$1=from_html('
        '),root$$=from_html('
        ');function ChatMessageAgenticContent($$anchor,$$props){push$1($$props,!0);const renderSection=($$anchor2,section=noop$3,index2=noop$3)=>{var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor3=>{var div=root_2$D(),node_1=child(div);{let $0=user_derived(()=>$$props.message?.extra);MarkdownContent(node_1,{get content(){ return section().content},get attachments(){return get$4($0)}})}reset(div),append($$anchor3,div)},alternate_6=$$anchor3=>{var fragment_1=comment$2(),node_2=first_child(fragment_1);{var consequent_4=$$anchor4=>{const streamingIcon=user_derived(()=>(isStreaming(),Loader_circle)),streamingIconClass=user_derived(()=>isStreaming()?"h-4 w-4 animate-spin":"h-4 w-4");{let $0=user_derived(()=>isExpanded(index2(),section())),$1=user_derived(()=>section().toolName||"Tool call"),$2=user_derived(()=>isStreaming()? "":"incomplete");CollapsibleContentBlock($$anchor4,{get open(){return get$4($0)},class:"my-2",get icon(){return get$4(streamingIcon)},get iconClass(){return get$4(streamingIconClass)},get title(){return get$4($1)},get subtitle(){return get$4($2)},get isStreaming(){return isStreaming()},onToggle:()=>toggleExpanded(index2(),section()),children:($$anchor5,$$slotProps)=>{var div_1=root_5$o(),div_2=child(div_1),node_3=sibling(child(div_2),2);{var consequent_1=$$anchor6=>{Loader_circle($$anchor6,{class:"\ h-3 w-3 animate-spin"})};if_block(node_3,$$render=>{isStreaming()&&$$render(consequent_1)})}reset(div_2);var node_4=sibling(div_2,2);{var consequent_2=$$anchor6=>{{let $02=user_derived(()=>formatJsonPretty(section().toolArgs));SyntaxHighlightedCode($$anchor6,{get code(){return get$4($02)},get language(){return FileTypeText.JSON},maxHeight:"20rem",class:"text-xs"})}},alternate_1=$$anchor6=>{var fragment_5=comment$2(),node_5=first_child(fragment_5);{var consequent_3=$$anchor7=>{var div_3=root_9$g(); append($$anchor7,div_3)},alternate=$$anchor7=>{var div_4=root_10$c();append($$anchor7,div_4)};if_block(node_5,$$render=>{isStreaming()?$$render(consequent_3):$$render(alternate,!1)},!0)}append($$anchor6,fragment_5)};if_block(node_4,$$render=>{section().toolArgs?$$render(consequent_2):$$render(alternate_1,!1)})}reset(div_1),append($$anchor5,div_1)},$$slots:{default:!0}})}},alternate_5=$$anchor4=>{var fragment_6=comment$2(),node_6=first_child(fragment_6);{var consequent_10=$$anchor5=>{const isPending=user_derived( ()=>section().type===AgenticSectionType.TOOL_CALL_PENDING),toolIcon=user_derived(()=>get$4(isPending)?Loader_circle:Wrench),toolIconClass=user_derived(()=>get$4(isPending)?"h-4 w-4 animate-spin":"h-4 w-4");{let $0=user_derived(()=>isExpanded(index2(),section())),$1=user_derived(()=>section().toolName||""),$2=user_derived(()=>get$4(isPending)?"executing...":void 0);CollapsibleContentBlock($$anchor5,{get open(){return get$4($0)},class:"my-2",get icon(){return get$4(toolIcon)},get iconClass(){return get$4( toolIconClass)},get title(){return get$4($1)},get subtitle(){return get$4($2)},get isStreaming(){return get$4(isPending)},onToggle:()=>toggleExpanded(index2(),section()),children:($$anchor6,$$slotProps)=>{var fragment_8=root_13$a(),node_7=first_child(fragment_8);{var consequent_5=$$anchor7=>{var div_5=root_14$5(),node_8=sibling(child(div_5),2);{let $02=user_derived(()=>formatJsonPretty(section().toolArgs));SyntaxHighlightedCode(node_8,{get code(){return get$4($02)},get language(){return FileTypeText. JSON},maxHeight:"20rem",class:"text-xs"})}reset(div_5),append($$anchor7,div_5)};if_block(node_7,$$render=>{section().toolArgs&§ion().toolArgs!=="{}"&&$$render(consequent_5)})}var div_6=sibling(node_7,2),div_7=child(div_6),node_9=sibling(child(div_7),2);{var consequent_6=$$anchor7=>{Loader_circle($$anchor7,{class:"h-3 w-3 animate-spin"})};if_block(node_9,$$render=>{get$4(isPending)&&$$render(consequent_6)})}reset(div_7);var node_10=sibling(div_7,2);{var consequent_8=$$anchor7=>{var div_8=root_16$5(); each(div_8,21,()=>section().parsedLines,index$2,($$anchor8,line)=>{var fragment_10=root_17$4(),div_9=first_child(fragment_10),text2=child(div_9,!0);reset(div_9);var node_11=sibling(div_9,2);{var consequent_7=$$anchor9=>{var img=root_18$3();template_effect(()=>{set_attribute(img,"src",get$4(line).image.base64Url),set_attribute(img,"alt",get$4(line).image.name)}),append($$anchor9,img)};if_block(node_11,$$render=>{get$4(line).image&&$$render(consequent_7)})}template_effect(()=>set_text(text2,get$4( line).text)),append($$anchor8,fragment_10)}),reset(div_8),append($$anchor7,div_8)},alternate_2=$$anchor7=>{var fragment_11=comment$2(),node_12=first_child(fragment_11);{var consequent_9=$$anchor8=>{var div_10=root_20$7();append($$anchor8,div_10)};if_block(node_12,$$render=>{get$4(isPending)&&$$render(consequent_9)},!0)}append($$anchor7,fragment_11)};if_block(node_10,$$render=>{section().toolResult?$$render(consequent_8):$$render(alternate_2,!1)})}reset(div_6),append($$anchor6,fragment_8)},$$slots:{ default:!0}})}},alternate_4=$$anchor5=>{var fragment_12=comment$2(),node_13=first_child(fragment_12);{var consequent_11=$$anchor6=>{{let $0=user_derived(()=>isExpanded(index2(),section()));CollapsibleContentBlock($$anchor6,{get open(){return get$4($0)},class:"my-2",get icon(){return Brain},title:"Reasoning",onToggle:()=>toggleExpanded(index2(),section()),children:($$anchor7,$$slotProps)=>{var div_11=root_23$3(),div_12=child(div_11),text_1=child(div_12,!0);reset(div_12),reset(div_11),template_effect( ()=>set_text(text_1,section().content)),append($$anchor7,div_11)},$$slots:{default:!0}})}},alternate_3=$$anchor6=>{var fragment_14=comment$2(),node_14=first_child(fragment_14);{var consequent_12=$$anchor7=>{const reasoningTitle=user_derived(()=>isStreaming()?"Reasoning...":"Reasoning"),reasoningSubtitle=user_derived(()=>isStreaming()?"":"incomplete");{let $0=user_derived(()=>isExpanded(index2(),section()));CollapsibleContentBlock($$anchor7,{get open(){return get$4($0)},class:"my-2",get icon(){return Brain}, get title(){return get$4(reasoningTitle)},get subtitle(){return get$4(reasoningSubtitle)},get isStreaming(){return isStreaming()},onToggle:()=>toggleExpanded(index2(),section()),children:($$anchor8,$$slotProps)=>{var div_13=root_26$2(),div_14=child(div_13),text_2=child(div_14,!0);reset(div_14),reset(div_13),template_effect(()=>set_text(text_2,section().content)),append($$anchor8,div_13)},$$slots:{default:!0}})}};if_block(node_14,$$render=>{section().type===AgenticSectionType.REASONING_PENDING&&$$render( consequent_12)},!0)}append($$anchor6,fragment_14)};if_block(node_13,$$render=>{section().type===AgenticSectionType.REASONING?$$render(consequent_11):$$render(alternate_3,!1)},!0)}append($$anchor5,fragment_12)};if_block(node_6,$$render=>{section().type===AgenticSectionType.TOOL_CALL||section().type===AgenticSectionType.TOOL_CALL_PENDING?$$render(consequent_10):$$render(alternate_4,!1)},!0)}append($$anchor4,fragment_6)};if_block(node_2,$$render=>{section().type===AgenticSectionType.TOOL_CALL_STREAMING? $$render(consequent_4):$$render(alternate_5,!1)},!0)}append($$anchor3,fragment_1)};if_block(node2,$$render=>{section().type===AgenticSectionType.TEXT?$$render(consequent):$$render(alternate_6,!1)})}append($$anchor2,fragment)};let toolMessages=prop($$props,"toolMessages",19,()=>[]),isStreaming=prop($$props,"isStreaming",3,!1),highlightTurns=prop($$props,"highlightTurns",3,!1),expandedStates=proxy({});const showToolCallInProgress=user_derived(()=>config$1().showToolCallInProgress),showThoughtInProgress=user_derived( ()=>config$1().showThoughtInProgress),sections=user_derived(()=>deriveAgenticSections($$props.message,toolMessages(),[],isStreaming())),sectionsParsed=user_derived(()=>get$4(sections).map(section=>({...section,parsedLines:section.toolResult?parseToolResultWithImages(section.toolResult,section.toolResultExtras||$$props.message?.extra):[]}))),turnGroups=user_derived(()=>{const turns=[];let currentTurn=[],currentIndices=[],prevWasTool=!1;for(let i=0;i0&&(turns.push({sections:currentTurn,flatIndices:currentIndices}),currentTurn=[],currentIndices=[]),currentTurn.push(section),currentIndices.push(i),prevWasTool=isTool}return currentTurn.length>0&&turns.push({sections:currentTurn,flatIndices:currentIndices}),turns});function getDefaultExpanded(section){ return section.type===AgenticSectionType.TOOL_CALL_PENDING||section.type===AgenticSectionType.TOOL_CALL_STREAMING?get$4(showToolCallInProgress):section.type===AgenticSectionType.REASONING_PENDING?get$4(showThoughtInProgress):!1}function isExpanded(index2,section){return expandedStates[index2]!==void 0?expandedStates[index2]:getDefaultExpanded(section)}function toggleExpanded(index2,section){const currentState=isExpanded(index2,section);expandedStates[index2]=!currentState}function buildTurnAgenticTimings(stats){ return{turns:1,toolCallsCount:stats.toolCalls.length,toolsMs:stats.toolsMs,toolCalls:stats.toolCalls,llm:stats.llm}}var div_15=root$$(),node_15=child(div_15);{var consequent_14=$$anchor2=>{var fragment_16=comment$2(),node_16=first_child(fragment_16);each(node_16,17,()=>get$4(turnGroups),index$2,($$anchor3,turn,turnIndex)=>{const turnStats=user_derived(()=>$$props.message?.timings?.agentic?.perTurn?.[turnIndex]);var div_16=root_28$1(),span=child(div_16);span.textContent=`Turn ${turnIndex+1}`;var node_17=sibling( span,2);each(node_17,19,()=>get$4(turn).sections,(section,sIdx)=>get$4(turn).flatIndices[sIdx],($$anchor4,section,sIdx)=>{renderSection($$anchor4,()=>get$4(section),()=>get$4(turn).flatIndices[get$4(sIdx)])});var node_18=sibling(node_17,2);{var consequent_13=$$anchor4=>{var div_17=root_30(),node_19=child(div_17);{let $0=user_derived(()=>get$4(turnStats).toolCalls.length>0?buildTurnAgenticTimings(get$4(turnStats)):void 0);ChatMessageStatistics(node_19,{get promptTokens(){return get$4(turnStats).llm. prompt_n},get promptMs(){return get$4(turnStats).llm.prompt_ms},get predictedTokens(){return get$4(turnStats).llm.predicted_n},get predictedMs(){return get$4(turnStats).llm.predicted_ms},get agenticTimings(){return get$4($0)},get initialView(){return ChatMessageStatsView.GENERATION},hideSummary:!0})}reset(div_17),append($$anchor4,div_17)};if_block(node_18,$$render=>{get$4(turnStats)&&$$render(consequent_13)})}reset(div_16),append($$anchor3,div_16)}),append($$anchor2,fragment_16)},alternate_7=$$anchor2=>{ var fragment_18=comment$2(),node_20=first_child(fragment_18);each(node_20,17,()=>get$4(sectionsParsed),index$2,($$anchor3,section,index2)=>{renderSection($$anchor3,()=>get$4(section),()=>index2)}),append($$anchor2,fragment_18)};if_block(node_15,$$render=>{highlightTurns()&&get$4(turnGroups).length>1?$$render(consequent_14):$$render(alternate_7,!1)})}reset(div_15),append($$anchor,div_15),pop()}var root_1$A=from_html('
        ');function Checkbox($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),checked=prop($$props,"checked",15,!1),indeterminate=prop($$props,"indeterminate",15,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","checked","indeterminate","class"]);var fragment=comment$2(),node2=first_child(fragment);{const children=($$anchor2,$$arg0)=>{let checked2=()=>$$arg0?.().checked,indeterminate2=()=>$$arg0?.().indeterminate;var div=root_1$A(),node_1=child(div);{var consequent=$$anchor3=>{ Check($$anchor3,{class:"size-3.5"})},alternate=$$anchor3=>{var fragment_2=comment$2(),node_2=first_child(fragment_2);{var consequent_1=$$anchor4=>{Minus($$anchor4,{class:"size-3.5"})};if_block(node_2,$$render=>{indeterminate2()&&$$render(consequent_1)},!0)}append($$anchor3,fragment_2)};if_block(node_1,$$render=>{checked2()?$$render(consequent):$$render(alternate,!1)})}reset(div),append($$anchor2,div)};let $0=user_derived(()=>cn$1("peer flex size-4 shrink-0 items-center justify-center rounded-[4p\ x] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary",$$props.class));component(node2,()=>Checkbox$1, ($$anchor2,CheckboxPrimitive_Root)=>{CheckboxPrimitive_Root($$anchor2,spread_props({"data-slot":"checkbox",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},get checked(){return checked()},set checked($$value){checked($$value)},get indeterminate(){return indeterminate()},set indeterminate($$value){indeterminate($$value)},children,$$slots:{default:!0}}))})}append($$anchor,fragment),pop()}var root_6$m=from_html('
        Show raw output
        '),root_7$k=from_html('
        '),root$_=from_html('
        ',1);function ChatMessageActions($$anchor,$$props){push$1($$props, !0);let siblingInfo=prop($$props,"siblingInfo",3,null),showDeleteDialog=prop($$props,"showDeleteDialog",7),showRawOutputSwitch=prop($$props,"showRawOutputSwitch",3,!1),rawOutputEnabled=prop($$props,"rawOutputEnabled",3,!1),showForkDialog=state$1(!1),forkName=state$1(""),forkIncludeAttachments=state$1(!0);function handleConfirmDelete(){$$props.onConfirmDelete(),$$props.onShowDeleteDialogChange(!1)}function handleOpenForkDialog(){const conv=activeConversation();set$1(forkName,`Fork of ${conv?.name?? "Conversation"}`),set$1(forkIncludeAttachments,!0),set$1(showForkDialog,!0)}function handleConfirmFork(){$$props.onForkConversation?.({name:get$4(forkName).trim(),includeAttachments:get$4(forkIncludeAttachments)}),set$1(showForkDialog,!1)}var fragment=root$_(),div=first_child(fragment),div_1=child(div),node2=child(div_1);{var consequent=$$anchor2=>{ChatMessageBranchingControls($$anchor2,{get siblingInfo(){return siblingInfo()},get onNavigateToSibling(){return $$props.onNavigateToSibling}})};if_block( node2,$$render=>{siblingInfo()&&siblingInfo().totalSiblings>1&&$$render(consequent)})}var div_2=sibling(node2,2),node_1=child(div_2);ActionIcon(node_1,{get icon(){return Copy},tooltip:"Copy",get onclick(){return $$props.onCopy}});var node_2=sibling(node_1,2);{var consequent_1=$$anchor2=>{ActionIcon($$anchor2,{get icon(){return Square_pen},tooltip:"Edit",get onclick(){return $$props.onEdit}})};if_block(node_2,$$render=>{$$props.onEdit&&$$render(consequent_1)})}var node_3=sibling(node_2,2);{var consequent_2=$$anchor2=>{ ActionIcon($$anchor2,{get icon(){return Refresh_cw},tooltip:"Regenerate",onclick:()=>$$props.onRegenerate()})};if_block(node_3,$$render=>{$$props.role===MessageRole.ASSISTANT&&$$props.onRegenerate&&$$render(consequent_2)})}var node_4=sibling(node_3,2);{var consequent_3=$$anchor2=>{ActionIcon($$anchor2,{get icon(){return Arrow_right},tooltip:"Continue",get onclick(){return $$props.onContinue}})};if_block(node_4,$$render=>{$$props.role===MessageRole.ASSISTANT&&$$props.onContinue&&$$render(consequent_3)})} var node_5=sibling(node_4,2);{var consequent_4=$$anchor2=>{ActionIcon($$anchor2,{get icon(){return Git_branch},tooltip:"Fork conversation",onclick:handleOpenForkDialog})};if_block(node_5,$$render=>{$$props.onForkConversation&&$$render(consequent_4)})}var node_6=sibling(node_5,2);ActionIcon(node_6,{get icon(){return Trash_2},tooltip:"Delete",get onclick(){return $$props.onDelete}}),reset(div_2),reset(div_1);var node_7=sibling(div_1,2);{var consequent_5=$$anchor2=>{var div_3=root_6$m(),node_8=sibling( child(div_3),2);Switch(node_8,{get checked(){return rawOutputEnabled()},onCheckedChange:checked=>$$props.onRawOutputToggle?.(checked)}),reset(div_3),append($$anchor2,div_3)};if_block(node_7,$$render=>{showRawOutputSwitch()&&$$render(consequent_5)})}reset(div);var node_9=sibling(div,2);{let $0=user_derived(()=>$$props.deletionInfo&&$$props.deletionInfo.totalCount>1?`This will delete ${$$props.deletionInfo.totalCount} messages including: ${$$props.deletionInfo.userMessages} user message${$$props.deletionInfo. userMessages>1?"s":""} and ${$$props.deletionInfo.assistantMessages} assistant response${$$props.deletionInfo.assistantMessages>1?"s":""}. All messages in this branch and their responses will be permanently removed. This action cannot be undone.`:"Are you sure you want to delete this message? This action cannot be undone."),$1=user_derived(()=>$$props.deletionInfo&&$$props.deletionInfo.totalCount>1?`Delete ${$$props.deletionInfo.totalCount} Messages`:"Delete");DialogConfirmation(node_9,{title:"D\ elete Message",get description(){return get$4($0)},get confirmText(){return get$4($1)},cancelText:"Cancel",variant:"destructive",get icon(){return Trash_2},onConfirm:handleConfirmDelete,onCancel:()=>$$props.onShowDeleteDialogChange(!1),get open(){return showDeleteDialog()},set open($$value){showDeleteDialog($$value)}})}var node_10=sibling(node_9,2);DialogConfirmation(node_10,{title:"Fork Conversation",description:"Create a new conversation branching from this message.",confirmText:"Fork",cancelText:"\ Cancel",get icon(){return Git_branch},onConfirm:handleConfirmFork,onCancel:()=>set$1(showForkDialog,!1),get open(){return get$4(showForkDialog)},set open($$value){set$1(showForkDialog,$$value,!0)},children:($$anchor2,$$slotProps)=>{var div_4=root_7$k(),div_5=child(div_4),node_11=child(div_5);Label(node_11,{for:"fork-name",children:($$anchor3,$$slotProps2)=>{next$1();var text2=text$8("Title");append($$anchor3,text2)},$$slots:{default:!0}});var node_12=sibling(node_11,2);Input(node_12,{id:"fork-na\ me",class:"text-foreground",placeholder:"Enter fork name",type:"text",get value(){return get$4(forkName)},set value($$value){set$1(forkName,$$value,!0)}}),reset(div_5);var div_6=sibling(div_5,2),node_13=child(div_6);Checkbox(node_13,{id:"fork-attachments",get checked(){return get$4(forkIncludeAttachments)},onCheckedChange:checked=>{set$1(forkIncludeAttachments,checked===!0)}});var node_14=sibling(node_13,2);Label(node_14,{for:"fork-attachments",class:"cursor-pointer text-sm font-normal",children:($$anchor3,$$slotProps2)=>{ next$1();var text_1=text$8("Include all attachments");append($$anchor3,text_1)},$$slots:{default:!0}}),reset(div_6),reset(div_4),append($$anchor2,div_4)},$$slots:{default:!0}}),template_effect(()=>{set_class(div,1,`relative ${$$props.justify==="start"?"mt-2":""} flex h-6 items-center justify-between`),set_class(div_1,1,`${$$props.actionsPosition==="left"?"left-0":"right-0"} flex items-center gap-2 opacity-100 transition-opacity`)}),append($$anchor,fragment),pop()}var root_5$n=from_html("

        Previ\ ous version

        "),root_2$C=from_html(" ",1),root_9$f=from_html("

        Next version

        "),root_6$l=from_html(" ",1),root_1$z=from_html('
        ');function ChatMessageBranchingControls($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),hasPrevious=user_derived(()=>$$props.siblingInfo&&$$props.siblingInfo.currentIndex>0),hasNext=user_derived(()=>$$props.siblingInfo&&$$props.siblingInfo.currentIndex< $$props.siblingInfo.totalSiblings-1),nextSiblingId=user_derived(()=>get$4(hasNext)?$$props.siblingInfo.siblingIds[$$props.siblingInfo.currentIndex+1]:null),previousSiblingId=user_derived(()=>get$4(hasPrevious)?$$props.siblingInfo.siblingIds[$$props.siblingInfo.currentIndex-1]:null);function handleNext(){get$4(nextSiblingId)&&$$props.onNavigateToSibling?.(get$4(nextSiblingId))}function handlePrevious(){get$4(previousSiblingId)&&$$props.onNavigateToSibling?.(get$4(previousSiblingId))}var fragment=comment$2(), node2=first_child(fragment);{var consequent=$$anchor2=>{var div=root_1$z(),node_1=child(div);component(node_1,()=>Root$5,($$anchor3,Tooltip_Root)=>{Tooltip_Root($$anchor3,{children:($$anchor4,$$slotProps)=>{var fragment_1=root_2$C(),node_2=first_child(fragment_1);component(node_2,()=>Tooltip_trigger,($$anchor5,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor5,{children:($$anchor6,$$slotProps2)=>{{let $0=user_derived(()=>get$4(hasPrevious)?"":"cursor-not-allowed opacity-30"),$1=user_derived(()=>!get$4( hasPrevious));Button($$anchor6,{"aria-label":"Previous message version",get class(){return`h-5 w-5 p-0 ${get$4($0)??""}`},get disabled(){return get$4($1)},onclick:handlePrevious,size:"sm",variant:"ghost",children:($$anchor7,$$slotProps3)=>{Chevron_left($$anchor7,{class:"h-3 w-3"})},$$slots:{default:!0}})}},$$slots:{default:!0}})});var node_3=sibling(node_2,2);component(node_3,()=>Tooltip_content,($$anchor5,Tooltip_Content)=>{Tooltip_Content($$anchor5,{children:($$anchor6,$$slotProps2)=>{var p2=root_5$n(); append($$anchor6,p2)},$$slots:{default:!0}})}),append($$anchor4,fragment_1)},$$slots:{default:!0}})});var span=sibling(node_1,2),text2=child(span);reset(span);var node_4=sibling(span,2);component(node_4,()=>Root$5,($$anchor3,Tooltip_Root_1)=>{Tooltip_Root_1($$anchor3,{children:($$anchor4,$$slotProps)=>{var fragment_4=root_6$l(),node_5=first_child(fragment_4);component(node_5,()=>Tooltip_trigger,($$anchor5,Tooltip_Trigger_1)=>{Tooltip_Trigger_1($$anchor5,{children:($$anchor6,$$slotProps2)=>{{let $0=user_derived( ()=>get$4(hasNext)?"":"cursor-not-allowed opacity-30"),$1=user_derived(()=>!get$4(hasNext));Button($$anchor6,{"aria-label":"Next message version",get class(){return`h-5 w-5 p-0 ${get$4($0)??""}`},get disabled(){return get$4($1)},onclick:handleNext,size:"sm",variant:"ghost",children:($$anchor7,$$slotProps3)=>{Chevron_right($$anchor7,{class:"h-3 w-3"})},$$slots:{default:!0}})}},$$slots:{default:!0}})});var node_6=sibling(node_5,2);component(node_6,()=>Tooltip_content,($$anchor5,Tooltip_Content_1)=>{ Tooltip_Content_1($$anchor5,{children:($$anchor6,$$slotProps2)=>{var p_1=root_9$f();append($$anchor6,p_1)},$$slots:{default:!0}})}),append($$anchor4,fragment_4)},$$slots:{default:!0}})}),reset(div),template_effect(()=>{set_attribute(div,"aria-label",`Message version ${$$props.siblingInfo.currentIndex+1} of ${$$props.siblingInfo.totalSiblings??""}`),set_class(div,1,`flex items-center gap-1 text-xs text-muted-foreground ${className()??""}`),set_text(text2,`${$$props.siblingInfo.currentIndex+1}/${$$props. siblingInfo.totalSiblings??""}`)}),append($$anchor2,div)};if_block(node2,$$render=>{$$props.siblingInfo&&$$props.siblingInfo.totalSiblings>1&&$$render(consequent)})}append($$anchor,fragment),pop()}var root_3$w=from_html(''),root_4$j=from_html("

        Reading (prompt processing)

        "),root_2$B=from_html(" ",1),root_6$k=from_html(''),root_7$j=from_html( "

        "),root_5$m=from_html(" ",1),root_10$b=from_html(''),root_11$8=from_html("

        Tool calls

        "),root_9$e=from_html(" ",1),root_14$4=from_html(''),root_15$3=from_html("

        Agentic summary

        "),root_13$9=from_html(" ",1),root_8$h=from_html(" ",1),root_16$4=from_html(" ",1),root_18$2=from_html(" ",1),root_20$6=from_html( " ",1),root_22$4=from_html(" ",1),root$Z=from_html('
        ');function ChatMessageStatistics($$anchor,$$props){push$1($$props,!0);let isLive=prop($$props,"isLive",3,!1),isProcessingPrompt=prop($$props,"isProcessingPrompt",3,!1),initialView=prop($$props,"initialView", 19,()=>ChatMessageStatsView.GENERATION),hideSummary=prop($$props,"hideSummary",3,!1),activeView=user_derived(initialView),hasAutoSwitchedToGeneration=state$1(!1);user_effect(()=>{$$props.onActiveViewChange?.(get$4(activeView))}),user_effect(()=>{isLive()&&(!get$4(hasAutoSwitchedToGeneration)&&!isProcessingPrompt()&&$$props.predictedTokens&&$$props.predictedTokens>0?(set$1(activeView,ChatMessageStatsView.GENERATION),set$1(hasAutoSwitchedToGeneration,!0)):get$4(hasAutoSwitchedToGeneration)||set$1( activeView,ChatMessageStatsView.READING))});let hasGenerationStats=user_derived(()=>$$props.predictedTokens!==void 0&&$$props.predictedTokens>0&&$$props.predictedMs!==void 0&&$$props.predictedMs>0),tokensPerSecond=user_derived(()=>get$4(hasGenerationStats)?$$props.predictedTokens/$$props.predictedMs*MS_PER_SECOND:0),formattedTime=user_derived(()=>$$props.predictedMs!==void 0?formatPerformanceTime($$props.predictedMs):DEFAULT_PERFORMANCE_TIME),promptTokensPerSecond=user_derived(()=>$$props.promptTokens!== void 0&&$$props.promptMs!==void 0&&$$props.promptMs>0?$$props.promptTokens/$$props.promptMs*MS_PER_SECOND:void 0),formattedPromptTime=user_derived(()=>$$props.promptMs!==void 0?formatPerformanceTime($$props.promptMs):void 0),hasPromptStats=user_derived(()=>$$props.promptTokens!==void 0&&$$props.promptMs!==void 0&&get$4(promptTokensPerSecond)!==void 0&&get$4(formattedPromptTime)!==void 0),isGenerationDisabled=user_derived(()=>isLive()&&!get$4(hasGenerationStats)),hasAgenticStats=user_derived(()=>$$props. agenticTimings!==void 0&&$$props.agenticTimings.toolCallsCount>0),agenticToolsPerSecond=user_derived(()=>get$4(hasAgenticStats)&&$$props.agenticTimings.toolsMs>0?$$props.agenticTimings.toolCallsCount/$$props.agenticTimings.toolsMs*MS_PER_SECOND:0),formattedAgenticToolsTime=user_derived(()=>get$4(hasAgenticStats)?formatPerformanceTime($$props.agenticTimings.toolsMs):DEFAULT_PERFORMANCE_TIME),agenticTotalTimeMs=user_derived(()=>get$4(hasAgenticStats)?$$props.agenticTimings.toolsMs+$$props.agenticTimings. llm.predicted_ms+$$props.agenticTimings.llm.prompt_ms:0),formattedAgenticTotalTime=user_derived(()=>formatPerformanceTime(get$4(agenticTotalTimeMs)));var div=root$Z(),div_1=child(div),node2=child(div_1);{var consequent=$$anchor2=>{var fragment=comment$2(),node_1=first_child(fragment);component(node_1,()=>Root$5,($$anchor3,Tooltip_Root)=>{Tooltip_Root($$anchor3,{children:($$anchor4,$$slotProps)=>{var fragment_1=root_2$B(),node_2=first_child(fragment_1);component(node_2,()=>Tooltip_trigger,($$anchor5,Tooltip_Trigger)=>{ Tooltip_Trigger($$anchor5,{children:($$anchor6,$$slotProps2)=>{var button=root_3$w();button.__click=()=>set$1(activeView,ChatMessageStatsView.READING);var node_3=child(button);Book_open_text(node_3,{class:"h-3 w-3"}),next$1(2),reset(button),template_effect(()=>set_class(button,1,`inline-flex h-5 w-5 items-center justify-center rounded-sm transition-colors ${get$4(activeView)===ChatMessageStatsView.READING?"bg-background text-foreground shadow-sm":"hover:text-foreground"}`)),append($$anchor6,button)}, $$slots:{default:!0}})});var node_4=sibling(node_2,2);component(node_4,()=>Tooltip_content,($$anchor5,Tooltip_Content)=>{Tooltip_Content($$anchor5,{children:($$anchor6,$$slotProps2)=>{var p2=root_4$j();append($$anchor6,p2)},$$slots:{default:!0}})}),append($$anchor4,fragment_1)},$$slots:{default:!0}})}),append($$anchor2,fragment)};if_block(node2,$$render=>{(get$4(hasPromptStats)||isLive())&&$$render(consequent)})}var node_5=sibling(node2,2);component(node_5,()=>Root$5,($$anchor2,Tooltip_Root_1)=>{ Tooltip_Root_1($$anchor2,{children:($$anchor3,$$slotProps)=>{var fragment_2=root_5$m(),node_6=first_child(fragment_2);component(node_6,()=>Tooltip_trigger,($$anchor4,Tooltip_Trigger_1)=>{Tooltip_Trigger_1($$anchor4,{children:($$anchor5,$$slotProps2)=>{var button_1=root_6$k();button_1.__click=()=>!get$4(isGenerationDisabled)&&set$1(activeView,ChatMessageStatsView.GENERATION);var node_7=child(button_1);Sparkles(node_7,{class:"h-3 w-3"}),next$1(2),reset(button_1),template_effect(()=>{set_class(button_1, 1,`inline-flex h-5 w-5 items-center justify-center rounded-sm transition-colors ${get$4(activeView)===ChatMessageStatsView.GENERATION?"bg-background text-foreground shadow-sm":get$4(isGenerationDisabled)?"cursor-not-allowed opacity-40":"hover:text-foreground"}`),button_1.disabled=get$4(isGenerationDisabled)}),append($$anchor5,button_1)},$$slots:{default:!0}})});var node_8=sibling(node_6,2);component(node_8,()=>Tooltip_content,($$anchor4,Tooltip_Content_1)=>{Tooltip_Content_1($$anchor4,{children:($$anchor5,$$slotProps2)=>{ var p_1=root_7$j(),text2=child(p_1,!0);reset(p_1),template_effect(()=>set_text(text2,get$4(isGenerationDisabled)?"Generation (waiting for tokens...)":"Generation (token output)")),append($$anchor5,p_1)},$$slots:{default:!0}})}),append($$anchor3,fragment_2)},$$slots:{default:!0}})});var node_9=sibling(node_5,2);{var consequent_2=$$anchor2=>{var fragment_3=root_8$h(),node_10=first_child(fragment_3);component(node_10,()=>Root$5,($$anchor3,Tooltip_Root_2)=>{Tooltip_Root_2($$anchor3,{children:($$anchor4,$$slotProps)=>{ var fragment_4=root_9$e(),node_11=first_child(fragment_4);component(node_11,()=>Tooltip_trigger,($$anchor5,Tooltip_Trigger_2)=>{Tooltip_Trigger_2($$anchor5,{children:($$anchor6,$$slotProps2)=>{var button_2=root_10$b();button_2.__click=()=>set$1(activeView,ChatMessageStatsView.TOOLS);var node_12=child(button_2);Wrench(node_12,{class:"h-3 w-3"}),next$1(2),reset(button_2),template_effect(()=>set_class(button_2,1,`inline-flex h-5 w-5 items-center justify-center rounded-sm transition-colors ${get$4(activeView)=== ChatMessageStatsView.TOOLS?"bg-background text-foreground shadow-sm":"hover:text-foreground"}`)),append($$anchor6,button_2)},$$slots:{default:!0}})});var node_13=sibling(node_11,2);component(node_13,()=>Tooltip_content,($$anchor5,Tooltip_Content_2)=>{Tooltip_Content_2($$anchor5,{children:($$anchor6,$$slotProps2)=>{var p_2=root_11$8();append($$anchor6,p_2)},$$slots:{default:!0}})}),append($$anchor4,fragment_4)},$$slots:{default:!0}})});var node_14=sibling(node_10,2);{var consequent_1=$$anchor3=>{ var fragment_5=comment$2(),node_15=first_child(fragment_5);component(node_15,()=>Root$5,($$anchor4,Tooltip_Root_3)=>{Tooltip_Root_3($$anchor4,{children:($$anchor5,$$slotProps)=>{var fragment_6=root_13$9(),node_16=first_child(fragment_6);component(node_16,()=>Tooltip_trigger,($$anchor6,Tooltip_Trigger_3)=>{Tooltip_Trigger_3($$anchor6,{children:($$anchor7,$$slotProps2)=>{var button_3=root_14$4();button_3.__click=()=>set$1(activeView,ChatMessageStatsView.SUMMARY);var node_17=child(button_3);Layers( node_17,{class:"h-3 w-3"}),next$1(2),reset(button_3),template_effect(()=>set_class(button_3,1,`inline-flex h-5 w-5 items-center justify-center rounded-sm transition-colors ${get$4(activeView)===ChatMessageStatsView.SUMMARY?"bg-background text-foreground shadow-sm":"hover:text-foreground"}`)),append($$anchor7,button_3)},$$slots:{default:!0}})});var node_18=sibling(node_16,2);component(node_18,()=>Tooltip_content,($$anchor6,Tooltip_Content_3)=>{Tooltip_Content_3($$anchor6,{children:($$anchor7,$$slotProps2)=>{ var p_3=root_15$3();append($$anchor7,p_3)},$$slots:{default:!0}})}),append($$anchor5,fragment_6)},$$slots:{default:!0}})}),append($$anchor3,fragment_5)};if_block(node_14,$$render=>{hideSummary()||$$render(consequent_1)})}append($$anchor2,fragment_3)};if_block(node_9,$$render=>{get$4(hasAgenticStats)&&$$render(consequent_2)})}reset(div_1);var div_2=sibling(div_1,2),node_19=child(div_2);{var consequent_3=$$anchor2=>{var fragment_7=root_16$4(),node_20=first_child(fragment_7);{let $0=user_derived(()=>$$props. predictedTokens?.toLocaleString());BadgeChatStatistic(node_20,{class:"bg-transparent",get icon(){return Whole_word},get value(){return`${get$4($0)??""} tokens`},tooltipLabel:"Generated tokens"})}var node_21=sibling(node_20,2);BadgeChatStatistic(node_21,{class:"bg-transparent",get icon(){return Clock},get value(){return get$4(formattedTime)},tooltipLabel:"Generation time"});var node_22=sibling(node_21,2);{let $0=user_derived(()=>get$4(tokensPerSecond).toFixed(2));BadgeChatStatistic(node_22,{class:"\ bg-transparent",get icon(){return Gauge},get value(){return`${get$4($0)??""} t/s`},tooltipLabel:"Generation speed"})}append($$anchor2,fragment_7)},alternate_2=$$anchor2=>{var fragment_8=comment$2(),node_23=first_child(fragment_8);{var consequent_4=$$anchor3=>{var fragment_9=root_18$2(),node_24=first_child(fragment_9);BadgeChatStatistic(node_24,{class:"bg-transparent",get icon(){return Wrench},get value(){return`${$$props.agenticTimings.toolCallsCount??""} calls`},tooltipLabel:"Tool calls execute\ d"});var node_25=sibling(node_24,2);BadgeChatStatistic(node_25,{class:"bg-transparent",get icon(){return Clock},get value(){return get$4(formattedAgenticToolsTime)},tooltipLabel:"Tool execution time"});var node_26=sibling(node_25,2);{let $0=user_derived(()=>get$4(agenticToolsPerSecond).toFixed(2));BadgeChatStatistic(node_26,{class:"bg-transparent",get icon(){return Gauge},get value(){return`${get$4($0)??""} calls/s`},tooltipLabel:"Tool execution rate"})}append($$anchor3,fragment_9)},alternate_1=$$anchor3=>{ var fragment_10=comment$2(),node_27=first_child(fragment_10);{var consequent_5=$$anchor4=>{var fragment_11=root_20$6(),node_28=first_child(fragment_11);BadgeChatStatistic(node_28,{class:"bg-transparent",get icon(){return Layers},get value(){return`${$$props.agenticTimings.turns??""} turns`},tooltipLabel:"Agentic turns (LLM calls)"});var node_29=sibling(node_28,2);{let $0=user_derived(()=>$$props.agenticTimings.llm.predicted_n.toLocaleString());BadgeChatStatistic(node_29,{class:"bg-transparent",get icon(){ return Whole_word},get value(){return`${get$4($0)??""} tokens`},tooltipLabel:"Total tokens generated"})}var node_30=sibling(node_29,2);BadgeChatStatistic(node_30,{class:"bg-transparent",get icon(){return Clock},get value(){return get$4(formattedAgenticTotalTime)},tooltipLabel:"Total time (LLM + tools)"}),append($$anchor4,fragment_11)},alternate=$$anchor4=>{var fragment_12=comment$2(),node_31=first_child(fragment_12);{var consequent_6=$$anchor5=>{var fragment_13=root_22$4(),node_32=first_child(fragment_13); BadgeChatStatistic(node_32,{class:"bg-transparent",get icon(){return Whole_word},get value(){return`${$$props.promptTokens??""} tokens`},tooltipLabel:"Prompt tokens"});var node_33=sibling(node_32,2);{let $0=user_derived(()=>get$4(formattedPromptTime)??"0s");BadgeChatStatistic(node_33,{class:"bg-transparent",get icon(){return Clock},get value(){return get$4($0)},tooltipLabel:"Prompt processing time"})}var node_34=sibling(node_33,2);{let $0=user_derived(()=>get$4(promptTokensPerSecond).toFixed(2)); BadgeChatStatistic(node_34,{class:"bg-transparent",get icon(){return Gauge},get value(){return`${get$4($0)??""} tokens/s`},tooltipLabel:"Prompt processing speed"})}append($$anchor5,fragment_13)};if_block(node_31,$$render=>{get$4(hasPromptStats)&&$$render(consequent_6)},!0)}append($$anchor4,fragment_12)};if_block(node_27,$$render=>{get$4(activeView)===ChatMessageStatsView.SUMMARY&&get$4(hasAgenticStats)?$$render(consequent_5):$$render(alternate,!1)},!0)}append($$anchor3,fragment_10)};if_block(node_23, $$render=>{get$4(activeView)===ChatMessageStatsView.TOOLS&&get$4(hasAgenticStats)?$$render(consequent_4):$$render(alternate_1,!1)},!0)}append($$anchor2,fragment_8)};if_block(node_19,$$render=>{get$4(activeView)===ChatMessageStatsView.GENERATION&&get$4(hasGenerationStats)?$$render(consequent_3):$$render(alternate_2,!1)})}reset(div_2),reset(div),append($$anchor,div),pop()}delegate(["click"]);var root_3$v=from_html('
        '),root_2$A=from_html(" ",1),root$Y=from_html( '
        ');function ChatMessageMcpPrompt($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),siblingInfo=prop($$props,"siblingInfo",3,null);const editCtx=getMessageEditContext();var div=root$Y(),node2=child(div);{var consequent=$$anchor2=>{ChatMessageEditForm($$anchor2,{})},alternate=$$anchor2=>{var fragment_1=root_2$A(),node_1=first_child(fragment_1);ChatMessageMcpPromptContent(node_1,{get prompt(){return $$props. mcpPrompt},get variant(){return McpPromptVariant.MESSAGE},class:"w-full max-w-[80%]"});var node_2=sibling(node_1,2);{var consequent_1=$$anchor3=>{var div_1=root_3$v(),node_3=child(div_1);ChatMessageActions(node_3,{actionsPosition:"right",get deletionInfo(){return $$props.deletionInfo},justify:"end",get onConfirmDelete(){return $$props.onConfirmDelete},get onCopy(){return $$props.onCopy},get onDelete(){return $$props.onDelete},get onEdit(){return $$props.onEdit},get onNavigateToSibling(){return $$props. onNavigateToSibling},get onShowDeleteDialogChange(){return $$props.onShowDeleteDialogChange},get siblingInfo(){return siblingInfo()},get showDeleteDialog(){return $$props.showDeleteDialog},get role(){return MessageRole.USER}}),reset(div_1),append($$anchor3,div_1)};if_block(node_2,$$render=>{$$props.message.timestamp&&$$render(consequent_1)})}append($$anchor2,fragment_1)};if_block(node2,$$render=>{editCtx.isEditing?$$render(consequent):$$render(alternate,!1)})}reset(div),template_effect(()=>set_class( div,1,`group flex flex-col items-end gap-3 md:gap-2 ${className()??""}`)),append($$anchor,div),pop()}var root$X=from_html("
        ");function Card($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$X();attribute_effect(div,$0=>({"data-slot":"card",class:$0,...restProps}),[()=>cn$1("flex flex-col gap-6 rounded-xl bg-card py-6 text-card-foreground shadow-sm",BOX_BORDER, $$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}var root_1$y=from_html(''),root_4$i=from_html(''),root_8$g=from_html('
        '),root_3$u=from_html('
        Conversation NameMessages
        '), root$W=from_html('
        ');function ConversationSelection($$anchor,$$props){push$1($$props,!0);let messageCountMap=prop($$props,"messageCountMap",19,()=>new Map),searchQuery=state$1(""),selectedIds=state$1(getInitialSelectedIds()), lastClickedId=state$1(null);function getInitialSelectedIds(){return new SvelteSet($$props.conversations.map(c2=>c2.id))}let filteredConversations=user_derived(()=>$$props.conversations.filter(conv=>(conv.name||"Untitled conversation").toLowerCase().includes(get$4(searchQuery).toLowerCase()))),allSelected=user_derived(()=>get$4(filteredConversations).length>0&&get$4(filteredConversations).every(conv=>get$4(selectedIds).has(conv.id))),someSelected=user_derived(()=>get$4(filteredConversations).some( conv=>get$4(selectedIds).has(conv.id))&&!get$4(allSelected));function toggleConversation(id2,shiftKey=!1){const newSet=new SvelteSet(get$4(selectedIds));if(shiftKey&&get$4(lastClickedId)!==null){const lastIndex=get$4(filteredConversations).findIndex(c2=>c2.id===get$4(lastClickedId)),currentIndex=get$4(filteredConversations).findIndex(c2=>c2.id===id2);if(lastIndex!==-1&¤tIndex!==-1){const start2=Math.min(lastIndex,currentIndex),end=Math.max(lastIndex,currentIndex),shouldSelect=!newSet.has(id2); for(let i=start2;i<=end;i++)shouldSelect?newSet.add(get$4(filteredConversations)[i].id):newSet.delete(get$4(filteredConversations)[i].id);set$1(selectedIds,newSet);return}}newSet.has(id2)?newSet.delete(id2):newSet.add(id2),set$1(selectedIds,newSet),set$1(lastClickedId,id2,!0)}function toggleAll(){if(get$4(allSelected)){const newSet=new SvelteSet(get$4(selectedIds));get$4(filteredConversations).forEach(conv=>newSet.delete(conv.id)),set$1(selectedIds,newSet)}else{const newSet=new SvelteSet(get$4(selectedIds)); get$4(filteredConversations).forEach(conv=>newSet.add(conv.id)),set$1(selectedIds,newSet)}}function handleConfirm(){const selected=$$props.conversations.filter(conv=>get$4(selectedIds).has(conv.id));$$props.onConfirm(selected)}function handleCancel(){set$1(selectedIds,getInitialSelectedIds()),set$1(searchQuery,""),set$1(lastClickedId,null),$$props.onCancel()}function reset$1(){set$1(selectedIds,getInitialSelectedIds()),set$1(searchQuery,""),set$1(lastClickedId,null)}var $$exports={reset:reset$1}, div=root$W(),div_1=child(div),node2=child(div_1);Search(node2,{class:"absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 text-muted-foreground"});var node_1=sibling(node2,2);Input(node_1,{placeholder:"Search conversations...",class:"pr-9 pl-9",get value(){return get$4(searchQuery)},set value($$value){set$1(searchQuery,$$value,!0)}});var node_2=sibling(node_1,2);{var consequent=$$anchor2=>{var button=root_1$y();button.__click=()=>set$1(searchQuery,"");var node_3=child(button);X(node_3,{class:"h-4 w\ -4"}),reset(button),append($$anchor2,button)};if_block(node_2,$$render=>{get$4(searchQuery)&&$$render(consequent)})}reset(div_1);var div_2=sibling(div_1,2),span=child(div_2),text2=child(span),node_4=sibling(text2);{var consequent_1=$$anchor2=>{var text_1=text$8();template_effect(()=>set_text(text_1,`(${get$4(filteredConversations).length??""} shown)`)),append($$anchor2,text_1)};if_block(node_4,$$render=>{get$4(searchQuery)&&$$render(consequent_1)})}reset(span),reset(div_2);var div_3=sibling(div_2, 2),node_5=child(div_3);Scroll_area(node_5,{class:"h-[400px]",children:($$anchor2,$$slotProps)=>{var table2=root_3$u(),thead2=child(table2),tr2=child(thead2),th=child(tr2),node_6=child(th);Checkbox(node_6,{get checked(){return get$4(allSelected)},get indeterminate(){return get$4(someSelected)},onCheckedChange:toggleAll}),reset(th),next$1(2),reset(tr2),reset(thead2);var tbody2=sibling(thead2),node_7=child(tbody2);{var consequent_3=$$anchor3=>{var tr_1=root_4$i(),td=child(tr_1),node_8=child(td);{var consequent_2=$$anchor4=>{ var text_2=text$8();template_effect(()=>set_text(text_2,`No conversations found matching "${get$4(searchQuery)??""}"`)),append($$anchor4,text_2)},alternate=$$anchor4=>{var text_3=text$8("No conversations available");append($$anchor4,text_3)};if_block(node_8,$$render=>{get$4(searchQuery)?$$render(consequent_2):$$render(alternate,!1)})}reset(td),reset(tr_1),append($$anchor3,tr_1)},alternate_1=$$anchor3=>{var fragment_2=comment$2(),node_9=first_child(fragment_2);each(node_9,17,()=>get$4(filteredConversations), conv=>conv.id,($$anchor4,conv)=>{var tr_2=root_8$g();tr_2.__click=e=>toggleConversation(get$4(conv).id,e.shiftKey);var td_1=child(tr_2),node_10=child(td_1);{let $0=user_derived(()=>get$4(selectedIds).has(get$4(conv).id));Checkbox(node_10,{get checked(){return get$4($0)},onclick:e=>{e.preventDefault(),e.stopPropagation(),toggleConversation(get$4(conv).id,e.shiftKey)}})}reset(td_1);var td_2=sibling(td_1),div_4=child(td_2),text_4=child(div_4,!0);reset(div_4),reset(td_2);var td_3=sibling(td_2),text_5=child( td_3,!0);reset(td_3),reset(tr_2),template_effect($0=>{set_attribute(div_4,"title",get$4(conv).name||"Untitled conversation"),set_text(text_4,get$4(conv).name||"Untitled conversation"),set_text(text_5,$0)},[()=>messageCountMap().get(get$4(conv).id)??0]),append($$anchor4,tr_2)}),append($$anchor3,fragment_2)};if_block(node_7,$$render=>{get$4(filteredConversations).length===0?$$render(consequent_3):$$render(alternate_1,!1)})}reset(tbody2),reset(table2),append($$anchor2,table2)},$$slots:{default:!0}}), reset(div_3);var div_5=sibling(div_3,2),node_11=child(div_5);Button(node_11,{variant:"outline",onclick:handleCancel,children:($$anchor2,$$slotProps)=>{next$1();var text_6=text$8("Cancel");append($$anchor2,text_6)},$$slots:{default:!0}});var node_12=sibling(node_11,2);{let $0=user_derived(()=>get$4(selectedIds).size===0);Button(node_12,{onclick:handleConfirm,get disabled(){return get$4($0)},children:($$anchor2,$$slotProps)=>{next$1();var text_7=text$8();template_effect(()=>set_text(text_7,`${$$props. mode==="export"?"Export":"Import"} (${get$4(selectedIds).size??""})`)),append($$anchor2,text_7)},$$slots:{default:!0}})}return reset(div_5),reset(div),template_effect(()=>set_text(text2,`${get$4(selectedIds).size??""} of ${$$props.conversations.length??""} selected `)),append($$anchor,div),pop($$exports)}delegate(["click"]);var root$V=from_html('
        ');function HorizontalScrollCarousel($$anchor,$$props){ push$1($$props,!0);let className=prop($$props,"class",3,""),gapSize=prop($$props,"gapSize",3,"3"),canScrollLeft=state$1(!1),canScrollRight=state$1(!1),scrollContainer=state$1(void 0);function scrollLeft(event2){event2?.stopPropagation(),event2?.preventDefault(),get$4(scrollContainer)&&get$4(scrollContainer).scrollBy({left:get$4(scrollContainer).clientWidth*-.67,behavior:"smooth"})}function scrollRight(event2){event2?.stopPropagation(),event2?.preventDefault(),get$4(scrollContainer)&&get$4(scrollContainer). scrollBy({left:get$4(scrollContainer).clientWidth*.67,behavior:"smooth"})}function updateScrollButtons(){if(!get$4(scrollContainer))return;const{scrollLeft:scrollLeft2,scrollWidth,clientWidth}=get$4(scrollContainer);set$1(canScrollLeft,scrollLeft2>0),set$1(canScrollRight,scrollLeft2clientWidth;$$props.onScrollableChange?.(isScrollable)}function resetScroll(){get$4(scrollContainer)&&(get$4(scrollContainer).scrollLeft=0,setTimeout(()=>{updateScrollButtons()}, 0))}user_effect(()=>{get$4(scrollContainer)&&setTimeout(()=>{updateScrollButtons()},0)});var $$exports={resetScroll},div=root$V(),button=child(div);button.__click=scrollLeft;var node2=child(button);Chevron_left(node2,{class:"h-4 w-4"}),reset(button);var div_1=sibling(button,2),node_1=child(div_1);snippet(node_1,()=>$$props.children??noop$3),reset(div_1),bind_this(div_1,$$value=>set$1(scrollContainer,$$value),()=>get$4(scrollContainer));var button_1=sibling(div_1,2);button_1.__click=scrollRight;var node_2=child( button_1);return Chevron_right(node_2,{class:"h-4 w-4"}),reset(button_1),reset(div),template_effect(()=>{set_class(div,1,`relative ${className()??""}`),set_class(button,1,`absolute top-1/2 left-4 z-10 flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded-full bg-foreground/15 shadow-md backdrop-blur-xs transition-opacity hover:bg-foreground/35 ${get$4(canScrollLeft)?"opacity-100":"pointer-events-none opacity-0"}`),set_class(div_1,1,`scrollbar-hide flex items-start gap-${gapSize()??""}\ overflow-x-auto`),set_class(button_1,1,`absolute top-1/2 right-4 z-10 flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded-full bg-foreground/15 shadow-md backdrop-blur-xs transition-opacity hover:bg-foreground/35 ${get$4(canScrollRight)?"opacity-100":"pointer-events-none opacity-0"}`)}),event("scroll",div_1,updateScrollButtons),append($$anchor,div),pop($$exports)}delegate(["click"]);var root_3$t=from_html(' '),root_4$h=from_html("

        "),root_2$z=from_html( " ",1),root_5$l=from_html(" ");function TruncatedText($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),showTooltip=prop($$props,"showTooltip",3,!0),textElement=state$1(void 0),isTruncated=state$1(!1);function checkTruncation(){get$4(textElement)&&set$1(isTruncated,get$4(textElement).scrollWidth>get$4(textElement).clientWidth)}user_effect(()=>{if(get$4(textElement)){checkTruncation();const observer=new ResizeObserver(checkTruncation);return observer. observe(get$4(textElement)),()=>observer.disconnect()}});var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Root$5,($$anchor3,Tooltip_Root)=>{Tooltip_Root($$anchor3,{children:($$anchor4,$$slotProps)=>{var fragment_2=root_2$z(),node_2=first_child(fragment_2);component(node_2,()=>Tooltip_trigger,($$anchor5,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor5,{get class(){return className()},children:($$anchor6,$$slotProps2)=>{ var span=root_3$t(),text_1=child(span,!0);reset(span),bind_this(span,$$value=>set$1(textElement,$$value),()=>get$4(textElement)),template_effect(()=>set_text(text_1,$$props.text)),append($$anchor6,span)},$$slots:{default:!0}})});var node_3=sibling(node_2,2);component(node_3,()=>Tooltip_content,($$anchor5,Tooltip_Content)=>{Tooltip_Content($$anchor5,{class:"z-[9999]",children:($$anchor6,$$slotProps2)=>{var p2=root_4$h(),text_2=child(p2,!0);reset(p2),template_effect(()=>set_text(text_2,$$props.text)), append($$anchor6,p2)},$$slots:{default:!0}})}),append($$anchor4,fragment_2)},$$slots:{default:!0}})}),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var span_1=root_5$l(),text_3=child(span_1,!0);reset(span_1),bind_this(span_1,$$value=>set$1(textElement,$$value),()=>get$4(textElement)),template_effect(()=>{set_class(span_1,1,`${className()??""} block truncate`),set_text(text_3,$$props.text)}),append($$anchor2,span_1)};if_block(node2,$$render=>{get$4(isTruncated)&&showTooltip()?$$render(consequent): $$render(alternate,!1)})}append($$anchor,fragment),pop()}var root_4$g=from_html(""),root_6$j=from_html(""),root_1$x=from_html(" ",1),root$U=from_html("");function KeyboardShortcutInfo($$anchor,$$props){push$1($$props,!0);let variant=prop($$props,"variant",3,"default"),className=prop($$props,"class",3,""),variantClasses=user_derived(()=>variant()==="destructive"?"text-destructive":"text-muted-foreground");var kbd=root$U();each(kbd,21,()=>$$props.keys, index$2,($$anchor2,key2,index2)=>{var fragment=root_1$x(),node2=first_child(fragment);{var consequent=$$anchor3=>{{let $0=user_derived(()=>variant()==="destructive"?"text-destructive":"");Arrow_big_up($$anchor3,{get class(){return`h-1 w-1 ${get$4($0)??""} -mr-1`}})}},alternate_1=$$anchor3=>{var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent_1=$$anchor4=>{var span=root_4$g();template_effect(()=>set_class(span,1,clsx(variant()==="destructive"?"text-destructive":""))),append( $$anchor4,span)},alternate=$$anchor4=>{var text2=text$8();template_effect($0=>set_text(text2,$0),[()=>get$4(key2).toUpperCase()]),append($$anchor4,text2)};if_block(node_1,$$render=>{get$4(key2)==="cmd"?$$render(consequent_1):$$render(alternate,!1)},!0)}append($$anchor3,fragment_2)};if_block(node2,$$render=>{get$4(key2)==="shift"?$$render(consequent):$$render(alternate_1,!1)})}var node_2=sibling(node2,2);{var consequent_2=$$anchor3=>{var span_1=root_6$j();append($$anchor3,span_1)};if_block(node_2, $$render=>{index2<$$props.keys.length-1&&$$render(consequent_2)})}append($$anchor2,fragment)}),reset(kbd),template_effect(()=>set_class(kbd,1,`px-1 pointer-events-none inline-flex select-none items-center gap-0.5 font-sans text-md font-medium opacity-0 transition-opacity -my-1 ${get$4(variantClasses)??""} ${className()??""}`)),append($$anchor,kbd),pop()}var root_3$s=from_html(''),root_4$f=from_html(" "),root_1$w=from_html(" ", 1),root_8$f=from_html(" "),root_9$d=from_html(' '),root_7$i=from_html(" ",1),root_5$k=from_html('
        '),root_11$7=from_html("
        "),root_14$3=from_html('
        '),root_19$1=from_html(" "),root_20$5=from_html(" "),root_17$3=from_html("
        "),root$T=from_html('
        ');function ChatMessageMcpPromptContent($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),variant=prop($$props,"variant", 19,()=>McpPromptVariant.MESSAGE),isLoading2=prop($$props,"isLoading",3,!1),hoveredArgKey=state$1(null),argumentEntries=user_derived(()=>Object.entries($$props.prompt.arguments??{})),hasArguments=user_derived(()=>$$props.prompt.arguments&&Object.keys($$props.prompt.arguments).length>0),hasContent=user_derived(()=>$$props.prompt.content&&$$props.prompt.content.trim().length>0),contentParts=user_derived(()=>{if(!$$props.prompt.content||!get$4(hasArguments))return[{text:$$props.prompt.content||"",argKey:null}]; const parts=[];let remaining=$$props.prompt.content;const valueToKey=new SvelteMap;for(const[key2,value]of get$4(argumentEntries))value&&value.trim()&&valueToKey.set(value,key2);const sortedValues=[...valueToKey.keys()].sort((a,b)=>b.length-a.length);for(;remaining.length>0;){let earliestMatch=null;for(const value of sortedValues){const index2=remaining.indexOf(value);index2!==-1&&(earliestMatch===null||index20&&parts.push({text:remaining.slice(0,earliestMatch.index),argKey:null}),parts.push({text:earliestMatch.value,argKey:earliestMatch.key}),remaining=remaining.slice(earliestMatch.index+earliestMatch.value.length);else{parts.push({text:remaining,argKey:null});break}}return parts}),showArgBadges=user_derived(()=>get$4(hasArguments)&&!isLoading2()&&!$$props.loadError),isAttachment=user_derived(()=>variant()===McpPromptVariant.ATTACHMENT),textSizeClass=user_derived(()=>get$4(isAttachment)? "text-xs":"text-md"),paddingClass=user_derived(()=>get$4(isAttachment)?"px-3 py-2":"px-3.75 py-2.5"),maxHeightStyle=user_derived(()=>get$4(isAttachment)?"max-height: 6rem;":"max-height: var(--max-message-height);");const serverFavicon=user_derived(()=>mcpStore.getServerFavicon($$props.prompt.serverName)),serverDisplayName=user_derived(()=>mcpStore.getServerDisplayName($$props.prompt.serverName));var div=root$T(),div_1=child(div),div_2=child(div_1),node2=child(div_2);component(node2,()=>Root$5,($$anchor2,Tooltip_Root)=>{ Tooltip_Root($$anchor2,{children:($$anchor3,$$slotProps)=>{var fragment=root_1$w(),node_1=first_child(fragment);component(node_1,()=>Tooltip_trigger,($$anchor4,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_1=comment$2(),node_2=first_child(fragment_1);{var consequent=$$anchor6=>{var img=root_3$s();template_effect(()=>set_attribute(img,"src",get$4(serverFavicon))),event("error",img,e=>{e.currentTarget.style.display="none"}),replay_events(img),append( $$anchor6,img)};if_block(node_2,$$render=>{get$4(serverFavicon)&&$$render(consequent)})}append($$anchor5,fragment_1)},$$slots:{default:!0}})});var node_3=sibling(node_1,2);component(node_3,()=>Tooltip_content,($$anchor4,Tooltip_Content)=>{Tooltip_Content($$anchor4,{children:($$anchor5,$$slotProps2)=>{var span=root_4$f(),text2=child(span,!0);reset(span),template_effect(()=>set_text(text2,get$4(serverDisplayName))),append($$anchor5,span)},$$slots:{default:!0}})}),append($$anchor3,fragment)},$$slots:{ default:!0}})});var node_4=sibling(node2,2);TruncatedText(node_4,{get text(){return $$props.prompt.name}}),reset(div_2);var node_5=sibling(div_2,2);{var consequent_1=$$anchor2=>{var div_3=root_5$k();each(div_3,21,()=>get$4(argumentEntries),([key2,value])=>key2,($$anchor3,$$item)=>{var $$array=user_derived(()=>to_array(get$4($$item),2));let key2=()=>get$4($$array)[0],value=()=>get$4($$array)[1];var fragment_2=comment$2(),node_6=first_child(fragment_2);component(node_6,()=>Root$5,($$anchor4,Tooltip_Root_1)=>{ Tooltip_Root_1($$anchor4,{children:($$anchor5,$$slotProps)=>{var fragment_3=root_7$i(),node_7=first_child(fragment_3);component(node_7,()=>Tooltip_trigger,($$anchor6,Tooltip_Trigger_1)=>{Tooltip_Trigger_1($$anchor6,{children:($$anchor7,$$slotProps2)=>{var span_1=root_8$f(),text_1=child(span_1,!0);reset(span_1),template_effect(()=>{set_class(span_1,1,`rounded-sm bg-purple-200/60 px-1.5 py-0.5 text-[10px] leading-none text-purple-700 transition-opacity dark:bg-purple-800/40 dark:text-purple-300 ${get$4( hoveredArgKey)&&get$4(hoveredArgKey)!==key2()?"opacity-30":""}`),set_text(text_1,key2())}),event("mouseenter",span_1,()=>set$1(hoveredArgKey,key2(),!0)),event("mouseleave",span_1,()=>set$1(hoveredArgKey,null)),append($$anchor7,span_1)},$$slots:{default:!0}})});var node_8=sibling(node_7,2);component(node_8,()=>Tooltip_content,($$anchor6,Tooltip_Content_1)=>{Tooltip_Content_1($$anchor6,{children:($$anchor7,$$slotProps2)=>{var span_2=root_9$d(),text_2=child(span_2,!0);reset(span_2),template_effect( ()=>set_text(text_2,value())),append($$anchor7,span_2)},$$slots:{default:!0}})}),append($$anchor5,fragment_3)},$$slots:{default:!0}})}),append($$anchor3,fragment_2)}),reset(div_3),append($$anchor2,div_3)};if_block(node_5,$$render=>{get$4(showArgBadges)&&$$render(consequent_1)})}reset(div_1);var node_9=sibling(div_1,2);{var consequent_2=$$anchor2=>{Card($$anchor2,{class:"relative overflow-hidden rounded-[1.125rem] border border-destructive/50 bg-destructive/10 backdrop-blur-md",children:($$anchor3,$$slotProps)=>{ var div_4=root_11$7(),span_3=child(div_4),text_3=child(span_3,!0);reset(span_3),reset(div_4),template_effect(()=>{set_class(div_4,1,`overflow-y-auto ${get$4(paddingClass)??""}`),set_style(div_4,`${get$4(maxHeightStyle)??""} overflow-wrap: anywhere; word-break: break-word;`),set_class(span_3,1,`${get$4(textSizeClass)??""} text-destructive`),set_text(text_3,$$props.loadError)}),append($$anchor3,div_4)},$$slots:{default:!0}})},alternate_2=$$anchor2=>{var fragment_5=comment$2(),node_10=first_child(fragment_5); {var consequent_3=$$anchor3=>{Card($$anchor3,{class:"relative overflow-hidden rounded-[1.125rem] border border-purple-200 bg-purple-500/10 px-1 py-2 backdrop-blur-md dark:border-purple-800 dark:bg-purple-500/20",children:($$anchor4,$$slotProps)=>{var div_5=root_14$3();template_effect(()=>{set_class(div_5,1,`overflow-y-auto ${get$4(paddingClass)??""}`),set_style(div_5,`${get$4(maxHeightStyle)??""} overflow-wrap: anywhere; word-break: break-word;`)}),append($$anchor4,div_5)},$$slots:{default:!0}})}, alternate_1=$$anchor3=>{var fragment_7=comment$2(),node_11=first_child(fragment_7);{var consequent_5=$$anchor4=>{Card($$anchor4,{class:"relative overflow-hidden rounded-[1.125rem] border border-purple-200 bg-purple-500/10 py-0 text-foreground backdrop-blur-md dark:border-purple-800 dark:bg-purple-500/20",children:($$anchor5,$$slotProps)=>{var div_6=root_17$3(),span_4=child(div_6);each(span_4,21,()=>get$4(contentParts),index$2,($$anchor6,part)=>{var fragment_9=comment$2(),node_12=first_child(fragment_9); {var consequent_4=$$anchor7=>{var span_5=root_19$1(),text_4=child(span_5,!0);reset(span_5),template_effect(()=>{set_class(span_5,1,`rounded-sm bg-purple-300/50 px-0.5 text-purple-900 transition-opacity dark:bg-purple-700/50 dark:text-purple-100 ${get$4(hoveredArgKey)&&get$4(hoveredArgKey)!==get$4(part).argKey?"opacity-30":""}`),set_text(text_4,get$4(part).text)}),event("mouseenter",span_5,()=>set$1(hoveredArgKey,get$4(part).argKey,!0)),event("mouseleave",span_5,()=>set$1(hoveredArgKey,null)),append( $$anchor7,span_5)},alternate=$$anchor7=>{var span_6=root_20$5(),text_5=child(span_6,!0);reset(span_6),template_effect(()=>{set_class(span_6,1,`transition-opacity ${get$4(hoveredArgKey)?"opacity-30":""}`),set_text(text_5,get$4(part).text)}),append($$anchor7,span_6)};if_block(node_12,$$render=>{get$4(part).argKey?$$render(consequent_4):$$render(alternate,!1)})}append($$anchor6,fragment_9)}),reset(span_4),reset(div_6),template_effect(()=>{set_class(div_6,1,`overflow-y-auto ${get$4(paddingClass)??""}`), set_style(div_6,`${get$4(maxHeightStyle)??""} overflow-wrap: anywhere; word-break: break-word;`),set_class(span_4,1,`${get$4(textSizeClass)??""} whitespace-pre-wrap`)}),append($$anchor5,div_6)},$$slots:{default:!0}})};if_block(node_11,$$render=>{get$4(hasContent)&&$$render(consequent_5)},!0)}append($$anchor3,fragment_7)};if_block(node_10,$$render=>{isLoading2()?$$render(consequent_3):$$render(alternate_1,!1)},!0)}append($$anchor2,fragment_5)};if_block(node_9,$$render=>{$$props.loadError?$$render( consequent_2):$$render(alternate_2,!1)})}reset(div),template_effect(()=>set_class(div,1,`flex flex-col gap-2 ${className()??""}`)),append($$anchor,div),pop()}var root_2$y=from_html(" Cancel",1),root_3$r=from_html(" Save",1),root_1$v=from_html('
        '),root_7$h=from_html("
        "),root_8$e=from_html(" "),root_9$c=from_html('
        ',1),root_11$6=from_html('
        '),root_6$i=from_html("
        ",1),root_5$j=from_html('
        '),root_13$8=from_html( '
        '),root_4$e=from_html(" ",1),root$S=from_html('
        ');function ChatMessageSystem($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),siblingInfo=prop($$props,"siblingInfo",3,null),textareaElement=prop($$props,"textareaElement",15);const editCtx=getMessageEditContext();function handleEditKeydown(event2){event2.key===KeyboardKey.ENTER&&!event2.shiftKey&&!isIMEComposing( event2)?(event2.preventDefault(),editCtx.save()):event2.key===KeyboardKey.ESCAPE&&(event2.preventDefault(),editCtx.cancel())}let isMultiline=state$1(!1),messageElement=state$1(void 0),isExpanded=state$1(!1),contentHeight=state$1(0);const MAX_HEIGHT=200,currentConfig=config$1();let showExpandButton=user_derived(()=>get$4(contentHeight)>MAX_HEIGHT);user_effect(()=>{if(!get$4(messageElement)||!$$props.message.content.trim())return;$$props.message.content.includes(` `)&&set$1(isMultiline,!0);const resizeObserver=new ResizeObserver(entries=>{for(const entry of entries){const element2=entry.target;set$1(isMultiline,element2.offsetHeight>24*1.5),set$1(contentHeight,element2.scrollHeight,!0)}});return resizeObserver.observe(get$4(messageElement)),()=>{resizeObserver.disconnect()}});function toggleExpand(){set$1(isExpanded,!get$4(isExpanded))}var div=root$S(),node2=child(div);{var consequent=$$anchor2=>{var div_1=root_1$v(),textarea=child(div_1);remove_textarea_child( textarea),textarea.__keydown=handleEditKeydown,textarea.__input=e=>editCtx.setContent(e.currentTarget.value),bind_this(textarea,$$value=>textareaElement($$value),()=>textareaElement());var div_2=sibling(textarea,2),node_1=child(div_2);Button(node_1,{class:"h-8 px-3",get onclick(){return editCtx.cancel},size:"sm",variant:"outline",children:($$anchor3,$$slotProps)=>{var fragment=root_2$y(),node_2=first_child(fragment);X(node_2,{class:"mr-1 h-3 w-3"}),next$1(),append($$anchor3,fragment)},$$slots:{default:!0}}); var node_3=sibling(node_1,2);{let $0=user_derived(()=>!editCtx.editedContent.trim());Button(node_3,{class:"h-8 px-3",get onclick(){return editCtx.save},get disabled(){return get$4($0)},size:"sm",children:($$anchor3,$$slotProps)=>{var fragment_1=root_3$r(),node_4=first_child(fragment_1);Check(node_4,{class:"mr-1 h-3 w-3"}),next$1(),append($$anchor3,fragment_1)},$$slots:{default:!0}})}reset(div_2),reset(div_1),template_effect(()=>{set_value(textarea,editCtx.editedContent),set_class(textarea,1,`min\ -h-[60px] w-full resize-none rounded-2xl px-3 py-2 text-sm ${INPUT_CLASSES??""}`)}),append($$anchor2,div_1)},alternate_1=$$anchor2=>{var fragment_2=root_4$e(),node_5=first_child(fragment_2);{var consequent_4=$$anchor3=>{var div_3=root_5$j(),button=child(div_3);button.__click=function(...$$args){(get$4(showExpandButton)&&!get$4(isExpanded)?toggleExpand:void 0)?.apply(this,$$args)};var node_6=child(button);{let $0=user_derived(()=>get$4(isMultiline)?"":void 0);Card(node_6,{class:"overflow-y-auto r\ ounded-[1.125rem] !border-2 !border-dashed !border-border/50 bg-muted px-3.75 py-1.5 data-[multiline]:py-2.5",get"data-multiline"(){return get$4($0)},style:"border: 2px dashed hsl(var(--border)); max-height: var(--max-message-height); overflow-wrap: anywhere; word-break: break-word;",children:($$anchor4,$$slotProps)=>{var fragment_3=root_6$i(),div_4=first_child(fragment_3),node_7=child(div_4);{var consequent_1=$$anchor5=>{var div_5=root_7$h(),node_8=child(div_5);MarkdownContent(node_8,{class:"ma\ rkdown-system-content -my-4",get content(){return $$props.message.content}}),reset(div_5),bind_this(div_5,$$value=>set$1(messageElement,$$value),()=>get$4(messageElement)),template_effect(()=>set_class(div_5,1,clsx(get$4(isExpanded)?"cursor-text":""))),append($$anchor5,div_5)},alternate=$$anchor5=>{var span=root_8$e(),text2=child(span,!0);reset(span),bind_this(span,$$value=>set$1(messageElement,$$value),()=>get$4(messageElement)),template_effect(()=>{set_class(span,1,`text-md whitespace-pre-wrap\ ${get$4(isExpanded)?"cursor-text":""}`),set_text(text2,$$props.message.content)}),append($$anchor5,span)};if_block(node_7,$$render=>{currentConfig.renderUserContentAsMarkdown?$$render(consequent_1):$$render(alternate,!1)})}var node_9=sibling(node_7,2);{var consequent_2=$$anchor5=>{var fragment_4=root_9$c(),div_6=sibling(first_child(fragment_4),2),node_10=child(div_6);Button(node_10,{class:"rounded-full px-4 py-1.5 text-xs shadow-md",size:"sm",variant:"outline",children:($$anchor6,$$slotProps2)=>{ next$1();var text_1=text$8("Show full system message");append($$anchor6,text_1)},$$slots:{default:!0}}),reset(div_6),append($$anchor5,fragment_4)};if_block(node_9,$$render=>{!get$4(isExpanded)&&get$4(showExpandButton)&&$$render(consequent_2)})}reset(div_4);var node_11=sibling(div_4,2);{var consequent_3=$$anchor5=>{var div_7=root_11$6(),node_12=child(div_7);Button(node_12,{class:"rounded-full px-4 py-1.5 text-xs",onclick:e=>{e.stopPropagation(),toggleExpand()},size:"sm",variant:"outline",children:($$anchor6,$$slotProps2)=>{ next$1();var text_2=text$8("Collapse System Message");append($$anchor6,text_2)},$$slots:{default:!0}}),reset(div_7),append($$anchor5,div_7)};if_block(node_11,$$render=>{get$4(isExpanded)&&get$4(showExpandButton)&&$$render(consequent_3)})}template_effect(()=>{set_class(div_4,1,`relative transition-all duration-300 ${get$4(isExpanded)?"cursor-text select-text":"select-none"}`),set_style(div_4,!get$4(isExpanded)&&get$4(showExpandButton)?`max-height: ${MAX_HEIGHT}px;`:"max-height: none;")}),append($$anchor4, fragment_3)},$$slots:{default:!0}})}reset(button),reset(div_3),template_effect(()=>set_class(button,1,`group/expand w-full text-left ${!get$4(isExpanded)&&get$4(showExpandButton)?"cursor-pointer":"cursor-auto"}`)),append($$anchor3,div_3)};if_block(node_5,$$render=>{$$props.message.content.trim()&&$$render(consequent_4)})}var node_13=sibling(node_5,2);{var consequent_5=$$anchor3=>{var div_8=root_13$8(),node_14=child(div_8);ChatMessageActions(node_14,{actionsPosition:"right",get deletionInfo(){return $$props. deletionInfo},justify:"end",get onConfirmDelete(){return $$props.onConfirmDelete},get onCopy(){return $$props.onCopy},get onDelete(){return $$props.onDelete},get onEdit(){return $$props.onEdit},get onNavigateToSibling(){return $$props.onNavigateToSibling},get onShowDeleteDialogChange(){return $$props.onShowDeleteDialogChange},get siblingInfo(){return siblingInfo()},get showDeleteDialog(){return $$props.showDeleteDialog},get role(){return MessageRole.USER}}),reset(div_8),append($$anchor3,div_8)}; if_block(node_13,$$render=>{$$props.message.timestamp&&$$render(consequent_5)})}append($$anchor2,fragment_2)};if_block(node2,$$render=>{editCtx.isEditing?$$render(consequent):$$render(alternate_1,!1)})}reset(div),template_effect(()=>set_class(div,1,`group flex flex-col items-end gap-3 md:gap-2 ${className()??""}`)),append($$anchor,div),pop()}delegate(["keydown","input","click"]);var root_1$u=from_html('
        '),root_2$x=from_html("
        "),root_3$q=from_html(" Cancel",1),root$R=from_html('
        ',1);function ChatMessageEditForm($$anchor,$$props){push$1($$props,!0);const editCtx=getMessageEditContext();let inputAreaRef=state$1(void 0),saveWithoutRegenerate=state$1(!1),showDiscardDialog=state$1( !1),hasUnsavedChanges=user_derived(()=>!!(editCtx.editedContent!==editCtx.originalContent||editCtx.editedUploadedFiles.length>0||editCtx.editedExtras.length!==editCtx.originalExtras.length||editCtx.editedExtras.some((extra,i)=>extra!==editCtx.originalExtras[i]))),hasAttachments=user_derived(()=>editCtx.editedExtras&&editCtx.editedExtras.length>0||editCtx.editedUploadedFiles&&editCtx.editedUploadedFiles.length>0),canSubmit=user_derived(()=>editCtx.editedContent.trim().length>0||get$4(hasAttachments)); function handleGlobalKeydown(event2){event2.key===KeyboardKey.ESCAPE&&(event2.preventDefault(),attemptCancel())}function attemptCancel(){get$4(hasUnsavedChanges)?set$1(showDiscardDialog,!0):editCtx.cancel()}function handleSubmit(){get$4(canSubmit)&&(get$4(saveWithoutRegenerate)&&editCtx.showSaveOnlyOption?editCtx.saveOnly():editCtx.save(),set$1(saveWithoutRegenerate,!1))}function handleAttachmentRemove(index2){const newExtras=[...editCtx.editedExtras];newExtras.splice(index2,1),editCtx.setExtras( newExtras)}function handleUploadedFileRemove(fileId){const newFiles=editCtx.editedUploadedFiles.filter(f=>f.id!==fileId);editCtx.setUploadedFiles(newFiles)}async function handleFilesAdd(files){const processed=await processFilesToChatUploaded(files);editCtx.setUploadedFiles([...editCtx.editedUploadedFiles,...processed])}function handleUploadedFilesChange(files){editCtx.setUploadedFiles(files)}user_effect(()=>(chatStore.setEditModeActive(handleFilesAdd),()=>{chatStore.clearEditMode()}));var fragment=root$R(); event("keydown",$window,handleGlobalKeydown);var div=first_child(fragment),node2=child(div);bind_this(ChatForm(node2,{get value(){return editCtx.editedContent},get attachments(){return editCtx.editedExtras},get uploadedFiles(){return editCtx.editedUploadedFiles},placeholder:"Edit your message...",showMcpPromptButton:!0,get onValueChange(){return editCtx.setContent},onAttachmentRemove:handleAttachmentRemove,onUploadedFileRemove:handleUploadedFileRemove,onUploadedFilesChange:handleUploadedFilesChange, onFilesAdd:handleFilesAdd,onSubmit:handleSubmit}),$$value=>set$1(inputAreaRef,$$value,!0),()=>get$4(inputAreaRef)),reset(div);var div_1=sibling(div,2),node_1=child(div_1);{var consequent=$$anchor2=>{var div_2=root_1$u(),node_2=child(div_2);Switch(node_2,{id:"save-only-switch",class:"scale-75",get checked(){return get$4(saveWithoutRegenerate)},set checked($$value){set$1(saveWithoutRegenerate,$$value,!0)}}),next$1(2),reset(div_2),append($$anchor2,div_2)},alternate=$$anchor2=>{var div_3=root_2$x(); append($$anchor2,div_3)};if_block(node_1,$$render=>{editCtx.showSaveOnlyOption?$$render(consequent):$$render(alternate,!1)})}var node_3=sibling(node_1,2);Button(node_3,{class:"h-7 px-3 text-xs",onclick:attemptCancel,size:"sm",variant:"ghost",children:($$anchor2,$$slotProps)=>{var fragment_1=root_3$q(),node_4=first_child(fragment_1);X(node_4,{class:"mr-1 h-3 w-3"}),next$1(),append($$anchor2,fragment_1)},$$slots:{default:!0}}),reset(div_1);var node_5=sibling(div_1,2);DialogConfirmation(node_5,{title:"\ Discard changes?",description:"You have unsaved changes. Are you sure you want to discard them?",confirmText:"Discard",cancelText:"Keep editing",variant:"destructive",get icon(){return Triangle_alert},get onConfirm(){return editCtx.cancel},onCancel:()=>set$1(showDiscardDialog,!1),get open(){return get$4(showDiscardDialog)},set open($$value){set$1(showDiscardDialog,$$value,!0)}}),append($$anchor,fragment),pop()}var root_3$p=from_html('
        '),root_6$h=from_html("\
        "),root_7$g=from_html(' '),root_8$d=from_html('
        '),root_2$w=from_html(" ",1),root$Q=from_html('
        ');function ChatMessageUser($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),siblingInfo=prop($$props,"siblingInfo",3,null);const editCtx=getMessageEditContext();let isMultiline=state$1(!1),messageElement=state$1( void 0);const currentConfig=config$1();user_effect(()=>{if(!get$4(messageElement)||!$$props.message.content.trim())return;if($$props.message.content.includes(` `)){set$1(isMultiline,!0);return}const resizeObserver=new ResizeObserver(entries=>{for(const entry of entries){const element2=entry.target;set$1(isMultiline,element2.offsetHeight>24*1.5)}});return resizeObserver.observe(get$4(messageElement)),()=>{resizeObserver.disconnect()}});var div=root$Q(),node2=child(div);{var consequent=$$anchor2=>{ChatMessageEditForm($$anchor2,{})},alternate_1=$$anchor2=>{var fragment_1=root_2$w(),node_1=first_child(fragment_1);{var consequent_1=$$anchor3=>{var div_1=root_3$p(), node_2=child(div_1);ChatAttachmentsList(node_2,{get attachments(){return $$props.message.extra},readonly:!0,imageHeight:"h-80"}),reset(div_1),append($$anchor3,div_1)};if_block(node_1,$$render=>{$$props.message.extra&&$$props.message.extra.length>0&&$$render(consequent_1)})}var node_3=sibling(node_1,2);{var consequent_3=$$anchor3=>{{let $0=user_derived(()=>get$4(isMultiline)?"":void 0);Card($$anchor3,{class:"max-w-[80%] overflow-y-auto rounded-[1.125rem] border-none bg-primary/5 px-3.75 py-1.5 te\ xt-foreground backdrop-blur-md data-[multiline]:py-2.5 dark:bg-primary/15",get"data-multiline"(){return get$4($0)},style:"max-height: var(--max-message-height); overflow-wrap: anywhere; word-break: break-word;",children:($$anchor4,$$slotProps)=>{var fragment_3=comment$2(),node_4=first_child(fragment_3);{var consequent_2=$$anchor5=>{var div_2=root_6$h(),node_5=child(div_2);MarkdownContent(node_5,{class:"markdown-user-content -my-4",get content(){return $$props.message.content}}),reset(div_2),bind_this( div_2,$$value=>set$1(messageElement,$$value),()=>get$4(messageElement)),append($$anchor5,div_2)},alternate=$$anchor5=>{var span=root_7$g(),text2=child(span,!0);reset(span),bind_this(span,$$value=>set$1(messageElement,$$value),()=>get$4(messageElement)),template_effect(()=>set_text(text2,$$props.message.content)),append($$anchor5,span)};if_block(node_4,$$render=>{currentConfig.renderUserContentAsMarkdown?$$render(consequent_2):$$render(alternate,!1)})}append($$anchor4,fragment_3)},$$slots:{default:!0}})}}; if_block(node_3,$$render=>{$$props.message.content.trim()&&$$render(consequent_3)})}var node_6=sibling(node_3,2);{var consequent_4=$$anchor3=>{var div_3=root_8$d(),node_7=child(div_3);ChatMessageActions(node_7,{actionsPosition:"right",get deletionInfo(){return $$props.deletionInfo},justify:"end",get onConfirmDelete(){return $$props.onConfirmDelete},get onCopy(){return $$props.onCopy},get onDelete(){return $$props.onDelete},get onEdit(){return $$props.onEdit},get onForkConversation(){return $$props. onForkConversation},get onNavigateToSibling(){return $$props.onNavigateToSibling},get onShowDeleteDialogChange(){return $$props.onShowDeleteDialogChange},get siblingInfo(){return siblingInfo()},get showDeleteDialog(){return $$props.showDeleteDialog},get role(){return MessageRole.USER}}),reset(div_3),append($$anchor3,div_3)};if_block(node_6,$$render=>{$$props.message.timestamp&&$$render(consequent_4)})}append($$anchor2,fragment_1)};if_block(node2,$$render=>{editCtx.isEditing?$$render(consequent): $$render(alternate_1,!1)})}reset(div),template_effect(()=>set_class(div,1,`group flex flex-col items-end gap-3 md:gap-2 ${className()??""}`)),append($$anchor,div),pop()}function useProcessingState(){let isMonitoring=state$1(!1),lastKnownState=state$1(null),lastKnownProcessingStats=state$1(null);const processingState=user_derived(()=>get$4(isMonitoring)?activeProcessingState():get$4(lastKnownState));user_effect(()=>{get$4(processingState)&&get$4(isMonitoring)&&set$1(lastKnownState,get$4(processingState), !0)}),user_effect(()=>{if(get$4(processingState)?.promptProgress){const{processed,total,time_ms,cache:cache2}=get$4(processingState).promptProgress,actualProcessed=processed-cache2,actualTotal=total-cache2;if(actualProcessed>0&&time_ms>0){const tokensPerSecond=actualProcessed/(time_ms/1e3);set$1(lastKnownProcessingStats,{tokensProcessed:actualProcessed,totalTokens:actualTotal,timeMs:time_ms,tokensPerSecond},!0)}}});function getETASecs(done,total,elapsedMs){const elapsedSecs=elapsedMs/1e3;return done=== 0||elapsedSecs<.5?void 0:elapsedSecs*(total/done-1)}function startMonitoring(){get$4(isMonitoring)||set$1(isMonitoring,!0)}function stopMonitoring(){if(!get$4(isMonitoring))return;set$1(isMonitoring,!1),config$1().keepStatsVisible||(set$1(lastKnownState,null),set$1(lastKnownProcessingStats,null))}function getProcessingMessage(){if(!get$4(processingState))return"Processing...";switch(get$4(processingState).status){case"initializing":return"Initializing...";case"preparing":return get$4(processingState). progressPercent!==void 0?`Processing (${get$4(processingState).progressPercent}%)`:"Preparing response...";case"generating":return"";default:return"Processing..."}}function getProcessingDetails(){const stateToUse=get$4(processingState)||get$4(lastKnownState);if(!stateToUse)return[];const details=[];if(stateToUse.promptProgress){const{processed,total,time_ms,cache:cache2}=stateToUse.promptProgress,actualProcessed=processed-cache2,actualTotal=total-cache2;if(actualProcessed 0){const percent=Math.round(actualProcessed/actualTotal*100),eta=getETASecs(actualProcessed,actualTotal,time_ms);if(eta!==void 0){const etaSecs=Math.ceil(eta);details.push(`Processing ${percent}% (ETA: ${etaSecs}s)`)}else details.push(`Processing ${percent}%`)}}if(typeof stateToUse.contextTotal=="number"&&stateToUse.contextUsed>=0&&stateToUse.contextTotal>0){const contextPercent=Math.round(stateToUse.contextUsed/stateToUse.contextTotal*100);details.push(`Context: ${stateToUse.contextUsed}/${stateToUse. contextTotal} (${contextPercent}%)`)}if(stateToUse.outputTokensUsed>0)if(stateToUse.outputTokensMax<=0)details.push(`Output: ${stateToUse.outputTokensUsed}/∞`);else{const outputPercent=Math.round(stateToUse.outputTokensUsed/stateToUse.outputTokensMax*100);details.push(`Output: ${stateToUse.outputTokensUsed}/${stateToUse.outputTokensMax} (${outputPercent}%)`)}return stateToUse.tokensPerSecond&&stateToUse.tokensPerSecond>0&&details.push(`${stateToUse.tokensPerSecond.toFixed(1)} ${STATS_UNITS.TOKENS_PER_SECOND}`), stateToUse.speculative&&details.push("Speculative decoding enabled"),details}function getTechnicalDetails(){const stateToUse=get$4(processingState)||get$4(lastKnownState);if(!stateToUse)return[];const details=[];if(typeof stateToUse.contextTotal=="number"&&stateToUse.contextUsed>=0&&stateToUse.contextTotal>0){const contextPercent=Math.round(stateToUse.contextUsed/stateToUse.contextTotal*100);details.push(`Context: ${stateToUse.contextUsed}/${stateToUse.contextTotal} (${contextPercent}%)`)}if(stateToUse. outputTokensUsed>0)if(stateToUse.outputTokensMax<=0)details.push(`Output: ${stateToUse.outputTokensUsed}/∞`);else{const outputPercent=Math.round(stateToUse.outputTokensUsed/stateToUse.outputTokensMax*100);details.push(`Output: ${stateToUse.outputTokensUsed}/${stateToUse.outputTokensMax} (${outputPercent}%)`)}return stateToUse.tokensPerSecond&&stateToUse.tokensPerSecond>0&&details.push(`${stateToUse.tokensPerSecond.toFixed(1)} ${STATS_UNITS.TOKENS_PER_SECOND}`),stateToUse.speculative&&details.push( "Speculative decoding enabled"),details}function shouldShowDetails(){return get$4(processingState)!==null&&get$4(processingState).status!=="idle"}function getPromptProgressText(){if(!get$4(processingState)?.promptProgress)return null;const{processed,total,cache:cache2}=get$4(processingState).promptProgress,actualProcessed=processed-cache2,actualTotal=total-cache2,percent=Math.round(actualProcessed/actualTotal*100),eta=getETASecs(actualProcessed,actualTotal,get$4(processingState).promptProgress.time_ms); if(eta!==void 0){const etaSecs=Math.ceil(eta);return`Processing ${percent}% (ETA: ${etaSecs}s)`}return`Processing ${percent}%`}function getLiveProcessingStats(){if(get$4(processingState)?.promptProgress){const{processed,total,time_ms,cache:cache2}=get$4(processingState).promptProgress,actualProcessed=processed-cache2,actualTotal=total-cache2;if(actualProcessed>0&&time_ms>0){const tokensPerSecond=actualProcessed/(time_ms/1e3);return{tokensProcessed:actualProcessed,totalTokens:actualTotal,timeMs:time_ms, tokensPerSecond}}}return get$4(lastKnownProcessingStats)}function getLiveGenerationStats(){if(!get$4(processingState))return null;const{tokensDecoded,tokensPerSecond}=get$4(processingState);if(tokensDecoded<=0)return null;const timeMs=tokensPerSecond&&tokensPerSecond>0?tokensDecoded/tokensPerSecond*1e3:0;return{tokensGenerated:tokensDecoded,timeMs,tokensPerSecond:tokensPerSecond||0}}return{get processingState(){return get$4(processingState)},getProcessingDetails,getTechnicalDetails,getProcessingMessage, getPromptProgressText,getLiveProcessingStats,getLiveGenerationStats,shouldShowDetails,startMonitoring,stopMonitoring}}var root_1$t=from_html('
        '),root_4$d=from_html(" Cancel",1),root_5$i=from_html(" Save",1),root_2$v=from_html('
        '),root_8$c=from_html('
         
        '),root_10$a=from_html('
        '),root_11$5=from_html('
        '),root_12$6=from_html('
        '),root$P=from_html('
        ');function ChatMessageAssistant($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),isLastAssistantMessage=prop($$props,"isLastAssistantMessage",3,!1),toolMessages=prop($$props,"toolMessages",19,()=>[]),siblingInfo=prop($$props,"siblingInfo",3,null), textareaElement=prop($$props,"textareaElement",15);const editCtx=getMessageEditContext();let shouldBranchAfterEdit=state$1(!1);function handleEditKeydown(event2){event2.key===KeyboardKey.ENTER&&!event2.shiftKey&&!isIMEComposing(event2)?(event2.preventDefault(),editCtx.save()):event2.key===KeyboardKey.ESCAPE&&(event2.preventDefault(),editCtx.cancel())}const isAgentic=user_derived(()=>hasAgenticContent($$props.message,toolMessages())),hasReasoning=user_derived(()=>!!$$props.message.reasoningContent), processingState=useProcessingState();let currentConfig=user_derived(config$1),isRouter=user_derived(isRouterMode),showRawOutput=state$1(!1),activeStatsView=state$1(proxy(ChatMessageStatsView.GENERATION)),statsContainerEl=state$1(void 0);function getScrollParent(el){let parent=el.parentElement;for(;parent;){const style2=getComputedStyle(parent);if(/(auto|scroll)/.test(style2.overflowY))return parent;parent=parent.parentElement}return null}async function handleStatsViewChange(view){const el=get$4( statsContainerEl);if(!el){set$1(activeStatsView,view,!0);return}const scrollParent=getScrollParent(el);if(!scrollParent){set$1(activeStatsView,view,!0);return}const yBefore=el.getBoundingClientRect().top;set$1(activeStatsView,view,!0),await tick();const delta=el.getBoundingClientRect().top-yBefore;delta!==0&&(scrollParent.scrollTop+=delta),requestAnimationFrame(()=>{const drift=el.getBoundingClientRect().top-yBefore;Math.abs(drift)>1&&(scrollParent.scrollTop+=drift)})}let highlightAgenticTurns=user_derived( ()=>get$4(isAgentic)&&(get$4(currentConfig).alwaysShowAgenticTurns||get$4(activeStatsView)===ChatMessageStatsView.SUMMARY)),displayedModel=user_derived(()=>$$props.message.model??null),isCurrentlyLoading=user_derived(isLoading),isStreaming=user_derived(isChatStreaming),hasNoContent=user_derived(()=>!$$props.message?.content?.trim()),isActivelyProcessing=user_derived(()=>get$4(isCurrentlyLoading)||get$4(isStreaming)),showProcessingInfoTop=user_derived(()=>$$props.message?.role===MessageRole.ASSISTANT&& get$4(isActivelyProcessing)&&get$4(hasNoContent)&&!get$4(isAgentic)&&isLastAssistantMessage()),showProcessingInfoBottom=user_derived(()=>$$props.message?.role===MessageRole.ASSISTANT&&get$4(isActivelyProcessing)&&(!get$4(hasNoContent)||get$4(isAgentic))&&isLastAssistantMessage());function handleCopyModel(){copyToClipboard(get$4(displayedModel)??"")}user_effect(()=>{editCtx.isEditing&&textareaElement()&&autoResizeTextarea(textareaElement())}),user_effect(()=>{(get$4(showProcessingInfoTop)||get$4( showProcessingInfoBottom))&&processingState.startMonitoring()});var div=root$P(),node2=child(div);{var consequent=$$anchor2=>{var div_1=root_1$t(),div_2=child(div_1),span=child(div_2),text2=child(span,!0);reset(span),reset(div_2),reset(div_1),template_effect($0=>set_text(text2,$0),[()=>processingState.getPromptProgressText()??processingState.getProcessingMessage()??"Processing..."]),transition(1,div_1,()=>fade),append($$anchor2,div_1)};if_block(node2,$$render=>{get$4(showProcessingInfoTop)&&$$render( consequent)})}var node_1=sibling(node2,2);{var consequent_1=$$anchor2=>{var div_3=root_2$v(),textarea=child(div_3);remove_textarea_child(textarea),textarea.__keydown=handleEditKeydown,textarea.__input=e=>{autoResizeTextarea(e.currentTarget),editCtx.setContent(e.currentTarget.value)},bind_this(textarea,$$value=>textareaElement($$value),()=>textareaElement());var div_4=sibling(textarea,2),div_5=child(div_4),node_2=child(div_5);Checkbox(node_2,{id:"branch-after-edit",onCheckedChange:checked=>set$1( shouldBranchAfterEdit,checked===!0),get checked(){return get$4(shouldBranchAfterEdit)},set checked($$value){set$1(shouldBranchAfterEdit,$$value,!0)}});var node_3=sibling(node_2,2);Label(node_3,{for:"branch-after-edit",class:"cursor-pointer text-sm text-muted-foreground",children:($$anchor3,$$slotProps)=>{next$1();var text_1=text$8("Branch conversation after edit");append($$anchor3,text_1)},$$slots:{default:!0}}),reset(div_5);var div_6=sibling(div_5,2),node_4=child(div_6);Button(node_4,{class:"h-\ 8 px-3",get onclick(){return editCtx.cancel},size:"sm",variant:"outline",children:($$anchor3,$$slotProps)=>{var fragment=root_4$d(),node_5=first_child(fragment);X(node_5,{class:"mr-1 h-3 w-3"}),next$1(),append($$anchor3,fragment)},$$slots:{default:!0}});var node_6=sibling(node_4,2);{let $0=user_derived(()=>!editCtx.editedContent?.trim());Button(node_6,{class:"h-8 px-3",get onclick(){return editCtx.save},get disabled(){return get$4($0)},size:"sm",children:($$anchor3,$$slotProps)=>{var fragment_1=root_5$i(), node_7=first_child(fragment_1);Check(node_7,{class:"mr-1 h-3 w-3"}),next$1(),append($$anchor3,fragment_1)},$$slots:{default:!0}})}reset(div_6),reset(div_4),reset(div_3),template_effect(()=>{set_value(textarea,editCtx.editedContent),set_class(textarea,1,`min-h-[50vh] w-full resize-y rounded-2xl px-3 py-2 text-sm ${INPUT_CLASSES??""}`,"svelte-14103tf")}),append($$anchor2,div_3)},alternate_2=$$anchor2=>{var fragment_2=comment$2(),node_8=first_child(fragment_2);{var consequent_3=$$anchor3=>{var fragment_3=comment$2(), node_9=first_child(fragment_3);{var consequent_2=$$anchor4=>{var pre=root_8$c(),text_2=child(pre,!0);reset(pre),template_effect(()=>set_text(text_2,$$props.messageContent||"")),append($$anchor4,pre)},alternate=$$anchor4=>{{let $0=user_derived(isChatStreaming);ChatMessageAgenticContent($$anchor4,{get message(){return $$props.message},get toolMessages(){return toolMessages()},get isStreaming(){return get$4($0)},get highlightTurns(){return get$4(highlightAgenticTurns)}})}};if_block(node_9,$$render=>{ get$4(showRawOutput)?$$render(consequent_2):$$render(alternate,!1)})}append($$anchor3,fragment_3)},alternate_1=$$anchor3=>{var div_7=root_10$a(),text_3=child(div_7,!0);reset(div_7),template_effect(()=>set_text(text_3,$$props.messageContent)),append($$anchor3,div_7)};if_block(node_8,$$render=>{$$props.message.role===MessageRole.ASSISTANT?$$render(consequent_3):$$render(alternate_1,!1)},!0)}append($$anchor2,fragment_2)};if_block(node_1,$$render=>{editCtx.isEditing?$$render(consequent_1):$$render(alternate_2, !1)})}var node_10=sibling(node_1,2);{var consequent_4=$$anchor2=>{var div_8=root_11$5(),div_9=child(div_8),span_1=child(div_9),text_4=child(span_1,!0);reset(span_1),reset(div_9),reset(div_8),template_effect($0=>set_text(text_4,$0),[()=>processingState.getPromptProgressText()??processingState.getProcessingMessage()??"Processing..."]),transition(1,div_8,()=>fade),append($$anchor2,div_8)};if_block(node_10,$$render=>{get$4(showProcessingInfoBottom)&&$$render(consequent_4)})}var div_10=sibling(node_10, 2),node_11=child(div_10);{var consequent_9=$$anchor2=>{var div_11=root_12$6(),node_12=child(div_11);{var consequent_5=$$anchor3=>{{let $0=user_derived(isLoading);ModelsSelector($$anchor3,{get currentModel(){return get$4(displayedModel)},get disabled(){return get$4($0)},onModelChange:async(modelId,modelName)=>(modelsStore.getModelStatus(modelId)!==ServerModelStatus.LOADED&&await modelsStore.loadModel(modelId),$$props.onRegenerate(modelName),!0)})}},alternate_3=$$anchor3=>{{let $0=user_derived(()=>get$4( displayedModel)||void 0);ModelBadge($$anchor3,{get model(){return get$4($0)},onclick:handleCopyModel})}};if_block(node_12,$$render=>{get$4(isRouter)?$$render(consequent_5):$$render(alternate_3,!1)})}var node_13=sibling(node_12,2);{var consequent_6=$$anchor3=>{const agentic=user_derived(()=>$$props.message.timings.agentic);{let $0=user_derived(()=>get$4(agentic)?get$4(agentic).llm.prompt_n:$$props.message.timings.prompt_n),$1=user_derived(()=>get$4(agentic)?get$4(agentic).llm.prompt_ms:$$props.message. timings.prompt_ms),$2=user_derived(()=>get$4(agentic)?get$4(agentic).llm.predicted_n:$$props.message.timings.predicted_n),$3=user_derived(()=>get$4(agentic)?get$4(agentic).llm.predicted_ms:$$props.message.timings.predicted_ms);ChatMessageStatistics($$anchor3,{get promptTokens(){return get$4($0)},get promptMs(){return get$4($1)},get predictedTokens(){return get$4($2)},get predictedMs(){return get$4($3)},get agenticTimings(){return get$4(agentic)},onActiveViewChange:handleStatsViewChange})}},alternate_4=$$anchor3=>{ var fragment_8=comment$2(),node_14=first_child(fragment_8);{var consequent_8=$$anchor4=>{const liveStats=user_derived(()=>processingState.getLiveProcessingStats()),genStats=user_derived(()=>processingState.getLiveGenerationStats()),promptProgress=user_derived(()=>processingState.processingState?.promptProgress),isStillProcessingPrompt=user_derived(()=>get$4(promptProgress)&&get$4(promptProgress).processed{ {let $0=user_derived(()=>!!get$4(isStillProcessingPrompt)),$1=user_derived(()=>get$4(liveStats)?.tokensProcessed),$2=user_derived(()=>get$4(liveStats)?.timeMs),$3=user_derived(()=>get$4(genStats)?.tokensGenerated),$4=user_derived(()=>get$4(genStats)?.timeMs);ChatMessageStatistics($$anchor5,{isLive:!0,get isProcessingPrompt(){return get$4($0)},get promptTokens(){return get$4($1)},get promptMs(){return get$4($2)},get predictedTokens(){return get$4($3)},get predictedMs(){return get$4($4)}})}};if_block( node_15,$$render=>{(get$4(liveStats)||get$4(genStats))&&$$render(consequent_7)})}append($$anchor4,fragment_9)};if_block(node_14,$$render=>{isLoading()&&get$4(currentConfig).showMessageStats&&$$render(consequent_8)},!0)}append($$anchor3,fragment_8)};if_block(node_13,$$render=>{get$4(currentConfig).showMessageStats&&$$props.message.timings&&$$props.message.timings.predicted_n&&$$props.message.timings.predicted_ms?$$render(consequent_6):$$render(alternate_4,!1)})}reset(div_11),bind_this(div_11,$$value=>set$1( statsContainerEl,$$value),()=>get$4(statsContainerEl)),append($$anchor2,div_11)};if_block(node_11,$$render=>{get$4(displayedModel)&&$$render(consequent_9)})}reset(div_10);var node_16=sibling(div_10,2);{var consequent_10=$$anchor2=>{{let $0=user_derived(()=>get$4(currentConfig).enableContinueGeneration&&!get$4(hasReasoning)?$$props.onContinue:void 0);ChatMessageActions($$anchor2,{get role(){return MessageRole.ASSISTANT},justify:"start",actionsPosition:"left",get siblingInfo(){return siblingInfo()}, get showDeleteDialog(){return $$props.showDeleteDialog},get deletionInfo(){return $$props.deletionInfo},get onCopy(){return $$props.onCopy},get onEdit(){return $$props.onEdit},get onRegenerate(){return $$props.onRegenerate},get onContinue(){return get$4($0)},get onForkConversation(){return $$props.onForkConversation},get onDelete(){return $$props.onDelete},get onConfirmDelete(){return $$props.onConfirmDelete},get onNavigateToSibling(){return $$props.onNavigateToSibling},get onShowDeleteDialogChange(){ return $$props.onShowDeleteDialogChange},get showRawOutputSwitch(){return get$4(currentConfig).showRawOutputSwitch},get rawOutputEnabled(){return get$4(showRawOutput)},onRawOutputToggle:enabled=>set$1(showRawOutput,enabled,!0)})}};if_block(node_16,$$render=>{$$props.message.timestamp&&!editCtx.isEditing&&$$render(consequent_10)})}reset(div),template_effect(()=>set_class(div,1,`text-md group w-full leading-7.5 ${className()??""}`,"svelte-14103tf")),append($$anchor,div),pop()}delegate(["keydown","\ input"]);class AutoScrollController{#_autoScrollEnabled=state$1(!0);get _autoScrollEnabled(){return get$4(this.#_autoScrollEnabled)}set _autoScrollEnabled(value){set$1(this.#_autoScrollEnabled,value,!0)}#_userScrolledUp=state$1(!1);get _userScrolledUp(){return get$4(this.#_userScrolledUp)}set _userScrolledUp(value){set$1(this.#_userScrolledUp,value,!0)}#_lastScrollTop=state$1(0);get _lastScrollTop(){return get$4(this.#_lastScrollTop)}set _lastScrollTop(value){set$1(this.#_lastScrollTop,value,!0)}_scrollInterval;_scrollTimeout;_container;_disabled;_isColumnReverse;_mutationObserver=null;_rafPending=!1;_observerEnabled=!1;constructor(options={}){ this._disabled=options.disabled??!1,this._isColumnReverse=options.isColumnReverse??!1}get autoScrollEnabled(){return this._autoScrollEnabled}get userScrolledUp(){return this._userScrolledUp}setContainer(container2){this._doStopObserving(),this._container=container2,this._observerEnabled&&container2&&!this._disabled&&this._doStartObserving()}setDisabled(disabled){this._disabled=disabled,disabled?(this._autoScrollEnabled=!1,this.stopInterval(),this._doStopObserving()):this._observerEnabled&&this._container&& !this._mutationObserver&&this._doStartObserving()}handleScroll(){if(this._disabled||!this._container)return;const{scrollTop,scrollHeight,clientHeight}=this._container;let distanceFromBottom,isScrollingUp;this._isColumnReverse?(distanceFromBottom=Math.abs(scrollTop),isScrollingUp=scrollTop{isAtBottom&&(this._userScrolledUp=!1,this._autoScrollEnabled=!0)},AUTO_SCROLL_INTERVAL),this._lastScrollTop=scrollTop}scrollToBottom(behavior="smooth"){this._disabled||!this._container||(this._isColumnReverse?this._container.scrollTo({top:0,behavior}):this._container.scrollTo( {top:this._container.scrollHeight,behavior}))}enable(){this._disabled||(this._userScrolledUp=!1,this._autoScrollEnabled=!0)}startInterval(){this._disabled||this._scrollInterval||(this._scrollInterval=setInterval(()=>{this.scrollToBottom()},AUTO_SCROLL_INTERVAL))}stopInterval(){this._scrollInterval&&(clearInterval(this._scrollInterval),this._scrollInterval=void 0)}updateInterval(isStreaming){if(this._disabled){this.stopInterval();return}isStreaming&&this._autoScrollEnabled?this._scrollInterval||this. startInterval():this.stopInterval()}destroy(){this.stopInterval(),this._doStopObserving(),this._scrollTimeout&&(clearTimeout(this._scrollTimeout),this._scrollTimeout=void 0)}startObserving(){this._observerEnabled=!0,this._container&&!this._disabled&&!this._mutationObserver&&this._doStartObserving()}stopObserving(){this._observerEnabled=!1,this._doStopObserving()}_doStartObserving(){if(!this._container||this._mutationObserver)return;const isReverse=this._isColumnReverse;this._mutationObserver=new MutationObserver( ()=>{!this._autoScrollEnabled||this._rafPending||(this._rafPending=!0,requestAnimationFrame(()=>{this._rafPending=!1,this._autoScrollEnabled&&this._container&&(isReverse?this._container.scrollTop=0:this._container.scrollTop=this._container.scrollHeight)}))}),this._mutationObserver.observe(this._container,{childList:!0,subtree:!0,characterData:!0})}_doStopObserving(){this._mutationObserver&&(this._mutationObserver.disconnect(),this._mutationObserver=null),this._rafPending=!1}}function createAutoScrollController(options={}){ return new AutoScrollController(options)}var root$O=from_html('

        Attach a file

        Drop your files here to upload

        ');function ChatScreenDragOverlay($$anchor){ var div=root$O(),div_1=child(div),node2=child(div_1);Upload(node2,{class:"mb-4 h-12 w-12 text-muted-foreground"}),next$1(4),reset(div_1),reset(div),append($$anchor,div)}var root_5$h=from_html('Server unavailable ',1),root_4$c=from_html(" ",1),root_3$o=from_html('
        '),root_2$u=from_html('
        '),root_12$5=from_html('Server unavailable ',1),root_11$4=from_html(" ",1),root_10$9=from_html('
        '),root_9$b=from_html('

        llama.cpp

        '),root_17$2=from_html(" ",1),root_21$3=from_html('

        File type not supported

        '),root_20$4=from_html('

        Unsupported File Types

        '),root_23$2=from_html( '

        '),root_22$3=from_html('
        '),root_16$3=from_html('

        This model supports:

        ',1),root_15$2=from_html(" ",1),root$N=from_html(" ",1);function ChatScreen($$anchor,$$props){push$1($$props,!0);let showCenteredEmpty=prop($$props,"showCenteredEmpty",3,!1),disableAutoScroll=user_derived(()=>!!config$1().disableAutoScroll),chatScrollContainer=state$1(void 0),dragCounter=state$1(0),isDragOver=state$1(!1),showFileErrorDialog=state$1(!1),uploadedFiles=state$1(proxy([]));const autoScroll=createAutoScrollController({isColumnReverse:!0}); let fileErrorData=state$1(proxy({generallyUnsupported:[],modalityUnsupported:[],modalityReasons:{},supportedTypes:[]})),showDeleteDialog=state$1(!1),showEmptyFileDialog=state$1(!1),emptyFileNames=state$1(proxy([])),initialMessage=state$1(""),isEmpty=user_derived(()=>showCenteredEmpty()&&!activeConversation()&&activeMessages().length===0&&!isLoading()),activeErrorDialog=user_derived(errorDialog),isServerLoading=user_derived(serverLoading),hasPropsError=user_derived(()=>!!serverError()),isCurrentConversationLoading=user_derived( ()=>isLoading()||isChatStreaming()),isRouter=user_derived(isRouterMode),conversationModel=user_derived(()=>chatStore.getConversationModel(activeMessages())),activeModelId=user_derived(()=>{const options=modelOptions();if(!get$4(isRouter))return options.length>0?options[0].model:null;const selectedId=selectedModelId();if(selectedId){const model=options.find(m=>m.id===selectedId);if(model)return model.model}if(get$4(conversationModel)){const model=options.find(m=>m.model===get$4(conversationModel)); if(model)return model.model}return null}),modelPropsVersion=state$1(0);user_effect(()=>{get$4(activeModelId)&&(modelsStore.getModelProps(get$4(activeModelId))||modelsStore.fetchModelProps(get$4(activeModelId)).then(()=>{update$1(modelPropsVersion)}))});let hasAudioModality=user_derived(()=>get$4(activeModelId)?(get$4(modelPropsVersion),modelsStore.modelSupportsAudio(get$4(activeModelId))):!1),hasVisionModality=user_derived(()=>get$4(activeModelId)?(get$4(modelPropsVersion),modelsStore.modelSupportsVision( get$4(activeModelId))):!1);async function handleDeleteConfirm(){const conversation=activeConversation();conversation&&await conversationsStore.deleteConversation(conversation.id),set$1(showDeleteDialog,!1)}function handleDragEnter(event2){event2.preventDefault(),update$1(dragCounter),event2.dataTransfer?.types.includes("Files")&&set$1(isDragOver,!0)}function handleDragLeave(event2){event2.preventDefault(),update$1(dragCounter,-1),get$4(dragCounter)===0&&set$1(isDragOver,!1)}function handleErrorDialogOpenChange(open2){ open2||chatStore.dismissErrorDialog()}function handleDragOver(event2){event2.preventDefault()}function handleDrop(event2){if(event2.preventDefault(),set$1(isDragOver,!1),set$1(dragCounter,0),event2.dataTransfer?.files){const files=Array.from(event2.dataTransfer.files);if(isEditing()){const handler=getAddFilesHandler();if(handler){handler(files);return}}processFiles(files)}}function handleFileRemove(fileId){set$1(uploadedFiles,get$4(uploadedFiles).filter(f=>f.id!==fileId),!0)}function handleFileUpload(files){ processFiles(files)}function handleKeydown(event2){(event2.ctrlKey||event2.metaKey)&&event2.shiftKey&&(event2.key===KeyboardKey.D_LOWER||event2.key===KeyboardKey.D_UPPER)&&(event2.preventDefault(),activeConversation()&&set$1(showDeleteDialog,!0))}async function handleSystemPromptAdd(draft){(draft.message||draft.files.length>0)&&chatStore.savePendingDraft(draft.message,draft.files),await chatStore.addSystemPrompt()}function handleScroll(){autoScroll.handleScroll()}async function handleSendMessage(message,files){ const plainFiles=files?snapshot(files):void 0,result=plainFiles?await parseFilesToMessageExtras(plainFiles,get$4(activeModelId)??void 0):void 0;if(result?.emptyFiles&&result.emptyFiles.length>0){if(set$1(emptyFileNames,result.emptyFiles,!0),set$1(showEmptyFileDialog,!0),files){const emptyFileNamesSet=new Set(result.emptyFiles);set$1(uploadedFiles,get$4(uploadedFiles).filter(file=>!emptyFileNamesSet.has(file.name)),!0)}return!1}const extras=result?.extras;return autoScroll.enable(),await chatStore. sendMessage(message,extras),autoScroll.scrollToBottom(),!0}async function processFiles(files){const generallySupported=[],generallyUnsupported=[];for(const file of files)isFileTypeSupported(file.name,file.type)?generallySupported.push(file):generallyUnsupported.push(file);const capabilities={hasVision:get$4(hasVisionModality),hasAudio:get$4(hasAudioModality)},{supportedFiles,unsupportedFiles,modalityReasons}=filterFilesByModalities(generallySupported,capabilities);if([...generallyUnsupported,...unsupportedFiles]. length>0){const supportedTypes=["text files","PDFs"];get$4(hasVisionModality)&&supportedTypes.push("images"),get$4(hasAudioModality)&&supportedTypes.push("audio files"),set$1(fileErrorData,{generallyUnsupported,modalityUnsupported:unsupportedFiles,modalityReasons,supportedTypes},!0),set$1(showFileErrorDialog,!0)}if(supportedFiles.length>0){const processed=await processFilesToChatUploaded(supportedFiles,get$4(activeModelId)??void 0);set$1(uploadedFiles,[...get$4(uploadedFiles),...processed],!0)}} afterNavigate(()=>{get$4(disableAutoScroll)||autoScroll.enable()}),onMount$1(()=>{autoScroll.startObserving(),get$4(disableAutoScroll)||autoScroll.enable();const pendingDraft=chatStore.consumePendingDraft();pendingDraft&&(set$1(initialMessage,pendingDraft.message,!0),set$1(uploadedFiles,pendingDraft.files,!0))}),user_effect(()=>{autoScroll.setContainer(get$4(chatScrollContainer))}),user_effect(()=>{autoScroll.setDisabled(get$4(disableAutoScroll))});var fragment=root$N();event("keydown",$window,handleKeydown); var node2=first_child(fragment);{var consequent=$$anchor2=>{ChatScreenDragOverlay($$anchor2)};if_block(node2,$$render=>{get$4(isDragOver)&&$$render(consequent)})}var node_1=sibling(node2,2);ChatScreenHeader(node_1,{});var node_2=sibling(node_1,2);{var consequent_2=$$anchor2=>{var div=root_2$u(),div_1=child(div),node_3=child(div_1);{let $0=user_derived(activeMessages);ChatMessages(node_3,{class:"mb-16 md:mb-24",get messages(){return get$4($0)},onUserAction:()=>{autoScroll.enable(),autoScroll.scrollToBottom()}})} var div_2=sibling(node_3,2),node_4=child(div_2);ChatScreenProcessingInfo(node_4,{});var node_5=sibling(node_4,2);{var consequent_1=$$anchor3=>{var div_3=root_3$o(),node_6=child(div_3);component(node_6,()=>Alert,($$anchor4,Alert_Root)=>{Alert_Root($$anchor4,{variant:"destructive",children:($$anchor5,$$slotProps)=>{var fragment_2=root_4$c(),node_7=first_child(fragment_2);Triangle_alert(node_7,{class:"h-4 w-4"});var node_8=sibling(node_7,2);component(node_8,()=>Alert_title,($$anchor6,Alert_Title)=>{ Alert_Title($$anchor6,{class:"flex items-center justify-between",children:($$anchor7,$$slotProps2)=>{var fragment_3=root_5$h(),button=sibling(first_child(fragment_3),2);button.__click=()=>serverStore.fetch();var node_9=child(button);{let $0=user_derived(()=>get$4(isServerLoading)?"animate-spin":"");Refresh_cw(node_9,{get class(){return`h-3 w-3 ${get$4($0)??""}`}})}var text2=sibling(node_9);reset(button),template_effect(()=>{button.disabled=get$4(isServerLoading),set_text(text2,` ${get$4(isServerLoading)? "Retrying...":"Retry"}`)}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var node_10=sibling(node_8,2);component(node_10,()=>Alert_description,($$anchor6,Alert_Description)=>{Alert_Description($$anchor6,{children:($$anchor7,$$slotProps2)=>{next$1();var text_1=text$8();template_effect($0=>set_text(text_1,$0),[serverError]),append($$anchor7,text_1)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),reset(div_3),transition(1,div_3,()=>fly,()=>({y:10,duration:250})), append($$anchor3,div_3)};if_block(node_5,$$render=>{get$4(hasPropsError)&&$$render(consequent_1)})}var div_4=sibling(node_5,2),node_11=child(div_4);{let $0=user_derived(()=>get$4(hasPropsError)||isEditing());ChatScreenForm(node_11,{get disabled(){return get$4($0)},get initialMessage(){return get$4(initialMessage)},get isLoading(){return get$4(isCurrentConversationLoading)},onFileRemove:handleFileRemove,onFileUpload:handleFileUpload,onSend:handleSendMessage,onStop:()=>chatStore.stopGeneration(),onSystemPromptAdd:handleSystemPromptAdd, showHelperText:!1,get uploadedFiles(){return get$4(uploadedFiles)},set uploadedFiles($$value){set$1(uploadedFiles,$$value,!0)}})}reset(div_4),reset(div_2),reset(div_1),reset(div),bind_this(div,$$value=>set$1(chatScrollContainer,$$value),()=>get$4(chatScrollContainer)),event("dragenter",div,handleDragEnter),event("dragleave",div,handleDragLeave),event("dragover",div,handleDragOver),event("drop",div,handleDrop),event("scroll",div,handleScroll),transition(1,div_2,()=>slide,()=>({duration:150,axis:"\ y"})),append($$anchor2,div)},alternate_1=$$anchor2=>{var fragment_5=comment$2(),node_12=first_child(fragment_5);{var consequent_3=$$anchor3=>{ServerLoadingSplash($$anchor3,{})},alternate=$$anchor3=>{var div_5=root_9$b(),div_6=child(div_5),div_7=child(div_6),p2=sibling(child(div_7),2),text_2=child(p2);reset(p2),reset(div_7);var node_13=sibling(div_7,2);{var consequent_4=$$anchor4=>{var div_8=root_10$9(),node_14=child(div_8);component(node_14,()=>Alert,($$anchor5,Alert_Root_1)=>{Alert_Root_1($$anchor5, {variant:"destructive",children:($$anchor6,$$slotProps)=>{var fragment_7=root_11$4(),node_15=first_child(fragment_7);Triangle_alert(node_15,{class:"h-4 w-4"});var node_16=sibling(node_15,2);component(node_16,()=>Alert_title,($$anchor7,Alert_Title_1)=>{Alert_Title_1($$anchor7,{class:"flex items-center justify-between",children:($$anchor8,$$slotProps2)=>{var fragment_8=root_12$5(),button_1=sibling(first_child(fragment_8),2);button_1.__click=()=>serverStore.fetch();var node_17=child(button_1);{let $0=user_derived( ()=>get$4(isServerLoading)?"animate-spin":"");Refresh_cw(node_17,{get class(){return`h-3 w-3 ${get$4($0)??""}`}})}var text_3=sibling(node_17);reset(button_1),template_effect(()=>{button_1.disabled=get$4(isServerLoading),set_text(text_3,` ${get$4(isServerLoading)?"Retrying...":"Retry"}`)}),append($$anchor8,fragment_8)},$$slots:{default:!0}})});var node_18=sibling(node_16,2);component(node_18,()=>Alert_description,($$anchor7,Alert_Description_1)=>{Alert_Description_1($$anchor7,{children:($$anchor8,$$slotProps2)=>{ next$1();var text_4=text$8();template_effect($0=>set_text(text_4,$0),[serverError]),append($$anchor8,text_4)},$$slots:{default:!0}})}),append($$anchor6,fragment_7)},$$slots:{default:!0}})}),reset(div_8),transition(1,div_8,()=>fly,()=>({y:10,duration:250})),append($$anchor4,div_8)};if_block(node_13,$$render=>{get$4(hasPropsError)&&$$render(consequent_4)})}var div_9=sibling(node_13,2),node_19=child(div_9);ChatScreenForm(node_19,{get disabled(){return get$4(hasPropsError)},get initialMessage(){return get$4( initialMessage)},get isLoading(){return get$4(isCurrentConversationLoading)},onFileRemove:handleFileRemove,onFileUpload:handleFileUpload,onSend:handleSendMessage,onStop:()=>chatStore.stopGeneration(),onSystemPromptAdd:handleSystemPromptAdd,showHelperText:!0,get uploadedFiles(){return get$4(uploadedFiles)},set uploadedFiles($$value){set$1(uploadedFiles,$$value,!0)}}),reset(div_9),reset(div_6),reset(div_5),template_effect(()=>set_text(text_2,`${serverStore.props?.modalities?.audio?"Record audio, t\ ype a message ":"Type a message"} or upload files to get started`)),event("dragenter",div_5,handleDragEnter),event("dragleave",div_5,handleDragLeave),event("dragover",div_5,handleDragOver),event("drop",div_5,handleDrop),transition(1,div_7,()=>fade,()=>({duration:300})),transition(1,div_9,()=>fly,()=>({y:10,duration:250,delay:get$4(hasPropsError)?0:300})),append($$anchor3,div_5)};if_block(node_12,$$render=>{get$4(isServerLoading)?$$render(consequent_3):$$render(alternate,!1)},!0)}append($$anchor2, fragment_5)};if_block(node_2,$$render=>{get$4(isEmpty)?$$render(alternate_1,!1):$$render(consequent_2)})}var node_20=sibling(node_2,2);component(node_20,()=>Root$3,($$anchor2,AlertDialog_Root)=>{AlertDialog_Root($$anchor2,{get open(){return get$4(showFileErrorDialog)},set open($$value){set$1(showFileErrorDialog,$$value,!0)},children:($$anchor3,$$slotProps)=>{var fragment_10=comment$2(),node_21=first_child(fragment_10);component(node_21,()=>Portal,($$anchor4,AlertDialog_Portal)=>{AlertDialog_Portal( $$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_11=root_15$2(),node_22=first_child(fragment_11);component(node_22,()=>Alert_dialog_overlay,($$anchor6,AlertDialog_Overlay)=>{AlertDialog_Overlay($$anchor6,{})});var node_23=sibling(node_22,2);component(node_23,()=>Alert_dialog_content,($$anchor6,AlertDialog_Content)=>{AlertDialog_Content($$anchor6,{class:"flex max-w-md flex-col",children:($$anchor7,$$slotProps3)=>{var fragment_12=root_16$3(),node_24=first_child(fragment_12);component(node_24, ()=>Alert_dialog_header,($$anchor8,AlertDialog_Header)=>{AlertDialog_Header($$anchor8,{children:($$anchor9,$$slotProps4)=>{var fragment_13=root_17$2(),node_25=first_child(fragment_13);component(node_25,()=>Alert_dialog_title,($$anchor10,AlertDialog_Title)=>{AlertDialog_Title($$anchor10,{children:($$anchor11,$$slotProps5)=>{next$1();var text_5=text$8("File Upload Error");append($$anchor11,text_5)},$$slots:{default:!0}})});var node_26=sibling(node_25,2);component(node_26,()=>Alert_dialog_description, ($$anchor10,AlertDialog_Description)=>{AlertDialog_Description($$anchor10,{class:"text-sm text-muted-foreground",children:($$anchor11,$$slotProps5)=>{next$1();var text_6=text$8("Some files cannot be uploaded with the current model.");append($$anchor11,text_6)},$$slots:{default:!0}})}),append($$anchor9,fragment_13)},$$slots:{default:!0}})});var div_10=sibling(node_24,2),node_27=child(div_10);{var consequent_5=$$anchor8=>{var div_11=root_20$4(),div_12=sibling(child(div_11),2);each(div_12,21,()=>get$4( fileErrorData).generallyUnsupported,file=>file.name,($$anchor9,file)=>{var div_13=root_21$3(),p_1=child(div_13),text_7=child(p_1,!0);reset(p_1),next$1(2),reset(div_13),template_effect(()=>set_text(text_7,get$4(file).name)),append($$anchor9,div_13)}),reset(div_12),reset(div_11),append($$anchor8,div_11)};if_block(node_27,$$render=>{get$4(fileErrorData).generallyUnsupported.length>0&&$$render(consequent_5)})}var node_28=sibling(node_27,2);{var consequent_6=$$anchor8=>{var div_14=root_22$3(),div_15=child( div_14);each(div_15,21,()=>get$4(fileErrorData).modalityUnsupported,file=>file.name,($$anchor9,file)=>{var div_16=root_23$2(),p_2=child(div_16),text_8=child(p_2,!0);reset(p_2);var p_3=sibling(p_2,2),text_9=child(p_3,!0);reset(p_3),reset(div_16),template_effect(()=>{set_text(text_8,get$4(file).name),set_text(text_9,get$4(fileErrorData).modalityReasons[get$4(file).name]||"Not supported by current model")}),append($$anchor9,div_16)}),reset(div_15),reset(div_14),append($$anchor8,div_14)};if_block(node_28, $$render=>{get$4(fileErrorData).modalityUnsupported.length>0&&$$render(consequent_6)})}reset(div_10);var div_17=sibling(div_10,2),p_4=sibling(child(div_17),2),text_10=child(p_4,!0);reset(p_4),reset(div_17);var node_29=sibling(div_17,2);component(node_29,()=>Alert_dialog_footer,($$anchor8,AlertDialog_Footer)=>{AlertDialog_Footer($$anchor8,{children:($$anchor9,$$slotProps4)=>{var fragment_14=comment$2(),node_30=first_child(fragment_14);component(node_30,()=>Alert_dialog_action,($$anchor10,AlertDialog_Action)=>{ AlertDialog_Action($$anchor10,{onclick:()=>set$1(showFileErrorDialog,!1),children:($$anchor11,$$slotProps5)=>{next$1();var text_11=text$8("Got it");append($$anchor11,text_11)},$$slots:{default:!0}})}),append($$anchor9,fragment_14)},$$slots:{default:!0}})}),template_effect($0=>set_text(text_10,$0),[()=>get$4(fileErrorData).supportedTypes.join(", ")]),append($$anchor7,fragment_12)},$$slots:{default:!0}})}),append($$anchor5,fragment_11)},$$slots:{default:!0}})}),append($$anchor3,fragment_10)},$$slots:{ default:!0}})});var node_31=sibling(node_20,2);DialogConfirmation(node_31,{title:"Delete Conversation",description:"Are you sure you want to delete this conversation? This action cannot be undone and will permanently remove all messages in this conversation.",confirmText:"Delete",cancelText:"Cancel",variant:"destructive",get icon(){return Trash_2},onConfirm:handleDeleteConfirm,onCancel:()=>set$1(showDeleteDialog,!1),get open(){return get$4(showDeleteDialog)},set open($$value){set$1(showDeleteDialog, $$value,!0)}});var node_32=sibling(node_31,2);DialogEmptyFileAlert(node_32,{get emptyFiles(){return get$4(emptyFileNames)},onOpenChange:open2=>{open2||set$1(emptyFileNames,[],!0)},get open(){return get$4(showEmptyFileDialog)},set open($$value){set$1(showEmptyFileDialog,$$value,!0)}});var node_33=sibling(node_32,2);{let $0=user_derived(()=>get$4(activeErrorDialog)?.message??""),$1=user_derived(()=>get$4(activeErrorDialog)?.contextInfo),$2=user_derived(()=>!!get$4(activeErrorDialog)),$3=user_derived( ()=>get$4(activeErrorDialog)?.type??ErrorDialogType.SERVER);DialogChatError(node_33,{get message(){return get$4($0)},get contextInfo(){return get$4($1)},onOpenChange:handleErrorDialogOpenChange,get open(){return get$4($2)},get type(){return get$4($3)}})}append($$anchor,fragment),pop()}delegate(["click"]);var root$M=from_html('
        ',1);function ChatScreenForm($$anchor,$$props){push$1($$props,!0);let disabled=prop($$props,"disabled",3,!1),initialMessage=prop( $$props,"initialMessage",3,""),isLoading2=prop($$props,"isLoading",3,!1),showHelperText=prop($$props,"showHelperText",3,!0),uploadedFiles=prop($$props,"uploadedFiles",31,()=>proxy([])),chatFormRef=state$1(void 0),message=user_derived(initialMessage),previousIsLoading=user_derived(isLoading2),previousInitialMessage=user_derived(initialMessage);user_effect(()=>{initialMessage()!==get$4(previousInitialMessage)&&(set$1(message,initialMessage()),set$1(previousInitialMessage,initialMessage()))});function handleSystemPromptClick(){ $$props.onSystemPromptAdd?.({message:get$4(message),files:uploadedFiles()})}let hasLoadingAttachments=user_derived(()=>uploadedFiles().some(f=>f.isLoading));async function handleSubmit(){if(!get$4(message).trim()&&uploadedFiles().length===0||disabled()||isLoading2()||get$4(hasLoadingAttachments)||!get$4(chatFormRef)?.checkModelSelected())return;const messageToSend=get$4(message).trim(),filesToSend=[...uploadedFiles()];set$1(message,""),uploadedFiles([]),get$4(chatFormRef)?.resetTextareaHeight(), await $$props.onSend?.(messageToSend,filesToSend)||(set$1(message,messageToSend),uploadedFiles(filesToSend))}function handleFilesAdd(files){$$props.onFileUpload?.(files)}function handleUploadedFileRemove(fileId){$$props.onFileRemove?.(fileId)}onMount$1(()=>{setTimeout(()=>get$4(chatFormRef)?.focus(),10)}),afterNavigate(()=>{setTimeout(()=>get$4(chatFormRef)?.focus(),10)}),user_effect(()=>{get$4(previousIsLoading)&&!isLoading2()&&setTimeout(()=>get$4(chatFormRef)?.focus(),10),set$1(previousIsLoading, isLoading2())});var fragment=root$M(),div=first_child(fragment),node2=child(div);bind_this(ChatForm(node2,{get class(){return $$props.class},get disabled(){return disabled()},get isLoading(){return isLoading2()},showMcpPromptButton:!0,onFilesAdd:handleFilesAdd,get onStop(){return $$props.onStop},onSubmit:handleSubmit,onSystemPromptClick:handleSystemPromptClick,onUploadedFileRemove:handleUploadedFileRemove,get value(){return get$4(message)},set value($$value){set$1(message,$$value)},get uploadedFiles(){ return uploadedFiles()},set uploadedFiles($$value){uploadedFiles($$value)}}),$$value=>set$1(chatFormRef,$$value,!0),()=>get$4(chatFormRef)),reset(div);var node_1=sibling(div,2);ChatFormHelperText(node_1,{get show(){return showHelperText()}}),append($$anchor,fragment),pop()}const SIDEBAR_COOKIE_NAME="sidebar:state",SIDEBAR_COOKIE_MAX_AGE=3600*24*7,SIDEBAR_WIDTH="18rem",SIDEBAR_WIDTH_MOBILE="18rem",SIDEBAR_WIDTH_ICON="3rem",SIDEBAR_KEYBOARD_SHORTCUT="b";class SidebarState{props;#open=user_derived( ()=>this.props.open());get open(){return get$4(this.#open)}set open(value){set$1(this.#open,value)}#openMobile=state$1(!1);get openMobile(){return get$4(this.#openMobile)}set openMobile(value){set$1(this.#openMobile,value,!0)}setOpen;#isMobile;#state=user_derived(()=>this.open?"expanded":"collapsed");get state(){return get$4(this.#state)}set state(value){set$1(this.#state,value)}constructor(props){this.setOpen=props.setOpen,this.#isMobile=new IsMobile,this.props=props}get isMobile(){return this.#isMobile. current}handleShortcutKeydown=e=>{e.key===SIDEBAR_KEYBOARD_SHORTCUT&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),this.toggle())};setOpenMobile=value=>{this.openMobile=value};toggle=()=>this.#isMobile.current?this.openMobile=!this.openMobile:this.setOpen(!this.open)}const SYMBOL_KEY="scn-sidebar";function setSidebar(props){return setContext(Symbol.for(SYMBOL_KEY),new SidebarState(props))}function useSidebar(){return getContext(Symbol.for(SYMBOL_KEY))}var root$L=from_html("
        ");function Sidebar_group_content($$anchor,$$props){ push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$L();attribute_effect(div,$0=>({"data-slot":"sidebar-group-content","data-sidebar":"group-content",class:$0,...restProps}),[()=>cn$1("w-full text-sm",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}var root_2$t=from_html("\
        ");function Sidebar_group_label($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","children","child","class"]);const mergedProps=user_derived(()=>({class:cn$1("text-sidebar-foreground/70 ring-sidebar-ring outline-hidden flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",$$props.class),"data-slot":"sidebar-group-label","data-sidebar":"group-label",...restProps}));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$4(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$t();attribute_effect(div,()=>({...get$4(mergedProps)})); var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}var root$K=from_html("
        ");function Sidebar_group($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$K(); attribute_effect(div,$0=>({"data-slot":"sidebar-group","data-sidebar":"group",class:$0,...restProps}),[()=>cn$1("relative flex w-full min-w-0 flex-col p-2",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}var root$J=from_html("
        ");function Sidebar_header($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots", "$$events","$$legacy","ref","class","children"]);var div=root$J();attribute_effect(div,$0=>({"data-slot":"sidebar-header","data-sidebar":"header",class:$0,...restProps}),[()=>cn$1("flex flex-col gap-2 p-2",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}var root$I=from_html("
        ");function Sidebar_inset($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"r\ ef",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var main2=root$I();attribute_effect(main2,$0=>({"data-slot":"sidebar-inset",class:$0,...restProps}),[()=>cn$1("relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",$$props.class)]);var node2=child(main2); snippet(node2,()=>$$props.children??noop$3),reset(main2),bind_this(main2,$$value=>ref2($$value),()=>ref2()),append($$anchor,main2),pop()}tv({base:"peer/menu-button outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground group-has-data-[sidebar=menu-action]/menu-item:pr-8 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accen\ t data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm transition-[width,height,padding] focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:font-medium [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",variants:{variant:{default:"hover:\ bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"group-data-[collapsible=icon]:p-0! h-12 text-sm"}},defaultVariants:{variant:"default",size:"default"}});var root$H=from_html("
      • ");function Sidebar_menu_item($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props, "ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var li2=root$H();attribute_effect(li2,$0=>({"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",class:$0,...restProps}),[()=>cn$1("group/menu-item relative",$$props.class)]);var node2=child(li2);snippet(node2,()=>$$props.children??noop$3),reset(li2),bind_this(li2,$$value=>ref2($$value),()=>ref2()),append($$anchor,li2),pop()}var root$G=from_html("
        ");function Skeleton($$anchor,$$props){ push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var div=root$G();attribute_effect(div,$0=>({"data-slot":"skeleton",class:$0,...restProps}),[()=>cn$1("animate-pulse rounded-md bg-accent",$$props.class)]),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}var root$F=from_html("
        ");function Sidebar_menu($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props( $$props,["$$slots","$$events","$$legacy","ref","class","children"]);var ul=root$F();attribute_effect(ul,$0=>({"data-slot":"sidebar-menu","data-sidebar":"menu",class:$0,...restProps}),[()=>cn$1("flex w-full min-w-0 flex-col gap-1",$$props.class)]);var node2=child(ul);snippet(node2,()=>$$props.children??noop$3),reset(ul),bind_this(ul,$$value=>ref2($$value),()=>ref2()),append($$anchor,ul),pop()}var root$E=from_html("
        ");function Sidebar_provider($$anchor,$$props){push$1($$props,!0);let ref2=prop( $$props,"ref",15,null),open2=prop($$props,"open",15,!0),onOpenChange=prop($$props,"onOpenChange",3,()=>{}),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","open","onOpenChange","class","style","children"]);const sidebar=setSidebar({open:()=>open2(),setOpen:value=>{open2(value),onOpenChange()(value),document.cookie=`${SIDEBAR_COOKIE_NAME}=${open2()}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`}});var div=root$E();event("keydown",$window,function(...$$args){sidebar.handleShortcutKeydown?. apply(this,$$args)}),attribute_effect(div,$0=>({"data-slot":"sidebar-wrapper",style:`--sidebar-width: ${SIDEBAR_WIDTH}; --sidebar-width-icon: ${SIDEBAR_WIDTH_ICON}; ${$$props.style??""}`,class:$0,...restProps}),[()=>cn$1("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}var root_1$s=from_html(' \ Toggle Sidebar',1);function Sidebar_trigger($$anchor,$$props){push$1($$props,!0),prop($$props,"ref",11,null);let restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","onclick"]);const sidebar=useSidebar();{let $0=user_derived(()=>$$props.class),$1=user_derived(()=>sidebar.open?"unset":"2");Button($$anchor,spread_props({"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-lg",get class(){return`rounded-full backdrop-\ blur-lg ${get$4($0)??""} md:left-${get$4($1)??""} -top-2 -left-2 md:top-0`},type:"button",onclick:e=>{$$props.onclick?.(e),sidebar.toggle()}},()=>restProps,{children:($$anchor2,$$slotProps)=>{var fragment_1=root_1$s(),node2=first_child(fragment_1);Panel_left(node2,{}),next$1(2),append($$anchor2,fragment_1)},$$slots:{default:!0}}))}pop()}var root_1$r=from_html("
        "),root_6$g=from_html(" ",1),root_5$g=from_html('
        ',1),root_9$a=from_html( '');function Sidebar($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"re\ f",15,null),side=prop($$props,"side",3,"left"),variant=prop($$props,"variant",3,"sidebar"),collapsible=prop($$props,"collapsible",3,"offcanvas"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","side","variant","collapsible","class","children"]);const sidebar=useSidebar();var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var div=root_1$r();attribute_effect(div,$0=>({class:$0,...restProps}),[()=>cn$1("flex h-full w-(--sidebar-width) flex-col bg-si\ debar text-sidebar-foreground",$$props.class)]);var node_1=child(div);snippet(node_1,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor2,div)},alternate_1=$$anchor2=>{var fragment_1=comment$2(),node_2=first_child(fragment_1);{var consequent_1=$$anchor3=>{var fragment_2=comment$2(),node_3=first_child(fragment_2),bind_get=()=>sidebar.openMobile,bind_set=v=>sidebar.setOpenMobile(v);component(node_3,()=>Root$1,($$anchor4,Sheet_Root)=>{Sheet_Root( $$anchor4,spread_props({get open(){return bind_get()},set open($$value){bind_set($$value)}},()=>restProps,{children:($$anchor5,$$slotProps)=>{var fragment_3=comment$2(),node_4=first_child(fragment_3);component(node_4,()=>Sheet_content,($$anchor6,Sheet_Content)=>{Sheet_Content($$anchor6,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",class:"z-99999 w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground sm:z-99 [&>button]:hidden",get style(){return`--sidebar-width: ${SIDEBAR_WIDTH_MOBILE}\ ;`},get side(){return side()},children:($$anchor7,$$slotProps2)=>{var fragment_4=root_5$g(),node_5=first_child(fragment_4);component(node_5,()=>Sheet_header,($$anchor8,Sheet_Header)=>{Sheet_Header($$anchor8,{class:"sr-only",children:($$anchor9,$$slotProps3)=>{var fragment_5=root_6$g(),node_6=first_child(fragment_5);component(node_6,()=>Sheet_title,($$anchor10,Sheet_Title)=>{Sheet_Title($$anchor10,{children:($$anchor11,$$slotProps4)=>{next$1();var text2=text$8("Sidebar");append($$anchor11,text2)}, $$slots:{default:!0}})});var node_7=sibling(node_6,2);component(node_7,()=>Sheet_description,($$anchor10,Sheet_Description)=>{Sheet_Description($$anchor10,{children:($$anchor11,$$slotProps4)=>{next$1();var text_1=text$8("Displays the mobile sidebar.");append($$anchor11,text_1)},$$slots:{default:!0}})}),append($$anchor9,fragment_5)},$$slots:{default:!0}})});var div_1=sibling(node_5,2),node_8=child(div_1);snippet(node_8,()=>$$props.children??noop$3),reset(div_1),append($$anchor7,fragment_4)},$$slots:{ default:!0}})}),append($$anchor5,fragment_3)},$$slots:{default:!0}}))}),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var div_2=root_9$a(),div_3=child(div_2),div_4=sibling(div_3,2);attribute_effect(div_4,$0=>({"data-slot":"sidebar-container",class:$0,...restProps}),[()=>cn$1("fixed inset-y-0 z-999 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:z-0 md:flex",side()==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*\ -1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",variant()==="floating"||variant()==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)",$$props.class)]);var div_5=child(div_4),node_9=child(div_5);snippet(node_9,()=>$$props.children??noop$3),reset(div_5),reset(div_4),reset(div_2),bind_this(div_2,$$value=>ref2($$value),()=>ref2()),template_effect($0=>{set_attribute( div_2,"data-state",sidebar.state),set_attribute(div_2,"data-collapsible",sidebar.state==="collapsed"?collapsible():""),set_attribute(div_2,"data-variant",variant()),set_attribute(div_2,"data-side",side()),set_class(div_3,1,$0)},[()=>clsx(cn$1("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",variant()==="floating"||variant()==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--\ sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)"))]),append($$anchor3,div_2)};if_block(node_2,$$render=>{sidebar.isMobile?$$render(consequent_1):$$render(alternate,!1)},!0)}append($$anchor2,fragment_1)};if_block(node2,$$render=>{collapsible()==="none"?$$render(consequent):$$render(alternate_1,!1)})}append($$anchor,fragment),pop()}var root$D=from_html('
        ');function ChatScreenHeader($$anchor,$$props){ push$1($$props,!1);const sidebar=useSidebar(),chatSettingsDialog=getChatSettingsDialogContext();init();var header=root$D(),div=child(header),node2=child(div);Button(node2,{variant:"ghost",size:"icon-lg",onclick:()=>chatSettingsDialog.open(),class:"rounded-full backdrop-blur-lg",children:($$anchor2,$$slotProps)=>{Settings$1($$anchor2,{class:"h-4 w-4"})},$$slots:{default:!0}}),reset(div),reset(header),template_effect(()=>set_class(header,1,`pointer-events-none fixed top-0 right-0 left-0 z-50 flex \ items-center justify-end p-2 duration-200 ease-linear md:p-4 ${sidebar.open?"md:left-[var(--sidebar-width)]":""}`)),append($$anchor,header),pop()}var root_1$q=from_html(' '),root$C=from_html('
        ');function ChatScreenProcessingInfo($$anchor,$$props){push$1($$props,!0);const processingState=useProcessingState();let isCurrentConversationLoading=user_derived( isLoading),isStreaming=user_derived(isChatStreaming),hasProcessingData=user_derived(()=>processingState.processingState!==null),processingDetails=user_derived(()=>processingState.getTechnicalDetails()),showProcessingInfo=user_derived(()=>get$4(isCurrentConversationLoading)||get$4(isStreaming)||config$1().keepStatsVisible||get$4(hasProcessingData));user_effect(()=>{const conversation=activeConversation();untrack$1(()=>chatStore.setActiveProcessingConversation(conversation?.id??null))}),user_effect( ()=>{const keepStatsVisible=config$1().keepStatsVisible;if((keepStatsVisible||get$4(isCurrentConversationLoading)||get$4(isStreaming))&&processingState.startMonitoring(),!get$4(isCurrentConversationLoading)&&!get$4(isStreaming)&&!keepStatsVisible){const timeout=setTimeout(()=>{!config$1().keepStatsVisible&&!isChatStreaming()&&processingState.stopMonitoring()},PROCESSING_INFO_TIMEOUT);return()=>clearTimeout(timeout)}}),user_effect(()=>{const conversation=activeConversation(),messages=activeMessages(); if(config$1().keepStatsVisible&&conversation){if(messages.length===0){untrack$1(()=>chatStore.clearProcessingState(conversation.id));return}!get$4(isCurrentConversationLoading)&&!get$4(isStreaming)&&untrack$1(()=>chatStore.restoreProcessingStateFromMessages(messages,conversation.id))}});var div=root$C();let classes;var div_1=child(div);each(div_1,20,()=>get$4(processingDetails),detail=>detail,($$anchor2,detail)=>{var span=root_1$q(),text2=child(span,!0);reset(span),template_effect(()=>set_text(text2, detail)),append($$anchor2,span)}),reset(div_1),reset(div),template_effect(()=>classes=set_class(div,1,"chat-processing-info-container pointer-events-none svelte-1ktvj8d",null,classes,{visible:get$4(showProcessingInfo)})),append($$anchor,div),pop()}var root_1$p=from_html(''),root_2$s=from_html(""),root_6$f=from_html('
        '),root_7$f=from_html( '
        '),root_3$n=from_html(`

        Settings are saved in browser's localStorage

        `),root$B=from_html('
        ',1);function ChatSettings($$anchor,$$props){ push$1($$props,!0);const settingSections=[{title:SETTINGS_SECTION_TITLES.GENERAL,icon:Settings$1,fields:[{key:SETTINGS_KEYS.THEME,label:"Theme",type:SettingsFieldType.SELECT,options:SETTINGS_COLOR_MODES_CONFIG},{key:SETTINGS_KEYS.API_KEY,label:"API Key",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS.SYSTEM_MESSAGE,label:"System Message",type:SettingsFieldType.TEXTAREA},{key:SETTINGS_KEYS.PASTE_LONG_TEXT_TO_FILE_LEN,label:"Paste long text to file length",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS. SEND_ON_ENTER,label:"Send message on Enter",type:SettingsFieldType.CHECKBOX},{key:SETTINGS_KEYS.COPY_TEXT_ATTACHMENTS_AS_PLAIN_TEXT,label:"Copy text attachments as plain text",type:SettingsFieldType.CHECKBOX},{key:SETTINGS_KEYS.ENABLE_CONTINUE_GENERATION,label:'Enable "Continue" button',type:SettingsFieldType.CHECKBOX,isExperimental:!0},{key:SETTINGS_KEYS.PDF_AS_IMAGE,label:"Parse PDF as image",type:SettingsFieldType.CHECKBOX},{key:SETTINGS_KEYS.ASK_FOR_TITLE_CONFIRMATION,label:"Ask for confirma\ tion before changing conversation title",type:SettingsFieldType.CHECKBOX}]},{title:SETTINGS_SECTION_TITLES.DISPLAY,icon:Monitor,fields:[{key:SETTINGS_KEYS.SHOW_MESSAGE_STATS,label:"Show message generation statistics",type:SettingsFieldType.CHECKBOX},{key:SETTINGS_KEYS.SHOW_THOUGHT_IN_PROGRESS,label:"Show thought in progress",type:SettingsFieldType.CHECKBOX},{key:SETTINGS_KEYS.KEEP_STATS_VISIBLE,label:"Keep stats visible after generation",type:SettingsFieldType.CHECKBOX},{key:SETTINGS_KEYS.AUTO_MIC_ON_EMPTY, label:"Show microphone on empty input",type:SettingsFieldType.CHECKBOX,isExperimental:!0},{key:SETTINGS_KEYS.RENDER_USER_CONTENT_AS_MARKDOWN,label:"Render user content as Markdown",type:SettingsFieldType.CHECKBOX},{key:SETTINGS_KEYS.FULL_HEIGHT_CODE_BLOCKS,label:"Use full height code blocks",type:SettingsFieldType.CHECKBOX},{key:SETTINGS_KEYS.DISABLE_AUTO_SCROLL,label:"Disable automatic scroll",type:SettingsFieldType.CHECKBOX},{key:SETTINGS_KEYS.ALWAYS_SHOW_SIDEBAR_ON_DESKTOP,label:"Always show \ sidebar on desktop",type:SettingsFieldType.CHECKBOX},{key:SETTINGS_KEYS.AUTO_SHOW_SIDEBAR_ON_NEW_CHAT,label:"Auto-show sidebar on new chat",type:SettingsFieldType.CHECKBOX},{key:SETTINGS_KEYS.SHOW_RAW_MODEL_NAMES,label:"Show raw model names",type:SettingsFieldType.CHECKBOX}]},{title:SETTINGS_SECTION_TITLES.SAMPLING,icon:Funnel,fields:[{key:SETTINGS_KEYS.TEMPERATURE,label:"Temperature",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS.DYNATEMP_RANGE,label:"Dynamic temperature range",type:SettingsFieldType. INPUT},{key:SETTINGS_KEYS.DYNATEMP_EXPONENT,label:"Dynamic temperature exponent",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS.TOP_K,label:"Top K",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS.TOP_P,label:"Top P",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS.MIN_P,label:"Min P",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS.XTC_PROBABILITY,label:"XTC probability",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS.XTC_THRESHOLD,label:"XTC threshold",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS. TYP_P,label:"Typical P",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS.MAX_TOKENS,label:"Max tokens",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS.SAMPLERS,label:"Samplers",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS.BACKEND_SAMPLING,label:"Backend sampling",type:SettingsFieldType.CHECKBOX}]},{title:SETTINGS_SECTION_TITLES.PENALTIES,icon:Triangle_alert,fields:[{key:SETTINGS_KEYS.REPEAT_LAST_N,label:"Repeat last N",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS.REPEAT_PENALTY,label:"R\ epeat penalty",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS.PRESENCE_PENALTY,label:"Presence penalty",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS.FREQUENCY_PENALTY,label:"Frequency penalty",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS.DRY_MULTIPLIER,label:"DRY multiplier",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS.DRY_BASE,label:"DRY base",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS.DRY_ALLOWED_LENGTH,label:"DRY allowed length",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS. DRY_PENALTY_LAST_N,label:"DRY penalty last N",type:SettingsFieldType.INPUT}]},{title:SETTINGS_SECTION_TITLES.IMPORT_EXPORT,icon:Database,fields:[]},{title:SETTINGS_SECTION_TITLES.MCP,icon:McpLogo,fields:[{key:SETTINGS_KEYS.AGENTIC_MAX_TURNS,label:"Agentic loop max turns",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS.ALWAYS_SHOW_AGENTIC_TURNS,label:"Always show agentic turns in conversation",type:SettingsFieldType.CHECKBOX},{key:SETTINGS_KEYS.AGENTIC_MAX_TOOL_PREVIEW_LINES,label:"Max lines per\ tool preview",type:SettingsFieldType.INPUT},{key:SETTINGS_KEYS.SHOW_TOOL_CALL_IN_PROGRESS,label:"Show tool call in progress",type:SettingsFieldType.CHECKBOX}]},{title:SETTINGS_SECTION_TITLES.DEVELOPER,icon:Code,fields:[{key:SETTINGS_KEYS.PRE_ENCODE_CONVERSATION,label:"Pre-fill KV cache after response",type:SettingsFieldType.CHECKBOX},{key:SETTINGS_KEYS.DISABLE_REASONING_PARSING,label:"Disable server-side thinking extraction",type:SettingsFieldType.CHECKBOX},{key:SETTINGS_KEYS.EXCLUDE_REASONING_FROM_CONTEXT, label:"Strip thinking from message history",type:SettingsFieldType.CHECKBOX},{key:SETTINGS_KEYS.SHOW_RAW_OUTPUT_SWITCH,label:"Enable raw output toggle",type:SettingsFieldType.CHECKBOX},{key:SETTINGS_KEYS.CUSTOM,label:"Custom JSON",type:SettingsFieldType.TEXTAREA}]}];let activeSection=user_derived(()=>$$props.initialSection??SETTINGS_SECTION_TITLES.GENERAL),currentSection=user_derived(()=>settingSections.find(section=>section.title===get$4(activeSection))||settingSections[0]),localConfig=state$1( proxy({...config$1()})),canScrollLeft=state$1(!1),canScrollRight=state$1(!1),scrollContainer=state$1(void 0);user_effect(()=>{$$props.initialSection&&set$1(activeSection,$$props.initialSection)});function handleThemeChange(newTheme){get$4(localConfig).theme=newTheme,setMode(newTheme)}function handleConfigChange(key2,value){get$4(localConfig)[key2]=value}function handleReset(){set$1(localConfig,{...config$1()},!0),setMode(get$4(localConfig).theme)}function handleSave(){if(get$4(localConfig).custom&& typeof get$4(localConfig).custom=="string"&&get$4(localConfig).custom.trim())try{JSON.parse(get$4(localConfig).custom)}catch(error2){alert("Invalid JSON in custom parameters. Please check the format and try again."),console.error(error2);return}const processedConfig={...get$4(localConfig)};for(const field of NUMERIC_FIELDS)if(processedConfig[field]!==void 0&&processedConfig[field]!==""){const numValue=Number(processedConfig[field]);if(!isNaN(numValue))POSITIVE_INTEGER_FIELDS.includes(field)?processedConfig[field]= Math.max(1,Math.round(numValue)):processedConfig[field]=numValue;else{alert(`Invalid numeric value for ${field}. Please enter a valid number.`);return}}settingsStore.updateMultipleConfig(processedConfig),$$props.onSave?.()}function scrollToCenter(element2){if(!get$4(scrollContainer))return;const containerRect=get$4(scrollContainer).getBoundingClientRect(),elementRect=element2.getBoundingClientRect(),elementCenter=elementRect.left+elementRect.width/2,containerCenter=containerRect.left+containerRect. width/2,scrollOffset=elementCenter-containerCenter;get$4(scrollContainer).scrollBy({left:scrollOffset,behavior:"smooth"})}function scrollLeft(){get$4(scrollContainer)&&get$4(scrollContainer).scrollBy({left:-250,behavior:"smooth"})}function scrollRight(){get$4(scrollContainer)&&get$4(scrollContainer).scrollBy({left:250,behavior:"smooth"})}function updateScrollButtons(){if(!get$4(scrollContainer))return;const{scrollLeft:scrollLeft2,scrollWidth,clientWidth}=get$4(scrollContainer);set$1(canScrollLeft, scrollLeft2>0),set$1(canScrollRight,scrollLeft2{get$4(scrollContainer)&&updateScrollButtons()});var $$exports={reset:reset$1},fragment=root$B(),div=first_child(fragment),div_1=child(div),nav=child(div_1);each(nav,21,()=>settingSections,section=>section.title,($$anchor2,section)=>{var button=root_1$p();button.__click=()=>set$1(activeSection,get$4(section).title); var node2=child(button);component(node2,()=>get$4(section).icon,($$anchor3,section_icon)=>{section_icon($$anchor3,{class:"h-4 w-4"})});var span=sibling(node2,2),text2=child(span,!0);reset(span),reset(button),template_effect(()=>{set_class(button,1,`flex w-full cursor-pointer items-center gap-3 rounded-lg px-3 py-2 text-left text-sm transition-colors hover:bg-accent ${get$4(activeSection)===get$4(section).title?"bg-accent text-accent-foreground":"text-muted-foreground"}`),set_text(text2,get$4(section). title)}),append($$anchor2,button)}),reset(nav),reset(div_1);var div_2=sibling(div_1,2),div_3=child(div_2),div_4=child(div_3),button_1=child(div_4);button_1.__click=scrollLeft;var node_1=child(button_1);Chevron_left(node_1,{class:"h-4 w-4"}),reset(button_1);var div_5=sibling(button_1,2),div_6=child(div_5);each(div_6,21,()=>settingSections,section=>section.title,($$anchor2,section)=>{var button_2=root_2$s();button_2.__click=e=>{set$1(activeSection,get$4(section).title),scrollToCenter(e.currentTarget)}; var node_2=child(button_2);component(node_2,()=>get$4(section).icon,($$anchor3,section_icon_1)=>{section_icon_1($$anchor3,{class:"h-4 w-4 flex-shrink-0"})});var span_1=sibling(node_2,2),text_1=child(span_1,!0);reset(span_1),reset(button_2),template_effect(()=>{set_class(button_2,1,`flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-sm whitespace-nowrap transition-colors first:ml-4 last:mr-4 hover:bg-accent ${get$4(activeSection)===get$4(section).title?"bg-accent text-accent-foregro\ und":"text-muted-foreground"}`),set_text(text_1,get$4(section).title)}),append($$anchor2,button_2)}),reset(div_6),reset(div_5),bind_this(div_5,$$value=>set$1(scrollContainer,$$value),()=>get$4(scrollContainer));var button_3=sibling(div_5,2);button_3.__click=scrollRight;var node_3=child(button_3);Chevron_right(node_3,{class:"h-4 w-4"}),reset(button_3),reset(div_4),reset(div_3),reset(div_2);var node_4=sibling(div_2,2);Scroll_area(node_4,{class:"max-h-[calc(100dvh-13.5rem)] flex-1 md:max-h-[calc(10\ 0vh-13.5rem)]",children:($$anchor2,$$slotProps)=>{var div_7=root_3$n(),div_8=child(div_7),div_9=child(div_8),node_5=child(div_9);component(node_5,()=>get$4(currentSection).icon,($$anchor3,currentSection_icon)=>{currentSection_icon($$anchor3,{class:"h-5 w-5"})});var h3=sibling(node_5,2),text_2=child(h3,!0);reset(h3),reset(div_9);var node_6=sibling(div_9,2);{var consequent=$$anchor3=>{ChatSettingsImportExportTab($$anchor3,{})},alternate_1=$$anchor3=>{var fragment_2=comment$2(),node_7=first_child(fragment_2); {var consequent_1=$$anchor4=>{var div_10=root_6$f(),node_8=child(div_10);ChatSettingsFields(node_8,{get fields(){return get$4(currentSection).fields},get localConfig(){return get$4(localConfig)},onConfigChange:handleConfigChange,onThemeChange:handleThemeChange});var div_11=sibling(node_8,2),node_9=child(div_11);McpServersSettings(node_9,{}),reset(div_11),reset(div_10),append($$anchor4,div_10)},alternate=$$anchor4=>{var div_12=root_7$f(),node_10=child(div_12);ChatSettingsFields(node_10,{get fields(){ return get$4(currentSection).fields},get localConfig(){return get$4(localConfig)},onConfigChange:handleConfigChange,onThemeChange:handleThemeChange}),reset(div_12),append($$anchor4,div_12)};if_block(node_7,$$render=>{get$4(currentSection).title===SETTINGS_SECTION_TITLES.MCP?$$render(consequent_1):$$render(alternate,!1)},!0)}append($$anchor3,fragment_2)};if_block(node_6,$$render=>{get$4(currentSection).title===SETTINGS_SECTION_TITLES.IMPORT_EXPORT?$$render(consequent):$$render(alternate_1,!1)})}reset( div_8),next$1(2),reset(div_7),template_effect(()=>set_text(text_2,get$4(currentSection).title)),append($$anchor2,div_7)},$$slots:{default:!0}}),reset(div);var node_11=sibling(div,2);return ChatSettingsFooter(node_11,{onReset:handleReset,onSave:handleSave}),template_effect(()=>{set_class(button_1,1,`absolute left-2 z-10 flex h-6 w-6 items-center justify-center rounded-full bg-muted shadow-md backdrop-blur-sm transition-opacity hover:bg-accent ${get$4(canScrollLeft)?"opacity-100":"pointer-events-n\ one opacity-0"}`),set_class(button_3,1,`absolute right-2 z-10 flex h-6 w-6 items-center justify-center rounded-full bg-muted shadow-md backdrop-blur-sm transition-opacity hover:bg-accent ${get$4(canScrollRight)?"opacity-100":"pointer-events-none opacity-0"}`)}),event("scroll",div_5,updateScrollButtons),append($$anchor,fragment),pop($$exports)}delegate(["click"]);var root_1$o=from_html(" Reset to default",1),root_5$f=from_html(" ",1),root_8$b=from_html(" ",1),root_4$b=from_html(" ",1),root$A=from_html('
        ',1);function ChatSettingsFooter($$anchor,$$props){push$1($$props,!0);let showResetDialog=state$1(!1);function handleResetClick(){set$1(showResetDialog,!0)}function handleConfirmReset(){settingsStore.forceSyncWithServerDefaults(),$$props.onReset?.(),set$1(showResetDialog,!1)}function handleSave(){$$props.onSave?.()}var fragment=root$A(),div=first_child(fragment), div_1=child(div),node2=child(div_1);Button(node2,{variant:"outline",onclick:handleResetClick,children:($$anchor2,$$slotProps)=>{var fragment_1=root_1$o(),node_1=first_child(fragment_1);Rotate_ccw(node_1,{class:"h-3 w-3"}),next$1(),append($$anchor2,fragment_1)},$$slots:{default:!0}}),reset(div_1);var node_2=sibling(div_1,2);Button(node_2,{onclick:handleSave,children:($$anchor2,$$slotProps)=>{next$1();var text2=text$8("Save settings");append($$anchor2,text2)},$$slots:{default:!0}}),reset(div);var node_3=sibling( div,2);component(node_3,()=>Root$3,($$anchor2,AlertDialog_Root)=>{AlertDialog_Root($$anchor2,{get open(){return get$4(showResetDialog)},set open($$value){set$1(showResetDialog,$$value,!0)},children:($$anchor3,$$slotProps)=>{var fragment_2=comment$2(),node_4=first_child(fragment_2);component(node_4,()=>Alert_dialog_content,($$anchor4,AlertDialog_Content)=>{AlertDialog_Content($$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_3=root_4$b(),node_5=first_child(fragment_3);component(node_5,()=>Alert_dialog_header, ($$anchor6,AlertDialog_Header)=>{AlertDialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_4=root_5$f(),node_6=first_child(fragment_4);component(node_6,()=>Alert_dialog_title,($$anchor8,AlertDialog_Title)=>{AlertDialog_Title($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text_1=text$8("Reset Settings to Default");append($$anchor9,text_1)},$$slots:{default:!0}})});var node_7=sibling(node_6,2);component(node_7,()=>Alert_dialog_description,($$anchor8,AlertDialog_Description)=>{ AlertDialog_Description($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text_2=text$8(`Are you sure you want to reset all settings to their default values? This will reset all parameters to the values provided by the server's /props endpoint and remove all your custom configurations.`);append($$anchor9,text_2)},$$slots:{default:!0}})}),append($$anchor7,fragment_4)},$$slots:{default:!0}})});var node_8=sibling(node_5,2);component(node_8,()=>Alert_dialog_footer,($$anchor6,AlertDialog_Footer)=>{AlertDialog_Footer($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_5=root_8$b(),node_9=first_child(fragment_5);component(node_9,()=>Alert_dialog_cancel,($$anchor8,AlertDialog_Cancel)=>{AlertDialog_Cancel($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1(); var text_3=text$8("Cancel");append($$anchor9,text_3)},$$slots:{default:!0}})});var node_10=sibling(node_9,2);component(node_10,()=>Alert_dialog_action,($$anchor8,AlertDialog_Action)=>{AlertDialog_Action($$anchor8,{onclick:handleConfirmReset,children:($$anchor9,$$slotProps4)=>{next$1();var text_4=text$8("Reset to Default");append($$anchor9,text_4)},$$slots:{default:!0}})}),append($$anchor7,fragment_5)},$$slots:{default:!0}})}),append($$anchor5,fragment_3)},$$slots:{default:!0}})}),append($$anchor3, fragment_2)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_1$n=from_html(' ',1);function Select_item($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","value","label","children"]);var fragment=comment$2(),node2=first_child(fragment);{const children=($$anchor2,$$arg0)=>{let selected=()=>$$arg0?.(). selected,highlighted=()=>$$arg0?.().highlighted;var fragment_1=root_1$n(),span=first_child(fragment_1),node_1=child(span);{var consequent=$$anchor3=>{Check($$anchor3,{class:"size-4"})};if_block(node_1,$$render=>{selected()&&$$render(consequent)})}reset(span);var node_2=sibling(span,2);{var consequent_1=$$anchor3=>{var fragment_3=comment$2(),node_3=first_child(fragment_3);snippet(node_3,()=>$$props.children,()=>({selected:selected(),highlighted:highlighted()})),append($$anchor3,fragment_3)},alternate=$$anchor3=>{ var text2=text$8();template_effect(()=>set_text(text2,$$props.label||$$props.value)),append($$anchor3,text2)};if_block(node_2,$$render=>{$$props.children?$$render(consequent_1):$$render(alternate,!1)})}append($$anchor2,fragment_1)};let $0=user_derived(()=>cn$1("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-accent data-[highlighted]:text-acce\ nt-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",$$props.class));component(node2,()=>Select_item$1,($$anchor2,SelectPrimitive_Item)=>{SelectPrimitive_Item($$anchor2,spread_props({get value(){return $$props.value},"data-slot":"select-item",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}, children,$$slots:{default:!0}}))})}append($$anchor,fragment),pop()}function Select_scroll_up_button($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("flex cursor-default items-center justify-center py-1",$$props.class));component(node2,()=>Select_scroll_up_button$1,($$anchor2,SelectPrimitive_ScrollUpButton)=>{SelectPrimitive_ScrollUpButton( $$anchor2,spread_props({"data-slot":"select-scroll-up-button",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor3,$$slotProps)=>{Chevron_up($$anchor3,{class:"size-4"})},$$slots:{default:!0}}))})}append($$anchor,fragment),pop()}function Select_scroll_down_button($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(), node2=first_child(fragment);{let $0=user_derived(()=>cn$1("flex cursor-default items-center justify-center py-1",$$props.class));component(node2,()=>Select_scroll_down_button$1,($$anchor2,SelectPrimitive_ScrollDownButton)=>{SelectPrimitive_ScrollDownButton($$anchor2,spread_props({"data-slot":"select-scroll-down-button",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor3,$$slotProps)=>{Chevron_down($$anchor3,{class:"size-4"})}, $$slots:{default:!0}}))})}append($$anchor,fragment),pop()}var root_2$r=from_html(" ",1);function Select_content($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),sideOffset=prop($$props,"sideOffset",3,4),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","sideOffset","portalProps","children"]),cleanupInternalListeners;onMount$1(()=>{const listenerOptions={passive:!1},blockOutsideWheel=event2=>{if(!ref2())return;const target2=event2.target; (!target2||!ref2().contains(target2))&&(event2.preventDefault(),event2.stopPropagation())},blockOutsideTouchMove=event2=>{if(!ref2())return;const target2=event2.target;(!target2||!ref2().contains(target2))&&(event2.preventDefault(),event2.stopPropagation())};return document.addEventListener("wheel",blockOutsideWheel,listenerOptions),document.addEventListener("touchmove",blockOutsideTouchMove,listenerOptions),()=>{document.removeEventListener("wheel",blockOutsideWheel,listenerOptions),document.removeEventListener( "touchmove",blockOutsideTouchMove,listenerOptions)}}),user_effect(()=>{const element2=ref2();if(cleanupInternalListeners?.(),!element2)return;const stopWheelPropagation=event2=>{event2.stopPropagation()},stopTouchPropagation=event2=>{event2.stopPropagation()};element2.addEventListener("wheel",stopWheelPropagation),element2.addEventListener("touchmove",stopTouchPropagation),cleanupInternalListeners=()=>{element2.removeEventListener("wheel",stopWheelPropagation),element2.removeEventListener("touch\ move",stopTouchPropagation)}}),onDestroy(()=>{cleanupInternalListeners?.()});var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Portal$2,($$anchor2,SelectPrimitive_Portal)=>{SelectPrimitive_Portal($$anchor2,spread_props(()=>$$props.portalProps,{children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>cn$1("relative z-[var(--layer-popover,1000000)] max-h-(--bits-select-content-available-height) min-w-[8rem] origin-\ (--bits-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:translate-y-1 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:-translate-x-1 data-[side=left]:slide-in-from-right-2 data-[side=right]:translate-x-1 data-[side=right]:slide-in-from-left-2 data-[side=top]:-translate-y-1 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=clo\ sed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",$$props.class));component(node_1,()=>Select_content$1,($$anchor4,SelectPrimitive_Content)=>{SelectPrimitive_Content($$anchor4,spread_props({get sideOffset(){return sideOffset()},"data-slot":"select-content",get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$r(),node_2=first_child(fragment_2); Select_scroll_up_button(node_2,{});var node_3=sibling(node_2,2);{let $02=user_derived(()=>cn$1("h-(--bits-select-anchor-height) w-full min-w-(--bits-select-anchor-width) scroll-my-1 p-1"));component(node_3,()=>Select_viewport,($$anchor6,SelectPrimitive_Viewport)=>{SelectPrimitive_Viewport($$anchor6,{get class(){return get$4($02)},children:($$anchor7,$$slotProps3)=>{var fragment_3=comment$2(),node_4=first_child(fragment_3);snippet(node_4,()=>$$props.children??noop$3),append($$anchor7,fragment_3)}, $$slots:{default:!0}})})}var node_5=sibling(node_3,2);Select_scroll_down_button(node_5,{}),append($$anchor5,fragment_2)},$$slots:{default:!0}}))})}append($$anchor3,fragment_1)},$$slots:{default:!0}}))}),append($$anchor,fragment),pop()}var root_1$m=from_html(" ",1);function Select_trigger($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),size2=prop($$props,"size",3,"default"),variant=prop($$props,"variant",3,"default"),restProps=rest_props($$props,["$$slots","$$event\ s","$$legacy","ref","class","children","size","variant"]);const baseClasses=user_derived(()=>variant()==="plain"?"group inline-flex w-full items-center justify-end gap-2 whitespace-nowrap px-0 py-0 text-sm font-medium text-muted-foreground transition-colors focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 [&_svg]:pointer-events-none [&_svg\ ]:shrink-0 [&_svg:not([class*='size-'])]:size-3 [&_svg:not([class*='text-'])]:text-muted-foreground":"flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none select-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placehol\ der]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground"),chevronClasses=user_derived(()=>variant()==="plain"?"size-3 opacity-60 \ transition-transform group-data-[state=open]:-rotate-180":"size-4 opacity-50");var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1(get$4(baseClasses),$$props.class));component(node2,()=>Select_trigger$1,($$anchor2,SelectPrimitive_Trigger)=>{SelectPrimitive_Trigger($$anchor2,spread_props({"data-slot":"select-trigger",get"data-size"(){return size2()},get class(){return get$4($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor3,$$slotProps)=>{ var fragment_1=root_1$m(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.children??noop$3);var node_2=sibling(node_1,2);Chevron_down(node_2,{get class(){return get$4(chevronClasses)}}),append($$anchor3,fragment_1)},$$slots:{default:!0}}))})}append($$anchor,fragment),pop()}const Root=Select;var root$z=from_html("");function Textarea($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),value=prop($$props,"value",15),restProps=rest_props($$props, ["$$slots","$$events","$$legacy","ref","value","class"]);var textarea=root$z();remove_textarea_child(textarea),attribute_effect(textarea,$0=>({"data-slot":"textarea",class:$0,...restProps}),[()=>cn$1("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowe\ d disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",$$props.class)]),bind_this(textarea,$$value=>ref2($$value),()=>ref2()),bind_value(textarea,value),append($$anchor,textarea),pop()}var root_3$m=from_html(" ",1),root_6$e=from_html(''),root_7$e=from_html('

        '),root_2$q=from_html('
        ',1),root_10$8=from_html(" ",1),root_12$4=from_html('

        '),root_13$7=from_html('
        '),root_9$9=from_html(" ",1), root_17$1=from_html(" ",1),root_21$2=from_html('
        '),root_23$1=from_html(''),root_27$1=from_html('
        '),root_20$3=from_html('
        \
        ',1),root_29=from_html('

        '),root_16$2=from_html('
        ',1),root_33=from_html('

        '),root_31=from_html('
        '),root_1$l=from_html('
        ');function ChatSettingsFields($$anchor,$$props){push$1($$props,!0);let sp=user_derived(()=>{if(serverStore.isRouterMode){const m=selectedModelName();if(m)return modelsStore.getModelProps(m)?.default_generation_settings?.params??{}}return serverStore.defaultParams??{}});var fragment=comment$2(),node2=first_child(fragment);each(node2,17,()=>$$props.fields,field=>field.key,($$anchor2,field)=>{var div=root_1$l(),node_1=child(div);{var consequent_4=$$anchor3=>{const currentValue=user_derived( ()=>String($$props.localConfig[get$4(field).key]??"")),serverDefault=user_derived(()=>get$4(sp)[get$4(field).key]),isCustomRealTime=user_derived(()=>(()=>{if(get$4(serverDefault)==null||get$4(currentValue)==="")return!1;const numericInput=parseFloat(get$4(currentValue)),normalizedInput=isNaN(numericInput)?get$4(currentValue):Math.round(numericInput*1e6)/1e6,normalizedDefault=typeof get$4(serverDefault)=="number"?Math.round(get$4(serverDefault)*1e6)/1e6:get$4(serverDefault);return normalizedInput!== normalizedDefault})());var fragment_1=root_2$q(),div_1=first_child(fragment_1),node_2=child(div_1);Label(node_2,{get for(){return get$4(field).key},class:"flex items-center gap-1.5 text-sm font-medium",children:($$anchor4,$$slotProps)=>{next$1();var fragment_2=root_3$m(),text2=first_child(fragment_2),node_3=sibling(text2);{var consequent=$$anchor5=>{Flask_conical($$anchor5,{class:"h-3.5 w-3.5 text-muted-foreground"})};if_block(node_3,$$render=>{get$4(field).isExperimental&&$$render(consequent)})} template_effect(()=>set_text(text2,`${get$4(field).label??""} `)),append($$anchor4,fragment_2)},$$slots:{default:!0}});var node_4=sibling(node_2,2);{var consequent_1=$$anchor4=>{ChatSettingsParameterSourceIndicator($$anchor4,{})};if_block(node_4,$$render=>{get$4(isCustomRealTime)&&$$render(consequent_1)})}reset(div_1);var div_2=sibling(div_1,2),node_5=child(div_2);{let $0=user_derived(()=>get$4(sp)[get$4(field).key]!=null?`Default: ${normalizeFloatingPoint(get$4(sp)[get$4(field).key])}`:""),$1=user_derived( ()=>get$4(isCustomRealTime)?"pr-8":"");Input(node_5,{get id(){return get$4(field).key},get value(){return get$4(currentValue)},oninput:e=>{$$props.onConfigChange(get$4(field).key,e.currentTarget.value)},get placeholder(){return get$4($0)},get class(){return`w-full ${get$4($1)??""}`}})}var node_6=sibling(node_5,2);{var consequent_2=$$anchor4=>{var button=root_6$e();button.__click=()=>{settingsStore.resetParameterToServerDefault(get$4(field).key),$$props.onConfigChange(get$4(field).key,"")};var node_7=child( button);Rotate_ccw(node_7,{class:"h-3 w-3"}),reset(button),append($$anchor4,button)};if_block(node_6,$$render=>{get$4(isCustomRealTime)&&$$render(consequent_2)})}reset(div_2);var node_8=sibling(div_2,2);{var consequent_3=$$anchor4=>{var p_1=root_7$e(),node_9=child(p_1);html$6(node_9,()=>get$4(field).help||SETTING_CONFIG_INFO[get$4(field).key]),reset(p_1),append($$anchor4,p_1)};if_block(node_8,$$render=>{(get$4(field).help||SETTING_CONFIG_INFO[get$4(field).key])&&$$render(consequent_3)})}append($$anchor3, fragment_1)},alternate_2=$$anchor3=>{var fragment_5=comment$2(),node_10=first_child(fragment_5);{var consequent_8=$$anchor4=>{var fragment_6=root_9$9(),node_11=first_child(fragment_6);Label(node_11,{get for(){return get$4(field).key},class:"block flex items-center gap-1.5 text-sm font-medium",children:($$anchor5,$$slotProps)=>{next$1();var fragment_7=root_10$8(),text_1=first_child(fragment_7),node_12=sibling(text_1);{var consequent_5=$$anchor6=>{Flask_conical($$anchor6,{class:"h-3.5 w-3.5 text-m\ uted-foreground"})};if_block(node_12,$$render=>{get$4(field).isExperimental&&$$render(consequent_5)})}template_effect(()=>set_text(text_1,`${get$4(field).label??""} `)),append($$anchor5,fragment_7)},$$slots:{default:!0}});var node_13=sibling(node_11,2);{let $0=user_derived(()=>String($$props.localConfig[get$4(field).key]??""));Textarea(node_13,{get id(){return get$4(field).key},get value(){return get$4($0)},onchange:e=>$$props.onConfigChange(get$4(field).key,e.currentTarget.value),placeholder:"", class:"min-h-[10rem] w-full md:max-w-2xl"})}var node_14=sibling(node_13,2);{var consequent_6=$$anchor5=>{var p_2=root_12$4(),text_2=child(p_2,!0);reset(p_2),template_effect(()=>set_text(text_2,get$4(field).help||SETTING_CONFIG_INFO[get$4(field).key])),append($$anchor5,p_2)};if_block(node_14,$$render=>{(get$4(field).help||SETTING_CONFIG_INFO[get$4(field).key])&&$$render(consequent_6)})}var node_15=sibling(node_14,2);{var consequent_7=$$anchor5=>{var div_3=root_13$7(),node_16=child(div_3);{let $0=user_derived( ()=>!!($$props.localConfig.showSystemMessage??!0));Checkbox(node_16,{id:"showSystemMessage",get checked(){return get$4($0)},onCheckedChange:checked=>$$props.onConfigChange("showSystemMessage",!!checked)})}var node_17=sibling(node_16,2);Label(node_17,{for:"showSystemMessage",class:"cursor-pointer text-sm font-normal",children:($$anchor6,$$slotProps)=>{next$1();var text_3=text$8("Show system message in conversations");append($$anchor6,text_3)},$$slots:{default:!0}}),reset(div_3),append($$anchor5,div_3)}; if_block(node_15,$$render=>{get$4(field).key===SETTINGS_KEYS.SYSTEM_MESSAGE&&$$render(consequent_7)})}append($$anchor4,fragment_6)},alternate_1=$$anchor4=>{var fragment_9=comment$2(),node_18=first_child(fragment_9);{var consequent_16=$$anchor5=>{const selectedOption=user_derived(()=>get$4(field).options?.find(opt=>opt.value===$$props.localConfig[get$4(field).key])),currentValue=user_derived(()=>$$props.localConfig[get$4(field).key]),serverDefault=user_derived(()=>get$4(sp)[get$4(field).key]),isCustomRealTime=user_derived( ()=>get$4(serverDefault)==null||get$4(currentValue)===""||get$4(currentValue)===void 0?!1:get$4(currentValue)!==get$4(serverDefault));var fragment_10=root_16$2(),div_4=first_child(fragment_10),node_19=child(div_4);Label(node_19,{get for(){return get$4(field).key},class:"flex items-center gap-1.5 text-sm font-medium",children:($$anchor6,$$slotProps)=>{next$1();var fragment_11=root_17$1(),text_4=first_child(fragment_11),node_20=sibling(text_4);{var consequent_9=$$anchor7=>{Flask_conical($$anchor7, {class:"h-3.5 w-3.5 text-muted-foreground"})};if_block(node_20,$$render=>{get$4(field).isExperimental&&$$render(consequent_9)})}template_effect(()=>set_text(text_4,`${get$4(field).label??""} `)),append($$anchor6,fragment_11)},$$slots:{default:!0}});var node_21=sibling(node_19,2);{var consequent_10=$$anchor6=>{ChatSettingsParameterSourceIndicator($$anchor6,{})};if_block(node_21,$$render=>{get$4(isCustomRealTime)&&$$render(consequent_10)})}reset(div_4);var node_22=sibling(div_4,2);component(node_22, ()=>Root,($$anchor6,Select_Root)=>{Select_Root($$anchor6,{type:"single",get value(){return get$4(currentValue)},onValueChange:value=>{get$4(field).key===SETTINGS_KEYS.THEME&&value&&$$props.onThemeChange?$$props.onThemeChange(value):$$props.onConfigChange(get$4(field).key,value)},children:($$anchor7,$$slotProps)=>{var fragment_14=root_20$3(),div_5=first_child(fragment_14),node_23=child(div_5);component(node_23,()=>Select_trigger,($$anchor8,Select_Trigger)=>{Select_Trigger($$anchor8,{class:"w-full", children:($$anchor9,$$slotProps2)=>{var div_6=root_21$2(),node_24=child(div_6);{var consequent_11=$$anchor10=>{const IconComponent=user_derived(()=>get$4(selectedOption).icon);var fragment_15=comment$2(),node_25=first_child(fragment_15);component(node_25,()=>get$4(IconComponent),($$anchor11,IconComponent_1)=>{IconComponent_1($$anchor11,{class:"h-4 w-4"})}),append($$anchor10,fragment_15)};if_block(node_24,$$render=>{get$4(selectedOption)?.icon&&$$render(consequent_11)})}var text_5=sibling(node_24); reset(div_6),template_effect($0=>set_text(text_5,` ${$0??""}`),[()=>get$4(selectedOption)?.label||`Select ${get$4(field).label.toLowerCase()}`]),append($$anchor9,div_6)},$$slots:{default:!0}})});var node_26=sibling(node_23,2);{var consequent_12=$$anchor8=>{var button_1=root_23$1();button_1.__click=()=>{settingsStore.resetParameterToServerDefault(get$4(field).key),$$props.onConfigChange(get$4(field).key,"")};var node_27=child(button_1);Rotate_ccw(node_27,{class:"h-3 w-3"}),reset(button_1),append( $$anchor8,button_1)};if_block(node_26,$$render=>{get$4(isCustomRealTime)&&$$render(consequent_12)})}reset(div_5);var node_28=sibling(div_5,2);component(node_28,()=>Select_content,($$anchor8,Select_Content)=>{Select_Content($$anchor8,{children:($$anchor9,$$slotProps2)=>{var fragment_16=comment$2(),node_29=first_child(fragment_16);{var consequent_14=$$anchor10=>{var fragment_17=comment$2(),node_30=first_child(fragment_17);each(node_30,17,()=>get$4(field).options,option2=>option2.value,($$anchor11,option2)=>{ var fragment_18=comment$2(),node_31=first_child(fragment_18);component(node_31,()=>Select_item,($$anchor12,Select_Item)=>{Select_Item($$anchor12,{get value(){return get$4(option2).value},get label(){return get$4(option2).label},children:($$anchor13,$$slotProps3)=>{var div_7=root_27$1(),node_32=child(div_7);{var consequent_13=$$anchor14=>{const IconComponent=user_derived(()=>get$4(option2).icon);var fragment_19=comment$2(),node_33=first_child(fragment_19);component(node_33,()=>get$4(IconComponent), ($$anchor15,IconComponent_2)=>{IconComponent_2($$anchor15,{class:"h-4 w-4"})}),append($$anchor14,fragment_19)};if_block(node_32,$$render=>{get$4(option2).icon&&$$render(consequent_13)})}var text_6=sibling(node_32);reset(div_7),template_effect(()=>set_text(text_6,` ${get$4(option2).label??""}`)),append($$anchor13,div_7)},$$slots:{default:!0}})}),append($$anchor11,fragment_18)}),append($$anchor10,fragment_17)};if_block(node_29,$$render=>{get$4(field).options&&$$render(consequent_14)})}append($$anchor9, fragment_16)},$$slots:{default:!0}})}),append($$anchor7,fragment_14)},$$slots:{default:!0}})});var node_34=sibling(node_22,2);{var consequent_15=$$anchor6=>{var p_3=root_29(),text_7=child(p_3,!0);reset(p_3),template_effect(()=>set_text(text_7,get$4(field).help||SETTING_CONFIG_INFO[get$4(field).key])),append($$anchor6,p_3)};if_block(node_34,$$render=>{(get$4(field).help||SETTING_CONFIG_INFO[get$4(field).key])&&$$render(consequent_15)})}append($$anchor5,fragment_10)},alternate=$$anchor5=>{var fragment_20=comment$2(), node_35=first_child(fragment_20);{var consequent_19=$$anchor6=>{var div_8=root_31(),node_36=child(div_8);{let $0=user_derived(()=>!!$$props.localConfig[get$4(field).key]);Checkbox(node_36,{get id(){return get$4(field).key},get checked(){return get$4($0)},onCheckedChange:checked=>$$props.onConfigChange(get$4(field).key,checked),class:"mt-1"})}var div_9=sibling(node_36,2),label=child(div_9),text_8=child(label),node_37=sibling(text_8);{var consequent_17=$$anchor7=>{Flask_conical($$anchor7,{class:"h\ -3.5 w-3.5 text-muted-foreground"})};if_block(node_37,$$render=>{get$4(field).isExperimental&&$$render(consequent_17)})}reset(label);var node_38=sibling(label,2);{var consequent_18=$$anchor7=>{var p_4=root_33(),text_9=child(p_4,!0);reset(p_4),template_effect(()=>set_text(text_9,get$4(field).help||SETTING_CONFIG_INFO[get$4(field).key])),append($$anchor7,p_4)};if_block(node_38,$$render=>{(get$4(field).help||SETTING_CONFIG_INFO[get$4(field).key])&&$$render(consequent_18)})}reset(div_9),reset(div_8), template_effect(()=>{set_attribute(label,"for",get$4(field).key),set_text(text_8,`${get$4(field).label??""} `)}),append($$anchor6,div_8)};if_block(node_35,$$render=>{get$4(field).type===SettingsFieldType.CHECKBOX&&$$render(consequent_19)},!0)}append($$anchor5,fragment_20)};if_block(node_18,$$render=>{get$4(field).type===SettingsFieldType.SELECT?$$render(consequent_16):$$render(alternate,!1)},!0)}append($$anchor4,fragment_9)};if_block(node_10,$$render=>{get$4(field).type===SettingsFieldType.TEXTAREA? $$render(consequent_8):$$render(alternate_1,!1)},!0)}append($$anchor3,fragment_5)};if_block(node_1,$$render=>{get$4(field).type===SettingsFieldType.INPUT?$$render(consequent_4):$$render(alternate_2,!1)})}reset(div),append($$anchor2,div)}),append($$anchor,fragment),pop()}delegate(["click"]);var root_1$k=from_html(" Export conversations",1),root_3$l=from_html('
      • '),root_4$a=from_html('
      • '),root_2$p=from_html('
        '),root_5$e=from_html(" Import conversations",1),root_7$d=from_html('
      • '),root_8$a=from_html('
      • '),root_6$d=from_html('
        '),root_9$8=from_html(" Delete all conversations",1),root$y=from_html(`

        Export Conversations

        Download all your conversations as a JSON file. This includes all messages, attachments, and conversation history.

        Import Conversations

        Import one or more conversations from a previously exported JSON file. This will merge with your existing conversations.

        Delete All Conversations

        Permanently delete all conversations and their messages. This action cannot be undone. Consider exporting your conversations first if you want to keep a backup.

        `,1);function ChatSettingsImportExportTab($$anchor,$$props){push$1($$props,!0);let exportedConversations=state$1(proxy([])),importedConversations=state$1(proxy([])),showExportSummary=state$1(!1),showImportSummary=state$1(!1),showExportDialog=state$1(!1),showImportDialog=state$1(!1),availableConversations=state$1(proxy([])),messageCountMap=state$1(proxy(new Map)),fullImportData=state$1( proxy([])),showDeleteDialog=state$1(!1);async function handleExportClick(){try{const allConversations=conversations();if(allConversations.length===0){toast.info("No conversations to export");return}const conversationsWithMessages=await Promise.all(allConversations.map(async conv=>{const messages=await conversationsStore.getConversationMessages(conv.id);return{conv,messages}}));set$1(messageCountMap,createMessageCountMap(conversationsWithMessages),!0),set$1(availableConversations,allConversations, !0),set$1(showExportDialog,!0)}catch(err){console.error("Failed to load conversations:",err),alert("Failed to load conversations")}}async function handleExportConfirm(selectedConversations){try{const allData=await Promise.all(selectedConversations.map(async conv=>{const messages=await conversationsStore.getConversationMessages(conv.id);return{conv:snapshot(conv),messages:snapshot(messages)}}));conversationsStore.downloadConversationFile(allData,`${new Date().toISOString().split(ISO_DATE_TIME_SEPARATOR)[0]}\ _conversations.json`),set$1(exportedConversations,selectedConversations,!0),set$1(showExportSummary,!0),set$1(showImportSummary,!1),set$1(showExportDialog,!1)}catch(err){console.error("Export failed:",err),alert("Failed to export conversations")}}async function handleImportClick(){try{const input=document.createElement("input");input.type="file",input.accept=".json",input.onchange=async e=>{const file=e.target?.files?.[0];if(file)try{const text2=await file.text(),parsedData=JSON.parse(text2);let importedData; if(Array.isArray(parsedData))importedData=parsedData;else if(parsedData&&typeof parsedData=="object"&&"conv"in parsedData&&"messages"in parsedData)importedData=[parsedData];else throw new Error("Invalid file format: expected array of conversations or single conversation object");set$1(fullImportData,importedData,!0),set$1(availableConversations,importedData.map(item=>item.conv),!0),set$1(messageCountMap,createMessageCountMap(importedData),!0),set$1(showImportDialog,!0)}catch(err){const message=err instanceof Error?err.message:"Unknown error";console.error("Failed to parse file:",err),alert(`Failed to parse file: ${message}`)}},input.click()}catch(err){console.error("Import failed:",err),alert("Failed to import conversations")}}async function handleImportConfirm(selectedConversations){try{const selectedIds=new Set(selectedConversations.map(c2=>c2.id)),selectedData=snapshot(get$4(fullImportData)).filter(item=>selectedIds.has(item.conv.id));await conversationsStore.importConversationsData(selectedData), set$1(importedConversations,selectedConversations,!0),set$1(showImportSummary,!0),set$1(showExportSummary,!1),set$1(showImportDialog,!1)}catch(err){console.error("Import failed:",err),alert("Failed to import conversations. Please check the file format.")}}async function handleDeleteAllClick(){try{if(conversations().length===0){toast.info("No conversations to delete");return}set$1(showDeleteDialog,!0)}catch(err){console.error("Failed to load conversations for deletion:",err),toast.error("Failed t\ o load conversations")}}async function handleDeleteAllConfirm(){try{await conversationsStore.deleteAll(),set$1(showDeleteDialog,!1)}catch(err){console.error("Failed to delete conversations:",err)}}function handleDeleteAllCancel(){set$1(showDeleteDialog,!1)}var fragment=root$y(),div=first_child(fragment),div_1=child(div),div_2=child(div_1),node2=sibling(child(div_2),4);Button(node2,{class:"w-full justify-start justify-self-start md:w-auto",onclick:handleExportClick,variant:"outline",children:($$anchor2,$$slotProps)=>{ var fragment_1=root_1$k(),node_1=first_child(fragment_1);Download(node_1,{class:"mr-2 h-4 w-4"}),next$1(),append($$anchor2,fragment_1)},$$slots:{default:!0}});var node_2=sibling(node2,2);{var consequent_1=$$anchor2=>{var div_3=root_2$p(),h5=child(div_3),text_1=child(h5);reset(h5);var ul=sibling(h5,2),node_3=child(ul);each(node_3,17,()=>get$4(exportedConversations).slice(0,10),conv=>conv.id,($$anchor3,conv)=>{var li2=root_3$l(),text_2=child(li2);reset(li2),template_effect(()=>set_text(text_2,`• ${get$4( conv).name||"Untitled conversation"}`)),append($$anchor3,li2)});var node_4=sibling(node_3,2);{var consequent=$$anchor3=>{var li_1=root_4$a(),text_3=child(li_1);reset(li_1),template_effect(()=>set_text(text_3,`... and ${get$4(exportedConversations).length-10} more`)),append($$anchor3,li_1)};if_block(node_4,$$render=>{get$4(exportedConversations).length>10&&$$render(consequent)})}reset(ul),reset(div_3),template_effect(()=>set_text(text_1,`Exported ${get$4(exportedConversations).length??""} convers\ ation${get$4(exportedConversations).length===1?"":"s"}`)),append($$anchor2,div_3)};if_block(node_2,$$render=>{get$4(showExportSummary)&&get$4(exportedConversations).length>0&&$$render(consequent_1)})}reset(div_2);var div_4=sibling(div_2,2),node_5=sibling(child(div_4),4);Button(node_5,{class:"w-full justify-start justify-self-start md:w-auto",onclick:handleImportClick,variant:"outline",children:($$anchor2,$$slotProps)=>{var fragment_2=root_5$e(),node_6=first_child(fragment_2);Upload(node_6,{class:"\ mr-2 h-4 w-4"}),next$1(),append($$anchor2,fragment_2)},$$slots:{default:!0}});var node_7=sibling(node_5,2);{var consequent_3=$$anchor2=>{var div_5=root_6$d(),h5_1=child(div_5),text_4=child(h5_1);reset(h5_1);var ul_1=sibling(h5_1,2),node_8=child(ul_1);each(node_8,17,()=>get$4(importedConversations).slice(0,10),conv=>conv.id,($$anchor3,conv)=>{var li_2=root_7$d(),text_5=child(li_2);reset(li_2),template_effect(()=>set_text(text_5,`• ${get$4(conv).name||"Untitled conversation"}`)),append($$anchor3, li_2)});var node_9=sibling(node_8,2);{var consequent_2=$$anchor3=>{var li_3=root_8$a(),text_6=child(li_3);reset(li_3),template_effect(()=>set_text(text_6,`... and ${get$4(importedConversations).length-10} more`)),append($$anchor3,li_3)};if_block(node_9,$$render=>{get$4(importedConversations).length>10&&$$render(consequent_2)})}reset(ul_1),reset(div_5),template_effect(()=>set_text(text_4,`Imported ${get$4(importedConversations).length??""} conversation${get$4(importedConversations).length===1?"": "s"}`)),append($$anchor2,div_5)};if_block(node_7,$$render=>{get$4(showImportSummary)&&get$4(importedConversations).length>0&&$$render(consequent_3)})}reset(div_4);var div_6=sibling(div_4,2),node_10=sibling(child(div_6),4);Button(node_10,{class:"text-destructive-foreground w-full justify-start justify-self-start bg-destructive hover:bg-destructive/80 md:w-auto",onclick:handleDeleteAllClick,variant:"destructive",children:($$anchor2,$$slotProps)=>{var fragment_3=root_9$8(),node_11=first_child(fragment_3); Trash_2(node_11,{class:"mr-2 h-4 w-4"}),next$1(),append($$anchor2,fragment_3)},$$slots:{default:!0}}),reset(div_6),reset(div_1),reset(div);var node_12=sibling(div,2);DialogConversationSelection(node_12,{get conversations(){return get$4(availableConversations)},get messageCountMap(){return get$4(messageCountMap)},mode:"export",onCancel:()=>set$1(showExportDialog,!1),onConfirm:handleExportConfirm,get open(){return get$4(showExportDialog)},set open($$value){set$1(showExportDialog,$$value,!0)}});var node_13=sibling( node_12,2);DialogConversationSelection(node_13,{get conversations(){return get$4(availableConversations)},get messageCountMap(){return get$4(messageCountMap)},mode:"import",onCancel:()=>set$1(showImportDialog,!1),onConfirm:handleImportConfirm,get open(){return get$4(showImportDialog)},set open($$value){set$1(showImportDialog,$$value,!0)}});var node_14=sibling(node_13,2);DialogConfirmation(node_14,{title:"Delete all conversations",description:"Are you sure you want to delete all conversations? Th\ is action cannot be undone and will permanently remove all your conversations and messages.",confirmText:"Delete All",cancelText:"Cancel",variant:"destructive",get icon(){return Trash_2},onConfirm:handleDeleteAllConfirm,onCancel:handleDeleteAllCancel,get open(){return get$4(showDeleteDialog)},set open($$value){set$1(showDeleteDialog,$$value,!0)}}),append($$anchor,fragment),pop()}var root_1$j=from_html(" Custom",1);function ChatSettingsParameterSourceIndicator($$anchor,$$props){let className=prop( $$props,"class",3,"");Badge($$anchor,{variant:"secondary",get class(){return`h-5 bg-orange-100 px-1.5 py-0.5 text-xs text-orange-800 dark:bg-orange-900 dark:text-orange-200 ${className()??""}`},children:($$anchor2,$$slotProps)=>{var fragment_1=root_1$j(),node2=first_child(fragment_1);Wrench(node2,{class:"mr-1 h-3 w-3"}),next$1(),append($$anchor2,fragment_1)},$$slots:{default:!0}})}var root_1$i=from_html('
        '),root_3$k=from_html('
        New chat
        ',1),root_4$9=from_html('
        Search
        ',1),root_5$d=from_html('
        MCP Servers
        '),root_2$o=from_html(" ",1),root$x=from_html('
        ');function ChatSidebarActions($$anchor,$$props){push$1($$props,!0);let isSearchModeActive=prop($$props,"isSearchModeActive",15),searchQuery=prop($$props,"searchQuery",15),searchInput=state$1(null);const chatSettingsDialog=getChatSettingsDialogContext(); function handleSearchModeDeactivate(){isSearchModeActive(!1),searchQuery("")}user_effect(()=>{isSearchModeActive()&&get$4(searchInput)?.focus()});var div=root$x(),node2=child(div);{var consequent=$$anchor2=>{var div_1=root_1$i(),node_1=child(div_1);Search(node_1,{class:"absolute top-2.5 left-2 h-4 w-4 text-muted-foreground"});var node_2=sibling(node_1,2);Input(node_2,{onkeydown:e=>e.key==="Escape"&&handleSearchModeDeactivate(),placeholder:"Search conversations...",class:"pl-8",get ref(){return get$4( searchInput)},set ref($$value){set$1(searchInput,$$value,!0)},get value(){return searchQuery()},set value($$value){searchQuery($$value)}});var node_3=sibling(node_2,2);X(node_3,{class:"cursor-pointertext-muted-foreground absolute top-2.5 right-2 h-4 w-4",onclick:handleSearchModeDeactivate}),reset(div_1),append($$anchor2,div_1)},alternate=$$anchor2=>{var fragment=root_2$o(),node_4=first_child(fragment);Button(node_4,{class:"w-full justify-between backdrop-blur-none! hover:[&>kbd]:opacity-100",href:"\ ?new_chat=true#/",get onclick(){return $$props.handleMobileSidebarItemClick},variant:"ghost",children:($$anchor3,$$slotProps)=>{var fragment_1=root_3$k(),div_2=first_child(fragment_1),node_5=child(div_2);Square_pen(node_5,{class:"h-4 w-4"}),next$1(),reset(div_2);var node_6=sibling(div_2,2);KeyboardShortcutInfo(node_6,{keys:["shift","cmd","o"]}),append($$anchor3,fragment_1)},$$slots:{default:!0}});var node_7=sibling(node_4,2);Button(node_7,{class:"w-full justify-between backdrop-blur-none! hover:\ [&>kbd]:opacity-100",onclick:()=>{isSearchModeActive(!0)},variant:"ghost",children:($$anchor3,$$slotProps)=>{var fragment_2=root_4$9(),div_3=first_child(fragment_2),node_8=child(div_3);Search(node_8,{class:"h-4 w-4"}),next$1(),reset(div_3);var node_9=sibling(div_3,2);KeyboardShortcutInfo(node_9,{keys:["cmd","k"]}),append($$anchor3,fragment_2)},$$slots:{default:!0}});var node_10=sibling(node_7,2);Button(node_10,{class:"w-full justify-between backdrop-blur-none! hover:[&>kbd]:opacity-100",onclick:()=>{ chatSettingsDialog.open(SETTINGS_SECTION_TITLES.MCP)},variant:"ghost",children:($$anchor3,$$slotProps)=>{var div_4=root_5$d(),node_11=child(div_4);McpLogo(node_11,{class:"h-4 w-4"}),next$1(),reset(div_4),append($$anchor3,div_4)},$$slots:{default:!0}}),append($$anchor2,fragment)};if_block(node2,$$render=>{isSearchModeActive()?$$render(consequent):$$render(alternate,!1)})}reset(div),append($$anchor,div),pop()}var root_2$n=from_html('

        llama.cpp

        ',1),root_10$7=from_html('

        '),root_7$c=from_html(" ",1),root_3$j=from_html(" ",1),root_1$h=from_html(" ",1),root_12$3=from_html('
        '),root$w=from_html(" ",1);function ChatSidebar($$anchor,$$props){push$1($$props,!0);const sidebar=useSidebar();let currentChatId=user_derived(()=>page$1. params.id),isSearchModeActive=state$1(!1),searchQuery=state$1(""),showDeleteDialog=state$1(!1),deleteWithForks=state$1(!1),showEditDialog=state$1(!1),selectedConversation=state$1(null),editedName=state$1(""),selectedConversationNamePreview=user_derived(()=>get$4(selectedConversation)?getPreviewText(get$4(selectedConversation).name):""),filteredConversations=user_derived(()=>get$4(searchQuery).trim().length>0?conversations().filter(conversation=>conversation.name.toLowerCase().includes(get$4(searchQuery). toLowerCase())):conversations()),conversationTree=user_derived(()=>buildConversationTree(get$4(filteredConversations))),selectedConversationHasDescendants=user_derived(()=>{if(!get$4(selectedConversation))return!1;const allConvs=conversations(),queue=[get$4(selectedConversation).id];for(;queue.length>0;){const parentId=queue.pop();for(const c2 of allConvs)if(c2.forkedFromConversationId===parentId)return!0}return!1});async function handleDeleteConversation(id2){const conversation=conversations(). find(conv=>conv.id===id2);conversation&&(set$1(selectedConversation,conversation,!0),set$1(deleteWithForks,!1),set$1(showDeleteDialog,!0))}async function handleEditConversation(id2){const conversation=conversations().find(conv=>conv.id===id2);conversation&&(set$1(selectedConversation,conversation,!0),set$1(editedName,conversation.name,!0),set$1(showEditDialog,!0))}function handleConfirmDelete(){if(get$4(selectedConversation)){const convId=get$4(selectedConversation).id,withForks=get$4(deleteWithForks); set$1(showDeleteDialog,!1),setTimeout(()=>{conversationsStore.deleteConversation(convId,{deleteWithForks:withForks})},100)}}function handleConfirmEdit(){!get$4(editedName).trim()||!get$4(selectedConversation)||(set$1(showEditDialog,!1),conversationsStore.updateConversationName(get$4(selectedConversation).id,get$4(editedName)),set$1(selectedConversation,null))}function handleMobileSidebarItemClick(){sidebar.isMobile&&sidebar.toggle()}function activateSearchMode(){set$1(isSearchModeActive,!0)}function editActiveConversation(){ if(get$4(currentChatId)&&get$4(filteredConversations).find(conv=>conv.id===get$4(currentChatId))){const event2=new CustomEvent("edit-active-conversation",{detail:{conversationId:get$4(currentChatId)}});document.dispatchEvent(event2)}}async function selectConversation(id2){get$4(isSearchModeActive)&&(set$1(isSearchModeActive,!1),set$1(searchQuery,"")),await goto(`#/chat/${id2}`)}function handleStopGeneration(id2){chatStore.stopGenerationForChat(id2)}var $$exports={handleMobileSidebarItemClick,activateSearchMode, editActiveConversation},fragment=root$w(),node2=first_child(fragment);Scroll_area(node2,{class:"h-[100vh]",children:($$anchor2,$$slotProps)=>{var fragment_1=root_1$h(),node_1=first_child(fragment_1);component(node_1,()=>Sidebar_header,($$anchor3,Sidebar_Header)=>{Sidebar_Header($$anchor3,{class:" top-0 z-10 gap-4 bg-sidebar/50 p-4 pb-2 backdrop-blur-lg md:sticky",children:($$anchor4,$$slotProps2)=>{var fragment_2=root_2$n(),a=first_child(fragment_2);a.__click=handleMobileSidebarItemClick;var node_2=sibling( a,2);ChatSidebarActions(node_2,{handleMobileSidebarItemClick,get isSearchModeActive(){return get$4(isSearchModeActive)},set isSearchModeActive($$value){set$1(isSearchModeActive,$$value,!0)},get searchQuery(){return get$4(searchQuery)},set searchQuery($$value){set$1(searchQuery,$$value,!0)}}),append($$anchor4,fragment_2)},$$slots:{default:!0}})});var node_3=sibling(node_1,2);component(node_3,()=>Sidebar_group,($$anchor3,Sidebar_Group)=>{Sidebar_Group($$anchor3,{class:"mt-2 space-y-2 p-0 px-4",children:($$anchor4,$$slotProps2)=>{ var fragment_3=root_3$j(),node_4=first_child(fragment_3);{var consequent=$$anchor5=>{var fragment_4=comment$2(),node_5=first_child(fragment_4);component(node_5,()=>Sidebar_group_label,($$anchor6,Sidebar_GroupLabel)=>{Sidebar_GroupLabel($$anchor6,{children:($$anchor7,$$slotProps3)=>{next$1();var text2=text$8();template_effect(()=>set_text(text2,get$4(isSearchModeActive)?"Search results":"Conversations")),append($$anchor7,text2)},$$slots:{default:!0}})}),append($$anchor5,fragment_4)};if_block(node_4, $$render=>{(get$4(filteredConversations).length>0&&get$4(isSearchModeActive)||!get$4(isSearchModeActive))&&$$render(consequent)})}var node_6=sibling(node_4,2);component(node_6,()=>Sidebar_group_content,($$anchor5,Sidebar_GroupContent)=>{Sidebar_GroupContent($$anchor5,{children:($$anchor6,$$slotProps3)=>{var fragment_6=comment$2(),node_7=first_child(fragment_6);component(node_7,()=>Sidebar_menu,($$anchor7,Sidebar_Menu)=>{Sidebar_Menu($$anchor7,{children:($$anchor8,$$slotProps4)=>{var fragment_7=root_7$c(), node_8=first_child(fragment_7);each(node_8,17,()=>get$4(conversationTree),({conversation,depth})=>conversation.id,($$anchor9,$$item)=>{let conversation=()=>get$4($$item).conversation,depth=()=>get$4($$item).depth;var fragment_8=comment$2(),node_9=first_child(fragment_8);component(node_9,()=>Sidebar_menu_item,($$anchor10,Sidebar_MenuItem)=>{Sidebar_MenuItem($$anchor10,{class:"mb-1 p-0",children:($$anchor11,$$slotProps5)=>{{let $0=user_derived(()=>({id:conversation().id,name:conversation().name,lastModified:conversation(). lastModified,currNode:conversation().currNode,forkedFromConversationId:conversation().forkedFromConversationId})),$1=user_derived(()=>get$4(currentChatId)===conversation().id);ChatSidebarConversationItem($$anchor11,{get conversation(){return get$4($0)},get depth(){return depth()},handleMobileSidebarItemClick,get isActive(){return get$4($1)},onSelect:selectConversation,onEdit:handleEditConversation,onDelete:handleDeleteConversation,onStop:handleStopGeneration})}},$$slots:{default:!0}})}),append($$anchor9, fragment_8)});var node_10=sibling(node_8,2);{var consequent_1=$$anchor9=>{var div=root_10$7(),p2=child(div),text_1=child(p2,!0);reset(p2),reset(div),template_effect(()=>set_text(text_1,get$4(searchQuery).length>0?"No results found":get$4(isSearchModeActive)?"Start typing to see results":"No conversations yet")),append($$anchor9,div)};if_block(node_10,$$render=>{get$4(conversationTree).length===0&&$$render(consequent_1)})}append($$anchor8,fragment_7)},$$slots:{default:!0}})}),append($$anchor6,fragment_6)}, $$slots:{default:!0}})}),append($$anchor4,fragment_3)},$$slots:{default:!0}})}),append($$anchor2,fragment_1)},$$slots:{default:!0}});var node_11=sibling(node2,2);{let $0=user_derived(()=>get$4(selectedConversation)?`Are you sure you want to delete "${get$4(selectedConversationNamePreview)}"? This action cannot be undone and will permanently remove all messages in this conversation.`:"");DialogConfirmation(node_11,{title:"Delete Conversation",get description(){return get$4($0)},confirmText:"Delet\ e",cancelText:"Cancel",variant:"destructive",get icon(){return Trash_2},onConfirm:handleConfirmDelete,onCancel:()=>{set$1(showDeleteDialog,!1),set$1(selectedConversation,null)},get open(){return get$4(showDeleteDialog)},set open($$value){set$1(showDeleteDialog,$$value,!0)},children:($$anchor2,$$slotProps)=>{var fragment_10=comment$2(),node_12=first_child(fragment_10);{var consequent_2=$$anchor3=>{var div_1=root_12$3(),node_13=child(div_1);Checkbox(node_13,{id:"delete-with-forks",get checked(){return get$4( deleteWithForks)},set checked($$value){set$1(deleteWithForks,$$value,!0)}});var node_14=sibling(node_13,2);Label(node_14,{for:"delete-with-forks",class:"text-sm",children:($$anchor4,$$slotProps2)=>{next$1();var text_2=text$8("Also delete all forked conversations");append($$anchor4,text_2)},$$slots:{default:!0}}),reset(div_1),append($$anchor3,div_1)};if_block(node_12,$$render=>{get$4(selectedConversationHasDescendants)&&$$render(consequent_2)})}append($$anchor2,fragment_10)},$$slots:{default:!0}})} var node_15=sibling(node_11,2);return DialogConfirmation(node_15,{title:"Edit Conversation Name",description:"",confirmText:"Save",cancelText:"Cancel",get icon(){return Pencil},onConfirm:handleConfirmEdit,onCancel:()=>{set$1(showEditDialog,!1),set$1(selectedConversation,null)},onKeydown:e=>{e.key==="Enter"&&(e.preventDefault(),e.stopImmediatePropagation(),handleConfirmEdit())},get open(){return get$4(showEditDialog)},set open($$value){set$1(showEditDialog,$$value,!0)},children:($$anchor2,$$slotProps)=>{ Input($$anchor2,{class:"text-foreground",placeholder:"Enter a new name",type:"text",get value(){return get$4(editedName)},set value($$value){set$1(editedName,$$value,!0)}})},$$slots:{default:!0}}),append($$anchor,fragment),pop($$exports)}delegate(["click"]);var root_3$i=from_html(''),root_4$8=from_html("

        See parent conversation

        "),root_2$m=from_html(" ",1),root_7$b=from_html('
        '),root_8$9=from_html("

        Stop generation

        "),root_6$c=from_html(" ",1),root_9$7=from_html('
        '),root$v=from_html('');function ChatSidebarConversationItem($$anchor,$$props){push$1($$props,!0);let isActive=prop($$props,"isActive",3,!1),depth=prop($$props,"depth",3,0),renderActionsDropdown=state$1(!1),dropdownOpen=state$1(!1),isLoading2=user_derived(()=>getAllLoadingChats().includes($$props.conversation.id));function handleEdit(event2){event2.stopPropagation(),$$props.onEdit?.($$props.conversation.id)}function handleDelete2(event2){event2.stopPropagation(),$$props. onDelete?.($$props.conversation.id)}function handleStop(event2){event2.stopPropagation(),$$props.onStop?.($$props.conversation.id)}function handleGlobalEditEvent(event2){event2.detail.conversationId===$$props.conversation.id&&isActive()&&handleEdit(event2)}function handleMouseLeave(){get$4(dropdownOpen)||set$1(renderActionsDropdown,!1)}function handleMouseOver(){set$1(renderActionsDropdown,!0)}function handleSelect(){$$props.onSelect?.($$props.conversation.id)}user_effect(()=>{get$4(dropdownOpen)|| set$1(renderActionsDropdown,!1)}),onMount$1(()=>(document.addEventListener("edit-active-conversation",handleGlobalEditEvent),()=>{document.removeEventListener("edit-active-conversation",handleGlobalEditEvent)}));var button=root$v();button.__click=handleSelect,button.__mouseover=handleMouseOver;var div=child(button);let styles2;var node2=child(div);{var consequent=$$anchor2=>{var fragment=comment$2(),node_1=first_child(fragment);component(node_1,()=>Root$5,($$anchor3,Tooltip_Root)=>{Tooltip_Root( $$anchor3,{children:($$anchor4,$$slotProps)=>{var fragment_1=root_2$m(),node_2=first_child(fragment_1);component(node_2,()=>Tooltip_trigger,($$anchor5,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor5,{children:($$anchor6,$$slotProps2)=>{var a=root_3$i(),node_3=child(a);Git_branch(node_3,{class:"h-3.5 w-3.5"}),reset(a),template_effect(()=>set_attribute(a,"href",`#/chat/${$$props.conversation.forkedFromConversationId??""}`)),append($$anchor6,a)},$$slots:{default:!0}})});var node_4=sibling(node_2,2);component( node_4,()=>Tooltip_content,($$anchor5,Tooltip_Content)=>{Tooltip_Content($$anchor5,{children:($$anchor6,$$slotProps2)=>{var p2=root_4$8();append($$anchor6,p2)},$$slots:{default:!0}})}),append($$anchor4,fragment_1)},$$slots:{default:!0}})}),append($$anchor2,fragment)};if_block(node2,$$render=>{depth()>0&&$$render(consequent)})}var node_5=sibling(node2,2);{var consequent_1=$$anchor2=>{var fragment_2=comment$2(),node_6=first_child(fragment_2);component(node_6,()=>Root$5,($$anchor3,Tooltip_Root_1)=>{ Tooltip_Root_1($$anchor3,{children:($$anchor4,$$slotProps)=>{var fragment_3=root_6$c(),node_7=first_child(fragment_3);component(node_7,()=>Tooltip_trigger,($$anchor5,Tooltip_Trigger_1)=>{Tooltip_Trigger_1($$anchor5,{children:($$anchor6,$$slotProps2)=>{var div_1=root_7$b();div_1.__click=handleStop,div_1.__keydown=e=>e.key==="Enter"&&handleStop(e);var node_8=child(div_1);Loader_circle(node_8,{class:"loading-icon h-3.5 w-3.5 animate-spin"});var node_9=sibling(node_8,2);Square(node_9,{class:"stop-ic\ on hidden h-3 w-3 fill-current text-destructive"}),reset(div_1),append($$anchor6,div_1)},$$slots:{default:!0}})});var node_10=sibling(node_7,2);component(node_10,()=>Tooltip_content,($$anchor5,Tooltip_Content_1)=>{Tooltip_Content_1($$anchor5,{children:($$anchor6,$$slotProps2)=>{var p_1=root_8$9();append($$anchor6,p_1)},$$slots:{default:!0}})}),append($$anchor4,fragment_3)},$$slots:{default:!0}})}),append($$anchor2,fragment_2)};if_block(node_5,$$render=>{get$4(isLoading2)&&$$render(consequent_1)})} var span=sibling(node_5,2);span.__click=function(...$$args){$$props.handleMobileSidebarItemClick?.apply(this,$$args)};var text2=child(span,!0);reset(span),reset(div);var node_11=sibling(div,2);{var consequent_2=$$anchor2=>{var div_2=root_9$7(),node_12=child(div_2);{let $0=user_derived(()=>[{icon:Pencil,label:"Edit",onclick:handleEdit,shortcut:["shift","cmd","e"]},{icon:Download,label:"Export",onclick:e=>{e.stopPropagation(),conversationsStore.downloadConversation($$props.conversation.id)},shortcut:[ "shift","cmd","s"]},{icon:Trash_2,label:"Delete",onclick:handleDelete2,variant:"destructive",shortcut:["shift","cmd","d"],separator:!0}]);DropdownMenuActions(node_12,{get triggerIcon(){return Ellipsis},triggerTooltip:"More actions",get actions(){return get$4($0)},get open(){return get$4(dropdownOpen)},set open($$value){set$1(dropdownOpen,$$value,!0)}})}reset(div_2),append($$anchor2,div_2)};if_block(node_11,$$render=>{get$4(renderActionsDropdown)&&$$render(consequent_2)})}reset(button),template_effect( ()=>{set_class(button,1,`group flex min-h-9 w-full cursor-pointer items-center justify-between space-x-3 rounded-lg py-1.5 text-left transition-colors hover:bg-foreground/10 ${isActive()?"bg-foreground/5 text-accent-foreground":""} px-3`,"svelte-76ksb2"),styles2=set_style(div,"",styles2,{"padding-left":`${depth()*FORK_TREE_DEPTH_PADDING}px`}),set_text(text2,$$props.conversation.name)}),event("mouseleave",button,handleMouseLeave),append($$anchor,button),pop()}delegate(["click","mouseover","keydow\ n"]);const emptyOptions$7={};function toString$1(value,options){const settings=emptyOptions$7,includeImageAlt=typeof settings.includeImageAlt=="boolean"?settings.includeImageAlt:!0,includeHtml=typeof settings.includeHtml=="boolean"?settings.includeHtml:!0;return one$2(value,includeImageAlt,includeHtml)}function one$2(value,includeImageAlt,includeHtml){if(node(value)){if("value"in value)return value.type==="html"&&!includeHtml?"":value.value;if(includeImageAlt&&"alt"in value&&value.alt)return value. alt;if("children"in value)return all$2(value.children,includeImageAlt,includeHtml)}return Array.isArray(value)?all$2(value,includeImageAlt,includeHtml):""}function all$2(values,includeImageAlt,includeHtml){const result=[];let index2=-1;for(;++index2end?0:end+start2:start2=start2>end?end:start2,remove2=remove2>0?remove2:0,items2.length<1e4)parameters=Array.from(items2),parameters.unshift(start2, remove2),list2.splice(...parameters);else for(remove2&&list2.splice(start2,remove2);chunkStart0?(splice(list2,list2.length,0,items2),list2):items2}const hasOwnProperty={}.hasOwnProperty;function combineExtensions(extensions){const all2={};let index2=-1;for(;++index213&&code2<32||code2>126&&code2<160||code2>55295&&code2<57344||code2>64975&&code2<65008||(code2&65535)===65535||(code2&65535)===65534||code2>1114111?"�":String.fromCodePoint(code2)}function normalizeIdentifier(value){return value.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase(). toUpperCase()}const asciiAlpha=regexCheck(/[A-Za-z]/),asciiAlphanumeric=regexCheck(/[\dA-Za-z]/),asciiAtext=regexCheck(/[#-'*+\--9=?A-Z^-~]/);function asciiControl(code2){return code2!==null&&(code2<32||code2===127)}const asciiDigit=regexCheck(/\d/),asciiHexDigit=regexCheck(/[\dA-Fa-f]/),asciiPunctuation=regexCheck(/[!-/:-@[-`{-~]/);function markdownLineEnding(code2){return code2!==null&&code2<-2}function markdownLineEndingOrSpace(code2){return code2!==null&&(code2<0||code2===32)}function markdownSpace(code2){ return code2===-2||code2===-1||code2===32}const unicodePunctuation=regexCheck(new RegExp("\\p{P}|\\p{S}","u")),unicodeWhitespace=regexCheck(/\s/);function regexCheck(regex){return check;function check(code2){return code2!==null&&code2>-1&®ex.test(String.fromCharCode(code2))}}function normalizeUri(value){const result=[];let index2=-1,start2=0,skip=0;for(;++index255295&&code2<57344){const next2=value.charCodeAt(index2+1);code2<56320&&next2>56319&&next2<57344?(replace2=String.fromCharCode(code2,next2),skip=1):replace2="�"}else replace2=String.fromCharCode(code2);replace2&&(result.push(value.slice(start2,index2),encodeURIComponent(replace2)),start2=index2+skip+1,replace2=""),skip&&(index2+=skip,skip= 0)}return result.join("")+value.slice(start2)}function factorySpace(effects,ok,type2,max2){const limit2=max2?max2-1:Number.POSITIVE_INFINITY;let size2=0;return start2;function start2(code2){return markdownSpace(code2)?(effects.enter(type2),prefix(code2)):ok(code2)}function prefix(code2){return markdownSpace(code2)&&size2++lineStartOffset))return;const indexBeforeExits=self2.events.length; let indexBeforeFlow=indexBeforeExits,seen2,point2;for(;indexBeforeFlow--;)if(self2.events[indexBeforeFlow][0]==="exit"&&self2.events[indexBeforeFlow][1].type==="chunkFlow"){if(seen2){point2=self2.events[indexBeforeFlow][1].end;break}seen2=!0}for(exitContainers(continued),index2=indexBeforeExits;index2size2;){const entry=stack[index2];self2.containerState=entry[1],entry[0].exit.call(self2,effects)}stack.length=size2}function closeFlow(){childFlow.write([null]),childToken=void 0,childFlow=void 0,self2.containerState._closeFlow=void 0}}function tokenizeContainer(effects,ok,nok){return factorySpace(effects,effects.attempt(this.parser.constructs.document,ok,nok),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function classifyCharacter(code2){ if(code2===null||markdownLineEndingOrSpace(code2)||unicodeWhitespace(code2))return 1;if(unicodePunctuation(code2))return 2}function resolveAll(constructs2,events,context){const called=[];let index2=-1;for(;++index21&&events[index2][1].end.offset-events[index2][1].start.offset>1?2:1;const start2={...events[open2][1].end},end={...events[index2][1].start};movePoint(start2,-use),movePoint(end,use),openingSequence={type:use>1?"strongSequence":"em\ phasisSequence",start:start2,end:{...events[open2][1].end}},closingSequence={type:use>1?"strongSequence":"emphasisSequence",start:{...events[index2][1].start},end},text2={type:use>1?"strongText":"emphasisText",start:{...events[open2][1].end},end:{...events[index2][1].start}},group={type:use>1?"strong":"emphasis",start:{...openingSequence.start},end:{...closingSequence.end}},events[open2][1].end={...openingSequence.start},events[index2][1].start={...closingSequence.end},nextEvents=[],events[open2][1]. end.offset-events[open2][1].start.offset&&(nextEvents=push(nextEvents,[["enter",events[open2][1],context],["exit",events[open2][1],context]])),nextEvents=push(nextEvents,[["enter",group,context],["enter",openingSequence,context],["exit",openingSequence,context],["enter",text2,context]]),nextEvents=push(nextEvents,resolveAll(context.parser.constructs.insideSpan.null,events.slice(open2+1,index2),context)),nextEvents=push(nextEvents,[["exit",text2,context],["enter",closingSequence,context],["exit", closingSequence,context],["exit",group,context]]),events[index2][1].end.offset-events[index2][1].start.offset?(offset2=2,nextEvents=push(nextEvents,[["enter",events[index2][1],context],["exit",events[index2][1],context]])):offset2=0,splice(events,open2-1,index2-open2+3,nextEvents),index2=open2+nextEvents.length-offset2-2;break}}for(index2=-1;++index20&&markdownSpace(code2)?factorySpace(effects,beforeContentChunk,"linePrefix",initialPrefix+1)(code2):beforeContentChunk(code2)}function beforeContentChunk(code2){return code2===null||markdownLineEnding(code2)?effects.check(nonLazyContinuation$1,atNonLazyBreak, after)(code2):(effects.enter("codeFlowValue"),contentChunk(code2))}function contentChunk(code2){return code2===null||markdownLineEnding(code2)?(effects.exit("codeFlowValue"),beforeContentChunk(code2)):(effects.consume(code2),contentChunk)}function after(code2){return effects.exit("codeFenced"),ok(code2)}function tokenizeCloseStart(effects2,ok2,nok2){let size2=0;return startBefore;function startBefore(code2){return effects2.enter("lineEnding"),effects2.consume(code2),effects2.exit("lineEnding"),start3} function start3(code2){return effects2.enter("codeFencedFence"),markdownSpace(code2)?factorySpace(effects2,beforeSequenceClose,"linePrefix",self2.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(code2):beforeSequenceClose(code2)}function beforeSequenceClose(code2){return code2===marker?(effects2.enter("codeFencedFenceSequence"),sequenceClose(code2)):nok2(code2)}function sequenceClose(code2){return code2===marker?(size2++,effects2.consume(code2),sequenceClose):size2>=sizeOpen?(effects2. exit("codeFencedFenceSequence"),markdownSpace(code2)?factorySpace(effects2,sequenceCloseAfter,"whitespace")(code2):sequenceCloseAfter(code2)):nok2(code2)}function sequenceCloseAfter(code2){return code2===null||markdownLineEnding(code2)?(effects2.exit("codeFencedFence"),ok2(code2)):nok2(code2)}}}function tokenizeNonLazyContinuation$1(effects,ok,nok){const self2=this;return start2;function start2(code2){return code2===null?nok(code2):(effects.enter("lineEnding"),effects.consume(code2),effects.exit( "lineEnding"),lineStart)}function lineStart(code2){return self2.parser.lazy[self2.now().line]?nok(code2):ok(code2)}}const codeIndented={name:"codeIndented",tokenize:tokenizeCodeIndented},furtherStart={partial:!0,tokenize:tokenizeFurtherStart};function tokenizeCodeIndented(effects,ok,nok){const self2=this;return start2;function start2(code2){return effects.enter("codeIndented"),factorySpace(effects,afterPrefix,"linePrefix",5)(code2)}function afterPrefix(code2){const tail=self2.events[self2.events. length-1];return tail&&tail[1].type==="linePrefix"&&tail[2].sliceSerialize(tail[1],!0).length>=4?atBreak(code2):nok(code2)}function atBreak(code2){return code2===null?after(code2):markdownLineEnding(code2)?effects.attempt(furtherStart,atBreak,after)(code2):(effects.enter("codeFlowValue"),inside(code2))}function inside(code2){return code2===null||markdownLineEnding(code2)?(effects.exit("codeFlowValue"),atBreak(code2)):(effects.consume(code2),inside)}function after(code2){return effects.exit("code\ Indented"),ok(code2)}}function tokenizeFurtherStart(effects,ok,nok){const self2=this;return furtherStart2;function furtherStart2(code2){return self2.parser.lazy[self2.now().line]?nok(code2):markdownLineEnding(code2)?(effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),furtherStart2):factorySpace(effects,afterPrefix,"linePrefix",5)(code2)}function afterPrefix(code2){const tail=self2.events[self2.events.length-1];return tail&&tail[1].type==="linePrefix"&&tail[2].sliceSerialize( tail[1],!0).length>=4?ok(code2):markdownLineEnding(code2)?furtherStart2(code2):nok(code2)}}const codeText={name:"codeText",previous:previous$2,resolve:resolveCodeText,tokenize:tokenizeCodeText};function resolveCodeText(events){let tailExitIndex=events.length-4,headEnterIndex=3,index2,enter;if((events[headEnterIndex][1].type==="lineEnding"||events[headEnterIndex][1].type==="space")&&(events[tailExitIndex][1].type==="lineEnding"||events[tailExitIndex][1].type==="space")){for(index2=headEnterIndex;++index2< tailExitIndex;)if(events[index2][1].type==="codeTextData"){events[headEnterIndex][1].type="codeTextPadding",events[tailExitIndex][1].type="codeTextPadding",headEnterIndex+=2,tailExitIndex-=2;break}}for(index2=headEnterIndex-1,tailExitIndex++;++index2<=tailExitIndex;)enter===void 0?index2!==tailExitIndex&&events[index2][1].type!=="lineEnding"&&(enter=index2):(index2===tailExitIndex||events[index2][1].type==="lineEnding")&&(events[enter][1].type="codeTextData",index2!==enter+2&&(events[enter][1].end= events[index2-1][1].end,events.splice(enter+2,index2-enter-2),tailExitIndex-=index2-enter-2,index2=enter+2),enter=void 0);return events}function previous$2(code2){return code2!==96||this.events[this.events.length-1][1].type==="characterEscape"}function tokenizeCodeText(effects,ok,nok){let sizeOpen=0,size2,token2;return start2;function start2(code2){return effects.enter("codeText"),effects.enter("codeTextSequence"),sequenceOpen(code2)}function sequenceOpen(code2){return code2===96?(effects.consume( code2),sizeOpen++,sequenceOpen):(effects.exit("codeTextSequence"),between2(code2))}function between2(code2){return code2===null?nok(code2):code2===32?(effects.enter("space"),effects.consume(code2),effects.exit("space"),between2):code2===96?(token2=effects.enter("codeTextSequence"),size2=0,sequenceClose(code2)):markdownLineEnding(code2)?(effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),between2):(effects.enter("codeTextData"),data(code2))}function data(code2){return code2=== null||code2===32||code2===96||markdownLineEnding(code2)?(effects.exit("codeTextData"),between2(code2)):(effects.consume(code2),data)}function sequenceClose(code2){return code2===96?(effects.consume(code2),size2++,sequenceClose):size2===sizeOpen?(effects.exit("codeTextSequence"),effects.exit("codeText"),ok(code2)):(token2.type="codeTextData",data(code2))}}class SpliceBuffer{constructor(initial){this.left=initial?[...initial]:[],this.right=[]}get(index2){if(index2<0||index2>=this.left.length+this. right.length)throw new RangeError("Cannot access index `"+index2+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return index2this.left.length?this.right. slice(this.right.length-stop+this.left.length,this.right.length-start2+this.left.length).reverse():this.left.slice(start2).concat(this.right.slice(this.right.length-stop+this.left.length).reverse())}splice(start2,deleteCount,items2){const count=deleteCount||0;this.setCursor(Math.trunc(start2));const removed=this.right.splice(this.right.length-count,Number.POSITIVE_INFINITY);return items2&&chunkedPush(this.left,items2),removed.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left. pop()}push(item){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(item)}pushMany(items2){this.setCursor(Number.POSITIVE_INFINITY),chunkedPush(this.left,items2)}unshift(item){this.setCursor(0),this.right.push(item)}unshiftMany(items2){this.setCursor(0),chunkedPush(this.right,items2.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?ok(code2):effects.interrupt(self2.parser.constructs.flow,nok,ok)(code2)}}function factoryDestination(effects,ok,nok,type2,literalType,literalMarkerType,rawType,stringType,max2){const limit2=max2||Number.POSITIVE_INFINITY;let balance=0;return start2;function start2(code2){return code2===60?(effects.enter(type2),effects.enter(literalType), effects.enter(literalMarkerType),effects.consume(code2),effects.exit(literalMarkerType),enclosedBefore):code2===null||code2===32||code2===41||asciiControl(code2)?nok(code2):(effects.enter(type2),effects.enter(rawType),effects.enter(stringType),effects.enter("chunkString",{contentType:"string"}),raw2(code2))}function enclosedBefore(code2){return code2===62?(effects.enter(literalMarkerType),effects.consume(code2),effects.exit(literalMarkerType),effects.exit(literalType),effects.exit(type2),ok):(effects. enter(stringType),effects.enter("chunkString",{contentType:"string"}),enclosed(code2))}function enclosed(code2){return code2===62?(effects.exit("chunkString"),effects.exit(stringType),enclosedBefore(code2)):code2===null||code2===60||markdownLineEnding(code2)?nok(code2):(effects.consume(code2),code2===92?enclosedEscape:enclosed)}function enclosedEscape(code2){return code2===60||code2===62||code2===92?(effects.consume(code2),enclosed):enclosed(code2)}function raw2(code2){return!balance&&(code2===null|| code2===41||markdownLineEndingOrSpace(code2))?(effects.exit("chunkString"),effects.exit(stringType),effects.exit(rawType),effects.exit(type2),ok(code2)):balance999||code2===null||code2===91||code2===93&&!seen2||code2===94&&!size2&&"_hiddenFootnoteSupport"in self2.parser.constructs?nok(code2):code2===93?(effects.exit(stringType),effects.enter(markerType), effects.consume(code2),effects.exit(markerType),effects.exit(type2),ok):markdownLineEnding(code2)?(effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),atBreak):(effects.enter("chunkString",{contentType:"string"}),labelInside(code2))}function labelInside(code2){return code2===null||code2===91||code2===93||markdownLineEnding(code2)||size2++>999?(effects.exit("chunkString"),atBreak(code2)):(effects.consume(code2),seen2||(seen2=!markdownSpace(code2)),code2===92?labelEscape: labelInside)}function labelEscape(code2){return code2===91||code2===92||code2===93?(effects.consume(code2),size2++,labelInside):labelInside(code2)}}function factoryTitle(effects,ok,nok,type2,markerType,stringType){let marker;return start2;function start2(code2){return code2===34||code2===39||code2===40?(effects.enter(type2),effects.enter(markerType),effects.consume(code2),effects.exit(markerType),marker=code2===40?41:code2,begin):nok(code2)}function begin(code2){return code2===marker?(effects.enter( markerType),effects.consume(code2),effects.exit(markerType),effects.exit(type2),ok):(effects.enter(stringType),atBreak(code2))}function atBreak(code2){return code2===marker?(effects.exit(stringType),begin(marker)):code2===null?nok(code2):markdownLineEnding(code2)?(effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),factorySpace(effects,atBreak,"linePrefix")):(effects.enter("chunkString",{contentType:"string"}),inside(code2))}function inside(code2){return code2===marker|| code2===null||markdownLineEnding(code2)?(effects.exit("chunkString"),atBreak(code2)):(effects.consume(code2),code2===92?escape2:inside)}function escape2(code2){return code2===marker||code2===92?(effects.consume(code2),inside):inside(code2)}}function factoryWhitespace(effects,ok){let seen2;return start2;function start2(code2){return markdownLineEnding(code2)?(effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),seen2=!0,start2):markdownSpace(code2)?factorySpace(effects,start2, seen2?"linePrefix":"lineSuffix")(code2):ok(code2)}}const definition$1={name:"definition",tokenize:tokenizeDefinition},titleBefore={partial:!0,tokenize:tokenizeTitleBefore};function tokenizeDefinition(effects,ok,nok){const self2=this;let identifier2;return start2;function start2(code2){return effects.enter("definition"),before(code2)}function before(code2){return factoryLabel.call(self2,effects,labelAfter,nok,"definitionLabel","definitionLabelMarker","definitionLabelString")(code2)}function labelAfter(code2){ return identifier2=normalizeIdentifier(self2.sliceSerialize(self2.events[self2.events.length-1][1]).slice(1,-1)),code2===58?(effects.enter("definitionMarker"),effects.consume(code2),effects.exit("definitionMarker"),markerAfter):nok(code2)}function markerAfter(code2){return markdownLineEndingOrSpace(code2)?factoryWhitespace(effects,destinationBefore)(code2):destinationBefore(code2)}function destinationBefore(code2){return factoryDestination(effects,destinationAfter,nok,"definitionDestination","de\ finitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(code2)}function destinationAfter(code2){return effects.attempt(titleBefore,after,after)(code2)}function after(code2){return markdownSpace(code2)?factorySpace(effects,afterWhitespace,"whitespace")(code2):afterWhitespace(code2)}function afterWhitespace(code2){return code2===null||markdownLineEnding(code2)?(effects.exit("definition"),self2.parser.defined.push(identifier2),ok(code2)): nok(code2)}}function tokenizeTitleBefore(effects,ok,nok){return titleBefore2;function titleBefore2(code2){return markdownLineEndingOrSpace(code2)?factoryWhitespace(effects,beforeMarker)(code2):nok(code2)}function beforeMarker(code2){return factoryTitle(effects,titleAfter,nok,"definitionTitle","definitionTitleMarker","definitionTitleString")(code2)}function titleAfter(code2){return markdownSpace(code2)?factorySpace(effects,titleAfterOptionalWhitespace,"whitespace")(code2):titleAfterOptionalWhitespace( code2)}function titleAfterOptionalWhitespace(code2){return code2===null||markdownLineEnding(code2)?ok(code2):nok(code2)}}const hardBreakEscape={name:"hardBreakEscape",tokenize:tokenizeHardBreakEscape};function tokenizeHardBreakEscape(effects,ok,nok){return start2;function start2(code2){return effects.enter("hardBreakEscape"),effects.consume(code2),after}function after(code2){return markdownLineEnding(code2)?(effects.exit("hardBreakEscape"),ok(code2)):nok(code2)}}const headingAtx={name:"headingAt\ x",resolve:resolveHeadingAtx,tokenize:tokenizeHeadingAtx};function resolveHeadingAtx(events,context){let contentEnd=events.length-2,contentStart=3,content2,text2;return events[contentStart][1].type==="whitespace"&&(contentStart+=2),contentEnd-2>contentStart&&events[contentEnd][1].type==="whitespace"&&(contentEnd-=2),events[contentEnd][1].type==="atxHeadingSequence"&&(contentStart===contentEnd-1||contentEnd-4>contentStart&&events[contentEnd-2][1].type==="whitespace")&&(contentEnd-=contentStart+1=== contentEnd?2:4),contentEnd>contentStart&&(content2={type:"atxHeadingText",start:events[contentStart][1].start,end:events[contentEnd][1].end},text2={type:"chunkText",start:events[contentStart][1].start,end:events[contentEnd][1].end,contentType:"text"},splice(events,contentStart,contentEnd-contentStart+1,[["enter",content2,context],["enter",text2,context],["exit",text2,context],["exit",content2,context]])),events}function tokenizeHeadingAtx(effects,ok,nok){let size2=0;return start2;function start2(code2){ return effects.enter("atxHeading"),before(code2)}function before(code2){return effects.enter("atxHeadingSequence"),sequenceOpen(code2)}function sequenceOpen(code2){return code2===35&&size2++<6?(effects.consume(code2),sequenceOpen):code2===null||markdownLineEndingOrSpace(code2)?(effects.exit("atxHeadingSequence"),atBreak(code2)):nok(code2)}function atBreak(code2){return code2===35?(effects.enter("atxHeadingSequence"),sequenceFurther(code2)):code2===null||markdownLineEnding(code2)?(effects.exit("a\ txHeading"),ok(code2)):markdownSpace(code2)?factorySpace(effects,atBreak,"whitespace")(code2):(effects.enter("atxHeadingText"),data(code2))}function sequenceFurther(code2){return code2===35?(effects.consume(code2),sequenceFurther):(effects.exit("atxHeadingSequence"),atBreak(code2))}function data(code2){return code2===null||code2===35||markdownLineEndingOrSpace(code2)?(effects.exit("atxHeadingText"),atBreak(code2)):(effects.consume(code2),data)}}const htmlBlockNames=["address","article","aside","\ base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],htmlRawNames=["pre","script","style","textarea"], htmlFlow={concrete:!0,name:"htmlFlow",resolveTo:resolveToHtmlFlow,tokenize:tokenizeHtmlFlow},blankLineBefore={partial:!0,tokenize:tokenizeBlankLineBefore},nonLazyContinuationStart={partial:!0,tokenize:tokenizeNonLazyContinuationStart};function resolveToHtmlFlow(events){let index2=events.length;for(;index2--&&!(events[index2][0]==="enter"&&events[index2][1].type==="htmlFlow"););return index2>1&&events[index2-2][1].type==="linePrefix"&&(events[index2][1].start=events[index2-2][1].start,events[index2+ 1][1].start=events[index2-2][1].start,events.splice(index2-2,2)),events}function tokenizeHtmlFlow(effects,ok,nok){const self2=this;let marker,closingTag,buffer,index2,markerB;return start2;function start2(code2){return before(code2)}function before(code2){return effects.enter("htmlFlow"),effects.enter("htmlFlowData"),effects.consume(code2),open2}function open2(code2){return code2===33?(effects.consume(code2),declarationOpen):code2===47?(effects.consume(code2),closingTag=!0,tagCloseStart):code2=== 63?(effects.consume(code2),marker=3,self2.interrupt?ok:continuationDeclarationInside):asciiAlpha(code2)?(effects.consume(code2),buffer=String.fromCharCode(code2),tagName):nok(code2)}function declarationOpen(code2){return code2===45?(effects.consume(code2),marker=2,commentOpenInside):code2===91?(effects.consume(code2),marker=5,index2=0,cdataOpenInside):asciiAlpha(code2)?(effects.consume(code2),marker=4,self2.interrupt?ok:continuationDeclarationInside):nok(code2)}function commentOpenInside(code2){ return code2===45?(effects.consume(code2),self2.interrupt?ok:continuationDeclarationInside):nok(code2)}function cdataOpenInside(code2){const value="CDATA[";return code2===value.charCodeAt(index2++)?(effects.consume(code2),index2===value.length?self2.interrupt?ok:continuation:cdataOpenInside):nok(code2)}function tagCloseStart(code2){return asciiAlpha(code2)?(effects.consume(code2),buffer=String.fromCharCode(code2),tagName):nok(code2)}function tagName(code2){if(code2===null||code2===47||code2===62|| markdownLineEndingOrSpace(code2)){const slash=code2===47,name=buffer.toLowerCase();return!slash&&!closingTag&&htmlRawNames.includes(name)?(marker=1,self2.interrupt?ok(code2):continuation(code2)):htmlBlockNames.includes(buffer.toLowerCase())?(marker=6,slash?(effects.consume(code2),basicSelfClosing):self2.interrupt?ok(code2):continuation(code2)):(marker=7,self2.interrupt&&!self2.parser.lazy[self2.now().line]?nok(code2):closingTag?completeClosingTagAfter(code2):completeAttributeNameBefore(code2))}return code2=== 45||asciiAlphanumeric(code2)?(effects.consume(code2),buffer+=String.fromCharCode(code2),tagName):nok(code2)}function basicSelfClosing(code2){return code2===62?(effects.consume(code2),self2.interrupt?ok:continuation):nok(code2)}function completeClosingTagAfter(code2){return markdownSpace(code2)?(effects.consume(code2),completeClosingTagAfter):completeEnd(code2)}function completeAttributeNameBefore(code2){return code2===47?(effects.consume(code2),completeEnd):code2===58||code2===95||asciiAlpha(code2)? (effects.consume(code2),completeAttributeName):markdownSpace(code2)?(effects.consume(code2),completeAttributeNameBefore):completeEnd(code2)}function completeAttributeName(code2){return code2===45||code2===46||code2===58||code2===95||asciiAlphanumeric(code2)?(effects.consume(code2),completeAttributeName):completeAttributeNameAfter(code2)}function completeAttributeNameAfter(code2){return code2===61?(effects.consume(code2),completeAttributeValueBefore):markdownSpace(code2)?(effects.consume(code2),completeAttributeNameAfter): completeAttributeNameBefore(code2)}function completeAttributeValueBefore(code2){return code2===null||code2===60||code2===61||code2===62||code2===96?nok(code2):code2===34||code2===39?(effects.consume(code2),markerB=code2,completeAttributeValueQuoted):markdownSpace(code2)?(effects.consume(code2),completeAttributeValueBefore):completeAttributeValueUnquoted(code2)}function completeAttributeValueQuoted(code2){return code2===markerB?(effects.consume(code2),markerB=null,completeAttributeValueQuotedAfter): code2===null||markdownLineEnding(code2)?nok(code2):(effects.consume(code2),completeAttributeValueQuoted)}function completeAttributeValueUnquoted(code2){return code2===null||code2===34||code2===39||code2===47||code2===60||code2===61||code2===62||code2===96||markdownLineEndingOrSpace(code2)?completeAttributeNameAfter(code2):(effects.consume(code2),completeAttributeValueUnquoted)}function completeAttributeValueQuotedAfter(code2){return code2===47||code2===62||markdownSpace(code2)?completeAttributeNameBefore( code2):nok(code2)}function completeEnd(code2){return code2===62?(effects.consume(code2),completeAfter):nok(code2)}function completeAfter(code2){return code2===null||markdownLineEnding(code2)?continuation(code2):markdownSpace(code2)?(effects.consume(code2),completeAfter):nok(code2)}function continuation(code2){return code2===45&&marker===2?(effects.consume(code2),continuationCommentInside):code2===60&&marker===1?(effects.consume(code2),continuationRawTagOpen):code2===62&&marker===4?(effects.consume( code2),continuationClose):code2===63&&marker===3?(effects.consume(code2),continuationDeclarationInside):code2===93&&marker===5?(effects.consume(code2),continuationCdataInside):markdownLineEnding(code2)&&(marker===6||marker===7)?(effects.exit("htmlFlowData"),effects.check(blankLineBefore,continuationAfter,continuationStart)(code2)):code2===null||markdownLineEnding(code2)?(effects.exit("htmlFlowData"),continuationStart(code2)):(effects.consume(code2),continuation)}function continuationStart(code2){ return effects.check(nonLazyContinuationStart,continuationStartNonLazy,continuationAfter)(code2)}function continuationStartNonLazy(code2){return effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),continuationBefore}function continuationBefore(code2){return code2===null||markdownLineEnding(code2)?continuationStart(code2):(effects.enter("htmlFlowData"),continuation(code2))}function continuationCommentInside(code2){return code2===45?(effects.consume(code2),continuationDeclarationInside): continuation(code2)}function continuationRawTagOpen(code2){return code2===47?(effects.consume(code2),buffer="",continuationRawEndTag):continuation(code2)}function continuationRawEndTag(code2){if(code2===62){const name=buffer.toLowerCase();return htmlRawNames.includes(name)?(effects.consume(code2),continuationClose):continuation(code2)}return asciiAlpha(code2)&&buffer.length<8?(effects.consume(code2),buffer+=String.fromCharCode(code2),continuationRawEndTag):continuation(code2)}function continuationCdataInside(code2){ return code2===93?(effects.consume(code2),continuationDeclarationInside):continuation(code2)}function continuationDeclarationInside(code2){return code2===62?(effects.consume(code2),continuationClose):code2===45&&marker===2?(effects.consume(code2),continuationDeclarationInside):continuation(code2)}function continuationClose(code2){return code2===null||markdownLineEnding(code2)?(effects.exit("htmlFlowData"),continuationAfter(code2)):(effects.consume(code2),continuationClose)}function continuationAfter(code2){ return effects.exit("htmlFlow"),ok(code2)}}function tokenizeNonLazyContinuationStart(effects,ok,nok){const self2=this;return start2;function start2(code2){return markdownLineEnding(code2)?(effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),after):nok(code2)}function after(code2){return self2.parser.lazy[self2.now().line]?nok(code2):ok(code2)}}function tokenizeBlankLineBefore(effects,ok,nok){return start2;function start2(code2){return effects.enter("lineEnding"),effects. consume(code2),effects.exit("lineEnding"),effects.attempt(blankLine,ok,nok)}}const htmlText={name:"htmlText",tokenize:tokenizeHtmlText};function tokenizeHtmlText(effects,ok,nok){const self2=this;let marker,index2,returnState;return start2;function start2(code2){return effects.enter("htmlText"),effects.enter("htmlTextData"),effects.consume(code2),open2}function open2(code2){return code2===33?(effects.consume(code2),declarationOpen):code2===47?(effects.consume(code2),tagCloseStart):code2===63?(effects. consume(code2),instruction):asciiAlpha(code2)?(effects.consume(code2),tagOpen):nok(code2)}function declarationOpen(code2){return code2===45?(effects.consume(code2),commentOpenInside):code2===91?(effects.consume(code2),index2=0,cdataOpenInside):asciiAlpha(code2)?(effects.consume(code2),declaration):nok(code2)}function commentOpenInside(code2){return code2===45?(effects.consume(code2),commentEnd):nok(code2)}function comment2(code2){return code2===null?nok(code2):code2===45?(effects.consume(code2), commentClose):markdownLineEnding(code2)?(returnState=comment2,lineEndingBefore(code2)):(effects.consume(code2),comment2)}function commentClose(code2){return code2===45?(effects.consume(code2),commentEnd):comment2(code2)}function commentEnd(code2){return code2===62?end(code2):code2===45?commentClose(code2):comment2(code2)}function cdataOpenInside(code2){const value="CDATA[";return code2===value.charCodeAt(index2++)?(effects.consume(code2),index2===value.length?cdata:cdataOpenInside):nok(code2)}function cdata(code2){ return code2===null?nok(code2):code2===93?(effects.consume(code2),cdataClose):markdownLineEnding(code2)?(returnState=cdata,lineEndingBefore(code2)):(effects.consume(code2),cdata)}function cdataClose(code2){return code2===93?(effects.consume(code2),cdataEnd):cdata(code2)}function cdataEnd(code2){return code2===62?end(code2):code2===93?(effects.consume(code2),cdataEnd):cdata(code2)}function declaration(code2){return code2===null||code2===62?end(code2):markdownLineEnding(code2)?(returnState=declaration, lineEndingBefore(code2)):(effects.consume(code2),declaration)}function instruction(code2){return code2===null?nok(code2):code2===63?(effects.consume(code2),instructionClose):markdownLineEnding(code2)?(returnState=instruction,lineEndingBefore(code2)):(effects.consume(code2),instruction)}function instructionClose(code2){return code2===62?end(code2):instruction(code2)}function tagCloseStart(code2){return asciiAlpha(code2)?(effects.consume(code2),tagClose):nok(code2)}function tagClose(code2){return code2=== 45||asciiAlphanumeric(code2)?(effects.consume(code2),tagClose):tagCloseBetween(code2)}function tagCloseBetween(code2){return markdownLineEnding(code2)?(returnState=tagCloseBetween,lineEndingBefore(code2)):markdownSpace(code2)?(effects.consume(code2),tagCloseBetween):end(code2)}function tagOpen(code2){return code2===45||asciiAlphanumeric(code2)?(effects.consume(code2),tagOpen):code2===47||code2===62||markdownLineEndingOrSpace(code2)?tagOpenBetween(code2):nok(code2)}function tagOpenBetween(code2){ return code2===47?(effects.consume(code2),end):code2===58||code2===95||asciiAlpha(code2)?(effects.consume(code2),tagOpenAttributeName):markdownLineEnding(code2)?(returnState=tagOpenBetween,lineEndingBefore(code2)):markdownSpace(code2)?(effects.consume(code2),tagOpenBetween):end(code2)}function tagOpenAttributeName(code2){return code2===45||code2===46||code2===58||code2===95||asciiAlphanumeric(code2)?(effects.consume(code2),tagOpenAttributeName):tagOpenAttributeNameAfter(code2)}function tagOpenAttributeNameAfter(code2){ return code2===61?(effects.consume(code2),tagOpenAttributeValueBefore):markdownLineEnding(code2)?(returnState=tagOpenAttributeNameAfter,lineEndingBefore(code2)):markdownSpace(code2)?(effects.consume(code2),tagOpenAttributeNameAfter):tagOpenBetween(code2)}function tagOpenAttributeValueBefore(code2){return code2===null||code2===60||code2===61||code2===62||code2===96?nok(code2):code2===34||code2===39?(effects.consume(code2),marker=code2,tagOpenAttributeValueQuoted):markdownLineEnding(code2)?(returnState= tagOpenAttributeValueBefore,lineEndingBefore(code2)):markdownSpace(code2)?(effects.consume(code2),tagOpenAttributeValueBefore):(effects.consume(code2),tagOpenAttributeValueUnquoted)}function tagOpenAttributeValueQuoted(code2){return code2===marker?(effects.consume(code2),marker=void 0,tagOpenAttributeValueQuotedAfter):code2===null?nok(code2):markdownLineEnding(code2)?(returnState=tagOpenAttributeValueQuoted,lineEndingBefore(code2)):(effects.consume(code2),tagOpenAttributeValueQuoted)}function tagOpenAttributeValueUnquoted(code2){ return code2===null||code2===34||code2===39||code2===60||code2===61||code2===96?nok(code2):code2===47||code2===62||markdownLineEndingOrSpace(code2)?tagOpenBetween(code2):(effects.consume(code2),tagOpenAttributeValueUnquoted)}function tagOpenAttributeValueQuotedAfter(code2){return code2===47||code2===62||markdownLineEndingOrSpace(code2)?tagOpenBetween(code2):nok(code2)}function end(code2){return code2===62?(effects.consume(code2),effects.exit("htmlTextData"),effects.exit("htmlText"),ok):nok(code2)} function lineEndingBefore(code2){return effects.exit("htmlTextData"),effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),lineEndingAfter}function lineEndingAfter(code2){return markdownSpace(code2)?factorySpace(effects,lineEndingAfterPrefix,"linePrefix",self2.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(code2):lineEndingAfterPrefix(code2)}function lineEndingAfterPrefix(code2){return effects.enter("htmlTextData"),returnState(code2)}}const labelEnd={name:"\ labelEnd",resolveAll:resolveAllLabelEnd,resolveTo:resolveToLabelEnd,tokenize:tokenizeLabelEnd},resourceConstruct={tokenize:tokenizeResource},referenceFullConstruct={tokenize:tokenizeReferenceFull},referenceCollapsedConstruct={tokenize:tokenizeReferenceCollapsed};function resolveAllLabelEnd(events){let index2=-1;const newEvents=[];for(;++index2=3&&(code2===null||markdownLineEnding(code2))?(effects.exit("thematicBreak"),ok(code2)):nok(code2)}function sequence(code2){return code2===marker?(effects.consume(code2),size2++,sequence):(effects.exit("thematicBreakSequence"),markdownSpace(code2)?factorySpace(effects,atBreak,"whi\ tespace")(code2):atBreak(code2))}}const list$3={continuation:{tokenize:tokenizeListContinuation},exit:tokenizeListEnd,name:"list",tokenize:tokenizeListStart},listItemPrefixWhitespaceConstruct={partial:!0,tokenize:tokenizeListItemPrefixWhitespace},indentConstruct={partial:!0,tokenize:tokenizeIndent$1};function tokenizeListStart(effects,ok,nok){const self2=this,tail=self2.events[self2.events.length-1];let initialSize=tail&&tail[1].type==="linePrefix"?tail[2].sliceSerialize(tail[1],!0).length:0,size2=0; return start2;function start2(code2){const kind=self2.containerState.type||(code2===42||code2===43||code2===45?"listUnordered":"listOrdered");if(kind==="listUnordered"?!self2.containerState.marker||code2===self2.containerState.marker:asciiDigit(code2)){if(self2.containerState.type||(self2.containerState.type=kind,effects.enter(kind,{_container:!0})),kind==="listUnordered")return effects.enter("listItemPrefix"),code2===42||code2===45?effects.check(thematicBreak$2,nok,atMarker)(code2):atMarker(code2); if(!self2.interrupt||code2===49)return effects.enter("listItemPrefix"),effects.enter("listItemValue"),inside(code2)}return nok(code2)}function inside(code2){return asciiDigit(code2)&&++size2<10?(effects.consume(code2),inside):(!self2.interrupt||size2<2)&&(self2.containerState.marker?code2===self2.containerState.marker:code2===41||code2===46)?(effects.exit("listItemValue"),atMarker(code2)):nok(code2)}function atMarker(code2){return effects.enter("listItemMarker"),effects.consume(code2),effects.exit( "listItemMarker"),self2.containerState.marker=self2.containerState.marker||code2,effects.check(blankLine,self2.interrupt?nok:onBlank,effects.attempt(listItemPrefixWhitespaceConstruct,endOfPrefix,otherPrefix))}function onBlank(code2){return self2.containerState.initialBlankLine=!0,initialSize++,endOfPrefix(code2)}function otherPrefix(code2){return markdownSpace(code2)?(effects.enter("listItemPrefixWhitespace"),effects.consume(code2),effects.exit("listItemPrefixWhitespace"),endOfPrefix):nok(code2)} function endOfPrefix(code2){return self2.containerState.size=initialSize+self2.sliceSerialize(effects.exit("listItemPrefix"),!0).length,ok(code2)}}function tokenizeListContinuation(effects,ok,nok){const self2=this;return self2.containerState._closeFlow=void 0,effects.check(blankLine,onBlank,notBlank);function onBlank(code2){return self2.containerState.furtherBlankLines=self2.containerState.furtherBlankLines||self2.containerState.initialBlankLine,factorySpace(effects,ok,"listItemIndent",self2.containerState. size+1)(code2)}function notBlank(code2){return self2.containerState.furtherBlankLines||!markdownSpace(code2)?(self2.containerState.furtherBlankLines=void 0,self2.containerState.initialBlankLine=void 0,notInCurrentItem(code2)):(self2.containerState.furtherBlankLines=void 0,self2.containerState.initialBlankLine=void 0,effects.attempt(indentConstruct,ok,notInCurrentItem)(code2))}function notInCurrentItem(code2){return self2.containerState._closeFlow=!0,self2.interrupt=void 0,factorySpace(effects,effects. attempt(list$3,ok,nok),"linePrefix",self2.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(code2)}}function tokenizeIndent$1(effects,ok,nok){const self2=this;return factorySpace(effects,afterPrefix,"listItemIndent",self2.containerState.size+1);function afterPrefix(code2){const tail=self2.events[self2.events.length-1];return tail&&tail[1].type==="listItemIndent"&&tail[2].sliceSerialize(tail[1],!0).length===self2.containerState.size?ok(code2):nok(code2)}}function tokenizeListEnd(effects){ effects.exit(this.containerState.type)}function tokenizeListItemPrefixWhitespace(effects,ok,nok){const self2=this;return factorySpace(effects,afterPrefix,"listItemPrefixWhitespace",self2.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function afterPrefix(code2){const tail=self2.events[self2.events.length-1];return!markdownSpace(code2)&&tail&&tail[1].type==="listItemPrefixWhitespace"?ok(code2):nok(code2)}}const setextUnderline={name:"setextUnderline",resolveTo:resolveToSetextUnderline, tokenize:tokenizeSetextUnderline};function resolveToSetextUnderline(events,context){let index2=events.length,content2,text2,definition2;for(;index2--;)if(events[index2][0]==="enter"){if(events[index2][1].type==="content"){content2=index2;break}events[index2][1].type==="paragraph"&&(text2=index2)}else events[index2][1].type==="content"&&events.splice(index2,1),!definition2&&events[index2][1].type==="definition"&&(definition2=index2);const heading2={type:"setextHeading",start:{...events[content2][1]. start},end:{...events[events.length-1][1].end}};return events[text2][1].type="setextHeadingText",definition2?(events.splice(text2,0,["enter",heading2,context]),events.splice(definition2+1,0,["exit",events[content2][1],context]),events[content2][1].end={...events[definition2][1].end}):events[content2][1]=heading2,events.push(["exit",heading2,context]),events}function tokenizeSetextUnderline(effects,ok,nok){const self2=this;let marker;return start2;function start2(code2){let index2=self2.events.length, paragraph2;for(;index2--;)if(self2.events[index2][1].type!=="lineEnding"&&self2.events[index2][1].type!=="linePrefix"&&self2.events[index2][1].type!=="content"){paragraph2=self2.events[index2][1].type==="paragraph";break}return!self2.parser.lazy[self2.now().line]&&(self2.interrupt||paragraph2)?(effects.enter("setextHeadingLine"),marker=code2,before(code2)):nok(code2)}function before(code2){return effects.enter("setextHeadingLineSequence"),inside(code2)}function inside(code2){return code2===marker? (effects.consume(code2),inside):(effects.exit("setextHeadingLineSequence"),markdownSpace(code2)?factorySpace(effects,after,"lineSuffix")(code2):after(code2))}function after(code2){return code2===null||markdownLineEnding(code2)?(effects.exit("setextHeadingLine"),ok(code2)):nok(code2)}}const flow$1={tokenize:initializeFlow};function initializeFlow(effects){const self2=this,initial=effects.attempt(blankLine,atBlankEnding,effects.attempt(this.parser.constructs.flowInitial,afterConstruct,factorySpace( effects,effects.attempt(this.parser.constructs.flow,afterConstruct,effects.attempt(content,afterConstruct)),"linePrefix")));return initial;function atBlankEnding(code2){if(code2===null){effects.consume(code2);return}return effects.enter("lineEndingBlank"),effects.consume(code2),effects.exit("lineEndingBlank"),self2.currentConstruct=void 0,initial}function afterConstruct(code2){if(code2===null){effects.consume(code2);return}return effects.enter("lineEnding"),effects.consume(code2),effects.exit("l\ ineEnding"),self2.currentConstruct=void 0,initial}}const resolver={resolveAll:createResolver()},string$1=initializeFactory("string"),text$7=initializeFactory("text");function initializeFactory(field){return{resolveAll:createResolver(field==="text"?resolveAllLineSuffixes:void 0),tokenize:initializeText};function initializeText(effects){const self2=this,constructs2=this.parser.constructs[field],text2=effects.attempt(constructs2,start2,notText);return start2;function start2(code2){return atBreak(code2)? text2(code2):notText(code2)}function notText(code2){if(code2===null){effects.consume(code2);return}return effects.enter("data"),effects.consume(code2),data}function data(code2){return atBreak(code2)?(effects.exit("data"),text2(code2)):(effects.consume(code2),data)}function atBreak(code2){if(code2===null)return!0;const list2=constructs2[code2];let index2=-1;if(list2)for(;++index2-1){const head2=view[0];typeof head2=="string"?view[0]=head2.slice(startBufferIndex):view.shift()}endBufferIndex>0&&view.push(chunks[endIndex].slice(0,endBufferIndex))}return view}function serializeChunks(chunks,expandTabs){let index2=-1;const result=[];let atTab;for(;++index20){const tail=context.tokenStack[context.tokenStack.length-1];(tail[1]||defaultOnError).call(context,void 0,tail[0])}for(tree.position={start:point$2(events.length>0?events[0][1].start:{line:1,column:1,offset:0}),end:point$2(events.length>0?events[events.length-2][1].end:{line:1,column:1,offset:0})}, index2=-1;++index2 "),tracker.shift(2);const value=state2.indentLines(state2.containerFlow(node2,tracker.current()),map$1);return exit2(),value}function map$1(line,_,blank){return">"+(blank?"":" ")+line}function patternInScope(stack,pattern2){return listInScope(stack,pattern2.inConstruct,!0)&&!listInScope(stack,pattern2.notInConstruct,!1)}function listInScope(stack,list2,none){ if(typeof list2=="string"&&(list2=[list2]),!list2||list2.length===0)return none;let index2=-1;for(;++index2max2&&(max2=count):count=1,expected=index2+substring.length,index2=source2.indexOf(substring,expected);return max2}function formatCodeAsIndented(node2,state2){return!!(state2.options.fences===!1&&node2.value&&!node2.lang&&/[^ \r\n]/.test(node2.value)&& !/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(node2.value))}function checkFence(state2){const marker=state2.options.fence||"`";if(marker!=="`"&&marker!=="~")throw new Error("Cannot serialize code with `"+marker+"` for `options.fence`, expected `` ` `` or `~`");return marker}function code$2(node2,_,state2,info2){const marker=checkFence(state2),raw2=node2.value||"",suffix=marker==="`"?"GraveAccent":"Tilde";if(formatCodeAsIndented(node2,state2)){const exit3=state2.enter("codeIndented"),value2=state2. indentLines(raw2,map);return exit3(),value2}const tracker=state2.createTracker(info2),sequence=marker.repeat(Math.max(longestStreak(raw2,marker)+1,3)),exit2=state2.enter("codeFenced");let value=tracker.move(sequence);if(node2.lang){const subexit=state2.enter(`codeFencedLang${suffix}`);value+=tracker.move(state2.safe(node2.lang,{before:value,after:" ",encode:["`"],...tracker.current()})),subexit()}if(node2.lang&&node2.meta){const subexit=state2.enter(`codeFencedMeta${suffix}`);value+=tracker.move( " "),value+=tracker.move(state2.safe(node2.meta,{before:value,after:` `,encode:["`"],...tracker.current()})),subexit()}return value+=tracker.move(` `),raw2&&(value+=tracker.move(raw2+` `)),value+=tracker.move(sequence),exit2(),value}function map(line,_,blank){return(blank?"":" ")+line}function checkQuote(state2){const marker=state2.options.quote||'"';if(marker!=='"'&&marker!=="'")throw new Error("Cannot serialize title with `"+marker+"` for `options.quote`, expected `\"`, or `'`");return marker}function definition(node2,_,state2,info2){const quote=checkQuote(state2),suffix=quote==='"'?"Quote":"Apostrophe",exit2=state2.enter("definition");let subexit=state2.enter("label");const tracker=state2. createTracker(info2);let value=tracker.move("[");return value+=tracker.move(state2.safe(state2.associationId(node2),{before:value,after:"]",...tracker.current()})),value+=tracker.move("]: "),subexit(),!node2.url||/[\0- \u007F]/.test(node2.url)?(subexit=state2.enter("destinationLiteral"),value+=tracker.move("<"),value+=tracker.move(state2.safe(node2.url,{before:value,after:">",...tracker.current()})),value+=tracker.move(">")):(subexit=state2.enter("destinationRaw"),value+=tracker.move(state2.safe( node2.url,{before:value,after:node2.title?" ":` `,...tracker.current()}))),subexit(),node2.title&&(subexit=state2.enter(`title${suffix}`),value+=tracker.move(" "+quote),value+=tracker.move(state2.safe(node2.title,{before:value,after:quote,...tracker.current()})),value+=tracker.move(quote),subexit()),exit2(),value}function checkEmphasis(state2){const marker=state2.options.emphasis||"*";if(marker!=="*"&&marker!=="_")throw new Error("Cannot serialize emphasis with `"+marker+"` for `options.emphasis`, expected `*`, or `_`");return marker}function encodeCharacterReference(code2){ return"&#x"+code2.toString(16).toUpperCase()+";"}function encodeInfo(outside,inside,marker){const outsideKind=classifyCharacter(outside),insideKind=classifyCharacter(inside);return outsideKind===void 0?insideKind===void 0?marker==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:insideKind===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:outsideKind===1?insideKind===void 0?{inside:!1,outside:!1}:insideKind===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:insideKind===void 0?{inside:!1,outside:!1}: insideKind===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}emphasis$1.peek=emphasisPeek;function emphasis$1(node2,_,state2,info2){const marker=checkEmphasis(state2),exit2=state2.enter("emphasis"),tracker=state2.createTracker(info2),before=tracker.move(marker);let between2=tracker.move(state2.containerPhrasing(node2,{after:marker,before,...tracker.current()}));const betweenHead=between2.charCodeAt(0),open2=encodeInfo(info2.before.charCodeAt(info2.before.length-1),betweenHead,marker);open2.inside&& (between2=encodeCharacterReference(betweenHead)+between2.slice(1));const betweenTail=between2.charCodeAt(between2.length-1),close2=encodeInfo(info2.after.charCodeAt(0),betweenTail,marker);close2.inside&&(between2=between2.slice(0,-1)+encodeCharacterReference(betweenTail));const after=tracker.move(marker);return exit2(),state2.attentionEncodeSurroundingInfo={after:close2.outside,before:open2.outside},before+between2+after}function emphasisPeek(_,_12,state2){return state2.options.emphasis||"*"}const convert=function(test){ if(test==null)return ok$1;if(typeof test=="function")return castFactory$1(test);if(typeof test=="object")return Array.isArray(test)?anyFactory$1(test):propsFactory(test);if(typeof test=="string")return typeFactory(test);throw new Error("Expected function, string, or object as test")};function anyFactory$1(tests){const checks2=[];let index2=-1;for(;++index2":""))+")"})}return visit2;function visit2(){let result=empty$1,subresult,offset2,grandparents;if((!test||is2(node2,index2,parents[parents.length-1]||void 0))&&(result=toResult(visitor(node2,parents)),result[0]===EXIT))return result;if("children"in node2&&node2.children){const nodeAsParent=node2;if(nodeAsParent.children&&result[0]!==SKIP)for(offset2=(reverse?nodeAsParent.children.length:-1)+step,grandparents=parents.concat( nodeAsParent);offset2>-1&&offset2",...tracker.current()})),value+=tracker.move(">")):(subexit=state2.enter("destinationRaw"), value+=tracker.move(state2.safe(node2.url,{before:value,after:node2.title?" ":")",...tracker.current()}))),subexit(),node2.title&&(subexit=state2.enter(`title${suffix}`),value+=tracker.move(" "+quote),value+=tracker.move(state2.safe(node2.title,{before:value,after:quote,...tracker.current()})),value+=tracker.move(quote),subexit()),value+=tracker.move(")"),exit2(),value}function imagePeek(){return"!"}imageReference$1.peek=imageReferencePeek;function imageReference$1(node2,_,state2,info2){const type2=node2. referenceType,exit2=state2.enter("imageReference");let subexit=state2.enter("label");const tracker=state2.createTracker(info2);let value=tracker.move("![");const alt=state2.safe(node2.alt,{before:value,after:"]",...tracker.current()});value+=tracker.move(alt+"]["),subexit();const stack=state2.stack;state2.stack=[],subexit=state2.enter("reference");const reference=state2.safe(state2.associationId(node2),{before:value,after:"]",...tracker.current()});return subexit(),state2.stack=stack,exit2(),type2=== "full"||!alt||alt!==reference?value+=tracker.move(reference+"]"):type2==="shortcut"?value=value.slice(0,-1):value+=tracker.move("]"),value}function imageReferencePeek(){return"!"}inlineCode$1.peek=inlineCodePeek;function inlineCode$1(node2,_,state2){let value=node2.value||"",sequence="`",index2=-1;for(;new RegExp("(^|[^`])"+sequence+"([^`]|$)").test(value);)sequence+="`";for(/[^ \r\n]/.test(value)&&(/^[ \r\n]/.test(value)&&/[ \r\n]$/.test(value)||/^`|`$/.test(value))&&(value=" "+value+" ");++index2< state2.unsafe.length;){const pattern2=state2.unsafe[index2],expression=state2.compilePattern(pattern2);let match;if(pattern2.atBreak)for(;match=expression.exec(value);){let position2=match.index;value.charCodeAt(position2)===10&&value.charCodeAt(position2-1)===13&&position2--,value=value.slice(0,position2)+" "+value.slice(match.index+1)}}return sequence+value+sequence}function inlineCodePeek(){return"`"}function formatLinkAsAutolink(node2,state2){const raw2=toString$1(node2);return!!(!state2.options. resourceLink&&node2.url&&!node2.title&&node2.children&&node2.children.length===1&&node2.children[0].type==="text"&&(raw2===node2.url||"mailto:"+raw2===node2.url)&&/^[a-z][a-z+.-]+:/i.test(node2.url)&&!/[\0- <>\u007F]/.test(node2.url))}link$1.peek=linkPeek;function link$1(node2,_,state2,info2){const quote=checkQuote(state2),suffix=quote==='"'?"Quote":"Apostrophe",tracker=state2.createTracker(info2);let exit2,subexit;if(formatLinkAsAutolink(node2,state2)){const stack=state2.stack;state2.stack=[],exit2= state2.enter("autolink");let value2=tracker.move("<");return value2+=tracker.move(state2.containerPhrasing(node2,{before:value2,after:">",...tracker.current()})),value2+=tracker.move(">"),exit2(),state2.stack=stack,value2}exit2=state2.enter("link"),subexit=state2.enter("label");let value=tracker.move("[");return value+=tracker.move(state2.containerPhrasing(node2,{before:value,after:"](",...tracker.current()})),value+=tracker.move("]("),subexit(),!node2.url&&node2.title||/[\0- \u007F]/.test(node2. url)?(subexit=state2.enter("destinationLiteral"),value+=tracker.move("<"),value+=tracker.move(state2.safe(node2.url,{before:value,after:">",...tracker.current()})),value+=tracker.move(">")):(subexit=state2.enter("destinationRaw"),value+=tracker.move(state2.safe(node2.url,{before:value,after:node2.title?" ":")",...tracker.current()}))),subexit(),node2.title&&(subexit=state2.enter(`title${suffix}`),value+=tracker.move(" "+quote),value+=tracker.move(state2.safe(node2.title,{before:value,after:quote, ...tracker.current()})),value+=tracker.move(quote),subexit()),value+=tracker.move(")"),exit2(),value}function linkPeek(node2,_,state2){return formatLinkAsAutolink(node2,state2)?"<":"["}linkReference$1.peek=linkReferencePeek;function linkReference$1(node2,_,state2,info2){const type2=node2.referenceType,exit2=state2.enter("linkReference");let subexit=state2.enter("label");const tracker=state2.createTracker(info2);let value=tracker.move("[");const text2=state2.containerPhrasing(node2,{before:value, after:"]",...tracker.current()});value+=tracker.move(text2+"]["),subexit();const stack=state2.stack;state2.stack=[],subexit=state2.enter("reference");const reference=state2.safe(state2.associationId(node2),{before:value,after:"]",...tracker.current()});return subexit(),state2.stack=stack,exit2(),type2==="full"||!text2||text2!==reference?value+=tracker.move(reference+"]"):type2==="shortcut"?value=value.slice(0,-1):value+=tracker.move("]"),value}function linkReferencePeek(){return"["}function checkBullet(state2){ const marker=state2.options.bullet||"*";if(marker!=="*"&&marker!=="+"&&marker!=="-")throw new Error("Cannot serialize items with `"+marker+"` for `options.bullet`, expected `*`, `+`, or `-`");return marker}function checkBulletOther(state2){const bullet=checkBullet(state2),bulletOther=state2.options.bulletOther;if(!bulletOther)return bullet==="*"?"-":"*";if(bulletOther!=="*"&&bulletOther!=="+"&&bulletOther!=="-")throw new Error("Cannot serialize items with `"+bulletOther+"` for `options.bulletOth\ er`, expected `*`, `+`, or `-`");if(bulletOther===bullet)throw new Error("Expected `bullet` (`"+bullet+"`) and `bulletOther` (`"+bulletOther+"`) to be different");return bulletOther}function checkBulletOrdered(state2){const marker=state2.options.bulletOrdered||".";if(marker!=="."&&marker!==")")throw new Error("Cannot serialize items with `"+marker+"` for `options.bulletOrdered`, expected `.` or `)`");return marker}function checkRule(state2){const marker=state2.options.rule||"*";if(marker!=="*"&& marker!=="-"&&marker!=="_")throw new Error("Cannot serialize rules with `"+marker+"` for `options.rule`, expected `*`, `-`, or `_`");return marker}function list$1(node2,parent,state2,info2){const exit2=state2.enter("list"),bulletCurrent=state2.bulletCurrent;let bullet=node2.ordered?checkBulletOrdered(state2):checkBullet(state2);const bulletOther=node2.ordered?bullet==="."?")":".":checkBulletOther(state2);let useDifferentMarker=parent&&state2.bulletLastUsed?bullet===state2.bulletLastUsed:!1;if(!node2. ordered){const firstListItem=node2.children?node2.children[0]:void 0;if((bullet==="*"||bullet==="-")&&firstListItem&&(!firstListItem.children||!firstListItem.children[0])&&state2.stack[state2.stack.length-1]==="list"&&state2.stack[state2.stack.length-2]==="listItem"&&state2.stack[state2.stack.length-3]==="list"&&state2.stack[state2.stack.length-4]==="listItem"&&state2.indexStack[state2.indexStack.length-1]===0&&state2.indexStack[state2.indexStack.length-2]===0&&state2.indexStack[state2.indexStack. length-3]===0&&(useDifferentMarker=!0),checkRule(state2)===bullet&&firstListItem){let index2=-1;for(;++index2-1?parent.start:1)+(state2.options.incrementListMarker===!1?0:parent.children.indexOf(node2))+bullet);let size2=bullet.length+1;(listItemIndent==="tab"||listItemIndent==="mixed"&&(parent&&parent.type==="list"&&parent.spread||node2.spread))&&(size2=Math.ceil(size2/4)*4);const tracker=state2.createTracker(info2);tracker.move(bullet+" ".repeat(size2-bullet.length)),tracker.shift(size2);const exit2=state2.enter("listItem"),value=state2.indentLines(state2.containerFlow(node2, tracker.current()),map2);return exit2(),value;function map2(line,index2,blank){return index2?(blank?"":" ".repeat(size2))+line:(blank?bullet:bullet+" ".repeat(size2-bullet.length))+line}}function paragraph$1(node2,_,state2,info2){const exit2=state2.enter("paragraph"),subexit=state2.enter("phrasing"),value=state2.containerPhrasing(node2,info2);return subexit(),exit2(),value}const phrasing=convert(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","in\ lineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function root$u(node2,_,state2,info2){return(node2.children.some(function(d2){return phrasing(d2)})?state2.containerPhrasing:state2.containerFlow).call(state2,node2,info2)}function checkStrong(state2){const marker=state2.options.strong||"*";if(marker!=="*"&&marker!=="_")throw new Error("Cannot serialize strong with `"+marker+"` for `options.strong`, expected `*`, or `_`");return marker}strong$1. peek=strongPeek;function strong$1(node2,_,state2,info2){const marker=checkStrong(state2),exit2=state2.enter("strong"),tracker=state2.createTracker(info2),before=tracker.move(marker+marker);let between2=tracker.move(state2.containerPhrasing(node2,{after:marker,before,...tracker.current()}));const betweenHead=between2.charCodeAt(0),open2=encodeInfo(info2.before.charCodeAt(info2.before.length-1),betweenHead,marker);open2.inside&&(between2=encodeCharacterReference(betweenHead)+between2.slice(1));const betweenTail=between2. charCodeAt(between2.length-1),close2=encodeInfo(info2.after.charCodeAt(0),betweenTail,marker);close2.inside&&(between2=between2.slice(0,-1)+encodeCharacterReference(betweenTail));const after=tracker.move(marker+marker);return exit2(),state2.attentionEncodeSurroundingInfo={after:close2.outside,before:open2.outside},before+between2+after}function strongPeek(_,_12,state2){return state2.options.strong||"*"}function text$5(node2,_,state2,info2){return state2.safe(node2.value,info2)}function checkRuleRepetition(state2){ const repetition=state2.options.ruleRepetition||3;if(repetition<3)throw new Error("Cannot serialize rules with repetition `"+repetition+"` for `options.ruleRepetition`, expected `3` or more");return repetition}function thematicBreak$1(_,_12,state2){const value=(checkRule(state2)+(state2.options.ruleSpaces?" ":"")).repeat(checkRuleRepetition(state2));return state2.options.ruleSpaces?value.slice(0,-1):value}const handle$1={blockquote:blockquote$1,break:hardBreak$1,code:code$2,definition,emphasis:emphasis$1, hardBreak:hardBreak$1,heading:heading$1,html:html$5,image:image$1,imageReference:imageReference$1,inlineCode:inlineCode$1,link:link$1,linkReference:linkReference$1,list:list$1,listItem:listItem$1,paragraph:paragraph$1,root:root$u,strong:strong$1,text:text$5,thematicBreak:thematicBreak$1},join$1=[joinDefaults];function joinDefaults(left,right,parent,state2){if(right.type==="code"&&formatCodeAsIndented(right,state2)&&(left.type==="list"||left.type===right.type&&formatCodeAsIndented(left,state2)))return!1; if("spread"in parent&&typeof parent.spread=="boolean")return left.type==="paragraph"&&(left.type===right.type||right.type==="definition"||right.type==="heading"&&formatHeadingAsSetext(right,state2))?void 0:parent.spread?1:0}const fullPhrasingSpans=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],unsafe=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFenc\ edLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:` `,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:fullPhrasingSpans},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"\ #",inConstruct:"headingAtx",after:`(?:[\r ]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:fullPhrasingSpans},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r *])`},{character:"*",inConstruct:"phrasing",notInConstruct:fullPhrasingSpans},{atBreak:!0,character:"+",after:`(?:[ \r ])`},{atBreak:!0,character:"-",after:`(?:[ \r -])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:fullPhrasingSpans},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:fullPhrasingSpans},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasin\ g"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:fullPhrasingSpans},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:fullPhrasingSpans},{atBreak:!0,character:"~"}];function association(node2){return node2.label||!node2.identifier?node2.label||"":decodeString(node2.identifier)}function compilePattern(pattern2){ if(!pattern2._compiled){const before=(pattern2.atBreak?"[\\r\\n][\\t ]*":"")+(pattern2.before?"(?:"+pattern2.before+")":"");pattern2._compiled=new RegExp((before?"("+before+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(pattern2.character)?"\\":"")+pattern2.character+(pattern2.after?"(?:"+pattern2.after+")":""),"g")}return pattern2._compiled}function containerPhrasing(parent,state2,info2){const indexStack=state2.indexStack,children=parent.children||[],results=[];let index2=-1,before=info2.before,encodeAfter; indexStack.push(-1);let tracker=state2.createTracker(info2);for(;++index20&&(before==="\r"||before===` `)&&child2.type==="html"&&(results[results.length-1]=results[results.length-1].replace(/(\r?\n|\r)$/," "),before=" ",tracker=state2.createTracker(info2),tracker.move(results.join("")));let value=state2.handle(child2,parent,state2,{...tracker.current(),after,before});encodeAfter&&encodeAfter===value.slice(0,1)&&(value=encodeCharacterReference(encodeAfter.charCodeAt(0))+value.slice(1));const encodingInfo=state2.attentionEncodeSurroundingInfo;state2.attentionEncodeSurroundingInfo=void 0,encodeAfter= void 0,encodingInfo&&(results.length>0&&encodingInfo.before&&before===results[results.length-1].slice(-1)&&(results[results.length-1]=results[results.length-1].slice(0,-1)+encodeCharacterReference(before.charCodeAt(0))),encodingInfo.after&&(encodeAfter=after)),tracker.move(value),results.push(value),before=value.slice(-1)}return indexStack.pop(),results.join("")}function containerFlow(parent,state2,info2){const indexStack=state2.indexStack,children=parent.children||[],tracker=state2.createTracker( info2),results=[];let index2=-1;for(indexStack.push(-1);++index2 `}return` `}const eol=/\r?\n|\r/g;function indentLines(value,map2){const result=[];let start2=0,line=0,match;for(;match=eol.exec(value);)one2(value.slice(start2,match.index)),result.push(match[0]),start2=match.index+match[0].length,line++;return one2(value.slice(start2)),result.join("");function one2(value2){result.push(map2(value2,line,!value2))}}function safe(state2,input,config2){const value=(config2.before||"")+(input||"")+(config2.after||""),positions=[],result=[],infos={};let index2=-1;for(;++index2< state2.unsafe.length;){const pattern2=state2.unsafe[index2];if(!patternInScope(state2.stack,pattern2))continue;const expression=state2.compilePattern(pattern2);let match;for(;match=expression.exec(value);){const before="before"in pattern2||!!pattern2.atBreak,after="after"in pattern2,position2=match.index+(before?match[1].length:0);positions.includes(position2)?(infos[position2].before&&!before&&(infos[position2].before=!1),infos[position2].after&&!after&&(infos[position2].after=!1)):(positions.push( position2),infos[position2]={before,after})}}positions.sort(numerical);let start2=config2.before?config2.before.length:0;const end=value.length-(config2.after?config2.after.length:0);for(index2=-1;++index2=end||position2+1"u"||hasOwn.call(obj,key2)},setProperty=function(target2,options){defineProperty&&options.name==="__proto__"?defineProperty(target2,options.name,{enumerable:!0,configurable:!0,value:options.newValue,writable:!0}):target2[options.name]=options.newValue},getProperty=function(obj,name){if(name==="__proto__")if(hasOwn.call(obj,name)){if(gOPD)return gOPD(obj,name).value}else return;return obj[name]};return extend$1= function extend2(){var options,name,src,copy,copyIsArray,clone2,target2=arguments[0],i=1,length=arguments.length,deep=!1;for(typeof target2=="boolean"&&(deep=target2,target2=arguments[1]||{},i=2),(target2==null||typeof target2!="object"&&typeof target2!="function")&&(target2={});iparameters.length;let result;fnExpectsCallback&¶meters.push(done);try{result=middleware.apply(this,parameters)}catch(error2){const exception=error2;if(fnExpectsCallback&&called)throw exception;return done(exception)}fnExpectsCallback||(result&&result.then&&typeof result.then=="function"?result.then(then,done):result instanceof Error?done( result):then(result))}function done(error2,...output){called||(called=!0,callback(error2,...output))}function then(value){done(null,value)}}function stringifyPosition(value){return!value||typeof value!="object"?"":"position"in value||"type"in value?position$1(value.position):"start"in value||"end"in value?position$1(value):"line"in value||"column"in value?point$1(value):""}function point$1(point2){return index(point2&&point2.line)+":"+index(point2&&point2.column)}function position$1(pos){return point$1( pos&&pos.start)+"-"+point$1(pos&&pos.end)}function index(value){return value&&typeof value=="number"?value:1}class VFileMessage extends Error{constructor(causeOrReason,optionsOrParentOrPlace,origin2){super(),typeof optionsOrParentOrPlace=="string"&&(origin2=optionsOrParentOrPlace,optionsOrParentOrPlace=void 0);let reason="",options={},legacyCause=!1;if(optionsOrParentOrPlace&&("line"in optionsOrParentOrPlace&&"column"in optionsOrParentOrPlace?options={place:optionsOrParentOrPlace}:"start"in optionsOrParentOrPlace&& "end"in optionsOrParentOrPlace?options={place:optionsOrParentOrPlace}:"type"in optionsOrParentOrPlace?options={ancestors:[optionsOrParentOrPlace],place:optionsOrParentOrPlace.position}:options={...optionsOrParentOrPlace}),typeof causeOrReason=="string"?reason=causeOrReason:!options.cause&&causeOrReason&&(legacyCause=!0,reason=causeOrReason.message,options.cause=causeOrReason),!options.ruleId&&!options.source&&typeof origin2=="string"){const index2=origin2.indexOf(":");index2===-1?options.ruleId= origin2:(options.source=origin2.slice(0,index2),options.ruleId=origin2.slice(index2+1))}if(!options.place&&options.ancestors&&options.ancestors){const parent=options.ancestors[options.ancestors.length-1];parent&&(options.place=parent.position)}const start2=options.place&&"start"in options.place?options.place.start:options.place;this.ancestors=options.ancestors||void 0,this.cause=options.cause||void 0,this.column=start2?start2.column:void 0,this.fatal=void 0,this.file,this.message=reason,this.line= start2?start2.line:void 0,this.name=stringifyPosition(options.place)||"1:1",this.place=options.place||void 0,this.reason=this.message,this.ruleId=options.ruleId||void 0,this.source=options.source||void 0,this.stack=legacyCause&&options.cause&&typeof options.cause.stack=="string"?options.cause.stack:"",this.actual,this.expected,this.note,this.url}}VFileMessage.prototype.file="";VFileMessage.prototype.name="";VFileMessage.prototype.reason="";VFileMessage.prototype.message="";VFileMessage.prototype. stack="";VFileMessage.prototype.column=void 0;VFileMessage.prototype.line=void 0;VFileMessage.prototype.ancestors=void 0;VFileMessage.prototype.cause=void 0;VFileMessage.prototype.fatal=void 0;VFileMessage.prototype.place=void 0;VFileMessage.prototype.ruleId=void 0;VFileMessage.prototype.source=void 0;const minpath={basename,dirname,extname,join,sep:"/"};function basename(path2,extname2){if(extname2!==void 0&&typeof extname2!="string")throw new TypeError('"ext" argument must be a string');assertPath$1( path2);let start2=0,end=-1,index2=path2.length,seenNonSlash;if(extname2===void 0||extname2.length===0||extname2.length>path2.length){for(;index2--;)if(path2.codePointAt(index2)===47){if(seenNonSlash){start2=index2+1;break}}else end<0&&(seenNonSlash=!0,end=index2+1);return end<0?"":path2.slice(start2,end)}if(extname2===path2)return"";let firstNonSlashEnd=-1,extnameIndex=extname2.length-1;for(;index2--;)if(path2.codePointAt(index2)===47){if(seenNonSlash){start2=index2+1;break}}else firstNonSlashEnd< 0&&(seenNonSlash=!0,firstNonSlashEnd=index2+1),extnameIndex>-1&&(path2.codePointAt(index2)===extname2.codePointAt(extnameIndex--)?extnameIndex<0&&(end=index2):(extnameIndex=-1,end=firstNonSlashEnd));return start2===end?end=firstNonSlashEnd:end<0&&(end=path2.length),path2.slice(start2,end)}function dirname(path2){if(assertPath$1(path2),path2.length===0)return".";let end=-1,index2=path2.length,unmatchedSlash;for(;--index2;)if(path2.codePointAt(index2)===47){if(unmatchedSlash){end=index2;break}}else unmatchedSlash||(unmatchedSlash=!0);return end<0?path2.codePointAt(0)===47?"/":".":end===1&&path2.codePointAt(0)===47?"//":path2.slice(0,end)}function extname(path2){assertPath$1(path2);let index2=path2.length,end=-1,startPart=0,startDot=-1,preDotState=0,unmatchedSlash;for(;index2--;){const code2=path2.codePointAt(index2);if(code2===47){if(unmatchedSlash){startPart=index2+1;break}continue}end<0&&(unmatchedSlash=!0,end=index2+1),code2===46?startDot<0?startDot=index2:preDotState!==1&&(preDotState= 1):startDot>-1&&(preDotState=-1)}return startDot<0||end<0||preDotState===0||preDotState===1&&startDot===end-1&&startDot===startPart+1?"":path2.slice(startDot,end)}function join(...segments){let index2=-1,joined;for(;++index20&&path2.codePointAt(path2.length-1)===47&&(value+="/"),absolute?"/"+value:value}function normalizeString(path2,allowAboveRoot){let result="",lastSegmentLength=0,lastSlash=-1,dots=0,index2=-1,code2,lastSlashIndex;for(;++index2<=path2.length;){if(index22){if(lastSlashIndex=result.lastIndexOf("/"),lastSlashIndex!==result.length-1){lastSlashIndex<0?(result="",lastSegmentLength=0):(result=result.slice(0,lastSlashIndex),lastSegmentLength=result.length-1-result.lastIndexOf("/")),lastSlash=index2,dots=0;continue}}else if(result.length>0){result="",lastSegmentLength=0,lastSlash=index2,dots=0;continue}}allowAboveRoot&&(result= result.length>0?result+"/..":"..",lastSegmentLength=2)}else result.length>0?result+="/"+path2.slice(lastSlash+1,index2):result=path2.slice(lastSlash+1,index2),lastSegmentLength=index2-lastSlash-1;lastSlash=index2,dots=0}else code2===46&&dots>-1?dots++:dots=-1}return result}function assertPath$1(path2){if(typeof path2!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(path2))}const minproc={cwd};function cwd(){return"/"}function isUrl(fileUrlOrPath){return!!(fileUrlOrPath!== null&&typeof fileUrlOrPath=="object"&&"href"in fileUrlOrPath&&fileUrlOrPath.href&&"protocol"in fileUrlOrPath&&fileUrlOrPath.protocol&&fileUrlOrPath.auth===void 0)}function urlToPath(path2){if(typeof path2=="string")path2=new URL(path2);else if(!isUrl(path2)){const error2=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+path2+"`");throw error2.code="ERR_INVALID_ARG_TYPE",error2}if(path2.protocol!=="file:"){const error2=new TypeError("The URL must be of \ scheme file");throw error2.code="ERR_INVALID_URL_SCHEME",error2}return getPathFromURLPosix(path2)}function getPathFromURLPosix(url2){if(url2.hostname!==""){const error2=new TypeError('File URL host must be "localhost" or empty on darwin');throw error2.code="ERR_INVALID_FILE_URL_HOST",error2}const pathname=url2.pathname;let index2=-1;for(;++index20){let[primary,...rest]=parameters2;const currentPrimary=attachers[entryIndex][1];isPlainObject(currentPrimary)&&isPlainObject(primary)&&(primary=extend(!0,currentPrimary,primary)),attachers[entryIndex]=[plugin,primary,...rest]}}}}const unified=new Processor().freeze();function assertParser(name,value){if(typeof value!="function")throw new TypeError("Cannot `"+name+"` without `parser`")}function assertCompiler(name,value){ if(typeof value!="function")throw new TypeError("Cannot `"+name+"` without `compiler`")}function assertUnfrozen(name,frozen){if(frozen)throw new Error("Cannot call `"+name+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function assertNode(node2){if(!isPlainObject(node2)||typeof node2.type!="string")throw new TypeError("Expected node, got `"+node2+"`")}function assertDone(name,asyncName,complete){if(!complete)throw new Error("`"+ name+"` finished async. Use `"+asyncName+"` instead")}function vfile(value){return looksLikeAVFile(value)?value:new VFile(value)}function looksLikeAVFile(value){return!!(value&&typeof value=="object"&&"message"in value&&"messages"in value)}function looksLikeAValue(value){return typeof value=="string"||isUint8Array(value)}function isUint8Array(value){return!!(value&&typeof value=="object"&&"byteLength"in value&&"byteOffset"in value)}const remark=unified().use(remarkParse).use(remarkStringify).freeze(); function escapeStringRegexp(string2){if(typeof string2!="string")throw new TypeError("Expected a string");return string2.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function findAndReplace(tree,list2,options){const ignored=convert((options||{}).ignore||[]),pairs=toPairs(list2);let pairIndex=-1;for(;++pairIndex0?{type:"text",value}:void 0),value===!1?find2.lastIndex=position2+1:(start2!==position2&&nodes2.push({type:"text",value:node2.value.slice(start2,position2)}),Array.isArray(value)?nodes2.push(...value):value&&nodes2.push(value),start2=position2+match[0].length,change=!0),!find2.global)break;match=find2.exec(node2.value)}return change?(start2?\]}]+$/.exec(url2);if(!trailExec)return[url2,void 0];url2=url2.slice(0,trailExec.index);let trail2=trailExec[0],closingParenIndex=trail2.indexOf(")");const openingParens=ccount(url2,"(");let closingParens=ccount( url2,")");for(;closingParenIndex!==-1&&openingParens>closingParens;)url2+=trail2.slice(0,closingParenIndex+1),trail2=trail2.slice(closingParenIndex+1),closingParenIndex=trail2.indexOf(")"),closingParens++;return[url2,trail2]}function previous$1(match,email2){const code2=match.input.charCodeAt(match.index-1);return(match.index===0||unicodeWhitespace(code2)||unicodePunctuation(code2))&&(!email2||code2!==47)}footnoteReference$1.peek=footnoteReferencePeek;function enterFootnoteCallString(){this.buffer()} function enterFootnoteCall(token2){this.enter({type:"footnoteReference",identifier:"",label:""},token2)}function enterFootnoteDefinitionLabelString(){this.buffer()}function enterFootnoteDefinition(token2){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},token2)}function exitFootnoteCallString(token2){const label=this.resume(),node2=this.stack[this.stack.length-1];node2.type,node2.identifier=normalizeIdentifier(this.sliceSerialize(token2)).toLowerCase(),node2.label=label} function exitFootnoteCall(token2){this.exit(token2)}function exitFootnoteDefinitionLabelString(token2){const label=this.resume(),node2=this.stack[this.stack.length-1];node2.type,node2.identifier=normalizeIdentifier(this.sliceSerialize(token2)).toLowerCase(),node2.label=label}function exitFootnoteDefinition(token2){this.exit(token2)}function footnoteReferencePeek(){return"["}function footnoteReference$1(node2,_,state2,info2){const tracker=state2.createTracker(info2);let value=tracker.move("[^");const exit2=state2. enter("footnoteReference"),subexit=state2.enter("reference");return value+=tracker.move(state2.safe(state2.associationId(node2),{after:"]",before:value})),subexit(),exit2(),value+=tracker.move("]"),value}function gfmFootnoteFromMarkdown(){return{enter:{gfmFootnoteCallString:enterFootnoteCallString,gfmFootnoteCall:enterFootnoteCall,gfmFootnoteDefinitionLabelString:enterFootnoteDefinitionLabelString,gfmFootnoteDefinition:enterFootnoteDefinition},exit:{gfmFootnoteCallString:exitFootnoteCallString,gfmFootnoteCall:exitFootnoteCall, gfmFootnoteDefinitionLabelString:exitFootnoteDefinitionLabelString,gfmFootnoteDefinition:exitFootnoteDefinition}}}function gfmFootnoteToMarkdown(options){let firstLineBlank=!1;return options&&options.firstLineBlank&&(firstLineBlank=!0),{handlers:{footnoteDefinition,footnoteReference:footnoteReference$1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function footnoteDefinition(node2,_,state2,info2){const tracker=state2.createTracker(info2);let value=tracker.move("[^");const exit2=state2. enter("footnoteDefinition"),subexit=state2.enter("label");return value+=tracker.move(state2.safe(state2.associationId(node2),{before:value,after:"]"})),subexit(),value+=tracker.move("]:"),node2.children&&node2.children.length>0&&(tracker.shift(4),value+=tracker.move((firstLineBlank?` `:" ")+state2.indentLines(state2.containerFlow(node2,tracker.current()),firstLineBlank?mapAll:mapExceptFirst))),exit2(),value}}function mapExceptFirst(line,index2,blank){return index2===0?line:mapAll(line,index2,blank)}function mapAll(line,index2,blank){return(blank?"":" ")+line}const constructsWithoutStrikethrough=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];handleDelete.peek=peekDelete;function gfmStrikethroughFromMarkdown(){return{canContainEols:[ "delete"],enter:{strikethrough:enterStrikethrough},exit:{strikethrough:exitStrikethrough}}}function gfmStrikethroughToMarkdown(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:constructsWithoutStrikethrough}],handlers:{delete:handleDelete}}}function enterStrikethrough(token2){this.enter({type:"delete",children:[]},token2)}function exitStrikethrough(token2){this.exit(token2)}function handleDelete(node2,_,state2,info2){const tracker=state2.createTracker(info2),exit2=state2.enter( "strikethrough");let value=tracker.move("~~");return value+=state2.containerPhrasing(node2,{...tracker.current(),before:value,after:"~"}),value+=tracker.move("~~"),exit2(),value}function peekDelete(){return"~"}function defaultStringLength(value){return value.length}function markdownTable(table2,options){const settings=options||{},align=(settings.align||[]).concat(),stringLength=settings.stringLength||defaultStringLength,alignments=[],cellMatrix=[],sizeMatrix=[],longestCellByColumn=[];let mostCellsPerRow=0, rowIndex=-1;for(;++rowIndexmostCellsPerRow&&(mostCellsPerRow=table2[rowIndex].length);++columnIndex2longestCellByColumn[columnIndex2])&&(longestCellByColumn[columnIndex2]=size2)}row3.push( cell2)}cellMatrix[rowIndex]=row3,sizeMatrix[rowIndex]=sizes2}let columnIndex=-1;if(typeof align=="object"&&"length"in align)for(;++columnIndexlongestCellByColumn[columnIndex]&&(longestCellByColumn[columnIndex]=size2),sizes[columnIndex]=size2),row2[columnIndex]=cell2}cellMatrix.splice(1,0,row2),sizeMatrix.splice(1,0,sizes),rowIndex=-1;const lines=[];for(;++rowIndex0&&!result&&(events[events.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),result}const indent={tokenize:tokenizeIndent,partial:!0};function gfmFootnote(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:tokenizeDefinitionStart,continuation:{tokenize:tokenizeDefinitionContinuation}, exit:gfmFootnoteDefinitionEnd}},text:{91:{name:"gfmFootnoteCall",tokenize:tokenizeGfmFootnoteCall},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:tokenizePotentialGfmFootnoteCall,resolveTo:resolveToPotentialGfmFootnoteCall}}}}function tokenizePotentialGfmFootnoteCall(effects,ok,nok){const self2=this;let index2=self2.events.length;const defined=self2.parser.gfmFootnotes||(self2.parser.gfmFootnotes=[]);let labelStart;for(;index2--;){const token2=self2.events[index2][1];if(token2.type==="\ labelImage"){labelStart=token2;break}if(token2.type==="gfmFootnoteCall"||token2.type==="labelLink"||token2.type==="label"||token2.type==="image"||token2.type==="link")break}return start2;function start2(code2){if(!labelStart||!labelStart._balanced)return nok(code2);const id2=normalizeIdentifier(self2.sliceSerialize({start:labelStart.end,end:self2.now()}));return id2.codePointAt(0)!==94||!defined.includes(id2.slice(1))?nok(code2):(effects.enter("gfmFootnoteCallLabelMarker"),effects.consume(code2), effects.exit("gfmFootnoteCallLabelMarker"),ok(code2))}}function resolveToPotentialGfmFootnoteCall(events,context){let index2=events.length;for(;index2--;)if(events[index2][1].type==="labelImage"&&events[index2][0]==="enter"){events[index2][1];break}events[index2+1][1].type="data",events[index2+3][1].type="gfmFootnoteCallLabelMarker";const call={type:"gfmFootnoteCall",start:Object.assign({},events[index2+3][1].start),end:Object.assign({},events[events.length-1][1].end)},marker={type:"gfmFootnoteC\ allMarker",start:Object.assign({},events[index2+3][1].end),end:Object.assign({},events[index2+3][1].end)};marker.end.column++,marker.end.offset++,marker.end._bufferIndex++;const string2={type:"gfmFootnoteCallString",start:Object.assign({},marker.end),end:Object.assign({},events[events.length-1][1].start)},chunk={type:"chunkString",contentType:"string",start:Object.assign({},string2.start),end:Object.assign({},string2.end)},replacement=[events[index2+1],events[index2+2],["enter",call,context],events[index2+ 3],events[index2+4],["enter",marker,context],["exit",marker,context],["enter",string2,context],["enter",chunk,context],["exit",chunk,context],["exit",string2,context],events[events.length-2],events[events.length-1],["exit",call,context]];return events.splice(index2,events.length-index2+1,...replacement),events}function tokenizeGfmFootnoteCall(effects,ok,nok){const self2=this,defined=self2.parser.gfmFootnotes||(self2.parser.gfmFootnotes=[]);let size2=0,data;return start2;function start2(code2){return effects. enter("gfmFootnoteCall"),effects.enter("gfmFootnoteCallLabelMarker"),effects.consume(code2),effects.exit("gfmFootnoteCallLabelMarker"),callStart}function callStart(code2){return code2!==94?nok(code2):(effects.enter("gfmFootnoteCallMarker"),effects.consume(code2),effects.exit("gfmFootnoteCallMarker"),effects.enter("gfmFootnoteCallString"),effects.enter("chunkString").contentType="string",callData)}function callData(code2){if(size2>999||code2===93&&!data||code2===null||code2===91||markdownLineEndingOrSpace( code2))return nok(code2);if(code2===93){effects.exit("chunkString");const token2=effects.exit("gfmFootnoteCallString");return defined.includes(normalizeIdentifier(self2.sliceSerialize(token2)))?(effects.enter("gfmFootnoteCallLabelMarker"),effects.consume(code2),effects.exit("gfmFootnoteCallLabelMarker"),effects.exit("gfmFootnoteCall"),ok):nok(code2)}return markdownLineEndingOrSpace(code2)||(data=!0),size2++,effects.consume(code2),code2===92?callEscape:callData}function callEscape(code2){return code2=== 91||code2===92||code2===93?(effects.consume(code2),size2++,callData):callData(code2)}}function tokenizeDefinitionStart(effects,ok,nok){const self2=this,defined=self2.parser.gfmFootnotes||(self2.parser.gfmFootnotes=[]);let identifier2,size2=0,data;return start2;function start2(code2){return effects.enter("gfmFootnoteDefinition")._container=!0,effects.enter("gfmFootnoteDefinitionLabel"),effects.enter("gfmFootnoteDefinitionLabelMarker"),effects.consume(code2),effects.exit("gfmFootnoteDefinitionLabe\ lMarker"),labelAtMarker}function labelAtMarker(code2){return code2===94?(effects.enter("gfmFootnoteDefinitionMarker"),effects.consume(code2),effects.exit("gfmFootnoteDefinitionMarker"),effects.enter("gfmFootnoteDefinitionLabelString"),effects.enter("chunkString").contentType="string",labelInside):nok(code2)}function labelInside(code2){if(size2>999||code2===93&&!data||code2===null||code2===91||markdownLineEndingOrSpace(code2))return nok(code2);if(code2===93){effects.exit("chunkString");const token2=effects. exit("gfmFootnoteDefinitionLabelString");return identifier2=normalizeIdentifier(self2.sliceSerialize(token2)),effects.enter("gfmFootnoteDefinitionLabelMarker"),effects.consume(code2),effects.exit("gfmFootnoteDefinitionLabelMarker"),effects.exit("gfmFootnoteDefinitionLabel"),labelAfter}return markdownLineEndingOrSpace(code2)||(data=!0),size2++,effects.consume(code2),code2===92?labelEscape:labelInside}function labelEscape(code2){return code2===91||code2===92||code2===93?(effects.consume(code2),size2++, labelInside):labelInside(code2)}function labelAfter(code2){return code2===58?(effects.enter("definitionMarker"),effects.consume(code2),effects.exit("definitionMarker"),defined.includes(identifier2)||defined.push(identifier2),factorySpace(effects,whitespaceAfter,"gfmFootnoteDefinitionWhitespace")):nok(code2)}function whitespaceAfter(code2){return ok(code2)}}function tokenizeDefinitionContinuation(effects,ok,nok){return effects.check(blankLine,ok,effects.attempt(indent,ok,nok))}function gfmFootnoteDefinitionEnd(effects){ effects.exit("gfmFootnoteDefinition")}function tokenizeIndent(effects,ok,nok){const self2=this;return factorySpace(effects,afterPrefix,"gfmFootnoteDefinitionIndent",5);function afterPrefix(code2){const tail=self2.events[self2.events.length-1];return tail&&tail[1].type==="gfmFootnoteDefinitionIndent"&&tail[2].sliceSerialize(tail[1],!0).length===4?ok(code2):nok(code2)}}function gfmStrikethrough(options){let single=(options||{}).singleTilde;const tokenizer={name:"strikethrough",tokenize:tokenizeStrikethrough, resolveAll:resolveAllStrikethrough};return single==null&&(single=!0),{text:{126:tokenizer},insideSpan:{null:[tokenizer]},attentionMarkers:{null:[126]}};function resolveAllStrikethrough(events,context){let index2=-1;for(;++index21?nok(code2):(effects.consume(code2),size2++,more);if(size2<2&&!single)return nok(code2);const token2=effects.exit("strikethroughSequenceTemporary"),after=classifyCharacter(code2);return token2._open=!after||after===2&&!!before,token2._close=!before||before===2&&!!after,ok(code2)}}}class EditMap{constructor(){this.map=[]}add(index2,remove2,add2){addImplementation(this,index2,remove2,add2)}consume(events){if(this.map.sort(function(a,b){return a[0]-b[0]}),this. map.length===0)return;let index2=this.map.length;const vecs=[];for(;index2>0;)index2-=1,vecs.push(events.slice(this.map[index2][0]+this.map[index2][1]),this.map[index2][2]),events.length=this.map[index2][0];vecs.push(events.slice()),events.length=0;let slice=vecs.pop();for(;slice;){for(const element2 of slice)events.push(element2);slice=vecs.pop()}this.map.length=0}}function addImplementation(editMap,at,remove2,add2){let index2=0;if(!(remove2===0&&add2.length===0)){for(;index2-1;){const type2=self2.events[index2][1].type;if(type2==="lineEnding"||type2==="linePrefix")index2--;else break}const tail=index2>-1?self2.events[index2][1].type:null,next2=tail==="tableHead"||tail==="tableRow"?bodyRowStart:headRowBefore;return next2===bodyRowStart&&self2.parser.lazy[self2.now().line]?nok(code2):next2(code2)}function headRowBefore(code2){return effects.enter("tableHead"),effects.enter("tableRow"),headRowStart(code2)}function headRowStart(code2){ return code2===124||(seen2=!0,sizeB+=1),headRowBreak(code2)}function headRowBreak(code2){return code2===null?nok(code2):markdownLineEnding(code2)?sizeB>1?(sizeB=0,self2.interrupt=!0,effects.exit("tableRow"),effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),headDelimiterStart):nok(code2):markdownSpace(code2)?factorySpace(effects,headRowBreak,"whitespace")(code2):(sizeB+=1,seen2&&(seen2=!1,size2+=1),code2===124?(effects.enter("tableCellDivider"),effects.consume(code2),effects. exit("tableCellDivider"),seen2=!0,headRowBreak):(effects.enter("data"),headRowData(code2)))}function headRowData(code2){return code2===null||code2===124||markdownLineEndingOrSpace(code2)?(effects.exit("data"),headRowBreak(code2)):(effects.consume(code2),code2===92?headRowEscape:headRowData)}function headRowEscape(code2){return code2===92||code2===124?(effects.consume(code2),headRowData):headRowData(code2)}function headDelimiterStart(code2){return self2.interrupt=!1,self2.parser.lazy[self2.now(). line]?nok(code2):(effects.enter("tableDelimiterRow"),seen2=!1,markdownSpace(code2)?factorySpace(effects,headDelimiterBefore,"linePrefix",self2.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(code2):headDelimiterBefore(code2))}function headDelimiterBefore(code2){return code2===45||code2===58?headDelimiterValueBefore(code2):code2===124?(seen2=!0,effects.enter("tableCellDivider"),effects.consume(code2),effects.exit("tableCellDivider"),headDelimiterCellBefore):headDelimiterNok(code2)} function headDelimiterCellBefore(code2){return markdownSpace(code2)?factorySpace(effects,headDelimiterValueBefore,"whitespace")(code2):headDelimiterValueBefore(code2)}function headDelimiterValueBefore(code2){return code2===58?(sizeB+=1,seen2=!0,effects.enter("tableDelimiterMarker"),effects.consume(code2),effects.exit("tableDelimiterMarker"),headDelimiterLeftAlignmentAfter):code2===45?(sizeB+=1,headDelimiterLeftAlignmentAfter(code2)):code2===null||markdownLineEnding(code2)?headDelimiterCellAfter( code2):headDelimiterNok(code2)}function headDelimiterLeftAlignmentAfter(code2){return code2===45?(effects.enter("tableDelimiterFiller"),headDelimiterFiller(code2)):headDelimiterNok(code2)}function headDelimiterFiller(code2){return code2===45?(effects.consume(code2),headDelimiterFiller):code2===58?(seen2=!0,effects.exit("tableDelimiterFiller"),effects.enter("tableDelimiterMarker"),effects.consume(code2),effects.exit("tableDelimiterMarker"),headDelimiterRightAlignmentAfter):(effects.exit("tableDel\ imiterFiller"),headDelimiterRightAlignmentAfter(code2))}function headDelimiterRightAlignmentAfter(code2){return markdownSpace(code2)?factorySpace(effects,headDelimiterCellAfter,"whitespace")(code2):headDelimiterCellAfter(code2)}function headDelimiterCellAfter(code2){return code2===124?headDelimiterBefore(code2):code2===null||markdownLineEnding(code2)?!seen2||size2!==sizeB?headDelimiterNok(code2):(effects.exit("tableDelimiterRow"),effects.exit("tableHead"),ok(code2)):headDelimiterNok(code2)}function headDelimiterNok(code2){ return nok(code2)}function bodyRowStart(code2){return effects.enter("tableRow"),bodyRowBreak(code2)}function bodyRowBreak(code2){return code2===124?(effects.enter("tableCellDivider"),effects.consume(code2),effects.exit("tableCellDivider"),bodyRowBreak):code2===null||markdownLineEnding(code2)?(effects.exit("tableRow"),ok(code2)):markdownSpace(code2)?factorySpace(effects,bodyRowBreak,"whitespace")(code2):(effects.enter("data"),bodyRowData(code2))}function bodyRowData(code2){return code2===null||code2=== 124||markdownLineEndingOrSpace(code2)?(effects.exit("data"),bodyRowBreak(code2)):(effects.consume(code2),code2===92?bodyRowEscape:bodyRowData)}function bodyRowEscape(code2){return code2===92||code2===124?(effects.consume(code2),bodyRowData):bodyRowData(code2)}}function resolveTable(events,context){let index2=-1,inFirstCellAwaitingPipe=!0,rowKind=0,lastCell=[0,0,0,0],cell2=[0,0,0,0],afterHeadAwaitingFirstBodyRow=!1,lastTableEnd=0,currentTable,currentBody,currentCell;const map2=new EditMap;for(;++index2< events.length;){const event2=events[index2],token2=event2[1];event2[0]==="enter"?token2.type==="tableHead"?(afterHeadAwaitingFirstBodyRow=!1,lastTableEnd!==0&&(flushTableEnd(map2,context,lastTableEnd,currentTable,currentBody),currentBody=void 0,lastTableEnd=0),currentTable={type:"table",start:Object.assign({},token2.start),end:Object.assign({},token2.end)},map2.add(index2,0,[["enter",currentTable,context]])):token2.type==="tableRow"||token2.type==="tableDelimiterRow"?(inFirstCellAwaitingPipe=!0, currentCell=void 0,lastCell=[0,0,0,0],cell2=[0,index2+1,0,0],afterHeadAwaitingFirstBodyRow&&(afterHeadAwaitingFirstBodyRow=!1,currentBody={type:"tableBody",start:Object.assign({},token2.start),end:Object.assign({},token2.end)},map2.add(index2,0,[["enter",currentBody,context]])),rowKind=token2.type==="tableDelimiterRow"?2:currentBody?3:1):rowKind&&(token2.type==="data"||token2.type==="tableDelimiterMarker"||token2.type==="tableDelimiterFiller")?(inFirstCellAwaitingPipe=!1,cell2[2]===0&&(lastCell[1]!== 0&&(cell2[0]=cell2[1],currentCell=flushCell(map2,context,lastCell,rowKind,void 0,currentCell),lastCell=[0,0,0,0]),cell2[2]=index2)):token2.type==="tableCellDivider"&&(inFirstCellAwaitingPipe?inFirstCellAwaitingPipe=!1:(lastCell[1]!==0&&(cell2[0]=cell2[1],currentCell=flushCell(map2,context,lastCell,rowKind,void 0,currentCell)),lastCell=cell2,cell2=[lastCell[1],index2,0,0])):token2.type==="tableHead"?(afterHeadAwaitingFirstBodyRow=!0,lastTableEnd=index2):token2.type==="tableRow"||token2.type==="ta\ bleDelimiterRow"?(lastTableEnd=index2,lastCell[1]!==0?(cell2[0]=cell2[1],currentCell=flushCell(map2,context,lastCell,rowKind,index2,currentCell)):cell2[1]!==0&&(currentCell=flushCell(map2,context,cell2,rowKind,index2,currentCell)),rowKind=0):rowKind&&(token2.type==="data"||token2.type==="tableDelimiterMarker"||token2.type==="tableDelimiterFiller")&&(cell2[3]=index2)}for(lastTableEnd!==0&&flushTableEnd(map2,context,lastTableEnd,currentTable,currentBody),map2.consume(context.events),index2=-1;++index2< context.events.length;){const event2=context.events[index2];event2[0]==="enter"&&event2[1].type==="table"&&(event2[1]._align=gfmTableAlign(context.events,index2))}return events}function flushCell(map2,context,range,rowKind,rowEnd,previousCell){const groupName=rowKind===1?"tableHeader":rowKind===2?"tableDelimiter":"tableData",valueName="tableContent";range[0]!==0&&(previousCell.end=Object.assign({},getPoint(context.events,range[0])),map2.add(range[0],0,[["exit",previousCell,context]]));const now2=getPoint( context.events,range[1]);if(previousCell={type:groupName,start:Object.assign({},now2),end:Object.assign({},now2)},map2.add(range[1],0,[["enter",previousCell,context]]),range[2]!==0){const relatedStart=getPoint(context.events,range[2]),relatedEnd=getPoint(context.events,range[3]),valueToken={type:valueName,start:Object.assign({},relatedStart),end:Object.assign({},relatedEnd)};if(map2.add(range[2],0,[["enter",valueToken,context]]),rowKind!==2){const start2=context.events[range[2]],end=context.events[range[3]]; if(start2[1].end=Object.assign({},end[1].end),start2[1].type="chunkText",start2[1].contentType="text",range[3]>range[2]+1){const a=range[2]+1,b=range[3]-range[2]-1;map2.add(a,b,[])}}map2.add(range[3]+1,0,[["exit",valueToken,context]])}return rowEnd!==void 0&&(previousCell.end=Object.assign({},getPoint(context.events,rowEnd)),map2.add(rowEnd,0,[["exit",previousCell,context]]),previousCell=void 0),previousCell}function flushTableEnd(map2,context,index2,table2,tableBody){const exits=[],related=getPoint( context.events,index2);tableBody&&(tableBody.end=Object.assign({},related),exits.push(["exit",tableBody,context])),table2.end=Object.assign({},related),exits.push(["exit",table2,context]),map2.add(index2+1,0,exits)}function getPoint(events,index2){const event2=events[index2],side=event2[0]==="enter"?"start":"end";return event2[1][side]}const tasklistCheck={name:"tasklistCheck",tokenize:tokenizeTasklistCheck};function gfmTaskListItem(){return{text:{91:tasklistCheck}}}function tokenizeTasklistCheck(effects,ok,nok){ const self2=this;return open2;function open2(code2){return self2.previous!==null||!self2._gfmTasklistFirstContentOfListItem?nok(code2):(effects.enter("taskListCheck"),effects.enter("taskListCheckMarker"),effects.consume(code2),effects.exit("taskListCheckMarker"),inside)}function inside(code2){return markdownLineEndingOrSpace(code2)?(effects.enter("taskListCheckValueUnchecked"),effects.consume(code2),effects.exit("taskListCheckValueUnchecked"),close2):code2===88||code2===120?(effects.enter("taskL\ istCheckValueChecked"),effects.consume(code2),effects.exit("taskListCheckValueChecked"),close2):nok(code2)}function close2(code2){return code2===93?(effects.enter("taskListCheckMarker"),effects.consume(code2),effects.exit("taskListCheckMarker"),effects.exit("taskListCheck"),after):nok(code2)}function after(code2){return markdownLineEnding(code2)?ok(code2):markdownSpace(code2)?effects.check({tokenize:spaceThenNonSpace},ok,nok)(code2):nok(code2)}}function spaceThenNonSpace(effects,ok,nok){return factorySpace( effects,after,"whitespace");function after(code2){return code2===null?nok(code2):ok(code2)}}function gfm(options){return combineExtensions([gfmAutolinkLiteral(),gfmFootnote(),gfmStrikethrough(options),gfmTable(),gfmTaskListItem()])}const emptyOptions$6={};function remarkGfm(options){const self2=this,settings=options||emptyOptions$6,data=self2.data(),micromarkExtensions=data.micromarkExtensions||(data.micromarkExtensions=[]),fromMarkdownExtensions=data.fromMarkdownExtensions||(data.fromMarkdownExtensions= []),toMarkdownExtensions=data.toMarkdownExtensions||(data.toMarkdownExtensions=[]);micromarkExtensions.push(gfm(settings)),fromMarkdownExtensions.push(gfmFromMarkdown()),toMarkdownExtensions.push(gfmToMarkdown(settings))}function mathFromMarkdown(){return{enter:{mathFlow:enterMathFlow,mathFlowFenceMeta:enterMathFlowMeta,mathText:enterMathText},exit:{mathFlow:exitMathFlow,mathFlowFence:exitMathFlowFence,mathFlowFenceMeta:exitMathFlowMeta,mathFlowValue:exitMathData,mathText:exitMathText,mathTextData:exitMathData}}; function enterMathFlow(token2){const code2={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[code2]}},token2)}function enterMathFlowMeta(){this.buffer()}function exitMathFlowMeta(){const data=this.resume(),node2=this.stack[this.stack.length-1];node2.type,node2.meta=data}function exitMathFlowFence(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function exitMathFlow(token2){ const data=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),node2=this.stack[this.stack.length-1];node2.type,this.exit(token2),node2.value=data;const code2=node2.data.hChildren[0];code2.type,code2.tagName,code2.children.push({type:"text",value:data}),this.data.mathFlowInside=void 0}function enterMathText(token2){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},token2),this.buffer()}function exitMathText(token2){const data=this. resume(),node2=this.stack[this.stack.length-1];node2.type,this.exit(token2),node2.value=data,node2.data.hChildren.push({type:"text",value:data})}function exitMathData(token2){this.config.enter.data.call(this,token2),this.config.exit.data.call(this,token2)}}function mathToMarkdown(options){let single=(options||{}).singleDollarTextMath;return single==null&&(single=!0),inlineMath.peek=inlineMathPeek,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` `,inConstruct:"mathFlowMeta"},{character:"$",after:single?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:math2,inlineMath}};function math2(node2,_,state2,info2){const raw2=node2.value||"",tracker=state2.createTracker(info2),sequence="$".repeat(Math.max(longestStreak(raw2,"$")+1,2)),exit2=state2.enter("mathFlow");let value=tracker.move(sequence);if(node2.meta){const subexit=state2.enter("mathFlowMeta");value+= tracker.move(state2.safe(node2.meta,{after:` `,before:value,encode:["$"],...tracker.current()})),subexit()}return value+=tracker.move(` `),raw2&&(value+=tracker.move(raw2+` `)),value+=tracker.move(sequence),exit2(),value}function inlineMath(node2,_,state2){let value=node2.value||"",size2=1;for(single||size2++;new RegExp("(^|[^$])"+"\\$".repeat(size2)+"([^$]|$)").test(value);)size2++;const sequence="$".repeat(size2);/[^ \r\n]/.test(value)&&(/^[ \r\n]/.test(value)&&/[ \r\n]$/.test(value)||/^\$|\$$/.test(value))&&(value=" "+value+" ");let index2=-1;for(;++index215?left="…"+input.slice(start2-15,start2):left=input.slice(0,start2);var right;end+15":">","<":"<",'"':""","'":"\ '"},ESCAPE_REGEX=/[&><"']/g;function escape$2(text2){return String(text2).replace(ESCAPE_REGEX,match=>ESCAPE_LOOKUP[match])}var getBaseElem=function getBaseElem2(group){return group.type==="ordgroup"||group.type==="color"?group.body.length===1?getBaseElem2(group.body[0]):group:group.type==="font"?getBaseElem2(group.body):group},isCharacterBox=function(group){var baseElem=getBaseElem(group);return baseElem.type==="mathord"||baseElem.type==="textord"||baseElem.type==="atom"},assert=function(value){ if(!value)throw new Error("Expected non-null, but got "+String(value));return value},protocolFromUrl=function(url2){var protocol=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(url2);return protocol?protocol[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(protocol[1])?null:protocol[1].toLowerCase():"_relative"},utils={contains,deflt,escape:escape$2,hyphenate,getBaseElem,isCharacterBox,protocolFromUrl},SETTINGS_SCHEMA={displayMode:{type:"boolean",description:"Render math in display mode, \ which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0, cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:color=>"#"+color},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custo\ m macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(def,defs)=>(defs.push(def),defs)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:t=>Math.max(0,t),cli:"--min-rule-thickness ",cliProcessor:parseFloat}, colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, ena\ bling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:s2=>Math.max(0,s2),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to\ Infinity, the macro expander will try to fully expand as in LaTeX.",processor:n=>Math.max(0,n),cli:"-e, --max-expand ",cliProcessor:n=>n==="Infinity"?1/0:parseInt(n)},globalGroup:{type:"boolean",cli:!1}};function getDefaultValue(schema){if(schema.default)return schema.default;var type2=schema.type,defaultType=Array.isArray(type2)?type2[0]:type2;if(typeof defaultType!="string")return defaultType.enum[0];switch(defaultType){case"boolean":return!1;case"string":return"";case"number":return 0;case"\ object":return{}}}class Settings{constructor(options){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,options=options||{};for(var prop2 in SETTINGS_SCHEMA)if(SETTINGS_SCHEMA.hasOwnProperty(prop2)){var schema=SETTINGS_SCHEMA[prop2];this[prop2]= options[prop2]!==void 0?schema.processor?schema.processor(options[prop2]):options[prop2]:getDefaultValue(schema)}}reportNonstrict(errorCode,errorMsg,token2){var strict=this.strict;if(typeof strict=="function"&&(strict=strict(errorCode,errorMsg,token2)),!(!strict||strict==="ignore")){if(strict===!0||strict==="error")throw new ParseError2("LaTeX-incompatible input and strict mode is set to 'error': "+(errorMsg+" ["+errorCode+"]"),token2);strict==="warn"?typeof console<"u"&&console.warn("LaTeX-inco\ mpatible input and strict mode is set to 'warn': "+(errorMsg+" ["+errorCode+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+strict+"': "+errorMsg+" ["+errorCode+"]"))}}useStrictBehavior(errorCode,errorMsg,token2){var strict=this.strict;if(typeof strict=="function")try{strict=strict(errorCode,errorMsg,token2)}catch{strict="error"}return!strict||strict==="ignore"?!1:strict===!0||strict==="error"?!0:strict==="warn"?(typeof console<"u"&& console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(errorMsg+" ["+errorCode+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+strict+"': "+errorMsg+" ["+errorCode+"]")),!1)}isTrusted(context){if(context.url&&!context.protocol){var protocol=utils.protocolFromUrl(context.url);if(protocol==null)return!1;context.protocol=protocol}var trust=typeof this.trust=="function"?this.trust(context):this.trust;return!!trust}} class Style{constructor(id2,size2,cramped){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=id2,this.size=size2,this.cramped=cramped}sup(){return styles[sup[this.id]]}sub(){return styles[sub[this.id]]}fracNum(){return styles[fracNum[this.id]]}fracDen(){return styles[fracDen[this.id]]}cramp(){return styles[cramp[this.id]]}text(){return styles[text$1$1[this.id]]}isTight(){return this.size>=2}}var D=0,Dc=1,T=2,Tc=3,S=4,Sc=5,SS=6,SSc=7,styles=[new Style(D,0,!1),new Style(Dc,0,!0),new Style( T,1,!1),new Style(Tc,1,!0),new Style(S,2,!1),new Style(Sc,2,!0),new Style(SS,3,!1),new Style(SSc,3,!0)],sup=[S,Sc,S,Sc,SS,SSc,SS,SSc],sub=[Sc,Sc,Sc,Sc,SSc,SSc,SSc,SSc],fracNum=[T,Tc,S,Sc,SS,SSc,SS,SSc],fracDen=[Tc,Tc,Sc,Sc,SSc,SSc,SSc,SSc],cramp=[Dc,Dc,Tc,Tc,Sc,Sc,SSc,SSc],text$1$1=[D,Dc,T,Tc,T,Tc,T,Tc],Style$1={DISPLAY:styles[D],TEXT:styles[T],SCRIPT:styles[S],SCRIPTSCRIPT:styles[SS]},scriptData=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian", blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function scriptFromCodepoint(codepoint){for(var i=0;i=block2[0]&&codepoint<=block2[1])return script.name}return null}var allBlocks=[];scriptData.forEach(s2=>s2.blocks.forEach( b=>allBlocks.push(...b)));function supportedCodepoint(codepoint){for(var i=0;i=allBlocks[i]&&codepoint<=allBlocks[i+1])return!0;return!1}var hLinePad=80,sqrtMain=function(extraVinculum,hLinePad2){return"M95,"+(622+extraVinculum+hLinePad2)+` c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 c69,-144,104.5,-217.7,106.5,-221 l`+extraVinculum/2.075+" -"+extraVinculum+` c5.3,-9.3,12,-14,20,-14 H400000v`+(40+extraVinculum)+`H845.2724 s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z M`+(834+extraVinculum)+" "+hLinePad2+"h400000v"+(40+extraVinculum)+"h-400000z"},sqrtSize1=function(extraVinculum,hLinePad2){return"M263,"+(601+extraVinculum+hLinePad2)+`c0.7,0,18,39.7,52,119 c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 c340,-704.7,510.7,-1060.3,512,-1067 l`+extraVinculum/2.084+" -"+extraVinculum+` c4.7,-7.3,11,-11,19,-11 H40000v`+(40+extraVinculum)+`H1012.3 s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z M`+(1001+extraVinculum)+" "+hLinePad2+"h400000v"+(40+extraVinculum)+"h-400000z"},sqrtSize2=function(extraVinculum,hLinePad2){return"M983 "+(10+extraVinculum+hLinePad2)+` l`+extraVinculum/3.13+" -"+extraVinculum+` c4,-6.7,10,-10,18,-10 H400000v`+(40+extraVinculum)+` H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 c53.7,-170.3,84.5,-266.8,92.5,-289.5z M`+(1001+extraVinculum)+" "+hLinePad2+"h400000v"+(40+extraVinculum)+"h-400000z"},sqrtSize3=function(extraVinculum,hLinePad2){return"M424,"+(2398+extraVinculum+hLinePad2)+` c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 l`+extraVinculum/4.223+" -"+extraVinculum+`c4,-6.7,10,-10,18,-10 H400000 v`+(40+extraVinculum)+`H1014.6 s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2z M`+(1001+extraVinculum)+" "+hLinePad2+` h400000v`+(40+extraVinculum)+"h-400000z"},sqrtSize4=function(extraVinculum,hLinePad2){return"M473,"+(2713+extraVinculum+hLinePad2)+` c339.3,-1799.3,509.3,-2700,510,-2702 l`+extraVinculum/5.298+" -"+extraVinculum+` c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+extraVinculum)+`H1017.7 s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, 606zM`+(1001+extraVinculum)+" "+hLinePad2+"h400000v"+(40+extraVinculum)+"H1017.7z"},phasePath=function(y){var x=y/2;return"M400000 "+y+" H0 L"+x+" 0 l65 45 L145 "+(y-80)+" H400000z"},sqrtTall=function(extraVinculum,hLinePad2,viewBoxHeight){var vertSegment=viewBoxHeight-54-hLinePad2-extraVinculum;return"M702 "+(extraVinculum+hLinePad2)+"H400000"+(40+extraVinculum)+` H742v`+vertSegment+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 219 661 l218 661zM702 `+hLinePad2+"H400000v"+(40+extraVinculum)+"H742z"},sqrtPath=function(size2,extraVinculum,viewBoxHeight){extraVinculum=1e3*extraVinculum;var path2="";switch(size2){case"sqrtMain":path2=sqrtMain(extraVinculum,hLinePad);break;case"sqrtSize1":path2=sqrtSize1(extraVinculum,hLinePad);break;case"sqrtSize2":path2=sqrtSize2(extraVinculum,hLinePad);break;case"sqrtSize3":path2=sqrtSize3(extraVinculum,hLinePad);break;case"sqrtSize4":path2=sqrtSize4(extraVinculum,hLinePad);break;case"sq\ rtTall":path2=sqrtTall(extraVinculum,hLinePad,viewBoxHeight)}return path2},innerPath=function(name,height){switch(name){case"⎜":return"M291 0 H417 V"+height+" H291z M291 0 H417 V"+height+" H291z";case"∣":return"M145 0 H188 V"+height+" H145z M145 0 H188 V"+height+" H145z";case"∥":return"M145 0 H188 V"+height+" H145z M145 0 H188 V"+height+" H145z"+("M367 0 H410 V"+height+" H367z M367 0 H410 V"+height+" H367z");case"⎟":return"M457 0 H583 V"+height+" H457z M457 0 H583 V"+height+" H457z";case"\ ⎢":return"M319 0 H403 V"+height+" H319z M319 0 H403 V"+height+" H319z";case"⎥":return"M263 0 H347 V"+height+" H263z M263 0 H347 V"+height+" H263z";case"⎪":return"M384 0 H504 V"+height+" H384z M384 0 H504 V"+height+" H384z";case"⏐":return"M312 0 H355 V"+height+" H312z M312 0 H355 V"+height+" H312z";case"‖":return"M257 0 H300 V"+height+" H257z M257 0 H300 V"+height+" H257z"+("M478 0 H521 V"+height+" H478z M478 0 H521 V"+height+" H478z");default:return""}},path={doubleleftarrow:`M262 157 l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l -10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 -33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 -17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 -5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 435 0h399565z`,leftgroupunder:`M400000 262 H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 -3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 -18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 -196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 -4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 -152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 -5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 -16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 -40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l -6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 -174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 -3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 -10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 -18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 -7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 -27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 -2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 -8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 -1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, -5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 -27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 -84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 -119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, 1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},tallDelim=function(label,midHeight){switch(label){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+midHeight+` v1759 h347 v-84 H403z M403 1759 V0 H319 V1759 v`+midHeight+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+midHeight+` v1759 H0 v84 H347z M347 1759 V0 H263 V1759 v`+midHeight+" v1759 h84z";case"vert":return"M145 15 v585 v"+midHeight+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-midHeight+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+midHeight+" v585 h43z";case"doublevert":return"M145 15 v585 v"+midHeight+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-midHeight+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+midHeight+` v585 h43z M367 15 v585 v`+midHeight+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-midHeight+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+midHeight+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+midHeight+` v1715 h263 v84 H319z MM319 602 V0 H403 V602 v`+midHeight+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+midHeight+` v1799 H0 v-84 H319z MM319 602 V0 H403 V602 v`+midHeight+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+midHeight+` v602 h84z M403 1759 V0 H319 V1759 v`+midHeight+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+midHeight+` v602 h84z M347 1759 V0 h-84 V1759 v`+midHeight+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, -36,557 l0,`+(midHeight+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, 949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 l0,-`+(midHeight+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, -210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(midHeight+9)+` c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 l0,-`+(midHeight+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class DocumentFragment{constructor(children){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=children,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(className){return utils.contains(this.classes,className)}toNode(){for(var frag=document.createDocumentFragment(), i=0;ichild2.toText();return this.children.map(toText2).join("")}}var fontMetricsData={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889, 0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0, .68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889, 0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778], 8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788, 0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5], 8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778], 8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778], 8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675, 0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167, 0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569, .88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[ .15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[ 0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726, 0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778], 57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139], 69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889, .60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283, 0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0, .36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861], 84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141, 0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[ 0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[ .25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0, 0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611, 0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889], 101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[ 0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722], 230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611, 0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486, 0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889, .39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556, 0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444, .12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[ .19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575], 8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963, .69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555], 40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167, 0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611, .14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25, .75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444, .09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888], 184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111], 729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811, 0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0, .30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666], 63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0, .68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0, .46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0, .42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056, .07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666], 923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[ 0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0, .64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333, 0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5], 95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0, 0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778], 182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0, .66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[ 0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[ .19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444, 0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0, .27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391, .5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[ .08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764, 0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412], 10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575], 53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201], 78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444, 0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704, 0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064], 946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722, .44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0, .5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847, .11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333, .07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056, 0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667, .83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[ .19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778, .43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0, 0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0, .69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[ 0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444, 0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0, .40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444, 0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444, 0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156, 0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0, .72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094, 0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778, 0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169, 0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826, 0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205, 0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0, 0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778], 74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0, 0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[ 0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0, .69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[ 0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[ 0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001, .85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556], 8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001, .75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001, 1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15, 0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[ 0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75, 0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667], 9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[ 0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0, .525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111, 0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[ .08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056, 0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056, 0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[ 0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},sigmasAndXis={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386, .353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},extraCharacterMap={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"\ A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function setFontMetrics(fontName,metrics){fontMetricsData[fontName]= metrics}function getCharacterMetrics(character,font,mode){if(!fontMetricsData[font])throw new Error("Font metrics not found for font: "+font+".");var ch=character.charCodeAt(0),metrics=fontMetricsData[font][ch];if(!metrics&&character[0]in extraCharacterMap&&(ch=extraCharacterMap[character[0]].charCodeAt(0),metrics=fontMetricsData[font][ch]),!metrics&&mode==="text"&&supportedCodepoint(ch)&&(metrics=fontMetricsData[font][77]),metrics)return{depth:metrics[0],height:metrics[1],italic:metrics[2],skew:metrics[3], width:metrics[4]}}var fontMetricsBySizeIndex={};function getGlobalMetrics(size2){var sizeIndex;if(size2>=5?sizeIndex=0:size2>=3?sizeIndex=1:sizeIndex=2,!fontMetricsBySizeIndex[sizeIndex]){var metrics=fontMetricsBySizeIndex[sizeIndex]={cssEmPerMu:sigmasAndXis.quad[sizeIndex]/18};for(var key2 in sigmasAndXis)sigmasAndXis.hasOwnProperty(key2)&&(metrics[key2]=sigmasAndXis[key2][sizeIndex])}return fontMetricsBySizeIndex[sizeIndex]}var sizeStyleMap=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4, 2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],sizeMultipliers=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],sizeAtStyle=function(size2,style2){return style2.size<2?size2:sizeStyleMap[size2-1][style2.size-1]};class Options{constructor(data){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics= void 0,this.style=data.style,this.color=data.color,this.size=data.size||Options.BASESIZE,this.textSize=data.textSize||this.size,this.phantom=!!data.phantom,this.font=data.font||"",this.fontFamily=data.fontFamily||"",this.fontWeight=data.fontWeight||"",this.fontShape=data.fontShape||"",this.sizeMultiplier=sizeMultipliers[this.size-1],this.maxSize=data.maxSize,this.minRuleThickness=data.minRuleThickness,this._fontMetrics=void 0}extend(extension2){var data={style:this.style,size:this.size,textSize:this. textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var key2 in extension2)extension2.hasOwnProperty(key2)&&(data[key2]=extension2[key2]);return new Options(data)}havingStyle(style2){return this.style===style2?this:this.extend({style:style2,size:sizeAtStyle(this.textSize,style2)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(size2){ return this.size===size2&&this.textSize===size2?this:this.extend({style:this.style.text(),size:size2,textSize:size2,sizeMultiplier:sizeMultipliers[size2-1]})}havingBaseStyle(style2){style2=style2||this.style.text();var wantSize=sizeAtStyle(Options.BASESIZE,style2);return this.size===wantSize&&this.textSize===Options.BASESIZE&&this.style===style2?this:this.extend({style:style2,size:wantSize})}havingBaseSizing(){var size2;switch(this.style.id){case 4:case 5:size2=3;break;case 6:case 7:size2=1;break;default: size2=6}return this.extend({style:this.style.text(),size:size2})}withColor(color){return this.extend({color})}withPhantom(){return this.extend({phantom:!0})}withFont(font){return this.extend({font})}withTextFontFamily(fontFamily){return this.extend({fontFamily,font:""})}withTextFontWeight(fontWeight){return this.extend({fontWeight,font:""})}withTextFontShape(fontShape){return this.extend({fontShape,font:""})}sizingClasses(oldOptions){return oldOptions.size!==this.size?["sizing","reset-size"+oldOptions. size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Options.BASESIZE?["sizing","reset-size"+this.size,"size"+Options.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=getGlobalMetrics(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Options.BASESIZE=6;var ptPerUnit={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},relativeUnit={ex:!0,em:!0,mu:!0}, validUnit=function(unit){return typeof unit!="string"&&(unit=unit.unit),unit in ptPerUnit||unit in relativeUnit||unit==="ex"},calculateSize=function(sizeValue,options){var scale2;if(sizeValue.unit in ptPerUnit)scale2=ptPerUnit[sizeValue.unit]/options.fontMetrics().ptPerEm/options.sizeMultiplier;else if(sizeValue.unit==="mu")scale2=options.fontMetrics().cssEmPerMu;else{var unitOptions;if(options.style.isTight()?unitOptions=options.havingStyle(options.style.text()):unitOptions=options,sizeValue.unit=== "ex")scale2=unitOptions.fontMetrics().xHeight;else if(sizeValue.unit==="em")scale2=unitOptions.fontMetrics().quad;else throw new ParseError2("Invalid unit: '"+sizeValue.unit+"'");unitOptions!==options&&(scale2*=unitOptions.sizeMultiplier/options.sizeMultiplier)}return Math.min(sizeValue.number*scale2,options.maxSize)},makeEm=function(n){return+n.toFixed(4)+"em"},createClass=function(classes){return classes.filter(cls=>cls).join(" ")},initNode=function(classes,options,style2){if(this.classes=classes|| [],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=style2||{},options){options.style.isTight()&&this.classes.push("mtight");var color=options.getColor();color&&(this.style.color=color)}},toNode=function(tagName){var node2=document.createElement(tagName);node2.className=createClass(this.classes);for(var style2 in this.style)this.style.hasOwnProperty(style2)&&(node2.style[style2]=this.style[style2]);for(var attr in this.attributes)this.attributes.hasOwnProperty(attr)&&node2. setAttribute(attr,this.attributes[attr]);for(var i=0;i/=\x00-\x1f]/,toMarkup=function(tagName){var markup="<"+tagName;this.classes.length&&(markup+=' class="'+utils.escape(createClass(this.classes))+'"');var styles2="";for(var style2 in this.style)this.style.hasOwnProperty(style2)&&(styles2+=utils.hyphenate(style2)+":"+this.style[style2]+";");styles2&&(markup+=' style="'+utils.escape( styles2)+'"');for(var attr in this.attributes)if(this.attributes.hasOwnProperty(attr)){if(invalidAttributeNameRegex.test(attr))throw new ParseError2("Invalid attribute name '"+attr+"'");markup+=" "+attr+'="'+utils.escape(this.attributes[attr])+'"'}markup+=">";for(var i=0;i",markup};class Span{constructor(classes,children,options,style2){this.children=void 0,this.attributes=void 0,this.classes=void 0,this. height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,initNode.call(this,classes,options,style2),this.children=children||[]}setAttribute(attribute,value){this.attributes[attribute]=value}hasClass(className){return utils.contains(this.classes,className)}toNode(){return toNode.call(this,"span")}toMarkup(){return toMarkup.call(this,"span")}}class Anchor{constructor(href,classes,children,options){this.children=void 0,this.attributes=void 0,this.classes=void 0,this. height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,initNode.call(this,classes,options),this.children=children||[],this.setAttribute("href",href)}setAttribute(attribute,value){this.attributes[attribute]=value}hasClass(className){return utils.contains(this.classes,className)}toNode(){return toNode.call(this,"a")}toMarkup(){return toMarkup.call(this,"a")}}class Img{constructor(src,alt,style2){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0, this.maxFontSize=void 0,this.style=void 0,this.alt=alt,this.src=src,this.classes=["mord"],this.style=style2}hasClass(className){return utils.contains(this.classes,className)}toNode(){var node2=document.createElement("img");node2.src=this.src,node2.alt=this.alt,node2.className="mord";for(var style2 in this.style)this.style.hasOwnProperty(style2)&&(node2.style[style2]=this.style[style2]);return node2}toMarkup(){var markup=''+utils.escape(this.alt)+'0&&(span=document.createElement("span"),span.style.marginRight=makeEm(this.italic)),this.classes.length>0&&(span=span||document.createElement("span"),span.className=createClass(this.classes));for(var style2 in this.style)this.style.hasOwnProperty(style2)&&(span=span||document.createElement("span"),span.style[style2]=this.style[style2]);return span?(span.appendChild(node2),span):node2}toMarkup(){var needsSpan=!1,markup="0&&(styles2+="margin-right:"+this.italic+"em;");for(var style2 in this.style)this.style.hasOwnProperty(style2)&&(styles2+=utils.hyphenate(style2)+":"+this.style[style2]+";");styles2&&(needsSpan=!0,markup+=' style="'+utils.escape(styles2)+'"');var escaped=utils.escape(this.text);return needsSpan?(markup+=">",markup+=escaped,markup+="",markup):escaped}}class SvgNode{constructor(children,attributes){ this.children=void 0,this.attributes=void 0,this.children=children||[],this.attributes=attributes||{}}toNode(){var svgNS="http://www.w3.org/2000/svg",node2=document.createElementNS(svgNS,"svg");for(var attr in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,attr)&&node2.setAttribute(attr,this.attributes[attr]);for(var i=0;i':''}}class LineNode{constructor(attributes){this.attributes=void 0,this.attributes=attributes||{}}toNode(){var svgNS="http://www.w3.org/2000/svg",node2=document.createElementNS(svgNS,"line");for(var attr in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,attr)&& node2.setAttribute(attr,this.attributes[attr]);return node2}toMarkup(){var markup=" but got "+String(group)+".")}var ATOMS={bin:1,close:1,inner:1,open:1,punct:1,rel:1},NON_ATOMS={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},symbols={math:{},text:{}};function defineSymbol(mode,font,group,replace2,name,acceptUnicodeChar){symbols[mode][name]={font,group,replace:replace2},acceptUnicodeChar&&replace2&&(symbols[mode][replace2]=symbols[mode][name])}var math="math",text$3="text",main="main",ams="ams",accent="accent-token",bin="bin",close="clo\ se",inner="inner",mathord="mathord",op="op-token",open="open",punct="punct",rel="rel",spacing="spacing",textord="textord";defineSymbol(math,main,rel,"≡","\\equiv",!0);defineSymbol(math,main,rel,"≺","\\prec",!0);defineSymbol(math,main,rel,"≻","\\succ",!0);defineSymbol(math,main,rel,"∼","\\sim",!0);defineSymbol(math,main,rel,"⊥","\\perp");defineSymbol(math,main,rel,"⪯","\\preceq",!0);defineSymbol(math,main,rel,"⪰","\\succeq",!0);defineSymbol(math,main,rel,"≃","\\simeq",!0);defineSymbol( math,main,rel,"∣","\\mid",!0);defineSymbol(math,main,rel,"≪","\\ll",!0);defineSymbol(math,main,rel,"≫","\\gg",!0);defineSymbol(math,main,rel,"≍","\\asymp",!0);defineSymbol(math,main,rel,"∥","\\parallel");defineSymbol(math,main,rel,"⋈","\\bowtie",!0);defineSymbol(math,main,rel,"⌣","\\smile",!0);defineSymbol(math,main,rel,"⊑","\\sqsubseteq",!0);defineSymbol(math,main,rel,"⊒","\\sqsupseteq",!0);defineSymbol(math,main,rel,"≐","\\doteq",!0);defineSymbol(math,main,rel,"⌢","\\frown", !0);defineSymbol(math,main,rel,"∋","\\ni",!0);defineSymbol(math,main,rel,"∝","\\propto",!0);defineSymbol(math,main,rel,"⊢","\\vdash",!0);defineSymbol(math,main,rel,"⊣","\\dashv",!0);defineSymbol(math,main,rel,"∋","\\owns");defineSymbol(math,main,punct,".","\\ldotp");defineSymbol(math,main,punct,"⋅","\\cdotp");defineSymbol(math,main,textord,"#","\\#");defineSymbol(text$3,main,textord,"#","\\#");defineSymbol(math,main,textord,"&","\\&");defineSymbol(text$3,main,textord,"&","\\&");defineSymbol( math,main,textord,"ℵ","\\aleph",!0);defineSymbol(math,main,textord,"∀","\\forall",!0);defineSymbol(math,main,textord,"ℏ","\\hbar",!0);defineSymbol(math,main,textord,"∃","\\exists",!0);defineSymbol(math,main,textord,"∇","\\nabla",!0);defineSymbol(math,main,textord,"♭","\\flat",!0);defineSymbol(math,main,textord,"ℓ","\\ell",!0);defineSymbol(math,main,textord,"♮","\\natural",!0);defineSymbol(math,main,textord,"♣","\\clubsuit",!0);defineSymbol(math,main,textord,"℘","\\wp",!0);defineSymbol( math,main,textord,"♯","\\sharp",!0);defineSymbol(math,main,textord,"♢","\\diamondsuit",!0);defineSymbol(math,main,textord,"ℜ","\\Re",!0);defineSymbol(math,main,textord,"♡","\\heartsuit",!0);defineSymbol(math,main,textord,"ℑ","\\Im",!0);defineSymbol(math,main,textord,"♠","\\spadesuit",!0);defineSymbol(math,main,textord,"§","\\S",!0);defineSymbol(text$3,main,textord,"§","\\S");defineSymbol(math,main,textord,"¶","\\P",!0);defineSymbol(text$3,main,textord,"¶","\\P");defineSymbol(math, main,textord,"†","\\dag");defineSymbol(text$3,main,textord,"†","\\dag");defineSymbol(text$3,main,textord,"†","\\textdagger");defineSymbol(math,main,textord,"‡","\\ddag");defineSymbol(text$3,main,textord,"‡","\\ddag");defineSymbol(text$3,main,textord,"‡","\\textdaggerdbl");defineSymbol(math,main,close,"⎱","\\rmoustache",!0);defineSymbol(math,main,open,"⎰","\\lmoustache",!0);defineSymbol(math,main,close,"⟯","\\rgroup",!0);defineSymbol(math,main,open,"⟮","\\lgroup",!0);defineSymbol( math,main,bin,"∓","\\mp",!0);defineSymbol(math,main,bin,"⊖","\\ominus",!0);defineSymbol(math,main,bin,"⊎","\\uplus",!0);defineSymbol(math,main,bin,"⊓","\\sqcap",!0);defineSymbol(math,main,bin,"∗","\\ast");defineSymbol(math,main,bin,"⊔","\\sqcup",!0);defineSymbol(math,main,bin,"◯","\\bigcirc",!0);defineSymbol(math,main,bin,"∙","\\bullet",!0);defineSymbol(math,main,bin,"‡","\\ddagger");defineSymbol(math,main,bin,"≀","\\wr",!0);defineSymbol(math,main,bin,"⨿","\\amalg");defineSymbol( math,main,bin,"&","\\And");defineSymbol(math,main,rel,"⟵","\\longleftarrow",!0);defineSymbol(math,main,rel,"⇐","\\Leftarrow",!0);defineSymbol(math,main,rel,"⟸","\\Longleftarrow",!0);defineSymbol(math,main,rel,"⟶","\\longrightarrow",!0);defineSymbol(math,main,rel,"⇒","\\Rightarrow",!0);defineSymbol(math,main,rel,"⟹","\\Longrightarrow",!0);defineSymbol(math,main,rel,"↔","\\leftrightarrow",!0);defineSymbol(math,main,rel,"⟷","\\longleftrightarrow",!0);defineSymbol(math,main,rel,"⇔", "\\Leftrightarrow",!0);defineSymbol(math,main,rel,"⟺","\\Longleftrightarrow",!0);defineSymbol(math,main,rel,"↦","\\mapsto",!0);defineSymbol(math,main,rel,"⟼","\\longmapsto",!0);defineSymbol(math,main,rel,"↗","\\nearrow",!0);defineSymbol(math,main,rel,"↩","\\hookleftarrow",!0);defineSymbol(math,main,rel,"↪","\\hookrightarrow",!0);defineSymbol(math,main,rel,"↘","\\searrow",!0);defineSymbol(math,main,rel,"↼","\\leftharpoonup",!0);defineSymbol(math,main,rel,"⇀","\\rightharpoonup",!0); defineSymbol(math,main,rel,"↙","\\swarrow",!0);defineSymbol(math,main,rel,"↽","\\leftharpoondown",!0);defineSymbol(math,main,rel,"⇁","\\rightharpoondown",!0);defineSymbol(math,main,rel,"↖","\\nwarrow",!0);defineSymbol(math,main,rel,"⇌","\\rightleftharpoons",!0);defineSymbol(math,ams,rel,"≮","\\nless",!0);defineSymbol(math,ams,rel,"","\\@nleqslant");defineSymbol(math,ams,rel,"","\\@nleqq");defineSymbol(math,ams,rel,"⪇","\\lneq",!0);defineSymbol(math,ams,rel,"≨","\\lneqq",!0); defineSymbol(math,ams,rel,"","\\@lvertneqq");defineSymbol(math,ams,rel,"⋦","\\lnsim",!0);defineSymbol(math,ams,rel,"⪉","\\lnapprox",!0);defineSymbol(math,ams,rel,"⊀","\\nprec",!0);defineSymbol(math,ams,rel,"⋠","\\npreceq",!0);defineSymbol(math,ams,rel,"⋨","\\precnsim",!0);defineSymbol(math,ams,rel,"⪹","\\precnapprox",!0);defineSymbol(math,ams,rel,"≁","\\nsim",!0);defineSymbol(math,ams,rel,"","\\@nshortmid");defineSymbol(math,ams,rel,"∤","\\nmid",!0);defineSymbol(math,ams,rel, "⊬","\\nvdash",!0);defineSymbol(math,ams,rel,"⊭","\\nvDash",!0);defineSymbol(math,ams,rel,"⋪","\\ntriangleleft");defineSymbol(math,ams,rel,"⋬","\\ntrianglelefteq",!0);defineSymbol(math,ams,rel,"⊊","\\subsetneq",!0);defineSymbol(math,ams,rel,"","\\@varsubsetneq");defineSymbol(math,ams,rel,"⫋","\\subsetneqq",!0);defineSymbol(math,ams,rel,"","\\@varsubsetneqq");defineSymbol(math,ams,rel,"≯","\\ngtr",!0);defineSymbol(math,ams,rel,"","\\@ngeqslant");defineSymbol(math,ams,rel,"", "\\@ngeqq");defineSymbol(math,ams,rel,"⪈","\\gneq",!0);defineSymbol(math,ams,rel,"≩","\\gneqq",!0);defineSymbol(math,ams,rel,"","\\@gvertneqq");defineSymbol(math,ams,rel,"⋧","\\gnsim",!0);defineSymbol(math,ams,rel,"⪊","\\gnapprox",!0);defineSymbol(math,ams,rel,"⊁","\\nsucc",!0);defineSymbol(math,ams,rel,"⋡","\\nsucceq",!0);defineSymbol(math,ams,rel,"⋩","\\succnsim",!0);defineSymbol(math,ams,rel,"⪺","\\succnapprox",!0);defineSymbol(math,ams,rel,"≆","\\ncong",!0);defineSymbol( math,ams,rel,"","\\@nshortparallel");defineSymbol(math,ams,rel,"∦","\\nparallel",!0);defineSymbol(math,ams,rel,"⊯","\\nVDash",!0);defineSymbol(math,ams,rel,"⋫","\\ntriangleright");defineSymbol(math,ams,rel,"⋭","\\ntrianglerighteq",!0);defineSymbol(math,ams,rel,"","\\@nsupseteqq");defineSymbol(math,ams,rel,"⊋","\\supsetneq",!0);defineSymbol(math,ams,rel,"","\\@varsupsetneq");defineSymbol(math,ams,rel,"⫌","\\supsetneqq",!0);defineSymbol(math,ams,rel,"","\\@varsupsetneqq");defineSymbol( math,ams,rel,"⊮","\\nVdash",!0);defineSymbol(math,ams,rel,"⪵","\\precneqq",!0);defineSymbol(math,ams,rel,"⪶","\\succneqq",!0);defineSymbol(math,ams,rel,"","\\@nsubseteqq");defineSymbol(math,ams,bin,"⊴","\\unlhd");defineSymbol(math,ams,bin,"⊵","\\unrhd");defineSymbol(math,ams,rel,"↚","\\nleftarrow",!0);defineSymbol(math,ams,rel,"↛","\\nrightarrow",!0);defineSymbol(math,ams,rel,"⇍","\\nLeftarrow",!0);defineSymbol(math,ams,rel,"⇏","\\nRightarrow",!0);defineSymbol(math,ams,rel,"\ ↮","\\nleftrightarrow",!0);defineSymbol(math,ams,rel,"⇎","\\nLeftrightarrow",!0);defineSymbol(math,ams,rel,"△","\\vartriangle");defineSymbol(math,ams,textord,"ℏ","\\hslash");defineSymbol(math,ams,textord,"▽","\\triangledown");defineSymbol(math,ams,textord,"◊","\\lozenge");defineSymbol(math,ams,textord,"Ⓢ","\\circledS");defineSymbol(math,ams,textord,"®","\\circledR");defineSymbol(text$3,ams,textord,"®","\\circledR");defineSymbol(math,ams,textord,"∡","\\measuredangle",!0);defineSymbol( math,ams,textord,"∄","\\nexists");defineSymbol(math,ams,textord,"℧","\\mho");defineSymbol(math,ams,textord,"Ⅎ","\\Finv",!0);defineSymbol(math,ams,textord,"⅁","\\Game",!0);defineSymbol(math,ams,textord,"‵","\\backprime");defineSymbol(math,ams,textord,"▲","\\blacktriangle");defineSymbol(math,ams,textord,"▼","\\blacktriangledown");defineSymbol(math,ams,textord,"■","\\blacksquare");defineSymbol(math,ams,textord,"⧫","\\blacklozenge");defineSymbol(math,ams,textord,"★","\\bigstar"); defineSymbol(math,ams,textord,"∢","\\sphericalangle",!0);defineSymbol(math,ams,textord,"∁","\\complement",!0);defineSymbol(math,ams,textord,"ð","\\eth",!0);defineSymbol(text$3,main,textord,"ð","ð");defineSymbol(math,ams,textord,"╱","\\diagup");defineSymbol(math,ams,textord,"╲","\\diagdown");defineSymbol(math,ams,textord,"□","\\square");defineSymbol(math,ams,textord,"□","\\Box");defineSymbol(math,ams,textord,"◊","\\Diamond");defineSymbol(math,ams,textord,"¥","\\yen",!0);defineSymbol( text$3,ams,textord,"¥","\\yen",!0);defineSymbol(math,ams,textord,"✓","\\checkmark",!0);defineSymbol(text$3,ams,textord,"✓","\\checkmark");defineSymbol(math,ams,textord,"ℶ","\\beth",!0);defineSymbol(math,ams,textord,"ℸ","\\daleth",!0);defineSymbol(math,ams,textord,"ℷ","\\gimel",!0);defineSymbol(math,ams,textord,"ϝ","\\digamma",!0);defineSymbol(math,ams,textord,"ϰ","\\varkappa");defineSymbol(math,ams,open,"┌","\\@ulcorner",!0);defineSymbol(math,ams,close,"┐","\\@urcorner",!0);defineSymbol( math,ams,open,"└","\\@llcorner",!0);defineSymbol(math,ams,close,"┘","\\@lrcorner",!0);defineSymbol(math,ams,rel,"≦","\\leqq",!0);defineSymbol(math,ams,rel,"⩽","\\leqslant",!0);defineSymbol(math,ams,rel,"⪕","\\eqslantless",!0);defineSymbol(math,ams,rel,"≲","\\lesssim",!0);defineSymbol(math,ams,rel,"⪅","\\lessapprox",!0);defineSymbol(math,ams,rel,"≊","\\approxeq",!0);defineSymbol(math,ams,bin,"⋖","\\lessdot");defineSymbol(math,ams,rel,"⋘","\\lll",!0);defineSymbol(math,ams,rel,"\ ≶","\\lessgtr",!0);defineSymbol(math,ams,rel,"⋚","\\lesseqgtr",!0);defineSymbol(math,ams,rel,"⪋","\\lesseqqgtr",!0);defineSymbol(math,ams,rel,"≑","\\doteqdot");defineSymbol(math,ams,rel,"≓","\\risingdotseq",!0);defineSymbol(math,ams,rel,"≒","\\fallingdotseq",!0);defineSymbol(math,ams,rel,"∽","\\backsim",!0);defineSymbol(math,ams,rel,"⋍","\\backsimeq",!0);defineSymbol(math,ams,rel,"⫅","\\subseteqq",!0);defineSymbol(math,ams,rel,"⋐","\\Subset",!0);defineSymbol(math,ams,rel,"⊏", "\\sqsubset",!0);defineSymbol(math,ams,rel,"≼","\\preccurlyeq",!0);defineSymbol(math,ams,rel,"⋞","\\curlyeqprec",!0);defineSymbol(math,ams,rel,"≾","\\precsim",!0);defineSymbol(math,ams,rel,"⪷","\\precapprox",!0);defineSymbol(math,ams,rel,"⊲","\\vartriangleleft");defineSymbol(math,ams,rel,"⊴","\\trianglelefteq");defineSymbol(math,ams,rel,"⊨","\\vDash",!0);defineSymbol(math,ams,rel,"⊪","\\Vvdash",!0);defineSymbol(math,ams,rel,"⌣","\\smallsmile");defineSymbol(math,ams,rel,"⌢","\\\ smallfrown");defineSymbol(math,ams,rel,"≏","\\bumpeq",!0);defineSymbol(math,ams,rel,"≎","\\Bumpeq",!0);defineSymbol(math,ams,rel,"≧","\\geqq",!0);defineSymbol(math,ams,rel,"⩾","\\geqslant",!0);defineSymbol(math,ams,rel,"⪖","\\eqslantgtr",!0);defineSymbol(math,ams,rel,"≳","\\gtrsim",!0);defineSymbol(math,ams,rel,"⪆","\\gtrapprox",!0);defineSymbol(math,ams,bin,"⋗","\\gtrdot");defineSymbol(math,ams,rel,"⋙","\\ggg",!0);defineSymbol(math,ams,rel,"≷","\\gtrless",!0);defineSymbol(math, ams,rel,"⋛","\\gtreqless",!0);defineSymbol(math,ams,rel,"⪌","\\gtreqqless",!0);defineSymbol(math,ams,rel,"≖","\\eqcirc",!0);defineSymbol(math,ams,rel,"≗","\\circeq",!0);defineSymbol(math,ams,rel,"≜","\\triangleq",!0);defineSymbol(math,ams,rel,"∼","\\thicksim");defineSymbol(math,ams,rel,"≈","\\thickapprox");defineSymbol(math,ams,rel,"⫆","\\supseteqq",!0);defineSymbol(math,ams,rel,"⋑","\\Supset",!0);defineSymbol(math,ams,rel,"⊐","\\sqsupset",!0);defineSymbol(math,ams,rel,"≽", "\\succcurlyeq",!0);defineSymbol(math,ams,rel,"⋟","\\curlyeqsucc",!0);defineSymbol(math,ams,rel,"≿","\\succsim",!0);defineSymbol(math,ams,rel,"⪸","\\succapprox",!0);defineSymbol(math,ams,rel,"⊳","\\vartriangleright");defineSymbol(math,ams,rel,"⊵","\\trianglerighteq");defineSymbol(math,ams,rel,"⊩","\\Vdash",!0);defineSymbol(math,ams,rel,"∣","\\shortmid");defineSymbol(math,ams,rel,"∥","\\shortparallel");defineSymbol(math,ams,rel,"≬","\\between",!0);defineSymbol(math,ams,rel,"⋔", "\\pitchfork",!0);defineSymbol(math,ams,rel,"∝","\\varpropto");defineSymbol(math,ams,rel,"◀","\\blacktriangleleft");defineSymbol(math,ams,rel,"∴","\\therefore",!0);defineSymbol(math,ams,rel,"∍","\\backepsilon");defineSymbol(math,ams,rel,"▶","\\blacktriangleright");defineSymbol(math,ams,rel,"∵","\\because",!0);defineSymbol(math,ams,rel,"⋘","\\llless");defineSymbol(math,ams,rel,"⋙","\\gggtr");defineSymbol(math,ams,bin,"⊲","\\lhd");defineSymbol(math,ams,bin,"⊳","\\rhd");defineSymbol( math,ams,rel,"≂","\\eqsim",!0);defineSymbol(math,main,rel,"⋈","\\Join");defineSymbol(math,ams,rel,"≑","\\Doteq",!0);defineSymbol(math,ams,bin,"∔","\\dotplus",!0);defineSymbol(math,ams,bin,"∖","\\smallsetminus");defineSymbol(math,ams,bin,"⋒","\\Cap",!0);defineSymbol(math,ams,bin,"⋓","\\Cup",!0);defineSymbol(math,ams,bin,"⩞","\\doublebarwedge",!0);defineSymbol(math,ams,bin,"⊟","\\boxminus",!0);defineSymbol(math,ams,bin,"⊞","\\boxplus",!0);defineSymbol(math,ams,bin,"⋇","\\divid\ eontimes",!0);defineSymbol(math,ams,bin,"⋉","\\ltimes",!0);defineSymbol(math,ams,bin,"⋊","\\rtimes",!0);defineSymbol(math,ams,bin,"⋋","\\leftthreetimes",!0);defineSymbol(math,ams,bin,"⋌","\\rightthreetimes",!0);defineSymbol(math,ams,bin,"⋏","\\curlywedge",!0);defineSymbol(math,ams,bin,"⋎","\\curlyvee",!0);defineSymbol(math,ams,bin,"⊝","\\circleddash",!0);defineSymbol(math,ams,bin,"⊛","\\circledast",!0);defineSymbol(math,ams,bin,"⋅","\\centerdot");defineSymbol(math,ams,bin,"⊺", "\\intercal",!0);defineSymbol(math,ams,bin,"⋒","\\doublecap");defineSymbol(math,ams,bin,"⋓","\\doublecup");defineSymbol(math,ams,bin,"⊠","\\boxtimes",!0);defineSymbol(math,ams,rel,"⇢","\\dashrightarrow",!0);defineSymbol(math,ams,rel,"⇠","\\dashleftarrow",!0);defineSymbol(math,ams,rel,"⇇","\\leftleftarrows",!0);defineSymbol(math,ams,rel,"⇆","\\leftrightarrows",!0);defineSymbol(math,ams,rel,"⇚","\\Lleftarrow",!0);defineSymbol(math,ams,rel,"↞","\\twoheadleftarrow",!0);defineSymbol( math,ams,rel,"↢","\\leftarrowtail",!0);defineSymbol(math,ams,rel,"↫","\\looparrowleft",!0);defineSymbol(math,ams,rel,"⇋","\\leftrightharpoons",!0);defineSymbol(math,ams,rel,"↶","\\curvearrowleft",!0);defineSymbol(math,ams,rel,"↺","\\circlearrowleft",!0);defineSymbol(math,ams,rel,"↰","\\Lsh",!0);defineSymbol(math,ams,rel,"⇈","\\upuparrows",!0);defineSymbol(math,ams,rel,"↿","\\upharpoonleft",!0);defineSymbol(math,ams,rel,"⇃","\\downharpoonleft",!0);defineSymbol(math,main,rel,"⊶", "\\origof",!0);defineSymbol(math,main,rel,"⊷","\\imageof",!0);defineSymbol(math,ams,rel,"⊸","\\multimap",!0);defineSymbol(math,ams,rel,"↭","\\leftrightsquigarrow",!0);defineSymbol(math,ams,rel,"⇉","\\rightrightarrows",!0);defineSymbol(math,ams,rel,"⇄","\\rightleftarrows",!0);defineSymbol(math,ams,rel,"↠","\\twoheadrightarrow",!0);defineSymbol(math,ams,rel,"↣","\\rightarrowtail",!0);defineSymbol(math,ams,rel,"↬","\\looparrowright",!0);defineSymbol(math,ams,rel,"↷","\\curvearrowri\ ght",!0);defineSymbol(math,ams,rel,"↻","\\circlearrowright",!0);defineSymbol(math,ams,rel,"↱","\\Rsh",!0);defineSymbol(math,ams,rel,"⇊","\\downdownarrows",!0);defineSymbol(math,ams,rel,"↾","\\upharpoonright",!0);defineSymbol(math,ams,rel,"⇂","\\downharpoonright",!0);defineSymbol(math,ams,rel,"⇝","\\rightsquigarrow",!0);defineSymbol(math,ams,rel,"⇝","\\leadsto");defineSymbol(math,ams,rel,"⇛","\\Rrightarrow",!0);defineSymbol(math,ams,rel,"↾","\\restriction");defineSymbol(math,main, textord,"‘","`");defineSymbol(math,main,textord,"$","\\$");defineSymbol(text$3,main,textord,"$","\\$");defineSymbol(text$3,main,textord,"$","\\textdollar");defineSymbol(math,main,textord,"%","\\%");defineSymbol(text$3,main,textord,"%","\\%");defineSymbol(math,main,textord,"_","\\_");defineSymbol(text$3,main,textord,"_","\\_");defineSymbol(text$3,main,textord,"_","\\textunderscore");defineSymbol(math,main,textord,"∠","\\angle",!0);defineSymbol(math,main,textord,"∞","\\infty",!0);defineSymbol( math,main,textord,"′","\\prime");defineSymbol(math,main,textord,"△","\\triangle");defineSymbol(math,main,textord,"Γ","\\Gamma",!0);defineSymbol(math,main,textord,"Δ","\\Delta",!0);defineSymbol(math,main,textord,"Θ","\\Theta",!0);defineSymbol(math,main,textord,"Λ","\\Lambda",!0);defineSymbol(math,main,textord,"Ξ","\\Xi",!0);defineSymbol(math,main,textord,"Π","\\Pi",!0);defineSymbol(math,main,textord,"Σ","\\Sigma",!0);defineSymbol(math,main,textord,"Υ","\\Upsilon",!0);defineSymbol(math, main,textord,"Φ","\\Phi",!0);defineSymbol(math,main,textord,"Ψ","\\Psi",!0);defineSymbol(math,main,textord,"Ω","\\Omega",!0);defineSymbol(math,main,textord,"A","Α");defineSymbol(math,main,textord,"B","Β");defineSymbol(math,main,textord,"E","Ε");defineSymbol(math,main,textord,"Z","Ζ");defineSymbol(math,main,textord,"H","Η");defineSymbol(math,main,textord,"I","Ι");defineSymbol(math,main,textord,"K","Κ");defineSymbol(math,main,textord,"M","Μ");defineSymbol(math,main,textord,"N","Ν");defineSymbol( math,main,textord,"O","Ο");defineSymbol(math,main,textord,"P","Ρ");defineSymbol(math,main,textord,"T","Τ");defineSymbol(math,main,textord,"X","Χ");defineSymbol(math,main,textord,"¬","\\neg",!0);defineSymbol(math,main,textord,"¬","\\lnot");defineSymbol(math,main,textord,"⊤","\\top");defineSymbol(math,main,textord,"⊥","\\bot");defineSymbol(math,main,textord,"∅","\\emptyset");defineSymbol(math,ams,textord,"∅","\\varnothing");defineSymbol(math,main,mathord,"α","\\alpha",!0);defineSymbol( math,main,mathord,"β","\\beta",!0);defineSymbol(math,main,mathord,"γ","\\gamma",!0);defineSymbol(math,main,mathord,"δ","\\delta",!0);defineSymbol(math,main,mathord,"ϵ","\\epsilon",!0);defineSymbol(math,main,mathord,"ζ","\\zeta",!0);defineSymbol(math,main,mathord,"η","\\eta",!0);defineSymbol(math,main,mathord,"θ","\\theta",!0);defineSymbol(math,main,mathord,"ι","\\iota",!0);defineSymbol(math,main,mathord,"κ","\\kappa",!0);defineSymbol(math,main,mathord,"λ","\\lambda",!0);defineSymbol(math, main,mathord,"μ","\\mu",!0);defineSymbol(math,main,mathord,"ν","\\nu",!0);defineSymbol(math,main,mathord,"ξ","\\xi",!0);defineSymbol(math,main,mathord,"ο","\\omicron",!0);defineSymbol(math,main,mathord,"π","\\pi",!0);defineSymbol(math,main,mathord,"ρ","\\rho",!0);defineSymbol(math,main,mathord,"σ","\\sigma",!0);defineSymbol(math,main,mathord,"τ","\\tau",!0);defineSymbol(math,main,mathord,"υ","\\upsilon",!0);defineSymbol(math,main,mathord,"ϕ","\\phi",!0);defineSymbol(math,main,mathord,"\ χ","\\chi",!0);defineSymbol(math,main,mathord,"ψ","\\psi",!0);defineSymbol(math,main,mathord,"ω","\\omega",!0);defineSymbol(math,main,mathord,"ε","\\varepsilon",!0);defineSymbol(math,main,mathord,"ϑ","\\vartheta",!0);defineSymbol(math,main,mathord,"ϖ","\\varpi",!0);defineSymbol(math,main,mathord,"ϱ","\\varrho",!0);defineSymbol(math,main,mathord,"ς","\\varsigma",!0);defineSymbol(math,main,mathord,"φ","\\varphi",!0);defineSymbol(math,main,bin,"∗","*",!0);defineSymbol(math,main,bin,"+","\ +");defineSymbol(math,main,bin,"−","-",!0);defineSymbol(math,main,bin,"⋅","\\cdot",!0);defineSymbol(math,main,bin,"∘","\\circ",!0);defineSymbol(math,main,bin,"÷","\\div",!0);defineSymbol(math,main,bin,"±","\\pm",!0);defineSymbol(math,main,bin,"×","\\times",!0);defineSymbol(math,main,bin,"∩","\\cap",!0);defineSymbol(math,main,bin,"∪","\\cup",!0);defineSymbol(math,main,bin,"∖","\\setminus",!0);defineSymbol(math,main,bin,"∧","\\land");defineSymbol(math,main,bin,"∨","\\lor");defineSymbol( math,main,bin,"∧","\\wedge",!0);defineSymbol(math,main,bin,"∨","\\vee",!0);defineSymbol(math,main,textord,"√","\\surd");defineSymbol(math,main,open,"⟨","\\langle",!0);defineSymbol(math,main,open,"∣","\\lvert");defineSymbol(math,main,open,"∥","\\lVert");defineSymbol(math,main,close,"?","?");defineSymbol(math,main,close,"!","!");defineSymbol(math,main,close,"⟩","\\rangle",!0);defineSymbol(math,main,close,"∣","\\rvert");defineSymbol(math,main,close,"∥","\\rVert");defineSymbol(math, main,rel,"=","=");defineSymbol(math,main,rel,":",":");defineSymbol(math,main,rel,"≈","\\approx",!0);defineSymbol(math,main,rel,"≅","\\cong",!0);defineSymbol(math,main,rel,"≥","\\ge");defineSymbol(math,main,rel,"≥","\\geq",!0);defineSymbol(math,main,rel,"←","\\gets");defineSymbol(math,main,rel,">","\\gt",!0);defineSymbol(math,main,rel,"∈","\\in",!0);defineSymbol(math,main,rel,"","\\@not");defineSymbol(math,main,rel,"⊂","\\subset",!0);defineSymbol(math,main,rel,"⊃","\\supset",!0); defineSymbol(math,main,rel,"⊆","\\subseteq",!0);defineSymbol(math,main,rel,"⊇","\\supseteq",!0);defineSymbol(math,ams,rel,"⊈","\\nsubseteq",!0);defineSymbol(math,ams,rel,"⊉","\\nsupseteq",!0);defineSymbol(math,main,rel,"⊨","\\models");defineSymbol(math,main,rel,"←","\\leftarrow",!0);defineSymbol(math,main,rel,"≤","\\le");defineSymbol(math,main,rel,"≤","\\leq",!0);defineSymbol(math,main,rel,"<","\\lt",!0);defineSymbol(math,main,rel,"→","\\rightarrow",!0);defineSymbol(math,main,rel, "→","\\to");defineSymbol(math,ams,rel,"≱","\\ngeq",!0);defineSymbol(math,ams,rel,"≰","\\nleq",!0);defineSymbol(math,main,spacing," ","\\ ");defineSymbol(math,main,spacing," ","\\space");defineSymbol(math,main,spacing," ","\\nobreakspace");defineSymbol(text$3,main,spacing," ","\\ ");defineSymbol(text$3,main,spacing," "," ");defineSymbol(text$3,main,spacing," ","\\space");defineSymbol(text$3,main,spacing," ","\\nobreakspace");defineSymbol(math,main,spacing,null,"\\nobreak");defineSymbol( math,main,spacing,null,"\\allowbreak");defineSymbol(math,main,punct,",",",");defineSymbol(math,main,punct,";",";");defineSymbol(math,ams,bin,"⊼","\\barwedge",!0);defineSymbol(math,ams,bin,"⊻","\\veebar",!0);defineSymbol(math,main,bin,"⊙","\\odot",!0);defineSymbol(math,main,bin,"⊕","\\oplus",!0);defineSymbol(math,main,bin,"⊗","\\otimes",!0);defineSymbol(math,main,textord,"∂","\\partial",!0);defineSymbol(math,main,bin,"⊘","\\oslash",!0);defineSymbol(math,ams,bin,"⊚","\\circledcirc", !0);defineSymbol(math,ams,bin,"⊡","\\boxdot",!0);defineSymbol(math,main,bin,"△","\\bigtriangleup");defineSymbol(math,main,bin,"▽","\\bigtriangledown");defineSymbol(math,main,bin,"†","\\dagger");defineSymbol(math,main,bin,"⋄","\\diamond");defineSymbol(math,main,bin,"⋆","\\star");defineSymbol(math,main,bin,"◃","\\triangleleft");defineSymbol(math,main,bin,"▹","\\triangleright");defineSymbol(math,main,open,"{","\\{");defineSymbol(text$3,main,textord,"{","\\{");defineSymbol(text$3,main, textord,"{","\\textbraceleft");defineSymbol(math,main,close,"}","\\}");defineSymbol(text$3,main,textord,"}","\\}");defineSymbol(text$3,main,textord,"}","\\textbraceright");defineSymbol(math,main,open,"{","\\lbrace");defineSymbol(math,main,close,"}","\\rbrace");defineSymbol(math,main,open,"[","\\lbrack",!0);defineSymbol(text$3,main,textord,"[","\\lbrack",!0);defineSymbol(math,main,close,"]","\\rbrack",!0);defineSymbol(text$3,main,textord,"]","\\rbrack",!0);defineSymbol(math,main,open,"(","\\lparen", !0);defineSymbol(math,main,close,")","\\rparen",!0);defineSymbol(text$3,main,textord,"<","\\textless",!0);defineSymbol(text$3,main,textord,">","\\textgreater",!0);defineSymbol(math,main,open,"⌊","\\lfloor",!0);defineSymbol(math,main,close,"⌋","\\rfloor",!0);defineSymbol(math,main,open,"⌈","\\lceil",!0);defineSymbol(math,main,close,"⌉","\\rceil",!0);defineSymbol(math,main,textord,"\\","\\backslash");defineSymbol(math,main,textord,"∣","|");defineSymbol(math,main,textord,"∣","\\vert");defineSymbol( text$3,main,textord,"|","\\textbar",!0);defineSymbol(math,main,textord,"∥","\\|");defineSymbol(math,main,textord,"∥","\\Vert");defineSymbol(text$3,main,textord,"∥","\\textbardbl");defineSymbol(text$3,main,textord,"~","\\textasciitilde");defineSymbol(text$3,main,textord,"\\","\\textbackslash");defineSymbol(text$3,main,textord,"^","\\textasciicircum");defineSymbol(math,main,rel,"↑","\\uparrow",!0);defineSymbol(math,main,rel,"⇑","\\Uparrow",!0);defineSymbol(math,main,rel,"↓","\\downarrow", !0);defineSymbol(math,main,rel,"⇓","\\Downarrow",!0);defineSymbol(math,main,rel,"↕","\\updownarrow",!0);defineSymbol(math,main,rel,"⇕","\\Updownarrow",!0);defineSymbol(math,main,op,"∐","\\coprod");defineSymbol(math,main,op,"⋁","\\bigvee");defineSymbol(math,main,op,"⋀","\\bigwedge");defineSymbol(math,main,op,"⨄","\\biguplus");defineSymbol(math,main,op,"⋂","\\bigcap");defineSymbol(math,main,op,"⋃","\\bigcup");defineSymbol(math,main,op,"∫","\\int");defineSymbol(math,main,op,"∫", "\\intop");defineSymbol(math,main,op,"∬","\\iint");defineSymbol(math,main,op,"∭","\\iiint");defineSymbol(math,main,op,"∏","\\prod");defineSymbol(math,main,op,"∑","\\sum");defineSymbol(math,main,op,"⨂","\\bigotimes");defineSymbol(math,main,op,"⨁","\\bigoplus");defineSymbol(math,main,op,"⨀","\\bigodot");defineSymbol(math,main,op,"∮","\\oint");defineSymbol(math,main,op,"∯","\\oiint");defineSymbol(math,main,op,"∰","\\oiiint");defineSymbol(math,main,op,"⨆","\\bigsqcup");defineSymbol( math,main,op,"∫","\\smallint");defineSymbol(text$3,main,inner,"…","\\textellipsis");defineSymbol(math,main,inner,"…","\\mathellipsis");defineSymbol(text$3,main,inner,"…","\\ldots",!0);defineSymbol(math,main,inner,"…","\\ldots",!0);defineSymbol(math,main,inner,"⋯","\\@cdots",!0);defineSymbol(math,main,inner,"⋱","\\ddots",!0);defineSymbol(math,main,textord,"⋮","\\varvdots");defineSymbol(text$3,main,textord,"⋮","\\varvdots");defineSymbol(math,main,accent,"ˊ","\\acute");defineSymbol( math,main,accent,"ˋ","\\grave");defineSymbol(math,main,accent,"¨","\\ddot");defineSymbol(math,main,accent,"~","\\tilde");defineSymbol(math,main,accent,"ˉ","\\bar");defineSymbol(math,main,accent,"˘","\\breve");defineSymbol(math,main,accent,"ˇ","\\check");defineSymbol(math,main,accent,"^","\\hat");defineSymbol(math,main,accent,"⃗","\\vec");defineSymbol(math,main,accent,"˙","\\dot");defineSymbol(math,main,accent,"˚","\\mathring");defineSymbol(math,main,mathord,"","\\@imath");defineSymbol( math,main,mathord,"","\\@jmath");defineSymbol(math,main,textord,"ı","ı");defineSymbol(math,main,textord,"ȷ","ȷ");defineSymbol(text$3,main,textord,"ı","\\i",!0);defineSymbol(text$3,main,textord,"ȷ","\\j",!0);defineSymbol(text$3,main,textord,"ß","\\ss",!0);defineSymbol(text$3,main,textord,"æ","\\ae",!0);defineSymbol(text$3,main,textord,"œ","\\oe",!0);defineSymbol(text$3,main,textord,"ø","\\o",!0);defineSymbol(text$3,main,textord,"Æ","\\AE",!0);defineSymbol(text$3,main,textord,"Œ","\\\ OE",!0);defineSymbol(text$3,main,textord,"Ø","\\O",!0);defineSymbol(text$3,main,accent,"ˊ","\\'");defineSymbol(text$3,main,accent,"ˋ","\\`");defineSymbol(text$3,main,accent,"ˆ","\\^");defineSymbol(text$3,main,accent,"˜","\\~");defineSymbol(text$3,main,accent,"ˉ","\\=");defineSymbol(text$3,main,accent,"˘","\\u");defineSymbol(text$3,main,accent,"˙","\\.");defineSymbol(text$3,main,accent,"¸","\\c");defineSymbol(text$3,main,accent,"˚","\\r");defineSymbol(text$3,main,accent,"ˇ","\\v");defineSymbol( text$3,main,accent,"¨",'\\"');defineSymbol(text$3,main,accent,"˝","\\H");defineSymbol(text$3,main,accent,"◯","\\textcircled");var ligatures={"--":!0,"---":!0,"``":!0,"''":!0};defineSymbol(text$3,main,textord,"–","--",!0);defineSymbol(text$3,main,textord,"–","\\textendash");defineSymbol(text$3,main,textord,"—","---",!0);defineSymbol(text$3,main,textord,"—","\\textemdash");defineSymbol(text$3,main,textord,"‘","`",!0);defineSymbol(text$3,main,textord,"‘","\\textquoteleft");defineSymbol( text$3,main,textord,"’","'",!0);defineSymbol(text$3,main,textord,"’","\\textquoteright");defineSymbol(text$3,main,textord,"“","``",!0);defineSymbol(text$3,main,textord,"“","\\textquotedblleft");defineSymbol(text$3,main,textord,"”","''",!0);defineSymbol(text$3,main,textord,"”","\\textquotedblright");defineSymbol(math,main,textord,"°","\\degree",!0);defineSymbol(text$3,main,textord,"°","\\degree");defineSymbol(text$3,main,textord,"°","\\textdegree",!0);defineSymbol(math,main,textord, "£","\\pounds");defineSymbol(math,main,textord,"£","\\mathsterling",!0);defineSymbol(text$3,main,textord,"£","\\pounds");defineSymbol(text$3,main,textord,"£","\\textsterling",!0);defineSymbol(math,ams,textord,"✠","\\maltese");defineSymbol(text$3,ams,textord,"✠","\\maltese");var mathTextSymbols='0123456789/@."';for(var i=0;i0)return makeSymbol(text2,wideFontName,mode,options,classes.concat(wideFontClass));if(fontOrFamily){var fontName,fontClasses;if(fontOrFamily==="boldsymbol"){var fontData=boldsymbol(text2,mode,options,classes,type2);fontName=fontData.fontName,fontClasses=[fontData.fontClass]}else isFont?(fontName=fontMap[fontOrFamily].fontName,fontClasses=[fontOrFamily]): (fontName=retrieveTextFontName(fontOrFamily,options.fontWeight,options.fontShape),fontClasses=[fontOrFamily,options.fontWeight,options.fontShape]);if(lookupSymbol(text2,fontName,mode).metrics)return makeSymbol(text2,fontName,mode,options,classes.concat(fontClasses));if(ligatures.hasOwnProperty(text2)&&fontName.slice(0,10)==="Typewriter"){for(var parts=[],i=0;i{if(createClass(prev2.classes)!==createClass(next2.classes)||prev2.skew!==next2.skew||prev2.maxFontSize!==next2.maxFontSize)return!1; if(prev2.classes.length===1){var cls=prev2.classes[0];if(cls==="mbin"||cls==="mord")return!1}for(var style2 in prev2.style)if(prev2.style.hasOwnProperty(style2)&&prev2.style[style2]!==next2.style[style2])return!1;for(var _style in next2.style)if(next2.style.hasOwnProperty(_style)&&prev2.style[_style]!==next2.style[_style])return!1;return!0},tryCombineChars=chars=>{for(var i=0;iheight&&(height=child2.height),child2.depth>depth&&(depth=child2.depth),child2.maxFontSize>maxFontSize&&(maxFontSize=child2.maxFontSize)}elem.height=height, elem.depth=depth,elem.maxFontSize=maxFontSize},makeSpan$2=function(classes,children,options,style2){var span=new Span(classes,children,options,style2);return sizeElementFromChildren(span),span},makeSvgSpan=(classes,children,options,style2)=>new Span(classes,children,options,style2),makeLineSpan=function(className,options,thickness){var line=makeSpan$2([className],[],options);return line.height=Math.max(thickness||options.fontMetrics().defaultRuleThickness,options.minRuleThickness),line.style.borderBottomWidth= makeEm(line.height),line.maxFontSize=1,line},makeAnchor=function(href,classes,children,options){var anchor=new Anchor(href,classes,children,options);return sizeElementFromChildren(anchor),anchor},makeFragment=function(children){var fragment=new DocumentFragment(children);return sizeElementFromChildren(fragment),fragment},wrapFragment=function(group,options){return group instanceof DocumentFragment?makeSpan$2([],[group],options):group},getVListChildrenAndDepth=function(params){if(params.positionType=== "individualShift"){for(var oldChildren=params.children,children=[oldChildren[0]],_depth=-oldChildren[0].shift-oldChildren[0].elem.depth,currPos=_depth,i=1;i{var rule=makeSpan$2(["mspace"],[],options),size2=calculateSize(measurement,options);return rule.style.marginRight=makeEm(size2),rule},retrieveTextFontName=function(fontFamily,fontWeight,fontShape){var baseFontName="";switch(fontFamily){case"amsrm":baseFontName="AMS";break;case"textrm":baseFontName="Main";break;case"text\ sf":baseFontName="SansSerif";break;case"texttt":baseFontName="Typewriter";break;default:baseFontName=fontFamily}var fontStylesName;return fontWeight==="textbf"&&fontShape==="textit"?fontStylesName="BoldItalic":fontWeight==="textbf"?fontStylesName="Bold":fontWeight==="textit"?fontStylesName="Italic":fontStylesName="Regular",baseFontName+"-"+fontStylesName},fontMap={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Mai\ n-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"\ Typewriter-Regular"}},svgData={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},staticSvg=function(value,options){var[pathName,width,height]=svgData[value],path2=new PathNode(pathName),svgNode=new SvgNode([path2],{width:makeEm(width),height:makeEm(height),style:"width:"+makeEm(width),viewBox:"0 0 "+1e3*width+" "+1e3*height,preserveAspectRatio:"xMinYMin"}),span=makeSvgSpan([ "overlay"],[svgNode],options);return span.height=height,span.style.height=makeEm(height),span.style.width=makeEm(width),span},buildCommon={fontMap,makeSymbol,mathsym,makeSpan:makeSpan$2,makeSvgSpan,makeLineSpan,makeAnchor,makeFragment,wrapFragment,makeVList,makeOrd,makeGlue,staticSvg,svgData,tryCombineChars},thinspace={number:3,unit:"mu"},mediumspace={number:4,unit:"mu"},thickspace={number:5,unit:"mu"},spacings={mord:{mop:thinspace,mbin:mediumspace,mrel:thickspace,minner:thinspace},mop:{mord:thinspace, mop:thinspace,mrel:thickspace,minner:thinspace},mbin:{mord:mediumspace,mop:mediumspace,mopen:mediumspace,minner:mediumspace},mrel:{mord:thickspace,mop:thickspace,mopen:thickspace,minner:thickspace},mopen:{},mclose:{mop:thinspace,mbin:mediumspace,mrel:thickspace,minner:thinspace},mpunct:{mord:thinspace,mop:thinspace,mrel:thickspace,mopen:thinspace,mclose:thinspace,mpunct:thinspace,minner:thinspace},minner:{mord:thinspace,mop:thinspace,mbin:mediumspace,mrel:thickspace,mopen:thinspace,mpunct:thinspace, minner:thinspace}},tightSpacings={mord:{mop:thinspace},mop:{mord:thinspace,mop:thinspace},mbin:{},mrel:{},mopen:{},mclose:{mop:thinspace},mpunct:{},minner:{mop:thinspace}},_functions={},_htmlGroupBuilders={},_mathmlGroupBuilders={};function defineFunction(_ref){for(var{type:type2,names:names2,props,handler,htmlBuilder:htmlBuilder3,mathmlBuilder:mathmlBuilder3}=_ref,data={type:type2,numArgs:props.numArgs,argTypes:props.argTypes,allowedInArgument:!!props.allowedInArgument,allowedInText:!!props.allowedInText, allowedInMath:props.allowedInMath===void 0?!0:props.allowedInMath,numOptionalArgs:props.numOptionalArgs||0,infix:!!props.infix,primitive:!!props.primitive,handler},i=0;i{var prevType=prev2. classes[0],type2=node3.classes[0];prevType==="mbin"&&utils.contains(binRightCanceller,type2)?prev2.classes[0]="mord":type2==="mbin"&&utils.contains(binLeftCanceller,prevType)&&(node3.classes[0]="mord")},{node:dummyPrev},dummyNext,isRoot),traverseNonSpaceNodes(groups,(node3,prev2)=>{var prevType=getTypeOfDomTree(prev2),type2=getTypeOfDomTree(node3),space2=prevType&&type2?node3.hasClass("mtight")?tightSpacings[prevType][type2]:spacings[prevType][type2]:null;if(space2)return buildCommon.makeGlue(space2, glueOptions)},{node:dummyPrev},dummyNext,isRoot),groups},traverseNonSpaceNodes=function traverseNonSpaceNodes2(nodes2,callback,prev2,next2,isRoot){next2&&nodes2.push(next2);for(var i=0;in=>{nodes2.splice(index2+1,0,n),i++})(i)}next2&&nodes2.pop()},checkPartialGroup=function(node2){return node2 instanceof DocumentFragment||node2 instanceof Anchor||node2 instanceof Span&&node2.hasClass("enclosing")?node2:null},getOutermostNode=function getOutermostNode2(node2,side){var partialGroup=checkPartialGroup(node2);if(partialGroup){var children=partialGroup. children;if(children.length){if(side==="right")return getOutermostNode2(children[children.length-1],"right");if(side==="left")return getOutermostNode2(children[0],"left")}}return node2},getTypeOfDomTree=function(node2,side){return node2?(side&&(node2=getOutermostNode(node2,side)),DomEnum[node2.classes[0]]||null):null},makeNullDelimiter=function(options,classes){var moreClasses=["nulldelimiter"].concat(options.baseSizingClasses());return makeSpan$1(classes.concat(moreClasses))},buildGroup$1=function(group,options,baseOptions){ if(!group)return makeSpan$1();if(_htmlGroupBuilders[group.type]){var groupNode=_htmlGroupBuilders[group.type](group,options);if(baseOptions&&options.size!==baseOptions.size){groupNode=makeSpan$1(options.sizingClasses(baseOptions),[groupNode],options);var multiplier=options.sizeMultiplier/baseOptions.sizeMultiplier;groupNode.height*=multiplier,groupNode.depth*=multiplier}return groupNode}else throw new ParseError2("Got group of unknown type: '"+group.type+"'")};function buildHTMLUnbreakable(children,options){ var body2=makeSpan$1(["base"],children,options),strut=makeSpan$1(["strut"]);return strut.style.height=makeEm(body2.height+body2.depth),body2.depth&&(strut.style.verticalAlign=makeEm(-body2.depth)),body2.children.unshift(strut),body2}function buildHTML(tree,options){var tag=null;tree.length===1&&tree[0].type==="tag"&&(tag=tree[0].tag,tree=tree[0].body);var expression=buildExpression$1(tree,options,"root"),eqnNum;expression.length===2&&expression[1].hasClass("tag")&&(eqnNum=expression.pop());for(var children=[], parts=[],i=0;i0&& (children.push(buildHTMLUnbreakable(parts,options)),parts=[]),children.push(expression[i]));parts.length>0&&children.push(buildHTMLUnbreakable(parts,options));var tagChild;tag?(tagChild=buildHTMLUnbreakable(buildExpression$1(tag,options,!0)),tagChild.classes=["tag"],children.push(tagChild)):eqnNum&&children.push(eqnNum);var htmlNode=makeSpan$1(["katex-html"],children);if(htmlNode.setAttribute("aria-hidden","true"),tagChild){var strut=tagChild.children[0];strut.style.height=makeEm(htmlNode.height+ htmlNode.depth),htmlNode.depth&&(strut.style.verticalAlign=makeEm(-htmlNode.depth))}return htmlNode}function newDocumentFragment(children){return new DocumentFragment(children)}class MathNode{constructor(type2,children,classes){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=type2,this.attributes={},this.children=children||[],this.classes=classes||[]}setAttribute(name,value){this.attributes[name]=value}getAttribute(name){return this.attributes[name]}toNode(){ var node2=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var attr in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,attr)&&node2.setAttribute(attr,this.attributes[attr]);this.classes.length>0&&(node2.className=createClass(this.classes));for(var i=0;i0&&(markup+=' class ="'+utils.escape(createClass(this.classes))+'"'),markup+=">";for(var i=0;i",markup}toText(){return this.children.map(child2=>child2.toText()).join("")}}class TextNode{constructor(text2){this.text=void 0,this.text=text2}toNode(){return document.createTextNode(this.text)}toMarkup(){return utils.escape(this.toText())}toText(){return this.text}}class SpaceNode{constructor(width){this.width=void 0,this.character=void 0,this.width=width,width>=.05555&&width<=.05556?this.character=" ":width>=.1666&&width<= .1667?this.character=" ":width>=.2222&&width<=.2223?this.character=" ":width>=.2777&&width<=.2778?this.character="  ":width>=-.05556&&width<=-.05555?this.character=" ⁣":width>=-.1667&&width<=-.1666?this.character=" ⁣":width>=-.2223&&width<=-.2222?this.character=" ⁣":width>=-.2778&&width<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var node2=document.createElementNS("http://www.w3.org/1998/Math/Ma\ thML","mspace");return node2.setAttribute("width",makeEm(this.width)),node2}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var mathMLTree={MathNode,TextNode,SpaceNode,newDocumentFragment},makeText=function(text2,mode,options){return symbols[mode][text2]&&symbols[mode][text2].replace&&text2.charCodeAt(0)!==55349&&!(ligatures.hasOwnProperty(text2)&&options&&(options.fontFamily&&options. fontFamily.slice(4,6)==="tt"||options.font&&options.font.slice(4,6)==="tt"))&&(text2=symbols[mode][text2].replace),new mathMLTree.TextNode(text2)},makeRow=function(body2){return body2.length===1?body2[0]:new mathMLTree.MathNode("mrow",body2)},getVariant=function(group,options){if(options.fontFamily==="texttt")return"monospace";if(options.fontFamily==="textsf")return options.fontShape==="textit"&&options.fontWeight==="textbf"?"sans-serif-bold-italic":options.fontShape==="textit"?"sans-serif-itali\ c":options.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(options.fontShape==="textit"&&options.fontWeight==="textbf")return"bold-italic";if(options.fontShape==="textit")return"italic";if(options.fontWeight==="textbf")return"bold";var font=options.font;if(!font||font==="mathnormal")return null;var mode=group.mode;if(font==="mathit")return"italic";if(font==="boldsymbol")return group.type==="textord"?"bold":"bold-italic";if(font==="mathbf")return"bold";if(font==="mathbb")return"double-str\ uck";if(font==="mathsfit")return"sans-serif-italic";if(font==="mathfrak")return"fraktur";if(font==="mathscr"||font==="mathcal")return"script";if(font==="mathsf")return"sans-serif";if(font==="mathtt")return"monospace";var text2=group.text;if(utils.contains(["\\imath","\\jmath"],text2))return null;symbols[mode][text2]&&symbols[mode][text2].replace&&(text2=symbols[mode][text2].replace);var fontName=buildCommon.fontMap[font].fontName;return getCharacterMetrics(text2,fontName,mode)?buildCommon.fontMap[font]. variant:null};function isNumberPunctuation(group){if(!group)return!1;if(group.type==="mi"&&group.children.length===1){var child2=group.children[0];return child2 instanceof TextNode&&child2.text==="."}else if(group.type==="mo"&&group.children.length===1&&group.getAttribute("separator")==="true"&&group.getAttribute("lspace")==="0em"&&group.getAttribute("rspace")==="0em"){var _child=group.children[0];return _child instanceof TextNode&&_child.text===","}else return!1}var buildExpression2=function(expression,options,isOrdgroup){ if(expression.length===1){var group=buildGroup2(expression[0],options);return isOrdgroup&&group instanceof MathNode&&group.type==="mo"&&(group.setAttribute("lspace","0em"),group.setAttribute("rspace","0em")),[group]}for(var groups=[],lastGroup,i=0;i=1&&(lastGroup. type==="mn"||isNumberPunctuation(lastGroup))){var base2=_group.children[0];base2 instanceof MathNode&&base2.type==="mn"&&(base2.children=[...lastGroup.children,...base2.children],groups.pop())}else if(lastGroup.type==="mi"&&lastGroup.children.length===1){var lastChild=lastGroup.children[0];if(lastChild instanceof TextNode&&lastChild.text==="̸"&&(_group.type==="mo"||_group.type==="mi"||_group.type==="mn")){var child2=_group.children[0];child2 instanceof TextNode&&child2.text.length>0&&(child2.text= child2.text.slice(0,1)+"̸"+child2.text.slice(1),groups.pop())}}}groups.push(_group),lastGroup=_group}return groups},buildExpressionRow=function(expression,options,isOrdgroup){return makeRow(buildExpression2(expression,options,isOrdgroup))},buildGroup2=function(group,options){if(!group)return new mathMLTree.MathNode("mrow");if(_mathmlGroupBuilders[group.type]){var result=_mathmlGroupBuilders[group.type](group,options);return result}else throw new ParseError2("Got group of unknown type: '"+group. type+"'")};function buildMathML(tree,texExpression,options,isDisplayMode,forMathmlOnly){var expression=buildExpression2(tree,options),wrapper;expression.length===1&&expression[0]instanceof MathNode&&utils.contains(["mrow","mtable"],expression[0].type)?wrapper=expression[0]:wrapper=new mathMLTree.MathNode("mrow",expression);var annotation=new mathMLTree.MathNode("annotation",[new mathMLTree.TextNode(texExpression)]);annotation.setAttribute("encoding","application/x-tex");var semantics=new mathMLTree. MathNode("semantics",[wrapper,annotation]),math2=new mathMLTree.MathNode("math",[semantics]);math2.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),isDisplayMode&&math2.setAttribute("display","block");var wrapperClass=forMathmlOnly?"katex":"katex-mathml";return buildCommon.makeSpan([wrapperClass],[math2])}var optionsFromSettings=function(settings){return new Options({style:settings.displayMode?Style$1.DISPLAY:Style$1.TEXT,maxSize:settings.maxSize,minRuleThickness:settings.minRuleThickness})}, displayWrap=function(node2,settings){if(settings.displayMode){var classes=["katex-display"];settings.leqno&&classes.push("leqno"),settings.fleqn&&classes.push("fleqn"),node2=buildCommon.makeSpan(classes,[node2])}return node2},buildTree=function(tree,expression,settings){var options=optionsFromSettings(settings),katexNode;if(settings.output==="mathml")return buildMathML(tree,expression,options,settings.displayMode,!0);if(settings.output==="html"){var htmlNode=buildHTML(tree,options);katexNode=buildCommon. makeSpan(["katex"],[htmlNode])}else{var mathMLNode=buildMathML(tree,expression,options,settings.displayMode,!1),_htmlNode=buildHTML(tree,options);katexNode=buildCommon.makeSpan(["katex"],[mathMLNode,_htmlNode])}return displayWrap(katexNode,settings)},buildHTMLTree=function(tree,expression,settings){var options=optionsFromSettings(settings),htmlNode=buildHTML(tree,options),katexNode=buildCommon.makeSpan(["katex"],[htmlNode]);return displayWrap(katexNode,settings)},stretchyCodePoint={widehat:"^",widecheck:"\ ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"\ ↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},mathMLnode=function(label){var node2=new mathMLTree.MathNode("mo",[new mathMLTree.TextNode(stretchyCodePoint[label.replace(/^\\/,"")])]);return node2.setAttribute("stretchy","true"),node2}, katexImagesData={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["double\ rightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequ\ al"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarro\ w"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888, 342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},groupLength=function(arg){return arg.type==="ordgroup"?arg.body.length:1},svgSpan=function(group,options){function buildSvgSpan_(){var viewBoxWidth=4e5,label=group. label.slice(1);if(utils.contains(["widehat","widecheck","widetilde","utilde"],label)){var grp=group,numChars=groupLength(grp.base),viewBoxHeight,pathName,_height;if(numChars>5)label==="widehat"||label==="widecheck"?(viewBoxHeight=420,viewBoxWidth=2364,_height=.42,pathName=label+"4"):(viewBoxHeight=312,viewBoxWidth=2340,_height=.34,pathName="tilde4");else{var imgIndex=[1,1,2,2,3,3][numChars];label==="widehat"||label==="widecheck"?(viewBoxWidth=[0,1062,2364,2364,2364][imgIndex],viewBoxHeight=[0,239, 300,360,420][imgIndex],_height=[0,.24,.3,.3,.36,.42][imgIndex],pathName=label+imgIndex):(viewBoxWidth=[0,600,1033,2339,2340][imgIndex],viewBoxHeight=[0,260,286,306,312][imgIndex],_height=[0,.26,.286,.3,.306,.34][imgIndex],pathName="tilde"+imgIndex)}var path2=new PathNode(pathName),svgNode=new SvgNode([path2],{width:"100%",height:makeEm(_height),viewBox:"0 0 "+viewBoxWidth+" "+viewBoxHeight,preserveAspectRatio:"none"});return{span:buildCommon.makeSvgSpan([],[svgNode],options),minWidth:0,height:_height}}else{ var spans=[],data=katexImagesData[label],[paths,_minWidth,_viewBoxHeight]=data,_height2=_viewBoxHeight/1e3,numSvgChildren=paths.length,widthClasses,aligns;if(numSvgChildren===1){var align1=data[3];widthClasses=["hide-tail"],aligns=[align1]}else if(numSvgChildren===2)widthClasses=["halfarrow-left","halfarrow-right"],aligns=["xMinYMin","xMaxYMin"];else if(numSvgChildren===3)widthClasses=["brace-left","brace-center","brace-right"],aligns=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Corr\ ect katexImagesData or update code here to support `+numSvgChildren+" children.");for(var i=0;i0&&(span.style.minWidth=makeEm(minWidth)),span},encloseSpan=function(inner2,label,topPad,bottomPad,options){var img,totalHeight=inner2.height+inner2.depth+topPad+bottomPad;if(/fbox|color|angl/.test(label)){if(img=buildCommon.makeSpan(["stretchy",label],[],options),label==="fbox"){var color=options.color&&options.getColor(); color&&(img.style.borderColor=color)}}else{var lines=[];/^[bx]cancel$/.test(label)&&lines.push(new LineNode({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(label)&&lines.push(new LineNode({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var svgNode=new SvgNode(lines,{width:"100%",height:makeEm(totalHeight)});img=buildCommon.makeSvgSpan([],[svgNode],options)}return img.height=totalHeight,img.style.height=makeEm(totalHeight),img},stretchy={encloseSpan, mathMLnode,svgSpan};function assertNodeType(node2,type2){if(!node2||node2.type!==type2)throw new Error("Expected node of type "+type2+", but got "+(node2?"node of type "+node2.type:String(node2)));return node2}function assertSymbolNodeType(node2){var typedNode=checkSymbolNodeType(node2);if(!typedNode)throw new Error("Expected node of symbol group type, but got "+(node2?"node of type "+node2.type:String(node2)));return typedNode}function checkSymbolNodeType(node2){return node2&&(node2.type==="ato\ m"||NON_ATOMS.hasOwnProperty(node2.type))?node2:null}var htmlBuilder$a=(grp,options)=>{var base2,group,supSubGroup;grp&&grp.type==="supsub"?(group=assertNodeType(grp.base,"accent"),base2=group.base,grp.base=base2,supSubGroup=assertSpan(buildGroup$1(grp,options)),grp.base=group):(group=assertNodeType(grp,"accent"),base2=group.base);var body2=buildGroup$1(base2,options.havingCrampedStyle()),mustShift=group.isShifty&&utils.isCharacterBox(base2),skew=0;if(mustShift){var baseChar=utils.getBaseElem(base2), baseGroup=buildGroup$1(baseChar,options.havingCrampedStyle());skew=assertSymbolDomNode(baseGroup).skew}var accentBelow=group.label==="\\c",clearance=accentBelow?body2.height+body2.depth:Math.min(body2.height,options.fontMetrics().xHeight),accentBody;if(group.isStretchy)accentBody=stretchy.svgSpan(group,options),accentBody=buildCommon.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:body2},{type:"elem",elem:accentBody,wrapperClasses:["svg-align"],wrapperStyle:skew>0?{width:"cal\ c(100% - "+makeEm(2*skew)+")",marginLeft:makeEm(2*skew)}:void 0}]},options);else{var accent2,width;group.label==="\\vec"?(accent2=buildCommon.staticSvg("vec",options),width=buildCommon.svgData.vec[1]):(accent2=buildCommon.makeOrd({mode:group.mode,text:group.label},options,"textord"),accent2=assertSymbolDomNode(accent2),accent2.italic=0,width=accent2.width,accentBelow&&(clearance+=accent2.depth)),accentBody=buildCommon.makeSpan(["accent-body"],[accent2]);var accentFull=group.label==="\\textcircled"; accentFull&&(accentBody.classes.push("accent-full"),clearance=body2.height);var left=skew;accentFull||(left-=width/2),accentBody.style.left=makeEm(left),group.label==="\\textcircled"&&(accentBody.style.top=".2em"),accentBody=buildCommon.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:body2},{type:"kern",size:-clearance},{type:"elem",elem:accentBody}]},options)}var accentWrap=buildCommon.makeSpan(["mord","accent"],[accentBody],options);return supSubGroup?(supSubGroup.children[0]= accentWrap,supSubGroup.height=Math.max(accentWrap.height,supSubGroup.height),supSubGroup.classes[0]="mord",supSubGroup):accentWrap},mathmlBuilder$9=(group,options)=>{var accentNode=group.isStretchy?stretchy.mathMLnode(group.label):new mathMLTree.MathNode("mo",[makeText(group.label,group.mode)]),node2=new mathMLTree.MathNode("mover",[buildGroup2(group.base,options),accentNode]);return node2.setAttribute("accent","true"),node2},NON_STRETCHY_ACCENT_REGEX=new RegExp(["\\acute","\\grave","\\ddot","\\t\ ilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(accent2=>"\\"+accent2).join("|"));defineFunction({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(context,args)=>{var base2=normalizeArgument( args[0]),isStretchy=!NON_STRETCHY_ACCENT_REGEX.test(context.funcName),isShifty=!isStretchy||context.funcName==="\\widehat"||context.funcName==="\\widetilde"||context.funcName==="\\widecheck";return{type:"accent",mode:context.parser.mode,label:context.funcName,isStretchy,isShifty,base:base2}},htmlBuilder:htmlBuilder$a,mathmlBuilder:mathmlBuilder$9});defineFunction({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0, allowedInMath:!0,argTypes:["primitive"]},handler:(context,args)=>{var base2=args[0],mode=context.parser.mode;return mode==="math"&&(context.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+context.funcName+" works only in text mode"),mode="text"),{type:"accent",mode,label:context.funcName,isStretchy:!1,isShifty:!0,base:base2}},htmlBuilder:htmlBuilder$a,mathmlBuilder:mathmlBuilder$9});defineFunction({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleft\ rightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(_ref,args)=>{var{parser,funcName}=_ref,base2=args[0];return{type:"accentUnder",mode:parser.mode,label:funcName,base:base2}},htmlBuilder:(group,options)=>{var innerGroup=buildGroup$1(group.base,options),accentBody=stretchy.svgSpan(group,options),kern=group.label==="\\utilde"?.12:0,vlist=buildCommon.makeVList({positionType:"top",positionData:innerGroup.height,children:[{type:"elem",elem:accentBody,wrapperClasses:[ "svg-align"]},{type:"kern",size:kern},{type:"elem",elem:innerGroup}]},options);return buildCommon.makeSpan(["mord","accentunder"],[vlist],options)},mathmlBuilder:(group,options)=>{var accentNode=stretchy.mathMLnode(group.label),node2=new mathMLTree.MathNode("munder",[buildGroup2(group.base,options),accentNode]);return node2.setAttribute("accentunder","true"),node2}});var paddedNode=group=>{var node2=new mathMLTree.MathNode("mpadded",group?[group]:[]);return node2.setAttribute("width","+0.6em"),node2. setAttribute("lspace","0.3em"),node2};defineFunction({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrig\ htarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(_ref,args,optArgs){var{parser,funcName}=_ref;return{type:"xArrow",mode:parser.mode,label:funcName,body:args[0],below:optArgs[0]}},htmlBuilder(group,options){var style2=options.style,newOptions=options.havingStyle(style2.sup()),upperGroup=buildCommon.wrapFragment(buildGroup$1(group.body,newOptions,options),options),arrowPrefix=group.label.slice(0,2)==="\\x"?"x":"cd";upperGroup.classes.push(arrowPrefix+"-arro\ w-pad");var lowerGroup;group.below&&(newOptions=options.havingStyle(style2.sub()),lowerGroup=buildCommon.wrapFragment(buildGroup$1(group.below,newOptions,options),options),lowerGroup.classes.push(arrowPrefix+"-arrow-pad"));var arrowBody=stretchy.svgSpan(group,options),arrowShift=-options.fontMetrics().axisHeight+.5*arrowBody.height,upperShift=-options.fontMetrics().axisHeight-.5*arrowBody.height-.111;(upperGroup.depth>.25||group.label==="\\xleftequilibrium")&&(upperShift-=upperGroup.depth);var vlist; if(lowerGroup){var lowerShift=-options.fontMetrics().axisHeight+lowerGroup.height+.5*arrowBody.height+.111;vlist=buildCommon.makeVList({positionType:"individualShift",children:[{type:"elem",elem:upperGroup,shift:upperShift},{type:"elem",elem:arrowBody,shift:arrowShift},{type:"elem",elem:lowerGroup,shift:lowerShift}]},options)}else vlist=buildCommon.makeVList({positionType:"individualShift",children:[{type:"elem",elem:upperGroup,shift:upperShift},{type:"elem",elem:arrowBody,shift:arrowShift}]},options); return vlist.children[0].children[0].children[1].classes.push("svg-align"),buildCommon.makeSpan(["mrel","x-arrow"],[vlist],options)},mathmlBuilder(group,options){var arrowNode=stretchy.mathMLnode(group.label);arrowNode.setAttribute("minsize",group.label.charAt(0)==="x"?"1.75em":"3.0em");var node2;if(group.body){var upperNode=paddedNode(buildGroup2(group.body,options));if(group.below){var lowerNode=paddedNode(buildGroup2(group.below,options));node2=new mathMLTree.MathNode("munderover",[arrowNode, lowerNode,upperNode])}else node2=new mathMLTree.MathNode("mover",[arrowNode,upperNode])}else if(group.below){var _lowerNode=paddedNode(buildGroup2(group.below,options));node2=new mathMLTree.MathNode("munder",[arrowNode,_lowerNode])}else node2=paddedNode(),node2=new mathMLTree.MathNode("mover",[arrowNode,node2]);return node2}});var makeSpan2=buildCommon.makeSpan;function htmlBuilder$9(group,options){var elements=buildExpression$1(group.body,options,!0);return makeSpan2([group.mclass],elements,options)} function mathmlBuilder$8(group,options){var node2,inner2=buildExpression2(group.body,options);return group.mclass==="minner"?node2=new mathMLTree.MathNode("mpadded",inner2):group.mclass==="mord"?group.isCharacterBox?(node2=inner2[0],node2.type="mi"):node2=new mathMLTree.MathNode("mi",inner2):(group.isCharacterBox?(node2=inner2[0],node2.type="mo"):node2=new mathMLTree.MathNode("mo",inner2),group.mclass==="mbin"?(node2.attributes.lspace="0.22em",node2.attributes.rspace="0.22em"):group.mclass==="mp\ unct"?(node2.attributes.lspace="0em",node2.attributes.rspace="0.17em"):group.mclass==="mopen"||group.mclass==="mclose"?(node2.attributes.lspace="0em",node2.attributes.rspace="0em"):group.mclass==="minner"&&(node2.attributes.lspace="0.0556em",node2.attributes.width="+0.1111em")),node2}defineFunction({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(_ref,args){var{parser,funcName}=_ref,body2=args[0]; return{type:"mclass",mode:parser.mode,mclass:"m"+funcName.slice(5),body:ordargument(body2),isCharacterBox:utils.isCharacterBox(body2)}},htmlBuilder:htmlBuilder$9,mathmlBuilder:mathmlBuilder$8});var binrelClass=arg=>{var atom=arg.type==="ordgroup"&&arg.body.length?arg.body[0]:arg;return atom.type==="atom"&&(atom.family==="bin"||atom.family==="rel")?"m"+atom.family:"mord"};defineFunction({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(_ref2,args){var{parser}=_ref2;return{type:"mclass", mode:parser.mode,mclass:binrelClass(args[0]),body:ordargument(args[1]),isCharacterBox:utils.isCharacterBox(args[1])}}});defineFunction({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(_ref3,args){var{parser,funcName}=_ref3,baseArg=args[1],shiftedArg=args[0],mclass;funcName!=="\\stackrel"?mclass=binrelClass(baseArg):mclass="mrel";var baseOp={type:"op",mode:baseArg.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:funcName!=="\\\ stackrel",body:ordargument(baseArg)},supsub={type:"supsub",mode:shiftedArg.mode,base:baseOp,sup:funcName==="\\underset"?null:shiftedArg,sub:funcName==="\\underset"?shiftedArg:null};return{type:"mclass",mode:parser.mode,mclass,body:[supsub],isCharacterBox:utils.isCharacterBox(supsub)}},htmlBuilder:htmlBuilder$9,mathmlBuilder:mathmlBuilder$8});defineFunction({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(_ref,args){var{parser}=_ref;return{type:"pmb",mode:parser.mode,mclass:binrelClass( args[0]),body:ordargument(args[0])}},htmlBuilder(group,options){var elements=buildExpression$1(group.body,options,!0),node2=buildCommon.makeSpan([group.mclass],elements,options);return node2.style.textShadow="0.02em 0.01em 0.04px",node2},mathmlBuilder(group,style2){var inner2=buildExpression2(group.body,style2),node2=new mathMLTree.MathNode("mstyle",inner2);return node2.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),node2}});var cdArrowFunctionName={">":"\\\\cdrightarrow","<":"\\\\cdlef\ tarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},newCell=()=>({type:"styling",body:[],mode:"math",style:"display"}),isStartOfArrow=node2=>node2.type==="textord"&&node2.text==="@",isLabelEnd=(node2,endChar)=>(node2.type==="mathord"||node2.type==="atom")&&node2.text===endChar;function cdArrow(arrowChar,labels,parser){var funcName=cdArrowFunctionName[arrowChar];switch(funcName){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return parser.callFunction(funcName,[ labels[0]],[labels[1]]);case"\\uparrow":case"\\downarrow":{var leftLabel=parser.callFunction("\\\\cdleft",[labels[0]],[]),bareArrow={type:"atom",text:funcName,mode:"math",family:"rel"},sizedArrow=parser.callFunction("\\Big",[bareArrow],[]),rightLabel=parser.callFunction("\\\\cdright",[labels[1]],[]),arrowGroup={type:"ordgroup",mode:"math",body:[leftLabel,sizedArrow,rightLabel]};return parser.callFunction("\\\\cdparent",[arrowGroup],[])}case"\\\\cdlongequal":return parser.callFunction("\\\\cdlongeq\ ual",[],[]);case"\\Vert":{var arrow2={type:"textord",text:"\\Vert",mode:"math"};return parser.callFunction("\\Big",[arrow2],[])}default:return{type:"textord",text:" ",mode:"math"}}}function parseCD(parser){var parsedRows=[];for(parser.gullet.beginGroup(),parser.gullet.macros.set("\\cr","\\\\\\relax"),parser.gullet.beginGroup();;){parsedRows.push(parser.parseExpression(!1,"\\\\")),parser.gullet.endGroup(),parser.gullet.beginGroup();var next2=parser.fetch().text;if(next2==="&"||next2==="\\\\")parser. consume();else if(next2==="\\end"){parsedRows[parsedRows.length-1].length===0&&parsedRows.pop();break}else throw new ParseError2("Expected \\\\ or \\cr or \\end",parser.nextToken)}for(var row2=[],body2=[row2],i=0;i-1))if("<>AV".indexOf(arrowChar)>-1)for(var labelNum=0;labelNum<2;labelNum++){for(var inLabel=!0,k=j+1;kAV=|." after @',rowNodes[j]);var arrow2=cdArrow(arrowChar,labels,parser),wrappedArrow={type:"styling",body:[arrow2],mode:"math",style:"display"};row2.push(wrappedArrow),cell2=newCell()}i%2===0?row2.push(cell2):row2.shift(),row2=[],body2.push(row2)}parser.gullet.endGroup(),parser.gullet.endGroup();var cols=new Array(body2[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"ar\ ray",mode:"math",body:body2,arraystretch:1,addJot:!0,rowGaps:[null],cols,colSeparationType:"CD",hLinesBeforeRow:new Array(body2.length+1).fill([])}}defineFunction({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(_ref,args){var{parser,funcName}=_ref;return{type:"cdlabel",mode:parser.mode,side:funcName.slice(4),label:args[0]}},htmlBuilder(group,options){var newOptions=options.havingStyle(options.style.sup()),label=buildCommon.wrapFragment(buildGroup$1(group.label,newOptions, options),options);return label.classes.push("cd-label-"+group.side),label.style.bottom=makeEm(.8-label.depth),label.height=0,label.depth=0,label},mathmlBuilder(group,options){var label=new mathMLTree.MathNode("mrow",[buildGroup2(group.label,options)]);return label=new mathMLTree.MathNode("mpadded",[label]),label.setAttribute("width","0"),group.side==="left"&&label.setAttribute("lspace","-1width"),label.setAttribute("voffset","0.7em"),label=new mathMLTree.MathNode("mstyle",[label]),label.setAttribute( "displaystyle","false"),label.setAttribute("scriptlevel","1"),label}});defineFunction({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(_ref2,args){var{parser}=_ref2;return{type:"cdlabelparent",mode:parser.mode,fragment:args[0]}},htmlBuilder(group,options){var parent=buildCommon.wrapFragment(buildGroup$1(group.fragment,options),options);return parent.classes.push("cd-vert-arrow"),parent},mathmlBuilder(group,options){return new mathMLTree.MathNode("mrow",[buildGroup2(group.fragment, options)])}});defineFunction({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(_ref,args){for(var{parser}=_ref,arg=assertNodeType(args[0],"ordgroup"),group=arg.body,number2="",i=0;i=1114111)throw new ParseError2("\\@char with invalid code point "+number2); return code2<=65535?text2=String.fromCharCode(code2):(code2-=65536,text2=String.fromCharCode((code2>>10)+55296,(code2&1023)+56320)),{type:"textord",mode:parser.mode,text:text2}}});var htmlBuilder$8=(group,options)=>{var elements=buildExpression$1(group.body,options.withColor(group.color),!1);return buildCommon.makeFragment(elements)},mathmlBuilder$7=(group,options)=>{var inner2=buildExpression2(group.body,options.withColor(group.color)),node2=new mathMLTree.MathNode("mstyle",inner2);return node2. setAttribute("mathcolor",group.color),node2};defineFunction({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(_ref,args){var{parser}=_ref,color=assertNodeType(args[0],"color-token").color,body2=args[1];return{type:"color",mode:parser.mode,color,body:ordargument(body2)}},htmlBuilder:htmlBuilder$8,mathmlBuilder:mathmlBuilder$7});defineFunction({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(_ref2,args){ var{parser,breakOnTokenText}=_ref2,color=assertNodeType(args[0],"color-token").color;parser.gullet.macros.set("\\current@color",color);var body2=parser.parseExpression(!0,breakOnTokenText);return{type:"color",mode:parser.mode,color,body:body2}},htmlBuilder:htmlBuilder$8,mathmlBuilder:mathmlBuilder$7});defineFunction({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(_ref,args,optArgs){var{parser}=_ref,size2=parser.gullet.future().text==="["?parser.parseSizeGroup( !0):null,newLine=!parser.settings.displayMode||!parser.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:parser.mode,newLine,size:size2&&assertNodeType(size2,"size").value}},htmlBuilder(group,options){var span=buildCommon.makeSpan(["mspace"],[],options);return group.newLine&&(span.classes.push("newline"),group.size&&(span.style.marginTop=makeEm(calculateSize(group.size,options)))),span},mathmlBuilder(group,options){ var node2=new mathMLTree.MathNode("mspace");return group.newLine&&(node2.setAttribute("linebreak","newline"),group.size&&node2.setAttribute("height",makeEm(calculateSize(group.size,options)))),node2}});var globalMap={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},checkControlSequence=tok=>{var name=tok.text;if(/^(?:[\\{}$&#^_]|EOF)$/. test(name))throw new ParseError2("Expected a control sequence",tok);return name},getRHS=parser=>{var tok=parser.gullet.popToken();return tok.text==="="&&(tok=parser.gullet.popToken(),tok.text===" "&&(tok=parser.gullet.popToken())),tok},letCommand=(parser,name,tok,global2)=>{var macro=parser.gullet.macros.get(tok.text);macro==null&&(tok.noexpand=!0,macro={tokens:[tok],numArgs:0,unexpandable:!parser.gullet.isExpandable(tok.text)}),parser.gullet.macros.set(name,macro,global2)};defineFunction({type:"\ internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(_ref){var{parser,funcName}=_ref;parser.consumeSpaces();var token2=parser.fetch();if(globalMap[token2.text])return(funcName==="\\global"||funcName==="\\\\globallong")&&(token2.text=globalMap[token2.text]),assertNodeType(parser.parseFunction(),"internal");throw new ParseError2("Invalid token after macro prefix",token2)}});defineFunction({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{ numArgs:0,allowedInText:!0,primitive:!0},handler(_ref2){var{parser,funcName}=_ref2,tok=parser.gullet.popToken(),name=tok.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(name))throw new ParseError2("Expected a control sequence",tok);for(var numArgs=0,insert,delimiters2=[[]];parser.gullet.future().text!=="{";)if(tok=parser.gullet.popToken(),tok.text==="#"){if(parser.gullet.future().text==="{"){insert=parser.gullet.future(),delimiters2[numArgs].push("{");break}if(tok=parser.gullet.popToken(),!/^[1-9]$/.test(tok. text))throw new ParseError2('Invalid argument number "'+tok.text+'"');if(parseInt(tok.text)!==numArgs+1)throw new ParseError2('Argument number "'+tok.text+'" out of order');numArgs++,delimiters2.push([])}else{if(tok.text==="EOF")throw new ParseError2("Expected a macro definition");delimiters2[numArgs].push(tok.text)}var{tokens}=parser.gullet.consumeArg();return insert&&tokens.unshift(insert),(funcName==="\\edef"||funcName==="\\xdef")&&(tokens=parser.gullet.expandTokens(tokens),tokens.reverse()), parser.gullet.macros.set(name,{tokens,numArgs,delimiters:delimiters2},funcName===globalMap[funcName]),{type:"internal",mode:parser.mode}}});defineFunction({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(_ref3){var{parser,funcName}=_ref3,name=checkControlSequence(parser.gullet.popToken());parser.gullet.consumeSpaces();var tok=getRHS(parser);return letCommand(parser,name,tok,funcName==="\\\\globallet"),{type:"internal",mode:parser.mode}}});defineFunction( {type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(_ref4){var{parser,funcName}=_ref4,name=checkControlSequence(parser.gullet.popToken()),middle=parser.gullet.popToken(),tok=parser.gullet.popToken();return letCommand(parser,name,tok,funcName==="\\\\globalfuture"),parser.gullet.pushToken(tok),parser.gullet.pushToken(middle),{type:"internal",mode:parser.mode}}});var getMetrics=function(symbol,font,mode){var replace2=symbols.math[symbol]&& symbols.math[symbol].replace,metrics=getCharacterMetrics(replace2||symbol,font,mode);if(!metrics)throw new Error("Unsupported symbol "+symbol+" and font size "+font+".");return metrics},styleWrap=function(delim,toStyle,options,classes){var newOptions=options.havingBaseStyle(toStyle),span=buildCommon.makeSpan(classes.concat(newOptions.sizingClasses(options)),[delim],options),delimSizeMultiplier=newOptions.sizeMultiplier/options.sizeMultiplier;return span.height*=delimSizeMultiplier,span.depth*=delimSizeMultiplier, span.maxFontSize=newOptions.sizeMultiplier,span},centerSpan=function(span,options,style2){var newOptions=options.havingBaseStyle(style2),shift2=(1-options.sizeMultiplier/newOptions.sizeMultiplier)*options.fontMetrics().axisHeight;span.classes.push("delimcenter"),span.style.top=makeEm(shift2),span.height-=shift2,span.depth+=shift2},makeSmallDelim=function(delim,style2,center,options,mode,classes){var text2=buildCommon.makeSymbol(delim,"Main-Regular",mode,options),span=styleWrap(text2,style2,options, classes);return center&¢erSpan(span,options,style2),span},mathrmSize=function(value,size2,mode,options){return buildCommon.makeSymbol(value,"Size"+size2+"-Regular",mode,options)},makeLargeDelim=function(delim,size2,center,options,mode,classes){var inner2=mathrmSize(delim,size2,mode,options),span=styleWrap(buildCommon.makeSpan(["delimsizing","size"+size2],[inner2],options),Style$1.TEXT,options,classes);return center&¢erSpan(span,options,Style$1.TEXT),span},makeGlyphSpan=function(symbol,font,mode){ var sizeClass;font==="Size1-Regular"?sizeClass="delim-size1":sizeClass="delim-size4";var corner=buildCommon.makeSpan(["delimsizinginner",sizeClass],[buildCommon.makeSpan([],[buildCommon.makeSymbol(symbol,font,mode)])]);return{type:"elem",elem:corner}},makeInner=function(ch,height,options){var width=fontMetricsData["Size4-Regular"][ch.charCodeAt(0)]?fontMetricsData["Size4-Regular"][ch.charCodeAt(0)][4]:fontMetricsData["Size1-Regular"][ch.charCodeAt(0)][4],path2=new PathNode("inner",innerPath(ch,Math. round(1e3*height))),svgNode=new SvgNode([path2],{width:makeEm(width),height:makeEm(height),style:"width:"+makeEm(width),viewBox:"0 0 "+1e3*width+" "+Math.round(1e3*height),preserveAspectRatio:"xMinYMin"}),span=buildCommon.makeSvgSpan([],[svgNode],options);return span.height=height,span.style.height=makeEm(height),span.style.width=makeEm(width),{type:"elem",elem:span}},lapInEms=.008,lap={type:"kern",size:-1*lapInEms},verts=["|","\\lvert","\\rvert","\\vert"],doubleVerts=["\\|","\\lVert","\\rVert", "\\Vert"],makeStackedDelim=function(delim,heightTotal,center,options,mode,classes){var top,middle,repeat,bottom,svgLabel="",viewBoxWidth=0;top=repeat=bottom=delim,middle=null;var font="Size1-Regular";delim==="\\uparrow"?repeat=bottom="⏐":delim==="\\Uparrow"?repeat=bottom="‖":delim==="\\downarrow"?top=repeat="⏐":delim==="\\Downarrow"?top=repeat="‖":delim==="\\updownarrow"?(top="\\uparrow",repeat="⏐",bottom="\\downarrow"):delim==="\\Updownarrow"?(top="\\Uparrow",repeat="‖",bottom="\\Dow\ narrow"):utils.contains(verts,delim)?(repeat="∣",svgLabel="vert",viewBoxWidth=333):utils.contains(doubleVerts,delim)?(repeat="∥",svgLabel="doublevert",viewBoxWidth=556):delim==="["||delim==="\\lbrack"?(top="⎡",repeat="⎢",bottom="⎣",font="Size4-Regular",svgLabel="lbrack",viewBoxWidth=667):delim==="]"||delim==="\\rbrack"?(top="⎤",repeat="⎥",bottom="⎦",font="Size4-Regular",svgLabel="rbrack",viewBoxWidth=667):delim==="\\lfloor"||delim==="⌊"?(repeat=top="⎢",bottom="⎣",font="Size\ 4-Regular",svgLabel="lfloor",viewBoxWidth=667):delim==="\\lceil"||delim==="⌈"?(top="⎡",repeat=bottom="⎢",font="Size4-Regular",svgLabel="lceil",viewBoxWidth=667):delim==="\\rfloor"||delim==="⌋"?(repeat=top="⎥",bottom="⎦",font="Size4-Regular",svgLabel="rfloor",viewBoxWidth=667):delim==="\\rceil"||delim==="⌉"?(top="⎤",repeat=bottom="⎥",font="Size4-Regular",svgLabel="rceil",viewBoxWidth=667):delim==="("||delim==="\\lparen"?(top="⎛",repeat="⎜",bottom="⎝",font="Size4-Regular",svgLabel= "lparen",viewBoxWidth=875):delim===")"||delim==="\\rparen"?(top="⎞",repeat="⎟",bottom="⎠",font="Size4-Regular",svgLabel="rparen",viewBoxWidth=875):delim==="\\{"||delim==="\\lbrace"?(top="⎧",middle="⎨",bottom="⎩",repeat="⎪",font="Size4-Regular"):delim==="\\}"||delim==="\\rbrace"?(top="⎫",middle="⎬",bottom="⎭",repeat="⎪",font="Size4-Regular"):delim==="\\lgroup"||delim==="⟮"?(top="⎧",bottom="⎩",repeat="⎪",font="Size4-Regular"):delim==="\\rgroup"||delim==="⟯"?(top="⎫", bottom="⎭",repeat="⎪",font="Size4-Regular"):delim==="\\lmoustache"||delim==="⎰"?(top="⎧",bottom="⎭",repeat="⎪",font="Size4-Regular"):(delim==="\\rmoustache"||delim==="⎱")&&(top="⎫",bottom="⎩",repeat="⎪",font="Size4-Regular");var topMetrics=getMetrics(top,font,mode),topHeightTotal=topMetrics.height+topMetrics.depth,repeatMetrics=getMetrics(repeat,font,mode),repeatHeightTotal=repeatMetrics.height+repeatMetrics.depth,bottomMetrics=getMetrics(bottom,font,mode),bottomHeightTotal=bottomMetrics. height+bottomMetrics.depth,middleHeightTotal=0,middleFactor=1;if(middle!==null){var middleMetrics=getMetrics(middle,font,mode);middleHeightTotal=middleMetrics.height+middleMetrics.depth,middleFactor=2}var minHeight=topHeightTotal+bottomHeightTotal+middleHeightTotal,repeatCount=Math.max(0,Math.ceil((heightTotal-minHeight)/(middleFactor*repeatHeightTotal))),realHeightTotal=minHeight+repeatCount*middleFactor*repeatHeightTotal,axisHeight=options.fontMetrics().axisHeight;center&&(axisHeight*=options. sizeMultiplier);var depth=realHeightTotal/2-axisHeight,stack=[];if(svgLabel.length>0){var midHeight=realHeightTotal-topHeightTotal-bottomHeightTotal,viewBoxHeight=Math.round(realHeightTotal*1e3),pathStr=tallDelim(svgLabel,Math.round(midHeight*1e3)),path2=new PathNode(svgLabel,pathStr),width=(viewBoxWidth/1e3).toFixed(3)+"em",height=(viewBoxHeight/1e3).toFixed(3)+"em",svg2=new SvgNode([path2],{width,height,viewBox:"0 0 "+viewBoxWidth+" "+viewBoxHeight}),wrapper=buildCommon.makeSvgSpan([],[svg2],options); wrapper.height=viewBoxHeight/1e3,wrapper.style.width=width,wrapper.style.height=height,stack.push({type:"elem",elem:wrapper})}else{if(stack.push(makeGlyphSpan(bottom,font,mode)),stack.push(lap),middle===null){var innerHeight=realHeightTotal-topHeightTotal-bottomHeightTotal+2*lapInEms;stack.push(makeInner(repeat,innerHeight,options))}else{var _innerHeight=(realHeightTotal-topHeightTotal-bottomHeightTotal-middleHeightTotal)/2+2*lapInEms;stack.push(makeInner(repeat,_innerHeight,options)),stack.push( lap),stack.push(makeGlyphSpan(middle,font,mode)),stack.push(lap),stack.push(makeInner(repeat,_innerHeight,options))}stack.push(lap),stack.push(makeGlyphSpan(top,font,mode))}var newOptions=options.havingBaseStyle(Style$1.TEXT),inner2=buildCommon.makeVList({positionType:"bottom",positionData:depth,children:stack},newOptions);return styleWrap(buildCommon.makeSpan(["delimsizing","mult"],[inner2],newOptions),Style$1.TEXT,options,classes)},vbPad=80,emPad=.08,sqrtSvg=function(sqrtName,height,viewBoxHeight,extraVinculum,options){ var path2=sqrtPath(sqrtName,extraVinculum,viewBoxHeight),pathNode=new PathNode(sqrtName,path2),svg2=new SvgNode([pathNode],{width:"400em",height:makeEm(height),viewBox:"0 0 400000 "+viewBoxHeight,preserveAspectRatio:"xMinYMin slice"});return buildCommon.makeSvgSpan(["hide-tail"],[svg2],options)},makeSqrtImage=function(height,options){var newOptions=options.havingBaseSizing(),delim=traverseSequence("\\surd",height*newOptions.sizeMultiplier,stackLargeDelimiterSequence,newOptions),sizeMultiplier=newOptions. sizeMultiplier,extraVinculum=Math.max(0,options.minRuleThickness-options.fontMetrics().sqrtRuleThickness),span,spanHeight=0,texHeight=0,viewBoxHeight=0,advanceWidth;return delim.type==="small"?(viewBoxHeight=1e3+1e3*extraVinculum+vbPad,height<1?sizeMultiplier=1:height<1.4&&(sizeMultiplier=.7),spanHeight=(1+extraVinculum+emPad)/sizeMultiplier,texHeight=(1+extraVinculum)/sizeMultiplier,span=sqrtSvg("sqrtMain",spanHeight,viewBoxHeight,extraVinculum,options),span.style.minWidth="0.853em",advanceWidth= .833/sizeMultiplier):delim.type==="large"?(viewBoxHeight=(1e3+vbPad)*sizeToMaxHeight[delim.size],texHeight=(sizeToMaxHeight[delim.size]+extraVinculum)/sizeMultiplier,spanHeight=(sizeToMaxHeight[delim.size]+extraVinculum+emPad)/sizeMultiplier,span=sqrtSvg("sqrtSize"+delim.size,spanHeight,viewBoxHeight,extraVinculum,options),span.style.minWidth="1.02em",advanceWidth=1/sizeMultiplier):(spanHeight=height+extraVinculum+emPad,texHeight=height+extraVinculum,viewBoxHeight=Math.floor(1e3*height+extraVinculum)+ vbPad,span=sqrtSvg("sqrtTall",spanHeight,viewBoxHeight,extraVinculum,options),span.style.minWidth="0.742em",advanceWidth=1.056),span.height=texHeight,span.style.height=makeEm(spanHeight),{span,advanceWidth,ruleWidth:(options.fontMetrics().sqrtRuleThickness+extraVinculum)*sizeMultiplier}},stackLargeDelimiters=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],stackAlwaysDelimiters=[ "\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],stackNeverDelimiters=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],sizeToMaxHeight=[0,1.2,1.8,2.4,3],makeSizedDelim=function(delim,size2,options,mode,classes){if(delim==="<"||delim==="\\lt"||delim==="⟨"?delim="\\langle":(delim===">"||delim==="\\gt"||delim=== "⟩")&&(delim="\\rangle"),utils.contains(stackLargeDelimiters,delim)||utils.contains(stackNeverDelimiters,delim))return makeLargeDelim(delim,size2,!1,options,mode,classes);if(utils.contains(stackAlwaysDelimiters,delim))return makeStackedDelim(delim,sizeToMaxHeight[size2],!1,options,mode,classes);throw new ParseError2("Illegal delimiter: '"+delim+"'")},stackNeverDelimiterSequence=[{type:"small",style:Style$1.SCRIPTSCRIPT},{type:"small",style:Style$1.SCRIPT},{type:"small",style:Style$1.TEXT},{type:"\ large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],stackAlwaysDelimiterSequence=[{type:"small",style:Style$1.SCRIPTSCRIPT},{type:"small",style:Style$1.SCRIPT},{type:"small",style:Style$1.TEXT},{type:"stack"}],stackLargeDelimiterSequence=[{type:"small",style:Style$1.SCRIPTSCRIPT},{type:"small",style:Style$1.SCRIPT},{type:"small",style:Style$1.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],delimTypeToFont=function(type2){ if(type2.type==="small")return"Main-Regular";if(type2.type==="large")return"Size"+type2.size+"-Regular";if(type2.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+type2.type+"' here.")},traverseSequence=function(delim,height,sequence,options){for(var start2=Math.min(2,3-options.style.size),i=start2;iheight)return sequence[i]}return sequence[sequence.length-1]},makeCustomSizedDelim=function(delim,height,center,options,mode,classes){delim==="<"||delim==="\\lt"||delim==="⟨"?delim="\\langle":(delim===">"||delim==="\\gt"||delim==="⟩")&&(delim="\\rangle");var sequence;utils.contains(stackNeverDelimiters,delim)?sequence=stackNeverDelimiterSequence:utils.contains(stackLargeDelimiters, delim)?sequence=stackLargeDelimiterSequence:sequence=stackAlwaysDelimiterSequence;var delimType=traverseSequence(delim,height,sequence,options);return delimType.type==="small"?makeSmallDelim(delim,delimType.style,center,options,mode,classes):delimType.type==="large"?makeLargeDelim(delim,delimType.size,center,options,mode,classes):makeStackedDelim(delim,height,center,options,mode,classes)},makeLeftRightDelim=function(delim,height,depth,options,mode,classes){var axisHeight=options.fontMetrics().axisHeight* options.sizeMultiplier,delimiterFactor=901,delimiterExtend=5/options.fontMetrics().ptPerEm,maxDistFromAxis=Math.max(height-axisHeight,depth+axisHeight),totalHeight=Math.max(maxDistFromAxis/500*delimiterFactor,2*maxDistFromAxis-delimiterExtend);return makeCustomSizedDelim(delim,totalHeight,!0,options,mode,classes)},delimiter={sqrtImage:makeSqrtImage,sizedDelim:makeSizedDelim,sizeToMaxHeight,customSizedDelim:makeCustomSizedDelim,leftRightDelim:makeLeftRightDelim},delimiterSizes={"\\bigl":{mclass:"\ mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord", size:4}},delimiters=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function checkDelimiter(delim,context){ var symDelim=checkSymbolNodeType(delim);if(symDelim&&utils.contains(delimiters,symDelim.text))return symDelim;throw symDelim?new ParseError2("Invalid delimiter '"+symDelim.text+"' after '"+context.funcName+"'",delim):new ParseError2("Invalid delimiter type '"+delim.type+"'",delim)}defineFunction({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:[ "primitive"]},handler:(context,args)=>{var delim=checkDelimiter(args[0],context);return{type:"delimsizing",mode:context.parser.mode,size:delimiterSizes[context.funcName].size,mclass:delimiterSizes[context.funcName].mclass,delim:delim.text}},htmlBuilder:(group,options)=>group.delim==="."?buildCommon.makeSpan([group.mclass]):delimiter.sizedDelim(group.delim,group.size,options,group.mode,[group.mclass]),mathmlBuilder:group=>{var children=[];group.delim!=="."&&children.push(makeText(group.delim,group. mode));var node2=new mathMLTree.MathNode("mo",children);group.mclass==="mopen"||group.mclass==="mclose"?node2.setAttribute("fence","true"):node2.setAttribute("fence","false"),node2.setAttribute("stretchy","true");var size2=makeEm(delimiter.sizeToMaxHeight[group.size]);return node2.setAttribute("minsize",size2),node2.setAttribute("maxsize",size2),node2}});function assertParsed(group){if(!group.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}defineFunction({type:"leftrigh\ t-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(context,args)=>{var color=context.parser.gullet.macros.get("\\current@color");if(color&&typeof color!="string")throw new ParseError2("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:context.parser.mode,delim:checkDelimiter(args[0],context).text,color}}});defineFunction({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(context,args)=>{var delim=checkDelimiter(args[0],context), parser=context.parser;++parser.leftrightDepth;var body2=parser.parseExpression(!1);--parser.leftrightDepth,parser.expect("\\right",!1);var right=assertNodeType(parser.parseFunction(),"leftright-right");return{type:"leftright",mode:parser.mode,body:body2,left:delim.text,right:right.delim,rightColor:right.color}},htmlBuilder:(group,options)=>{assertParsed(group);for(var inner2=buildExpression$1(group.body,options,!0,["mopen","mclose"]),innerHeight=0,innerDepth=0,hadMiddle=!1,i=0;i{ assertParsed(group);var inner2=buildExpression2(group.body,options);if(group.left!=="."){var leftNode=new mathMLTree.MathNode("mo",[makeText(group.left,group.mode)]);leftNode.setAttribute("fence","true"),inner2.unshift(leftNode)}if(group.right!=="."){var rightNode=new mathMLTree.MathNode("mo",[makeText(group.right,group.mode)]);rightNode.setAttribute("fence","true"),group.rightColor&&rightNode.setAttribute("mathcolor",group.rightColor),inner2.push(rightNode)}return makeRow(inner2)}});defineFunction( {type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(context,args)=>{var delim=checkDelimiter(args[0],context);if(!context.parser.leftrightDepth)throw new ParseError2("\\middle without preceding \\left",delim);return{type:"middle",mode:context.parser.mode,delim:delim.text}},htmlBuilder:(group,options)=>{var middleDelim;if(group.delim===".")middleDelim=makeNullDelimiter(options,[]);else{middleDelim=delimiter.sizedDelim(group.delim,1,options,group.mode,[]);var isMiddle={delim:group. delim,options};middleDelim.isMiddle=isMiddle}return middleDelim},mathmlBuilder:(group,options)=>{var textNode=group.delim==="\\vert"||group.delim==="|"?makeText("|","text"):makeText(group.delim,group.mode),middleNode=new mathMLTree.MathNode("mo",[textNode]);return middleNode.setAttribute("fence","true"),middleNode.setAttribute("lspace","0.05em"),middleNode.setAttribute("rspace","0.05em"),middleNode}});var htmlBuilder$7=(group,options)=>{var inner2=buildCommon.wrapFragment(buildGroup$1(group.body, options),options),label=group.label.slice(1),scale2=options.sizeMultiplier,img,imgShift=0,isSingleChar=utils.isCharacterBox(group.body);if(label==="sout")img=buildCommon.makeSpan(["stretchy","sout"]),img.height=options.fontMetrics().defaultRuleThickness/scale2,imgShift=-.5*options.fontMetrics().xHeight;else if(label==="phase"){var lineWeight=calculateSize({number:.6,unit:"pt"},options),clearance=calculateSize({number:.35,unit:"ex"},options),newOptions=options.havingBaseSizing();scale2=scale2/newOptions. sizeMultiplier;var angleHeight=inner2.height+inner2.depth+lineWeight+clearance;inner2.style.paddingLeft=makeEm(angleHeight/2+lineWeight);var viewBoxHeight=Math.floor(1e3*angleHeight*scale2),path2=phasePath(viewBoxHeight),svgNode=new SvgNode([new PathNode("phase",path2)],{width:"400em",height:makeEm(viewBoxHeight/1e3),viewBox:"0 0 400000 "+viewBoxHeight,preserveAspectRatio:"xMinYMin slice"});img=buildCommon.makeSvgSpan(["hide-tail"],[svgNode],options),img.style.height=makeEm(angleHeight),imgShift= inner2.depth+lineWeight+clearance}else{/cancel/.test(label)?isSingleChar||inner2.classes.push("cancel-pad"):label==="angl"?inner2.classes.push("anglpad"):inner2.classes.push("boxpad");var topPad=0,bottomPad=0,ruleThickness=0;/box/.test(label)?(ruleThickness=Math.max(options.fontMetrics().fboxrule,options.minRuleThickness),topPad=options.fontMetrics().fboxsep+(label==="colorbox"?0:ruleThickness),bottomPad=topPad):label==="angl"?(ruleThickness=Math.max(options.fontMetrics().defaultRuleThickness,options. minRuleThickness),topPad=4*ruleThickness,bottomPad=Math.max(0,.25-inner2.depth)):(topPad=isSingleChar?.2:0,bottomPad=topPad),img=stretchy.encloseSpan(inner2,label,topPad,bottomPad,options),/fbox|boxed|fcolorbox/.test(label)?(img.style.borderStyle="solid",img.style.borderWidth=makeEm(ruleThickness)):label==="angl"&&ruleThickness!==.049&&(img.style.borderTopWidth=makeEm(ruleThickness),img.style.borderRightWidth=makeEm(ruleThickness)),imgShift=inner2.depth+bottomPad,group.backgroundColor&&(img.style. backgroundColor=group.backgroundColor,group.borderColor&&(img.style.borderColor=group.borderColor))}var vlist;if(group.backgroundColor)vlist=buildCommon.makeVList({positionType:"individualShift",children:[{type:"elem",elem:img,shift:imgShift},{type:"elem",elem:inner2,shift:0}]},options);else{var classes=/cancel|phase/.test(label)?["svg-align"]:[];vlist=buildCommon.makeVList({positionType:"individualShift",children:[{type:"elem",elem:inner2,shift:0},{type:"elem",elem:img,shift:imgShift,wrapperClasses:classes}]}, options)}return/cancel/.test(label)&&(vlist.height=inner2.height,vlist.depth=inner2.depth),/cancel/.test(label)&&!isSingleChar?buildCommon.makeSpan(["mord","cancel-lap"],[vlist],options):buildCommon.makeSpan(["mord"],[vlist],options)},mathmlBuilder$6=(group,options)=>{var fboxsep=0,node2=new mathMLTree.MathNode(group.label.indexOf("colorbox")>-1?"mpadded":"menclose",[buildGroup2(group.body,options)]);switch(group.label){case"\\cancel":node2.setAttribute("notation","updiagonalstrike");break;case"\ \\bcancel":node2.setAttribute("notation","downdiagonalstrike");break;case"\\phase":node2.setAttribute("notation","phasorangle");break;case"\\sout":node2.setAttribute("notation","horizontalstrike");break;case"\\fbox":node2.setAttribute("notation","box");break;case"\\angl":node2.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(fboxsep=options.fontMetrics().fboxsep*options.fontMetrics().ptPerEm,node2.setAttribute("width","+"+2*fboxsep+"pt"),node2.setAttribute("height", "+"+2*fboxsep+"pt"),node2.setAttribute("lspace",fboxsep+"pt"),node2.setAttribute("voffset",fboxsep+"pt"),group.label==="\\fcolorbox"){var thk=Math.max(options.fontMetrics().fboxrule,options.minRuleThickness);node2.setAttribute("style","border: "+thk+"em solid "+String(group.borderColor))}break;case"\\xcancel":node2.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return group.backgroundColor&&node2.setAttribute("mathbackground",group.backgroundColor),node2};defineFunction({type:"\ enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(_ref,args,optArgs){var{parser,funcName}=_ref,color=assertNodeType(args[0],"color-token").color,body2=args[1];return{type:"enclose",mode:parser.mode,label:funcName,backgroundColor:color,body:body2}},htmlBuilder:htmlBuilder$7,mathmlBuilder:mathmlBuilder$6});defineFunction({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(_ref2,args,optArgs){ var{parser,funcName}=_ref2,borderColor=assertNodeType(args[0],"color-token").color,backgroundColor=assertNodeType(args[1],"color-token").color,body2=args[2];return{type:"enclose",mode:parser.mode,label:funcName,backgroundColor,borderColor,body:body2}},htmlBuilder:htmlBuilder$7,mathmlBuilder:mathmlBuilder$6});defineFunction({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(_ref3,args){var{parser}=_ref3;return{type:"enclose",mode:parser.mode,label:"\\fbox", body:args[0]}}});defineFunction({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(_ref4,args){var{parser,funcName}=_ref4,body2=args[0];return{type:"enclose",mode:parser.mode,label:funcName,body:body2}},htmlBuilder:htmlBuilder$7,mathmlBuilder:mathmlBuilder$6});defineFunction({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(_ref5,args){var{parser}=_ref5;return{type:"enclose",mode:parser.mode,label:"\\\ angl",body:args[0]}}});var _environments={};function defineEnvironment(_ref){for(var{type:type2,names:names2,props,handler,htmlBuilder:htmlBuilder3,mathmlBuilder:mathmlBuilder3}=_ref,data={type:type2,numArgs:props.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler},i=0;i{var settings=context.parser.settings;if(!settings.displayMode)throw new ParseError2("{"+context.envName+"} can be\ used only in display mode.")};function getAutoTag(name){if(name.indexOf("ed")===-1)return name.indexOf("*")===-1}function parseArray(parser,_ref,style2){var{hskipBeforeAndAfter,addJot,cols,arraystretch,colSeparationType,autoTag,singleRow,emptySingleRow,maxNumCols,leqno}=_ref;if(parser.gullet.beginGroup(),singleRow||parser.gullet.macros.set("\\cr","\\\\\\relax"),!arraystretch){var stretch=parser.gullet.expandMacroAsText("\\arraystretch");if(stretch==null)arraystretch=1;else if(arraystretch=parseFloat( stretch),!arraystretch||arraystretch<0)throw new ParseError2("Invalid \\arraystretch: "+stretch)}parser.gullet.beginGroup();var row2=[],body2=[row2],rowGaps=[],hLinesBeforeRow=[],tags=autoTag!=null?[]:void 0;function beginRow(){autoTag&&parser.gullet.macros.set("\\@eqnsw","1",!0)}function endRow(){tags&&(parser.gullet.macros.get("\\df@tag")?(tags.push(parser.subparse([new Token("\\df@tag")])),parser.gullet.macros.set("\\df@tag",void 0,!0)):tags.push(!!autoTag&&parser.gullet.macros.get("\\@eqnsw")=== "1"))}for(beginRow(),hLinesBeforeRow.push(getHLines(parser));;){var cell2=parser.parseExpression(!1,singleRow?"\\end":"\\\\");parser.gullet.endGroup(),parser.gullet.beginGroup(),cell2={type:"ordgroup",mode:parser.mode,body:cell2},style2&&(cell2={type:"styling",mode:parser.mode,style:style2,body:[cell2]}),row2.push(cell2);var next2=parser.fetch().text;if(next2==="&"){if(maxNumCols&&row2.length===maxNumCols){if(singleRow||colSeparationType)throw new ParseError2("Too many tab characters: &",parser. nextToken);parser.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}parser.consume()}else if(next2==="\\end"){endRow(),row2.length===1&&cell2.type==="styling"&&cell2.body[0].body.length===0&&(body2.length>1||!emptySingleRow)&&body2.pop(),hLinesBeforeRow.length0&&(totalHeight+=.25),hlines.push({pos:totalHeight,isDashed:hlinesInGap[i]})}for(setHLinePos(hLinesBeforeRow[0]),r2=0;r20&&(gap+=arstrutDepth,depthtag2))for(r2=0;r2=nc)){var sepwidth=void 0; (c2>0||group.hskipBeforeAndAfter)&&(sepwidth=utils.deflt(colDescr.pregap,arraycolsep),sepwidth!==0&&(colSep=buildCommon.makeSpan(["arraycolsep"],[]),colSep.style.width=makeEm(sepwidth),cols.push(colSep)));var col=[];for(r2=0;r20){for(var line=buildCommon.makeLineSpan("hline",options,ruleThickness),dashes=buildCommon.makeLineSpan("hdashline",options,ruleThickness),vListElems=[{type:"elem",elem:body2, shift:0}];hlines.length>0;){var hline=hlines.pop(),lineShift=hline.pos-offset2;hline.isDashed?vListElems.push({type:"elem",elem:dashes,shift:lineShift}):vListElems.push({type:"elem",elem:line,shift:lineShift})}body2=buildCommon.makeVList({positionType:"individualShift",children:vListElems},options)}if(tagSpans.length===0)return buildCommon.makeSpan(["mord"],[body2],options);var eqnNumCol=buildCommon.makeVList({positionType:"individualShift",children:tagSpans},options);return eqnNumCol=buildCommon. makeSpan(["tag"],[eqnNumCol],options),buildCommon.makeFragment([body2,eqnNumCol])},alignMap={c:"center ",l:"left ",r:"right "},mathmlBuilder$5=function(group,options){for(var tbl=[],glue=new mathMLTree.MathNode("mtd",[],["mtr-glue"]),tag=new mathMLTree.MathNode("mtd",[],["mml-eqn-num"]),i=0;i0){var cols=group.cols,columnLines="",prevTypeWasAlign=!1,iStart=0,iEnd=cols.length;cols[0].type==="separator"&&(menclose+="top ",iStart=1),cols[cols.length-1].type==="separator"&& (menclose+="bottom ",iEnd-=1);for(var _i=iStart;_i0?"left ":"",menclose+=hlines[hlines.length-1].length>0?"right ":"";for(var _i3=1;_i3-1?"alignat":"align",isSplit=context.envName==="split",res=parseArray(context.parser,{cols,addJot:!0,autoTag:isSplit?void 0:getAutoTag(context.envName),emptySingleRow:!0,colSeparationType:separationType,maxNumCols:isSplit?2:void 0,leqno:context.parser.settings.leqno},"display"),numMaths,numCols=0,emptyGroup={ type:"ordgroup",mode:context.mode,body:[]};if(args[0]&&args[0].type==="ordgroup"){for(var arg0="",i=0;i0&&isAligned&&(pregap=1),cols[_i5]={type:"align",align,pregap,postgap:0}}return res.colSeparationType=isAligned?"align":"alignat",res};defineEnvironment({type:"array",names:["array","darray"],props:{numArgs:1},handler(context,args){var symNode=checkSymbolNodeType( args[0]),colalign=symNode?[args[0]]:assertNodeType(args[0],"ordgroup").body,cols=colalign.map(function(nde){var node2=assertSymbolNodeType(nde),ca=node2.text;if("lcr".indexOf(ca)!==-1)return{type:"align",align:ca};if(ca==="|")return{type:"separator",separator:"|"};if(ca===":")return{type:"separator",separator:":"};throw new ParseError2("Unknown column alignment: "+ca,nde)}),res={cols,hskipBeforeAndAfter:!0,maxNumCols:cols.length};return parseArray(context.parser,res,dCellStyle(context.envName))}, htmlBuilder:htmlBuilder$6,mathmlBuilder:mathmlBuilder$5});defineEnvironment({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(context){var delimiters2={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[context.envName.replace("*","")],colAlign="c",payload={hskipBeforeAndAfter:!1,cols:[{type:"align",align:colAlign}]}; if(context.envName.charAt(context.envName.length-1)==="*"){var parser=context.parser;if(parser.consumeSpaces(),parser.fetch().text==="["){if(parser.consume(),parser.consumeSpaces(),colAlign=parser.fetch().text,"lcr".indexOf(colAlign)===-1)throw new ParseError2("Expected l or c or r",parser.nextToken);parser.consume(),parser.consumeSpaces(),parser.expect("]"),parser.consume(),payload.cols=[{type:"align",align:colAlign}]}}var res=parseArray(context.parser,payload,dCellStyle(context.envName)),numCols=Math. max(0,...res.body.map(row2=>row2.length));return res.cols=new Array(numCols).fill({type:"align",align:colAlign}),delimiters2?{type:"leftright",mode:context.mode,body:[res],left:delimiters2[0],right:delimiters2[1],rightColor:void 0}:res},htmlBuilder:htmlBuilder$6,mathmlBuilder:mathmlBuilder$5});defineEnvironment({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(context){var payload={arraystretch:.5},res=parseArray(context.parser,payload,"script");return res.colSeparationType="small",res}, htmlBuilder:htmlBuilder$6,mathmlBuilder:mathmlBuilder$5});defineEnvironment({type:"array",names:["subarray"],props:{numArgs:1},handler(context,args){var symNode=checkSymbolNodeType(args[0]),colalign=symNode?[args[0]]:assertNodeType(args[0],"ordgroup").body,cols=colalign.map(function(nde){var node2=assertSymbolNodeType(nde),ca=node2.text;if("lc".indexOf(ca)!==-1)return{type:"align",align:ca};throw new ParseError2("Unknown column alignment: "+ca,nde)});if(cols.length>1)throw new ParseError2("{suba\ rray} can contain only one column");var res={cols,hskipBeforeAndAfter:!1,arraystretch:.5};if(res=parseArray(context.parser,res,"script"),res.body.length>0&&res.body[0].length>1)throw new ParseError2("{subarray} can contain only one column");return res},htmlBuilder:htmlBuilder$6,mathmlBuilder:mathmlBuilder$5});defineEnvironment({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(context){var payload={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1}, {type:"align",align:"l",pregap:0,postgap:0}]},res=parseArray(context.parser,payload,dCellStyle(context.envName));return{type:"leftright",mode:context.mode,body:[res],left:context.envName.indexOf("r")>-1?".":"\\{",right:context.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:htmlBuilder$6,mathmlBuilder:mathmlBuilder$5});defineEnvironment({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:alignedHandler,htmlBuilder:htmlBuilder$6,mathmlBuilder:mathmlBuilder$5}); defineEnvironment({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(context){utils.contains(["gather","gather*"],context.envName)&&validateAmsEnvironmentContext(context);var res={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:getAutoTag(context.envName),emptySingleRow:!0,leqno:context.parser.settings.leqno};return parseArray(context.parser,res,"display")},htmlBuilder:htmlBuilder$6,mathmlBuilder:mathmlBuilder$5});defineEnvironment({type:"a\ rray",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:alignedHandler,htmlBuilder:htmlBuilder$6,mathmlBuilder:mathmlBuilder$5});defineEnvironment({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(context){validateAmsEnvironmentContext(context);var res={autoTag:getAutoTag(context.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:context.parser.settings.leqno};return parseArray(context.parser,res,"display")},htmlBuilder:htmlBuilder$6,mathmlBuilder:mathmlBuilder$5}); defineEnvironment({type:"array",names:["CD"],props:{numArgs:0},handler(context){return validateAmsEnvironmentContext(context),parseCD(context.parser)},htmlBuilder:htmlBuilder$6,mathmlBuilder:mathmlBuilder$5});defineMacro("\\nonumber","\\gdef\\@eqnsw{0}");defineMacro("\\notag","\\nonumber");defineFunction({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(context,args){throw new ParseError2(context.funcName+" valid only within array environmen\ t")}});var environments=_environments;defineFunction({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(_ref,args){var{parser,funcName}=_ref,nameGroup=args[0];if(nameGroup.type!=="ordgroup")throw new ParseError2("Invalid environment name",nameGroup);for(var envName="",i=0;i{var font=group.font,newOptions=options.withFont(font);return buildGroup$1(group.body,newOptions)},mathmlBuilder$4=(group,options)=>{var font=group.font,newOptions=options.withFont(font);return buildGroup2(group.body,newOptions)},fontAliases={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};defineFunction({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb", "\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(_ref,args)=>{var{parser,funcName}=_ref,body2=normalizeArgument(args[0]),func=funcName;return func in fontAliases&&(func=fontAliases[func]),{type:"font",mode:parser.mode,font:func.slice(1),body:body2}},htmlBuilder:htmlBuilder$5,mathmlBuilder:mathmlBuilder$4});defineFunction({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(_ref2,args)=>{var{parser}=_ref2, body2=args[0],isCharacterBox3=utils.isCharacterBox(body2);return{type:"mclass",mode:parser.mode,mclass:binrelClass(body2),body:[{type:"font",mode:parser.mode,font:"boldsymbol",body:body2}],isCharacterBox:isCharacterBox3}}});defineFunction({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(_ref3,args)=>{var{parser,funcName,breakOnTokenText}=_ref3,{mode}=parser,body2=parser.parseExpression(!0,breakOnTokenText),style2="math"+funcName.slice(1); return{type:"font",mode,font:style2,body:{type:"ordgroup",mode:parser.mode,body:body2}}},htmlBuilder:htmlBuilder$5,mathmlBuilder:mathmlBuilder$4});var adjustStyle=(size2,originalStyle)=>{var style2=originalStyle;return size2==="display"?style2=style2.id>=Style$1.SCRIPT.id?style2.text():Style$1.DISPLAY:size2==="text"&&style2.size===Style$1.DISPLAY.size?style2=Style$1.TEXT:size2==="script"?style2=Style$1.SCRIPT:size2==="scriptscript"&&(style2=Style$1.SCRIPTSCRIPT),style2},htmlBuilder$4=(group,options)=>{ var style2=adjustStyle(group.size,options.style),nstyle=style2.fracNum(),dstyle=style2.fracDen(),newOptions;newOptions=options.havingStyle(nstyle);var numerm=buildGroup$1(group.numer,newOptions,options);if(group.continued){var hStrut=8.5/options.fontMetrics().ptPerEm,dStrut=3.5/options.fontMetrics().ptPerEm;numerm.height=numerm.height0?clearance= 3*ruleSpacing:clearance=7*ruleSpacing,denomShift=options.fontMetrics().denom1):(ruleWidth>0?(numShift=options.fontMetrics().num2,clearance=ruleSpacing):(numShift=options.fontMetrics().num3,clearance=3*ruleSpacing),denomShift=options.fontMetrics().denom2);var frac2;if(rule){var axisHeight=options.fontMetrics().axisHeight;numShift-numerm.depth-(axisHeight+.5*ruleWidth){var node2=new mathMLTree.MathNode("mfrac",[buildGroup2(group.numer,options),buildGroup2(group.denom,options)]);if(!group.hasBarLine)node2.setAttribute("linethickness","0px");else if(group.barSize){var ruleWidth=calculateSize(group.barSize,options);node2.setAttribute( "linethickness",makeEm(ruleWidth))}var style2=adjustStyle(group.size,options.style);if(style2.size!==options.style.size){node2=new mathMLTree.MathNode("mstyle",[node2]);var isDisplay=style2.size===Style$1.DISPLAY.size?"true":"false";node2.setAttribute("displaystyle",isDisplay),node2.setAttribute("scriptlevel","0")}if(group.leftDelim!=null||group.rightDelim!=null){var withDelims=[];if(group.leftDelim!=null){var leftOp=new mathMLTree.MathNode("mo",[new mathMLTree.TextNode(group.leftDelim.replace("\ \\",""))]);leftOp.setAttribute("fence","true"),withDelims.push(leftOp)}if(withDelims.push(node2),group.rightDelim!=null){var rightOp=new mathMLTree.MathNode("mo",[new mathMLTree.TextNode(group.rightDelim.replace("\\",""))]);rightOp.setAttribute("fence","true"),withDelims.push(rightOp)}return makeRow(withDelims)}return node2};defineFunction({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0}, handler:(_ref,args)=>{var{parser,funcName}=_ref,numer=args[0],denom=args[1],hasBarLine,leftDelim=null,rightDelim=null,size2="auto";switch(funcName){case"\\dfrac":case"\\frac":case"\\tfrac":hasBarLine=!0;break;case"\\\\atopfrac":hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":hasBarLine=!1,leftDelim="(",rightDelim=")";break;case"\\\\bracefrac":hasBarLine=!1,leftDelim="\\{",rightDelim="\\}";break;case"\\\\brackfrac":hasBarLine=!1,leftDelim="[",rightDelim="]";break;default:throw new Error( "Unrecognized genfrac command")}switch(funcName){case"\\dfrac":case"\\dbinom":size2="display";break;case"\\tfrac":case"\\tbinom":size2="text";break}return{type:"genfrac",mode:parser.mode,continued:!1,numer,denom,hasBarLine,leftDelim,rightDelim,size:size2,barSize:null}},htmlBuilder:htmlBuilder$4,mathmlBuilder:mathmlBuilder$3});defineFunction({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(_ref2,args)=>{var{parser,funcName}=_ref2,numer=args[0],denom=args[1];return{type:"genfrac",mode:parser. mode,continued:!0,numer,denom,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});defineFunction({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(_ref3){var{parser,funcName,token:token2}=_ref3,replaceWith;switch(funcName){case"\\over":replaceWith="\\frac";break;case"\\choose":replaceWith="\\binom";break;case"\\atop":replaceWith="\\\\atopfrac";break;case"\\brace":replaceWith="\\\\bracefrac";break;case"\\brack":replaceWith= "\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:parser.mode,replaceWith,token:token2}}});var stylArray=["display","text","script","scriptscript"],delimFromValue=function(delimString){var delim=null;return delimString.length>0&&(delim=delimString,delim=delim==="."?null:delim),delim};defineFunction({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(_ref4,args){ var{parser}=_ref4,numer=args[4],denom=args[5],leftNode=normalizeArgument(args[0]),leftDelim=leftNode.type==="atom"&&leftNode.family==="open"?delimFromValue(leftNode.text):null,rightNode=normalizeArgument(args[1]),rightDelim=rightNode.type==="atom"&&rightNode.family==="close"?delimFromValue(rightNode.text):null,barNode=assertNodeType(args[2],"size"),hasBarLine,barSize=null;barNode.isBlank?hasBarLine=!0:(barSize=barNode.value,hasBarLine=barSize.number>0);var size2="auto",styl=args[3];if(styl.type=== "ordgroup"){if(styl.body.length>0){var textOrd=assertNodeType(styl.body[0],"textord");size2=stylArray[Number(textOrd.text)]}}else styl=assertNodeType(styl,"textord"),size2=stylArray[Number(styl.text)];return{type:"genfrac",mode:parser.mode,numer,denom,continued:!1,hasBarLine,barSize,leftDelim,rightDelim,size:size2}},htmlBuilder:htmlBuilder$4,mathmlBuilder:mathmlBuilder$3});defineFunction({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(_ref5,args){var{parser,funcName, token:token2}=_ref5;return{type:"infix",mode:parser.mode,replaceWith:"\\\\abovefrac",size:assertNodeType(args[0],"size").value,token:token2}}});defineFunction({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(_ref6,args)=>{var{parser,funcName}=_ref6,numer=args[0],barSize=assert(assertNodeType(args[1],"infix").size),denom=args[2],hasBarLine=barSize.number>0;return{type:"genfrac",mode:parser.mode,numer,denom,continued:!1,hasBarLine,barSize,leftDelim:null, rightDelim:null,size:"auto"}},htmlBuilder:htmlBuilder$4,mathmlBuilder:mathmlBuilder$3});var htmlBuilder$3=(grp,options)=>{var style2=options.style,supSubGroup,group;grp.type==="supsub"?(supSubGroup=grp.sup?buildGroup$1(grp.sup,options.havingStyle(style2.sup()),options):buildGroup$1(grp.sub,options.havingStyle(style2.sub()),options),group=assertNodeType(grp.base,"horizBrace")):group=assertNodeType(grp,"horizBrace");var body2=buildGroup$1(group.base,options.havingBaseStyle(Style$1.DISPLAY)),braceBody=stretchy. svgSpan(group,options),vlist;if(group.isOver?(vlist=buildCommon.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:body2},{type:"kern",size:.1},{type:"elem",elem:braceBody}]},options),vlist.children[0].children[0].children[1].classes.push("svg-align")):(vlist=buildCommon.makeVList({positionType:"bottom",positionData:body2.depth+.1+braceBody.height,children:[{type:"elem",elem:braceBody},{type:"kern",size:.1},{type:"elem",elem:body2}]},options),vlist.children[0].children[0].children[0]. classes.push("svg-align")),supSubGroup){var vSpan=buildCommon.makeSpan(["mord",group.isOver?"mover":"munder"],[vlist],options);group.isOver?vlist=buildCommon.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:vSpan},{type:"kern",size:.2},{type:"elem",elem:supSubGroup}]},options):vlist=buildCommon.makeVList({positionType:"bottom",positionData:vSpan.depth+.2+supSubGroup.height+supSubGroup.depth,children:[{type:"elem",elem:supSubGroup},{type:"kern",size:.2},{type:"elem",elem:vSpan}]}, options)}return buildCommon.makeSpan(["mord",group.isOver?"mover":"munder"],[vlist],options)},mathmlBuilder$2=(group,options)=>{var accentNode=stretchy.mathMLnode(group.label);return new mathMLTree.MathNode(group.isOver?"mover":"munder",[buildGroup2(group.base,options),accentNode])};defineFunction({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(_ref,args){var{parser,funcName}=_ref;return{type:"horizBrace",mode:parser.mode,label:funcName,isOver:/^\\over/.test(funcName), base:args[0]}},htmlBuilder:htmlBuilder$3,mathmlBuilder:mathmlBuilder$2});defineFunction({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(_ref,args)=>{var{parser}=_ref,body2=args[1],href=assertNodeType(args[0],"url").url;return parser.settings.isTrusted({command:"\\href",url:href})?{type:"href",mode:parser.mode,href,body:ordargument(body2)}:parser.formatUnsupportedCmd("\\href")},htmlBuilder:(group,options)=>{var elements=buildExpression$1(group. body,options,!1);return buildCommon.makeAnchor(group.href,[],elements,options)},mathmlBuilder:(group,options)=>{var math2=buildExpressionRow(group.body,options);return math2 instanceof MathNode||(math2=new MathNode("mrow",[math2])),math2.setAttribute("href",group.href),math2}});defineFunction({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(_ref2,args)=>{var{parser}=_ref2,href=assertNodeType(args[0],"url").url;if(!parser.settings.isTrusted({command:"\\url", url:href}))return parser.formatUnsupportedCmd("\\url");for(var chars=[],i=0;i{var{parser,funcName,token:token2}=_ref,value=assertNodeType(args[0], "raw").string,body2=args[1];parser.settings.strict&&parser.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var trustContext,attributes={};switch(funcName){case"\\htmlClass":attributes.class=value,trustContext={command:"\\htmlClass",class:value};break;case"\\htmlId":attributes.id=value,trustContext={command:"\\htmlId",id:value};break;case"\\htmlStyle":attributes.style=value,trustContext={command:"\\htmlStyle",style:value};break;case"\\htmlData":{for(var data=value. split(","),i=0;i{var elements=buildExpression$1( group.body,options,!1),classes=["enclosing"];group.attributes.class&&classes.push(...group.attributes.class.trim().split(/\s+/));var span=buildCommon.makeSpan(classes,elements,options);for(var attr in group.attributes)attr!=="class"&&group.attributes.hasOwnProperty(attr)&&span.setAttribute(attr,group.attributes[attr]);return span},mathmlBuilder:(group,options)=>buildExpressionRow(group.body,options)});defineFunction({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(_ref,args)=>{ var{parser}=_ref;return{type:"htmlmathml",mode:parser.mode,html:ordargument(args[0]),mathml:ordargument(args[1])}},htmlBuilder:(group,options)=>{var elements=buildExpression$1(group.html,options,!1);return buildCommon.makeFragment(elements)},mathmlBuilder:(group,options)=>buildExpressionRow(group.mathml,options)});var sizeData=function(str){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(str))return{number:+str,unit:"bp"};var match=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(str);if(!match)throw new ParseError2( "Invalid size: '"+str+"' in \\includegraphics");var data={number:+(match[1]+match[2]),unit:match[3]};if(!validUnit(data))throw new ParseError2("Invalid unit: '"+data.unit+"' in \\includegraphics.");return data};defineFunction({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(_ref,args,optArgs)=>{var{parser}=_ref,width={number:0,unit:"em"},height={number:.9,unit:"em"},totalheight={number:0,unit:"em"},alt="";if(optArgs[0]) for(var attributeStr=assertNodeType(optArgs[0],"raw").string,attributes=attributeStr.split(","),i=0;i{var height=calculateSize(group.height,options),depth=0;group.totalheight.number>0&&(depth=calculateSize(group.totalheight,options)-height);var width=0;group.width.number> 0&&(width=calculateSize(group.width,options));var style2={height:makeEm(height+depth)};width>0&&(style2.width=makeEm(width)),depth>0&&(style2.verticalAlign=makeEm(-depth));var node2=new Img(group.src,group.alt,style2);return node2.height=height,node2.depth=depth,node2},mathmlBuilder:(group,options)=>{var node2=new mathMLTree.MathNode("mglyph",[]);node2.setAttribute("alt",group.alt);var height=calculateSize(group.height,options),depth=0;if(group.totalheight.number>0&&(depth=calculateSize(group.totalheight, options)-height,node2.setAttribute("valign",makeEm(-depth))),node2.setAttribute("height",makeEm(height+depth)),group.width.number>0){var width=calculateSize(group.width,options);node2.setAttribute("width",makeEm(width))}return node2.setAttribute("src",group.src),node2}});defineFunction({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(_ref,args){var{parser,funcName}=_ref,size2=assertNodeType(args[0],"size");if(parser. settings.strict){var mathFunction=funcName[1]==="m",muUnit=size2.value.unit==="mu";mathFunction?(muUnit||parser.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+funcName+" supports only mu units, "+("not "+size2.value.unit+" units")),parser.mode!=="math"&&parser.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+funcName+" works only in math mode")):muUnit&&parser.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+funcName+" doesn't support mu units")}return{type:"kern",mode:parser.mode, dimension:size2.value}},htmlBuilder(group,options){return buildCommon.makeGlue(group.dimension,options)},mathmlBuilder(group,options){var dimension=calculateSize(group.dimension,options);return new mathMLTree.SpaceNode(dimension)}});defineFunction({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(_ref,args)=>{var{parser,funcName}=_ref,body2=args[0];return{type:"lap",mode:parser.mode,alignment:funcName.slice(5),body:body2}},htmlBuilder:(group,options)=>{ var inner2;group.alignment==="clap"?(inner2=buildCommon.makeSpan([],[buildGroup$1(group.body,options)]),inner2=buildCommon.makeSpan(["inner"],[inner2],options)):inner2=buildCommon.makeSpan(["inner"],[buildGroup$1(group.body,options)]);var fix2=buildCommon.makeSpan(["fix"],[]),node2=buildCommon.makeSpan([group.alignment],[inner2,fix2],options),strut=buildCommon.makeSpan(["strut"]);return strut.style.height=makeEm(node2.height+node2.depth),node2.depth&&(strut.style.verticalAlign=makeEm(-node2.depth)), node2.children.unshift(strut),node2=buildCommon.makeSpan(["thinbox"],[node2],options),buildCommon.makeSpan(["mord","vbox"],[node2],options)},mathmlBuilder:(group,options)=>{var node2=new mathMLTree.MathNode("mpadded",[buildGroup2(group.body,options)]);if(group.alignment!=="rlap"){var offset2=group.alignment==="llap"?"-1":"-0.5";node2.setAttribute("lspace",offset2+"width")}return node2.setAttribute("width","0px"),node2}});defineFunction({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0, allowedInMath:!1},handler(_ref,args){var{funcName,parser}=_ref,outerMode=parser.mode;parser.switchMode("math");var close2=funcName==="\\("?"\\)":"$",body2=parser.parseExpression(!1,close2);return parser.expect(close2),parser.switchMode(outerMode),{type:"styling",mode:parser.mode,style:"text",body:body2}}});defineFunction({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(context,args){throw new ParseError2("Mismatched "+context.funcName)}});var chooseMathStyle=(group,options)=>{ switch(options.style.size){case Style$1.DISPLAY.size:return group.display;case Style$1.TEXT.size:return group.text;case Style$1.SCRIPT.size:return group.script;case Style$1.SCRIPTSCRIPT.size:return group.scriptscript;default:return group.text}};defineFunction({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(_ref,args)=>{var{parser}=_ref;return{type:"mathchoice",mode:parser.mode,display:ordargument(args[0]),text:ordargument(args[1]),script:ordargument(args[2]),scriptscript:ordargument( args[3])}},htmlBuilder:(group,options)=>{var body2=chooseMathStyle(group,options),elements=buildExpression$1(body2,options,!1);return buildCommon.makeFragment(elements)},mathmlBuilder:(group,options)=>{var body2=chooseMathStyle(group,options);return buildExpressionRow(body2,options)}});var assembleSupSub=(base2,supGroup,subGroup,options,style2,slant,baseShift)=>{base2=buildCommon.makeSpan([],[base2]);var subIsSingleCharacter=subGroup&&utils.isCharacterBox(subGroup),sub2,sup2;if(supGroup){var elem=buildGroup$1( supGroup,options.havingStyle(style2.sup()),options);sup2={elem,kern:Math.max(options.fontMetrics().bigOpSpacing1,options.fontMetrics().bigOpSpacing3-elem.depth)}}if(subGroup){var _elem=buildGroup$1(subGroup,options.havingStyle(style2.sub()),options);sub2={elem:_elem,kern:Math.max(options.fontMetrics().bigOpSpacing2,options.fontMetrics().bigOpSpacing4-_elem.height)}}var finalGroup;if(sup2&&sub2){var bottom=options.fontMetrics().bigOpSpacing5+sub2.elem.height+sub2.elem.depth+sub2.kern+base2.depth+ baseShift;finalGroup=buildCommon.makeVList({positionType:"bottom",positionData:bottom,children:[{type:"kern",size:options.fontMetrics().bigOpSpacing5},{type:"elem",elem:sub2.elem,marginLeft:makeEm(-slant)},{type:"kern",size:sub2.kern},{type:"elem",elem:base2},{type:"kern",size:sup2.kern},{type:"elem",elem:sup2.elem,marginLeft:makeEm(slant)},{type:"kern",size:options.fontMetrics().bigOpSpacing5}]},options)}else if(sub2){var top=base2.height-baseShift;finalGroup=buildCommon.makeVList({positionType:"\ top",positionData:top,children:[{type:"kern",size:options.fontMetrics().bigOpSpacing5},{type:"elem",elem:sub2.elem,marginLeft:makeEm(-slant)},{type:"kern",size:sub2.kern},{type:"elem",elem:base2}]},options)}else if(sup2){var _bottom=base2.depth+baseShift;finalGroup=buildCommon.makeVList({positionType:"bottom",positionData:_bottom,children:[{type:"elem",elem:base2},{type:"kern",size:sup2.kern},{type:"elem",elem:sup2.elem,marginLeft:makeEm(slant)},{type:"kern",size:options.fontMetrics().bigOpSpacing5}]}, options)}else return base2;var parts=[finalGroup];if(sub2&&slant!==0&&!subIsSingleCharacter){var spacer=buildCommon.makeSpan(["mspace"],[],options);spacer.style.marginRight=makeEm(slant),parts.unshift(spacer)}return buildCommon.makeSpan(["mop","op-limits"],parts,options)},noSuccessor=["\\smallint"],htmlBuilder$2=(grp,options)=>{var supGroup,subGroup,hasLimits=!1,group;grp.type==="supsub"?(supGroup=grp.sup,subGroup=grp.sub,group=assertNodeType(grp.base,"op"),hasLimits=!0):group=assertNodeType(grp, "op");var style2=options.style,large=!1;style2.size===Style$1.DISPLAY.size&&group.symbol&&!utils.contains(noSuccessor,group.name)&&(large=!0);var base2;if(group.symbol){var fontName=large?"Size2-Regular":"Size1-Regular",stash="";if((group.name==="\\oiint"||group.name==="\\oiiint")&&(stash=group.name.slice(1),group.name=stash==="oiint"?"\\iint":"\\iiint"),base2=buildCommon.makeSymbol(group.name,fontName,"math",options,["mop","op-symbol",large?"large-op":"small-op"]),stash.length>0){var italic=base2. italic,oval=buildCommon.staticSvg(stash+"Size"+(large?"2":"1"),options);base2=buildCommon.makeVList({positionType:"individualShift",children:[{type:"elem",elem:base2,shift:0},{type:"elem",elem:oval,shift:large?.08:0}]},options),group.name="\\"+stash,base2.classes.unshift("mop"),base2.italic=italic}}else if(group.body){var inner2=buildExpression$1(group.body,options,!0);inner2.length===1&&inner2[0]instanceof SymbolNode?(base2=inner2[0],base2.classes[0]="mop"):base2=buildCommon.makeSpan(["mop"],inner2, options)}else{for(var output=[],i=1;i{var node2;if(group.symbol)node2=new MathNode("mo",[makeText(group.name,group.mode)]),utils.contains(noSuccessor,group.name)&&node2.setAttribute("largeop","false");else if(group.body)node2=new MathNode("mo",buildExpression2(group.body,options));else{node2=new MathNode("mi",[new TextNode(group.name.slice(1))]);var operator2=new MathNode("mo",[makeText("⁡","text")]);group.parentIsSupSub?node2= new MathNode("mrow",[node2,operator2]):node2=newDocumentFragment([node2,operator2])}return node2},singleCharBigOps={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};defineFunction({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\b\ igsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(_ref,args)=>{var{parser,funcName}=_ref,fName=funcName;return fName.length===1&&(fName=singleCharBigOps[fName]),{type:"op",mode:parser.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:fName}},htmlBuilder:htmlBuilder$2,mathmlBuilder:mathmlBuilder$1});defineFunction({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(_ref2,args)=>{var{parser}=_ref2,body2=args[0]; return{type:"op",mode:parser.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ordargument(body2)}},htmlBuilder:htmlBuilder$2,mathmlBuilder:mathmlBuilder$1});var singleCharIntegrals={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};defineFunction({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg", "\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(_ref3){var{parser,funcName}=_ref3;return{type:"op",mode:parser.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:funcName}},htmlBuilder:htmlBuilder$2,mathmlBuilder:mathmlBuilder$1});defineFunction({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(_ref4){var{parser,funcName}=_ref4;return{type:"op",mode:parser.mode,limits:!0,parentIsSupSub:!1, symbol:!1,name:funcName}},htmlBuilder:htmlBuilder$2,mathmlBuilder:mathmlBuilder$1});defineFunction({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(_ref5){var{parser,funcName}=_ref5,fName=funcName;return fName.length===1&&(fName=singleCharIntegrals[fName]),{type:"op",mode:parser.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:fName}},htmlBuilder:htmlBuilder$2,mathmlBuilder:mathmlBuilder$1});var htmlBuilder$1=(grp,options)=>{ var supGroup,subGroup,hasLimits=!1,group;grp.type==="supsub"?(supGroup=grp.sup,subGroup=grp.sub,group=assertNodeType(grp.base,"operatorname"),hasLimits=!0):group=assertNodeType(grp,"operatorname");var base2;if(group.body.length>0){for(var body2=group.body.map(child3=>{var childText=child3.text;return typeof childText=="string"?{type:"textord",mode:child3.mode,text:childText}:child3}),expression=buildExpression$1(body2,options.withFont("mathrm"),!0),i=0;i{for(var expression=buildExpression2(group.body,options.withFont("mathrm")),isAllString=!0,i=0;inode3.toText()).join("");expression=[new mathMLTree.TextNode(word)]}var identifier2=new mathMLTree. MathNode("mi",expression);identifier2.setAttribute("mathvariant","normal");var operator2=new mathMLTree.MathNode("mo",[makeText("⁡","text")]);return group.parentIsSupSub?new mathMLTree.MathNode("mrow",[identifier2,operator2]):mathMLTree.newDocumentFragment([identifier2,operator2])};defineFunction({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(_ref,args)=>{var{parser,funcName}=_ref,body2=args[0];return{type:"operatorname",mode:parser.mode,body:ordargument( body2),alwaysHandleSupSub:funcName==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:htmlBuilder$1,mathmlBuilder:mathmlBuilder2});defineMacro("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");defineFunctionBuilders({type:"ordgroup",htmlBuilder(group,options){return group.semisimple?buildCommon.makeFragment(buildExpression$1(group.body,options,!1)):buildCommon.makeSpan(["mord"],buildExpression$1(group.body,options,!0),options)},mathmlBuilder(group,options){ return buildExpressionRow(group.body,options,!0)}});defineFunction({type:"overline",names:["\\overline"],props:{numArgs:1},handler(_ref,args){var{parser}=_ref,body2=args[0];return{type:"overline",mode:parser.mode,body:body2}},htmlBuilder(group,options){var innerGroup=buildGroup$1(group.body,options.havingCrampedStyle()),line=buildCommon.makeLineSpan("overline-line",options),defaultRuleThickness=options.fontMetrics().defaultRuleThickness,vlist=buildCommon.makeVList({positionType:"firstBaseline",children:[ {type:"elem",elem:innerGroup},{type:"kern",size:3*defaultRuleThickness},{type:"elem",elem:line},{type:"kern",size:defaultRuleThickness}]},options);return buildCommon.makeSpan(["mord","overline"],[vlist],options)},mathmlBuilder(group,options){var operator2=new mathMLTree.MathNode("mo",[new mathMLTree.TextNode("‾")]);operator2.setAttribute("stretchy","true");var node2=new mathMLTree.MathNode("mover",[buildGroup2(group.body,options),operator2]);return node2.setAttribute("accent","true"),node2}}); defineFunction({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(_ref,args)=>{var{parser}=_ref,body2=args[0];return{type:"phantom",mode:parser.mode,body:ordargument(body2)}},htmlBuilder:(group,options)=>{var elements=buildExpression$1(group.body,options.withPhantom(),!1);return buildCommon.makeFragment(elements)},mathmlBuilder:(group,options)=>{var inner2=buildExpression2(group.body,options);return new mathMLTree.MathNode("mphantom",inner2)}});defineFunction({type:"\ hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(_ref2,args)=>{var{parser}=_ref2,body2=args[0];return{type:"hphantom",mode:parser.mode,body:body2}},htmlBuilder:(group,options)=>{var node2=buildCommon.makeSpan([],[buildGroup$1(group.body,options.withPhantom())]);if(node2.height=0,node2.depth=0,node2.children)for(var i=0;i{var inner2=buildExpression2(ordargument(group.body),options),phantom=new mathMLTree.MathNode("mphantom",inner2),node2=new mathMLTree.MathNode("mpadded",[phantom]);return node2.setAttribute("height","0px"),node2.setAttribute("depth","0px"),node2}});defineFunction({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(_ref3,args)=>{var{parser}=_ref3,body2=args[0]; return{type:"vphantom",mode:parser.mode,body:body2}},htmlBuilder:(group,options)=>{var inner2=buildCommon.makeSpan(["inner"],[buildGroup$1(group.body,options.withPhantom())]),fix2=buildCommon.makeSpan(["fix"],[]);return buildCommon.makeSpan(["mord","rlap"],[inner2,fix2],options)},mathmlBuilder:(group,options)=>{var inner2=buildExpression2(ordargument(group.body),options),phantom=new mathMLTree.MathNode("mphantom",inner2),node2=new mathMLTree.MathNode("mpadded",[phantom]);return node2.setAttribute( "width","0px"),node2}});defineFunction({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(_ref,args){var{parser}=_ref,amount=assertNodeType(args[0],"size").value,body2=args[1];return{type:"raisebox",mode:parser.mode,dy:amount,body:body2}},htmlBuilder(group,options){var body2=buildGroup$1(group.body,options),dy=calculateSize(group.dy,options);return buildCommon.makeVList({positionType:"shift",positionData:-dy,children:[{type:"elem",elem:body2}]}, options)},mathmlBuilder(group,options){var node2=new mathMLTree.MathNode("mpadded",[buildGroup2(group.body,options)]),dy=group.dy.number+group.dy.unit;return node2.setAttribute("voffset",dy),node2}});defineFunction({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(_ref){var{parser}=_ref;return{type:"internal",mode:parser.mode}}});defineFunction({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[ "size","size","size"]},handler(_ref,args,optArgs){var{parser}=_ref,shift2=optArgs[0],width=assertNodeType(args[0],"size"),height=assertNodeType(args[1],"size");return{type:"rule",mode:parser.mode,shift:shift2&&assertNodeType(shift2,"size").value,width:width.value,height:height.value}},htmlBuilder(group,options){var rule=buildCommon.makeSpan(["mord","rule"],[],options),width=calculateSize(group.width,options),height=calculateSize(group.height,options),shift2=group.shift?calculateSize(group.shift, options):0;return rule.style.borderRightWidth=makeEm(width),rule.style.borderTopWidth=makeEm(height),rule.style.bottom=makeEm(shift2),rule.width=width,rule.height=height+shift2,rule.depth=-shift2,rule.maxFontSize=height*1.125*options.sizeMultiplier,rule},mathmlBuilder(group,options){var width=calculateSize(group.width,options),height=calculateSize(group.height,options),shift2=group.shift?calculateSize(group.shift,options):0,color=options.color&&options.getColor()||"black",rule=new mathMLTree.MathNode( "mspace");rule.setAttribute("mathbackground",color),rule.setAttribute("width",makeEm(width)),rule.setAttribute("height",makeEm(height));var wrapper=new mathMLTree.MathNode("mpadded",[rule]);return shift2>=0?wrapper.setAttribute("height",makeEm(shift2)):(wrapper.setAttribute("height",makeEm(shift2)),wrapper.setAttribute("depth",makeEm(-shift2))),wrapper.setAttribute("voffset",makeEm(shift2)),wrapper}});function sizingGroup(value,options,baseOptions){for(var inner2=buildExpression$1(value,options, !1),multiplier=options.sizeMultiplier/baseOptions.sizeMultiplier,i=0;i{var newOptions=options.havingSize(group.size);return sizingGroup(group.body,newOptions,options)};defineFunction({type:"sizing",names:sizeFuncs,props:{numArgs:0,allowedInText:!0},handler:(_ref,args)=>{var{breakOnTokenText,funcName,parser}=_ref,body2=parser.parseExpression(!1,breakOnTokenText);return{type:"sizing",mode:parser.mode,size:sizeFuncs.indexOf(funcName)+1,body:body2}},htmlBuilder:htmlBuilder2, mathmlBuilder:(group,options)=>{var newOptions=options.havingSize(group.size),inner2=buildExpression2(group.body,newOptions),node2=new mathMLTree.MathNode("mstyle",inner2);return node2.setAttribute("mathsize",makeEm(newOptions.sizeMultiplier)),node2}});defineFunction({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(_ref,args,optArgs)=>{var{parser}=_ref,smashHeight=!1,smashDepth=!1,tbArg=optArgs[0]&&assertNodeType(optArgs[0],"ordgroup");if(tbArg)for(var letter="", i=0;i{var node2=buildCommon.makeSpan([],[buildGroup$1(group.body,options)]);if(!group.smashHeight&&!group.smashDepth)return node2;if(group.smashHeight&&(node2.height=0,node2. children))for(var i=0;i{var node2=new mathMLTree.MathNode("mpadded",[buildGroup2(group.body,options)]);return group.smashHeight&& node2.setAttribute("height","0px"),group.smashDepth&&node2.setAttribute("depth","0px"),node2}});defineFunction({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(_ref,args,optArgs){var{parser}=_ref,index2=optArgs[0],body2=args[0];return{type:"sqrt",mode:parser.mode,body:body2,index:index2}},htmlBuilder(group,options){var inner2=buildGroup$1(group.body,options.havingCrampedStyle());inner2.height===0&&(inner2.height=options.fontMetrics().xHeight),inner2=buildCommon.wrapFragment( inner2,options);var metrics=options.fontMetrics(),theta=metrics.defaultRuleThickness,phi=theta;options.style.idinner2.height+inner2.depth+lineClearance&&(lineClearance=(lineClearance+delimDepth-inner2.height-inner2.depth)/2); var imgShift=img.height-inner2.height-lineClearance-ruleWidth;inner2.style.paddingLeft=makeEm(advanceWidth);var body2=buildCommon.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:inner2,wrapperClasses:["svg-align"]},{type:"kern",size:-(inner2.height+imgShift)},{type:"elem",elem:img},{type:"kern",size:ruleWidth}]},options);if(group.index){var newOptions=options.havingStyle(Style$1.SCRIPTSCRIPT),rootm=buildGroup$1(group.index,newOptions,options),toShift=.6*(body2.height-body2.depth), rootVList=buildCommon.makeVList({positionType:"shift",positionData:-toShift,children:[{type:"elem",elem:rootm}]},options),rootVListWrap=buildCommon.makeSpan(["root"],[rootVList]);return buildCommon.makeSpan(["mord","sqrt"],[rootVListWrap,body2],options)}else return buildCommon.makeSpan(["mord","sqrt"],[body2],options)},mathmlBuilder(group,options){var{body:body2,index:index2}=group;return index2?new mathMLTree.MathNode("mroot",[buildGroup2(body2,options),buildGroup2(index2,options)]):new mathMLTree. MathNode("msqrt",[buildGroup2(body2,options)])}});var styleMap={display:Style$1.DISPLAY,text:Style$1.TEXT,script:Style$1.SCRIPT,scriptscript:Style$1.SCRIPTSCRIPT};defineFunction({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(_ref,args){var{breakOnTokenText,funcName,parser}=_ref,body2=parser.parseExpression(!0,breakOnTokenText),style2=funcName.slice(1,funcName.length-5);return{type:"styling",mode:parser. mode,style:style2,body:body2}},htmlBuilder(group,options){var newStyle=styleMap[group.style],newOptions=options.havingStyle(newStyle).withFont("");return sizingGroup(group.body,newOptions,options)},mathmlBuilder(group,options){var newStyle=styleMap[group.style],newOptions=options.havingStyle(newStyle),inner2=buildExpression2(group.body,newOptions),node2=new mathMLTree.MathNode("mstyle",inner2),styleAttributes={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}, attr=styleAttributes[group.style];return node2.setAttribute("scriptlevel",attr[0]),node2.setAttribute("displaystyle",attr[1]),node2}});var htmlBuilderDelegate=function(group,options){var base2=group.base;if(base2)if(base2.type==="op"){var delegate2=base2.limits&&(options.style.size===Style$1.DISPLAY.size||base2.alwaysHandleSupSub);return delegate2?htmlBuilder$2:null}else if(base2.type==="operatorname"){var _delegate=base2.alwaysHandleSupSub&&(options.style.size===Style$1.DISPLAY.size||base2.limits); return _delegate?htmlBuilder$1:null}else{if(base2.type==="accent")return utils.isCharacterBox(base2.base)?htmlBuilder$a:null;if(base2.type==="horizBrace"){var isSup=!group.sub;return isSup===base2.isOver?htmlBuilder$3:null}else return null}else return null};defineFunctionBuilders({type:"supsub",htmlBuilder(group,options){var builderDelegate=htmlBuilderDelegate(group,options);if(builderDelegate)return builderDelegate(group,options);var{base:valueBase,sup:valueSup,sub:valueSub}=group,base2=buildGroup$1( valueBase,options),supm,subm,metrics=options.fontMetrics(),supShift=0,subShift=0,isCharacterBox3=valueBase&&utils.isCharacterBox(valueBase);if(valueSup){var newOptions=options.havingStyle(options.style.sup());supm=buildGroup$1(valueSup,newOptions,options),isCharacterBox3||(supShift=base2.height-newOptions.fontMetrics().supDrop*newOptions.sizeMultiplier/options.sizeMultiplier)}if(valueSub){var _newOptions=options.havingStyle(options.style.sub());subm=buildGroup$1(valueSub,_newOptions,options),isCharacterBox3|| (subShift=base2.depth+_newOptions.fontMetrics().subDrop*_newOptions.sizeMultiplier/options.sizeMultiplier)}var minSupShift;options.style===Style$1.DISPLAY?minSupShift=metrics.sup1:options.style.cramped?minSupShift=metrics.sup3:minSupShift=metrics.sup2;var multiplier=options.sizeMultiplier,marginRight=makeEm(.5/metrics.ptPerEm/multiplier),marginLeft=null;if(subm){var isOiint=group.base&&group.base.type==="op"&&group.base.name&&(group.base.name==="\\oiint"||group.base.name==="\\oiiint");(base2 instanceof SymbolNode||isOiint)&&(marginLeft=makeEm(-base2.italic))}var supsub;if(supm&&subm){supShift=Math.max(supShift,minSupShift,supm.depth+.25*metrics.xHeight),subShift=Math.max(subShift,metrics.sub2);var ruleWidth=metrics.defaultRuleThickness,maxWidth=4*ruleWidth;if(supShift-supm.depth-(subm.height-subShift)0&&(supShift+=psi,subShift-=psi)}var vlistElem=[{type:"elem",elem:subm,shift:subShift, marginRight,marginLeft},{type:"elem",elem:supm,shift:-supShift,marginRight}];supsub=buildCommon.makeVList({positionType:"individualShift",children:vlistElem},options)}else if(subm){subShift=Math.max(subShift,metrics.sub1,subm.height-.8*metrics.xHeight);var _vlistElem=[{type:"elem",elem:subm,marginLeft,marginRight}];supsub=buildCommon.makeVList({positionType:"shift",positionData:subShift,children:_vlistElem},options)}else if(supm)supShift=Math.max(supShift,minSupShift,supm.depth+.25*metrics.xHeight), supsub=buildCommon.makeVList({positionType:"shift",positionData:-supShift,children:[{type:"elem",elem:supm,marginRight}]},options);else throw new Error("supsub must have either sup or sub.");var mclass=getTypeOfDomTree(base2,"right")||"mord";return buildCommon.makeSpan([mclass],[base2,buildCommon.makeSpan(["msupsub"],[supsub])],options)},mathmlBuilder(group,options){var isBrace=!1,isOver,isSup;group.base&&group.base.type==="horizBrace"&&(isSup=!!group.sup,isSup===group.base.isOver&&(isBrace=!0,isOver= group.base.isOver)),group.base&&(group.base.type==="op"||group.base.type==="operatorname")&&(group.base.parentIsSupSub=!0);var children=[buildGroup2(group.base,options)];group.sub&&children.push(buildGroup2(group.sub,options)),group.sup&&children.push(buildGroup2(group.sup,options));var nodeType;if(isBrace)nodeType=isOver?"mover":"munder";else if(group.sub)if(group.sup){var _base2=group.base;_base2&&_base2.type==="op"&&_base2.limits&&options.style===Style$1.DISPLAY||_base2&&_base2.type==="operat\ orname"&&_base2.alwaysHandleSupSub&&(options.style===Style$1.DISPLAY||_base2.limits)?nodeType="munderover":nodeType="msubsup"}else{var _base=group.base;_base&&_base.type==="op"&&_base.limits&&(options.style===Style$1.DISPLAY||_base.alwaysHandleSupSub)||_base&&_base.type==="operatorname"&&_base.alwaysHandleSupSub&&(_base.limits||options.style===Style$1.DISPLAY)?nodeType="munder":nodeType="msub"}else{var base2=group.base;base2&&base2.type==="op"&&base2.limits&&(options.style===Style$1.DISPLAY||base2. alwaysHandleSupSub)||base2&&base2.type==="operatorname"&&base2.alwaysHandleSupSub&&(base2.limits||options.style===Style$1.DISPLAY)?nodeType="mover":nodeType="msup"}return new mathMLTree.MathNode(nodeType,children)}});defineFunctionBuilders({type:"atom",htmlBuilder(group,options){return buildCommon.mathsym(group.text,group.mode,options,["m"+group.family])},mathmlBuilder(group,options){var node2=new mathMLTree.MathNode("mo",[makeText(group.text,group.mode)]);if(group.family==="bin"){var variant=getVariant( group,options);variant==="bold-italic"&&node2.setAttribute("mathvariant",variant)}else group.family==="punct"?node2.setAttribute("separator","true"):(group.family==="open"||group.family==="close")&&node2.setAttribute("stretchy","false");return node2}});var defaultVariant={mi:"italic",mn:"normal",mtext:"normal"};defineFunctionBuilders({type:"mathord",htmlBuilder(group,options){return buildCommon.makeOrd(group,options,"mathord")},mathmlBuilder(group,options){var node2=new mathMLTree.MathNode("mi", [makeText(group.text,group.mode,options)]),variant=getVariant(group,options)||"italic";return variant!==defaultVariant[node2.type]&&node2.setAttribute("mathvariant",variant),node2}});defineFunctionBuilders({type:"textord",htmlBuilder(group,options){return buildCommon.makeOrd(group,options,"textord")},mathmlBuilder(group,options){var text2=makeText(group.text,group.mode,options),variant=getVariant(group,options)||"normal",node2;return group.mode==="text"?node2=new mathMLTree.MathNode("mtext",[text2]): /[0-9]/.test(group.text)?node2=new mathMLTree.MathNode("mn",[text2]):group.text==="\\prime"?node2=new mathMLTree.MathNode("mo",[text2]):node2=new mathMLTree.MathNode("mi",[text2]),variant!==defaultVariant[node2.type]&&node2.setAttribute("mathvariant",variant),node2}});var cssSpace={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},regularSpace={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};defineFunctionBuilders({type:"spacing",htmlBuilder(group,options){ if(regularSpace.hasOwnProperty(group.text)){var className=regularSpace[group.text].className||"";if(group.mode==="text"){var ord=buildCommon.makeOrd(group,options,"textord");return ord.classes.push(className),ord}else return buildCommon.makeSpan(["mspace",className],[buildCommon.mathsym(group.text,group.mode,options)],options)}else{if(cssSpace.hasOwnProperty(group.text))return buildCommon.makeSpan(["mspace",cssSpace[group.text]],[],options);throw new ParseError2('Unknown type of space "'+group.text+ '"')}},mathmlBuilder(group,options){var node2;if(regularSpace.hasOwnProperty(group.text))node2=new mathMLTree.MathNode("mtext",[new mathMLTree.TextNode(" ")]);else{if(cssSpace.hasOwnProperty(group.text))return new mathMLTree.MathNode("mspace");throw new ParseError2('Unknown type of space "'+group.text+'"')}return node2}});var pad=()=>{var padNode=new mathMLTree.MathNode("mtd",[]);return padNode.setAttribute("width","50%"),padNode};defineFunctionBuilders({type:"tag",mathmlBuilder(group,options){ var table2=new mathMLTree.MathNode("mtable",[new mathMLTree.MathNode("mtr",[pad(),new mathMLTree.MathNode("mtd",[buildExpressionRow(group.body,options)]),pad(),new mathMLTree.MathNode("mtd",[buildExpressionRow(group.tag,options)])])]);return table2.setAttribute("width","100%"),table2}});var textFontFamilies={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},textFontWeights={"\\textbf":"textbf","\\textmd":"textmd"},textFontShapes={"\\textit":"tex\ tit","\\textup":"textup"},optionsWithFont=(group,options)=>{var font=group.font;if(font){if(textFontFamilies[font])return options.withTextFontFamily(textFontFamilies[font]);if(textFontWeights[font])return options.withTextFontWeight(textFontWeights[font]);if(font==="\\emph")return options.fontShape==="textit"?options.withTextFontShape("textup"):options.withTextFontShape("textit")}else return options;return options.withTextFontShape(textFontShapes[font])};defineFunction({type:"text",names:["\\text", "\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(_ref,args){var{parser,funcName}=_ref,body2=args[0];return{type:"text",mode:parser.mode,body:ordargument(body2),font:funcName}},htmlBuilder(group,options){var newOptions=optionsWithFont(group,options),inner2=buildExpression$1(group.body,newOptions,!0);return buildCommon.makeSpan(["mord","text"],inner2,newOptions)},mathmlBuilder(group,options){ var newOptions=optionsWithFont(group,options);return buildExpressionRow(group.body,newOptions)}});defineFunction({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(_ref,args){var{parser}=_ref;return{type:"underline",mode:parser.mode,body:args[0]}},htmlBuilder(group,options){var innerGroup=buildGroup$1(group.body,options),line=buildCommon.makeLineSpan("underline-line",options),defaultRuleThickness=options.fontMetrics().defaultRuleThickness,vlist=buildCommon.makeVList( {positionType:"top",positionData:innerGroup.height,children:[{type:"kern",size:defaultRuleThickness},{type:"elem",elem:line},{type:"kern",size:3*defaultRuleThickness},{type:"elem",elem:innerGroup}]},options);return buildCommon.makeSpan(["mord","underline"],[vlist],options)},mathmlBuilder(group,options){var operator2=new mathMLTree.MathNode("mo",[new mathMLTree.TextNode("‾")]);operator2.setAttribute("stretchy","true");var node2=new mathMLTree.MathNode("munder",[buildGroup2(group.body,options),operator2]); return node2.setAttribute("accentunder","true"),node2}});defineFunction({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(_ref,args){var{parser}=_ref;return{type:"vcenter",mode:parser.mode,body:args[0]}},htmlBuilder(group,options){var body2=buildGroup$1(group.body,options),axisHeight=options.fontMetrics().axisHeight,dy=.5*(body2.height-axisHeight-(body2.depth+axisHeight));return buildCommon.makeVList({positionType:"shift",positionData:dy,children:[ {type:"elem",elem:body2}]},options)},mathmlBuilder(group,options){return new mathMLTree.MathNode("mpadded",[buildGroup2(group.body,options)],["vcenter"])}});defineFunction({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(context,args,optArgs){throw new ParseError2("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(group,options){for(var text2=makeVerb(group),body2=[],newOptions=options.havingStyle(options.style.text()),i=0;igroup.body.replace(/ /g, group.star?"␣":" "),functions=_functions,spaceRegexString=`[ \r ]`,controlWordRegexString="\\\\[a-zA-Z@]+",controlSymbolRegexString="\\\\[^\uD800-\uDFFF]",controlWordWhitespaceRegexString="("+controlWordRegexString+")"+spaceRegexString+"*",controlSpaceRegexString=`\\\\( |[ \r ]+ ?)[ \r ]*`,combiningDiacriticalMarkString="[̀-ͯ]",combiningDiacriticalMarksEndRegex=new RegExp(combiningDiacriticalMarkString+"+$"),tokenRegexString="("+spaceRegexString+"+)|"+(controlSpaceRegexString+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(combiningDiacriticalMarkString+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(combiningDiacriticalMarkString+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+controlWordWhitespaceRegexString)+("|"+controlSymbolRegexString+")");class Lexer{constructor(input,settings){ this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=input,this.settings=settings,this.tokenRegex=new RegExp(tokenRegexString,"g"),this.catcodes={"%":14,"~":13}}setCatcode(char,code2){this.catcodes[char]=code2}lex(){var input=this.input,pos=this.tokenRegex.lastIndex;if(pos===input.length)return new Token("EOF",new SourceLocation(this,pos,pos));var match=this.tokenRegex.exec(input);if(match===null||match.index!==pos)throw new ParseError2("Unexpected charac\ ter: '"+input[pos]+"'",new Token(input[pos],new SourceLocation(this,pos,pos+1)));var text2=match[6]||match[3]||(match[2]?"\\ ":" ");if(this.catcodes[text2]===14){var nlIndex=input.indexOf(` `,this.tokenRegex.lastIndex);return nlIndex===-1?(this.tokenRegex.lastIndex=input.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=nlIndex+1,this.lex()}return new Token(text2,new SourceLocation(this,pos,this.tokenRegex.lastIndex))}}class Namespace{constructor(builtins,globalMacros){builtins===void 0&&(builtins={}),globalMacros===void 0&&(globalMacros={}),this. current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=globalMacros,this.builtins=builtins,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new ParseError2("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var undefs=this.undefStack.pop();for(var undef in undefs)undefs.hasOwnProperty(undef)&&(undefs[undef]==null?delete this.current[undef]:this.current[undef]=undefs[undef])}endGroups(){ for(;this.undefStack.length>0;)this.endGroup()}has(name){return this.current.hasOwnProperty(name)||this.builtins.hasOwnProperty(name)}get(name){return this.current.hasOwnProperty(name)?this.current[name]:this.builtins[name]}set(name,value,global2){if(global2===void 0&&(global2=!1),global2){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][name]=value)}else{var top=this.undefStack[this.undefStack.length-1]; top&&!top.hasOwnProperty(name)&&(top[name]=this.current[name])}value==null?delete this.current[name]:this.current[name]=value}}var macros=_macros;defineMacro("\\noexpand",function(context){var t=context.popToken();return context.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});defineMacro("\\expandafter",function(context){var t=context.popToken();return context.expandOnce(!0),{tokens:[t],numArgs:0}});defineMacro("\\@firstoftwo",function(context){var args=context.consumeArgs( 2);return{tokens:args[0],numArgs:0}});defineMacro("\\@secondoftwo",function(context){var args=context.consumeArgs(2);return{tokens:args[1],numArgs:0}});defineMacro("\\@ifnextchar",function(context){var args=context.consumeArgs(3);context.consumeSpaces();var nextToken=context.future();return args[0].length===1&&args[0][0].text===nextToken.text?{tokens:args[1],numArgs:0}:{tokens:args[2],numArgs:0}});defineMacro("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");defineMacro("\\TextOrMath",function(context){ var args=context.consumeArgs(2);return context.mode==="text"?{tokens:args[0],numArgs:0}:{tokens:args[1],numArgs:0}});var digitToNumber={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};defineMacro("\\char",function(context){var token2=context.popToken(),base2,number2="";if(token2.text==="'")base2=8,token2=context.popToken();else if(token2.text==='"')base2=16,token2=context.popToken();else if(token2.text==="`")if(token2=context.popToken(),token2. text[0]==="\\")number2=token2.text.charCodeAt(1);else{if(token2.text==="EOF")throw new ParseError2("\\char` missing argument");number2=token2.text.charCodeAt(0)}else base2=10;if(base2){if(number2=digitToNumber[token2.text],number2==null||number2>=base2)throw new ParseError2("Invalid base-"+base2+" digit "+token2.text);for(var digit;(digit=digitToNumber[context.future().text])!=null&&digit{ var arg=context.consumeArg().tokens;if(arg.length!==1)throw new ParseError2("\\newcommand's first argument must be a macro name");var name=arg[0].text,exists=context.isDefined(name);if(exists&&!existsOK)throw new ParseError2("\\newcommand{"+name+"} attempting to redefine "+(name+"; use \\renewcommand"));if(!exists&&!nonexistsOK)throw new ParseError2("\\renewcommand{"+name+"} when command "+name+" does not yet exist; use \\newcommand");var numArgs=0;if(arg=context.consumeArg().tokens,arg.length=== 1&&arg[0].text==="["){for(var argText="",token2=context.expandNextToken();token2.text!=="]"&&token2.text!=="EOF";)argText+=token2.text,token2=context.expandNextToken();if(!argText.match(/^\s*[0-9]+\s*$/))throw new ParseError2("Invalid number of arguments: "+argText);numArgs=parseInt(argText),arg=context.consumeArg().tokens}return exists&&skipIfExists||context.macros.set(name,{tokens:arg,numArgs}),""};defineMacro("\\newcommand",context=>newcommand(context,!1,!0,!1));defineMacro("\\renewcommand",context=>newcommand( context,!0,!1,!1));defineMacro("\\providecommand",context=>newcommand(context,!0,!0,!0));defineMacro("\\message",context=>{var arg=context.consumeArgs(1)[0];return console.log(arg.reverse().map(token2=>token2.text).join("")),""});defineMacro("\\errmessage",context=>{var arg=context.consumeArgs(1)[0];return console.error(arg.reverse().map(token2=>token2.text).join("")),""});defineMacro("\\show",context=>{var tok=context.popToken(),name=tok.text;return console.log(tok,context.macros.get(name),functions[name], symbols.math[name],symbols.text[name]),""});defineMacro("\\bgroup","{");defineMacro("\\egroup","}");defineMacro("~","\\nobreakspace");defineMacro("\\lq","`");defineMacro("\\rq","'");defineMacro("\\aa","\\r a");defineMacro("\\AA","\\r A");defineMacro("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");defineMacro("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");defineMacro("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");defineMacro( "ℬ","\\mathscr{B}");defineMacro("ℰ","\\mathscr{E}");defineMacro("ℱ","\\mathscr{F}");defineMacro("ℋ","\\mathscr{H}");defineMacro("ℐ","\\mathscr{I}");defineMacro("ℒ","\\mathscr{L}");defineMacro("ℳ","\\mathscr{M}");defineMacro("ℛ","\\mathscr{R}");defineMacro("ℭ","\\mathfrak{C}");defineMacro("ℌ","\\mathfrak{H}");defineMacro("ℨ","\\mathfrak{Z}");defineMacro("\\Bbbk","\\Bbb{k}");defineMacro("·","\\cdotp");defineMacro("\\llap","\\mathllap{\\textrm{#1}}");defineMacro("\\rlap","\\ma\ thrlap{\\textrm{#1}}");defineMacro("\\clap","\\mathclap{\\textrm{#1}}");defineMacro("\\mathstrut","\\vphantom{(}");defineMacro("\\underbar","\\underline{\\text{#1}}");defineMacro("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');defineMacro("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");defineMacro("\\ne","\\neq");defineMacro("≠","\\neq");defineMacro("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");defineMacro("∉", "\\notin");defineMacro("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");defineMacro("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");defineMacro("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");defineMacro("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");defineMacro("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");defineMacro( "≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");defineMacro("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");defineMacro("⟂","\\perp");defineMacro("‼","\\mathclose{!\\mkern-0.8mu!}");defineMacro("∌","\\notni");defineMacro("⌜","\\ulcorner");defineMacro("⌝","\\urcorner");defineMacro("⌞","\\llcorner");defineMacro("⌟","\\lrcorner");defineMacro("©","\\copyright");defineMacro("®","\\textregistered");defineMacro("️","\\textregistered"); defineMacro("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');defineMacro("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');defineMacro("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');defineMacro("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');defineMacro("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");defineMacro("⋮","\\vdots");defineMacro("\\varGamma","\\mathit{\\Gamma}");defineMacro("\\varDelta","\\mathit{\\Delta}");defineMacro( "\\varTheta","\\mathit{\\Theta}");defineMacro("\\varLambda","\\mathit{\\Lambda}");defineMacro("\\varXi","\\mathit{\\Xi}");defineMacro("\\varPi","\\mathit{\\Pi}");defineMacro("\\varSigma","\\mathit{\\Sigma}");defineMacro("\\varUpsilon","\\mathit{\\Upsilon}");defineMacro("\\varPhi","\\mathit{\\Phi}");defineMacro("\\varPsi","\\mathit{\\Psi}");defineMacro("\\varOmega","\\mathit{\\Omega}");defineMacro("\\substack","\\begin{subarray}{c}#1\\end{subarray}");defineMacro("\\colon","\\nobreak\\mskip2mu\\mathp\ unct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");defineMacro("\\boxed","\\fbox{$\\displaystyle{#1}$}");defineMacro("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");defineMacro("\\implies","\\DOTSB\\;\\Longrightarrow\\;");defineMacro("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");defineMacro("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");defineMacro("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var dotsByToken={",":"\\dotsc","\\not":"\\do\ tsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarro\ w":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};defineMacro("\\dots",function(context){ var thedots="\\dotso",next2=context.expandAfterFuture().text;return next2 in dotsByToken?thedots=dotsByToken[next2]:(next2.slice(0,4)==="\\not"||next2 in symbols.math&&utils.contains(["bin","rel"],symbols.math[next2].group))&&(thedots="\\dotsb"),thedots});var spaceAfterDots={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};defineMacro( "\\dotso",function(context){var next2=context.future().text;return next2 in spaceAfterDots?"\\ldots\\,":"\\ldots"});defineMacro("\\dotsc",function(context){var next2=context.future().text;return next2 in spaceAfterDots&&next2!==","?"\\ldots\\,":"\\ldots"});defineMacro("\\cdots",function(context){var next2=context.future().text;return next2 in spaceAfterDots?"\\@cdots\\,":"\\@cdots"});defineMacro("\\dotsb","\\cdots");defineMacro("\\dotsm","\\cdots");defineMacro("\\dotsi","\\!\\cdots");defineMacro( "\\dotsx","\\ldots\\,");defineMacro("\\DOTSI","\\relax");defineMacro("\\DOTSB","\\relax");defineMacro("\\DOTSX","\\relax");defineMacro("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");defineMacro("\\,","\\tmspace+{3mu}{.1667em}");defineMacro("\\thinspace","\\,");defineMacro("\\>","\\mskip{4mu}");defineMacro("\\:","\\tmspace+{4mu}{.2222em}");defineMacro("\\medspace","\\:");defineMacro("\\;","\\tmspace+{5mu}{.2777em}");defineMacro("\\thickspace","\\;");defineMacro("\\!","\\tmspace-{3mu}{\ .1667em}");defineMacro("\\negthinspace","\\!");defineMacro("\\negmedspace","\\tmspace-{4mu}{.2222em}");defineMacro("\\negthickspace","\\tmspace-{5mu}{.277em}");defineMacro("\\enspace","\\kern.5em ");defineMacro("\\enskip","\\hskip.5em\\relax");defineMacro("\\quad","\\hskip1em\\relax");defineMacro("\\qquad","\\hskip2em\\relax");defineMacro("\\tag","\\@ifstar\\tag@literal\\tag@paren");defineMacro("\\tag@paren","\\tag@literal{({#1})}");defineMacro("\\tag@literal",context=>{if(context.macros.get("\\d\ f@tag"))throw new ParseError2("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});defineMacro("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");defineMacro("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");defineMacro("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");defineMacro("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm \ mod}\\,\\,#1");defineMacro("\\newline","\\\\\\relax");defineMacro("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var latexRaiseA=makeEm(fontMetricsData["Main-Regular"][84][1]-.7*fontMetricsData["Main-Regular"][65][1]);defineMacro("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+latexRaiseA+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");defineMacro("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+latexRaiseA+"}{\\script\ style A}")+"\\kern-.15em\\TeX}{KaTeX}}");defineMacro("\\hspace","\\@ifstar\\@hspacer\\@hspace");defineMacro("\\@hspace","\\hskip #1\\relax");defineMacro("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");defineMacro("\\ordinarycolon",":");defineMacro("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");defineMacro("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');defineMacro("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mke\ rn-1.2mu}=}}{\\mathop{\\char"2254}}');defineMacro("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');defineMacro("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');defineMacro("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');defineMacro("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\\ vcentcolon}}{\\mathop{\\char"2255}}');defineMacro("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');defineMacro("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');defineMacro("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');defineMacro("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2\ mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');defineMacro("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');defineMacro("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');defineMacro("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');defineMacro("∷","\\dblcolon");defineMacro("∹","\\eqcolon"); defineMacro("≔","\\coloneqq");defineMacro("≕","\\eqqcolon");defineMacro("⩴","\\Coloneqq");defineMacro("\\ratio","\\vcentcolon");defineMacro("\\coloncolon","\\dblcolon");defineMacro("\\colonequals","\\coloneqq");defineMacro("\\coloncolonequals","\\Coloneqq");defineMacro("\\equalscolon","\\eqqcolon");defineMacro("\\equalscoloncolon","\\Eqqcolon");defineMacro("\\colonminus","\\coloneq");defineMacro("\\coloncolonminus","\\Coloneq");defineMacro("\\minuscolon","\\eqcolon");defineMacro("\\minuscol\ oncolon","\\Eqcolon");defineMacro("\\coloncolonapprox","\\Colonapprox");defineMacro("\\coloncolonsim","\\Colonsim");defineMacro("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");defineMacro("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");defineMacro("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");defineMacro("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");defineMacro("\\notni","\\html@mathml{\\not\\n\ i}{\\mathrel{\\char`∌}}");defineMacro("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");defineMacro("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");defineMacro("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");defineMacro("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");defineMacro("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");defineMacro("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");defineMacro("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");defineMacro("\\v\ arprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");defineMacro("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");defineMacro("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");defineMacro("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");defineMacro("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");defineMacro("\\nleqq","\\html@mathml{\\@nleqq}{≰}");defineMacro("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");defineMacro("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");defineMacro("\\nshortpa\ rallel","\\html@mathml{\\@nshortparallel}{∦}");defineMacro("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");defineMacro("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");defineMacro("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");defineMacro("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");defineMacro("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");defineMacro("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");defineMacro("\\imath","\\html@mathml{\\@imath}{ı}"); defineMacro("\\jmath","\\html@mathml{\\@jmath}{ȷ}");defineMacro("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");defineMacro("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");defineMacro("⟦","\\llbracket");defineMacro("⟧","\\rrbracket");defineMacro("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");defineMacro("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"); defineMacro("⦃","\\lBrace");defineMacro("⦄","\\rBrace");defineMacro("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");defineMacro("⦵","\\minuso");defineMacro("\\darr","\\downarrow");defineMacro("\\dArr","\\Downarrow");defineMacro("\\Darr","\\Downarrow");defineMacro("\\lang","\\langle");defineMacro("\\rang","\\rangle");defineMacro("\\uarr","\\uparrow");defineMacro("\\uArr","\\Uparrow"); defineMacro("\\Uarr","\\Uparrow");defineMacro("\\N","\\mathbb{N}");defineMacro("\\R","\\mathbb{R}");defineMacro("\\Z","\\mathbb{Z}");defineMacro("\\alef","\\aleph");defineMacro("\\alefsym","\\aleph");defineMacro("\\Alpha","\\mathrm{A}");defineMacro("\\Beta","\\mathrm{B}");defineMacro("\\bull","\\bullet");defineMacro("\\Chi","\\mathrm{X}");defineMacro("\\clubs","\\clubsuit");defineMacro("\\cnums","\\mathbb{C}");defineMacro("\\Complex","\\mathbb{C}");defineMacro("\\Dagger","\\ddagger");defineMacro( "\\diamonds","\\diamondsuit");defineMacro("\\empty","\\emptyset");defineMacro("\\Epsilon","\\mathrm{E}");defineMacro("\\Eta","\\mathrm{H}");defineMacro("\\exist","\\exists");defineMacro("\\harr","\\leftrightarrow");defineMacro("\\hArr","\\Leftrightarrow");defineMacro("\\Harr","\\Leftrightarrow");defineMacro("\\hearts","\\heartsuit");defineMacro("\\image","\\Im");defineMacro("\\infin","\\infty");defineMacro("\\Iota","\\mathrm{I}");defineMacro("\\isin","\\in");defineMacro("\\Kappa","\\mathrm{K}"); defineMacro("\\larr","\\leftarrow");defineMacro("\\lArr","\\Leftarrow");defineMacro("\\Larr","\\Leftarrow");defineMacro("\\lrarr","\\leftrightarrow");defineMacro("\\lrArr","\\Leftrightarrow");defineMacro("\\Lrarr","\\Leftrightarrow");defineMacro("\\Mu","\\mathrm{M}");defineMacro("\\natnums","\\mathbb{N}");defineMacro("\\Nu","\\mathrm{N}");defineMacro("\\Omicron","\\mathrm{O}");defineMacro("\\plusmn","\\pm");defineMacro("\\rarr","\\rightarrow");defineMacro("\\rArr","\\Rightarrow");defineMacro("\\R\ arr","\\Rightarrow");defineMacro("\\real","\\Re");defineMacro("\\reals","\\mathbb{R}");defineMacro("\\Reals","\\mathbb{R}");defineMacro("\\Rho","\\mathrm{P}");defineMacro("\\sdot","\\cdot");defineMacro("\\sect","\\S");defineMacro("\\spades","\\spadesuit");defineMacro("\\sub","\\subset");defineMacro("\\sube","\\subseteq");defineMacro("\\supe","\\supseteq");defineMacro("\\Tau","\\mathrm{T}");defineMacro("\\thetasym","\\vartheta");defineMacro("\\weierp","\\wp");defineMacro("\\Zeta","\\mathrm{Z}");defineMacro( "\\argmin","\\DOTSB\\operatorname*{arg\\,min}");defineMacro("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");defineMacro("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");defineMacro("\\bra","\\mathinner{\\langle{#1}|}");defineMacro("\\ket","\\mathinner{|{#1}\\rangle}");defineMacro("\\braket","\\mathinner{\\langle{#1}\\rangle}");defineMacro("\\Bra","\\left\\langle#1\\right|");defineMacro("\\Ket","\\left|#1\\right\\rangle");var braketHelper=one2=>context=>{var left=context.consumeArg().tokens, middle=context.consumeArg().tokens,middleDouble=context.consumeArg().tokens,right=context.consumeArg().tokens,oldMiddle=context.macros.get("|"),oldMiddleDouble=context.macros.get("\\|");context.macros.beginGroup();var midMacro=double=>context2=>{one2&&(context2.macros.set("|",oldMiddle),middleDouble.length&&context2.macros.set("\\|",oldMiddleDouble));var doubled=double;if(!double&&middleDouble.length){var nextToken=context2.future();nextToken.text==="|"&&(context2.popToken(),doubled=!0)}return{tokens:doubled? middleDouble:middle,numArgs:0}};context.macros.set("|",midMacro(!1)),middleDouble.length&&context.macros.set("\\|",midMacro(!0));var arg=context.consumeArg().tokens,expanded=context.expandTokens([...right,...arg,...left]);return context.macros.endGroup(),{tokens:expanded.reverse(),numArgs:0}};defineMacro("\\bra@ket",braketHelper(!1));defineMacro("\\bra@set",braketHelper(!0));defineMacro("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");defineMacro( "\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");defineMacro("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");defineMacro("\\angln","{\\angl n}");defineMacro("\\blue","\\textcolor{##6495ed}{#1}");defineMacro("\\orange","\\textcolor{##ffa500}{#1}");defineMacro("\\pink","\\textcolor{##ff00af}{#1}");defineMacro("\\red","\\textcolor{##df0030}{#1}");defineMacro("\\green","\\textcolor{##28ae7b}{#1}");defineMacro("\\gray","\\textcolor{gray}{#1}");defineMacro("\\\ purple","\\textcolor{##9d38bd}{#1}");defineMacro("\\blueA","\\textcolor{##ccfaff}{#1}");defineMacro("\\blueB","\\textcolor{##80f6ff}{#1}");defineMacro("\\blueC","\\textcolor{##63d9ea}{#1}");defineMacro("\\blueD","\\textcolor{##11accd}{#1}");defineMacro("\\blueE","\\textcolor{##0c7f99}{#1}");defineMacro("\\tealA","\\textcolor{##94fff5}{#1}");defineMacro("\\tealB","\\textcolor{##26edd5}{#1}");defineMacro("\\tealC","\\textcolor{##01d1c1}{#1}");defineMacro("\\tealD","\\textcolor{##01a995}{#1}");defineMacro( "\\tealE","\\textcolor{##208170}{#1}");defineMacro("\\greenA","\\textcolor{##b6ffb0}{#1}");defineMacro("\\greenB","\\textcolor{##8af281}{#1}");defineMacro("\\greenC","\\textcolor{##74cf70}{#1}");defineMacro("\\greenD","\\textcolor{##1fab54}{#1}");defineMacro("\\greenE","\\textcolor{##0d923f}{#1}");defineMacro("\\goldA","\\textcolor{##ffd0a9}{#1}");defineMacro("\\goldB","\\textcolor{##ffbb71}{#1}");defineMacro("\\goldC","\\textcolor{##ff9c39}{#1}");defineMacro("\\goldD","\\textcolor{##e07d10}{#1}"); defineMacro("\\goldE","\\textcolor{##a75a05}{#1}");defineMacro("\\redA","\\textcolor{##fca9a9}{#1}");defineMacro("\\redB","\\textcolor{##ff8482}{#1}");defineMacro("\\redC","\\textcolor{##f9685d}{#1}");defineMacro("\\redD","\\textcolor{##e84d39}{#1}");defineMacro("\\redE","\\textcolor{##bc2612}{#1}");defineMacro("\\maroonA","\\textcolor{##ffbde0}{#1}");defineMacro("\\maroonB","\\textcolor{##ff92c6}{#1}");defineMacro("\\maroonC","\\textcolor{##ed5fa6}{#1}");defineMacro("\\maroonD","\\textcolor{##ca\ 337c}{#1}");defineMacro("\\maroonE","\\textcolor{##9e034e}{#1}");defineMacro("\\purpleA","\\textcolor{##ddd7ff}{#1}");defineMacro("\\purpleB","\\textcolor{##c6b9fc}{#1}");defineMacro("\\purpleC","\\textcolor{##aa87ff}{#1}");defineMacro("\\purpleD","\\textcolor{##7854ab}{#1}");defineMacro("\\purpleE","\\textcolor{##543b78}{#1}");defineMacro("\\mintA","\\textcolor{##f5f9e8}{#1}");defineMacro("\\mintB","\\textcolor{##edf2df}{#1}");defineMacro("\\mintC","\\textcolor{##e0e5cc}{#1}");defineMacro("\\gra\ yA","\\textcolor{##f6f7f7}{#1}");defineMacro("\\grayB","\\textcolor{##f0f1f2}{#1}");defineMacro("\\grayC","\\textcolor{##e3e5e6}{#1}");defineMacro("\\grayD","\\textcolor{##d6d8da}{#1}");defineMacro("\\grayE","\\textcolor{##babec2}{#1}");defineMacro("\\grayF","\\textcolor{##888d93}{#1}");defineMacro("\\grayG","\\textcolor{##626569}{#1}");defineMacro("\\grayH","\\textcolor{##3b3e40}{#1}");defineMacro("\\grayI","\\textcolor{##21242c}{#1}");defineMacro("\\kaBlue","\\textcolor{##314453}{#1}");defineMacro( "\\kaGreen","\\textcolor{##71B307}{#1}");var implicitCommands={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class MacroExpander{constructor(input,settings,mode){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=settings,this.expansionCount=0,this.feed(input),this.macros=new Namespace(macros,settings.macros),this.mode=mode,this.stack=[]}feed(input){this.lexer=new Lexer(input,this.settings)}switchMode(newMode){this.mode= newMode}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(token2){this.stack.push(token2)}pushTokens(tokens){this.stack.push(...tokens)}scanArgument(isOptional){var start2,end,tokens;if(isOptional){if(this.consumeSpaces(),this.future().text!=="[")return null;start2=this.popToken(), {tokens,end}=this.consumeArg(["]"])}else({tokens,start:start2,end}=this.consumeArg());return this.pushToken(new Token("EOF",end.loc)),this.pushTokens(tokens),start2.range(end,"")}consumeSpaces(){for(;;){var token2=this.future();if(token2.text===" ")this.stack.pop();else break}}consumeArg(delims){var tokens=[],isDelimited=delims&&delims.length>0;isDelimited||this.consumeSpaces();var start2=this.future(),tok,depth=0,match=0;do{if(tok=this.popToken(),tokens.push(tok),tok.text==="{")++depth;else if(tok. text==="}"){if(--depth,depth===-1)throw new ParseError2("Extra }",tok)}else if(tok.text==="EOF")throw new ParseError2("Unexpected end of input in a macro argument, expected '"+(delims&&isDelimited?delims[match]:"}")+"'",tok);if(delims&&isDelimited)if((depth===0||depth===1&&delims[match]==="{")&&tok.text===delims[match]){if(++match,match===delims.length){tokens.splice(-match,match);break}}else match=0}while(depth!==0||isDelimited);return start2.text==="{"&&tokens[tokens.length-1].text==="}"&&(tokens. pop(),tokens.shift()),tokens.reverse(),{tokens,start:start2,end:tok}}consumeArgs(numArgs,delimiters2){if(delimiters2){if(delimiters2.length!==numArgs+1)throw new ParseError2("The length of delimiters doesn't match the number of args!");for(var delims=delimiters2[0],i=0;ithis.settings.maxExpand)throw new ParseError2("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(expandableOnly){var topToken=this.popToken(),name=topToken.text,expansion=topToken.noexpand?null:this._getExpansion(name);if(expansion==null||expandableOnly&&expansion.unexpandable){if(expandableOnly&&expansion==null&&name[0]==="\\"&&!this.isDefined(name))throw new ParseError2( "Undefined control sequence: "+name);return this.pushToken(topToken),!1}this.countExpansion(1);var tokens=expansion.tokens,args=this.consumeArgs(expansion.numArgs,expansion.delimiters);if(expansion.numArgs){tokens=tokens.slice();for(var i=tokens.length-1;i>=0;--i){var tok=tokens[i];if(tok.text==="#"){if(i===0)throw new ParseError2("Incomplete placeholder at end of macro body",tok);if(tok=tokens[--i],tok.text==="#")tokens.splice(i+1,1);else if(/^[1-9]$/.test(tok.text))tokens.splice(i,2,...args[+tok. text-1]);else throw new ParseError2("Not a valid argument number",tok)}}}return this.pushTokens(tokens),tokens.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var token2=this.stack.pop();return token2.treatAsRelax&&(token2.text="\\relax"),token2}throw new Error}expandMacro(name){return this.macros.has(name)?this.expandTokens([new Token(name)]):void 0}expandTokens(tokens){var output=[],oldStackLength=this.stack.length;for(this. pushTokens(tokens);this.stack.length>oldStackLength;)if(this.expandOnce(!0)===!1){var token2=this.stack.pop();token2.treatAsRelax&&(token2.noexpand=!1,token2.treatAsRelax=!1),output.push(token2)}return this.countExpansion(output.length),output}expandMacroAsText(name){var tokens=this.expandMacro(name);return tokens&&tokens.map(token2=>token2.text).join("")}_getExpansion(name){var definition2=this.macros.get(name);if(definition2==null)return definition2;if(name.length===1){var catcode=this.lexer.catcodes[name]; if(catcode!=null&&catcode!==13)return}var expansion=typeof definition2=="function"?definition2(this):definition2;if(typeof expansion=="string"){var numArgs=0;if(expansion.indexOf("#")!==-1)for(var stripped=expansion.replace(/##/g,"");stripped.indexOf("#"+(numArgs+1))!==-1;)++numArgs;for(var bodyLexer=new Lexer(expansion,this.settings),tokens=[],tok=bodyLexer.lex();tok.text!=="EOF";)tokens.push(tok),tok=bodyLexer.lex();tokens.reverse();var expanded={tokens,numArgs};return expanded}return expansion}isDefined(name){ return this.macros.has(name)||functions.hasOwnProperty(name)||symbols.math.hasOwnProperty(name)||symbols.text.hasOwnProperty(name)||implicitCommands.hasOwnProperty(name)}isExpandable(name){var macro=this.macros.get(name);return macro!=null?typeof macro=="string"||typeof macro=="function"||!macro.unexpandable:functions.hasOwnProperty(name)&&!functions[name].primitive}}var unicodeSubRegEx=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/, uSubsAndSups=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4", "⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"\ ϕ","ᵡ":"χ","ᶿ":"θ"}),unicodeAccents={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},unicodeSymbols={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ", ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"\ í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś", ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"\ Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"\ Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ", Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"\ ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Parser{constructor(input,settings){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new MacroExpander( input,settings,this.mode),this.settings=settings,this.leftrightDepth=0}expect(text2,consume){if(consume===void 0&&(consume=!0),this.fetch().text!==text2)throw new ParseError2("Expected '"+text2+"', got '"+this.fetch().text+"'",this.fetch());consume&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(newMode){this.mode=newMode,this.gullet.switchMode(newMode)}parse(){this.settings.globalGroup||this. gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var parse2=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),parse2}finally{this.gullet.endGroups()}}subparse(tokens){var oldToken=this.nextToken;this.consume(),this.gullet.pushToken(new Token("}")),this.gullet.pushTokens(tokens);var parse2=this.parseExpression(!1);return this.expect("}"),this.nextToken=oldToken,parse2}parseExpression(breakOnInfix,breakOnTokenText){ for(var body2=[];;){this.mode==="math"&&this.consumeSpaces();var lex=this.fetch();if(Parser.endOfExpression.indexOf(lex.text)!==-1||breakOnTokenText&&lex.text===breakOnTokenText||breakOnInfix&&functions[lex.text]&&functions[lex.text].infix)break;var atom=this.parseAtom(breakOnTokenText);if(atom){if(atom.type==="internal")continue}else break;body2.push(atom)}return this.mode==="text"&&this.formLigatures(body2),this.handleInfixNodes(body2)}handleInfixNodes(body2){for(var overIndex=-1,funcName,i=0;i< body2.length;i++)if(body2[i].type==="infix"){if(overIndex!==-1)throw new ParseError2("only one infix operator per group",body2[i].token);overIndex=i,funcName=body2[i].replaceWith}if(overIndex!==-1&&funcName){var numerNode,denomNode,numerBody=body2.slice(0,overIndex),denomBody=body2.slice(overIndex+1);numerBody.length===1&&numerBody[0].type==="ordgroup"?numerNode=numerBody[0]:numerNode={type:"ordgroup",mode:this.mode,body:numerBody},denomBody.length===1&&denomBody[0].type==="ordgroup"?denomNode=denomBody[0]: denomNode={type:"ordgroup",mode:this.mode,body:denomBody};var node2;return funcName==="\\\\abovefrac"?node2=this.callFunction(funcName,[numerNode,body2[overIndex],denomNode],[]):node2=this.callFunction(funcName,[numerNode,denomNode],[]),[node2]}else return body2}handleSupSubscript(name){var symbolToken=this.fetch(),symbol=symbolToken.text;this.consume(),this.consumeSpaces();var group;do{var _group;group=this.parseGroup(name)}while(((_group=group)==null?void 0:_group.type)==="internal");if(!group) throw new ParseError2("Expected group after '"+symbol+"'",symbolToken);return group}formatUnsupportedCmd(text2){for(var textordArray=[],i=0;i=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+text2[0]+'" used in math mode',nucleus);var group=symbols[this.mode][text2].group,loc=SourceLocation.range(nucleus),s2;if(ATOMS.hasOwnProperty(group)){var family=group;s2={type:"atom",mode:this.mode,family,loc,text:text2}}else s2={type:group, mode:this.mode,loc,text:text2};symbol=s2}else if(text2.charCodeAt(0)>=128)this.settings.strict&&(supportedCodepoint(text2.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+text2[0]+'" used in math mode',nucleus):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+text2[0]+'"'+(" ("+text2.charCodeAt(0)+")"),nucleus)),symbol={type:"textord",mode:"text",loc:SourceLocation.range(nucleus),text:text2};else return null; if(this.consume(),match)for(var i=0;icount&&(count=value):value&&(count!==void 0&&count>-1&&result.push(` `.repeat(count)||" "),count=-1,result.push(value))}return result.join("")}function renderedTextCollection(node2,parent,info2){return node2.type==="element"?collectElement(node2,parent,info2):node2.type==="text"?info2.whitespace==="normal"?collectText(node2,info2):collectPreText(node2):[]}function collectElement(node2,parent,info2){const whitespace2=inferWhitespace(node2,info2),children=node2.children||[];let index2=-1,items2=[];if(notRendered(node2))return items2;let prefix,suffix;for(br(node2)|| row(node2)&&findAfter(parent,node2,row)?suffix=` `:p$1(node2)?(prefix=2,suffix=2):blockOrCaption(node2)&&(prefix=1,suffix=1);++index2|$)",illegal:BAD_CHARS,contains:[{beginKeywords:"loop for declare others",endsParent:!0},{className:"keyword",beginKeywords:"not null constant access function procedure in out aliased exception"},{className:"type",begin:ID_REGEX,endsParent:!0,relevance:0}]};return{name:"Ada",case_insensitive:!0,keywords:{keyword:["abort","else","new","return","abs","elsif","not","reverse","abstract","end","accept","entry","select","access","exce\ ption","of","separate","aliased","exit","or","some","all","others","subtype","and","for","out","synchronized","array","function","overriding","at","tagged","generic","package","task","begin","goto","pragma","terminate","body","private","then","if","procedure","type","case","in","protected","constant","interface","is","raise","use","declare","range","delay","limited","record","when","delta","loop","rem","while","digits","renames","with","do","mod","requeue","xor"],literal:["True","False"]},contains:[ COMMENTS,{className:"string",begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{className:"string",begin:/'.'/},{className:"number",begin:NUMBER_RE,relevance:0},{className:"symbol",begin:"'"+ID_REGEX},{className:"title",begin:"(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?",end:"(is|$)",keywords:"package body",excludeBegin:!0,excludeEnd:!0,illegal:BAD_CHARS},{begin:"(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+",end:"(\\bis|\\bwith|\\brenames|\\)\\s*;)",keywords:"overr\ iding function procedure with is renames return",returnBegin:!0,contains:[COMMENTS,{className:"title",begin:"(\\bwith\\s+)?\\b(function|procedure)\\s+",end:"(\\(|\\s+|$)",excludeBegin:!0,excludeEnd:!0,illegal:BAD_CHARS},VAR_DECLS,{className:"type",begin:"\\breturn\\s+",end:"(\\s+|;|$)",keywords:"return",excludeBegin:!0,excludeEnd:!0,endsParent:!0,illegal:BAD_CHARS}]},{className:"type",begin:"\\b(sub)?type\\s+",end:"\\s+",keywords:"type",excludeBegin:!0,illegal:BAD_CHARS},VAR_DECLS]}}function angelscript(hljs){ const builtInTypeMode={className:"built_in",begin:"\\b(void|bool|int8|int16|int32|int64|int|uint8|uint16|uint32|uint64|uint|string|ref|array|double|float|auto|dictionary)"},objectHandleMode={className:"symbol",begin:"[a-zA-Z0-9_]+@"},genericMode={className:"keyword",begin:"<",end:">",contains:[builtInTypeMode,objectHandleMode]};return builtInTypeMode.contains=[genericMode],objectHandleMode.contains=[genericMode],{name:"AngelScript",aliases:["asc"],keywords:["for","in|0","break","continue","while", "do|0","return","if","else","case","switch","namespace","is","cast","or","and","xor","not","get|0","in","inout|10","out","override","set|0","private","public","const","default|0","final","shared","external","mixin|10","enum","typedef","funcdef","this","super","import","from","interface","abstract|0","try","catch","protected","explicit","property"],illegal:"(^using\\s+[A-Za-z0-9_\\.]+;$|\\bfunction\\s*[^\\(])",contains:[{className:"string",begin:"'",end:"'",illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE], relevance:0},{className:"string",begin:'"""',end:'"""'},{className:"string",begin:'"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE],relevance:0},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"string",begin:"^\\s*\\[",end:"\\]"},{beginKeywords:"interface namespace",end:/\{/,illegal:"[;.\\-]",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+"}]},{beginKeywords:"class",end:/\{/,illegal:"[;.\\-]",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+",contains:[{begin:"[:,]\\s*", contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+"}]}]}]},builtInTypeMode,objectHandleMode,{className:"literal",begin:"\\b(null|true|false)"},{className:"number",relevance:0,begin:"(-?)(\\b0[xXbBoOdD][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?f?|\\.\\d+f?)([eE][-+]?\\d+f?)?)"}]}}function apache(hljs){const NUMBER_REF={className:"number",begin:/[$%]\d+/},NUMBER={className:"number",begin:/\b\d+/},IP_ADDRESS={className:"number",begin:/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?/},PORT_NUMBER={className:"num\ ber",begin:/:\d{1,5}/};return{name:"Apache config",aliases:["apacheconf"],case_insensitive:!0,contains:[hljs.HASH_COMMENT_MODE,{className:"section",begin:/<\/?/,end:/>/,contains:[IP_ADDRESS,PORT_NUMBER,hljs.inherit(hljs.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute",begin:/\w+/,relevance:0,keywords:{_:["order","deny","allow","setenv","rewriterule","rewriteengine","rewritecond","documentroot","sethandler","errordocument","loadmodule","options","header","listen","serverroot","servername"]}, starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"},contains:[{scope:"punctuation",match:/\\\n/},{className:"meta",begin:/\s\[/,end:/\]$/},{className:"variable",begin:/[\$%]\{/,end:/\}/,contains:["self",NUMBER_REF]},IP_ADDRESS,NUMBER,hljs.QUOTE_STRING_MODE]}}],illegal:/\S/}}function applescript(hljs){const regex=hljs.regex,STRING=hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),PARAMS={className:"params",begin:/\(/,end:/\)/,contains:["self",hljs.C_NUMBER_MODE,STRING]},COMMENT_MODE_1=hljs. COMMENT(/--/,/$/),COMMENT_MODE_2=hljs.COMMENT(/\(\*/,/\*\)/,{contains:["self",COMMENT_MODE_1]}),COMMENTS=[COMMENT_MODE_1,COMMENT_MODE_2,hljs.HASH_COMMENT_MODE],KEYWORD_PATTERNS=[/apart from/,/aside from/,/instead of/,/out of/,/greater than/,/isn't|(doesn't|does not) (equal|come before|come after|contain)/,/(greater|less) than( or equal)?/,/(starts?|ends|begins?) with/,/contained by/,/comes (before|after)/,/a (ref|reference)/,/POSIX (file|path)/,/(date|time) string/,/quoted form/],BUILT_IN_PATTERNS=[ /clipboard info/,/the clipboard/,/info for/,/list (disks|folder)/,/mount volume/,/path to/,/(close|open for) access/,/(get|set) eof/,/current date/,/do shell script/,/get volume settings/,/random number/,/set volume/,/system attribute/,/system info/,/time to GMT/,/(load|run|store) script/,/scripting components/,/ASCII (character|number)/,/localized string/,/choose (application|color|file|file name|folder|from list|remote application|URL)/,/display (alert|dialog)/];return{name:"AppleScript",aliases:[ "osascript"],keywords:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the|0 then third\ through thru timeout times to transaction try until where while whose with without",literal:"AppleScript false linefeed return pi quote result space tab true",built_in:"alias application boolean class constant date file integer list number real record string text activate beep count delay launch log offset read round run say summarize write character characters contents day frontmost id item length month name|0 paragraph paragraphs rest reverse running time version weekday word words year"},contains:[ STRING,hljs.C_NUMBER_MODE,{className:"built_in",begin:regex.concat(/\b/,regex.either(...BUILT_IN_PATTERNS),/\b/)},{className:"built_in",begin:/^\s*return\b/},{className:"literal",begin:/\b(text item delimiters|current application|missing value)\b/},{className:"keyword",begin:regex.concat(/\b/,regex.either(...KEYWORD_PATTERNS),/\b/)},{beginKeywords:"on",illegal:/[${=;\n]/,contains:[hljs.UNDERSCORE_TITLE_MODE,PARAMS]},...COMMENTS],illegal:/\/\/|->|=>|\[\[/}}function arcade(hljs){const regex=hljs.regex, IDENT_RE2="[A-Za-z_][0-9A-Za-z_]*",KEYWORDS2={keyword:["break","case","catch","continue","debugger","do","else","export","for","function","if","import","in","new","of","return","switch","try","var","void","while"],literal:["BackSlash","DoubleQuote","ForwardSlash","Infinity","NaN","NewLine","PI","SingleQuote","Tab","TextFormatting","false","null","true","undefined"],built_in:["Abs","Acos","All","Angle","Any","Area","AreaGeodetic","Array","Asin","Atan","Atan2","Attachments","Average","Back","Beari\ ng","Boolean","Buffer","BufferGeodetic","Ceil","Centroid","ChangeTimeZone","Clip","Concatenate","Console","Constrain","Contains","ConvertDirection","ConvexHull","Cos","Count","Crosses","Cut","Date|0","DateAdd","DateDiff","DateOnly","Day","Decode","DefaultValue","Densify","DensifyGeodetic","Dictionary","Difference","Disjoint","Distance","DistanceGeodetic","DistanceToCoordinate","Distinct","Domain","DomainCode","DomainName","EnvelopeIntersects","Equals","Erase","Exp","Expects","Extent","Feature","\ FeatureInFilter","FeatureSet","FeatureSetByAssociation","FeatureSetById","FeatureSetByName","FeatureSetByPortalItem","FeatureSetByRelationshipClass","FeatureSetByRelationshipName","Filter","FilterBySubtypeCode","Find","First|0","Floor","FromCharCode","FromCodePoint","FromJSON","Front","GdbVersion","Generalize","Geometry","GetEnvironment","GetFeatureSet","GetFeatureSetInfo","GetUser","GroupBy","Guid","HasKey","HasValue","Hash","Hour","IIf","ISOMonth","ISOWeek","ISOWeekday","ISOYear","Includes","I\ ndexOf","Insert","Intersection","Intersects","IsEmpty","IsNan","IsSelfIntersecting","IsSimple","KnowledgeGraphByPortalItem","Left|0","Length","Length3D","LengthGeodetic","Log","Lower","Map","Max","Mean","MeasureToCoordinate","Mid","Millisecond","Min","Minute","Month","MultiPartToSinglePart","Multipoint","NearestCoordinate","NearestVertex","NextSequenceValue","None","Now","Number","Offset","OrderBy","Overlaps","Point","PointToCoordinate","Polygon","Polyline","Pop","Portal","Pow","Proper","Push","\ QueryGraph","Random","Reduce","Relate","Replace","Resize","Reverse","Right|0","RingIsClockwise","Rotate","Round","Schema","Second","SetGeometry","Simplify","Sin","Slice","Sort","Splice","Split","Sqrt","StandardizeFilename","StandardizeGuid","Stdev","SubtypeCode","SubtypeName","Subtypes","Sum","SymmetricDifference","Tan","Text","Time","TimeZone","TimeZoneOffset","Timestamp","ToCharCode","ToCodePoint","ToHex","ToLocal","ToUTC","Today","Top|0","Touches","TrackAccelerationAt","TrackAccelerationWindo\ w","TrackCurrentAcceleration","TrackCurrentDistance","TrackCurrentSpeed","TrackCurrentTime","TrackDistanceAt","TrackDistanceWindow","TrackDuration","TrackFieldWindow","TrackGeometryWindow","TrackIndex","TrackSpeedAt","TrackSpeedWindow","TrackStartTime","TrackWindow","Trim","TypeOf","Union","Upper","UrlEncode","Variance","Week","Weekday","When|0","Within","Year|0"]},PROFILE_VARS=["aggregatedFeatures","analytic","config","datapoint","datastore","editcontext","feature","featureSet","feedfeature","f\ encefeature","fencenotificationtype","graph","join","layer","locationupdate","map","measure","measure","originalFeature","record","reference","rowindex","sourcedatastore","sourcefeature","sourcelayer","target","targetdatastore","targetfeature","targetlayer","userInput","value","variables","view"],SYMBOL={className:"symbol",begin:"\\$"+regex.either(...PROFILE_VARS)},NUMBER={className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:hljs.C_NUMBER_RE}],relevance:0},SUBST={ className:"subst",begin:"\\$\\{",end:"\\}",keywords:KEYWORDS2,contains:[]},TEMPLATE_STRING={className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE,SUBST]};SUBST.contains=[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,TEMPLATE_STRING,NUMBER,hljs.REGEXP_MODE];const PARAMS_CONTAINS=SUBST.contains.concat([hljs.C_BLOCK_COMMENT_MODE,hljs.C_LINE_COMMENT_MODE]);return{name:"ArcGIS Arcade",case_insensitive:!0,keywords:KEYWORDS2,contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,TEMPLATE_STRING, hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,SYMBOL,NUMBER,{begin:/[{,]\s*/,relevance:0,contains:[{begin:IDENT_RE2+"\\s*:",returnBegin:!0,relevance:0,contains:[{className:"attr",begin:IDENT_RE2,relevance:0}]}]},{begin:"("+hljs.RE_STARTERS_RE+"|\\b(return)\\b)\\s*",keywords:"return",contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+IDENT_RE2+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:IDENT_RE2}, {begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS2,contains:PARAMS_CONTAINS}]}]}],relevance:0},{beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[hljs.inherit(hljs.TITLE_MODE,{className:"title.function",begin:IDENT_RE2}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:PARAMS_CONTAINS}],illegal:/\[|%/},{begin:/\$[(.]/}],illegal:/#(?!!)/}}function armasm(hljs){const COMMENT={variants:[hljs.COMMENT("^[ \\t]*(?=#)","$",{relevance:0, excludeBegin:!0}),hljs.COMMENT("[;@]","$",{relevance:0}),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]};return{name:"ARM Assembly",case_insensitive:!0,aliases:["arm"],keywords:{$pattern:"\\.?"+hljs.IDENT_RE,meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .\ ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r\ 12 r13 r14 r15 w0 w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 w15 w16 w17 w18 w19 w20 w21 w22 w23 w24 w25 w26 w27 w28 w29 w30 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25 x26 x27 x28 x29 x30 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x \ cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 {PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSIO\ N} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @"},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|\ ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?(?=\\s)"},COMMENT,hljs.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[ {begin:"[#$=]?0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^[ \\t]*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"[=#]\\w+"}],relevance:0}]}}function asciidoc(hljs){const regex=hljs.regex,HORIZONTAL_RULE={begin:"^'{3,}[ \\t]*$",relevance:10},ESCAPED_FORMATTING=[{begin:/\\[*_`]/},{begin:/\\\\\*{2}[^\n]*?\*{2}/},{begin:/\\\\_{2}[^\n]*_{2}/},{begin:/\\\\`{2}[^\n]*`{2}/},{begin:/[:;}][*_`](?![*_`])/}], STRONG=[{className:"strong",begin:/\*{2}([^\n]+?)\*{2}/},{className:"strong",begin:regex.concat(/\*\*/,/((\*(?!\*)|\\[^\n]|[^*\n\\])+\n)+/,/(\*(?!\*)|\\[^\n]|[^*\n\\])*/,/\*\*/),relevance:0},{className:"strong",begin:/\B\*(\S|\S[^\n]*?\S)\*(?!\w)/},{className:"strong",begin:/\*[^\s]([^\n]+\n)+([^\n]+)\*/}],EMPHASIS=[{className:"emphasis",begin:/_{2}([^\n]+?)_{2}/},{className:"emphasis",begin:regex.concat(/__/,/((_(?!_)|\\[^\n]|[^_\n\\])+\n)+/,/(_(?!_)|\\[^\n]|[^_\n\\])*/,/__/),relevance:0},{className:"\ emphasis",begin:/\b_(\S|\S[^\n]*?\S)_(?!\w)/},{className:"emphasis",begin:/_[^\s]([^\n]+\n)+([^\n]+)_/},{className:"emphasis",begin:"\\B'(?!['\\s])",end:"(\\n{2}|')",contains:[{begin:"\\\\'\\w",relevance:0}],relevance:0}],ADMONITION={className:"symbol",begin:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",relevance:10},BULLET_LIST={className:"bullet",begin:"^(\\*+|-+|\\.+|[^\\n]+?::)\\s+"};return{name:"AsciiDoc",aliases:["adoc"],contains:[hljs.COMMENT("^/{4,}\\n","\\n/{4,}$",{relevance:10}),hljs.COMMENT( "^//","$",{relevance:0}),{className:"title",begin:"^\\.\\w.*$"},{begin:"^[=\\*]{4,}\\n",end:"\\n^[=\\*]{4,}$",relevance:10},{className:"section",relevance:10,variants:[{begin:"^(={1,6})[ ].+?([ ]\\1)?$"},{begin:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$"}]},{className:"meta",begin:"^:.+?:",end:"\\s",excludeEnd:!0,relevance:10},{className:"meta",begin:"^\\[.+?\\]$",relevance:0},{className:"quote",begin:"^_{4,}\\n",end:"\\n_{4,}$",relevance:10},{className:"code",begin:"^[\\-\\.]{4,}\\n",end:"\\n[\\-\\.]\ {4,}$",relevance:10},{begin:"^\\+{4,}\\n",end:"\\n\\+{4,}$",contains:[{begin:"<",end:">",subLanguage:"xml",relevance:0}],relevance:10},BULLET_LIST,ADMONITION,...ESCAPED_FORMATTING,...STRONG,...EMPHASIS,{className:"string",variants:[{begin:"``.+?''"},{begin:"`.+?'"}]},{className:"code",begin:/`{2}/,end:/(\n{2}|`{2})/},{className:"code",begin:"(`.+?`|\\+.+?\\+)",relevance:0},{className:"code",begin:"^[ \\t]",end:"$",relevance:0},HORIZONTAL_RULE,{begin:"(link:)?(http|https|ftp|file|irc|image:?):\\S+\ ?\\[[^[]*?\\]",returnBegin:!0,contains:[{begin:"(link|image:?):",relevance:0},{className:"link",begin:"\\w",end:"[^\\[]+",relevance:0},{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0,relevance:0}],relevance:10}]}}function aspectj(hljs){const regex=hljs.regex,KEYWORDS2=["false","synchronized","int","abstract","float","private","char","boolean","static","null","if","const","for","true","while","long","throw","strictfp","finally","protected","import","native","final","return", "void","enum","else","extends","implements","break","transient","new","catch","instanceof","byte","super","volatile","case","assert","short","package","default","double","public","try","this","switch","continue","throws","privileged","aspectOf","adviceexecution","proceed","cflowbelow","cflow","initialization","preinitialization","staticinitialization","withincode","target","within","execution","getWithinTypeName","handler","thisJoinPoint","thisJoinPointStaticPart","thisEnclosingJoinPointStaticPa\ rt","declare","parents","warning","error","soft","precedence","thisAspectInstance"],SHORTKEYS=["get","set","args","call"];return{name:"AspectJ",keywords:KEYWORDS2,illegal:/<\/|#/,contains:[hljs.COMMENT(/\/\*\*/,/\*\//,{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:/@[A-Za-z]+/}]}),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{className:"class",beginKeywords:"aspect",end:/[{;=]/,excludeEnd:!0,illegal:/[:;"\[\]]/,contains:[ {beginKeywords:"extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton"},hljs.UNDERSCORE_TITLE_MODE,{begin:/\([^\)]*/,end:/[)]+/,keywords:KEYWORDS2.concat(SHORTKEYS),excludeEnd:!1}]},{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,relevance:0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},hljs.UNDERSCORE_TITLE_MODE]},{beginKeywords:"pointcut after before around throwing returning",end:/[)]/, excludeEnd:!1,illegal:/["\[\]]/,contains:[{begin:regex.concat(hljs.UNDERSCORE_IDENT_RE,/\s*\(/),returnBegin:!0,contains:[hljs.UNDERSCORE_TITLE_MODE]}]},{begin:/[:]/,returnBegin:!0,end:/[{;]/,relevance:0,excludeEnd:!1,keywords:KEYWORDS2,illegal:/["\[\]]/,contains:[{begin:regex.concat(hljs.UNDERSCORE_IDENT_RE,/\s*\(/),keywords:KEYWORDS2.concat(SHORTKEYS),relevance:0},hljs.QUOTE_STRING_MODE]},{beginKeywords:"new throw",relevance:0},{className:"function",begin:/\w+ +\w+(\.\w+)?\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/, returnBegin:!0,end:/[{;=]/,keywords:KEYWORDS2,excludeEnd:!0,contains:[{begin:regex.concat(hljs.UNDERSCORE_IDENT_RE,/\s*\(/),returnBegin:!0,relevance:0,contains:[hljs.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,relevance:0,keywords:KEYWORDS2,contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},hljs.C_NUMBER_MODE,{className:"meta",begin:/@[A-Za-z]+/}]}}function autohotkey(hljs){ const BACKTICK_ESCAPE={begin:"`[\\s\\S]"};return{name:"AutoHotkey",case_insensitive:!0,aliases:["ahk"],keywords:{keyword:"Break Continue Critical Exit ExitApp Gosub Goto New OnExit Pause return SetBatchLines SetTimer Suspend Thread Throw Until ahk_id ahk_class ahk_pid ahk_exe ahk_group",literal:"true false NOT AND OR",built_in:"ComSpec Clipboard ClipboardAll ErrorLevel"},contains:[BACKTICK_ESCAPE,hljs.inherit(hljs.QUOTE_STRING_MODE,{contains:[BACKTICK_ESCAPE]}),hljs.COMMENT(";","$",{relevance:0}), hljs.C_BLOCK_COMMENT_MODE,{className:"number",begin:hljs.NUMBER_RE,relevance:0},{className:"variable",begin:"%[a-zA-Z0-9#_$@]+%"},{className:"built_in",begin:"^\\s*\\w+\\s*(,|%)"},{className:"title",variants:[{begin:'^[^\\n";]+::(?!=)'},{begin:'^[^\\n";]+:(?!=)',relevance:0}]},{className:"meta",begin:"^\\s*#\\w+",end:"$",relevance:0},{className:"built_in",begin:"A_[a-zA-Z0-9]+"},{begin:",\\s*,"}]}}function autoit(hljs){const KEYWORDS2="ByRef Case Const ContinueCase ContinueLoop Dim Do Else ElseI\ f EndFunc EndIf EndSelect EndSwitch EndWith Enum Exit ExitLoop For Func Global If In Local Next ReDim Return Select Static Step Switch Then To Until Volatile WEnd While With",DIRECTIVES=["EndRegion","forcedef","forceref","ignorefunc","include","include-once","NoTrayIcon","OnAutoItStartRegister","pragma","Region","RequireAdmin","Tidy_Off","Tidy_On","Tidy_Parameters"],LITERAL="True False And Null Not Or Default",BUILT_IN="Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOp\ tion AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSi\ ze DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists \ FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateC\ ombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCre\ ateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUI\ SetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseCl\ ickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtend\ ed ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace \ StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown, UDPShutdown TCPStartup, UDPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent TrayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent Tray\ SetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait WinWaitActive WinWaitClose WinWaitNotActive",COMMENT={variants:[hljs.COMMENT(";","$", {relevance:0}),hljs.COMMENT("#cs","#ce"),hljs.COMMENT("#comments-start","#comments-end")]},VARIABLE={begin:"\\$[A-z0-9_]+"},STRING={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},NUMBER={variants:[hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE]},PREPROCESSOR={className:"meta",begin:"#",end:"$",keywords:{keyword:DIRECTIVES},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",keywords:{keyword:"in\ clude"},end:"$",contains:[STRING,{className:"string",variants:[{begin:"<",end:">"},{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]}]},STRING,COMMENT]},CONSTANT={className:"symbol",begin:"@[A-z0-9_]+"},FUNCTION={beginKeywords:"Func",end:"$",illegal:"\\$|\\[|%",contains:[hljs.inherit(hljs.UNDERSCORE_TITLE_MODE,{className:"title.function"}),{className:"params",begin:"\\(",end:"\\)",contains:[VARIABLE,STRING,NUMBER]}]};return{name:"Aut\ oIt",case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:KEYWORDS2,built_in:BUILT_IN,literal:LITERAL},contains:[COMMENT,VARIABLE,STRING,NUMBER,PREPROCESSOR,CONSTANT,FUNCTION]}}function avrasm(hljs){return{name:"AVR Assembly",case_insensitive:!0,keywords:{$pattern:"\\.?"+hljs.IDENT_RE,keyword:"adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp\ cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub subi swap tst wdr",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l \ ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc d\ drc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf",meta:".byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list .listmac .macro .nolist .org .set"},contains:[hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT(";","$",{relevance:0}),hljs.C_NUMBER_MODE,hljs.BINARY_NUMBER_MODE,{className:"number",begin:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},hljs.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",illegal:"[^\\\\][^']"}, {className:"symbol",begin:"^[A-Za-z0-9_.$]+:"},{className:"meta",begin:"#",end:"$"},{className:"subst",begin:"@[0-9]+"}]}}function awk(hljs){const VARIABLE={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},KEYWORDS2="BEGIN END if else while do for in break continue delete next nextfile function func exit|10",STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,relevance:10}, {begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]};return{name:"Awk",keywords:{keyword:KEYWORDS2},contains:[VARIABLE,STRING,hljs.REGEXP_MODE,hljs.HASH_COMMENT_MODE,hljs.NUMBER_MODE]}}function axapta(hljs){const IDENT_RE2=hljs.UNDERSCORE_IDENT_RE,KEYWORDS2={keyword:["abstract","as","asc","avg","break","breakpoint","by","byref","case","catch","changecompany","class","cl\ ient","client","common","const","continue","count","crosscompany","delegate","delete_from","desc","display","div","do","edit","else","eventhandler","exists","extends","final","finally","firstfast","firstonly","firstonly1","firstonly10","firstonly100","firstonly1000","flush","for","forceliterals","forcenestedloop","forceplaceholders","forceselectorder","forupdate","from","generateonly","group","hint","if","implements","in","index","insert_recordset","interface","internal","is","join","like","maxo\ f","minof","mod","namespace","new","next","nofetch","notexists","optimisticlock","order","outer","pessimisticlock","print","private","protected","public","readonly","repeatableread","retry","return","reverse","select","server","setting","static","sum","super","switch","this","throw","try","ttsabort","ttsbegin","ttscommit","unchecked","update_recordset","using","validtimestate","void","where","while"],built_in:["anytype","boolean","byte","char","container","date","double","enum","guid","int","int\ 64","long","real","short","str","utcdatetime","var"],literal:["default","false","null","true"]},CLASS_DEFINITION={variants:[{match:[/(class|interface)\s+/,IDENT_RE2,/\s+(extends|implements)\s+/,IDENT_RE2]},{match:[/class\s+/,IDENT_RE2]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:KEYWORDS2};return{name:"X++",aliases:["x++"],keywords:KEYWORDS2,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,{className:"me\ ta",begin:"#",end:"$"},CLASS_DEFINITION]}}function basic(hljs){return{name:"BASIC",case_insensitive:!0,illegal:"^.",keywords:{$pattern:"[a-zA-Z][a-zA-Z0-9_$%!#]*",keyword:["ABS","ASC","AND","ATN","AUTO|0","BEEP","BLOAD|10","BSAVE|10","CALL","CALLS","CDBL","CHAIN","CHDIR","CHR$|10","CINT","CIRCLE","CLEAR","CLOSE","CLS","COLOR","COM","COMMON","CONT","COS","CSNG","CSRLIN","CVD","CVI","CVS","DATA","DATE$","DEFDBL","DEFINT","DEFSNG","DEFSTR","DEF|0","SEG","USR","DELETE","DIM","DRAW","EDIT","END","ENV\ IRON","ENVIRON$","EOF","EQV","ERASE","ERDEV","ERDEV$","ERL","ERR","ERROR","EXP","FIELD","FILES","FIX","FOR|0","FRE","GET","GOSUB|10","GOTO","HEX$","IF","THEN","ELSE|0","INKEY$","INP","INPUT","INPUT#","INPUT$","INSTR","IMP","INT","IOCTL","IOCTL$","KEY","ON","OFF","LIST","KILL","LEFT$","LEN","LET","LINE","LLIST","LOAD","LOC","LOCATE","LOF","LOG","LPRINT","USING","LSET","MERGE","MID$","MKDIR","MKD$","MKI$","MKS$","MOD","NAME","NEW","NEXT","NOISE","NOT","OCT$","ON","OR","PEN","PLAY","STRIG","OPEN","\ OPTION","BASE","OUT","PAINT","PALETTE","PCOPY","PEEK","PMAP","POINT","POKE","POS","PRINT","PRINT]","PSET","PRESET","PUT","RANDOMIZE","READ","REM","RENUM","RESET|0","RESTORE","RESUME","RETURN|0","RIGHT$","RMDIR","RND","RSET","RUN","SAVE","SCREEN","SGN","SHELL","SIN","SOUND","SPACE$","SPC","SQR","STEP","STICK","STOP","STR$","STRING$","SWAP","SYSTEM","TAB","TAN","TIME$","TIMER","TROFF","TRON","TO","USR","VAL","VARPTR","VARPTR$","VIEW","WAIT","WHILE","WEND","WIDTH","WINDOW","WRITE","XOR"]},contains:[ {scope:"string",begin:/"/,end:/"|$/,contains:[hljs.BACKSLASH_ESCAPE]},hljs.COMMENT("REM","$",{relevance:10}),hljs.COMMENT("'","$",{relevance:0}),{className:"symbol",begin:"^[0-9]+ ",relevance:10},{className:"number",begin:"\\b\\d+(\\.\\d+)?([edED]\\d+)?[#!]?",relevance:0},{className:"number",begin:"(&[hH][0-9a-fA-F]{1,4})"},{className:"number",begin:"(&[oO][0-7]{1,6})"}]}}function bnf(hljs){return{name:"Backus–Naur Form",contains:[{className:"attribute",begin://},{begin:/::=/,end:/$/, contains:[{begin://},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]}]}}function brainfuck(hljs){const LITERAL={className:"literal",begin:/[+-]+/,relevance:0};return{name:"Brainfuck",aliases:["bf"],contains:[hljs.COMMENT(/[^\[\]\.,\+\-<> \r\n]/,/[\[\]\.,\+\-<> \r\n]/,{contains:[{match:/[ ]+[^\[\]\.,\+\-<> \r\n]/,relevance:0}],returnEnd:!0,relevance:0}),{className:"title",begin:"[\\[\\]]",relevance:0},{className:"string",begin:"[\\.,]",relevance:0}, {begin:/(?=\+\+|--)/,contains:[LITERAL]},LITERAL]}}function cal(hljs){const regex=hljs.regex,KEYWORDS2=["div","mod","in","and","or","not","xor","asserterror","begin","case","do","downto","else","end","exit","for","local","if","of","repeat","then","to","until","while","with","var"],LITERALS2="false true",COMMENT_MODES=[hljs.C_LINE_COMMENT_MODE,hljs.COMMENT(/\{/,/\}/,{relevance:0}),hljs.COMMENT(/\(\*/,/\*\)/,{relevance:10})],STRING={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},CHAR_STRING={ className:"string",begin:/(#\d+)+/},DATE2={className:"number",begin:"\\b\\d+(\\.\\d+)?(DT|D|T)",relevance:0},DBL_QUOTED_VARIABLE={className:"string",begin:'"',end:'"'},PROCEDURE={match:[/procedure/,/\s+/,/[a-zA-Z_][\w@]*/,/\s*/],scope:{1:"keyword",3:"title.function"},contains:[{className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:[STRING,CHAR_STRING,hljs.NUMBER_MODE]},...COMMENT_MODES]},OBJECT_TYPES=["Table","Form","Report","Dataport","Codeunit","XMLport","MenuSuite","Page","Query"], OBJECT2={match:[/OBJECT/,/\s+/,regex.either(...OBJECT_TYPES),/\s+/,/\d+/,/\s+(?=[^\s])/,/.*/,/$/],relevance:3,scope:{1:"keyword",3:"type",5:"number",7:"title"}};return{name:"C/AL",case_insensitive:!0,keywords:{keyword:KEYWORDS2,literal:LITERALS2},illegal:/\/\*/,contains:[{match:/[\w]+(?=\=)/,scope:"attribute",relevance:0},STRING,CHAR_STRING,DATE2,DBL_QUOTED_VARIABLE,hljs.NUMBER_MODE,OBJECT2,PROCEDURE]}}function capnproto(hljs){const KEYWORDS2=["struct","enum","interface","union","group","import", "using","const","annotation","extends","in","of","on","as","with","from","fixed"],TYPES2=["Void","Bool","Int8","Int16","Int32","Int64","UInt8","UInt16","UInt32","UInt64","Float32","Float64","Text","Data","AnyPointer","AnyStruct","Capability","List"],LITERALS2=["true","false"],CLASS_DEFINITION={variants:[{match:[/(struct|enum|interface)/,/\s+/,hljs.IDENT_RE]},{match:[/extends/,/\s*\(/,hljs.IDENT_RE,/\s*\)/]}],scope:{1:"keyword",3:"title.class"}};return{name:"Cap’n Proto",aliases:["capnp"],keywords:{ keyword:KEYWORDS2,type:TYPES2,literal:LITERALS2},contains:[hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE,hljs.HASH_COMMENT_MODE,{className:"meta",begin:/@0x[\w\d]{16};/,illegal:/\n/},{className:"symbol",begin:/@\d+\b/},CLASS_DEFINITION]}}function ceylon(hljs){const KEYWORDS2=["assembly","module","package","import","alias","class","interface","object","given","value","assign","void","function","new","of","extends","satisfies","abstracts","in","out","return","break","continue","throw","assert","dynamic", "if","else","switch","case","for","while","try","catch","finally","then","let","this","outer","super","is","exists","nonempty"],DECLARATION_MODIFIERS=["shared","abstract","formal","default","actual","variable","late","native","deprecated","final","sealed","annotation","suppressWarnings","small"],DOCUMENTATION=["doc","by","license","see","throws","tagged"],SUBST={className:"subst",excludeBegin:!0,excludeEnd:!0,begin:/``/,end:/``/,keywords:KEYWORDS2,relevance:10},EXPRESSIONS=[{className:"string",begin:'\ """',end:'"""',relevance:10},{className:"string",begin:'"',end:'"',contains:[SUBST]},{className:"string",begin:"'",end:"'"},{className:"number",begin:"#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]?\\d+)?)?[kMGTPmunpf]?",relevance:0}];return SUBST.contains=EXPRESSIONS,{name:"Ceylon",keywords:{keyword:KEYWORDS2.concat(DECLARATION_MODIFIERS),meta:DOCUMENTATION},illegal:"\\$[^01]|#[^0-9a-fA-F]",contains:[hljs.C_LINE_COMMENT_MODE,hljs.COMMENT("/\\*","\\*/",{contains:["self"]}),{className:"m\ eta",begin:'@[a-z]\\w*(?::"[^"]*")?'}].concat(EXPRESSIONS)}}function clean(hljs){return{name:"Clean",aliases:["icl","dcl"],keywords:{keyword:["if","let","in","with","where","case","of","class","instance","otherwise","implementation","definition","system","module","from","import","qualified","as","special","code","inline","foreign","export","ccall","stdcall","generic","derive","infix","infixl","infixr"],built_in:"Int Real Char Bool",literal:"True False"},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE, hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,{begin:"->|<-[|:]?|#!?|>>=|\\{\\||\\|\\}|:==|=:|<>"}]}}function clojure(hljs){const SYMBOLSTART="a-zA-Z_\\-!.?+*=<>&'",SYMBOL_RE="[#]?["+SYMBOLSTART+"]["+SYMBOLSTART+"0-9/;:$#]*",globals="def defonce defprotocol defstruct defmulti defmethod defn- defn defmacro deftype defrecord",keywords2={$pattern:SYMBOL_RE,built_in:globals+" cond apply if-not if-let if not not= =|0 <|0 >|0 <=|0 >=|0 ==|0 +|0 /|0 *|0 -|0 rem quot neg? pos? delay? s\ ymbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merg\ e zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity ass\ ert peek pop doto proxy first rest cons cast coll last butlast sigs reify second ffirst fnext nfirst nnext meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-fi\ nd re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union differ\ ence intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},SYMBOL={begin:SYMBOL_RE,relevance:0},NUMBER={scope:"number",relevance:0, variants:[{match:/[-+]?0[xX][0-9a-fA-F]+N?/},{match:/[-+]?0[0-7]+N?/},{match:/[-+]?[1-9][0-9]?[rR][0-9a-zA-Z]+N?/},{match:/[-+]?[0-9]+\/[0-9]+N?/},{match:/[-+]?[0-9]+((\.[0-9]*([eE][+-]?[0-9]+)?M?)|([eE][+-]?[0-9]+M?|M))/},{match:/[-+]?([1-9][0-9]*|0)N?/}]},CHARACTER={scope:"character",variants:[{match:/\\o[0-3]?[0-7]{1,2}/},{match:/\\u[0-9a-fA-F]{4}/},{match:/\\(newline|space|tab|formfeed|backspace|return)/},{match:/\\\S/,relevance:0}]},REGEX={scope:"regex",begin:/#"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE]}, STRING=hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),COMMA={scope:"punctuation",match:/,/,relevance:0},COMMENT=hljs.COMMENT(";","$",{relevance:0}),LITERAL={className:"literal",begin:/\b(true|false|nil)\b/},COLLECTION={begin:"\\[|(#::?"+SYMBOL_RE+")?\\{",end:"[\\]\\}]",relevance:0},KEY={className:"symbol",begin:"[:]{1,2}"+SYMBOL_RE},LIST={begin:"\\(",end:"\\)"},BODY={endsWithParent:!0,relevance:0},NAME={keywords:keywords2,className:"name",begin:SYMBOL_RE,relevance:0,starts:BODY},DEFAULT_CONTAINS=[ COMMA,LIST,CHARACTER,REGEX,STRING,COMMENT,KEY,COLLECTION,NUMBER,LITERAL,SYMBOL],GLOBAL={beginKeywords:globals,keywords:{$pattern:SYMBOL_RE,keyword:globals},end:'(\\[|#|\\d|"|:|\\{|\\)|\\(|$)',contains:[{className:"title",begin:SYMBOL_RE,relevance:0,excludeEnd:!0,endsParent:!0}].concat(DEFAULT_CONTAINS)};return LIST.contains=[GLOBAL,NAME,BODY],BODY.contains=DEFAULT_CONTAINS,COLLECTION.contains=DEFAULT_CONTAINS,{name:"Clojure",aliases:["clj","edn"],illegal:/\S/,contains:[COMMA,LIST,CHARACTER,REGEX, STRING,COMMENT,KEY,COLLECTION,NUMBER,LITERAL]}}function clojureRepl(hljs){return{name:"Clojure REPL",contains:[{className:"meta.prompt",begin:/^([\w.-]+|\s*#_)?=>/,starts:{end:/$/,subLanguage:"clojure"}}]}}function cmake(hljs){return{name:"CMake",aliases:["cmake.in"],case_insensitive:!0,keywords:{keyword:"break cmake_host_system_information cmake_minimum_required cmake_parse_arguments cmake_policy configure_file continue elseif else endforeach endfunction endif endmacro endwhile execute_process \ file find_file find_library find_package find_path find_program foreach function get_cmake_property get_directory_property get_filename_component get_property if include include_guard list macro mark_as_advanced math message option return separate_arguments set_directory_properties set_property set site_name string unset variable_watch while add_compile_definitions add_compile_options add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_link_option\ s add_subdirectory add_test aux_source_directory build_command create_test_sourcelist define_property enable_language enable_testing export fltk_wrap_ui get_source_file_property get_target_property get_test_property include_directories include_external_msproject include_regular_expression install link_directories link_libraries load_cache project qt_wrap_cpp qt_wrap_ui remove_definitions set_source_files_properties set_target_properties set_tests_properties source_group target_compile_definition\ s target_compile_features target_compile_options target_include_directories target_link_directories target_link_libraries target_link_options target_sources try_compile try_run ctest_build ctest_configure ctest_coverage ctest_empty_binary_directory ctest_memcheck ctest_read_custom_files ctest_run_script ctest_sleep ctest_start ctest_submit ctest_test ctest_update ctest_upload build_name exec_program export_library_dependencies install_files install_programs install_targets load_command make_dire\ ctory output_required_files remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or not command policy target test exists is_newer_than is_directory is_symlink is_absolute matches less greater equal less_equal greater_equal strless strgreater strequal strless_equal strgreater_equal version_less version_greater version_equal version_less_equal version_greater_equal in_list defined"},contains:[ {className:"variable",begin:/\$\{/,end:/\}/},hljs.COMMENT(/#\[\[/,/]]/),hljs.HASH_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE]}}const KEYWORDS$3=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],LITERALS$3=["true","false","null","\ undefined","NaN","Infinity"],TYPES$3=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ERROR_TYPES$3=[ "Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],BUILT_IN_GLOBALS$3=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],BUILT_INS$3=[].concat(BUILT_IN_GLOBALS$3,TYPES$3,ERROR_TYPES$3);function coffeescript(hljs){const COFFEE_BUILT_INS=["npm","print"],COFFEE_LITERALS=["yes","no","o\ n","off"],COFFEE_KEYWORDS=["then","unless","until","loop","by","when","and","or","is","isnt","not"],NOT_VALID_KEYWORDS=["var","const","let","function","static"],excluding=list2=>kw=>!list2.includes(kw),KEYWORDS$12={keyword:KEYWORDS$3.concat(COFFEE_KEYWORDS).filter(excluding(NOT_VALID_KEYWORDS)),literal:LITERALS$3.concat(COFFEE_LITERALS),built_in:BUILT_INS$3.concat(COFFEE_BUILT_INS)},JS_IDENT_RE="[A-Za-z$_][0-9A-Za-z$_]*",SUBST={className:"subst",begin:/#\{/,end:/\}/,keywords:KEYWORDS$12},EXPRESSIONS=[ hljs.BINARY_NUMBER_MODE,hljs.inherit(hljs.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[hljs.BACKSLASH_ESCAPE,SUBST]},{begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,SUBST]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[SUBST,hljs.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)",relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]}, {begin:"@"+JS_IDENT_RE},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{begin:"```",end:"```"},{begin:"`",end:"`"}]}];SUBST.contains=EXPRESSIONS;const TITLE=hljs.inherit(hljs.TITLE_MODE,{begin:JS_IDENT_RE}),POSSIBLE_PARAMS_RE="(\\(.*\\)\\s*)?\\B[-=]>",PARAMS={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:KEYWORDS$12,contains:["self"].concat(EXPRESSIONS)}]},CLASS_DEFINITION={variants:[{match:[/class\s+/,JS_IDENT_RE,/\s+extends\s+/,JS_IDENT_RE]}, {match:[/class\s+/,JS_IDENT_RE]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:KEYWORDS$12};return{name:"CoffeeScript",aliases:["coffee","cson","iced"],keywords:KEYWORDS$12,illegal:/\/\*/,contains:[...EXPRESSIONS,hljs.COMMENT("###","###"),hljs.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+JS_IDENT_RE+"\\s*=\\s*"+POSSIBLE_PARAMS_RE,end:"[-=]>",returnBegin:!0,contains:[TITLE,PARAMS]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:POSSIBLE_PARAMS_RE,end:"\ [-=]>",returnBegin:!0,contains:[PARAMS]}]},CLASS_DEFINITION,{begin:JS_IDENT_RE+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}]}}function coq(hljs){return{name:"Coq",keywords:{keyword:["_|0","as","at","cofix","else","end","exists","exists2","fix","for","forall","fun","if","IF","in","let","match","mod","Prop","return","Set","then","Type","using","where","with","Abort","About","Add","Admit","Admitted","All","Arguments","Assumptions","Axiom","Back","BackTo","Backtrack","Bind","Blacklist","Cano\ nical","Cd","Check","Class","Classes","Close","Coercion","Coercions","CoFixpoint","CoInductive","Collection","Combined","Compute","Conjecture","Conjectures","Constant","constr","Constraint","Constructors","Context","Corollary","CreateHintDb","Cut","Declare","Defined","Definition","Delimit","Dependencies","Dependent","Derive","Drop","eauto","End","Equality","Eval","Example","Existential","Existentials","Existing","Export","exporting","Extern","Extract","Extraction","Fact","Field","Fields","File", "Fixpoint","Focus","for","From","Function","Functional","Generalizable","Global","Goal","Grab","Grammar","Graph","Guarded","Heap","Hint","HintDb","Hints","Hypotheses","Hypothesis","ident","Identity","If","Immediate","Implicit","Import","Include","Inductive","Infix","Info","Initial","Inline","Inspect","Instance","Instances","Intro","Intros","Inversion","Inversion_clear","Language","Left","Lemma","Let","Libraries","Library","Load","LoadPath","Local","Locate","Ltac","ML","Mode","Module","Modules","\ Monomorphic","Morphism","Next","NoInline","Notation","Obligation","Obligations","Opaque","Open","Optimize","Options","Parameter","Parameters","Parametric","Path","Paths","pattern","Polymorphic","Preterm","Print","Printing","Program","Projections","Proof","Proposition","Pwd","Qed","Quit","Rec","Record","Recursive","Redirect","Relation","Remark","Remove","Require","Reserved","Reset","Resolve","Restart","Rewrite","Right","Ring","Rings","Save","Scheme","Scope","Scopes","Script","Search","SearchAbout", "SearchHead","SearchPattern","SearchRewrite","Section","Separate","Set","Setoid","Show","Solve","Sorted","Step","Strategies","Strategy","Structure","SubClass","Table","Tables","Tactic","Term","Test","Theorem","Time","Timeout","Transparent","Type","Typeclasses","Types","Undelimit","Undo","Unfocus","Unfocused","Unfold","Universe","Universes","Unset","Unshelve","using","Variable","Variables","Variant","Verbose","Visibility","where","with"],built_in:["abstract","absurd","admit","after","apply","as", "assert","assumption","at","auto","autorewrite","autounfold","before","bottom","btauto","by","case","case_eq","cbn","cbv","change","classical_left","classical_right","clear","clearbody","cofix","compare","compute","congruence","constr_eq","constructor","contradict","contradiction","cut","cutrewrite","cycle","decide","decompose","dependent","destruct","destruction","dintuition","discriminate","discrR","do","double","dtauto","eapply","eassumption","eauto","ecase","econstructor","edestruct","ediscr\ iminate","eelim","eexact","eexists","einduction","einjection","eleft","elim","elimtype","enough","equality","erewrite","eright","esimplify_eq","esplit","evar","exact","exactly_once","exfalso","exists","f_equal","fail","field","field_simplify","field_simplify_eq","first","firstorder","fix","fold","fourier","functional","generalize","generalizing","gfail","give_up","has_evar","hnf","idtac","in","induction","injection","instantiate","intro","intro_pattern","intros","intuition","inversion","inversio\ n_clear","is_evar","is_var","lapply","lazy","left","lia","lra","move","native_compute","nia","nsatz","omega","once","pattern","pose","progress","proof","psatz","quote","record","red","refine","reflexivity","remember","rename","repeat","replace","revert","revgoals","rewrite","rewrite_strat","right","ring","ring_simplify","rtauto","set","setoid_reflexivity","setoid_replace","setoid_rewrite","setoid_symmetry","setoid_transitivity","shelve","shelve_unifiable","simpl","simple","simplify_eq","solve","\ specialize","split","split_Rabs","split_Rmult","stepl","stepr","subst","sum","swap","symmetry","tactic","tauto","time","timeout","top","transitivity","trivial","try","tryif","unfold","unify","until","using","vm_compute","with"]},contains:[hljs.QUOTE_STRING_MODE,hljs.COMMENT("\\(\\*","\\*\\)"),hljs.C_NUMBER_MODE,{className:"type",excludeBegin:!0,begin:"\\|\\s*",end:"\\w+"},{begin:/[-=]>/}]}}function cos(hljs){return{name:"Caché Object Script",case_insensitive:!0,aliases:["cls"],keywords:"propert\ y parameter class classmethod clientmethod extends as break catch close continue do d|0 else elseif for goto halt hang h|0 if job j|0 kill k|0 lock l|0 merge new open quit q|0 read r|0 return set s|0 tcommit throw trollback try tstart use view while write w|0 xecute x|0 zkill znspace zn ztrap zwrite zw zzdump zzwrite print zbreak zinsert zload zprint zremove zsave zzprint mv mvcall mvcrt mvdim mvprint zquit zsync ascii",contains:[{className:"number",begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)",relevance:0}, {className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]}]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"comment",begin:/;/,end:"$",relevance:0},{className:"built_in",begin:/(?:\$\$?|\.\.)\^?[a-zA-Z]+/},{className:"built_in",begin:/\$\$\$[a-zA-Z]+/},{className:"built_in",begin:/%[a-z]+(?:\.[a-z]+)*/},{className:"symbol",begin:/\^%?[a-zA-Z][\w]*/},{className:"keyword",begin:/##class|##super|#define|#dim/},{begin:/&sql\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0, subLanguage:"sql"},{begin:/&(js|jscript|javascript)/,excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"},{begin:/&html<\s*\s*>/,subLanguage:"xml"}]}}function crmsh(hljs){const RESOURCES="primitive rsc_template",COMMANDS="group clone ms master location colocation order fencing_topology rsc_ticket acl_target acl_group user role tag xml";return{name:"crmsh",aliases:["crm","pcmk"],case_insensitive:!0,keywords:{keyword:"params meta operations op rule attributes utilization"+" "+ "read write deny defined not_defined in_range date spec in ref reference attribute type xpath version and or lt gt tag lte gte eq ne \\"+" "+"number string",literal:"Master Started Slave Stopped start promote demote stop monitor true false"},contains:[hljs.HASH_COMMENT_MODE,{beginKeywords:"node",starts:{end:"\\s*([\\w_-]+:)?",starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*"}}},{beginKeywords:RESOURCES,starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*",starts:{end:"\\s*@?[\\w_][\\w_\\.:-]*"}}}, {begin:"\\b("+COMMANDS.split(" ").join("|")+")\\s+",keywords:COMMANDS,starts:{className:"title",end:"[\\$\\w_][\\w_-]*"}},{beginKeywords:"property rsc_defaults op_defaults",starts:{className:"title",end:"\\s*([\\w_-]+:)?"}},hljs.QUOTE_STRING_MODE,{className:"meta",begin:"(ocf|systemd|service|lsb):[\\w_:-]+",relevance:0},{className:"number",begin:"\\b\\d+(\\.\\d+)?(ms|s|h|m)?",relevance:0},{className:"literal",begin:"[-]?(infinity|inf)",relevance:0},{className:"attr",begin:/([A-Za-z$_#][\w_-]+)=/, relevance:0},{className:"tag",begin:"",relevance:0}]}}function crystal(hljs){const INT_SUFFIX="(_?[ui](8|16|32|64|128))?",FLOAT_SUFFIX="(_?f(32|64))?",CRYSTAL_IDENT_RE="[a-zA-Z_]\\w*[!?=]?",CRYSTAL_METHOD_RE="[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|[=!]~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\*\\*|\\[\\][=?]?",CRYSTAL_PATH_RE="[A-Za-z_]\\w*(::\\w+)*(\\?|!)?",CRYSTAL_KEYWORDS={$pattern:CRYSTAL_IDENT_RE,keyword:"abstract alias annotation as as? asm begin break case class def d\ o else elsif end ensure enum extend for fun if include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? return require select self sizeof struct super then type typeof union uninitialized unless until verbatim when while with yield __DIR__ __END_LINE__ __FILE__ __LINE__",literal:"false nil true"},SUBST={className:"subst",begin:/#\{/,end:/\}/,keywords:CRYSTAL_KEYWORDS},VARIABLE={className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![\ A-Za-z])(?![@$?'])"},EXPANSION={className:"template-variable",variants:[{begin:"\\{\\{",end:"\\}\\}"},{begin:"\\{%",end:"%\\}"}],keywords:CRYSTAL_KEYWORDS};function recursiveParen(begin,end){const contains3=[{begin,end}];return contains3[0].contains=contains3,contains3}const STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE,SUBST],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[Qwi]?\\(",end:"\\)",contains:recursiveParen("\\(","\\)")},{begin:"%[Qwi]?\\[", end:"\\]",contains:recursiveParen("\\[","\\]")},{begin:"%[Qwi]?\\{",end:/\}/,contains:recursiveParen(/\{/,/\}/)},{begin:"%[Qwi]?<",end:">",contains:recursiveParen("<",">")},{begin:"%[Qwi]?\\|",end:"\\|"},{begin:/<<-\w+$/,end:/^\s*\w+$/}],relevance:0},Q_STRING={className:"string",variants:[{begin:"%q\\(",end:"\\)",contains:recursiveParen("\\(","\\)")},{begin:"%q\\[",end:"\\]",contains:recursiveParen("\\[","\\]")},{begin:"%q\\{",end:/\}/,contains:recursiveParen(/\{/,/\}/)},{begin:"%q<",end:">",contains:recursiveParen( "<",">")},{begin:"%q\\|",end:"\\|"},{begin:/<<-'\w+'$/,end:/^\s*\w+$/}],relevance:0},REGEXP2={begin:"(?!%\\})("+hljs.RE_STARTERS_RE+"|\\n|\\b(case|if|select|unless|until|when|while)\\b)\\s*",keywords:"case if select unless until when while",contains:[{className:"regexp",contains:[hljs.BACKSLASH_ESCAPE,SUBST],variants:[{begin:"//[a-z]*",relevance:0},{begin:"/(?!\\/)",end:"/[a-z]*"}]}],relevance:0},REGEXP22={className:"regexp",contains:[hljs.BACKSLASH_ESCAPE,SUBST],variants:[{begin:"%r\\(",end:"\\)", contains:recursiveParen("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:recursiveParen("\\[","\\]")},{begin:"%r\\{",end:/\}/,contains:recursiveParen(/\{/,/\}/)},{begin:"%r<",end:">",contains:recursiveParen("<",">")},{begin:"%r\\|",end:"\\|"}],relevance:0},ATTRIBUTE={className:"meta",begin:"@\\[",end:"\\]",contains:[hljs.inherit(hljs.QUOTE_STRING_MODE,{className:"string"})]},CRYSTAL_DEFAULT_CONTAINS=[EXPANSION,STRING,Q_STRING,REGEXP22,REGEXP2,ATTRIBUTE,VARIABLE,hljs.HASH_COMMENT_MODE,{className:"\ class",beginKeywords:"class module struct",end:"$|;",illegal:/=/,contains:[hljs.HASH_COMMENT_MODE,hljs.inherit(hljs.TITLE_MODE,{begin:CRYSTAL_PATH_RE}),{begin:"<"}]},{className:"class",beginKeywords:"lib enum union",end:"$|;",illegal:/=/,contains:[hljs.HASH_COMMENT_MODE,hljs.inherit(hljs.TITLE_MODE,{begin:CRYSTAL_PATH_RE})]},{beginKeywords:"annotation",end:"$|;",illegal:/=/,contains:[hljs.HASH_COMMENT_MODE,hljs.inherit(hljs.TITLE_MODE,{begin:CRYSTAL_PATH_RE})],relevance:2},{className:"function", beginKeywords:"def",end:/\B\b/,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:CRYSTAL_METHOD_RE,endsParent:!0})]},{className:"function",beginKeywords:"fun macro",end:/\B\b/,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:CRYSTAL_METHOD_RE,endsParent:!0})],relevance:2},{className:"symbol",begin:hljs.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[STRING,{begin:CRYSTAL_METHOD_RE}],relevance:0},{className:"number",variants:[{begin:"\\b0b([01_]+)"+INT_SUFFIX},{begin:"\ \\b0o([0-7_]+)"+INT_SUFFIX},{begin:"\\b0x([A-Fa-f0-9_]+)"+INT_SUFFIX},{begin:"\\b([1-9][0-9_]*[0-9]|[0-9])(\\.[0-9][0-9_]*)?([eE]_?[-+]?[0-9_]*)?"+FLOAT_SUFFIX+"(?!_)"},{begin:"\\b([1-9][0-9_]*|0)"+INT_SUFFIX}],relevance:0}];return SUBST.contains=CRYSTAL_DEFAULT_CONTAINS,EXPANSION.contains=CRYSTAL_DEFAULT_CONTAINS.slice(1),{name:"Crystal",aliases:["cr"],keywords:CRYSTAL_KEYWORDS,contains:CRYSTAL_DEFAULT_CONTAINS}}function csp(hljs){return{name:"CSP",case_insensitive:!1,keywords:{$pattern:"[a-zA-\ Z][a-zA-Z0-9_-]*",keyword:["base-uri","child-src","connect-src","default-src","font-src","form-action","frame-ancestors","frame-src","img-src","manifest-src","media-src","object-src","plugin-types","report-uri","sandbox","script-src","style-src","trusted-types","unsafe-hashes","worker-src"]},contains:[{className:"string",begin:"'",end:"'"},{className:"attribute",begin:"^Content",end:":",excludeEnd:!0}]}}function d(hljs){const D_KEYWORDS={$pattern:hljs.UNDERSCORE_IDENT_RE,keyword:"abstract alias \ align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__\ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},decimal_integer_re="(0|[1-9][\\d_]*)",decimal_integer_nosus_re="(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)",binary_integer_re="0[bB][01_]+",hexadecimal_digits_re="([\\da-fA-F][\\da-fA-F_]*|_[\\d\ a-fA-F][\\da-fA-F_]*)",hexadecimal_integer_re="0[xX]"+hexadecimal_digits_re,decimal_exponent_re="([eE][+-]?"+decimal_integer_nosus_re+")",decimal_float_re="("+decimal_integer_nosus_re+"(\\.\\d*|"+decimal_exponent_re+")|\\d+\\."+decimal_integer_nosus_re+"|\\."+decimal_integer_re+decimal_exponent_re+"?)",hexadecimal_float_re="(0[xX]("+hexadecimal_digits_re+"\\."+hexadecimal_digits_re+"|\\.?"+hexadecimal_digits_re+")[pP][+-]?"+decimal_integer_nosus_re+")",integer_re="("+decimal_integer_re+"|"+binary_integer_re+ "|"+hexadecimal_integer_re+")",float_re="("+hexadecimal_float_re+"|"+decimal_float_re+")",escape_sequence_re=`\\\\(['"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};`,D_INTEGER_MODE={className:"number",begin:"\\b"+integer_re+"(L|u|U|Lu|LU|uL|UL)?",relevance:0},D_FLOAT_MODE={className:"number",begin:"\\b("+float_re+"([fF]|L|i|[fF]i|Li)?|"+integer_re+"(i|[fF]i|Li))",relevance:0},D_CHARACTER_MODE={className:"string",begin:"'("+escape_sequence_re+"|.)",end:"\ '",illegal:"."},D_STRING_MODE={className:"string",begin:'"',contains:[{begin:escape_sequence_re,relevance:0}],end:'"[cwd]?'},D_WYSIWYG_DELIMITED_STRING_MODE={className:"string",begin:'[rq]"',end:'"[cwd]?',relevance:5},D_ALTERNATE_WYSIWYG_STRING_MODE={className:"string",begin:"`",end:"`[cwd]?"},D_HEX_STRING_MODE={className:"string",begin:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',relevance:10},D_TOKEN_STRING_MODE={className:"string",begin:'q"\\{',end:'\\}"'},D_HASHBANG_MODE={className:"meta",begin:"^#!",end:"\ $",relevance:5},D_SPECIAL_TOKEN_SEQUENCE_MODE={className:"meta",begin:"#(line)",end:"$",relevance:5},D_ATTRIBUTE_MODE={className:"keyword",begin:"@[a-zA-Z_][a-zA-Z_\\d]*"},D_NESTING_COMMENT_MODE=hljs.COMMENT("\\/\\+","\\+\\/",{contains:["self"],relevance:10});return{name:"D",keywords:D_KEYWORDS,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,D_NESTING_COMMENT_MODE,D_HEX_STRING_MODE,D_STRING_MODE,D_WYSIWYG_DELIMITED_STRING_MODE,D_ALTERNATE_WYSIWYG_STRING_MODE,D_TOKEN_STRING_MODE,D_FLOAT_MODE, D_INTEGER_MODE,D_CHARACTER_MODE,D_HASHBANG_MODE,D_SPECIAL_TOKEN_SEQUENCE_MODE,D_ATTRIBUTE_MODE]}}function dart(hljs){const SUBST={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"}]},BRACED_SUBST={className:"subst",variants:[{begin:/\$\{/,end:/\}/}],keywords:"true false null this is new super"},NUMBER={className:"number",relevance:0,variants:[{match:/\b[0-9][0-9_]*(\.[0-9][0-9_]*)?([eE][+-]?[0-9][0-9_]*)?\b/},{match:/\b0[xX][0-9A-Fa-f][0-9A-Fa-f_]*\b/}]},STRING={className:"string",variants:[ {begin:"r'''",end:"'''"},{begin:'r"""',end:'"""'},{begin:"r'",end:"'",illegal:"\\n"},{begin:'r"',end:'"',illegal:"\\n"},{begin:"'''",end:"'''",contains:[hljs.BACKSLASH_ESCAPE,SUBST,BRACED_SUBST]},{begin:'"""',end:'"""',contains:[hljs.BACKSLASH_ESCAPE,SUBST,BRACED_SUBST]},{begin:"'",end:"'",illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE,SUBST,BRACED_SUBST]},{begin:'"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE,SUBST,BRACED_SUBST]}]};BRACED_SUBST.contains=[NUMBER,STRING];const BUILT_IN_TYPES=[ "Comparable","DateTime","Duration","Function","Iterable","Iterator","List","Map","Match","Object","Pattern","RegExp","Set","Stopwatch","String","StringBuffer","StringSink","Symbol","Type","Uri","bool","double","int","num","Element","ElementList"],NULLABLE_BUILT_IN_TYPES=BUILT_IN_TYPES.map(e=>`${e}?`);return{name:"Dart",keywords:{keyword:["abstract","as","assert","async","await","base","break","case","catch","class","const","continue","covariant","default","deferred","do","dynamic","else","enum", "export","extends","extension","external","factory","false","final","finally","for","Function","get","hide","if","implements","import","in","interface","is","late","library","mixin","new","null","on","operator","part","required","rethrow","return","sealed","set","show","static","super","switch","sync","this","throw","true","try","typedef","var","void","when","while","with","yield"],built_in:BUILT_IN_TYPES.concat(NULLABLE_BUILT_IN_TYPES).concat(["Never","Null","dynamic","print","document","queryS\ elector","querySelectorAll","window"]),$pattern:/[A-Za-z][A-Za-z0-9_]*\??/},contains:[STRING,hljs.COMMENT(/\/\*\*(?!\/)/,/\*\//,{subLanguage:"markdown",relevance:0}),hljs.COMMENT(/\/{3,} ?/,/$/,{contains:[{subLanguage:"markdown",begin:".",end:"$",relevance:0}]}),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},hljs.UNDERSCORE_TITLE_MODE]},NUMBER,{className:"meta",begin:"@[A-\ Za-z]+"},{begin:"=>"}]}}function delphi(hljs){const KEYWORDS2=["exports","register","file","shl","array","record","property","for","mod","while","set","ally","label","uses","raise","not","stored","class","safecall","var","interface","or","private","static","exit","index","inherited","to","else","stdcall","override","shr","asm","far","resourcestring","finalization","packed","virtual","out","and","protected","library","do","xorwrite","goto","near","function","end","div","overload","object","unit", "begin","string","on","inline","repeat","until","destructor","write","message","program","with","read","initialization","except","default","nil","if","case","cdecl","in","downto","threadvar","of","try","pascal","const","external","constructor","type","public","then","implementation","finally","published","procedure","absolute","reintroduce","operator","as","is","abstract","alias","assembler","bitpacked","break","continue","cppdecl","cvar","enumerator","experimental","platform","deprecated","unim\ plemented","dynamic","export","far16","forward","generic","helper","implements","interrupt","iochecks","local","name","nodefault","noreturn","nostackframe","oldfpccall","otherwise","saveregisters","softfloat","specialize","strict","unaligned","varargs"],COMMENT_MODES=[hljs.C_LINE_COMMENT_MODE,hljs.COMMENT(/\{/,/\}/,{relevance:0}),hljs.COMMENT(/\(\*/,/\*\)/,{relevance:10})],DIRECTIVE={className:"meta",variants:[{begin:/\{\$/,end:/\}/},{begin:/\(\*\$/,end:/\*\)/}]},STRING={className:"string",begin:/'/, end:/'/,contains:[{begin:/''/}]},NUMBER={className:"number",relevance:0,variants:[{match:/\b\d[\d_]*(\.\d[\d_]*)?/},{match:/\$[\dA-Fa-f_]+/},{match:/\$/,relevance:0},{match:/&[0-7][0-7_]*/},{match:/%[01_]+/},{match:/%/,relevance:0}]},CHAR_STRING={className:"string",variants:[{match:/#\d[\d_]*/},{match:/#\$[\dA-Fa-f][\dA-Fa-f_]*/},{match:/#&[0-7][0-7_]*/},{match:/#%[01][01_]*/}]},CLASS2={begin:hljs.IDENT_RE+"\\s*=\\s*class\\s*\\(",returnBegin:!0,contains:[hljs.TITLE_MODE]},FUNCTION={className:"fu\ nction",beginKeywords:"function constructor destructor procedure",end:/[:;]/,keywords:"function constructor|10 destructor|10 procedure|10",contains:[hljs.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:[STRING,CHAR_STRING,DIRECTIVE].concat(COMMENT_MODES)},DIRECTIVE].concat(COMMENT_MODES)};return{name:"Delphi",aliases:["dpr","dfm","pas","pascal"],case_insensitive:!0,keywords:KEYWORDS2,illegal:/"|\$[G-Zg-z]|\/\*|<\/|\|/,contains:[STRING,CHAR_STRING,NUMBER,CLASS2,FUNCTION, DIRECTIVE].concat(COMMENT_MODES)}}function django(hljs){const FILTER={begin:/\|[A-Za-z]+:?/,keywords:{name:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default\ truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone"},contains:[hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE]};return{name:"Django",aliases:["jinja"],case_insensitive:!0,subLanguage:"xml",contains:[hljs.COMMENT(/\{%\s*comment\s*%\}/,/\{%\s*endcomment\s*%\}/),hljs.COMMENT(/\{#/,/#\}/),{className:"template-tag",begin:/\{%/,end:/%\}/,contains:[{className:"name", begin:/\w+/,keywords:{name:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi ge\ t_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim"},starts:{endsWithParent:!0,keywords:"in by as",contains:[FILTER],relevance:0}}]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:[FILTER]}]}}function dns(hljs){return{name:"DNS Zone",aliases:["bind","zone"],keywords:["IN","A","AAAA","AFSDB","APL","CAA","CDNSKEY","CDS","CERT","CNAME","DHCID","DLV","DNAME","DNSKEY","DS","HIP","IPSECKEY","KEY","KX","\ LOC","MX","NAPTR","NS","NSEC","NSEC3","NSEC3PARAM","PTR","RRSIG","RP","SIG","SOA","SRV","SSHFP","TA","TKEY","TLSA","TSIG","TXT"],contains:[hljs.COMMENT(";","$",{relevance:0}),{className:"meta",begin:/^\$(TTL|GENERATE|INCLUDE|ORIGIN)\b/},{className:"number",begin:"((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\ \\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2\ [0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))\\b"},{className:"number",begin:"((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\b"},hljs.inherit(hljs.NUMBER_MODE, {begin:/\b\d+[dhwm]?/})]}}function dockerfile(hljs){return{name:"Dockerfile",aliases:["docker"],case_insensitive:!0,keywords:["from","maintainer","expose","env","arg","user","onbuild","stopsignal"],contains:[hljs.HASH_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE,{beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck shell",starts:{end:/[^\\]$/,subLanguage:"bash"}}],illegal:"",illegal:"\\n"}]},STRINGS,hljs. C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},REFERENCE={className:"variable",begin:/&[a-z\d_]*\b/},KEYWORD={className:"keyword",begin:"/[a-z][a-z\\d-]*/"},LABEL={className:"symbol",begin:"^\\s*[a-zA-Z_][a-zA-Z\\d_]*:"},CELL_PROPERTY={className:"params",relevance:0,begin:"<",end:">",contains:[NUMBERS,REFERENCE]},NODE={className:"title.class",begin:/[a-zA-Z_][a-zA-Z\d_@-]*(?=\s\{)/,relevance:.2},ROOT_NODE={className:"title.class",begin:/^\/(?=\s*\{)/,relevance:10},ATTR_NO_VALUE={match:/[a-z][a-z-,]+(?=;)/, relevance:0,scope:"attr"},ATTR={relevance:0,match:[/[a-z][a-z-,]+/,/\s*/,/=/],scope:{1:"attr",3:"operator"}},PUNC={scope:"punctuation",relevance:0,match:/\};|[;{}]/};return{name:"Device Tree",contains:[ROOT_NODE,REFERENCE,KEYWORD,LABEL,NODE,ATTR,ATTR_NO_VALUE,CELL_PROPERTY,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,NUMBERS,STRINGS,PREPROCESSOR,PUNC,{begin:hljs.IDENT_RE+"::",keywords:""}]}}function dust(hljs){return{name:"Dust",aliases:["dst"],case_insensitive:!0,subLanguage:"xml",contains:[ {className:"template-tag",begin:/\{[#\/]/,end:/\}/,illegal:/;/,contains:[{className:"name",begin:/[a-zA-Z\.-]+/,starts:{endsWithParent:!0,relevance:0,contains:[hljs.QUOTE_STRING_MODE]}}]},{className:"template-variable",begin:/\{/,end:/\}/,illegal:/;/,keywords:"if eq ne lt lte gt gte select default math sep"}]}}function ebnf(hljs){const commentMode=hljs.COMMENT(/\(\*/,/\*\)/),nonTerminalMode={className:"attribute",begin:/^[ ]*[a-zA-Z]+([\s_-]+[a-zA-Z]+)*/},ruleBodyMode={begin:/=/,end:/[.;]/,contains:[ commentMode,{className:"meta",begin:/\?.*\?/},{className:"string",variants:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{begin:"`",end:"`"}]}]};return{name:"Extended Backus-Naur Form",illegal:/\S/,contains:[commentMode,nonTerminalMode,ruleBodyMode]}}function elixir(hljs){const regex=hljs.regex,ELIXIR_IDENT_RE="[a-zA-Z_][a-zA-Z0-9_.]*(!|\\?)?",ELIXIR_METHOD_RE="[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",KWS={$pattern:ELIXIR_IDENT_RE,keyword:["after","alias", "and","case","catch","cond","defstruct","defguard","do","else","end","fn","for","if","import","in","not","or","quote","raise","receive","require","reraise","rescue","try","unless","unquote","unquote_splicing","use","when","with|0"],literal:["false","nil","true"]},SUBST={className:"subst",begin:/#\{/,end:/\}/,keywords:KWS},NUMBER={className:"number",begin:"(\\b0o[0-7_]+)|(\\b0b[01_]+)|(\\b0x[0-9a-fA-F_]+)|(-?\\b[0-9][0-9_]*(\\.[0-9_]+([eE][-+]?[0-9]+)?)?)",relevance:0},BACKSLASH_ESCAPE={match:/\\[\s\S]/, scope:"char.escape",relevance:0},SIGIL_DELIMITERS=`[/|([{<"']`,SIGIL_DELIMITER_MODES=[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/\//,end:/\//},{begin:/\|/,end:/\|/},{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/},{begin:/\{/,end:/\}/},{begin://}],escapeSigilEnd=end=>({scope:"char.escape",begin:regex.concat(/\\/,end),relevance:0}),LOWERCASE_SIGIL={className:"string",begin:"~[a-z](?="+SIGIL_DELIMITERS+")",contains:SIGIL_DELIMITER_MODES.map(x=>hljs.inherit(x,{contains:[escapeSigilEnd(x.end), BACKSLASH_ESCAPE,SUBST]}))},UPCASE_SIGIL={className:"string",begin:"~[A-Z](?="+SIGIL_DELIMITERS+")",contains:SIGIL_DELIMITER_MODES.map(x=>hljs.inherit(x,{contains:[escapeSigilEnd(x.end)]}))},REGEX_SIGIL={className:"regex",variants:[{begin:"~r(?="+SIGIL_DELIMITERS+")",contains:SIGIL_DELIMITER_MODES.map(x=>hljs.inherit(x,{end:regex.concat(x.end,/[uismxfU]{0,7}/),contains:[escapeSigilEnd(x.end),BACKSLASH_ESCAPE,SUBST]}))},{begin:"~R(?="+SIGIL_DELIMITERS+")",contains:SIGIL_DELIMITER_MODES.map(x=>hljs. inherit(x,{end:regex.concat(x.end,/[uismxfU]{0,7}/),contains:[escapeSigilEnd(x.end)]}))}]},STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE,SUBST],variants:[{begin:/"""/,end:/"""/},{begin:/'''/,end:/'''/},{begin:/~S"""/,end:/"""/,contains:[]},{begin:/~S"/,end:/"/,contains:[]},{begin:/~S'''/,end:/'''/,contains:[]},{begin:/~S'/,end:/'/,contains:[]},{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},FUNCTION={className:"function",beginKeywords:"def defp defmacro defmacrop",end:/\B\b/,contains:[hljs. inherit(hljs.TITLE_MODE,{begin:ELIXIR_IDENT_RE,endsParent:!0})]},CLASS2=hljs.inherit(FUNCTION,{className:"class",beginKeywords:"defimpl defmodule defprotocol defrecord",end:/\bdo\b|$|;/}),ELIXIR_DEFAULT_CONTAINS=[STRING,REGEX_SIGIL,UPCASE_SIGIL,LOWERCASE_SIGIL,hljs.HASH_COMMENT_MODE,CLASS2,FUNCTION,{begin:"::"},{className:"symbol",begin:":(?![\\s:])",contains:[STRING,{begin:ELIXIR_METHOD_RE}],relevance:0},{className:"symbol",begin:ELIXIR_IDENT_RE+":(?!:)",relevance:0},{className:"title.class",begin:/(\b[A-Z][a-zA-Z0-9_]+)/, relevance:0},NUMBER,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))"}];return SUBST.contains=ELIXIR_DEFAULT_CONTAINS,{name:"Elixir",aliases:["ex","exs"],keywords:KWS,contains:ELIXIR_DEFAULT_CONTAINS}}function elm(hljs){const COMMENT={variants:[hljs.COMMENT("--","$"),hljs.COMMENT(/\{-/,/-\}/,{contains:["self"]})]},CONSTRUCTOR={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},LIST={begin:"\\(",end:"\\)",illegal:'"',contains:[{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"}, COMMENT]},RECORD={begin:/\{/,end:/\}/,contains:LIST.contains},CHARACTER={className:"string",begin:"'\\\\?.",end:"'",illegal:"."};return{name:"Elm",keywords:["let","in","if","then","else","case","of","where","module","import","exposing","type","alias","as","infix","infixl","infixr","port","effect","command","subscription"],contains:[{beginKeywords:"port effect module",end:"exposing",keywords:"port effect module where command subscription exposing",contains:[LIST,COMMENT],illegal:"\\W\\.|;"},{begin:"\ import",end:"$",keywords:"import as exposing",contains:[LIST,COMMENT],illegal:"\\W\\.|;"},{begin:"type",end:"$",keywords:"type alias",contains:[CONSTRUCTOR,LIST,RECORD,COMMENT]},{beginKeywords:"infix infixl infixr",end:"$",contains:[hljs.C_NUMBER_MODE,COMMENT]},{begin:"port",end:"$",keywords:"port",contains:[COMMENT]},CHARACTER,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,CONSTRUCTOR,hljs.inherit(hljs.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),COMMENT,{begin:"->|<-"}],illegal:/;/}}function erb(hljs){return{ name:"ERB",subLanguage:"xml",contains:[hljs.COMMENT("<%#","%>"),{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}function erlang(hljs){const BASIC_ATOM_RE="[a-z'][a-zA-Z0-9_']*",FUNCTION_NAME_RE="("+BASIC_ATOM_RE+":"+BASIC_ATOM_RE+"|"+BASIC_ATOM_RE+")",ERLANG_RESERVED={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor maybe else",literal:"false true"},COMMENT=hljs.COMMENT( "%","$"),NUMBER={className:"number",begin:"\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)",relevance:0},NAMED_FUN={begin:"fun\\s+"+BASIC_ATOM_RE+"/\\d+"},FUNCTION_CALL={begin:FUNCTION_NAME_RE+"\\(",end:"\\)",returnBegin:!0,relevance:0,contains:[{begin:FUNCTION_NAME_RE,relevance:0},{begin:"\\(",end:"\\)",endsWithParent:!0,returnEnd:!0,relevance:0}]},TUPLE={begin:/\{/,end:/\}/,relevance:0},VAR1={begin:"\\b_([A-Z][A-Za-z0-9_]*)?",relevance:0},VAR2={begin:"\ [A-Z][a-zA-Z0-9_]*",relevance:0},RECORD_ACCESS={begin:"#"+hljs.UNDERSCORE_IDENT_RE,relevance:0,returnBegin:!0,contains:[{begin:"#"+hljs.UNDERSCORE_IDENT_RE,relevance:0},{begin:/\{/,end:/\}/,relevance:0}]},CHAR_LITERAL={scope:"string",match:/\$(\\([^0-9]|[0-9]{1,3}|)|.)/},TRIPLE_QUOTE={scope:"string",match:/"""("*)(?!")[\s\S]*?"""\1/},SIGIL={scope:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[{match:/~\w?"""("*)(?!")[\s\S]*?"""\1/},{begin:/~\w?\(/,end:/\)/},{begin:/~\w?\[/,end:/\]/},{begin:/~\w?{/, end:/}/},{begin:/~\w?/},{begin:/~\w?\//,end:/\//},{begin:/~\w?\|/,end:/\|/},{begin:/~\w?'/,end:/'/},{begin:/~\w?"/,end:/"/},{begin:/~\w?`/,end:/`/},{begin:/~\w?#/,end:/#/}]},BLOCK_STATEMENTS={beginKeywords:"fun receive if try case maybe",end:"end",keywords:ERLANG_RESERVED};BLOCK_STATEMENTS.contains=[COMMENT,NAMED_FUN,hljs.inherit(hljs.APOS_STRING_MODE,{className:""}),BLOCK_STATEMENTS,FUNCTION_CALL,SIGIL,TRIPLE_QUOTE,hljs.QUOTE_STRING_MODE,NUMBER,TUPLE,VAR1,VAR2,RECORD_ACCESS,CHAR_LITERAL]; const BASIC_MODES=[COMMENT,NAMED_FUN,BLOCK_STATEMENTS,FUNCTION_CALL,SIGIL,TRIPLE_QUOTE,hljs.QUOTE_STRING_MODE,NUMBER,TUPLE,VAR1,VAR2,RECORD_ACCESS,CHAR_LITERAL];FUNCTION_CALL.contains[1].contains=BASIC_MODES,TUPLE.contains=BASIC_MODES,RECORD_ACCESS.contains[1].contains=BASIC_MODES;const DIRECTIVES=["-module","-record","-undef","-export","-ifdef","-ifndef","-author","-copyright","-doc","-moduledoc","-vsn","-import","-include","-include_lib","-compile","-define","-else","-endif","-file","-behaviou\ r","-behavior","-spec","-on_load","-nifs"],PARAMS={className:"params",begin:"\\(",end:"\\)",contains:BASIC_MODES};return{name:"Erlang",aliases:["erl"],keywords:ERLANG_RESERVED,illegal:"(",returnBegin:!0,illegal:"\\(|#|//|/\\*|\\\\|:|;",contains:[PARAMS,hljs.inherit(hljs.TITLE_MODE,{begin:BASIC_ATOM_RE})],starts:{end:";|\\.",keywords:ERLANG_RESERVED,contains:BASIC_MODES}},COMMENT,{begin:"\ ^-",end:"\\.",relevance:0,excludeEnd:!0,returnBegin:!0,keywords:{$pattern:"-"+hljs.IDENT_RE,keyword:DIRECTIVES.map(x=>`${x}|1.5`).join(" ")},contains:[PARAMS,SIGIL,TRIPLE_QUOTE,hljs.QUOTE_STRING_MODE]},NUMBER,SIGIL,TRIPLE_QUOTE,hljs.QUOTE_STRING_MODE,RECORD_ACCESS,VAR1,VAR2,TUPLE,CHAR_LITERAL,{begin:/\.$/}]}}function erlangRepl(hljs){const regex=hljs.regex;return{name:"Erlang REPL",keywords:{built_in:"spawn spawn_link self",keyword:"after and andalso|10 band begin bnot bor bsl bsr bxor case catc\ h cond div end fun if let not of or orelse|10 query receive rem try when xor"},contains:[{className:"meta.prompt",begin:"^[0-9]+> ",relevance:10},hljs.COMMENT("%","$"),{className:"number",begin:"\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)",relevance:0},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{begin:regex.concat(/\?(::)?/,/([A-Z]\w*)/,/((::)[A-Z]\w*)*/)},{begin:"->"},{begin:"ok"},{begin:"!"},{begin:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']\ *)|(\\b[a-z'][a-zA-Z0-9_']*)",relevance:0},{begin:"[A-Z][a-zA-Z0-9_']*",relevance:0}]}}function excel(hljs){return{name:"Excel formulae",aliases:["xlsx","xls"],case_insensitive:!0,keywords:{$pattern:/[a-zA-Z][\w\.]*/,built_in:["ABS","ACCRINT","ACCRINTM","ACOS","ACOSH","ACOT","ACOTH","AGGREGATE","ADDRESS","AMORDEGRC","AMORLINC","AND","ARABIC","AREAS","ARRAYTOTEXT","ASC","ASIN","ASINH","ATAN","ATAN2","ATANH","AVEDEV","AVERAGE","AVERAGEA","AVERAGEIF","AVERAGEIFS","BAHTTEXT","BASE","BESSELI","BESSEL\ J","BESSELK","BESSELY","BETADIST","BETA.DIST","BETAINV","BETA.INV","BIN2DEC","BIN2HEX","BIN2OCT","BINOMDIST","BINOM.DIST","BINOM.DIST.RANGE","BINOM.INV","BITAND","BITLSHIFT","BITOR","BITRSHIFT","BITXOR","BYCOL","BYROW","CALL","CEILING","CEILING.MATH","CEILING.PRECISE","CELL","CHAR","CHIDIST","CHIINV","CHITEST","CHISQ.DIST","CHISQ.DIST.RT","CHISQ.INV","CHISQ.INV.RT","CHISQ.TEST","CHOOSE","CHOOSECOLS","CHOOSEROWS","CLEAN","CODE","COLUMN","COLUMNS","COMBIN","COMBINA","COMPLEX","CONCAT","CONCATENATE", "CONFIDENCE","CONFIDENCE.NORM","CONFIDENCE.T","CONVERT","CORREL","COS","COSH","COT","COTH","COUNT","COUNTA","COUNTBLANK","COUNTIF","COUNTIFS","COUPDAYBS","COUPDAYS","COUPDAYSNC","COUPNCD","COUPNUM","COUPPCD","COVAR","COVARIANCE.P","COVARIANCE.S","CRITBINOM","CSC","CSCH","CUBEKPIMEMBER","CUBEMEMBER","CUBEMEMBERPROPERTY","CUBERANKEDMEMBER","CUBESET","CUBESETCOUNT","CUBEVALUE","CUMIPMT","CUMPRINC","DATE","DATEDIF","DATEVALUE","DAVERAGE","DAY","DAYS","DAYS360","DB","DBCS","DCOUNT","DCOUNTA","DDB","D\ EC2BIN","DEC2HEX","DEC2OCT","DECIMAL","DEGREES","DELTA","DEVSQ","DGET","DISC","DMAX","DMIN","DOLLAR","DOLLARDE","DOLLARFR","DPRODUCT","DROP","DSTDEV","DSTDEVP","DSUM","DURATION","DVAR","DVARP","EDATE","EFFECT","ENCODEURL","EOMONTH","ERF","ERF.PRECISE","ERFC","ERFC.PRECISE","ERROR.TYPE","EUROCONVERT","EVEN","EXACT","EXP","EXPAND","EXPON.DIST","EXPONDIST","FACT","FACTDOUBLE","FALSE","F.DIST","FDIST","F.DIST.RT","FILTER","FILTERXML","FIND","FINDB","F.INV","F.INV.RT","FINV","FISHER","FISHERINV","FIX\ ED","FLOOR","FLOOR.MATH","FLOOR.PRECISE","FORECAST","FORECAST.ETS","FORECAST.ETS.CONFINT","FORECAST.ETS.SEASONALITY","FORECAST.ETS.STAT","FORECAST.LINEAR","FORMULATEXT","FREQUENCY","F.TEST","FTEST","FV","FVSCHEDULE","GAMMA","GAMMA.DIST","GAMMADIST","GAMMA.INV","GAMMAINV","GAMMALN","GAMMALN.PRECISE","GAUSS","GCD","GEOMEAN","GESTEP","GETPIVOTDATA","GROWTH","HARMEAN","HEX2BIN","HEX2DEC","HEX2OCT","HLOOKUP","HOUR","HSTACK","HYPERLINK","HYPGEOM.DIST","HYPGEOMDIST","IF","IFERROR","IFNA","IFS","IMABS", "IMAGE","IMAGINARY","IMARGUMENT","IMCONJUGATE","IMCOS","IMCOSH","IMCOT","IMCSC","IMCSCH","IMDIV","IMEXP","IMLN","IMLOG10","IMLOG2","IMPOWER","IMPRODUCT","IMREAL","IMSEC","IMSECH","IMSIN","IMSINH","IMSQRT","IMSUB","IMSUM","IMTAN","INDEX","INDIRECT","INFO","INT","INTERCEPT","INTRATE","IPMT","IRR","ISBLANK","ISERR","ISERROR","ISEVEN","ISFORMULA","ISLOGICAL","ISNA","ISNONTEXT","ISNUMBER","ISODD","ISOMITTED","ISREF","ISTEXT","ISO.CEILING","ISOWEEKNUM","ISPMT","JIS","KURT","LAMBDA","LARGE","LCM","LEFT", "LEFTB","LEN","LENB","LET","LINEST","LN","LOG","LOG10","LOGEST","LOGINV","LOGNORM.DIST","LOGNORMDIST","LOGNORM.INV","LOOKUP","LOWER","MAKEARRAY","MAP","MATCH","MAX","MAXA","MAXIFS","MDETERM","MDURATION","MEDIAN","MID","MIDB","MIN","MINIFS","MINA","MINUTE","MINVERSE","MIRR","MMULT","MOD","MODE","MODE.MULT","MODE.SNGL","MONTH","MROUND","MULTINOMIAL","MUNIT","N","NA","NEGBINOM.DIST","NEGBINOMDIST","NETWORKDAYS","NETWORKDAYS.INTL","NOMINAL","NORM.DIST","NORMDIST","NORMINV","NORM.INV","NORM.S.DIST","\ NORMSDIST","NORM.S.INV","NORMSINV","NOT","NOW","NPER","NPV","NUMBERVALUE","OCT2BIN","OCT2DEC","OCT2HEX","ODD","ODDFPRICE","ODDFYIELD","ODDLPRICE","ODDLYIELD","OFFSET","OR","PDURATION","PEARSON","PERCENTILE.EXC","PERCENTILE.INC","PERCENTILE","PERCENTRANK.EXC","PERCENTRANK.INC","PERCENTRANK","PERMUT","PERMUTATIONA","PHI","PHONETIC","PI","PMT","POISSON.DIST","POISSON","POWER","PPMT","PRICE","PRICEDISC","PRICEMAT","PROB","PRODUCT","PROPER","PV","QUARTILE","QUARTILE.EXC","QUARTILE.INC","QUOTIENT","RA\ DIANS","RAND","RANDARRAY","RANDBETWEEN","RANK.AVG","RANK.EQ","RANK","RATE","RECEIVED","REDUCE","REGISTER.ID","REPLACE","REPLACEB","REPT","RIGHT","RIGHTB","ROMAN","ROUND","ROUNDDOWN","ROUNDUP","ROW","ROWS","RRI","RSQ","RTD","SCAN","SEARCH","SEARCHB","SEC","SECH","SECOND","SEQUENCE","SERIESSUM","SHEET","SHEETS","SIGN","SIN","SINH","SKEW","SKEW.P","SLN","SLOPE","SMALL","SORT","SORTBY","SQRT","SQRTPI","SQL.REQUEST","STANDARDIZE","STOCKHISTORY","STDEV","STDEV.P","STDEV.S","STDEVA","STDEVP","STDEVPA", "STEYX","SUBSTITUTE","SUBTOTAL","SUM","SUMIF","SUMIFS","SUMPRODUCT","SUMSQ","SUMX2MY2","SUMX2PY2","SUMXMY2","SWITCH","SYD","T","TAN","TANH","TAKE","TBILLEQ","TBILLPRICE","TBILLYIELD","T.DIST","T.DIST.2T","T.DIST.RT","TDIST","TEXT","TEXTAFTER","TEXTBEFORE","TEXTJOIN","TEXTSPLIT","TIME","TIMEVALUE","T.INV","T.INV.2T","TINV","TOCOL","TOROW","TODAY","TRANSPOSE","TREND","TRIM","TRIMMEAN","TRUE","TRUNC","T.TEST","TTEST","TYPE","UNICHAR","UNICODE","UNIQUE","UPPER","VALUE","VALUETOTEXT","VAR","VAR.P","V\ AR.S","VARA","VARP","VARPA","VDB","VLOOKUP","VSTACK","WEBSERVICE","WEEKDAY","WEEKNUM","WEIBULL","WEIBULL.DIST","WORKDAY","WORKDAY.INTL","WRAPCOLS","WRAPROWS","XIRR","XLOOKUP","XMATCH","XNPV","XOR","YEAR","YEARFRAC","YIELD","YIELDDISC","YIELDMAT","Z.TEST","ZTEST"]},contains:[{begin:/^=/,end:/[^=]/,returnEnd:!0,illegal:/=/,relevance:10},{className:"symbol",begin:/\b[A-Z]{1,2}\d+\b/,end:/[^\d]/,excludeEnd:!0,relevance:0},{className:"symbol",begin:/[A-Z]{0,2}\d*:[A-Z]{0,2}\d*/,relevance:0},hljs.BACKSLASH_ESCAPE, hljs.QUOTE_STRING_MODE,{className:"number",begin:hljs.NUMBER_RE+"(%)?",relevance:0},hljs.COMMENT(/\bN\(/,/\)/,{excludeBegin:!0,excludeEnd:!0,illegal:/\n/})]}}function fix(hljs){return{name:"FIX",contains:[{begin:/[^\u2401\u0001]+/,end:/[\u2401\u0001]/,excludeEnd:!0,returnBegin:!0,returnEnd:!1,contains:[{begin:/([^\u2401\u0001=]+)/,end:/=([^\u2401\u0001=]+)/,returnEnd:!0,returnBegin:!1,className:"attr"},{begin:/=/,end:/([\u2401\u0001])/,excludeEnd:!0,excludeBegin:!0,className:"string"}]}],case_insensitive:!0}} function flix(hljs){const CHAR={className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},STRING={className:"string",variants:[{begin:'"',end:'"'}]},METHOD={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,excludeEnd:!0,contains:[{className:"title",relevance:0,begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/}]};return{name:"Flix",keywords:{keyword:["case","class","def","else","enum","if","impl","import","in","lat","rel","index","let","match","namespac\ e","switch","type","yield","with"],literal:["true","false"]},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,CHAR,STRING,METHOD,hljs.C_NUMBER_MODE]}}function fortran(hljs){const regex=hljs.regex,PARAMS={className:"params",begin:"\\(",end:"\\)"},COMMENT={variants:[hljs.COMMENT("!","$",{relevance:0}),hljs.COMMENT("^C[ ]","$",{relevance:0}),hljs.COMMENT("^C$","$",{relevance:0})]},OPTIONAL_NUMBER_SUFFIX=/(_[a-z_\d]+)?/,OPTIONAL_NUMBER_EXP=/([de][+-]?\d+)?/,NUMBER={className:"number",variants:[ {begin:regex.concat(/\b\d+/,/\.(\d*)/,OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)},{begin:regex.concat(/\b\d+/,OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)},{begin:regex.concat(/\.\d+/,OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)}],relevance:0},FUNCTION_DEF={className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[hljs.UNDERSCORE_TITLE_MODE,PARAMS]},STRING={className:"string",relevance:0,variants:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]};return{name:"Fort\ ran",case_insensitive:!0,aliases:["f90","f95"],keywords:{$pattern:/\b[a-z][a-z0-9_]+\b|\.[a-z][a-z0-9_]+\./,keyword:["kind","do","concurrent","local","shared","while","private","call","intrinsic","where","elsewhere","type","endtype","endmodule","endselect","endinterface","end","enddo","endif","if","forall","endforall","only","contains","default","return","stop","then","block","endblock","endassociate","public","subroutine|10","function","program",".and.",".or.",".not.",".le.",".eq.",".ge.",".gt.", ".lt.","goto","save","else","use","module","select","case","access","blank","direct","exist","file","fmt","form","formatted","iostat","name","named","nextrec","number","opened","rec","recl","sequential","status","unformatted","unit","continue","format","pause","cycle","exit","c_null_char","c_alert","c_backspace","c_form_feed","flush","wait","decimal","round","iomsg","synchronous","nopass","non_overridable","pass","protected","volatile","abstract","extends","import","non_intrinsic","value","defer\ red","generic","final","enumerator","class","associate","bind","enum","c_int","c_short","c_long","c_long_long","c_signed_char","c_size_t","c_int8_t","c_int16_t","c_int32_t","c_int64_t","c_int_least8_t","c_int_least16_t","c_int_least32_t","c_int_least64_t","c_int_fast8_t","c_int_fast16_t","c_int_fast32_t","c_int_fast64_t","c_intmax_t","C_intptr_t","c_float","c_double","c_long_double","c_float_complex","c_double_complex","c_long_double_complex","c_bool","c_char","c_null_ptr","c_null_funptr","c_new\ _line","c_carriage_return","c_horizontal_tab","c_vertical_tab","iso_c_binding","c_loc","c_funloc","c_associated","c_f_pointer","c_ptr","c_funptr","iso_fortran_env","character_storage_size","error_unit","file_storage_size","input_unit","iostat_end","iostat_eor","numeric_storage_size","output_unit","c_f_procpointer","ieee_arithmetic","ieee_support_underflow_control","ieee_get_underflow_mode","ieee_set_underflow_mode","newunit","contiguous","recursive","pad","position","action","delim","readwrite", "eor","advance","nml","interface","procedure","namelist","include","sequence","elemental","pure","impure","integer","real","character","complex","logical","codimension","dimension","allocatable|10","parameter","external","implicit|10","none","double","precision","assign","intent","optional","pointer","target","in","out","common","equivalence","data"],literal:[".False.",".True."],built_in:["alog","alog10","amax0","amax1","amin0","amin1","amod","cabs","ccos","cexp","clog","csin","csqrt","dabs","da\ cos","dasin","datan","datan2","dcos","dcosh","ddim","dexp","dint","dlog","dlog10","dmax1","dmin1","dmod","dnint","dsign","dsin","dsinh","dsqrt","dtan","dtanh","float","iabs","idim","idint","idnint","ifix","isign","max0","max1","min0","min1","sngl","algama","cdabs","cdcos","cdexp","cdlog","cdsin","cdsqrt","cqabs","cqcos","cqexp","cqlog","cqsin","cqsqrt","dcmplx","dconjg","derf","derfc","dfloat","dgamma","dimag","dlgama","iqint","qabs","qacos","qasin","qatan","qatan2","qcmplx","qconjg","qcos","qco\ sh","qdim","qerf","qerfc","qexp","qgamma","qimag","qlgama","qlog","qlog10","qmax1","qmin1","qmod","qnint","qsign","qsin","qsinh","qsqrt","qtan","qtanh","abs","acos","aimag","aint","anint","asin","atan","atan2","char","cmplx","conjg","cos","cosh","exp","ichar","index","int","log","log10","max","min","nint","sign","sin","sinh","sqrt","tan","tanh","print","write","dim","lge","lgt","lle","llt","mod","nullify","allocate","deallocate","adjustl","adjustr","all","allocated","any","associated","bit_size", "btest","ceiling","count","cshift","date_and_time","digits","dot_product","eoshift","epsilon","exponent","floor","fraction","huge","iand","ibclr","ibits","ibset","ieor","ior","ishft","ishftc","lbound","len_trim","matmul","maxexponent","maxloc","maxval","merge","minexponent","minloc","minval","modulo","mvbits","nearest","pack","present","product","radix","random_number","random_seed","range","repeat","reshape","rrspacing","scale","scan","selected_int_kind","selected_real_kind","set_exponent","sha\ pe","size","spacing","spread","sum","system_clock","tiny","transpose","trim","ubound","unpack","verify","achar","iachar","transfer","dble","entry","dprod","cpu_time","command_argument_count","get_command","get_command_argument","get_environment_variable","is_iostat_end","ieee_arithmetic","ieee_support_underflow_control","ieee_get_underflow_mode","ieee_set_underflow_mode","is_iostat_eor","move_alloc","new_line","selected_char_kind","same_type_as","extends_type_of","acosh","asinh","atanh","bessel_\ j0","bessel_j1","bessel_jn","bessel_y0","bessel_y1","bessel_yn","erf","erfc","erfc_scaled","gamma","log_gamma","hypot","norm2","atomic_define","atomic_ref","execute_command_line","leadz","trailz","storage_size","merge_bits","bge","bgt","ble","blt","dshiftl","dshiftr","findloc","iall","iany","iparity","image_index","lcobound","ucobound","maskl","maskr","num_images","parity","popcnt","poppar","shifta","shiftl","shiftr","this_image","sync","change","team","co_broadcast","co_max","co_min","co_sum","\ co_reduce"]},illegal:/\/\*/,contains:[STRING,FUNCTION_DEF,{begin:/^C\s*=(?!=)/,relevance:0},COMMENT,NUMBER]}}function escape$1(value){return new RegExp(value.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}function source$1(re2){return re2?typeof re2=="string"?re2:re2.source:null}function lookahead$1(re2){return concat$1("(?=",re2,")")}function concat$1(...args){return args.map(x=>source$1(x)).join("")}function stripOptionsFromArgs$1(args){const opts=args[args.length-1];return typeof opts=="object"&& opts.constructor===Object?(args.splice(args.length-1,1),opts):{}}function either$1(...args){return"("+(stripOptionsFromArgs$1(args).capture?"":"?:")+args.map(x=>source$1(x)).join("|")+")"}function fsharp(hljs){const KEYWORDS2=["abstract","and","as","assert","base","begin","class","default","delegate","do","done","downcast","downto","elif","else","end","exception","extern","finally","fixed","for","fun","function","global","if","in","inherit","inline","interface","internal","lazy","let","match","m\ ember","module","mutable","namespace","new","of","open","or","override","private","public","rec","return","static","struct","then","to","try","type","upcast","use","val","void","when","while","with","yield"],BANG_KEYWORD_MODE={scope:"keyword",match:/\b(yield|return|let|do|match|use)!/},PREPROCESSOR_KEYWORDS=["if","else","endif","line","nowarn","light","r","i","I","load","time","help","quit"],LITERALS2=["true","false","null","Some","None","Ok","Error","infinity","infinityf","nan","nanf"],SPECIAL_IDENTIFIERS=[ "__LINE__","__SOURCE_DIRECTORY__","__SOURCE_FILE__"],KNOWN_TYPES=["bool","byte","sbyte","int8","int16","int32","uint8","uint16","uint32","int","uint","int64","uint64","nativeint","unativeint","decimal","float","double","float32","single","char","string","unit","bigint","option","voption","list","array","seq","byref","exn","inref","nativeptr","obj","outref","voidptr","Result"],ALL_KEYWORDS={keyword:KEYWORDS2,literal:LITERALS2,built_in:["not","ref","raise","reraise","dict","readOnlyDict","set","ge\ t","enum","sizeof","typeof","typedefof","nameof","nullArg","invalidArg","invalidOp","id","fst","snd","ignore","lock","using","box","unbox","tryUnbox","printf","printfn","sprintf","eprintf","eprintfn","fprintf","fprintfn","failwith","failwithf"],"variable.constant":SPECIAL_IDENTIFIERS},COMMENT={variants:[hljs.COMMENT(/\(\*(?!\))/,/\*\)/,{contains:["self"]}),hljs.C_LINE_COMMENT_MODE]},IDENTIFIER_RE=/[a-zA-Z_](\w|')*/,QUOTED_IDENTIFIER={scope:"variable",begin:/``/,end:/``/},BEGIN_GENERIC_TYPE_SYMBOL_RE=/\B('|\^)/, GENERIC_TYPE_SYMBOL={scope:"symbol",variants:[{match:concat$1(BEGIN_GENERIC_TYPE_SYMBOL_RE,/``.*?``/)},{match:concat$1(BEGIN_GENERIC_TYPE_SYMBOL_RE,hljs.UNDERSCORE_IDENT_RE)}],relevance:0},makeOperatorMode=function({includeEqual}){let allOperatorChars;includeEqual?allOperatorChars="!%&*+-/<=>@^|~?":allOperatorChars="!%&*+-/<>@^|~?";const OPERATOR_CHARS=Array.from(allOperatorChars),OPERATOR_CHAR_RE=concat$1("[",...OPERATOR_CHARS.map(escape$1),"]"),OPERATOR_CHAR_OR_DOT_RE=either$1(OPERATOR_CHAR_RE, /\./),OPERATOR_FIRST_CHAR_OF_MULTIPLE_RE=concat$1(OPERATOR_CHAR_OR_DOT_RE,lookahead$1(OPERATOR_CHAR_OR_DOT_RE)),SYMBOLIC_OPERATOR_RE=either$1(concat$1(OPERATOR_FIRST_CHAR_OF_MULTIPLE_RE,OPERATOR_CHAR_OR_DOT_RE,"*"),concat$1(OPERATOR_CHAR_RE,"+"));return{scope:"operator",match:either$1(SYMBOLIC_OPERATOR_RE,/:\?>/,/:\?/,/:>/,/:=/,/::?/,/\$/),relevance:0}},OPERATOR=makeOperatorMode({includeEqual:!0}),OPERATOR_WITHOUT_EQUAL=makeOperatorMode({includeEqual:!1}),makeTypeAnnotationMode=function(prefix,prefixScope){ return{begin:concat$1(prefix,lookahead$1(concat$1(/\s*/,either$1(/\w/,/'/,/\^/,/#/,/``/,/\(/,/{\|/)))),beginScope:prefixScope,end:lookahead$1(either$1(/\n/,/=/)),relevance:0,keywords:hljs.inherit(ALL_KEYWORDS,{type:KNOWN_TYPES}),contains:[COMMENT,GENERIC_TYPE_SYMBOL,hljs.inherit(QUOTED_IDENTIFIER,{scope:null}),OPERATOR_WITHOUT_EQUAL]}},TYPE_ANNOTATION=makeTypeAnnotationMode(/:/,"operator"),DISCRIMINATED_UNION_TYPE_ANNOTATION=makeTypeAnnotationMode(/\bof\b/,"keyword"),TYPE_DECLARATION={begin:[/(^|\s+)/, /type/,/\s+/,IDENTIFIER_RE],beginScope:{2:"keyword",4:"title.class"},end:lookahead$1(/\(|=|$/),keywords:ALL_KEYWORDS,contains:[COMMENT,hljs.inherit(QUOTED_IDENTIFIER,{scope:null}),GENERIC_TYPE_SYMBOL,{scope:"operator",match:/<|>/},TYPE_ANNOTATION]},COMPUTATION_EXPRESSION={scope:"computation-expression",match:/\b[_a-z]\w*(?=\s*\{)/},PREPROCESSOR={begin:[/^\s*/,concat$1(/#/,either$1(...PREPROCESSOR_KEYWORDS)),/\b/],beginScope:{2:"meta"},end:lookahead$1(/\s|$/)},NUMBER={variants:[hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]},QUOTED_STRING={scope:"string",begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE]},VERBATIM_STRING={scope:"string",begin:/@"/,end:/"/,contains:[{match:/""/},hljs.BACKSLASH_ESCAPE]},TRIPLE_QUOTED_STRING={scope:"string",begin:/"""/,end:/"""/,relevance:2},SUBST={scope:"subst",begin:/\{/,end:/\}/,keywords:ALL_KEYWORDS},INTERPOLATED_STRING={scope:"string",begin:/\$"/,end:/"/,contains:[{match:/\{\{/},{match:/\}\}/},hljs.BACKSLASH_ESCAPE,SUBST]},INTERPOLATED_VERBATIM_STRING={scope:"\ string",begin:/(\$@|@\$)"/,end:/"/,contains:[{match:/\{\{/},{match:/\}\}/},{match:/""/},hljs.BACKSLASH_ESCAPE,SUBST]},INTERPOLATED_TRIPLE_QUOTED_STRING={scope:"string",begin:/\$"""/,end:/"""/,contains:[{match:/\{\{/},{match:/\}\}/},SUBST],relevance:2},CHAR_LITERAL={scope:"string",match:concat$1(/'/,either$1(/[^\\']/,/\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8})/),/'/)};return SUBST.contains=[INTERPOLATED_VERBATIM_STRING,INTERPOLATED_STRING,VERBATIM_STRING,QUOTED_STRING,CHAR_LITERAL, BANG_KEYWORD_MODE,COMMENT,QUOTED_IDENTIFIER,TYPE_ANNOTATION,COMPUTATION_EXPRESSION,PREPROCESSOR,NUMBER,GENERIC_TYPE_SYMBOL,OPERATOR],{name:"F#",aliases:["fs","f#"],keywords:ALL_KEYWORDS,illegal:/\/\*/,classNameAliases:{"computation-expression":"keyword"},contains:[BANG_KEYWORD_MODE,{variants:[INTERPOLATED_TRIPLE_QUOTED_STRING,INTERPOLATED_VERBATIM_STRING,INTERPOLATED_STRING,TRIPLE_QUOTED_STRING,VERBATIM_STRING,QUOTED_STRING,CHAR_LITERAL]},COMMENT,QUOTED_IDENTIFIER,TYPE_DECLARATION,{scope:"meta", begin:/\[\]/,relevance:2,contains:[QUOTED_IDENTIFIER,TRIPLE_QUOTED_STRING,VERBATIM_STRING,QUOTED_STRING,CHAR_LITERAL,NUMBER]},DISCRIMINATED_UNION_TYPE_ANNOTATION,TYPE_ANNOTATION,COMPUTATION_EXPRESSION,PREPROCESSOR,NUMBER,GENERIC_TYPE_SYMBOL,OPERATOR]}}function gams(hljs){const regex=hljs.regex,KEYWORDS2={keyword:"abort acronym acronyms alias all and assign binary card diag display else eq file files for free ge gt if integer le loop lt maximizing minimizing model models ne negative no n\ ot option options or ord positive prod put putpage puttl repeat sameas semicont semiint smax smin solve sos1 sos2 sum system table then until using while xor yes",literal:"eps inf na",built_in:"abs arccos arcsin arctan arctan2 Beta betaReg binomial ceil centropy cos cosh cvPower div div0 eDist entropy errorf execSeed exp fact floor frac gamma gammaReg log logBeta logGamma log10 log2 mapVal max min mod ncpCM ncpF ncpVUpow ncpVUsin normal pi poly power randBinomial randLinear randTriangle round rP\ ower sigmoid sign signPower sin sinh slexp sllog10 slrec sqexp sqlog10 sqr sqrec sqrt tan tanh trunc uniform uniformInt vcPower bool_and bool_eqv bool_imp bool_not bool_or bool_xor ifThen rel_eq rel_ge rel_gt rel_le rel_lt rel_ne gday gdow ghour gleap gmillisec gminute gmonth gsecond gyear jdate jnow jstart jtime errorLevel execError gamsRelease gamsVersion handleCollect handleDelete handleStatus handleSubmit heapFree heapLimit heapSize jobHandle jobKill jobStatus jobTerminate licenseLevel licen\ seStatus maxExecError sleep timeClose timeComp timeElapsed timeExec timeStart"},PARAMS={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0},SYMBOLS={className:"symbol",variants:[{begin:/=[lgenxc]=/},{begin:/\$/}]},QSTR={className:"comment",variants:[{begin:"'",end:"'"},{begin:'"',end:'"'}],illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]},ASSIGNMENT={begin:"/",end:"/",keywords:KEYWORDS2,contains:[QSTR,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs. APOS_STRING_MODE,hljs.C_NUMBER_MODE]},COMMENT_WORD=/[a-z0-9&#*=?@\\><:,()$[\]_.{}!+%^-]+/,DESCTEXT={begin:/[a-z][a-z0-9_]*(\([a-z0-9_, ]*\))?[ \t]+/,excludeBegin:!0,end:"$",endsWithParent:!0,contains:[QSTR,ASSIGNMENT,{className:"comment",begin:regex.concat(COMMENT_WORD,regex.anyNumberOfTimes(regex.concat(/[ ]+/,COMMENT_WORD))),relevance:0}]};return{name:"GAMS",aliases:["gms"],case_insensitive:!0,keywords:KEYWORDS2,contains:[hljs.COMMENT(/^\$ontext/,/^\$offtext/),{className:"meta",begin:"^\\$[a-z0\ -9]+",end:"$",returnBegin:!0,contains:[{className:"keyword",begin:"^\\$[a-z0-9]+"}]},hljs.COMMENT("^\\*","$"),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,{beginKeywords:"set sets parameter parameters variable variables scalar scalars equation equations",end:";",contains:[hljs.COMMENT("^\\*","$"),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,ASSIGNMENT,DESCTEXT]},{beginKeywords:"table",end:";",returnBegin:!0, contains:[{beginKeywords:"table",end:"$",contains:[DESCTEXT]},hljs.COMMENT("^\\*","$"),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,hljs.C_NUMBER_MODE]},{className:"function",begin:/^[a-z][a-z0-9_,\-+' ()$]+\.{2}/,returnBegin:!0,contains:[{className:"title",begin:/^[a-z0-9_]+/},PARAMS,SYMBOLS]},hljs.C_NUMBER_MODE,SYMBOLS]}}function gauss(hljs){const KEYWORDS2={keyword:"bool break call callexe checkinterrupt clear clearg closeall cls comlog compi\ le continue create debug declare delete disable dlibrary dllcall do dos ed edit else elseif enable end endfor endif endp endo errorlog errorlogat expr external fn for format goto gosub graph if keyword let lib library line load loadarray loadexe loadf loadk loadm loadp loads loadx local locate loopnextindex lprint lpwidth lshow matrix msym ndpclex new open output outwidth plot plotsym pop prcsn print printdos proc push retp return rndcon rndmod rndmult rndseed run save saveall screen scroll seta\ rray show sparse stop string struct system trace trap threadfor threadendfor threadbegin threadjoin threadstat threadend until use while winprint ne ge le gt lt and xor or not eq eqv",built_in:"abs acf aconcat aeye amax amean AmericanBinomCall AmericanBinomCall_Greeks AmericanBinomCall_ImpVol AmericanBinomPut AmericanBinomPut_Greeks AmericanBinomPut_ImpVol AmericanBSCall AmericanBSCall_Greeks AmericanBSCall_ImpVol AmericanBSPut AmericanBSPut_Greeks AmericanBSPut_ImpVol amin amult annotationGetDe\ faults annotationSetBkd annotationSetFont annotationSetLineColor annotationSetLineStyle annotationSetLineThickness annualTradingDays arccos arcsin areshape arrayalloc arrayindex arrayinit arraytomat asciiload asclabel astd astds asum atan atan2 atranspose axmargin balance band bandchol bandcholsol bandltsol bandrv bandsolpd bar base10 begwind besselj bessely beta box boxcox cdfBeta cdfBetaInv cdfBinomial cdfBinomialInv cdfBvn cdfBvn2 cdfBvn2e cdfCauchy cdfCauchyInv cdfChic cdfChii cdfChinc cdfCh\ incInv cdfExp cdfExpInv cdfFc cdfFnc cdfFncInv cdfGam cdfGenPareto cdfHyperGeo cdfLaplace cdfLaplaceInv cdfLogistic cdfLogisticInv cdfmControlCreate cdfMvn cdfMvn2e cdfMvnce cdfMvne cdfMvt2e cdfMvtce cdfMvte cdfN cdfN2 cdfNc cdfNegBinomial cdfNegBinomialInv cdfNi cdfPoisson cdfPoissonInv cdfRayleigh cdfRayleighInv cdfTc cdfTci cdfTnc cdfTvn cdfWeibull cdfWeibullInv cdir ceil ChangeDir chdir chiBarSquare chol choldn cholsol cholup chrs close code cols colsf combinate combinated complex con cond c\ onj cons ConScore contour conv convertsatostr convertstrtosa corrm corrms corrvc corrx corrxs cos cosh counts countwts crossprd crout croutp csrcol csrlin csvReadM csvReadSA cumprodc cumsumc curve cvtos datacreate datacreatecomplex datalist dataload dataloop dataopen datasave date datestr datestring datestrymd dayinyr dayofweek dbAddDatabase dbClose dbCommit dbCreateQuery dbExecQuery dbGetConnectOptions dbGetDatabaseName dbGetDriverName dbGetDrivers dbGetHostName dbGetLastErrorNum dbGetLastError\ Text dbGetNumericalPrecPolicy dbGetPassword dbGetPort dbGetTableHeaders dbGetTables dbGetUserName dbHasFeature dbIsDriverAvailable dbIsOpen dbIsOpenError dbOpen dbQueryBindValue dbQueryClear dbQueryCols dbQueryExecPrepared dbQueryFetchAllM dbQueryFetchAllSA dbQueryFetchOneM dbQueryFetchOneSA dbQueryFinish dbQueryGetBoundValue dbQueryGetBoundValues dbQueryGetField dbQueryGetLastErrorNum dbQueryGetLastErrorText dbQueryGetLastInsertID dbQueryGetLastQuery dbQueryGetPosition dbQueryIsActive dbQueryIs\ ForwardOnly dbQueryIsNull dbQueryIsSelect dbQueryIsValid dbQueryPrepare dbQueryRows dbQuerySeek dbQuerySeekFirst dbQuerySeekLast dbQuerySeekNext dbQuerySeekPrevious dbQuerySetForwardOnly dbRemoveDatabase dbRollback dbSetConnectOptions dbSetDatabaseName dbSetHostName dbSetNumericalPrecPolicy dbSetPort dbSetUserName dbTransaction DeleteFile delif delrows denseToSp denseToSpRE denToZero design det detl dfft dffti diag diagrv digamma doswin DOSWinCloseall DOSWinOpen dotfeq dotfeqmt dotfge dotfgemt d\ otfgt dotfgtmt dotfle dotflemt dotflt dotfltmt dotfne dotfnemt draw drop dsCreate dstat dstatmt dstatmtControlCreate dtdate dtday dttime dttodtv dttostr dttoutc dtvnormal dtvtodt dtvtoutc dummy dummybr dummydn eig eigh eighv eigv elapsedTradingDays endwind envget eof eqSolve eqSolvemt eqSolvemtControlCreate eqSolvemtOutCreate eqSolveset erf erfc erfccplx erfcplx error etdays ethsec etstr EuropeanBinomCall EuropeanBinomCall_Greeks EuropeanBinomCall_ImpVol EuropeanBinomPut EuropeanBinomPut_Greeks \ EuropeanBinomPut_ImpVol EuropeanBSCall EuropeanBSCall_Greeks EuropeanBSCall_ImpVol EuropeanBSPut EuropeanBSPut_Greeks EuropeanBSPut_ImpVol exctsmpl exec execbg exp extern eye fcheckerr fclearerr feq feqmt fflush fft ffti fftm fftmi fftn fge fgemt fgets fgetsa fgetsat fgetst fgt fgtmt fileinfo filesa fle flemt floor flt fltmt fmod fne fnemt fonts fopen formatcv formatnv fputs fputst fseek fstrerror ftell ftocv ftos ftostrC gamma gammacplx gammaii gausset gdaAppend gdaCreate gdaDStat gdaDStatMat g\ daGetIndex gdaGetName gdaGetNames gdaGetOrders gdaGetType gdaGetTypes gdaGetVarInfo gdaIsCplx gdaLoad gdaPack gdaRead gdaReadByIndex gdaReadSome gdaReadSparse gdaReadStruct gdaReportVarInfo gdaSave gdaUpdate gdaUpdateAndPack gdaVars gdaWrite gdaWrite32 gdaWriteSome getarray getdims getf getGAUSShome getmatrix getmatrix4D getname getnamef getNextTradingDay getNextWeekDay getnr getorders getpath getPreviousTradingDay getPreviousWeekDay getRow getscalar3D getscalar4D getTrRow getwind glm gradcplx g\ radMT gradMTm gradMTT gradMTTm gradp graphprt graphset hasimag header headermt hess hessMT hessMTg hessMTgw hessMTm hessMTmw hessMTT hessMTTg hessMTTgw hessMTTm hessMTw hessp hist histf histp hsec imag indcv indexcat indices indices2 indicesf indicesfn indnv indsav integrate1d integrateControlCreate intgrat2 intgrat3 inthp1 inthp2 inthp3 inthp4 inthpControlCreate intquad1 intquad2 intquad3 intrleav intrleavsa intrsect intsimp inv invpd invswp iscplx iscplxf isden isinfnanmiss ismiss key keyav ke\ yw lag lag1 lagn lapEighb lapEighi lapEighvb lapEighvi lapgEig lapgEigh lapgEighv lapgEigv lapgSchur lapgSvdcst lapgSvds lapgSvdst lapSvdcusv lapSvds lapSvdusv ldlp ldlsol linSolve listwise ln lncdfbvn lncdfbvn2 lncdfmvn lncdfn lncdfn2 lncdfnc lnfact lngammacplx lnpdfmvn lnpdfmvt lnpdfn lnpdft loadd loadstruct loadwind loess loessmt loessmtControlCreate log loglog logx logy lower lowmat lowmat1 ltrisol lu lusol machEpsilon make makevars makewind margin matalloc matinit mattoarray maxbytes maxc m\ axindc maxv maxvec mbesselei mbesselei0 mbesselei1 mbesseli mbesseli0 mbesseli1 meanc median mergeby mergevar minc minindc minv miss missex missrv moment momentd movingave movingaveExpwgt movingaveWgt nextindex nextn nextnevn nextwind ntos null null1 numCombinations ols olsmt olsmtControlCreate olsqr olsqr2 olsqrmt ones optn optnevn orth outtyp pacf packedToSp packr parse pause pdfCauchy pdfChi pdfExp pdfGenPareto pdfHyperGeo pdfLaplace pdfLogistic pdfn pdfPoisson pdfRayleigh pdfWeibull pi pinv \ pinvmt plotAddArrow plotAddBar plotAddBox plotAddHist plotAddHistF plotAddHistP plotAddPolar plotAddScatter plotAddShape plotAddTextbox plotAddTS plotAddXY plotArea plotBar plotBox plotClearLayout plotContour plotCustomLayout plotGetDefaults plotHist plotHistF plotHistP plotLayout plotLogLog plotLogX plotLogY plotOpenWindow plotPolar plotSave plotScatter plotSetAxesPen plotSetBar plotSetBarFill plotSetBarStacked plotSetBkdColor plotSetFill plotSetGrid plotSetLegend plotSetLineColor plotSetLineSt\ yle plotSetLineSymbol plotSetLineThickness plotSetNewWindow plotSetTitle plotSetWhichYAxis plotSetXAxisShow plotSetXLabel plotSetXRange plotSetXTicInterval plotSetXTicLabel plotSetYAxisShow plotSetYLabel plotSetYRange plotSetZAxisShow plotSetZLabel plotSurface plotTS plotXY polar polychar polyeval polygamma polyint polymake polymat polymroot polymult polyroot pqgwin previousindex princomp printfm printfmt prodc psi putarray putf putvals pvCreate pvGetIndex pvGetParNames pvGetParVector pvLength p\ vList pvPack pvPacki pvPackm pvPackmi pvPacks pvPacksi pvPacksm pvPacksmi pvPutParVector pvTest pvUnpack QNewton QNewtonmt QNewtonmtControlCreate QNewtonmtOutCreate QNewtonSet QProg QProgmt QProgmtInCreate qqr qqre qqrep qr qre qrep qrsol qrtsol qtyr qtyre qtyrep quantile quantiled qyr qyre qyrep qz rank rankindx readr real reclassify reclassifyCuts recode recserar recsercp recserrc rerun rescale reshape rets rev rfft rffti rfftip rfftn rfftnp rfftp rndBernoulli rndBeta rndBinomial rndCauchy rnd\ ChiSquare rndCon rndCreateState rndExp rndGamma rndGeo rndGumbel rndHyperGeo rndi rndKMbeta rndKMgam rndKMi rndKMn rndKMnb rndKMp rndKMu rndKMvm rndLaplace rndLCbeta rndLCgam rndLCi rndLCn rndLCnb rndLCp rndLCu rndLCvm rndLogNorm rndMTu rndMVn rndMVt rndn rndnb rndNegBinomial rndp rndPoisson rndRayleigh rndStateSkip rndu rndvm rndWeibull rndWishart rotater round rows rowsf rref sampleData satostrC saved saveStruct savewind scale scale3d scalerr scalinfnanmiss scalmiss schtoc schur searchsourcepa\ th seekr select selif seqa seqm setdif setdifsa setvars setvwrmode setwind shell shiftr sin singleindex sinh sleep solpd sortc sortcc sortd sorthc sorthcc sortind sortindc sortmc sortr sortrc spBiconjGradSol spChol spConjGradSol spCreate spDenseSubmat spDiagRvMat spEigv spEye spLDL spline spLU spNumNZE spOnes spreadSheetReadM spreadSheetReadSA spreadSheetWrite spScale spSubmat spToDense spTrTDense spTScalar spZeros sqpSolve sqpSolveMT sqpSolveMTControlCreate sqpSolveMTlagrangeCreate sqpSolveMTou\ tCreate sqpSolveSet sqrt statements stdc stdsc stocv stof strcombine strindx strlen strput strrindx strsect strsplit strsplitPad strtodt strtof strtofcplx strtriml strtrimr strtrunc strtruncl strtruncpad strtruncr submat subscat substute subvec sumc sumr surface svd svd1 svd2 svdcusv svds svdusv sysstate tab tan tanh tempname time timedt timestr timeutc title tkf2eps tkf2ps tocart todaydt toeplitz token topolar trapchk trigamma trimr trunc type typecv typef union unionsa uniqindx uniqindxsa uniq\ ue uniquesa upmat upmat1 upper utctodt utctodtv utrisol vals varCovMS varCovXS varget vargetl varmall varmares varput varputl vartypef vcm vcms vcx vcxs vec vech vecr vector vget view viewxyz vlist vnamecv volume vput vread vtypecv wait waitc walkindex where window writer xlabel xlsGetSheetCount xlsGetSheetSize xlsGetSheetTypes xlsMakeRange xlsReadM xlsReadSA xlsWrite xlsWriteM xlsWriteSA xpnd xtics xy xyz ylabel ytics zeros zeta zlabel ztics cdfEmpirical dot h5create h5open h5read h5readAttribu\ te h5write h5writeAttribute ldl plotAddErrorBar plotAddSurface plotCDFEmpirical plotSetColormap plotSetContourLabels plotSetLegendFont plotSetTextInterpreter plotSetXTicCount plotSetYTicCount plotSetZLevels powerm strjoin sylvester strtrim",literal:"DB_AFTER_LAST_ROW DB_ALL_TABLES DB_BATCH_OPERATIONS DB_BEFORE_FIRST_ROW DB_BLOB DB_EVENT_NOTIFICATIONS DB_FINISH_QUERY DB_HIGH_PRECISION DB_LAST_INSERT_ID DB_LOW_PRECISION_DOUBLE DB_LOW_PRECISION_INT32 DB_LOW_PRECISION_INT64 DB_LOW_PRECISION_NUMBERS \ DB_MULTIPLE_RESULT_SETS DB_NAMED_PLACEHOLDERS DB_POSITIONAL_PLACEHOLDERS DB_PREPARED_QUERIES DB_QUERY_SIZE DB_SIMPLE_LOCKING DB_SYSTEM_TABLES DB_TABLES DB_TRANSACTIONS DB_UNICODE DB_VIEWS __STDIN __STDOUT __STDERR __FILE_DIR"},AT_COMMENT_MODE=hljs.COMMENT("@","@"),PREPROCESSOR={className:"meta",begin:"#",end:"$",keywords:{keyword:"define definecs|10 undef ifdef ifndef iflight ifdllcall ifmac ifos2win ifunix else endif lineson linesoff srcfile srcline"},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"\ include",end:"$",keywords:{keyword:"include"},contains:[{className:"string",begin:'"',end:'"',illegal:"\\n"}]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,AT_COMMENT_MODE]},STRUCT_TYPE={begin:/\bstruct\s+/,end:/\s/,keywords:"struct",contains:[{className:"type",begin:hljs.UNDERSCORE_IDENT_RE,relevance:0}]},PARSE_PARAMS=[{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,endsWithParent:!0,relevance:0,contains:[{className:"literal",begin:/\.\.\./},hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE, AT_COMMENT_MODE,STRUCT_TYPE]}],FUNCTION_DEF={className:"title",begin:hljs.UNDERSCORE_IDENT_RE,relevance:0},DEFINITION=function(beginKeywords,end,inherits){const mode=hljs.inherit({className:"function",beginKeywords,end,excludeEnd:!0,contains:[].concat(PARSE_PARAMS)},{});return mode.contains.push(FUNCTION_DEF),mode.contains.push(hljs.C_NUMBER_MODE),mode.contains.push(hljs.C_BLOCK_COMMENT_MODE),mode.contains.push(AT_COMMENT_MODE),mode},BUILT_IN_REF={className:"built_in",begin:"\\b("+KEYWORDS2.built_in. split(" ").join("|")+")\\b"},STRING_REF={className:"string",begin:'"',end:'"',contains:[hljs.BACKSLASH_ESCAPE],relevance:0},FUNCTION_REF={begin:hljs.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,keywords:KEYWORDS2,relevance:0,contains:[{beginKeywords:KEYWORDS2.keyword},BUILT_IN_REF,{className:"built_in",begin:hljs.UNDERSCORE_IDENT_RE,relevance:0}]},FUNCTION_REF_PARAMS={begin:/\(/,end:/\)/,relevance:0,keywords:{built_in:KEYWORDS2.built_in,literal:KEYWORDS2.literal},contains:[hljs.C_NUMBER_MODE,hljs. C_BLOCK_COMMENT_MODE,AT_COMMENT_MODE,BUILT_IN_REF,FUNCTION_REF,STRING_REF,"self"]};return FUNCTION_REF.contains.push(FUNCTION_REF_PARAMS),{name:"GAUSS",aliases:["gss"],case_insensitive:!0,keywords:KEYWORDS2,illegal:/(\{[%#]|[%#]\}| <- )/,contains:[hljs.C_NUMBER_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,AT_COMMENT_MODE,STRING_REF,PREPROCESSOR,{className:"keyword",begin:/\bexternal (matrix|string|array|sparse matrix|struct|proc|keyword|fn)/},DEFINITION("proc keyword",";"),DEFINITION( "fn","="),{beginKeywords:"for threadfor",end:/;/,relevance:0,contains:[hljs.C_BLOCK_COMMENT_MODE,AT_COMMENT_MODE,FUNCTION_REF_PARAMS]},{variants:[{begin:hljs.UNDERSCORE_IDENT_RE+"\\."+hljs.UNDERSCORE_IDENT_RE},{begin:hljs.UNDERSCORE_IDENT_RE+"\\s*="}],relevance:0},FUNCTION_REF,STRUCT_TYPE]}}function gcode(hljs){const regex=hljs.regex,GCODE_KEYWORDS={$pattern:/[A-Z]+|%/,keyword:["THEN","ELSE","ENDIF","IF","GOTO","DO","WHILE","WH","END","CALL","SUB","ENDSUB","EQ","NE","LT","GT","LE","GE","AND","OR", "XOR","%"],built_in:["ATAN","ABS","ACOS","ASIN","COS","EXP","FIX","FUP","ROUND","LN","SIN","SQRT","TAN","EXISTS"]},LETTER_BOUNDARY_RE=/\b/;function LETTER_BOUNDARY_CALLBACK(matchdata,response){if(matchdata.index===0)return;const charBeforeMatch=matchdata.input[matchdata.index-1];charBeforeMatch>="0"&&charBeforeMatch<="9"||charBeforeMatch!=="_"&&response.ignoreMatch()}const NUMBER_RE=/[+-]?((\.\d+)|(\d+)(\.\d*)?)/,GENERAL_MISC_FUNCTION_RE=/[GM]\s*\d+(\.\d+)?/,TOOLS_RE=/T\s*\d+/,SUBROUTINE_RE=/O\s*\d+/, SUBROUTINE_NAMED_RE=/O<.+>/,AXES_RE=/[ABCUVWXYZ]\s*/,PARAMETERS_RE=/[FHIJKPQRS]\s*/,GCODE_CODE=[hljs.COMMENT(/\(/,/\)/),hljs.COMMENT(/;/,/$/),hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,{scope:"title.function",variants:[{match:regex.concat(LETTER_BOUNDARY_RE,GENERAL_MISC_FUNCTION_RE)},{begin:GENERAL_MISC_FUNCTION_RE,"on:begin":LETTER_BOUNDARY_CALLBACK},{match:regex.concat(LETTER_BOUNDARY_RE,TOOLS_RE)},{begin:TOOLS_RE,"on:begin":LETTER_BOUNDARY_CALLBACK}]},{scope:"symbol",variants:[ {match:regex.concat(LETTER_BOUNDARY_RE,SUBROUTINE_RE)},{begin:SUBROUTINE_RE,"on:begin":LETTER_BOUNDARY_CALLBACK},{match:regex.concat(LETTER_BOUNDARY_RE,SUBROUTINE_NAMED_RE)},{begin:SUBROUTINE_NAMED_RE,"on:begin":LETTER_BOUNDARY_CALLBACK},{match:/\*\s*\d+\s*$/}]},{scope:"operator",match:/^N\s*\d+/},{scope:"variable",match:/-?#\s*\d+/},{scope:"property",variants:[{match:regex.concat(LETTER_BOUNDARY_RE,AXES_RE,NUMBER_RE)},{begin:regex.concat(AXES_RE,NUMBER_RE),"on:begin":LETTER_BOUNDARY_CALLBACK}]}, {scope:"params",variants:[{match:regex.concat(LETTER_BOUNDARY_RE,PARAMETERS_RE,NUMBER_RE)},{begin:regex.concat(PARAMETERS_RE,NUMBER_RE),"on:begin":LETTER_BOUNDARY_CALLBACK}]}];return{name:"G-code (ISO 6983)",aliases:["nc"],case_insensitive:!0,disableAutodetect:!0,keywords:GCODE_KEYWORDS,contains:GCODE_CODE}}function gherkin(hljs){return{name:"Gherkin",aliases:["feature"],keywords:"Feature Background Ability Business Need Scenario Scenarios Scenario Outline Scenario Template Examples Given And Th\ en But When",contains:[{className:"symbol",begin:"\\*",relevance:0},{className:"meta",begin:"@[^@\\s]+"},{begin:"\\|",end:"\\|\\w*$",contains:[{className:"string",begin:"[^|]+"}]},{className:"variable",begin:"<",end:">"},hljs.HASH_COMMENT_MODE,{className:"string",begin:'"""',end:'"""'},hljs.QUOTE_STRING_MODE]}}function glsl(hljs){return{name:"GLSL",keywords:{keyword:"break continue discard do else for if return while switch case default attribute binding buffer ccw centroid centroid varying cohe\ rent column_major const cw depth_any depth_greater depth_less depth_unchanged early_fragment_tests equal_spacing flat fractional_even_spacing fractional_odd_spacing highp in index inout invariant invocations isolines layout line_strip lines lines_adjacency local_size_x local_size_y local_size_z location lowp max_vertices mediump noperspective offset origin_upper_left out packed patch pixel_center_integer point_mode points precise precision quads r11f_g11f_b10f r16 r16_snorm r16f r16i r16ui r32f \ r32i r32ui r8 r8_snorm r8i r8ui readonly restrict rg16 rg16_snorm rg16f rg16i rg16ui rg32f rg32i rg32ui rg8 rg8_snorm rg8i rg8ui rgb10_a2 rgb10_a2ui rgba16 rgba16_snorm rgba16f rgba16i rgba16ui rgba32f rgba32i rgba32ui rgba8 rgba8_snorm rgba8i rgba8ui row_major sample shared smooth std140 std430 stream triangle_strip triangles triangles_adjacency uniform varying vertices volatile writeonly",type:"atomic_uint bool bvec2 bvec3 bvec4 dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4\ dmat4x2 dmat4x3 dmat4x4 double dvec2 dvec3 dvec4 float iimage1D iimage1DArray iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer iimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect image3D imageBuffer imageCube imageCubeArray int isampler1D isampler1DArray isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 mat2 m\ at2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow image1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint usampler\ 1D usampler1DArray usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D samplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 vec2 vec3 vec4 void",built_in:"gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxComputeAtomicCounterBuffers gl_MaxC\ omputeAtomicCounters gl_MaxComputeImageUniforms gl_MaxComputeTextureImageUnits gl_MaxComputeUniformComponents gl_MaxComputeWorkGroupCount gl_MaxComputeWorkGroupSize gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentInputVectors gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryI\ nputComponents gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUn\ its gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryi\ ngVectors gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexOutputVectors gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffset gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS \ gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_GlobalInvocationID gl_InstanceID gl_InvocationID gl_Layer gl_LightModel gl_LightSource gl_LocalInvocationID gl_LocalInvocationIndex gl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewP\ rojectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_NumSamples gl_NumWorkGroups gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMa\ trix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor gl_TextureMatrix gl_TextureMatrixInverse gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_WorkGroupID gl_WorkGroupSize gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive a\ bs acos acosh all any asin asinh atan atanh atomicAdd atomicAnd atomicCompSwap atomicCounter atomicCounterDecrement atomicCounterIncrement atomicExchange atomicMax atomicMin atomicOr atomicXor barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan greaterThanEqual groupMemoryBarrier imageAtomicA\ dd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageSize imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memoryBarrier memoryBarrierAtomicCounter memoryBarrierBuffer memoryBarrierImage memoryBarrierShared min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqua\ l outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textu\ reCubeLod textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod textureProjLodOffset textureProjOffset textureQueryLevels textureQueryLod textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow",literal:"true false"},illegal:'"',contains:[hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE,hljs.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$"}]}}function gml(hljs){return{name:"GML",case_insensitive:!1,keywords:{keyword:["#endregion","#macro","#region","and","begin","break","case","constructor","continue","default","delete","div","do","else","end","enum","exit","for","function","globalvar","if","mod","new","not","or","repeat","return","static","switch","then","until","var","while","with","xor"],built_in:["abs","alarm_get","alarm_set","angle_difference","a\ nimcurve_channel_evaluate","animcurve_channel_new","animcurve_create","animcurve_destroy","animcurve_exists","animcurve_get","animcurve_get_channel","animcurve_get_channel_index","animcurve_point_new","ansi_char","application_get_position","application_surface_draw_enable","application_surface_enable","application_surface_is_enabled","arccos","arcsin","arctan","arctan2","array_all","array_any","array_concat","array_contains","array_contains_ext","array_copy","array_copy_while","array_create","ar\ ray_create_ext","array_delete","array_equals","array_filter","array_filter_ext","array_find_index","array_first","array_foreach","array_get","array_get_index","array_insert","array_intersection","array_last","array_length","array_map","array_map_ext","array_pop","array_push","array_reduce","array_resize","array_reverse","array_reverse_ext","array_set","array_shuffle","array_shuffle_ext","array_sort","array_union","array_unique","array_unique_ext","asset_add_tags","asset_clear_tags","asset_get_id\ s","asset_get_index","asset_get_tags","asset_get_type","asset_has_any_tag","asset_has_tags","asset_remove_tags","audio_bus_clear_emitters","audio_bus_create","audio_bus_get_emitters","audio_channel_num","audio_create_buffer_sound","audio_create_play_queue","audio_create_stream","audio_create_sync_group","audio_debug","audio_destroy_stream","audio_destroy_sync_group","audio_effect_create","audio_emitter_bus","audio_emitter_create","audio_emitter_exists","audio_emitter_falloff","audio_emitter_free", "audio_emitter_gain","audio_emitter_get_bus","audio_emitter_get_gain","audio_emitter_get_listener_mask","audio_emitter_get_pitch","audio_emitter_get_vx","audio_emitter_get_vy","audio_emitter_get_vz","audio_emitter_get_x","audio_emitter_get_y","audio_emitter_get_z","audio_emitter_pitch","audio_emitter_position","audio_emitter_set_listener_mask","audio_emitter_velocity","audio_exists","audio_falloff_set_model","audio_free_buffer_sound","audio_free_play_queue","audio_get_listener_count","audio_get_\ listener_info","audio_get_listener_mask","audio_get_master_gain","audio_get_name","audio_get_recorder_count","audio_get_recorder_info","audio_get_type","audio_group_get_assets","audio_group_get_gain","audio_group_is_loaded","audio_group_load","audio_group_load_progress","audio_group_name","audio_group_set_gain","audio_group_stop_all","audio_group_unload","audio_is_paused","audio_is_playing","audio_listener_get_data","audio_listener_orientation","audio_listener_position","audio_listener_set_orien\ tation","audio_listener_set_position","audio_listener_set_velocity","audio_listener_velocity","audio_master_gain","audio_pause_all","audio_pause_sound","audio_pause_sync_group","audio_play_in_sync_group","audio_play_sound","audio_play_sound_at","audio_play_sound_ext","audio_play_sound_on","audio_queue_sound","audio_resume_all","audio_resume_sound","audio_resume_sync_group","audio_set_listener_mask","audio_set_master_gain","audio_sound_gain","audio_sound_get_audio_group","audio_sound_get_gain","a\ udio_sound_get_listener_mask","audio_sound_get_loop","audio_sound_get_loop_end","audio_sound_get_loop_start","audio_sound_get_pitch","audio_sound_get_track_position","audio_sound_is_playable","audio_sound_length","audio_sound_loop","audio_sound_loop_end","audio_sound_loop_start","audio_sound_pitch","audio_sound_set_listener_mask","audio_sound_set_track_position","audio_start_recording","audio_start_sync_group","audio_stop_all","audio_stop_recording","audio_stop_sound","audio_stop_sync_group","au\ dio_sync_group_debug","audio_sync_group_get_track_pos","audio_sync_group_is_paused","audio_sync_group_is_playing","audio_system_is_available","audio_system_is_initialised","base64_decode","base64_encode","bool","browser_input_capture","buffer_async_group_begin","buffer_async_group_end","buffer_async_group_option","buffer_base64_decode","buffer_base64_decode_ext","buffer_base64_encode","buffer_compress","buffer_copy","buffer_copy_from_vertex_buffer","buffer_copy_stride","buffer_crc32","buffer_cre\ ate","buffer_create_from_vertex_buffer","buffer_create_from_vertex_buffer_ext","buffer_decompress","buffer_delete","buffer_exists","buffer_fill","buffer_get_address","buffer_get_alignment","buffer_get_size","buffer_get_surface","buffer_get_type","buffer_load","buffer_load_async","buffer_load_ext","buffer_load_partial","buffer_md5","buffer_peek","buffer_poke","buffer_read","buffer_resize","buffer_save","buffer_save_async","buffer_save_ext","buffer_seek","buffer_set_surface","buffer_set_used_size", "buffer_sha1","buffer_sizeof","buffer_tell","buffer_write","call_cancel","call_later","camera_apply","camera_copy_transforms","camera_create","camera_create_view","camera_destroy","camera_get_active","camera_get_begin_script","camera_get_default","camera_get_end_script","camera_get_proj_mat","camera_get_update_script","camera_get_view_angle","camera_get_view_border_x","camera_get_view_border_y","camera_get_view_height","camera_get_view_mat","camera_get_view_speed_x","camera_get_view_speed_y","ca\ mera_get_view_target","camera_get_view_width","camera_get_view_x","camera_get_view_y","camera_set_begin_script","camera_set_default","camera_set_end_script","camera_set_proj_mat","camera_set_update_script","camera_set_view_angle","camera_set_view_border","camera_set_view_mat","camera_set_view_pos","camera_set_view_size","camera_set_view_speed","camera_set_view_target","ceil","choose","chr","clamp","clickable_add","clickable_add_ext","clickable_change","clickable_change_ext","clickable_delete","c\ lickable_exists","clickable_set_style","clipboard_get_text","clipboard_has_text","clipboard_set_text","cloud_file_save","cloud_string_save","cloud_synchronise","code_is_compiled","collision_circle","collision_circle_list","collision_ellipse","collision_ellipse_list","collision_line","collision_line_list","collision_point","collision_point_list","collision_rectangle","collision_rectangle_list","color_get_blue","color_get_green","color_get_hue","color_get_red","color_get_saturation","color_get_val\ ue","colour_get_blue","colour_get_green","colour_get_hue","colour_get_red","colour_get_saturation","colour_get_value","cos","darccos","darcsin","darctan","darctan2","date_compare_date","date_compare_datetime","date_compare_time","date_create_datetime","date_current_datetime","date_date_of","date_date_string","date_datetime_string","date_day_span","date_days_in_month","date_days_in_year","date_get_day","date_get_day_of_year","date_get_hour","date_get_hour_of_year","date_get_minute","date_get_minu\ te_of_year","date_get_month","date_get_second","date_get_second_of_year","date_get_timezone","date_get_week","date_get_weekday","date_get_year","date_hour_span","date_inc_day","date_inc_hour","date_inc_minute","date_inc_month","date_inc_second","date_inc_week","date_inc_year","date_is_today","date_leap_year","date_minute_span","date_month_span","date_second_span","date_set_timezone","date_time_of","date_time_string","date_valid_datetime","date_week_span","date_year_span","db_to_lin","dbg_add_fon\ t_glyphs","dbg_button","dbg_checkbox","dbg_color","dbg_colour","dbg_drop_down","dbg_same_line","dbg_section","dbg_section_delete","dbg_section_exists","dbg_slider","dbg_slider_int","dbg_sprite","dbg_text","dbg_text_input","dbg_view","dbg_view_delete","dbg_view_exists","dbg_watch","dcos","debug_event","debug_get_callstack","degtorad","device_get_tilt_x","device_get_tilt_y","device_get_tilt_z","device_is_keypad_open","device_mouse_check_button","device_mouse_check_button_pressed","device_mouse_che\ ck_button_released","device_mouse_dbclick_enable","device_mouse_raw_x","device_mouse_raw_y","device_mouse_x","device_mouse_x_to_gui","device_mouse_y","device_mouse_y_to_gui","directory_create","directory_destroy","directory_exists","display_get_dpi_x","display_get_dpi_y","display_get_frequency","display_get_gui_height","display_get_gui_width","display_get_height","display_get_orientation","display_get_sleep_margin","display_get_timing_method","display_get_width","display_mouse_get_x","display_mo\ use_get_y","display_mouse_set","display_reset","display_set_gui_maximise","display_set_gui_maximize","display_set_gui_size","display_set_sleep_margin","display_set_timing_method","display_set_ui_visibility","distance_to_object","distance_to_point","dot_product","dot_product_3d","dot_product_3d_normalised","dot_product_3d_normalized","dot_product_normalised","dot_product_normalized","draw_arrow","draw_button","draw_circle","draw_circle_color","draw_circle_colour","draw_clear","draw_clear_alpha","\ draw_ellipse","draw_ellipse_color","draw_ellipse_colour","draw_enable_drawevent","draw_enable_skeleton_blendmodes","draw_enable_swf_aa","draw_flush","draw_get_alpha","draw_get_color","draw_get_colour","draw_get_enable_skeleton_blendmodes","draw_get_font","draw_get_halign","draw_get_lighting","draw_get_swf_aa_level","draw_get_valign","draw_getpixel","draw_getpixel_ext","draw_healthbar","draw_highscore","draw_light_define_ambient","draw_light_define_direction","draw_light_define_point","draw_light\ _enable","draw_light_get","draw_light_get_ambient","draw_line","draw_line_color","draw_line_colour","draw_line_width","draw_line_width_color","draw_line_width_colour","draw_path","draw_point","draw_point_color","draw_point_colour","draw_primitive_begin","draw_primitive_begin_texture","draw_primitive_end","draw_rectangle","draw_rectangle_color","draw_rectangle_colour","draw_roundrect","draw_roundrect_color","draw_roundrect_color_ext","draw_roundrect_colour","draw_roundrect_colour_ext","draw_round\ rect_ext","draw_self","draw_set_alpha","draw_set_circle_precision","draw_set_color","draw_set_colour","draw_set_font","draw_set_halign","draw_set_lighting","draw_set_swf_aa_level","draw_set_valign","draw_skeleton","draw_skeleton_collision","draw_skeleton_instance","draw_skeleton_time","draw_sprite","draw_sprite_ext","draw_sprite_general","draw_sprite_part","draw_sprite_part_ext","draw_sprite_pos","draw_sprite_stretched","draw_sprite_stretched_ext","draw_sprite_tiled","draw_sprite_tiled_ext","dra\ w_surface","draw_surface_ext","draw_surface_general","draw_surface_part","draw_surface_part_ext","draw_surface_stretched","draw_surface_stretched_ext","draw_surface_tiled","draw_surface_tiled_ext","draw_text","draw_text_color","draw_text_colour","draw_text_ext","draw_text_ext_color","draw_text_ext_colour","draw_text_ext_transformed","draw_text_ext_transformed_color","draw_text_ext_transformed_colour","draw_text_transformed","draw_text_transformed_color","draw_text_transformed_colour","draw_textu\ re_flush","draw_tile","draw_tilemap","draw_triangle","draw_triangle_color","draw_triangle_colour","draw_vertex","draw_vertex_color","draw_vertex_colour","draw_vertex_texture","draw_vertex_texture_color","draw_vertex_texture_colour","ds_exists","ds_grid_add","ds_grid_add_disk","ds_grid_add_grid_region","ds_grid_add_region","ds_grid_clear","ds_grid_copy","ds_grid_create","ds_grid_destroy","ds_grid_get","ds_grid_get_disk_max","ds_grid_get_disk_mean","ds_grid_get_disk_min","ds_grid_get_disk_sum","ds\ _grid_get_max","ds_grid_get_mean","ds_grid_get_min","ds_grid_get_sum","ds_grid_height","ds_grid_multiply","ds_grid_multiply_disk","ds_grid_multiply_grid_region","ds_grid_multiply_region","ds_grid_read","ds_grid_resize","ds_grid_set","ds_grid_set_disk","ds_grid_set_grid_region","ds_grid_set_region","ds_grid_shuffle","ds_grid_sort","ds_grid_to_mp_grid","ds_grid_value_disk_exists","ds_grid_value_disk_x","ds_grid_value_disk_y","ds_grid_value_exists","ds_grid_value_x","ds_grid_value_y","ds_grid_width", "ds_grid_write","ds_list_add","ds_list_clear","ds_list_copy","ds_list_create","ds_list_delete","ds_list_destroy","ds_list_empty","ds_list_find_index","ds_list_find_value","ds_list_insert","ds_list_is_list","ds_list_is_map","ds_list_mark_as_list","ds_list_mark_as_map","ds_list_read","ds_list_replace","ds_list_set","ds_list_shuffle","ds_list_size","ds_list_sort","ds_list_write","ds_map_add","ds_map_add_list","ds_map_add_map","ds_map_clear","ds_map_copy","ds_map_create","ds_map_delete","ds_map_dest\ roy","ds_map_empty","ds_map_exists","ds_map_find_first","ds_map_find_last","ds_map_find_next","ds_map_find_previous","ds_map_find_value","ds_map_is_list","ds_map_is_map","ds_map_keys_to_array","ds_map_read","ds_map_replace","ds_map_replace_list","ds_map_replace_map","ds_map_secure_load","ds_map_secure_load_buffer","ds_map_secure_save","ds_map_secure_save_buffer","ds_map_set","ds_map_size","ds_map_values_to_array","ds_map_write","ds_priority_add","ds_priority_change_priority","ds_priority_clear", "ds_priority_copy","ds_priority_create","ds_priority_delete_max","ds_priority_delete_min","ds_priority_delete_value","ds_priority_destroy","ds_priority_empty","ds_priority_find_max","ds_priority_find_min","ds_priority_find_priority","ds_priority_read","ds_priority_size","ds_priority_write","ds_queue_clear","ds_queue_copy","ds_queue_create","ds_queue_dequeue","ds_queue_destroy","ds_queue_empty","ds_queue_enqueue","ds_queue_head","ds_queue_read","ds_queue_size","ds_queue_tail","ds_queue_write","ds\ _set_precision","ds_stack_clear","ds_stack_copy","ds_stack_create","ds_stack_destroy","ds_stack_empty","ds_stack_pop","ds_stack_push","ds_stack_read","ds_stack_size","ds_stack_top","ds_stack_write","dsin","dtan","effect_clear","effect_create_above","effect_create_below","effect_create_depth","effect_create_layer","environment_get_variable","event_inherited","event_perform","event_perform_async","event_perform_object","event_user","exception_unhandled_handler","exp","extension_exists","extension_\ get_option_count","extension_get_option_names","extension_get_option_value","extension_get_options","extension_get_version","external_call","external_define","external_free","file_attributes","file_bin_close","file_bin_open","file_bin_position","file_bin_read_byte","file_bin_rewrite","file_bin_seek","file_bin_size","file_bin_write_byte","file_copy","file_delete","file_exists","file_find_close","file_find_first","file_find_next","file_rename","file_text_close","file_text_eof","file_text_eoln","fi\ le_text_open_append","file_text_open_from_string","file_text_open_read","file_text_open_write","file_text_read_real","file_text_read_string","file_text_readln","file_text_write_real","file_text_write_string","file_text_writeln","filename_change_ext","filename_dir","filename_drive","filename_ext","filename_name","filename_path","floor","font_add","font_add_enable_aa","font_add_get_enable_aa","font_add_sprite","font_add_sprite_ext","font_cache_glyph","font_delete","font_enable_effects","font_enabl\ e_sdf","font_exists","font_get_bold","font_get_first","font_get_fontname","font_get_info","font_get_italic","font_get_last","font_get_name","font_get_sdf_enabled","font_get_sdf_spread","font_get_size","font_get_texture","font_get_uvs","font_replace_sprite","font_replace_sprite_ext","font_sdf_spread","font_set_cache_size","frac","fx_create","fx_get_name","fx_get_parameter","fx_get_parameter_names","fx_get_parameters","fx_get_single_layer","fx_set_parameter","fx_set_parameters","fx_set_single_laye\ r","game_change","game_end","game_get_speed","game_load","game_load_buffer","game_restart","game_save","game_save_buffer","game_set_speed","gamepad_axis_count","gamepad_axis_value","gamepad_button_check","gamepad_button_check_pressed","gamepad_button_check_released","gamepad_button_count","gamepad_button_value","gamepad_get_axis_deadzone","gamepad_get_button_threshold","gamepad_get_description","gamepad_get_device_count","gamepad_get_guid","gamepad_get_mapping","gamepad_get_option","gamepad_hat_\ count","gamepad_hat_value","gamepad_is_connected","gamepad_is_supported","gamepad_remove_mapping","gamepad_set_axis_deadzone","gamepad_set_button_threshold","gamepad_set_color","gamepad_set_colour","gamepad_set_option","gamepad_set_vibration","gamepad_test_mapping","gc_collect","gc_enable","gc_get_stats","gc_get_target_frame_time","gc_is_enabled","gc_target_frame_time","gesture_double_tap_distance","gesture_double_tap_time","gesture_drag_distance","gesture_drag_time","gesture_flick_speed","gestu\ re_get_double_tap_distance","gesture_get_double_tap_time","gesture_get_drag_distance","gesture_get_drag_time","gesture_get_flick_speed","gesture_get_pinch_angle_away","gesture_get_pinch_angle_towards","gesture_get_pinch_distance","gesture_get_rotate_angle","gesture_get_rotate_time","gesture_get_tap_count","gesture_pinch_angle_away","gesture_pinch_angle_towards","gesture_pinch_distance","gesture_rotate_angle","gesture_rotate_time","gesture_tap_count","get_integer","get_integer_async","get_login_a\ sync","get_open_filename","get_open_filename_ext","get_save_filename","get_save_filename_ext","get_string","get_string_async","get_timer","gif_add_surface","gif_open","gif_save","gif_save_buffer","gml_pragma","gml_release_mode","gpu_get_alphatestenable","gpu_get_alphatestref","gpu_get_blendenable","gpu_get_blendmode","gpu_get_blendmode_dest","gpu_get_blendmode_destalpha","gpu_get_blendmode_ext","gpu_get_blendmode_ext_sepalpha","gpu_get_blendmode_src","gpu_get_blendmode_srcalpha","gpu_get_colorwr\ iteenable","gpu_get_colourwriteenable","gpu_get_cullmode","gpu_get_depth","gpu_get_fog","gpu_get_state","gpu_get_tex_filter","gpu_get_tex_filter_ext","gpu_get_tex_max_aniso","gpu_get_tex_max_aniso_ext","gpu_get_tex_max_mip","gpu_get_tex_max_mip_ext","gpu_get_tex_min_mip","gpu_get_tex_min_mip_ext","gpu_get_tex_mip_bias","gpu_get_tex_mip_bias_ext","gpu_get_tex_mip_enable","gpu_get_tex_mip_enable_ext","gpu_get_tex_mip_filter","gpu_get_tex_mip_filter_ext","gpu_get_tex_repeat","gpu_get_tex_repeat_ext", "gpu_get_texfilter","gpu_get_texfilter_ext","gpu_get_texrepeat","gpu_get_texrepeat_ext","gpu_get_zfunc","gpu_get_ztestenable","gpu_get_zwriteenable","gpu_pop_state","gpu_push_state","gpu_set_alphatestenable","gpu_set_alphatestref","gpu_set_blendenable","gpu_set_blendmode","gpu_set_blendmode_ext","gpu_set_blendmode_ext_sepalpha","gpu_set_colorwriteenable","gpu_set_colourwriteenable","gpu_set_cullmode","gpu_set_depth","gpu_set_fog","gpu_set_state","gpu_set_tex_filter","gpu_set_tex_filter_ext","gpu\ _set_tex_max_aniso","gpu_set_tex_max_aniso_ext","gpu_set_tex_max_mip","gpu_set_tex_max_mip_ext","gpu_set_tex_min_mip","gpu_set_tex_min_mip_ext","gpu_set_tex_mip_bias","gpu_set_tex_mip_bias_ext","gpu_set_tex_mip_enable","gpu_set_tex_mip_enable_ext","gpu_set_tex_mip_filter","gpu_set_tex_mip_filter_ext","gpu_set_tex_repeat","gpu_set_tex_repeat_ext","gpu_set_texfilter","gpu_set_texfilter_ext","gpu_set_texrepeat","gpu_set_texrepeat_ext","gpu_set_zfunc","gpu_set_ztestenable","gpu_set_zwriteenable","ha\ ndle_parse","highscore_add","highscore_clear","highscore_name","highscore_value","http_get","http_get_file","http_get_request_crossorigin","http_post_string","http_request","http_set_request_crossorigin","iap_acquire","iap_activate","iap_consume","iap_enumerate_products","iap_product_details","iap_purchase_details","iap_restore_all","iap_status","ini_close","ini_key_delete","ini_key_exists","ini_open","ini_open_from_string","ini_read_real","ini_read_string","ini_section_delete","ini_section_exis\ ts","ini_write_real","ini_write_string","instance_activate_all","instance_activate_layer","instance_activate_object","instance_activate_region","instance_change","instance_copy","instance_create_depth","instance_create_layer","instance_deactivate_all","instance_deactivate_layer","instance_deactivate_object","instance_deactivate_region","instance_destroy","instance_exists","instance_find","instance_furthest","instance_id_get","instance_nearest","instance_number","instance_place","instance_place_l\ ist","instance_position","instance_position_list","instanceof","int64","io_clear","irandom","irandom_range","is_array","is_bool","is_callable","is_debug_overlay_open","is_handle","is_infinity","is_instanceof","is_int32","is_int64","is_keyboard_used_debug_overlay","is_method","is_mouse_over_debug_overlay","is_nan","is_numeric","is_ptr","is_real","is_string","is_struct","is_undefined","json_decode","json_encode","json_parse","json_stringify","keyboard_check","keyboard_check_direct","keyboard_check\ _pressed","keyboard_check_released","keyboard_clear","keyboard_get_map","keyboard_get_numlock","keyboard_key_press","keyboard_key_release","keyboard_set_map","keyboard_set_numlock","keyboard_unset_map","keyboard_virtual_height","keyboard_virtual_hide","keyboard_virtual_show","keyboard_virtual_status","layer_add_instance","layer_background_alpha","layer_background_blend","layer_background_change","layer_background_create","layer_background_destroy","layer_background_exists","layer_background_get_\ alpha","layer_background_get_blend","layer_background_get_htiled","layer_background_get_id","layer_background_get_index","layer_background_get_speed","layer_background_get_sprite","layer_background_get_stretch","layer_background_get_visible","layer_background_get_vtiled","layer_background_get_xscale","layer_background_get_yscale","layer_background_htiled","layer_background_index","layer_background_speed","layer_background_sprite","layer_background_stretch","layer_background_visible","layer_backg\ round_vtiled","layer_background_xscale","layer_background_yscale","layer_clear_fx","layer_create","layer_depth","layer_destroy","layer_destroy_instances","layer_element_move","layer_enable_fx","layer_exists","layer_force_draw_depth","layer_fx_is_enabled","layer_get_all","layer_get_all_elements","layer_get_depth","layer_get_element_layer","layer_get_element_type","layer_get_forced_depth","layer_get_fx","layer_get_hspeed","layer_get_id","layer_get_id_at_depth","layer_get_name","layer_get_script_be\ gin","layer_get_script_end","layer_get_shader","layer_get_target_room","layer_get_visible","layer_get_vspeed","layer_get_x","layer_get_y","layer_has_instance","layer_hspeed","layer_instance_get_instance","layer_is_draw_depth_forced","layer_reset_target_room","layer_script_begin","layer_script_end","layer_sequence_angle","layer_sequence_create","layer_sequence_destroy","layer_sequence_exists","layer_sequence_get_angle","layer_sequence_get_headdir","layer_sequence_get_headpos","layer_sequence_get_\ instance","layer_sequence_get_length","layer_sequence_get_sequence","layer_sequence_get_speedscale","layer_sequence_get_x","layer_sequence_get_xscale","layer_sequence_get_y","layer_sequence_get_yscale","layer_sequence_headdir","layer_sequence_headpos","layer_sequence_is_finished","layer_sequence_is_paused","layer_sequence_pause","layer_sequence_play","layer_sequence_speedscale","layer_sequence_x","layer_sequence_xscale","layer_sequence_y","layer_sequence_yscale","layer_set_fx","layer_set_target_\ room","layer_set_visible","layer_shader","layer_sprite_alpha","layer_sprite_angle","layer_sprite_blend","layer_sprite_change","layer_sprite_create","layer_sprite_destroy","layer_sprite_exists","layer_sprite_get_alpha","layer_sprite_get_angle","layer_sprite_get_blend","layer_sprite_get_id","layer_sprite_get_index","layer_sprite_get_speed","layer_sprite_get_sprite","layer_sprite_get_x","layer_sprite_get_xscale","layer_sprite_get_y","layer_sprite_get_yscale","layer_sprite_index","layer_sprite_speed", "layer_sprite_x","layer_sprite_xscale","layer_sprite_y","layer_sprite_yscale","layer_tile_alpha","layer_tile_blend","layer_tile_change","layer_tile_create","layer_tile_destroy","layer_tile_exists","layer_tile_get_alpha","layer_tile_get_blend","layer_tile_get_region","layer_tile_get_sprite","layer_tile_get_visible","layer_tile_get_x","layer_tile_get_xscale","layer_tile_get_y","layer_tile_get_yscale","layer_tile_region","layer_tile_visible","layer_tile_x","layer_tile_xscale","layer_tile_y","layer_\ tile_yscale","layer_tilemap_create","layer_tilemap_destroy","layer_tilemap_exists","layer_tilemap_get_id","layer_vspeed","layer_x","layer_y","lengthdir_x","lengthdir_y","lerp","lin_to_db","ln","load_csv","log10","log2","logn","make_color_hsv","make_color_rgb","make_colour_hsv","make_colour_rgb","math_get_epsilon","math_set_epsilon","matrix_build","matrix_build_identity","matrix_build_lookat","matrix_build_projection_ortho","matrix_build_projection_perspective","matrix_build_projection_perspectiv\ e_fov","matrix_get","matrix_multiply","matrix_set","matrix_stack_clear","matrix_stack_is_empty","matrix_stack_pop","matrix_stack_push","matrix_stack_set","matrix_stack_top","matrix_transform_vertex","max","md5_file","md5_string_unicode","md5_string_utf8","mean","median","merge_color","merge_colour","method","method_call","method_get_index","method_get_self","min","motion_add","motion_set","mouse_check_button","mouse_check_button_pressed","mouse_check_button_released","mouse_clear","mouse_wheel_d\ own","mouse_wheel_up","move_and_collide","move_bounce_all","move_bounce_solid","move_contact_all","move_contact_solid","move_outside_all","move_outside_solid","move_random","move_snap","move_towards_point","move_wrap","mp_grid_add_cell","mp_grid_add_instances","mp_grid_add_rectangle","mp_grid_clear_all","mp_grid_clear_cell","mp_grid_clear_rectangle","mp_grid_create","mp_grid_destroy","mp_grid_draw","mp_grid_get_cell","mp_grid_path","mp_grid_to_ds_grid","mp_linear_path","mp_linear_path_object","m\ p_linear_step","mp_linear_step_object","mp_potential_path","mp_potential_path_object","mp_potential_settings","mp_potential_step","mp_potential_step_object","nameof","network_connect","network_connect_async","network_connect_raw","network_connect_raw_async","network_create_server","network_create_server_raw","network_create_socket","network_create_socket_ext","network_destroy","network_resolve","network_send_broadcast","network_send_packet","network_send_raw","network_send_udp","network_send_udp\ _raw","network_set_config","network_set_timeout","object_exists","object_get_mask","object_get_name","object_get_parent","object_get_persistent","object_get_physics","object_get_solid","object_get_sprite","object_get_visible","object_is_ancestor","object_set_mask","object_set_persistent","object_set_solid","object_set_sprite","object_set_visible","ord","os_check_permission","os_get_config","os_get_info","os_get_language","os_get_region","os_is_network_connected","os_is_paused","os_lock_orientati\ on","os_powersave_enable","os_request_permission","os_set_orientation_lock","parameter_count","parameter_string","part_emitter_burst","part_emitter_clear","part_emitter_create","part_emitter_delay","part_emitter_destroy","part_emitter_destroy_all","part_emitter_enable","part_emitter_exists","part_emitter_interval","part_emitter_region","part_emitter_relative","part_emitter_stream","part_particles_burst","part_particles_clear","part_particles_count","part_particles_create","part_particles_create_\ color","part_particles_create_colour","part_system_angle","part_system_automatic_draw","part_system_automatic_update","part_system_clear","part_system_color","part_system_colour","part_system_create","part_system_create_layer","part_system_depth","part_system_destroy","part_system_draw_order","part_system_drawit","part_system_exists","part_system_get_info","part_system_get_layer","part_system_global_space","part_system_layer","part_system_position","part_system_update","part_type_alpha1","part_t\ ype_alpha2","part_type_alpha3","part_type_blend","part_type_clear","part_type_color1","part_type_color2","part_type_color3","part_type_color_hsv","part_type_color_mix","part_type_color_rgb","part_type_colour1","part_type_colour2","part_type_colour3","part_type_colour_hsv","part_type_colour_mix","part_type_colour_rgb","part_type_create","part_type_death","part_type_destroy","part_type_direction","part_type_exists","part_type_gravity","part_type_life","part_type_orientation","part_type_scale","par\ t_type_shape","part_type_size","part_type_size_x","part_type_size_y","part_type_speed","part_type_sprite","part_type_step","part_type_subimage","particle_exists","particle_get_info","path_add","path_add_point","path_append","path_assign","path_change_point","path_clear_points","path_delete","path_delete_point","path_duplicate","path_end","path_exists","path_flip","path_get_closed","path_get_kind","path_get_length","path_get_name","path_get_number","path_get_point_speed","path_get_point_x","path_\ get_point_y","path_get_precision","path_get_speed","path_get_x","path_get_y","path_insert_point","path_mirror","path_rescale","path_reverse","path_rotate","path_set_closed","path_set_kind","path_set_precision","path_shift","path_start","physics_apply_angular_impulse","physics_apply_force","physics_apply_impulse","physics_apply_local_force","physics_apply_local_impulse","physics_apply_torque","physics_draw_debug","physics_fixture_add_point","physics_fixture_bind","physics_fixture_bind_ext","physi\ cs_fixture_create","physics_fixture_delete","physics_fixture_set_angular_damping","physics_fixture_set_awake","physics_fixture_set_box_shape","physics_fixture_set_chain_shape","physics_fixture_set_circle_shape","physics_fixture_set_collision_group","physics_fixture_set_density","physics_fixture_set_edge_shape","physics_fixture_set_friction","physics_fixture_set_kinematic","physics_fixture_set_linear_damping","physics_fixture_set_polygon_shape","physics_fixture_set_restitution","physics_fixture_s\ et_sensor","physics_get_density","physics_get_friction","physics_get_restitution","physics_joint_delete","physics_joint_distance_create","physics_joint_enable_motor","physics_joint_friction_create","physics_joint_gear_create","physics_joint_get_value","physics_joint_prismatic_create","physics_joint_pulley_create","physics_joint_revolute_create","physics_joint_rope_create","physics_joint_set_value","physics_joint_weld_create","physics_joint_wheel_create","physics_mass_properties","physics_particl\ e_count","physics_particle_create","physics_particle_delete","physics_particle_delete_region_box","physics_particle_delete_region_circle","physics_particle_delete_region_poly","physics_particle_draw","physics_particle_draw_ext","physics_particle_get_damping","physics_particle_get_data","physics_particle_get_data_particle","physics_particle_get_density","physics_particle_get_gravity_scale","physics_particle_get_group_flags","physics_particle_get_max_count","physics_particle_get_radius","physics_p\ article_group_add_point","physics_particle_group_begin","physics_particle_group_box","physics_particle_group_circle","physics_particle_group_count","physics_particle_group_delete","physics_particle_group_end","physics_particle_group_get_ang_vel","physics_particle_group_get_angle","physics_particle_group_get_centre_x","physics_particle_group_get_centre_y","physics_particle_group_get_data","physics_particle_group_get_inertia","physics_particle_group_get_mass","physics_particle_group_get_vel_x","ph\ ysics_particle_group_get_vel_y","physics_particle_group_get_x","physics_particle_group_get_y","physics_particle_group_join","physics_particle_group_polygon","physics_particle_set_category_flags","physics_particle_set_damping","physics_particle_set_density","physics_particle_set_flags","physics_particle_set_gravity_scale","physics_particle_set_group_flags","physics_particle_set_max_count","physics_particle_set_radius","physics_pause_enable","physics_remove_fixture","physics_set_density","physics_\ set_friction","physics_set_restitution","physics_test_overlap","physics_world_create","physics_world_draw_debug","physics_world_gravity","physics_world_update_iterations","physics_world_update_speed","place_empty","place_free","place_meeting","place_snapped","point_direction","point_distance","point_distance_3d","point_in_circle","point_in_rectangle","point_in_triangle","position_change","position_destroy","position_empty","position_meeting","power","ptr","radtodeg","random","random_get_seed","r\ andom_range","random_set_seed","randomise","randomize","real","rectangle_in_circle","rectangle_in_rectangle","rectangle_in_triangle","ref_create","rollback_chat","rollback_create_game","rollback_define_extra_network_latency","rollback_define_input","rollback_define_input_frame_delay","rollback_define_mock_input","rollback_define_player","rollback_display_events","rollback_get_info","rollback_get_input","rollback_get_player_prefs","rollback_join_game","rollback_leave_game","rollback_set_player_pr\ efs","rollback_start_game","rollback_sync_on_frame","rollback_use_late_join","rollback_use_manual_start","rollback_use_player_prefs","rollback_use_random_input","room_add","room_assign","room_duplicate","room_exists","room_get_camera","room_get_info","room_get_name","room_get_viewport","room_goto","room_goto_next","room_goto_previous","room_instance_add","room_instance_clear","room_next","room_previous","room_restart","room_set_camera","room_set_height","room_set_persistent","room_set_view_enabl\ ed","room_set_viewport","room_set_width","round","scheduler_resolution_get","scheduler_resolution_set","screen_save","screen_save_part","script_execute","script_execute_ext","script_exists","script_get_name","sequence_create","sequence_destroy","sequence_exists","sequence_get","sequence_get_objects","sequence_instance_override_object","sequence_keyframe_new","sequence_keyframedata_new","sequence_track_new","sha1_file","sha1_string_unicode","sha1_string_utf8","shader_current","shader_enable_corne\ r_id","shader_get_name","shader_get_sampler_index","shader_get_uniform","shader_is_compiled","shader_reset","shader_set","shader_set_uniform_f","shader_set_uniform_f_array","shader_set_uniform_f_buffer","shader_set_uniform_i","shader_set_uniform_i_array","shader_set_uniform_matrix","shader_set_uniform_matrix_array","shaders_are_supported","shop_leave_rating","show_debug_message","show_debug_message_ext","show_debug_overlay","show_error","show_message","show_message_async","show_question","show_q\ uestion_async","sign","sin","skeleton_animation_clear","skeleton_animation_get","skeleton_animation_get_duration","skeleton_animation_get_event_frames","skeleton_animation_get_ext","skeleton_animation_get_frame","skeleton_animation_get_frames","skeleton_animation_get_position","skeleton_animation_is_finished","skeleton_animation_is_looping","skeleton_animation_list","skeleton_animation_mix","skeleton_animation_set","skeleton_animation_set_ext","skeleton_animation_set_frame","skeleton_animation_s\ et_position","skeleton_attachment_create","skeleton_attachment_create_color","skeleton_attachment_create_colour","skeleton_attachment_destroy","skeleton_attachment_exists","skeleton_attachment_get","skeleton_attachment_replace","skeleton_attachment_replace_color","skeleton_attachment_replace_colour","skeleton_attachment_set","skeleton_bone_data_get","skeleton_bone_data_set","skeleton_bone_list","skeleton_bone_state_get","skeleton_bone_state_set","skeleton_collision_draw_set","skeleton_find_slot", "skeleton_get_bounds","skeleton_get_minmax","skeleton_get_num_bounds","skeleton_skin_create","skeleton_skin_get","skeleton_skin_list","skeleton_skin_set","skeleton_slot_alpha_get","skeleton_slot_color_get","skeleton_slot_color_set","skeleton_slot_colour_get","skeleton_slot_colour_set","skeleton_slot_data","skeleton_slot_data_instance","skeleton_slot_list","sprite_add","sprite_add_ext","sprite_add_from_surface","sprite_assign","sprite_collision_mask","sprite_create_from_surface","sprite_delete","\ sprite_duplicate","sprite_exists","sprite_flush","sprite_flush_multi","sprite_get_bbox_bottom","sprite_get_bbox_left","sprite_get_bbox_mode","sprite_get_bbox_right","sprite_get_bbox_top","sprite_get_height","sprite_get_info","sprite_get_name","sprite_get_nineslice","sprite_get_number","sprite_get_speed","sprite_get_speed_type","sprite_get_texture","sprite_get_tpe","sprite_get_uvs","sprite_get_width","sprite_get_xoffset","sprite_get_yoffset","sprite_merge","sprite_nineslice_create","sprite_prefet\ ch","sprite_prefetch_multi","sprite_replace","sprite_save","sprite_save_strip","sprite_set_alpha_from_sprite","sprite_set_bbox","sprite_set_bbox_mode","sprite_set_cache_size","sprite_set_cache_size_ext","sprite_set_nineslice","sprite_set_offset","sprite_set_speed","sqr","sqrt","static_get","static_set","string","string_byte_at","string_byte_length","string_char_at","string_concat","string_concat_ext","string_copy","string_count","string_delete","string_digits","string_ends_with","string_ext","st\ ring_foreach","string_format","string_hash_to_newline","string_height","string_height_ext","string_insert","string_join","string_join_ext","string_last_pos","string_last_pos_ext","string_length","string_letters","string_lettersdigits","string_lower","string_ord_at","string_pos","string_pos_ext","string_repeat","string_replace","string_replace_all","string_set_byte_at","string_split","string_split_ext","string_starts_with","string_trim","string_trim_end","string_trim_start","string_upper","string\ _width","string_width_ext","struct_exists","struct_foreach","struct_get","struct_get_from_hash","struct_get_names","struct_names_count","struct_remove","struct_set","struct_set_from_hash","surface_copy","surface_copy_part","surface_create","surface_create_ext","surface_depth_disable","surface_exists","surface_format_is_supported","surface_free","surface_get_depth_disable","surface_get_format","surface_get_height","surface_get_target","surface_get_target_ext","surface_get_texture","surface_get_wi\ dth","surface_getpixel","surface_getpixel_ext","surface_reset_target","surface_resize","surface_save","surface_save_part","surface_set_target","surface_set_target_ext","tag_get_asset_ids","tag_get_assets","tan","texture_debug_messages","texture_flush","texture_get_height","texture_get_texel_height","texture_get_texel_width","texture_get_uvs","texture_get_width","texture_global_scale","texture_is_ready","texture_prefetch","texture_set_stage","texturegroup_get_fonts","texturegroup_get_names","text\ uregroup_get_sprites","texturegroup_get_status","texturegroup_get_textures","texturegroup_get_tilesets","texturegroup_load","texturegroup_set_mode","texturegroup_unload","tile_get_empty","tile_get_flip","tile_get_index","tile_get_mirror","tile_get_rotate","tile_set_empty","tile_set_flip","tile_set_index","tile_set_mirror","tile_set_rotate","tilemap_clear","tilemap_get","tilemap_get_at_pixel","tilemap_get_cell_x_at_pixel","tilemap_get_cell_y_at_pixel","tilemap_get_frame","tilemap_get_global_mask", "tilemap_get_height","tilemap_get_mask","tilemap_get_tile_height","tilemap_get_tile_width","tilemap_get_tileset","tilemap_get_width","tilemap_get_x","tilemap_get_y","tilemap_set","tilemap_set_at_pixel","tilemap_set_global_mask","tilemap_set_height","tilemap_set_mask","tilemap_set_width","tilemap_tileset","tilemap_x","tilemap_y","tileset_get_info","tileset_get_name","tileset_get_texture","tileset_get_uvs","time_bpm_to_seconds","time_seconds_to_bpm","time_source_create","time_source_destroy","time\ _source_exists","time_source_get_children","time_source_get_parent","time_source_get_period","time_source_get_reps_completed","time_source_get_reps_remaining","time_source_get_state","time_source_get_time_remaining","time_source_get_units","time_source_pause","time_source_reconfigure","time_source_reset","time_source_resume","time_source_start","time_source_stop","timeline_add","timeline_clear","timeline_delete","timeline_exists","timeline_get_name","timeline_max_moment","timeline_moment_add_scr\ ipt","timeline_moment_clear","timeline_size","typeof","url_get_domain","url_open","url_open_ext","url_open_full","uwp_device_touchscreen_available","uwp_livetile_badge_clear","uwp_livetile_badge_notification","uwp_livetile_notification_begin","uwp_livetile_notification_end","uwp_livetile_notification_expiry","uwp_livetile_notification_image_add","uwp_livetile_notification_secondary_begin","uwp_livetile_notification_tag","uwp_livetile_notification_template_add","uwp_livetile_notification_text_add", "uwp_livetile_queue_enable","uwp_livetile_tile_clear","uwp_secondarytile_badge_clear","uwp_secondarytile_badge_notification","uwp_secondarytile_delete","uwp_secondarytile_pin","uwp_secondarytile_tile_clear","variable_clone","variable_get_hash","variable_global_exists","variable_global_get","variable_global_set","variable_instance_exists","variable_instance_get","variable_instance_get_names","variable_instance_names_count","variable_instance_set","variable_struct_exists","variable_struct_get","va\ riable_struct_get_names","variable_struct_names_count","variable_struct_remove","variable_struct_set","vertex_argb","vertex_begin","vertex_color","vertex_colour","vertex_create_buffer","vertex_create_buffer_ext","vertex_create_buffer_from_buffer","vertex_create_buffer_from_buffer_ext","vertex_delete_buffer","vertex_end","vertex_float1","vertex_float2","vertex_float3","vertex_float4","vertex_format_add_color","vertex_format_add_colour","vertex_format_add_custom","vertex_format_add_normal","vertex\ _format_add_position","vertex_format_add_position_3d","vertex_format_add_texcoord","vertex_format_begin","vertex_format_delete","vertex_format_end","vertex_format_get_info","vertex_freeze","vertex_get_buffer_size","vertex_get_number","vertex_normal","vertex_position","vertex_position_3d","vertex_submit","vertex_submit_ext","vertex_texcoord","vertex_ubyte4","vertex_update_buffer_from_buffer","vertex_update_buffer_from_vertex","video_close","video_draw","video_enable_loop","video_get_duration","vi\ deo_get_format","video_get_position","video_get_status","video_get_volume","video_is_looping","video_open","video_pause","video_resume","video_seek_to","video_set_volume","view_get_camera","view_get_hport","view_get_surface_id","view_get_visible","view_get_wport","view_get_xport","view_get_yport","view_set_camera","view_set_hport","view_set_surface_id","view_set_visible","view_set_wport","view_set_xport","view_set_yport","virtual_key_add","virtual_key_delete","virtual_key_hide","virtual_key_show", "wallpaper_set_config","wallpaper_set_subscriptions","weak_ref_alive","weak_ref_any_alive","weak_ref_create","window_center","window_device","window_enable_borderless_fullscreen","window_get_borderless_fullscreen","window_get_caption","window_get_color","window_get_colour","window_get_cursor","window_get_fullscreen","window_get_height","window_get_showborder","window_get_visible_rects","window_get_width","window_get_x","window_get_y","window_handle","window_has_focus","window_mouse_get_delta_x", "window_mouse_get_delta_y","window_mouse_get_locked","window_mouse_get_x","window_mouse_get_y","window_mouse_set","window_mouse_set_locked","window_set_caption","window_set_color","window_set_colour","window_set_cursor","window_set_fullscreen","window_set_max_height","window_set_max_width","window_set_min_height","window_set_min_width","window_set_position","window_set_rectangle","window_set_showborder","window_set_size","window_view_mouse_get_x","window_view_mouse_get_y","window_views_mouse_get\ _x","window_views_mouse_get_y","winphone_tile_background_color","winphone_tile_background_colour","zip_add_file","zip_create","zip_save","zip_unzip","zip_unzip_async"],symbol:["AudioEffect","AudioEffectType","AudioLFOType","GM_build_date","GM_build_type","GM_is_sandboxed","GM_project_filename","GM_runtime_version","GM_version","NaN","_GMFILE_","_GMFUNCTION_","_GMLINE_","alignmentH","alignmentV","all","animcurvetype_bezier","animcurvetype_catmullrom","animcurvetype_linear","asset_animationcurve", "asset_font","asset_object","asset_path","asset_room","asset_script","asset_sequence","asset_shader","asset_sound","asset_sprite","asset_tiles","asset_timeline","asset_unknown","audio_3D","audio_bus_main","audio_falloff_exponent_distance","audio_falloff_exponent_distance_clamped","audio_falloff_exponent_distance_scaled","audio_falloff_inverse_distance","audio_falloff_inverse_distance_clamped","audio_falloff_inverse_distance_scaled","audio_falloff_linear_distance","audio_falloff_linear_distance_c\ lamped","audio_falloff_none","audio_mono","audio_stereo","bboxkind_diamond","bboxkind_ellipse","bboxkind_precise","bboxkind_rectangular","bboxmode_automatic","bboxmode_fullimage","bboxmode_manual","bm_add","bm_dest_alpha","bm_dest_color","bm_dest_colour","bm_inv_dest_alpha","bm_inv_dest_color","bm_inv_dest_colour","bm_inv_src_alpha","bm_inv_src_color","bm_inv_src_colour","bm_max","bm_normal","bm_one","bm_src_alpha","bm_src_alpha_sat","bm_src_color","bm_src_colour","bm_subtract","bm_zero","browse\ r_chrome","browser_edge","browser_firefox","browser_ie","browser_ie_mobile","browser_not_a_browser","browser_opera","browser_safari","browser_safari_mobile","browser_tizen","browser_unknown","browser_windows_store","buffer_bool","buffer_f16","buffer_f32","buffer_f64","buffer_fast","buffer_fixed","buffer_grow","buffer_s16","buffer_s32","buffer_s8","buffer_seek_end","buffer_seek_relative","buffer_seek_start","buffer_string","buffer_text","buffer_u16","buffer_u32","buffer_u64","buffer_u8","buffer_v\ buffer","buffer_wrap","c_aqua","c_black","c_blue","c_dkgray","c_dkgrey","c_fuchsia","c_gray","c_green","c_grey","c_lime","c_ltgray","c_ltgrey","c_maroon","c_navy","c_olive","c_orange","c_purple","c_red","c_silver","c_teal","c_white","c_yellow","cache_directory","characterSpacing","cmpfunc_always","cmpfunc_equal","cmpfunc_greater","cmpfunc_greaterequal","cmpfunc_less","cmpfunc_lessequal","cmpfunc_never","cmpfunc_notequal","coreColor","coreColour","cr_appstart","cr_arrow","cr_beam","cr_cross","cr_\ default","cr_drag","cr_handpoint","cr_hourglass","cr_none","cr_size_all","cr_size_nesw","cr_size_ns","cr_size_nwse","cr_size_we","cr_uparrow","cull_clockwise","cull_counterclockwise","cull_noculling","device_emulator","device_ios_ipad","device_ios_ipad_retina","device_ios_iphone","device_ios_iphone5","device_ios_iphone6","device_ios_iphone6plus","device_ios_iphone_retina","device_ios_unknown","device_tablet","display_landscape","display_landscape_flipped","display_portrait","display_portrait_fli\ pped","dll_cdecl","dll_stdcall","dropShadowEnabled","dropShadowEnabled","ds_type_grid","ds_type_list","ds_type_map","ds_type_priority","ds_type_queue","ds_type_stack","ef_cloud","ef_ellipse","ef_explosion","ef_firework","ef_flare","ef_rain","ef_ring","ef_smoke","ef_smokeup","ef_snow","ef_spark","ef_star","effectsEnabled","effectsEnabled","ev_alarm","ev_animation_end","ev_animation_event","ev_animation_update","ev_async_audio_playback","ev_async_audio_playback_ended","ev_async_audio_recording","e\ v_async_dialog","ev_async_push_notification","ev_async_save_load","ev_async_save_load","ev_async_social","ev_async_system_event","ev_async_web","ev_async_web_cloud","ev_async_web_iap","ev_async_web_image_load","ev_async_web_networking","ev_async_web_steam","ev_audio_playback","ev_audio_playback_ended","ev_audio_recording","ev_boundary","ev_boundary_view0","ev_boundary_view1","ev_boundary_view2","ev_boundary_view3","ev_boundary_view4","ev_boundary_view5","ev_boundary_view6","ev_boundary_view7","e\ v_broadcast_message","ev_cleanup","ev_collision","ev_create","ev_destroy","ev_dialog_async","ev_draw","ev_draw_begin","ev_draw_end","ev_draw_normal","ev_draw_post","ev_draw_pre","ev_end_of_path","ev_game_end","ev_game_start","ev_gesture","ev_gesture_double_tap","ev_gesture_drag_end","ev_gesture_drag_start","ev_gesture_dragging","ev_gesture_flick","ev_gesture_pinch_end","ev_gesture_pinch_in","ev_gesture_pinch_out","ev_gesture_pinch_start","ev_gesture_rotate_end","ev_gesture_rotate_start","ev_gest\ ure_rotating","ev_gesture_tap","ev_global_gesture_double_tap","ev_global_gesture_drag_end","ev_global_gesture_drag_start","ev_global_gesture_dragging","ev_global_gesture_flick","ev_global_gesture_pinch_end","ev_global_gesture_pinch_in","ev_global_gesture_pinch_out","ev_global_gesture_pinch_start","ev_global_gesture_rotate_end","ev_global_gesture_rotate_start","ev_global_gesture_rotating","ev_global_gesture_tap","ev_global_left_button","ev_global_left_press","ev_global_left_release","ev_global_mi\ ddle_button","ev_global_middle_press","ev_global_middle_release","ev_global_right_button","ev_global_right_press","ev_global_right_release","ev_gui","ev_gui_begin","ev_gui_end","ev_joystick1_button1","ev_joystick1_button2","ev_joystick1_button3","ev_joystick1_button4","ev_joystick1_button5","ev_joystick1_button6","ev_joystick1_button7","ev_joystick1_button8","ev_joystick1_down","ev_joystick1_left","ev_joystick1_right","ev_joystick1_up","ev_joystick2_button1","ev_joystick2_button2","ev_joystick2_\ button3","ev_joystick2_button4","ev_joystick2_button5","ev_joystick2_button6","ev_joystick2_button7","ev_joystick2_button8","ev_joystick2_down","ev_joystick2_left","ev_joystick2_right","ev_joystick2_up","ev_keyboard","ev_keypress","ev_keyrelease","ev_left_button","ev_left_press","ev_left_release","ev_middle_button","ev_middle_press","ev_middle_release","ev_mouse","ev_mouse_enter","ev_mouse_leave","ev_mouse_wheel_down","ev_mouse_wheel_up","ev_no_button","ev_no_more_health","ev_no_more_lives","ev_\ other","ev_outside","ev_outside_view0","ev_outside_view1","ev_outside_view2","ev_outside_view3","ev_outside_view4","ev_outside_view5","ev_outside_view6","ev_outside_view7","ev_pre_create","ev_push_notification","ev_right_button","ev_right_press","ev_right_release","ev_room_end","ev_room_start","ev_social","ev_step","ev_step_begin","ev_step_end","ev_step_normal","ev_system_event","ev_trigger","ev_user0","ev_user1","ev_user10","ev_user11","ev_user12","ev_user13","ev_user14","ev_user15","ev_user2", "ev_user3","ev_user4","ev_user5","ev_user6","ev_user7","ev_user8","ev_user9","ev_web_async","ev_web_cloud","ev_web_iap","ev_web_image_load","ev_web_networking","ev_web_sound_load","ev_web_steam","fa_archive","fa_bottom","fa_center","fa_directory","fa_hidden","fa_left","fa_middle","fa_none","fa_readonly","fa_right","fa_sysfile","fa_top","fa_volumeid","false","frameSizeX","frameSizeY","gamespeed_fps","gamespeed_microseconds","global","glowColor","glowColour","glowEnabled","glowEnabled","glowEnd","\ glowStart","gp_axis_acceleration_x","gp_axis_acceleration_y","gp_axis_acceleration_z","gp_axis_angular_velocity_x","gp_axis_angular_velocity_y","gp_axis_angular_velocity_z","gp_axis_orientation_w","gp_axis_orientation_x","gp_axis_orientation_y","gp_axis_orientation_z","gp_axislh","gp_axislv","gp_axisrh","gp_axisrv","gp_face1","gp_face2","gp_face3","gp_face4","gp_padd","gp_padl","gp_padr","gp_padu","gp_select","gp_shoulderl","gp_shoulderlb","gp_shoulderr","gp_shoulderrb","gp_start","gp_stickl","g\ p_stickr","iap_available","iap_canceled","iap_ev_consume","iap_ev_product","iap_ev_purchase","iap_ev_restore","iap_ev_storeload","iap_failed","iap_purchased","iap_refunded","iap_status_available","iap_status_loading","iap_status_processing","iap_status_restoring","iap_status_unavailable","iap_status_uninitialised","iap_storeload_failed","iap_storeload_ok","iap_unavailable","infinity","kbv_autocapitalize_characters","kbv_autocapitalize_none","kbv_autocapitalize_sentences","kbv_autocapitalize_word\ s","kbv_returnkey_continue","kbv_returnkey_default","kbv_returnkey_done","kbv_returnkey_emergency","kbv_returnkey_go","kbv_returnkey_google","kbv_returnkey_join","kbv_returnkey_next","kbv_returnkey_route","kbv_returnkey_search","kbv_returnkey_send","kbv_returnkey_yahoo","kbv_type_ascii","kbv_type_default","kbv_type_email","kbv_type_numbers","kbv_type_phone","kbv_type_phone_name","kbv_type_url","layerelementtype_background","layerelementtype_instance","layerelementtype_oldtilemap","layerelementty\ pe_particlesystem","layerelementtype_sequence","layerelementtype_sprite","layerelementtype_tile","layerelementtype_tilemap","layerelementtype_undefined","leaderboard_type_number","leaderboard_type_time_mins_secs","lighttype_dir","lighttype_point","lineSpacing","m_axisx","m_axisx_gui","m_axisy","m_axisy_gui","m_scroll_down","m_scroll_up","matrix_projection","matrix_view","matrix_world","mb_any","mb_left","mb_middle","mb_none","mb_right","mb_side1","mb_side2","mip_markedonly","mip_off","mip_on","n\ etwork_config_avoid_time_wait","network_config_connect_timeout","network_config_disable_multicast","network_config_disable_reliable_udp","network_config_enable_multicast","network_config_enable_reliable_udp","network_config_use_non_blocking_socket","network_config_websocket_protocol","network_connect_active","network_connect_blocking","network_connect_nonblocking","network_connect_none","network_connect_passive","network_send_binary","network_send_text","network_socket_bluetooth","network_socket\ _tcp","network_socket_udp","network_socket_ws","network_socket_wss","network_type_connect","network_type_data","network_type_disconnect","network_type_down","network_type_non_blocking_connect","network_type_up","network_type_up_failed","nineslice_blank","nineslice_bottom","nineslice_center","nineslice_centre","nineslice_hide","nineslice_left","nineslice_mirror","nineslice_repeat","nineslice_right","nineslice_stretch","nineslice_top","noone","of_challenge_lose","of_challenge_tie","of_challenge_wi\ n","os_android","os_gdk","os_gxgames","os_ios","os_linux","os_macosx","os_operagx","os_permission_denied","os_permission_denied_dont_request","os_permission_granted","os_ps3","os_ps4","os_ps5","os_psvita","os_switch","os_tvos","os_unknown","os_uwp","os_win8native","os_windows","os_winphone","os_xboxone","os_xboxseriesxs","other","outlineColor","outlineColour","outlineDist","outlineEnabled","outlineEnabled","paragraphSpacing","path_action_continue","path_action_restart","path_action_reverse","pat\ h_action_stop","phy_debug_render_aabb","phy_debug_render_collision_pairs","phy_debug_render_coms","phy_debug_render_core_shapes","phy_debug_render_joints","phy_debug_render_obb","phy_debug_render_shapes","phy_joint_anchor_1_x","phy_joint_anchor_1_y","phy_joint_anchor_2_x","phy_joint_anchor_2_y","phy_joint_angle","phy_joint_angle_limits","phy_joint_damping_ratio","phy_joint_frequency","phy_joint_length_1","phy_joint_length_2","phy_joint_lower_angle_limit","phy_joint_max_force","phy_joint_max_leng\ th","phy_joint_max_motor_force","phy_joint_max_motor_torque","phy_joint_max_torque","phy_joint_motor_force","phy_joint_motor_speed","phy_joint_motor_torque","phy_joint_reaction_force_x","phy_joint_reaction_force_y","phy_joint_reaction_torque","phy_joint_speed","phy_joint_translation","phy_joint_upper_angle_limit","phy_particle_data_flag_category","phy_particle_data_flag_color","phy_particle_data_flag_colour","phy_particle_data_flag_position","phy_particle_data_flag_typeflags","phy_particle_data_\ flag_velocity","phy_particle_flag_colormixing","phy_particle_flag_colourmixing","phy_particle_flag_elastic","phy_particle_flag_powder","phy_particle_flag_spring","phy_particle_flag_tensile","phy_particle_flag_viscous","phy_particle_flag_wall","phy_particle_flag_water","phy_particle_flag_zombie","phy_particle_group_flag_rigid","phy_particle_group_flag_solid","pi","pointer_invalid","pointer_null","pr_linelist","pr_linestrip","pr_pointlist","pr_trianglefan","pr_trianglelist","pr_trianglestrip","ps_\ distr_gaussian","ps_distr_invgaussian","ps_distr_linear","ps_mode_burst","ps_mode_stream","ps_shape_diamond","ps_shape_ellipse","ps_shape_line","ps_shape_rectangle","pt_shape_circle","pt_shape_cloud","pt_shape_disk","pt_shape_explosion","pt_shape_flare","pt_shape_line","pt_shape_pixel","pt_shape_ring","pt_shape_smoke","pt_shape_snow","pt_shape_spark","pt_shape_sphere","pt_shape_square","pt_shape_star","rollback_chat_message","rollback_connect_error","rollback_connect_info","rollback_connected_to\ _peer","rollback_connection_rejected","rollback_disconnected_from_peer","rollback_end_game","rollback_game_full","rollback_game_info","rollback_game_interrupted","rollback_game_resumed","rollback_high_latency","rollback_player_prefs","rollback_protocol_rejected","rollback_synchronized_with_peer","rollback_synchronizing_with_peer","self","seqaudiokey_loop","seqaudiokey_oneshot","seqdir_left","seqdir_right","seqinterpolation_assign","seqinterpolation_lerp","seqplay_loop","seqplay_oneshot","seqplay\ _pingpong","seqtextkey_bottom","seqtextkey_center","seqtextkey_justify","seqtextkey_left","seqtextkey_middle","seqtextkey_right","seqtextkey_top","seqtracktype_audio","seqtracktype_bool","seqtracktype_clipmask","seqtracktype_clipmask_mask","seqtracktype_clipmask_subject","seqtracktype_color","seqtracktype_colour","seqtracktype_empty","seqtracktype_graphic","seqtracktype_group","seqtracktype_instance","seqtracktype_message","seqtracktype_moment","seqtracktype_particlesystem","seqtracktype_real","\ seqtracktype_sequence","seqtracktype_spriteframes","seqtracktype_string","seqtracktype_text","shadowColor","shadowColour","shadowOffsetX","shadowOffsetY","shadowSoftness","sprite_add_ext_error_cancelled","sprite_add_ext_error_decompressfailed","sprite_add_ext_error_loadfailed","sprite_add_ext_error_setupfailed","sprite_add_ext_error_spritenotfound","sprite_add_ext_error_unknown","spritespeed_framespergameframe","spritespeed_framespersecond","surface_r16float","surface_r32float","surface_r8unorm", "surface_rg8unorm","surface_rgba16float","surface_rgba32float","surface_rgba4unorm","surface_rgba8unorm","texturegroup_status_fetched","texturegroup_status_loaded","texturegroup_status_loading","texturegroup_status_unloaded","tf_anisotropic","tf_linear","tf_point","thickness","tile_flip","tile_index_mask","tile_mirror","tile_rotate","time_source_expire_after","time_source_expire_nearest","time_source_game","time_source_global","time_source_state_active","time_source_state_initial","time_source_s\ tate_paused","time_source_state_stopped","time_source_units_frames","time_source_units_seconds","timezone_local","timezone_utc","tm_countvsyncs","tm_sleep","tm_systemtiming","true","ty_real","ty_string","undefined","vertex_type_color","vertex_type_colour","vertex_type_float1","vertex_type_float2","vertex_type_float3","vertex_type_float4","vertex_type_ubyte4","vertex_usage_binormal","vertex_usage_blendindices","vertex_usage_blendweight","vertex_usage_color","vertex_usage_colour","vertex_usage_dep\ th","vertex_usage_fog","vertex_usage_normal","vertex_usage_position","vertex_usage_psize","vertex_usage_sample","vertex_usage_tangent","vertex_usage_texcoord","video_format_rgba","video_format_yuv","video_status_closed","video_status_paused","video_status_playing","video_status_preparing","vk_add","vk_alt","vk_anykey","vk_backspace","vk_control","vk_decimal","vk_delete","vk_divide","vk_down","vk_end","vk_enter","vk_escape","vk_f1","vk_f10","vk_f11","vk_f12","vk_f2","vk_f3","vk_f4","vk_f5","vk_f6", "vk_f7","vk_f8","vk_f9","vk_home","vk_insert","vk_lalt","vk_lcontrol","vk_left","vk_lshift","vk_multiply","vk_nokey","vk_numpad0","vk_numpad1","vk_numpad2","vk_numpad3","vk_numpad4","vk_numpad5","vk_numpad6","vk_numpad7","vk_numpad8","vk_numpad9","vk_pagedown","vk_pageup","vk_pause","vk_printscreen","vk_ralt","vk_rcontrol","vk_return","vk_right","vk_rshift","vk_shift","vk_space","vk_subtract","vk_tab","vk_up","wallpaper_config","wallpaper_subscription_data","wrap"],"variable.language":["alarm","\ application_surface","argument","argument0","argument1","argument2","argument3","argument4","argument5","argument6","argument7","argument8","argument9","argument10","argument11","argument12","argument13","argument14","argument15","argument_count","async_load","background_color","background_colour","background_showcolor","background_showcolour","bbox_bottom","bbox_left","bbox_right","bbox_top","browser_height","browser_width","colour?ColourTrack","current_day","current_hour","current_minute","cur\ rent_month","current_second","current_time","current_weekday","current_year","cursor_sprite","debug_mode","delta_time","depth","direction","display_aa","drawn_by_sequence","event_action","event_data","event_number","event_object","event_type","font_texture_page_size","fps","fps_real","friction","game_display_name","game_id","game_project_name","game_save_id","gravity","gravity_direction","health","hspeed","iap_data","id","image_alpha","image_angle","image_blend","image_index","image_number","ima\ ge_speed","image_xscale","image_yscale","in_collision_tree","in_sequence","instance_count","instance_id","keyboard_key","keyboard_lastchar","keyboard_lastkey","keyboard_string","layer","lives","longMessage","managed","mask_index","message","mouse_button","mouse_lastbutton","mouse_x","mouse_y","object_index","os_browser","os_device","os_type","os_version","path_endaction","path_index","path_orientation","path_position","path_positionprevious","path_scale","path_speed","persistent","phy_active","p\ hy_angular_damping","phy_angular_velocity","phy_bullet","phy_col_normal_x","phy_col_normal_y","phy_collision_points","phy_collision_x","phy_collision_y","phy_com_x","phy_com_y","phy_dynamic","phy_fixed_rotation","phy_inertia","phy_kinematic","phy_linear_damping","phy_linear_velocity_x","phy_linear_velocity_y","phy_mass","phy_position_x","phy_position_xprevious","phy_position_y","phy_position_yprevious","phy_rotation","phy_sleeping","phy_speed","phy_speed_x","phy_speed_y","player_avatar_sprite","\ player_avatar_url","player_id","player_local","player_type","player_user_id","program_directory","rollback_api_server","rollback_confirmed_frame","rollback_current_frame","rollback_event_id","rollback_event_param","rollback_game_running","room","room_first","room_height","room_last","room_persistent","room_speed","room_width","score","script","sequence_instance","solid","speed","sprite_height","sprite_index","sprite_width","sprite_xoffset","sprite_yoffset","stacktrace","temp_directory","timeline\ _index","timeline_loop","timeline_position","timeline_running","timeline_speed","view_camera","view_current","view_enabled","view_hport","view_surface_id","view_visible","view_wport","view_xport","view_yport","visible","vspeed","webgl_enabled","working_directory","x","xprevious","xstart","y","yprevious","ystart"]},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE]}}function golo(hljs){return{name:"Golo",keywords:{keyword:[ "println","readln","print","import","module","function","local","return","let","var","while","for","foreach","times","in","case","when","match","with","break","continue","augment","augmentation","each","find","filter","reduce","if","then","else","otherwise","try","catch","finally","raise","throw","orIfNull","DynamicObject|10","DynamicVariable","struct","Observable","map","set","vector","list","array"],literal:["true","false","null"]},contains:[hljs.HASH_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE, {className:"meta",begin:"@[A-Za-z]+"}]}}function gradle(hljs){return{name:"Gradle",case_insensitive:!0,keywords:["task","project","allprojects","subprojects","artifacts","buildscript","configurations","dependencies","repositories","sourceSets","description","delete","from","into","include","exclude","source","classpath","destinationDir","includes","options","sourceCompatibility","targetCompatibility","group","flatDir","doLast","doFirst","flatten","todir","fromdir","ant","def","abstract","break", "case","catch","continue","default","do","else","extends","final","finally","for","if","implements","instanceof","native","new","private","protected","public","return","static","switch","synchronized","throw","throws","transient","try","volatile","while","strictfp","package","import","false","null","super","this","true","antlrtask","checkstyle","codenarc","copy","boolean","byte","char","class","double","float","int","interface","long","short","void","compile","runTime","file","fileTree","abs","a\ ny","append","asList","asWritable","call","collect","compareTo","count","div","dump","each","eachByte","eachFile","eachLine","every","find","findAll","flatten","getAt","getErr","getIn","getOut","getText","grep","immutable","inject","inspect","intersect","invokeMethods","isCase","join","leftShift","minus","multiply","newInputStream","newOutputStream","newPrintWriter","newReader","newWriter","next","plus","pop","power","previous","print","println","push","putAt","read","readBytes","readLines","rev\ erse","reverseEach","round","size","sort","splitEachLine","step","subMap","times","toInteger","toList","tokenize","upto","waitForOrKill","withPrintWriter","withReader","withStream","withWriter","withWriterAppend","write","writeLine"],contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE,hljs.REGEXP_MODE]}}function variants(variants2,obj={}){return obj.variants=variants2,obj}function groovy(hljs){const regex=hljs.regex,IDENT_RE2="\ [A-Za-z0-9_$]+",COMMENT=variants([hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]})]),REGEXP2={className:"regexp",begin:/~?\/[^\/\n]+\//,contains:[hljs.BACKSLASH_ESCAPE]},NUMBER=variants([hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE]),STRING=variants([{begin:/"""/,end:/"""/},{begin:/'''/,end:/'''/},{begin:"\\$/",end:"/\\$",relevance:10},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE], {className:"string"}),CLASS_DEFINITION={match:[/(class|interface|trait|enum|record|extends|implements)/,/\s+/,hljs.UNDERSCORE_IDENT_RE],scope:{1:"keyword",3:"title.class"}};return{name:"Groovy",keywords:{"variable.language":"this super",literal:"true false null",type:["byte","short","char","int","long","boolean","float","double","void"],keyword:["def","as","in","assert","trait","abstract","static","volatile","transient","public","private","protected","synchronized","final","class","interface","e\ num","if","else","for","while","switch","case","break","default","continue","throw","throws","try","catch","finally","implements","extends","new","import","package","return","instanceof","var"]},contains:[hljs.SHEBANG({binary:"groovy",relevance:10}),COMMENT,STRING,REGEXP2,NUMBER,CLASS_DEFINITION,{className:"meta",begin:"@[A-Za-z]+",relevance:0},{className:"attr",begin:IDENT_RE2+"[ ]*:",relevance:0},{begin:/\?/,end:/:/,relevance:0,contains:[COMMENT,STRING,REGEXP2,NUMBER,"self"]},{className:"symb\ ol",begin:"^[ ]*"+regex.lookahead(IDENT_RE2+":"),excludeBegin:!0,end:IDENT_RE2+":",relevance:0}],illegal:/#|<\//}}function haml(hljs){return{name:"HAML",case_insensitive:!0,contains:[{className:"meta",begin:"^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$",relevance:10},hljs.COMMENT("^\\s*(!=#|=#|-#|/).*$",null,{relevance:0}),{begin:"^\\s*(-|=|!=)(?!#)",end:/$/,subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0},{className:"tag",begin:"^\\s*%",contains:[{className:"selector-tag",begin:"\ \\w+"},{className:"selector-id",begin:"#[\\w-]+"},{className:"selector-class",begin:"\\.[\\w-]+"},{begin:/\{\s*/,end:/\s*\}/,contains:[{begin:":\\w+\\s*=>",end:",\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:":\\w+"},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]},{begin:"\\(\\s*",end:"\\s*\\)",excludeEnd:!0,contains:[{begin:"\\w+\\s*=",end:"\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:"\\w+",relevance:0},hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]}]},{begin:"^\\s*[=~]\\s*"},{begin:/#\{/,end:/\}/,subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}function handlebars(hljs){const regex=hljs.regex,BUILT_INS2={$pattern:/[\w.\/]+/,built_in:["action","bindattr","collection","component","concat","debugger","each","each-in","get","hash","if","in","input","link-to","loc","log","lookup","mut","outlet","partial","query-params","render","template","textarea","unbound","unless","view","with","yield"]}, LITERALS2={$pattern:/[\w.\/]+/,literal:["true","false","undefined","null"]},DOUBLE_QUOTED_ID_REGEX=/""|"[^"]+"/,SINGLE_QUOTED_ID_REGEX=/''|'[^']+'/,BRACKET_QUOTED_ID_REGEX=/\[\]|\[[^\]]+\]/,PLAIN_ID_REGEX=/[^\s!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/,PATH_DELIMITER_REGEX=/(\.|\/)/,ANY_ID=regex.either(DOUBLE_QUOTED_ID_REGEX,SINGLE_QUOTED_ID_REGEX,BRACKET_QUOTED_ID_REGEX,PLAIN_ID_REGEX),IDENTIFIER_REGEX=regex.concat(regex.optional(/\.|\.\/|\//),ANY_ID,regex.anyNumberOfTimes(regex.concat(PATH_DELIMITER_REGEX, ANY_ID))),HASH_PARAM_REGEX=regex.concat("(",BRACKET_QUOTED_ID_REGEX,"|",PLAIN_ID_REGEX,")(?==)"),HELPER_NAME_OR_PATH_EXPRESSION={begin:IDENTIFIER_REGEX},HELPER_PARAMETER=hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION,{keywords:LITERALS2}),SUB_EXPRESSION={begin:/\(/,end:/\)/},HASH={className:"attr",begin:HASH_PARAM_REGEX,relevance:0,starts:{begin:/=/,end:/=/,starts:{contains:[hljs.NUMBER_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,HELPER_PARAMETER,SUB_EXPRESSION]}}},BLOCK_PARAMS={begin:/as\s+\|/, keywords:{keyword:"as"},end:/\|/,contains:[{begin:/\w+/}]},HELPER_PARAMETERS={contains:[hljs.NUMBER_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,BLOCK_PARAMS,HASH,HELPER_PARAMETER,SUB_EXPRESSION],returnEnd:!0},SUB_EXPRESSION_CONTENTS=hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION,{className:"name",keywords:BUILT_INS2,starts:hljs.inherit(HELPER_PARAMETERS,{end:/\)/})});SUB_EXPRESSION.contains=[SUB_EXPRESSION_CONTENTS];const OPENING_BLOCK_MUSTACHE_CONTENTS=hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, {keywords:BUILT_INS2,className:"name",starts:hljs.inherit(HELPER_PARAMETERS,{end:/\}\}/})}),CLOSING_BLOCK_MUSTACHE_CONTENTS=hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION,{keywords:BUILT_INS2,className:"name"}),BASIC_MUSTACHE_CONTENTS=hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION,{className:"name",keywords:BUILT_INS2,starts:hljs.inherit(HELPER_PARAMETERS,{end:/\}\}/})});return{name:"Handlebars",aliases:["hbs","html.hbs","html.handlebars","htmlbars"],case_insensitive:!0,subLanguage:"xml",contains:[{begin:/\\\{\{/, skip:!0},{begin:/\\\\(?=\{\{)/,skip:!0},hljs.COMMENT(/\{\{!--/,/--\}\}/),hljs.COMMENT(/\{\{!/,/\}\}/),{className:"template-tag",begin:/\{\{\{\{(?!\/)/,end:/\}\}\}\}/,contains:[OPENING_BLOCK_MUSTACHE_CONTENTS],starts:{end:/\{\{\{\{\//,returnEnd:!0,subLanguage:"xml"}},{className:"template-tag",begin:/\{\{\{\{\//,end:/\}\}\}\}/,contains:[CLOSING_BLOCK_MUSTACHE_CONTENTS]},{className:"template-tag",begin:/\{\{#/,end:/\}\}/,contains:[OPENING_BLOCK_MUSTACHE_CONTENTS]},{className:"template-tag",begin:/\{\{(?=else\}\})/, end:/\}\}/,keywords:"else"},{className:"template-tag",begin:/\{\{(?=else if)/,end:/\}\}/,keywords:"else if"},{className:"template-tag",begin:/\{\{\//,end:/\}\}/,contains:[CLOSING_BLOCK_MUSTACHE_CONTENTS]},{className:"template-variable",begin:/\{\{\{/,end:/\}\}\}/,contains:[BASIC_MUSTACHE_CONTENTS]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:[BASIC_MUSTACHE_CONTENTS]}]}}function haskell(hljs){const decimalDigits2="([0-9]_*)+",hexDigits2="([0-9a-fA-F]_*)+",binaryDigits="([01]_\ *)+",octalDigits="([0-7]_*)+",symbol="([!#$%&*+.\\/<=>?@\\\\^~-]|(?!([(),;\\[\\]`|{}]|[_:\"']))(\\p{S}|\\p{P}))",COMMENT={variants:[hljs.COMMENT("--+","$"),hljs.COMMENT(/\{-/,/-\}/,{contains:["self"]})]},PRAGMA={className:"meta",begin:/\{-#/,end:/#-\}/},PREPROCESSOR={className:"meta",begin:"^#",end:"$"},CONSTRUCTOR={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},LIST={begin:"\\(",end:"\\)",illegal:'"',contains:[PRAGMA,PREPROCESSOR,{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"}, hljs.inherit(hljs.TITLE_MODE,{begin:"[_a-z][\\w']*"}),COMMENT]},RECORD={begin:/\{/,end:/\}/,contains:LIST.contains},NUMBER={className:"number",relevance:0,variants:[{match:`\\b(${decimalDigits2})(\\.(${decimalDigits2}))?([eE][+-]?(${decimalDigits2}))?\\b`},{match:`\\b0[xX]_*(${hexDigits2})(\\.(${hexDigits2}))?([pP][+-]?(${decimalDigits2}))?\\b`},{match:`\\b0[oO](${octalDigits})\\b`},{match:`\\b0[bB](${binaryDigits})\\b`}]};return{name:"Haskell",aliases:["hs"],keywords:"let in if then else case o\ f where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",unicodeRegex:!0,contains:[{beginKeywords:"module",end:"where",keywords:"module where",contains:[LIST,COMMENT],illegal:"\\W\\.|;"},{begin:"\\bimport\\b",end:"$",keywords:"import qualified as hiding",contains:[LIST,COMMENT],illegal:"\\W\\.|;"},{className:"class",begin:"^(\\s*)?(class|instance)\\b", end:"where",keywords:"class family instance where",contains:[CONSTRUCTOR,LIST,COMMENT]},{className:"class",begin:"\\b(data|(new)?type)\\b",end:"$",keywords:"data family type newtype deriving",contains:[PRAGMA,CONSTRUCTOR,LIST,RECORD,COMMENT]},{beginKeywords:"default",end:"$",contains:[CONSTRUCTOR,LIST,COMMENT]},{beginKeywords:"infix infixl infixr",end:"$",contains:[hljs.C_NUMBER_MODE,COMMENT]},{begin:"\\bforeign\\b",end:"$",keywords:"foreign import export ccall stdcall cplusplus jvm dotnet safe \ unsafe",contains:[CONSTRUCTOR,hljs.QUOTE_STRING_MODE,COMMENT]},{className:"meta",begin:"#!\\/usr\\/bin\\/env runhaskell",end:"$"},PRAGMA,PREPROCESSOR,{scope:"string",begin:/'(?=\\?.')/,end:/'/,contains:[{scope:"char.escape",match:/\\./}]},hljs.QUOTE_STRING_MODE,NUMBER,CONSTRUCTOR,hljs.inherit(hljs.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),{begin:`(?!-)${symbol}--+|--+(?!-)${symbol}`},COMMENT,{begin:"->|<-"}]}}function haxe(hljs){const IDENT_RE2="[a-zA-Z_$][a-zA-Z0-9_$]*",HAXE_NUMBER_RE=/(-?)(\b0[xX][a-fA-F0-9_]+|(\b\d+(\.[\d_]*)?|\.[\d_]+)(([eE][-+]?\d+)|i32|u32|i64|f64)?)/; return{name:"Haxe",aliases:["hx"],keywords:{keyword:"abstract break case cast catch continue default do dynamic else enum extern final for function here if import in inline is macro never new override package private get set public return static super switch this throw trace try typedef untyped using var while "+"Int Float String Bool Dynamic Void Array ",built_in:"trace this",literal:"true false null _"},contains:[{className:"string",begin:"'",end:"'",contains:[hljs.BACKSLASH_ESCAPE,{className:"\ subst",begin:/\$\{/,end:/\}/},{className:"subst",begin:/\$/,end:/\W\}/}]},hljs.QUOTE_STRING_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"number",begin:HAXE_NUMBER_RE,relevance:0},{className:"variable",begin:"\\$"+IDENT_RE2},{className:"meta",begin:/@:?/,end:/\(|$/,excludeEnd:!0},{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elseif end error"}},{className:"type",begin:/:[ \t]*/,end:/[^A-Za-z0-9_ \t\->]/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"\ type",begin:/:[ \t]*/,end:/\W/,excludeBegin:!0,excludeEnd:!0},{className:"type",beginKeywords:"new",end:/\W/,excludeBegin:!0,excludeEnd:!0},{className:"title.class",beginKeywords:"enum",end:/\{/,contains:[hljs.TITLE_MODE]},{className:"title.class",begin:"\\babstract\\b(?=\\s*"+hljs.IDENT_RE+"\\s*\\()",end:/[\{$]/,contains:[{className:"type",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0},{className:"type",begin:/from +/,end:/\W/,excludeBegin:!0,excludeEnd:!0},{className:"type",begin:/to +/,end:/\W/, excludeBegin:!0,excludeEnd:!0},hljs.TITLE_MODE],keywords:{keyword:"abstract from to"}},{className:"title.class",begin:/\b(class|interface) +/,end:/[\{$]/,excludeEnd:!0,keywords:"class interface",contains:[{className:"keyword",begin:/\b(extends|implements) +/,keywords:"extends implements",contains:[{className:"type",begin:hljs.IDENT_RE,relevance:0}]},hljs.TITLE_MODE]},{className:"title.function",beginKeywords:"function",end:/\(/,excludeEnd:!0,illegal:/\S/,contains:[hljs.TITLE_MODE]}],illegal:/<\//}} function hsp(hljs){return{name:"HSP",case_insensitive:!0,keywords:{$pattern:/[\w._]+/,keyword:"goto gosub return break repeat loop continue wait await dim sdim foreach dimtype dup dupptr end stop newmod delmod mref run exgoto on mcall assert logmes newlab resume yield onexit onerror onkey onclick oncmd exist delete mkdir chdir dirlist bload bsave bcopy memfile if else poke wpoke lpoke getstr chdpm memexpand memcpy memset notesel noteadd notedel noteload notesave randomize noteunsel noteget split\ strrep setease button chgdisp exec dialog mmload mmplay mmstop mci pset pget syscolor mes print title pos circle cls font sysfont objsize picload color palcolor palette redraw width gsel gcopy gzoom gmode bmpsave hsvcolor getkey listbox chkbox combox input mesbox buffer screen bgscr mouse objsel groll line clrobj boxf objprm objmode stick grect grotate gsquare gradf objimage objskip objenable celload celdiv celput newcom querycom delcom cnvstow comres axobj winobj sendmsg comevent comevarg sarr\ ayconv callfunc cnvwtos comevdisp libptr system hspstat hspver stat cnt err strsize looplev sublev iparam wparam lparam refstr refdval int rnd strlen length length2 length3 length4 vartype gettime peek wpeek lpeek varptr varuse noteinfo instr abs limit getease str strmid strf getpath strtrim sin cos tan atan sqrt double absf expf logf limitf powf geteasef mousex mousey mousew hwnd hinstance hdc ginfo objinfo dirinfo sysinfo thismod __hspver__ __hsp30__ __date__ __time__ __line__ __file__ _debug \ __hspdef__ and or xor not screen_normal screen_palette screen_hide screen_fixedsize screen_tool screen_frame gmode_gdi gmode_mem gmode_rgb0 gmode_alpha gmode_rgb0alpha gmode_add gmode_sub gmode_pixela ginfo_mx ginfo_my ginfo_act ginfo_sel ginfo_wx1 ginfo_wy1 ginfo_wx2 ginfo_wy2 ginfo_vx ginfo_vy ginfo_sizex ginfo_sizey ginfo_winx ginfo_winy ginfo_mesx ginfo_mesy ginfo_r ginfo_g ginfo_b ginfo_paluse ginfo_dispx ginfo_dispy ginfo_cx ginfo_cy ginfo_intid ginfo_newid ginfo_sx ginfo_sy objinfo_mode o\ bjinfo_bmscr objinfo_hwnd notemax notesize dir_cur dir_exe dir_win dir_sys dir_cmdline dir_desktop dir_mydoc dir_tv font_normal font_bold font_italic font_underline font_strikeout font_antialias objmode_normal objmode_guifont objmode_usefont gsquare_grad msgothic msmincho do until while wend for next _break _continue switch case default swbreak swend ddim ldim alloc m_pi rad2deg deg2rad ease_linear ease_quad_in ease_quad_out ease_quad_inout ease_cubic_in ease_cubic_out ease_cubic_inout ease_quar\ tic_in ease_quartic_out ease_quartic_inout ease_bounce_in ease_bounce_out ease_bounce_inout ease_shake_in ease_shake_out ease_shake_inout ease_loop"},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,{className:"string",begin:/\{"/,end:/"\}/,contains:[hljs.BACKSLASH_ESCAPE]},hljs.COMMENT(";","$",{relevance:0}),{className:"meta",begin:"#",end:"$",keywords:{keyword:"addion cfunc cmd cmpopt comfunc const defcfunc deffunc define else endif enum\ epack func global if ifdef ifndef include modcfunc modfunc modinit modterm module pack packopt regcmd runtime undef usecom uselib"},contains:[hljs.inherit(hljs.QUOTE_STRING_MODE,{className:"string"}),hljs.NUMBER_MODE,hljs.C_NUMBER_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{className:"symbol",begin:"^\\*(\\w+|@)"},hljs.NUMBER_MODE,hljs.C_NUMBER_MODE]}}function http(hljs){const regex=hljs.regex,VERSION="HTTP/([32]|1\\.[01])",HEADER_NAME=/[A-Za-z][A-Za-z0-9-]*/,HEADER={className:"a\ ttribute",begin:regex.concat("^",HEADER_NAME,"(?=\\:\\s)"),starts:{contains:[{className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]}},HEADERS_AND_BODY=[HEADER,{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+VERSION+" \\d{3})",end:/$/,contains:[{className:"meta",begin:VERSION},{className:"number",begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:HEADERS_AND_BODY}},{begin:"(?\ =^[A-Z]+ (.*?) "+VERSION+"$)",end:/$/,contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:VERSION},{className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:HEADERS_AND_BODY}},hljs.inherit(HEADER,{relevance:0})]}}function hy(hljs){const SYMBOLSTART="a-zA-Z_\\-!.?+*=<>&#'",SYMBOL_RE="["+SYMBOLSTART+"]["+SYMBOLSTART+"0-9/;:]*",keywords2={$pattern:SYMBOL_RE,built_in:"!= % %= & &= * ** **= *= *map + += , --build-class-- --import\ -- -= . / // //= /= < << <<= <= = > >= >> >>= @ @= ^ ^= abs accumulate all and any ap-compose ap-dotimes ap-each ap-each-while ap-filter ap-first ap-if ap-last ap-map ap-map-when ap-pipe ap-reduce ap-reject apply as-> ascii assert assoc bin break butlast callable calling-module-name car case cdr chain chr coll? combinations compile compress cond cons cons? continue count curry cut cycle dec def default-method defclass defmacro defmacro-alias defmacro/g! defmain defmethod defmulti defn defn-alias\ defnc defnr defreader defseq del delattr delete-route dict-comp dir disassemble dispatch-reader-macro distinct divmod do doto drop drop-last drop-while empty? end-sequence eval eval-and-compile eval-when-compile even? every? except exec filter first flatten float? fn fnc fnr for for* format fraction genexpr gensym get getattr global globals group-by hasattr hash hex id identity if if* if-not if-python2 import in inc input instance? integer integer-char? integer? interleave interpose is is-coll \ is-cons is-empty is-even is-every is-float is-instance is-integer is-integer-char is-iterable is-iterator is-keyword is-neg is-none is-not is-numeric is-odd is-pos is-string is-symbol is-zero isinstance islice issubclass iter iterable? iterate iterator? keyword keyword? lambda last len let lif lif-not list* list-comp locals loop macro-error macroexpand macroexpand-1 macroexpand-all map max merge-with method-decorator min multi-decorator multicombinations name neg? next none? nonlocal not not-in \ not? nth numeric? oct odd? open or ord partition permutations pos? post-route postwalk pow prewalk print product profile/calls profile/cpu put-route quasiquote quote raise range read read-str recursive-replace reduce remove repeat repeatedly repr require rest round route route-with-methods rwm second seq set-comp setattr setv some sorted string string? sum switch symbol? take take-nth take-while tee try unless unquote unquote-splicing vars walk when while with with* with-decorator with-gensyms x\ i xor yield yield-from zero? zip zip-longest | |= ~"},SIMPLE_NUMBER_RE="[-+]?\\d+(\\.\\d+)?",SYMBOL={begin:SYMBOL_RE,relevance:0},NUMBER={className:"number",begin:SIMPLE_NUMBER_RE,relevance:0},STRING=hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),COMMENT=hljs.COMMENT(";","$",{relevance:0}),LITERAL={className:"literal",begin:/\b([Tt]rue|[Ff]alse|nil|None)\b/},COLLECTION={begin:"[\\[\\{]",end:"[\\]\\}]",relevance:0},HINT={className:"comment",begin:"\\^"+SYMBOL_RE},HINT_COL=hljs.COMMENT("\\^\\{", "\\}"),KEY={className:"symbol",begin:"[:]{1,2}"+SYMBOL_RE},LIST={begin:"\\(",end:"\\)"},BODY={endsWithParent:!0,relevance:0},NAME={className:"name",relevance:0,keywords:keywords2,begin:SYMBOL_RE,starts:BODY},DEFAULT_CONTAINS=[LIST,STRING,HINT,HINT_COL,COMMENT,KEY,COLLECTION,NUMBER,LITERAL,SYMBOL];return LIST.contains=[hljs.COMMENT("comment",""),NAME,BODY],BODY.contains=DEFAULT_CONTAINS,COLLECTION.contains=DEFAULT_CONTAINS,{name:"Hy",aliases:["hylang"],illegal:/\S/,contains:[hljs.SHEBANG(),LIST,STRING, HINT,HINT_COL,COMMENT,KEY,COLLECTION,NUMBER,LITERAL]}}function inform7(hljs){return{name:"Inform 7",aliases:["i7"],case_insensitive:!0,keywords:{keyword:"thing room person man woman animal container supporter backdrop door scenery open closed locked inside gender is are say understand kind of rule"},contains:[{className:"string",begin:'"',end:'"',relevance:0,contains:[{className:"subst",begin:"\\[",end:"\\]"}]},{className:"section",begin:/^(Volume|Book|Part|Chapter|Section|Table)\b/,end:"$"},{begin:/^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/, end:":",contains:[{begin:"\\(This",end:"\\)"}]},{className:"comment",begin:"\\[",end:"\\]",contains:["self"]}]}}function irpf90(hljs){const regex=hljs.regex,PARAMS={className:"params",begin:"\\(",end:"\\)"},OPTIONAL_NUMBER_SUFFIX=/(_[a-z_\d]+)?/,OPTIONAL_NUMBER_EXP=/([de][+-]?\d+)?/,NUMBER={className:"number",variants:[{begin:regex.concat(/\b\d+/,/\.(\d*)/,OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)},{begin:regex.concat(/\b\d+/,OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)},{begin:regex.concat(/\.\d+/, OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)}],relevance:0};return{name:"IRPF90",case_insensitive:!0,keywords:{literal:".False. .True.",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name na\ med nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c\ _int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmeti\ c ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data begin_provider &begin_provider end_provider begin_shell end_shell begin_template end_templa\ te subst assert touch soft_touch provide no_dep free irp_if irp_else irp_endif irp_write irp_read",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlg\ ama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift \ epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get\ _command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of acosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparit\ y image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image IRP_ALIGN irp_here"},illegal:/\/\*/,contains:[hljs.inherit(hljs.APOS_STRING_MODE,{className:"string",relevance:0}),hljs.inherit(hljs.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[hljs.UNDERSCORE_TITLE_MODE,PARAMS]},hljs.COMMENT("!","$",{relevance:0}),hljs.COMMENT("begin_doc","end_doc",{relevance:10}), NUMBER]}}function isbl(hljs){const UNDERSCORE_IDENT_RE="[A-Za-zА-Яа-яёЁ_!][A-Za-zА-Яа-яёЁ_0-9]*",FUNCTION_NAME_IDENT_RE="[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]*",KEYWORD="and и else иначе endexcept endfinally endforeach конецвсе endif конецесли endwhile конецпока except exitfor finally foreach все if если in в not не or или try while пока ",CONSTANTS="SYSRES_CONST_ACCES_RIGHT_TYPE_EDIT SYSRES_CONST_ACCES_RIGHT_TYPE_FULL SYSR\ ES_CONST_ACCES_RIGHT_TYPE_VIEW SYSRES_CONST_ACCESS_MODE_REQUISITE_CODE SYSRES_CONST_ACCESS_NO_ACCESS_VIEW SYSRES_CONST_ACCESS_NO_ACCESS_VIEW_CODE SYSRES_CONST_ACCESS_RIGHTS_ADD_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_ADD_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_CHANGE_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_CHANGE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_DELETE_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_DELETE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_EXECUTE_REQUISITE_CODE SYSR\ ES_CONST_ACCESS_RIGHTS_EXECUTE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_NO_ACCESS_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_NO_ACCESS_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_RATIFY_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_RATIFY_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW SYSRES_CONST_ACCESS_RIGHTS_VIEW_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_TYPE_CHANGE\ SYSRES_CONST_ACCESS_TYPE_CHANGE_CODE SYSRES_CONST_ACCESS_TYPE_EXISTS SYSRES_CONST_ACCESS_TYPE_EXISTS_CODE SYSRES_CONST_ACCESS_TYPE_FULL SYSRES_CONST_ACCESS_TYPE_FULL_CODE SYSRES_CONST_ACCESS_TYPE_VIEW SYSRES_CONST_ACCESS_TYPE_VIEW_CODE SYSRES_CONST_ACTION_TYPE_ABORT SYSRES_CONST_ACTION_TYPE_ACCEPT SYSRES_CONST_ACTION_TYPE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ADD_ATTACHMENT SYSRES_CONST_ACTION_TYPE_CHANGE_CARD SYSRES_CONST_ACTION_TYPE_CHANGE_KIND SYSRES_CONST_ACTION_TYPE_CHANGE_STORAGE SYSRES_\ CONST_ACTION_TYPE_CONTINUE SYSRES_CONST_ACTION_TYPE_COPY SYSRES_CONST_ACTION_TYPE_CREATE SYSRES_CONST_ACTION_TYPE_CREATE_VERSION SYSRES_CONST_ACTION_TYPE_DELETE SYSRES_CONST_ACTION_TYPE_DELETE_ATTACHMENT SYSRES_CONST_ACTION_TYPE_DELETE_VERSION SYSRES_CONST_ACTION_TYPE_DISABLE_DELEGATE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ENABLE_DELEGATE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_CERTIFICATE SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_CERTIFICATE_AND_PASSWORD SYSRES_CONST_ACTION_TYPE_ENCRY\ PTION_BY_PASSWORD SYSRES_CONST_ACTION_TYPE_EXPORT_WITH_LOCK SYSRES_CONST_ACTION_TYPE_EXPORT_WITHOUT_LOCK SYSRES_CONST_ACTION_TYPE_IMPORT_WITH_UNLOCK SYSRES_CONST_ACTION_TYPE_IMPORT_WITHOUT_UNLOCK SYSRES_CONST_ACTION_TYPE_LIFE_CYCLE_STAGE SYSRES_CONST_ACTION_TYPE_LOCK SYSRES_CONST_ACTION_TYPE_LOCK_FOR_SERVER SYSRES_CONST_ACTION_TYPE_LOCK_MODIFY SYSRES_CONST_ACTION_TYPE_MARK_AS_READED SYSRES_CONST_ACTION_TYPE_MARK_AS_UNREADED SYSRES_CONST_ACTION_TYPE_MODIFY SYSRES_CONST_ACTION_TYPE_MODIFY_CARD SYS\ RES_CONST_ACTION_TYPE_MOVE_TO_ARCHIVE SYSRES_CONST_ACTION_TYPE_OFF_ENCRYPTION SYSRES_CONST_ACTION_TYPE_PASSWORD_CHANGE SYSRES_CONST_ACTION_TYPE_PERFORM SYSRES_CONST_ACTION_TYPE_RECOVER_FROM_LOCAL_COPY SYSRES_CONST_ACTION_TYPE_RESTART SYSRES_CONST_ACTION_TYPE_RESTORE_FROM_ARCHIVE SYSRES_CONST_ACTION_TYPE_REVISION SYSRES_CONST_ACTION_TYPE_SEND_BY_MAIL SYSRES_CONST_ACTION_TYPE_SIGN SYSRES_CONST_ACTION_TYPE_START SYSRES_CONST_ACTION_TYPE_UNLOCK SYSRES_CONST_ACTION_TYPE_UNLOCK_FROM_SERVER SYSRES_CONS\ T_ACTION_TYPE_VERSION_STATE SYSRES_CONST_ACTION_TYPE_VERSION_VISIBILITY SYSRES_CONST_ACTION_TYPE_VIEW SYSRES_CONST_ACTION_TYPE_VIEW_SHADOW_COPY SYSRES_CONST_ACTION_TYPE_WORKFLOW_DESCRIPTION_MODIFY SYSRES_CONST_ACTION_TYPE_WRITE_HISTORY SYSRES_CONST_ACTIVE_VERSION_STATE_PICK_VALUE SYSRES_CONST_ADD_REFERENCE_MODE_NAME SYSRES_CONST_ADDITION_REQUISITE_CODE SYSRES_CONST_ADDITIONAL_PARAMS_REQUISITE_CODE SYSRES_CONST_ADITIONAL_JOB_END_DATE_REQUISITE_NAME SYSRES_CONST_ADITIONAL_JOB_READ_REQUISITE_NAME S\ YSRES_CONST_ADITIONAL_JOB_START_DATE_REQUISITE_NAME SYSRES_CONST_ADITIONAL_JOB_STATE_REQUISITE_NAME SYSRES_CONST_ADMINISTRATION_HISTORY_ADDING_USER_TO_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_ADDING_USER_TO_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_COMP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_COMP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION\ _HISTORY_CREATION_USER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_USER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_CREATION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_CREATION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_DELETION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_DELETION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_COMP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_COMP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DEL\ ETION_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_FROM_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_FROM_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HIS\ TORY_GRANTING_FILTERER_RESTRICTION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_RESTRICTION_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_PRIVILEGE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_PRIVILEGE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_RIGHTS_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_RIGHTS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_IS_MAIN_SERVER_CHANGED_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_IS_MAIN_SERVER_CHANGED_ACT\ ION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_IS_PUBLIC_CHANGED_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_IS_PUBLIC_CHANGED_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_RESTRICTION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_RESTRICTION_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_PRIVILEGE_ACTION SYSRES_CONST_ADMINISTRAT\ ION_HISTORY_REMOVING_PRIVILEGE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_RIGHTS_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_RIGHTS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_CREATION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_CREATION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_DELETION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_DELETION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_CATEGORY_ACTION SYSRES_CONST_ADMINISTRATION\ _HISTORY_UPDATING_CATEGORY_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_COMP_TITLE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_COMP_TITLE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_FULL_NAME_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_FULL_NAME_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_PARENT_GROUP_ACTION SYSRES_CONST_AD\ MINISTRATION_HISTORY_UPDATING_PARENT_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_AUTH_TYPE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_AUTH_TYPE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_LOGIN_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_LOGIN_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_STATUS_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_STATUS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_USER_P\ ASSWORD_CHANGE SYSRES_CONST_ADMINISTRATION_HISTORY_USER_PASSWORD_CHANGE_ACTION SYSRES_CONST_ALL_ACCEPT_CONDITION_RUS SYSRES_CONST_ALL_USERS_GROUP SYSRES_CONST_ALL_USERS_GROUP_NAME SYSRES_CONST_ALL_USERS_SERVER_GROUP_NAME SYSRES_CONST_ALLOWED_ACCESS_TYPE_CODE SYSRES_CONST_ALLOWED_ACCESS_TYPE_NAME SYSRES_CONST_APP_VIEWER_TYPE_REQUISITE_CODE SYSRES_CONST_APPROVING_SIGNATURE_NAME SYSRES_CONST_APPROVING_SIGNATURE_REQUISITE_CODE SYSRES_CONST_ASSISTANT_SUBSTITUE_TYPE SYSRES_CONST_ASSISTANT_SUBSTITUE_TY\ PE_CODE SYSRES_CONST_ATTACH_TYPE_COMPONENT_TOKEN SYSRES_CONST_ATTACH_TYPE_DOC SYSRES_CONST_ATTACH_TYPE_EDOC SYSRES_CONST_ATTACH_TYPE_FOLDER SYSRES_CONST_ATTACH_TYPE_JOB SYSRES_CONST_ATTACH_TYPE_REFERENCE SYSRES_CONST_ATTACH_TYPE_TASK SYSRES_CONST_AUTH_ENCODED_PASSWORD SYSRES_CONST_AUTH_ENCODED_PASSWORD_CODE SYSRES_CONST_AUTH_NOVELL SYSRES_CONST_AUTH_PASSWORD SYSRES_CONST_AUTH_PASSWORD_CODE SYSRES_CONST_AUTH_WINDOWS SYSRES_CONST_AUTHENTICATING_SIGNATURE_NAME SYSRES_CONST_AUTHENTICATING_SIGNATURE_\ REQUISITE_CODE SYSRES_CONST_AUTO_ENUM_METHOD_FLAG SYSRES_CONST_AUTO_NUMERATION_CODE SYSRES_CONST_AUTO_STRONG_ENUM_METHOD_FLAG SYSRES_CONST_AUTOTEXT_NAME_REQUISITE_CODE SYSRES_CONST_AUTOTEXT_TEXT_REQUISITE_CODE SYSRES_CONST_AUTOTEXT_USAGE_ALL SYSRES_CONST_AUTOTEXT_USAGE_ALL_CODE SYSRES_CONST_AUTOTEXT_USAGE_SIGN SYSRES_CONST_AUTOTEXT_USAGE_SIGN_CODE SYSRES_CONST_AUTOTEXT_USAGE_WORK SYSRES_CONST_AUTOTEXT_USAGE_WORK_CODE SYSRES_CONST_AUTOTEXT_USE_ANYWHERE_CODE SYSRES_CONST_AUTOTEXT_USE_ON_SIGNING_CO\ DE SYSRES_CONST_AUTOTEXT_USE_ON_WORK_CODE SYSRES_CONST_BEGIN_DATE_REQUISITE_CODE SYSRES_CONST_BLACK_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_BLUE_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_BTN_PART SYSRES_CONST_CALCULATED_ROLE_TYPE_CODE SYSRES_CONST_CALL_TYPE_VARIABLE_BUTTON_VALUE SYSRES_CONST_CALL_TYPE_VARIABLE_PROGRAM_VALUE SYSRES_CONST_CANCEL_MESSAGE_FUNCTION_RESULT SYSRES_CONST_CARD_PART SYSRES_CONST_CARD_REFERENCE_MODE_NAME SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_ENCRYPT_VALUE SYSRES_CONST_CE\ RTIFICATE_TYPE_REQUISITE_SIGN_AND_ENCRYPT_VALUE SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_SIGN_VALUE SYSRES_CONST_CHECK_PARAM_VALUE_DATE_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_FLOAT_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_INTEGER_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_PICK_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_REEFRENCE_PARAM_TYPE SYSRES_CONST_CLOSED_RECORD_FLAG_VALUE_FEMININE SYSRES_CONST_CLOSED_RECORD_FLAG_VALUE_MASCULINE SYSRES_CONST_CODE_COMPONENT_TYPE_ADMIN SYSRES_CONST_CODE_COMPO\ NENT_TYPE_DEVELOPER SYSRES_CONST_CODE_COMPONENT_TYPE_DOCS SYSRES_CONST_CODE_COMPONENT_TYPE_EDOC_CARDS SYSRES_CONST_CODE_COMPONENT_TYPE_EXTERNAL_EXECUTABLE SYSRES_CONST_CODE_COMPONENT_TYPE_OTHER SYSRES_CONST_CODE_COMPONENT_TYPE_REFERENCE SYSRES_CONST_CODE_COMPONENT_TYPE_REPORT SYSRES_CONST_CODE_COMPONENT_TYPE_SCRIPT SYSRES_CONST_CODE_COMPONENT_TYPE_URL SYSRES_CONST_CODE_REQUISITE_ACCESS SYSRES_CONST_CODE_REQUISITE_CODE SYSRES_CONST_CODE_REQUISITE_COMPONENT SYSRES_CONST_CODE_REQUISITE_DESCRIPTION \ SYSRES_CONST_CODE_REQUISITE_EXCLUDE_COMPONENT SYSRES_CONST_CODE_REQUISITE_RECORD SYSRES_CONST_COMMENT_REQ_CODE SYSRES_CONST_COMMON_SETTINGS_REQUISITE_CODE SYSRES_CONST_COMP_CODE_GRD SYSRES_CONST_COMPONENT_GROUP_TYPE_REQUISITE_CODE SYSRES_CONST_COMPONENT_TYPE_ADMIN_COMPONENTS SYSRES_CONST_COMPONENT_TYPE_DEVELOPER_COMPONENTS SYSRES_CONST_COMPONENT_TYPE_DOCS SYSRES_CONST_COMPONENT_TYPE_EDOC_CARDS SYSRES_CONST_COMPONENT_TYPE_EDOCS SYSRES_CONST_COMPONENT_TYPE_EXTERNAL_EXECUTABLE SYSRES_CONST_COMPONEN\ T_TYPE_OTHER SYSRES_CONST_COMPONENT_TYPE_REFERENCE_TYPES SYSRES_CONST_COMPONENT_TYPE_REFERENCES SYSRES_CONST_COMPONENT_TYPE_REPORTS SYSRES_CONST_COMPONENT_TYPE_SCRIPTS SYSRES_CONST_COMPONENT_TYPE_URL SYSRES_CONST_COMPONENTS_REMOTE_SERVERS_VIEW_CODE SYSRES_CONST_CONDITION_BLOCK_DESCRIPTION SYSRES_CONST_CONST_FIRM_STATUS_COMMON SYSRES_CONST_CONST_FIRM_STATUS_INDIVIDUAL SYSRES_CONST_CONST_NEGATIVE_VALUE SYSRES_CONST_CONST_POSITIVE_VALUE SYSRES_CONST_CONST_SERVER_STATUS_DONT_REPLICATE SYSRES_CONST_C\ ONST_SERVER_STATUS_REPLICATE SYSRES_CONST_CONTENTS_REQUISITE_CODE SYSRES_CONST_DATA_TYPE_BOOLEAN SYSRES_CONST_DATA_TYPE_DATE SYSRES_CONST_DATA_TYPE_FLOAT SYSRES_CONST_DATA_TYPE_INTEGER SYSRES_CONST_DATA_TYPE_PICK SYSRES_CONST_DATA_TYPE_REFERENCE SYSRES_CONST_DATA_TYPE_STRING SYSRES_CONST_DATA_TYPE_TEXT SYSRES_CONST_DATA_TYPE_VARIANT SYSRES_CONST_DATE_CLOSE_REQ_CODE SYSRES_CONST_DATE_FORMAT_DATE_ONLY_CHAR SYSRES_CONST_DATE_OPEN_REQ_CODE SYSRES_CONST_DATE_REQUISITE SYSRES_CONST_DATE_REQUISITE_CODE\ SYSRES_CONST_DATE_REQUISITE_NAME SYSRES_CONST_DATE_REQUISITE_TYPE SYSRES_CONST_DATE_TYPE_CHAR SYSRES_CONST_DATETIME_FORMAT_VALUE SYSRES_CONST_DEA_ACCESS_RIGHTS_ACTION_CODE SYSRES_CONST_DESCRIPTION_LOCALIZE_ID_REQUISITE_CODE SYSRES_CONST_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_DET1_PART SYSRES_CONST_DET2_PART SYSRES_CONST_DET3_PART SYSRES_CONST_DET4_PART SYSRES_CONST_DET5_PART SYSRES_CONST_DET6_PART SYSRES_CONST_DETAIL_DATASET_KEY_REQUISITE_CODE SYSRES_CONST_DETAIL_PICK_REQUISITE_CODE SYSRES_CON\ ST_DETAIL_REQ_CODE SYSRES_CONST_DO_NOT_USE_ACCESS_TYPE_CODE SYSRES_CONST_DO_NOT_USE_ACCESS_TYPE_NAME SYSRES_CONST_DO_NOT_USE_ON_VIEW_ACCESS_TYPE_CODE SYSRES_CONST_DO_NOT_USE_ON_VIEW_ACCESS_TYPE_NAME SYSRES_CONST_DOCUMENT_STORAGES_CODE SYSRES_CONST_DOCUMENT_TEMPLATES_TYPE_NAME SYSRES_CONST_DOUBLE_REQUISITE_CODE SYSRES_CONST_EDITOR_CLOSE_FILE_OBSERV_TYPE_CODE SYSRES_CONST_EDITOR_CLOSE_PROCESS_OBSERV_TYPE_CODE SYSRES_CONST_EDITOR_TYPE_REQUISITE_CODE SYSRES_CONST_EDITORS_APPLICATION_NAME_REQUISITE_C\ ODE SYSRES_CONST_EDITORS_CREATE_SEVERAL_PROCESSES_REQUISITE_CODE SYSRES_CONST_EDITORS_EXTENSION_REQUISITE_CODE SYSRES_CONST_EDITORS_OBSERVER_BY_PROCESS_TYPE SYSRES_CONST_EDITORS_REFERENCE_CODE SYSRES_CONST_EDITORS_REPLACE_SPEC_CHARS_REQUISITE_CODE SYSRES_CONST_EDITORS_USE_PLUGINS_REQUISITE_CODE SYSRES_CONST_EDITORS_VIEW_DOCUMENT_OPENED_TO_EDIT_CODE SYSRES_CONST_EDOC_CARD_TYPE_REQUISITE_CODE SYSRES_CONST_EDOC_CARD_TYPES_LINK_REQUISITE_CODE SYSRES_CONST_EDOC_CERTIFICATE_AND_PASSWORD_ENCODE_CODE SY\ SRES_CONST_EDOC_CERTIFICATE_ENCODE_CODE SYSRES_CONST_EDOC_DATE_REQUISITE_CODE SYSRES_CONST_EDOC_KIND_REFERENCE_CODE SYSRES_CONST_EDOC_KINDS_BY_TEMPLATE_ACTION_CODE SYSRES_CONST_EDOC_MANAGE_ACCESS_CODE SYSRES_CONST_EDOC_NONE_ENCODE_CODE SYSRES_CONST_EDOC_NUMBER_REQUISITE_CODE SYSRES_CONST_EDOC_PASSWORD_ENCODE_CODE SYSRES_CONST_EDOC_READONLY_ACCESS_CODE SYSRES_CONST_EDOC_SHELL_LIFE_TYPE_VIEW_VALUE SYSRES_CONST_EDOC_SIZE_RESTRICTION_PRIORITY_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_CHECK_ACCESS_RIG\ HTS_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_COMPUTER_NAME_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_DATABASE_NAME_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_EDIT_IN_STORAGE_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_LOCAL_PATH_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_SHARED_SOURCE_NAME_REQUISITE_CODE SYSRES_CONST_EDOC_TEMPLATE_REQUISITE_CODE SYSRES_CONST_EDOC_TYPES_REFERENCE_CODE SYSRES_CONST_EDOC_VERSION_ACTIVE_STAGE_CODE SYSRES_CONST_EDOC_VERSION_DESIGN_STAGE_CODE SYSRES_CONST_EDOC_VERSION_OBSOLET\ E_STAGE_CODE SYSRES_CONST_EDOC_WRITE_ACCES_CODE SYSRES_CONST_EDOCUMENT_CARD_REQUISITES_REFERENCE_CODE_SELECTED_REQUISITE SYSRES_CONST_ENCODE_CERTIFICATE_TYPE_CODE SYSRES_CONST_END_DATE_REQUISITE_CODE SYSRES_CONST_ENUMERATION_TYPE_REQUISITE_CODE SYSRES_CONST_EXECUTE_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_EXECUTIVE_FILE_STORAGE_TYPE SYSRES_CONST_EXIST_CONST SYSRES_CONST_EXIST_VALUE SYSRES_CONST_EXPORT_LOCK_TYPE_ASK SYSRES_CONST_EXPORT_LOCK_TYPE_WITH_LOCK SYSRES_CONST_EXPORT_LOCK_TYPE_WITHOUT_LOCK SY\ SRES_CONST_EXPORT_VERSION_TYPE_ASK SYSRES_CONST_EXPORT_VERSION_TYPE_LAST SYSRES_CONST_EXPORT_VERSION_TYPE_LAST_ACTIVE SYSRES_CONST_EXTENSION_REQUISITE_CODE SYSRES_CONST_FILTER_NAME_REQUISITE_CODE SYSRES_CONST_FILTER_REQUISITE_CODE SYSRES_CONST_FILTER_TYPE_COMMON_CODE SYSRES_CONST_FILTER_TYPE_COMMON_NAME SYSRES_CONST_FILTER_TYPE_USER_CODE SYSRES_CONST_FILTER_TYPE_USER_NAME SYSRES_CONST_FILTER_VALUE_REQUISITE_NAME SYSRES_CONST_FLOAT_NUMBER_FORMAT_CHAR SYSRES_CONST_FLOAT_REQUISITE_TYPE SYSRES_CONST\ _FOLDER_AUTHOR_VALUE SYSRES_CONST_FOLDER_KIND_ANY_OBJECTS SYSRES_CONST_FOLDER_KIND_COMPONENTS SYSRES_CONST_FOLDER_KIND_EDOCS SYSRES_CONST_FOLDER_KIND_JOBS SYSRES_CONST_FOLDER_KIND_TASKS SYSRES_CONST_FOLDER_TYPE_COMMON SYSRES_CONST_FOLDER_TYPE_COMPONENT SYSRES_CONST_FOLDER_TYPE_FAVORITES SYSRES_CONST_FOLDER_TYPE_INBOX SYSRES_CONST_FOLDER_TYPE_OUTBOX SYSRES_CONST_FOLDER_TYPE_QUICK_LAUNCH SYSRES_CONST_FOLDER_TYPE_SEARCH SYSRES_CONST_FOLDER_TYPE_SHORTCUTS SYSRES_CONST_FOLDER_TYPE_USER SYSRES_CONST_F\ ROM_DICTIONARY_ENUM_METHOD_FLAG SYSRES_CONST_FULL_SUBSTITUTE_TYPE SYSRES_CONST_FULL_SUBSTITUTE_TYPE_CODE SYSRES_CONST_FUNCTION_CANCEL_RESULT SYSRES_CONST_FUNCTION_CATEGORY_SYSTEM SYSRES_CONST_FUNCTION_CATEGORY_USER SYSRES_CONST_FUNCTION_FAILURE_RESULT SYSRES_CONST_FUNCTION_SAVE_RESULT SYSRES_CONST_GENERATED_REQUISITE SYSRES_CONST_GREEN_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_GROUP_ACCOUNT_TYPE_VALUE_CODE SYSRES_CONST_GROUP_CATEGORY_NORMAL_CODE SYSRES_CONST_GROUP_CATEGORY_NORMAL_NAME SYSRES_CONS\ T_GROUP_CATEGORY_SERVICE_CODE SYSRES_CONST_GROUP_CATEGORY_SERVICE_NAME SYSRES_CONST_GROUP_COMMON_CATEGORY_FIELD_VALUE SYSRES_CONST_GROUP_FULL_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_RIGHTS_T_REQUISITE_CODE SYSRES_CONST_GROUP_SERVER_CODES_REQUISITE_CODE SYSRES_CONST_GROUP_SERVER_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_SERVICE_CATEGORY_FIELD_VALUE SYSRES_CONST_GROUP_USER_REQUISITE_CODE SYSRES_CONST_GROUPS_REFERENCE_CODE SYSRES_CONST_GROUPS_REQUISITE_CODE SYSRES\ _CONST_HIDDEN_MODE_NAME SYSRES_CONST_HIGH_LVL_REQUISITE_CODE SYSRES_CONST_HISTORY_ACTION_CREATE_CODE SYSRES_CONST_HISTORY_ACTION_DELETE_CODE SYSRES_CONST_HISTORY_ACTION_EDIT_CODE SYSRES_CONST_HOUR_CHAR SYSRES_CONST_ID_REQUISITE_CODE SYSRES_CONST_IDSPS_REQUISITE_CODE SYSRES_CONST_IMAGE_MODE_COLOR SYSRES_CONST_IMAGE_MODE_GREYSCALE SYSRES_CONST_IMAGE_MODE_MONOCHROME SYSRES_CONST_IMPORTANCE_HIGH SYSRES_CONST_IMPORTANCE_LOW SYSRES_CONST_IMPORTANCE_NORMAL SYSRES_CONST_IN_DESIGN_VERSION_STATE_PICK_VALU\ E SYSRES_CONST_INCOMING_WORK_RULE_TYPE_CODE SYSRES_CONST_INT_REQUISITE SYSRES_CONST_INT_REQUISITE_TYPE SYSRES_CONST_INTEGER_NUMBER_FORMAT_CHAR SYSRES_CONST_INTEGER_TYPE_CHAR SYSRES_CONST_IS_GENERATED_REQUISITE_NEGATIVE_VALUE SYSRES_CONST_IS_PUBLIC_ROLE_REQUISITE_CODE SYSRES_CONST_IS_REMOTE_USER_NEGATIVE_VALUE SYSRES_CONST_IS_REMOTE_USER_POSITIVE_VALUE SYSRES_CONST_IS_STORED_REQUISITE_NEGATIVE_VALUE SYSRES_CONST_IS_STORED_REQUISITE_STORED_VALUE SYSRES_CONST_ITALIC_LIFE_CYCLE_STAGE_DRAW_STYLE SYSR\ ES_CONST_JOB_BLOCK_DESCRIPTION SYSRES_CONST_JOB_KIND_CONTROL_JOB SYSRES_CONST_JOB_KIND_JOB SYSRES_CONST_JOB_KIND_NOTICE SYSRES_CONST_JOB_STATE_ABORTED SYSRES_CONST_JOB_STATE_COMPLETE SYSRES_CONST_JOB_STATE_WORKING SYSRES_CONST_KIND_REQUISITE_CODE SYSRES_CONST_KIND_REQUISITE_NAME SYSRES_CONST_KINDS_CREATE_SHADOW_COPIES_REQUISITE_CODE SYSRES_CONST_KINDS_DEFAULT_EDOC_LIFE_STAGE_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALL_TEPLATES_ALLOWED_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALLOW_LIFE_CYCLE_STAGE_\ CHANGING_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALLOW_MULTIPLE_ACTIVE_VERSIONS_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_SHARE_ACCES_RIGHTS_BY_DEFAULT_CODE SYSRES_CONST_KINDS_EDOC_TEMPLATE_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_TYPE_REQUISITE_CODE SYSRES_CONST_KINDS_SIGNERS_REQUISITES_CODE SYSRES_CONST_KOD_INPUT_TYPE SYSRES_CONST_LAST_UPDATE_DATE_REQUISITE_CODE SYSRES_CONST_LIFE_CYCLE_START_STAGE_REQUISITE_CODE SYSRES_CONST_LILAC_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_LINK_OBJECT_KIND_COMPONENT S\ YSRES_CONST_LINK_OBJECT_KIND_DOCUMENT SYSRES_CONST_LINK_OBJECT_KIND_EDOC SYSRES_CONST_LINK_OBJECT_KIND_FOLDER SYSRES_CONST_LINK_OBJECT_KIND_JOB SYSRES_CONST_LINK_OBJECT_KIND_REFERENCE SYSRES_CONST_LINK_OBJECT_KIND_TASK SYSRES_CONST_LINK_REF_TYPE_REQUISITE_CODE SYSRES_CONST_LIST_REFERENCE_MODE_NAME SYSRES_CONST_LOCALIZATION_DICTIONARY_MAIN_VIEW_CODE SYSRES_CONST_MAIN_VIEW_CODE SYSRES_CONST_MANUAL_ENUM_METHOD_FLAG SYSRES_CONST_MASTER_COMP_TYPE_REQUISITE_CODE SYSRES_CONST_MASTER_TABLE_REC_ID_REQUIS\ ITE_CODE SYSRES_CONST_MAXIMIZED_MODE_NAME SYSRES_CONST_ME_VALUE SYSRES_CONST_MESSAGE_ATTENTION_CAPTION SYSRES_CONST_MESSAGE_CONFIRMATION_CAPTION SYSRES_CONST_MESSAGE_ERROR_CAPTION SYSRES_CONST_MESSAGE_INFORMATION_CAPTION SYSRES_CONST_MINIMIZED_MODE_NAME SYSRES_CONST_MINUTE_CHAR SYSRES_CONST_MODULE_REQUISITE_CODE SYSRES_CONST_MONITORING_BLOCK_DESCRIPTION SYSRES_CONST_MONTH_FORMAT_VALUE SYSRES_CONST_NAME_LOCALIZE_ID_REQUISITE_CODE SYSRES_CONST_NAME_REQUISITE_CODE SYSRES_CONST_NAME_SINGULAR_REQUISI\ TE_CODE SYSRES_CONST_NAMEAN_INPUT_TYPE SYSRES_CONST_NEGATIVE_PICK_VALUE SYSRES_CONST_NEGATIVE_VALUE SYSRES_CONST_NO SYSRES_CONST_NO_PICK_VALUE SYSRES_CONST_NO_SIGNATURE_REQUISITE_CODE SYSRES_CONST_NO_VALUE SYSRES_CONST_NONE_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_NONOPERATING_RECORD_FLAG_VALUE SYSRES_CONST_NONOPERATING_RECORD_FLAG_VALUE_MASCULINE SYSRES_CONST_NORMAL_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_NORMAL_LIFE_CYCLE_STAGE_DRAW_STYLE SYSRES_CONST_NORMAL_MODE_NAME SYSRES_CONST_NOT_ALLOWED_ACCESS_\ TYPE_CODE SYSRES_CONST_NOT_ALLOWED_ACCESS_TYPE_NAME SYSRES_CONST_NOTE_REQUISITE_CODE SYSRES_CONST_NOTICE_BLOCK_DESCRIPTION SYSRES_CONST_NUM_REQUISITE SYSRES_CONST_NUM_STR_REQUISITE_CODE SYSRES_CONST_NUMERATION_AUTO_NOT_STRONG SYSRES_CONST_NUMERATION_AUTO_STRONG SYSRES_CONST_NUMERATION_FROM_DICTONARY SYSRES_CONST_NUMERATION_MANUAL SYSRES_CONST_NUMERIC_TYPE_CHAR SYSRES_CONST_NUMREQ_REQUISITE_CODE SYSRES_CONST_OBSOLETE_VERSION_STATE_PICK_VALUE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE SYSRES_CONST_O\ PERATING_RECORD_FLAG_VALUE_CODE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_FEMININE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_MASCULINE SYSRES_CONST_OPTIONAL_FORM_COMP_REQCODE_PREFIX SYSRES_CONST_ORANGE_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_ORIGINALREF_REQUISITE_CODE SYSRES_CONST_OURFIRM_REF_CODE SYSRES_CONST_OURFIRM_REQUISITE_CODE SYSRES_CONST_OURFIRM_VAR SYSRES_CONST_OUTGOING_WORK_RULE_TYPE_CODE SYSRES_CONST_PICK_NEGATIVE_RESULT SYSRES_CONST_PICK_POSITIVE_RESULT SYSRES_CONST_PICK_REQUISITE SYS\ RES_CONST_PICK_REQUISITE_TYPE SYSRES_CONST_PICK_TYPE_CHAR SYSRES_CONST_PLAN_STATUS_REQUISITE_CODE SYSRES_CONST_PLATFORM_VERSION_COMMENT SYSRES_CONST_PLUGINS_SETTINGS_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_POSITIVE_PICK_VALUE SYSRES_CONST_POWER_TO_CREATE_ACTION_CODE SYSRES_CONST_POWER_TO_SIGN_ACTION_CODE SYSRES_CONST_PRIORITY_REQUISITE_CODE SYSRES_CONST_QUALIFIED_TASK_TYPE SYSRES_CONST_QUALIFIED_TASK_TYPE_CODE SYSRES_CONST_RECSTAT_REQUISITE_CODE SYSRES_CONST_RED_LIFE_CYCLE_STAGE_FONT_COLOR SYSRE\ S_CONST_REF_ID_T_REF_TYPE_REQUISITE_CODE SYSRES_CONST_REF_REQUISITE SYSRES_CONST_REF_REQUISITE_TYPE SYSRES_CONST_REF_REQUISITES_REFERENCE_CODE_SELECTED_REQUISITE SYSRES_CONST_REFERENCE_RECORD_HISTORY_CREATE_ACTION_CODE SYSRES_CONST_REFERENCE_RECORD_HISTORY_DELETE_ACTION_CODE SYSRES_CONST_REFERENCE_RECORD_HISTORY_MODIFY_ACTION_CODE SYSRES_CONST_REFERENCE_TYPE_CHAR SYSRES_CONST_REFERENCE_TYPE_REQUISITE_NAME SYSRES_CONST_REFERENCES_ADD_PARAMS_REQUISITE_CODE SYSRES_CONST_REFERENCES_DISPLAY_REQUISITE\ _REQUISITE_CODE SYSRES_CONST_REMOTE_SERVER_STATUS_WORKING SYSRES_CONST_REMOTE_SERVER_TYPE_MAIN SYSRES_CONST_REMOTE_SERVER_TYPE_SECONDARY SYSRES_CONST_REMOTE_USER_FLAG_VALUE_CODE SYSRES_CONST_REPORT_APP_EDITOR_INTERNAL SYSRES_CONST_REPORT_BASE_REPORT_ID_REQUISITE_CODE SYSRES_CONST_REPORT_BASE_REPORT_REQUISITE_CODE SYSRES_CONST_REPORT_SCRIPT_REQUISITE_CODE SYSRES_CONST_REPORT_TEMPLATE_REQUISITE_CODE SYSRES_CONST_REPORT_VIEWER_CODE_REQUISITE_CODE SYSRES_CONST_REQ_ALLOW_COMPONENT_DEFAULT_VALUE SYSRE\ S_CONST_REQ_ALLOW_RECORD_DEFAULT_VALUE SYSRES_CONST_REQ_ALLOW_SERVER_COMPONENT_DEFAULT_VALUE SYSRES_CONST_REQ_MODE_AVAILABLE_CODE SYSRES_CONST_REQ_MODE_EDIT_CODE SYSRES_CONST_REQ_MODE_HIDDEN_CODE SYSRES_CONST_REQ_MODE_NOT_AVAILABLE_CODE SYSRES_CONST_REQ_MODE_VIEW_CODE SYSRES_CONST_REQ_NUMBER_REQUISITE_CODE SYSRES_CONST_REQ_SECTION_VALUE SYSRES_CONST_REQ_TYPE_VALUE SYSRES_CONST_REQUISITE_FORMAT_BY_UNIT SYSRES_CONST_REQUISITE_FORMAT_DATE_FULL SYSRES_CONST_REQUISITE_FORMAT_DATE_TIME SYSRES_CONST_RE\ QUISITE_FORMAT_LEFT SYSRES_CONST_REQUISITE_FORMAT_RIGHT SYSRES_CONST_REQUISITE_FORMAT_WITHOUT_UNIT SYSRES_CONST_REQUISITE_NUMBER_REQUISITE_CODE SYSRES_CONST_REQUISITE_SECTION_ACTIONS SYSRES_CONST_REQUISITE_SECTION_BUTTON SYSRES_CONST_REQUISITE_SECTION_BUTTONS SYSRES_CONST_REQUISITE_SECTION_CARD SYSRES_CONST_REQUISITE_SECTION_TABLE SYSRES_CONST_REQUISITE_SECTION_TABLE10 SYSRES_CONST_REQUISITE_SECTION_TABLE11 SYSRES_CONST_REQUISITE_SECTION_TABLE12 SYSRES_CONST_REQUISITE_SECTION_TABLE13 SYSRES_CONS\ T_REQUISITE_SECTION_TABLE14 SYSRES_CONST_REQUISITE_SECTION_TABLE15 SYSRES_CONST_REQUISITE_SECTION_TABLE16 SYSRES_CONST_REQUISITE_SECTION_TABLE17 SYSRES_CONST_REQUISITE_SECTION_TABLE18 SYSRES_CONST_REQUISITE_SECTION_TABLE19 SYSRES_CONST_REQUISITE_SECTION_TABLE2 SYSRES_CONST_REQUISITE_SECTION_TABLE20 SYSRES_CONST_REQUISITE_SECTION_TABLE21 SYSRES_CONST_REQUISITE_SECTION_TABLE22 SYSRES_CONST_REQUISITE_SECTION_TABLE23 SYSRES_CONST_REQUISITE_SECTION_TABLE24 SYSRES_CONST_REQUISITE_SECTION_TABLE3 SYSRES\ _CONST_REQUISITE_SECTION_TABLE4 SYSRES_CONST_REQUISITE_SECTION_TABLE5 SYSRES_CONST_REQUISITE_SECTION_TABLE6 SYSRES_CONST_REQUISITE_SECTION_TABLE7 SYSRES_CONST_REQUISITE_SECTION_TABLE8 SYSRES_CONST_REQUISITE_SECTION_TABLE9 SYSRES_CONST_REQUISITES_PSEUDOREFERENCE_REQUISITE_NUMBER_REQUISITE_CODE SYSRES_CONST_RIGHT_ALIGNMENT_CODE SYSRES_CONST_ROLES_REFERENCE_CODE SYSRES_CONST_ROUTE_STEP_AFTER_RUS SYSRES_CONST_ROUTE_STEP_AND_CONDITION_RUS SYSRES_CONST_ROUTE_STEP_OR_CONDITION_RUS SYSRES_CONST_ROUTE_TY\ PE_COMPLEX SYSRES_CONST_ROUTE_TYPE_PARALLEL SYSRES_CONST_ROUTE_TYPE_SERIAL SYSRES_CONST_SBDATASETDESC_NEGATIVE_VALUE SYSRES_CONST_SBDATASETDESC_POSITIVE_VALUE SYSRES_CONST_SBVIEWSDESC_POSITIVE_VALUE SYSRES_CONST_SCRIPT_BLOCK_DESCRIPTION SYSRES_CONST_SEARCH_BY_TEXT_REQUISITE_CODE SYSRES_CONST_SEARCHES_COMPONENT_CONTENT SYSRES_CONST_SEARCHES_CRITERIA_ACTION_NAME SYSRES_CONST_SEARCHES_EDOC_CONTENT SYSRES_CONST_SEARCHES_FOLDER_CONTENT SYSRES_CONST_SEARCHES_JOB_CONTENT SYSRES_CONST_SEARCHES_REFERENCE\ _CODE SYSRES_CONST_SEARCHES_TASK_CONTENT SYSRES_CONST_SECOND_CHAR SYSRES_CONST_SECTION_REQUISITE_ACTIONS_VALUE SYSRES_CONST_SECTION_REQUISITE_CARD_VALUE SYSRES_CONST_SECTION_REQUISITE_CODE SYSRES_CONST_SECTION_REQUISITE_DETAIL_1_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_2_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_3_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_4_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_5_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_6_VALUE SYSRES_CONST_SELECT_REFERENCE_MODE_\ NAME SYSRES_CONST_SELECT_TYPE_SELECTABLE SYSRES_CONST_SELECT_TYPE_SELECTABLE_ONLY_CHILD SYSRES_CONST_SELECT_TYPE_SELECTABLE_WITH_CHILD SYSRES_CONST_SELECT_TYPE_UNSLECTABLE SYSRES_CONST_SERVER_TYPE_MAIN SYSRES_CONST_SERVICE_USER_CATEGORY_FIELD_VALUE SYSRES_CONST_SETTINGS_USER_REQUISITE_CODE SYSRES_CONST_SIGNATURE_AND_ENCODE_CERTIFICATE_TYPE_CODE SYSRES_CONST_SIGNATURE_CERTIFICATE_TYPE_CODE SYSRES_CONST_SINGULAR_TITLE_REQUISITE_CODE SYSRES_CONST_SQL_SERVER_AUTHENTIFICATION_FLAG_VALUE_CODE SYSRES_C\ ONST_SQL_SERVER_ENCODE_AUTHENTIFICATION_FLAG_VALUE_CODE SYSRES_CONST_STANDART_ROUTE_REFERENCE_CODE SYSRES_CONST_STANDART_ROUTE_REFERENCE_COMMENT_REQUISITE_CODE SYSRES_CONST_STANDART_ROUTES_GROUPS_REFERENCE_CODE SYSRES_CONST_STATE_REQ_NAME SYSRES_CONST_STATE_REQUISITE_ACTIVE_VALUE SYSRES_CONST_STATE_REQUISITE_CLOSED_VALUE SYSRES_CONST_STATE_REQUISITE_CODE SYSRES_CONST_STATIC_ROLE_TYPE_CODE SYSRES_CONST_STATUS_PLAN_DEFAULT_VALUE SYSRES_CONST_STATUS_VALUE_AUTOCLEANING SYSRES_CONST_STATUS_VALUE_BLUE\ _SQUARE SYSRES_CONST_STATUS_VALUE_COMPLETE SYSRES_CONST_STATUS_VALUE_GREEN_SQUARE SYSRES_CONST_STATUS_VALUE_ORANGE_SQUARE SYSRES_CONST_STATUS_VALUE_PURPLE_SQUARE SYSRES_CONST_STATUS_VALUE_RED_SQUARE SYSRES_CONST_STATUS_VALUE_SUSPEND SYSRES_CONST_STATUS_VALUE_YELLOW_SQUARE SYSRES_CONST_STDROUTE_SHOW_TO_USERS_REQUISITE_CODE SYSRES_CONST_STORAGE_TYPE_FILE SYSRES_CONST_STORAGE_TYPE_SQL_SERVER SYSRES_CONST_STR_REQUISITE SYSRES_CONST_STRIKEOUT_LIFE_CYCLE_STAGE_DRAW_STYLE SYSRES_CONST_STRING_FORMAT_LEF\ T_ALIGN_CHAR SYSRES_CONST_STRING_FORMAT_RIGHT_ALIGN_CHAR SYSRES_CONST_STRING_REQUISITE_CODE SYSRES_CONST_STRING_REQUISITE_TYPE SYSRES_CONST_STRING_TYPE_CHAR SYSRES_CONST_SUBSTITUTES_PSEUDOREFERENCE_CODE SYSRES_CONST_SUBTASK_BLOCK_DESCRIPTION SYSRES_CONST_SYSTEM_SETTING_CURRENT_USER_PARAM_VALUE SYSRES_CONST_SYSTEM_SETTING_EMPTY_VALUE_PARAM_VALUE SYSRES_CONST_SYSTEM_VERSION_COMMENT SYSRES_CONST_TASK_ACCESS_TYPE_ALL SYSRES_CONST_TASK_ACCESS_TYPE_ALL_MEMBERS SYSRES_CONST_TASK_ACCESS_TYPE_MANUAL SYSR\ ES_CONST_TASK_ENCODE_TYPE_CERTIFICATION SYSRES_CONST_TASK_ENCODE_TYPE_CERTIFICATION_AND_PASSWORD SYSRES_CONST_TASK_ENCODE_TYPE_NONE SYSRES_CONST_TASK_ENCODE_TYPE_PASSWORD SYSRES_CONST_TASK_ROUTE_ALL_CONDITION SYSRES_CONST_TASK_ROUTE_AND_CONDITION SYSRES_CONST_TASK_ROUTE_OR_CONDITION SYSRES_CONST_TASK_STATE_ABORTED SYSRES_CONST_TASK_STATE_COMPLETE SYSRES_CONST_TASK_STATE_CONTINUED SYSRES_CONST_TASK_STATE_CONTROL SYSRES_CONST_TASK_STATE_INIT SYSRES_CONST_TASK_STATE_WORKING SYSRES_CONST_TASK_TITLE \ SYSRES_CONST_TASK_TYPES_GROUPS_REFERENCE_CODE SYSRES_CONST_TASK_TYPES_REFERENCE_CODE SYSRES_CONST_TEMPLATES_REFERENCE_CODE SYSRES_CONST_TEST_DATE_REQUISITE_NAME SYSRES_CONST_TEST_DEV_DATABASE_NAME SYSRES_CONST_TEST_DEV_SYSTEM_CODE SYSRES_CONST_TEST_EDMS_DATABASE_NAME SYSRES_CONST_TEST_EDMS_MAIN_CODE SYSRES_CONST_TEST_EDMS_MAIN_DB_NAME SYSRES_CONST_TEST_EDMS_SECOND_CODE SYSRES_CONST_TEST_EDMS_SECOND_DB_NAME SYSRES_CONST_TEST_EDMS_SYSTEM_CODE SYSRES_CONST_TEST_NUMERIC_REQUISITE_NAME SYSRES_CONST_T\ EXT_REQUISITE SYSRES_CONST_TEXT_REQUISITE_CODE SYSRES_CONST_TEXT_REQUISITE_TYPE SYSRES_CONST_TEXT_TYPE_CHAR SYSRES_CONST_TYPE_CODE_REQUISITE_CODE SYSRES_CONST_TYPE_REQUISITE_CODE SYSRES_CONST_UNDEFINED_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_UNITS_SECTION_ID_REQUISITE_CODE SYSRES_CONST_UNITS_SECTION_REQUISITE_CODE SYSRES_CONST_UNOPERATING_RECORD_FLAG_VALUE_CODE SYSRES_CONST_UNSTORED_DATA_REQUISITE_CODE SYSRES_CONST_UNSTORED_DATA_REQUISITE_NAME SYSRES_CONST_USE_ACCESS_TYPE_CODE SYSRES_CONST_USE_\ ACCESS_TYPE_NAME SYSRES_CONST_USER_ACCOUNT_TYPE_VALUE_CODE SYSRES_CONST_USER_ADDITIONAL_INFORMATION_REQUISITE_CODE SYSRES_CONST_USER_AND_GROUP_ID_FROM_PSEUDOREFERENCE_REQUISITE_CODE SYSRES_CONST_USER_CATEGORY_NORMAL SYSRES_CONST_USER_CERTIFICATE_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_STATE_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_SUBJECT_NAME_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_THUMBPRINT_REQUISITE_CODE SYSRES_CONST_USER_COMMON_CATEGORY SYSRES_CONST_USER_COMMON_CATEGORY_CODE S\ YSRES_CONST_USER_FULL_NAME_REQUISITE_CODE SYSRES_CONST_USER_GROUP_TYPE_REQUISITE_CODE SYSRES_CONST_USER_LOGIN_REQUISITE_CODE SYSRES_CONST_USER_REMOTE_CONTROLLER_REQUISITE_CODE SYSRES_CONST_USER_REMOTE_SYSTEM_REQUISITE_CODE SYSRES_CONST_USER_RIGHTS_T_REQUISITE_CODE SYSRES_CONST_USER_SERVER_NAME_REQUISITE_CODE SYSRES_CONST_USER_SERVICE_CATEGORY SYSRES_CONST_USER_SERVICE_CATEGORY_CODE SYSRES_CONST_USER_STATUS_ADMINISTRATOR_CODE SYSRES_CONST_USER_STATUS_ADMINISTRATOR_NAME SYSRES_CONST_USER_STATUS_DE\ VELOPER_CODE SYSRES_CONST_USER_STATUS_DEVELOPER_NAME SYSRES_CONST_USER_STATUS_DISABLED_CODE SYSRES_CONST_USER_STATUS_DISABLED_NAME SYSRES_CONST_USER_STATUS_SYSTEM_DEVELOPER_CODE SYSRES_CONST_USER_STATUS_USER_CODE SYSRES_CONST_USER_STATUS_USER_NAME SYSRES_CONST_USER_STATUS_USER_NAME_DEPRECATED SYSRES_CONST_USER_TYPE_FIELD_VALUE_USER SYSRES_CONST_USER_TYPE_REQUISITE_CODE SYSRES_CONST_USERS_CONTROLLER_REQUISITE_CODE SYSRES_CONST_USERS_IS_MAIN_SERVER_REQUISITE_CODE SYSRES_CONST_USERS_REFERENCE_CODE \ SYSRES_CONST_USERS_REGISTRATION_CERTIFICATES_ACTION_NAME SYSRES_CONST_USERS_REQUISITE_CODE SYSRES_CONST_USERS_SYSTEM_REQUISITE_CODE SYSRES_CONST_USERS_USER_ACCESS_RIGHTS_TYPR_REQUISITE_CODE SYSRES_CONST_USERS_USER_AUTHENTICATION_REQUISITE_CODE SYSRES_CONST_USERS_USER_COMPONENT_REQUISITE_CODE SYSRES_CONST_USERS_USER_GROUP_REQUISITE_CODE SYSRES_CONST_USERS_VIEW_CERTIFICATES_ACTION_NAME SYSRES_CONST_VIEW_DEFAULT_CODE SYSRES_CONST_VIEW_DEFAULT_NAME SYSRES_CONST_VIEWER_REQUISITE_CODE SYSRES_CONST_WAI\ TING_BLOCK_DESCRIPTION SYSRES_CONST_WIZARD_FORM_LABEL_TEST_STRING SYSRES_CONST_WIZARD_QUERY_PARAM_HEIGHT_ETALON_STRING SYSRES_CONST_WIZARD_REFERENCE_COMMENT_REQUISITE_CODE SYSRES_CONST_WORK_RULES_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_WORK_TIME_CALENDAR_REFERENCE_CODE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE_CODE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE_CODE_RUS SYSRES_CONST_WORK_WORKFLOW_SOFT_ROUTE_TYPE_VALUE_CODE_RUS SYSRES_CON\ ST_WORKFLOW_ROUTE_TYPR_HARD SYSRES_CONST_WORKFLOW_ROUTE_TYPR_SOFT SYSRES_CONST_XML_ENCODING SYSRES_CONST_XREC_STAT_REQUISITE_CODE SYSRES_CONST_XRECID_FIELD_NAME SYSRES_CONST_YES SYSRES_CONST_YES_NO_2_REQUISITE_CODE SYSRES_CONST_YES_NO_REQUISITE_CODE SYSRES_CONST_YES_NO_T_REF_TYPE_REQUISITE_CODE SYSRES_CONST_YES_PICK_VALUE SYSRES_CONST_YES_VALUE "+"CR FALSE nil NO_VALUE NULL TAB TRUE YES_VALUE "+"ADMINISTRATORS_GROUP_NAME CUSTOMIZERS_GROUP_NAME DEVELOPERS_GROUP_NAME SERVICE_USERS_GROUP_NAME "+"DE\ CISION_BLOCK_FIRST_OPERAND_PROPERTY DECISION_BLOCK_NAME_PROPERTY DECISION_BLOCK_OPERATION_PROPERTY DECISION_BLOCK_RESULT_TYPE_PROPERTY DECISION_BLOCK_SECOND_OPERAND_PROPERTY "+"ANY_FILE_EXTENTION COMPRESSED_DOCUMENT_EXTENSION EXTENDED_DOCUMENT_EXTENSION SHORT_COMPRESSED_DOCUMENT_EXTENSION SHORT_EXTENDED_DOCUMENT_EXTENSION "+"JOB_BLOCK_ABORT_DEADLINE_PROPERTY JOB_BLOCK_AFTER_FINISH_EVENT JOB_BLOCK_AFTER_QUERY_PARAMETERS_EVENT JOB_BLOCK_ATTACHMENT_PROPERTY JOB_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPER\ TY JOB_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY JOB_BLOCK_BEFORE_QUERY_PARAMETERS_EVENT JOB_BLOCK_BEFORE_START_EVENT JOB_BLOCK_CREATED_JOBS_PROPERTY JOB_BLOCK_DEADLINE_PROPERTY JOB_BLOCK_EXECUTION_RESULTS_PROPERTY JOB_BLOCK_IS_PARALLEL_PROPERTY JOB_BLOCK_IS_RELATIVE_ABORT_DEADLINE_PROPERTY JOB_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY JOB_BLOCK_JOB_TEXT_PROPERTY JOB_BLOCK_NAME_PROPERTY JOB_BLOCK_NEED_SIGN_ON_PERFORM_PROPERTY JOB_BLOCK_PERFORMER_PROPERTY JOB_BLOCK_RELATIVE_ABORT_DEADLINE_TYPE_PROPERTY JO\ B_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY JOB_BLOCK_SUBJECT_PROPERTY "+"ENGLISH_LANGUAGE_CODE RUSSIAN_LANGUAGE_CODE "+"smHidden smMaximized smMinimized smNormal wmNo wmYes "+"COMPONENT_TOKEN_LINK_KIND DOCUMENT_LINK_KIND EDOCUMENT_LINK_KIND FOLDER_LINK_KIND JOB_LINK_KIND REFERENCE_LINK_KIND TASK_LINK_KIND "+"COMPONENT_TOKEN_LOCK_TYPE EDOCUMENT_VERSION_LOCK_TYPE "+"MONITOR_BLOCK_AFTER_FINISH_EVENT MONITOR_BLOCK_BEFORE_START_EVENT MONITOR_BLOCK_DEADLINE_PROPERTY MONITOR_BLOCK_INTERVAL_PROPERTY MONITO\ R_BLOCK_INTERVAL_TYPE_PROPERTY MONITOR_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY MONITOR_BLOCK_NAME_PROPERTY MONITOR_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY MONITOR_BLOCK_SEARCH_SCRIPT_PROPERTY "+"NOTICE_BLOCK_AFTER_FINISH_EVENT NOTICE_BLOCK_ATTACHMENT_PROPERTY NOTICE_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY NOTICE_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY NOTICE_BLOCK_BEFORE_START_EVENT NOTICE_BLOCK_CREATED_NOTICES_PROPERTY NOTICE_BLOCK_DEADLINE_PROPERTY NOTICE_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY NOTICE_BL\ OCK_NAME_PROPERTY NOTICE_BLOCK_NOTICE_TEXT_PROPERTY NOTICE_BLOCK_PERFORMER_PROPERTY NOTICE_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY NOTICE_BLOCK_SUBJECT_PROPERTY "+"dseAfterCancel dseAfterClose dseAfterDelete dseAfterDeleteOutOfTransaction dseAfterInsert dseAfterOpen dseAfterScroll dseAfterUpdate dseAfterUpdateOutOfTransaction dseBeforeCancel dseBeforeClose dseBeforeDelete dseBeforeDetailUpdate dseBeforeInsert dseBeforeOpen dseBeforeUpdate dseOnAnyRequisiteChange dseOnCloseRecord dseOnDeleteError d\ seOnOpenRecord dseOnPrepareUpdate dseOnUpdateError dseOnUpdateRatifiedRecord dseOnValidDelete dseOnValidUpdate reOnChange reOnChangeValues SELECTION_BEGIN_ROUTE_EVENT SELECTION_END_ROUTE_EVENT "+"CURRENT_PERIOD_IS_REQUIRED PREVIOUS_CARD_TYPE_NAME SHOW_RECORD_PROPERTIES_FORM "+"ACCESS_RIGHTS_SETTING_DIALOG_CODE ADMINISTRATOR_USER_CODE ANALYTIC_REPORT_TYPE asrtHideLocal asrtHideRemote CALCULATED_ROLE_TYPE_CODE COMPONENTS_REFERENCE_DEVELOPER_VIEW_CODE DCTS_TEST_PROTOCOLS_FOLDER_PATH E_EDOC_VERSION_\ ALREADY_APPROVINGLY_SIGNED E_EDOC_VERSION_ALREADY_APPROVINGLY_SIGNED_BY_USER E_EDOC_VERSION_ALREDY_SIGNED E_EDOC_VERSION_ALREDY_SIGNED_BY_USER EDOC_TYPES_CODE_REQUISITE_FIELD_NAME EDOCUMENTS_ALIAS_NAME FILES_FOLDER_PATH FILTER_OPERANDS_DELIMITER FILTER_OPERATIONS_DELIMITER FORMCARD_NAME FORMLIST_NAME GET_EXTENDED_DOCUMENT_EXTENSION_CREATION_MODE GET_EXTENDED_DOCUMENT_EXTENSION_IMPORT_MODE INTEGRATED_REPORT_TYPE IS_BUILDER_APPLICATION_ROLE IS_BUILDER_APPLICATION_ROLE2 IS_BUILDER_USERS ISBSYSDEV L\ OG_FOLDER_PATH mbCancel mbNo mbNoToAll mbOK mbYes mbYesToAll MEMORY_DATASET_DESRIPTIONS_FILENAME mrNo mrNoToAll mrYes mrYesToAll MULTIPLE_SELECT_DIALOG_CODE NONOPERATING_RECORD_FLAG_FEMININE NONOPERATING_RECORD_FLAG_MASCULINE OPERATING_RECORD_FLAG_FEMININE OPERATING_RECORD_FLAG_MASCULINE PROFILING_SETTINGS_COMMON_SETTINGS_CODE_VALUE PROGRAM_INITIATED_LOOKUP_ACTION ratDelete ratEdit ratInsert REPORT_TYPE REQUIRED_PICK_VALUES_VARIABLE rmCard rmList SBRTE_PROGID_DEV SBRTE_PROGID_RELEASE STATIC_ROLE\ _TYPE_CODE SUPPRESS_EMPTY_TEMPLATE_CREATION SYSTEM_USER_CODE UPDATE_DIALOG_DATASET USED_IN_OBJECT_HINT_PARAM USER_INITIATED_LOOKUP_ACTION USER_NAME_FORMAT USER_SELECTION_RESTRICTIONS WORKFLOW_TEST_PROTOCOLS_FOLDER_PATH ELS_SUBTYPE_CONTROL_NAME ELS_FOLDER_KIND_CONTROL_NAME REPEAT_PROCESS_CURRENT_OBJECT_EXCEPTION_NAME "+"PRIVILEGE_COMPONENT_FULL_ACCESS PRIVILEGE_DEVELOPMENT_EXPORT PRIVILEGE_DEVELOPMENT_IMPORT PRIVILEGE_DOCUMENT_DELETE PRIVILEGE_ESD PRIVILEGE_FOLDER_DELETE PRIVILEGE_MANAGE_ACCESS_R\ IGHTS PRIVILEGE_MANAGE_REPLICATION PRIVILEGE_MANAGE_SESSION_SERVER PRIVILEGE_OBJECT_FULL_ACCESS PRIVILEGE_OBJECT_VIEW PRIVILEGE_RESERVE_LICENSE PRIVILEGE_SYSTEM_CUSTOMIZE PRIVILEGE_SYSTEM_DEVELOP PRIVILEGE_SYSTEM_INSTALL PRIVILEGE_TASK_DELETE PRIVILEGE_USER_PLUGIN_SETTINGS_CUSTOMIZE PRIVILEGES_PSEUDOREFERENCE_CODE "+"ACCESS_TYPES_PSEUDOREFERENCE_CODE ALL_AVAILABLE_COMPONENTS_PSEUDOREFERENCE_CODE ALL_AVAILABLE_PRIVILEGES_PSEUDOREFERENCE_CODE ALL_REPLICATE_COMPONENTS_PSEUDOREFERENCE_CODE AVAILABLE\ _DEVELOPERS_COMPONENTS_PSEUDOREFERENCE_CODE COMPONENTS_PSEUDOREFERENCE_CODE FILTRATER_SETTINGS_CONFLICTS_PSEUDOREFERENCE_CODE GROUPS_PSEUDOREFERENCE_CODE RECEIVE_PROTOCOL_PSEUDOREFERENCE_CODE REFERENCE_REQUISITE_PSEUDOREFERENCE_CODE REFERENCE_REQUISITES_PSEUDOREFERENCE_CODE REFTYPES_PSEUDOREFERENCE_CODE REPLICATION_SEANCES_DIARY_PSEUDOREFERENCE_CODE SEND_PROTOCOL_PSEUDOREFERENCE_CODE SUBSTITUTES_PSEUDOREFERENCE_CODE SYSTEM_SETTINGS_PSEUDOREFERENCE_CODE UNITS_PSEUDOREFERENCE_CODE USERS_PSEUDOREFE\ RENCE_CODE VIEWERS_PSEUDOREFERENCE_CODE "+"CERTIFICATE_TYPE_ENCRYPT CERTIFICATE_TYPE_SIGN CERTIFICATE_TYPE_SIGN_AND_ENCRYPT "+"STORAGE_TYPE_FILE STORAGE_TYPE_NAS_CIFS STORAGE_TYPE_SAPERION STORAGE_TYPE_SQL_SERVER "+"COMPTYPE2_REQUISITE_DOCUMENTS_VALUE COMPTYPE2_REQUISITE_TASKS_VALUE COMPTYPE2_REQUISITE_FOLDERS_VALUE COMPTYPE2_REQUISITE_REFERENCES_VALUE "+"SYSREQ_CODE SYSREQ_COMPTYPE2 SYSREQ_CONST_AVAILABLE_FOR_WEB SYSREQ_CONST_COMMON_CODE SYSREQ_CONST_COMMON_VALUE SYSREQ_CONST_FIRM_CODE SYSREQ_C\ ONST_FIRM_STATUS SYSREQ_CONST_FIRM_VALUE SYSREQ_CONST_SERVER_STATUS SYSREQ_CONTENTS SYSREQ_DATE_OPEN SYSREQ_DATE_CLOSE SYSREQ_DESCRIPTION SYSREQ_DESCRIPTION_LOCALIZE_ID SYSREQ_DOUBLE SYSREQ_EDOC_ACCESS_TYPE SYSREQ_EDOC_AUTHOR SYSREQ_EDOC_CREATED SYSREQ_EDOC_DELEGATE_RIGHTS_REQUISITE_CODE SYSREQ_EDOC_EDITOR SYSREQ_EDOC_ENCODE_TYPE SYSREQ_EDOC_ENCRYPTION_PLUGIN_NAME SYSREQ_EDOC_ENCRYPTION_PLUGIN_VERSION SYSREQ_EDOC_EXPORT_DATE SYSREQ_EDOC_EXPORTER SYSREQ_EDOC_KIND SYSREQ_EDOC_LIFE_STAGE_NAME SYSRE\ Q_EDOC_LOCKED_FOR_SERVER_CODE SYSREQ_EDOC_MODIFIED SYSREQ_EDOC_NAME SYSREQ_EDOC_NOTE SYSREQ_EDOC_QUALIFIED_ID SYSREQ_EDOC_SESSION_KEY SYSREQ_EDOC_SESSION_KEY_ENCRYPTION_PLUGIN_NAME SYSREQ_EDOC_SESSION_KEY_ENCRYPTION_PLUGIN_VERSION SYSREQ_EDOC_SIGNATURE_TYPE SYSREQ_EDOC_SIGNED SYSREQ_EDOC_STORAGE SYSREQ_EDOC_STORAGES_ARCHIVE_STORAGE SYSREQ_EDOC_STORAGES_CHECK_RIGHTS SYSREQ_EDOC_STORAGES_COMPUTER_NAME SYSREQ_EDOC_STORAGES_EDIT_IN_STORAGE SYSREQ_EDOC_STORAGES_EXECUTIVE_STORAGE SYSREQ_EDOC_STORAGES_\ FUNCTION SYSREQ_EDOC_STORAGES_INITIALIZED SYSREQ_EDOC_STORAGES_LOCAL_PATH SYSREQ_EDOC_STORAGES_SAPERION_DATABASE_NAME SYSREQ_EDOC_STORAGES_SEARCH_BY_TEXT SYSREQ_EDOC_STORAGES_SERVER_NAME SYSREQ_EDOC_STORAGES_SHARED_SOURCE_NAME SYSREQ_EDOC_STORAGES_TYPE SYSREQ_EDOC_TEXT_MODIFIED SYSREQ_EDOC_TYPE_ACT_CODE SYSREQ_EDOC_TYPE_ACT_DESCRIPTION SYSREQ_EDOC_TYPE_ACT_DESCRIPTION_LOCALIZE_ID SYSREQ_EDOC_TYPE_ACT_ON_EXECUTE SYSREQ_EDOC_TYPE_ACT_ON_EXECUTE_EXISTS SYSREQ_EDOC_TYPE_ACT_SECTION SYSREQ_EDOC_TYPE_\ ADD_PARAMS SYSREQ_EDOC_TYPE_COMMENT SYSREQ_EDOC_TYPE_EVENT_TEXT SYSREQ_EDOC_TYPE_NAME_IN_SINGULAR SYSREQ_EDOC_TYPE_NAME_IN_SINGULAR_LOCALIZE_ID SYSREQ_EDOC_TYPE_NAME_LOCALIZE_ID SYSREQ_EDOC_TYPE_NUMERATION_METHOD SYSREQ_EDOC_TYPE_PSEUDO_REQUISITE_CODE SYSREQ_EDOC_TYPE_REQ_CODE SYSREQ_EDOC_TYPE_REQ_DESCRIPTION SYSREQ_EDOC_TYPE_REQ_DESCRIPTION_LOCALIZE_ID SYSREQ_EDOC_TYPE_REQ_IS_LEADING SYSREQ_EDOC_TYPE_REQ_IS_REQUIRED SYSREQ_EDOC_TYPE_REQ_NUMBER SYSREQ_EDOC_TYPE_REQ_ON_CHANGE SYSREQ_EDOC_TYPE_REQ\ _ON_CHANGE_EXISTS SYSREQ_EDOC_TYPE_REQ_ON_SELECT SYSREQ_EDOC_TYPE_REQ_ON_SELECT_KIND SYSREQ_EDOC_TYPE_REQ_SECTION SYSREQ_EDOC_TYPE_VIEW_CARD SYSREQ_EDOC_TYPE_VIEW_CODE SYSREQ_EDOC_TYPE_VIEW_COMMENT SYSREQ_EDOC_TYPE_VIEW_IS_MAIN SYSREQ_EDOC_TYPE_VIEW_NAME SYSREQ_EDOC_TYPE_VIEW_NAME_LOCALIZE_ID SYSREQ_EDOC_VERSION_AUTHOR SYSREQ_EDOC_VERSION_CRC SYSREQ_EDOC_VERSION_DATA SYSREQ_EDOC_VERSION_EDITOR SYSREQ_EDOC_VERSION_EXPORT_DATE SYSREQ_EDOC_VERSION_EXPORTER SYSREQ_EDOC_VERSION_HIDDEN SYSREQ_EDOC_VER\ SION_LIFE_STAGE SYSREQ_EDOC_VERSION_MODIFIED SYSREQ_EDOC_VERSION_NOTE SYSREQ_EDOC_VERSION_SIGNATURE_TYPE SYSREQ_EDOC_VERSION_SIGNED SYSREQ_EDOC_VERSION_SIZE SYSREQ_EDOC_VERSION_SOURCE SYSREQ_EDOC_VERSION_TEXT_MODIFIED SYSREQ_EDOCKIND_DEFAULT_VERSION_STATE_CODE SYSREQ_FOLDER_KIND SYSREQ_FUNC_CATEGORY SYSREQ_FUNC_COMMENT SYSREQ_FUNC_GROUP SYSREQ_FUNC_GROUP_COMMENT SYSREQ_FUNC_GROUP_NUMBER SYSREQ_FUNC_HELP SYSREQ_FUNC_PARAM_DEF_VALUE SYSREQ_FUNC_PARAM_IDENT SYSREQ_FUNC_PARAM_NUMBER SYSREQ_FUNC_PARA\ M_TYPE SYSREQ_FUNC_TEXT SYSREQ_GROUP_CATEGORY SYSREQ_ID SYSREQ_LAST_UPDATE SYSREQ_LEADER_REFERENCE SYSREQ_LINE_NUMBER SYSREQ_MAIN_RECORD_ID SYSREQ_NAME SYSREQ_NAME_LOCALIZE_ID SYSREQ_NOTE SYSREQ_ORIGINAL_RECORD SYSREQ_OUR_FIRM SYSREQ_PROFILING_SETTINGS_BATCH_LOGING SYSREQ_PROFILING_SETTINGS_BATCH_SIZE SYSREQ_PROFILING_SETTINGS_PROFILING_ENABLED SYSREQ_PROFILING_SETTINGS_SQL_PROFILING_ENABLED SYSREQ_PROFILING_SETTINGS_START_LOGGED SYSREQ_RECORD_STATUS SYSREQ_REF_REQ_FIELD_NAME SYSREQ_REF_REQ_FORM\ AT SYSREQ_REF_REQ_GENERATED SYSREQ_REF_REQ_LENGTH SYSREQ_REF_REQ_PRECISION SYSREQ_REF_REQ_REFERENCE SYSREQ_REF_REQ_SECTION SYSREQ_REF_REQ_STORED SYSREQ_REF_REQ_TOKENS SYSREQ_REF_REQ_TYPE SYSREQ_REF_REQ_VIEW SYSREQ_REF_TYPE_ACT_CODE SYSREQ_REF_TYPE_ACT_DESCRIPTION SYSREQ_REF_TYPE_ACT_DESCRIPTION_LOCALIZE_ID SYSREQ_REF_TYPE_ACT_ON_EXECUTE SYSREQ_REF_TYPE_ACT_ON_EXECUTE_EXISTS SYSREQ_REF_TYPE_ACT_SECTION SYSREQ_REF_TYPE_ADD_PARAMS SYSREQ_REF_TYPE_COMMENT SYSREQ_REF_TYPE_COMMON_SETTINGS SYSREQ_REF_T\ YPE_DISPLAY_REQUISITE_NAME SYSREQ_REF_TYPE_EVENT_TEXT SYSREQ_REF_TYPE_MAIN_LEADING_REF SYSREQ_REF_TYPE_NAME_IN_SINGULAR SYSREQ_REF_TYPE_NAME_IN_SINGULAR_LOCALIZE_ID SYSREQ_REF_TYPE_NAME_LOCALIZE_ID SYSREQ_REF_TYPE_NUMERATION_METHOD SYSREQ_REF_TYPE_REQ_CODE SYSREQ_REF_TYPE_REQ_DESCRIPTION SYSREQ_REF_TYPE_REQ_DESCRIPTION_LOCALIZE_ID SYSREQ_REF_TYPE_REQ_IS_CONTROL SYSREQ_REF_TYPE_REQ_IS_FILTER SYSREQ_REF_TYPE_REQ_IS_LEADING SYSREQ_REF_TYPE_REQ_IS_REQUIRED SYSREQ_REF_TYPE_REQ_NUMBER SYSREQ_REF_TYPE_\ REQ_ON_CHANGE SYSREQ_REF_TYPE_REQ_ON_CHANGE_EXISTS SYSREQ_REF_TYPE_REQ_ON_SELECT SYSREQ_REF_TYPE_REQ_ON_SELECT_KIND SYSREQ_REF_TYPE_REQ_SECTION SYSREQ_REF_TYPE_VIEW_CARD SYSREQ_REF_TYPE_VIEW_CODE SYSREQ_REF_TYPE_VIEW_COMMENT SYSREQ_REF_TYPE_VIEW_IS_MAIN SYSREQ_REF_TYPE_VIEW_NAME SYSREQ_REF_TYPE_VIEW_NAME_LOCALIZE_ID SYSREQ_REFERENCE_TYPE_ID SYSREQ_STATE SYSREQ_STATЕ SYSREQ_SYSTEM_SETTINGS_VALUE SYSREQ_TYPE SYSREQ_UNIT SYSREQ_UNIT_ID SYSREQ_USER_GROUPS_GROUP_FULL_NAME SYSREQ_USER_GROUPS_GROUP_NAM\ E SYSREQ_USER_GROUPS_GROUP_SERVER_NAME SYSREQ_USERS_ACCESS_RIGHTS SYSREQ_USERS_AUTHENTICATION SYSREQ_USERS_CATEGORY SYSREQ_USERS_COMPONENT SYSREQ_USERS_COMPONENT_USER_IS_PUBLIC SYSREQ_USERS_DOMAIN SYSREQ_USERS_FULL_USER_NAME SYSREQ_USERS_GROUP SYSREQ_USERS_IS_MAIN_SERVER SYSREQ_USERS_LOGIN SYSREQ_USERS_REFERENCE_USER_IS_PUBLIC SYSREQ_USERS_STATUS SYSREQ_USERS_USER_CERTIFICATE SYSREQ_USERS_USER_CERTIFICATE_INFO SYSREQ_USERS_USER_CERTIFICATE_PLUGIN_NAME SYSREQ_USERS_USER_CERTIFICATE_PLUGIN_VERSION\ SYSREQ_USERS_USER_CERTIFICATE_STATE SYSREQ_USERS_USER_CERTIFICATE_SUBJECT_NAME SYSREQ_USERS_USER_CERTIFICATE_THUMBPRINT SYSREQ_USERS_USER_DEFAULT_CERTIFICATE SYSREQ_USERS_USER_DESCRIPTION SYSREQ_USERS_USER_GLOBAL_NAME SYSREQ_USERS_USER_LOGIN SYSREQ_USERS_USER_MAIN_SERVER SYSREQ_USERS_USER_TYPE SYSREQ_WORK_RULES_FOLDER_ID "+"RESULT_VAR_NAME RESULT_VAR_NAME_ENG "+"AUTO_NUMERATION_RULE_ID CANT_CHANGE_ID_REQUISITE_RULE_ID CANT_CHANGE_OURFIRM_REQUISITE_RULE_ID CHECK_CHANGING_REFERENCE_RECORD_USE_RUL\ E_ID CHECK_CODE_REQUISITE_RULE_ID CHECK_DELETING_REFERENCE_RECORD_USE_RULE_ID CHECK_FILTRATER_CHANGES_RULE_ID CHECK_RECORD_INTERVAL_RULE_ID CHECK_REFERENCE_INTERVAL_RULE_ID CHECK_REQUIRED_DATA_FULLNESS_RULE_ID CHECK_REQUIRED_REQUISITES_FULLNESS_RULE_ID MAKE_RECORD_UNRATIFIED_RULE_ID RESTORE_AUTO_NUMERATION_RULE_ID SET_FIRM_CONTEXT_FROM_RECORD_RULE_ID SET_FIRST_RECORD_IN_LIST_FORM_RULE_ID SET_IDSPS_VALUE_RULE_ID SET_NEXT_CODE_VALUE_RULE_ID SET_OURFIRM_BOUNDS_RULE_ID SET_OURFIRM_REQUISITE_RULE_ID "+ "SCRIPT_BLOCK_AFTER_FINISH_EVENT SCRIPT_BLOCK_BEFORE_START_EVENT SCRIPT_BLOCK_EXECUTION_RESULTS_PROPERTY SCRIPT_BLOCK_NAME_PROPERTY SCRIPT_BLOCK_SCRIPT_PROPERTY "+"SUBTASK_BLOCK_ABORT_DEADLINE_PROPERTY SUBTASK_BLOCK_AFTER_FINISH_EVENT SUBTASK_BLOCK_ASSIGN_PARAMS_EVENT SUBTASK_BLOCK_ATTACHMENTS_PROPERTY SUBTASK_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY SUBTASK_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY SUBTASK_BLOCK_BEFORE_START_EVENT SUBTASK_BLOCK_CREATED_TASK_PROPERTY SUBTASK_BLOCK_CREATION_EVENT SUB\ TASK_BLOCK_DEADLINE_PROPERTY SUBTASK_BLOCK_IMPORTANCE_PROPERTY SUBTASK_BLOCK_INITIATOR_PROPERTY SUBTASK_BLOCK_IS_RELATIVE_ABORT_DEADLINE_PROPERTY SUBTASK_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY SUBTASK_BLOCK_JOBS_TYPE_PROPERTY SUBTASK_BLOCK_NAME_PROPERTY SUBTASK_BLOCK_PARALLEL_ROUTE_PROPERTY SUBTASK_BLOCK_PERFORMERS_PROPERTY SUBTASK_BLOCK_RELATIVE_ABORT_DEADLINE_TYPE_PROPERTY SUBTASK_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY SUBTASK_BLOCK_REQUIRE_SIGN_PROPERTY SUBTASK_BLOCK_STANDARD_ROUTE_PROPERTY SUBTA\ SK_BLOCK_START_EVENT SUBTASK_BLOCK_STEP_CONTROL_PROPERTY SUBTASK_BLOCK_SUBJECT_PROPERTY SUBTASK_BLOCK_TASK_CONTROL_PROPERTY SUBTASK_BLOCK_TEXT_PROPERTY SUBTASK_BLOCK_UNLOCK_ATTACHMENTS_ON_STOP_PROPERTY SUBTASK_BLOCK_USE_STANDARD_ROUTE_PROPERTY SUBTASK_BLOCK_WAIT_FOR_TASK_COMPLETE_PROPERTY "+"SYSCOMP_CONTROL_JOBS SYSCOMP_FOLDERS SYSCOMP_JOBS SYSCOMP_NOTICES SYSCOMP_TASKS "+"SYSDLG_CREATE_EDOCUMENT SYSDLG_CREATE_EDOCUMENT_VERSION SYSDLG_CURRENT_PERIOD SYSDLG_EDIT_FUNCTION_HELP SYSDLG_EDOCUMENT_KIN\ DS_FOR_TEMPLATE SYSDLG_EXPORT_MULTIPLE_EDOCUMENTS SYSDLG_EXPORT_SINGLE_EDOCUMENT SYSDLG_IMPORT_EDOCUMENT SYSDLG_MULTIPLE_SELECT SYSDLG_SETUP_ACCESS_RIGHTS SYSDLG_SETUP_DEFAULT_RIGHTS SYSDLG_SETUP_FILTER_CONDITION SYSDLG_SETUP_SIGN_RIGHTS SYSDLG_SETUP_TASK_OBSERVERS SYSDLG_SETUP_TASK_ROUTE SYSDLG_SETUP_USERS_LIST SYSDLG_SIGN_EDOCUMENT SYSDLG_SIGN_MULTIPLE_EDOCUMENTS "+"SYSREF_ACCESS_RIGHTS_TYPES SYSREF_ADMINISTRATION_HISTORY SYSREF_ALL_AVAILABLE_COMPONENTS SYSREF_ALL_AVAILABLE_PRIVILEGES SYSREF_A\ LL_REPLICATING_COMPONENTS SYSREF_AVAILABLE_DEVELOPERS_COMPONENTS SYSREF_CALENDAR_EVENTS SYSREF_COMPONENT_TOKEN_HISTORY SYSREF_COMPONENT_TOKENS SYSREF_COMPONENTS SYSREF_CONSTANTS SYSREF_DATA_RECEIVE_PROTOCOL SYSREF_DATA_SEND_PROTOCOL SYSREF_DIALOGS SYSREF_DIALOGS_REQUISITES SYSREF_EDITORS SYSREF_EDOC_CARDS SYSREF_EDOC_TYPES SYSREF_EDOCUMENT_CARD_REQUISITES SYSREF_EDOCUMENT_CARD_TYPES SYSREF_EDOCUMENT_CARD_TYPES_REFERENCE SYSREF_EDOCUMENT_CARDS SYSREF_EDOCUMENT_HISTORY SYSREF_EDOCUMENT_KINDS SYSRE\ F_EDOCUMENT_REQUISITES SYSREF_EDOCUMENT_SIGNATURES SYSREF_EDOCUMENT_TEMPLATES SYSREF_EDOCUMENT_TEXT_STORAGES SYSREF_EDOCUMENT_VIEWS SYSREF_FILTERER_SETUP_CONFLICTS SYSREF_FILTRATER_SETTING_CONFLICTS SYSREF_FOLDER_HISTORY SYSREF_FOLDERS SYSREF_FUNCTION_GROUPS SYSREF_FUNCTION_PARAMS SYSREF_FUNCTIONS SYSREF_JOB_HISTORY SYSREF_LINKS SYSREF_LOCALIZATION_DICTIONARY SYSREF_LOCALIZATION_LANGUAGES SYSREF_MODULES SYSREF_PRIVILEGES SYSREF_RECORD_HISTORY SYSREF_REFERENCE_REQUISITES SYSREF_REFERENCE_TYPE_VIE\ WS SYSREF_REFERENCE_TYPES SYSREF_REFERENCES SYSREF_REFERENCES_REQUISITES SYSREF_REMOTE_SERVERS SYSREF_REPLICATION_SESSIONS_LOG SYSREF_REPLICATION_SESSIONS_PROTOCOL SYSREF_REPORTS SYSREF_ROLES SYSREF_ROUTE_BLOCK_GROUPS SYSREF_ROUTE_BLOCKS SYSREF_SCRIPTS SYSREF_SEARCHES SYSREF_SERVER_EVENTS SYSREF_SERVER_EVENTS_HISTORY SYSREF_STANDARD_ROUTE_GROUPS SYSREF_STANDARD_ROUTES SYSREF_STATUSES SYSREF_SYSTEM_SETTINGS SYSREF_TASK_HISTORY SYSREF_TASK_KIND_GROUPS SYSREF_TASK_KINDS SYSREF_TASK_RIGHTS SYSREF_TA\ SK_SIGNATURES SYSREF_TASKS SYSREF_UNITS SYSREF_USER_GROUPS SYSREF_USER_GROUPS_REFERENCE SYSREF_USER_SUBSTITUTION SYSREF_USERS SYSREF_USERS_REFERENCE SYSREF_VIEWERS SYSREF_WORKING_TIME_CALENDARS "+"ACCESS_RIGHTS_TABLE_NAME EDMS_ACCESS_TABLE_NAME EDOC_TYPES_TABLE_NAME "+"TEST_DEV_DB_NAME TEST_DEV_SYSTEM_CODE TEST_EDMS_DB_NAME TEST_EDMS_MAIN_CODE TEST_EDMS_MAIN_DB_NAME TEST_EDMS_SECOND_CODE TEST_EDMS_SECOND_DB_NAME TEST_EDMS_SYSTEM_CODE TEST_ISB5_MAIN_CODE TEST_ISB5_SECOND_CODE TEST_SQL_SERVER_2005\ _NAME TEST_SQL_SERVER_NAME "+"ATTENTION_CAPTION cbsCommandLinks cbsDefault CONFIRMATION_CAPTION ERROR_CAPTION INFORMATION_CAPTION mrCancel mrOk "+"EDOC_VERSION_ACTIVE_STAGE_CODE EDOC_VERSION_DESIGN_STAGE_CODE EDOC_VERSION_OBSOLETE_STAGE_CODE "+"cpDataEnciphermentEnabled cpDigitalSignatureEnabled cpID cpIssuer cpPluginVersion cpSerial cpSubjectName cpSubjSimpleName cpValidFromDate cpValidToDate "+"ISBL_SYNTAX NO_SYNTAX XML_SYNTAX "+"WAIT_BLOCK_AFTER_FINISH_EVENT WAIT_BLOCK_BEFORE_START_EVENT WAIT\ _BLOCK_DEADLINE_PROPERTY WAIT_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY WAIT_BLOCK_NAME_PROPERTY WAIT_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY "+"SYSRES_COMMON SYSRES_CONST SYSRES_MBFUNC SYSRES_SBDATA SYSRES_SBGUI SYSRES_SBINTF SYSRES_SBREFDSC SYSRES_SQLERRORS SYSRES_SYSCOMP ",ENUMS="atUser atGroup atRole "+"aemEnabledAlways aemDisabledAlways aemEnabledOnBrowse aemEnabledOnEdit aemDisabledOnBrowseEmpty "+"apBegin apEnd "+"alLeft alRight "+"asmNever asmNoButCustomize asmAsLastTime asmYesButCustomize asmAl\ ways "+"cirCommon cirRevoked "+"ctSignature ctEncode ctSignatureEncode "+"clbUnchecked clbChecked clbGrayed "+"ceISB ceAlways ceNever "+"ctDocument ctReference ctScript ctUnknown ctReport ctDialog ctFunction ctFolder ctEDocument ctTask ctJob ctNotice ctControlJob "+"cfInternal cfDisplay "+"ciUnspecified ciWrite ciRead "+"ckFolder ckEDocument ckTask ckJob ckComponentToken ckAny ckReference ckScript ckReport ckDialog "+"ctISBLEditor ctBevel ctButton ctCheckListBox ctComboBox ctComboEdit ctGrid ctD\ BCheckBox ctDBComboBox ctDBEdit ctDBEllipsis ctDBMemo ctDBNavigator ctDBRadioGroup ctDBStatusLabel ctEdit ctGroupBox ctInplaceHint ctMemo ctPanel ctListBox ctRadioButton ctRichEdit ctTabSheet ctWebBrowser ctImage ctHyperLink ctLabel ctDBMultiEllipsis ctRibbon ctRichView ctInnerPanel ctPanelGroup ctBitButton "+"cctDate cctInteger cctNumeric cctPick cctReference cctString cctText "+"cltInternal cltPrimary cltGUI "+"dseBeforeOpen dseAfterOpen dseBeforeClose dseAfterClose dseOnValidDelete dseBeforeD\ elete dseAfterDelete dseAfterDeleteOutOfTransaction dseOnDeleteError dseBeforeInsert dseAfterInsert dseOnValidUpdate dseBeforeUpdate dseOnUpdateRatifiedRecord dseAfterUpdate dseAfterUpdateOutOfTransaction dseOnUpdateError dseAfterScroll dseOnOpenRecord dseOnCloseRecord dseBeforeCancel dseAfterCancel dseOnUpdateDeadlockError dseBeforeDetailUpdate dseOnPrepareUpdate dseOnAnyRequisiteChange "+"dssEdit dssInsert dssBrowse dssInActive "+"dftDate dftShortDate dftDateTime dftTimeStamp "+"dotDays dotHou\ rs dotMinutes dotSeconds "+"dtkndLocal dtkndUTC "+"arNone arView arEdit arFull "+"ddaView ddaEdit "+"emLock emEdit emSign emExportWithLock emImportWithUnlock emChangeVersionNote emOpenForModify emChangeLifeStage emDelete emCreateVersion emImport emUnlockExportedWithLock emStart emAbort emReInit emMarkAsReaded emMarkAsUnreaded emPerform emAccept emResume emChangeRights emEditRoute emEditObserver emRecoveryFromLocalCopy emChangeWorkAccessType emChangeEncodeTypeToCertificate emChangeEncodeTypeToPas\ sword emChangeEncodeTypeToNone emChangeEncodeTypeToCertificatePassword emChangeStandardRoute emGetText emOpenForView emMoveToStorage emCreateObject emChangeVersionHidden emDeleteVersion emChangeLifeCycleStage emApprovingSign emExport emContinue emLockFromEdit emUnLockForEdit emLockForServer emUnlockFromServer emDelegateAccessRights emReEncode "+"ecotFile ecotProcess "+"eaGet eaCopy eaCreate eaCreateStandardRoute "+"edltAll edltNothing edltQuery "+"essmText essmCard "+"esvtLast esvtLastActive esv\ tSpecified "+"edsfExecutive edsfArchive "+"edstSQLServer edstFile "+"edvstNone edvstEDocumentVersionCopy edvstFile edvstTemplate edvstScannedFile "+"vsDefault vsDesign vsActive vsObsolete "+"etNone etCertificate etPassword etCertificatePassword "+"ecException ecWarning ecInformation "+"estAll estApprovingOnly "+"evtLast evtLastActive evtQuery "+"fdtString fdtNumeric fdtInteger fdtDate fdtText fdtUnknown fdtWideString fdtLargeInteger "+"ftInbox ftOutbox ftFavorites ftCommonFolder ftUserFolder ftC\ omponents ftQuickLaunch ftShortcuts ftSearch "+"grhAuto grhX1 grhX2 grhX3 "+"hltText hltRTF hltHTML "+"iffBMP iffJPEG iffMultiPageTIFF iffSinglePageTIFF iffTIFF iffPNG "+"im8bGrayscale im24bRGB im1bMonochrome "+"itBMP itJPEG itWMF itPNG "+"ikhInformation ikhWarning ikhError ikhNoIcon "+"icUnknown icScript icFunction icIntegratedReport icAnalyticReport icDataSetEventHandler icActionHandler icFormEventHandler icLookUpEventHandler icRequisiteChangeEventHandler icBeforeSearchEventHandler icRoleCalcu\ lation icSelectRouteEventHandler icBlockPropertyCalculation icBlockQueryParamsEventHandler icChangeSearchResultEventHandler icBlockEventHandler icSubTaskInitEventHandler icEDocDataSetEventHandler icEDocLookUpEventHandler icEDocActionHandler icEDocFormEventHandler icEDocRequisiteChangeEventHandler icStructuredConversionRule icStructuredConversionEventBefore icStructuredConversionEventAfter icWizardEventHandler icWizardFinishEventHandler icWizardStepEventHandler icWizardStepFinishEventHandler icWi\ zardActionEnableEventHandler icWizardActionExecuteEventHandler icCreateJobsHandler icCreateNoticesHandler icBeforeLookUpEventHandler icAfterLookUpEventHandler icTaskAbortEventHandler icWorkflowBlockActionHandler icDialogDataSetEventHandler icDialogActionHandler icDialogLookUpEventHandler icDialogRequisiteChangeEventHandler icDialogFormEventHandler icDialogValidCloseEventHandler icBlockFormEventHandler icTaskFormEventHandler icReferenceMethod icEDocMethod icDialogMethod icProcessMessageHandler "+ "isShow isHide isByUserSettings "+"jkJob jkNotice jkControlJob "+"jtInner jtLeft jtRight jtFull jtCross "+"lbpAbove lbpBelow lbpLeft lbpRight "+"eltPerConnection eltPerUser "+"sfcUndefined sfcBlack sfcGreen sfcRed sfcBlue sfcOrange sfcLilac "+"sfsItalic sfsStrikeout sfsNormal "+"ldctStandardRoute ldctWizard ldctScript ldctFunction ldctRouteBlock ldctIntegratedReport ldctAnalyticReport ldctReferenceType ldctEDocumentType ldctDialog ldctServerEvents "+"mrcrtNone mrcrtUser mrcrtMaximal mrcrtCustom "+ "vtEqual vtGreaterOrEqual vtLessOrEqual vtRange "+"rdYesterday rdToday rdTomorrow rdThisWeek rdThisMonth rdThisYear rdNextMonth rdNextWeek rdLastWeek rdLastMonth "+"rdWindow rdFile rdPrinter "+"rdtString rdtNumeric rdtInteger rdtDate rdtReference rdtAccount rdtText rdtPick rdtUnknown rdtLargeInteger rdtDocument "+"reOnChange reOnChangeValues "+"ttGlobal ttLocal ttUser ttSystem "+"ssmBrowse ssmSelect ssmMultiSelect ssmBrowseModal "+"smSelect smLike smCard "+"stNone stAuthenticating stApproving "+ "sctString sctStream "+"sstAnsiSort sstNaturalSort "+"svtEqual svtContain "+"soatString soatNumeric soatInteger soatDatetime soatReferenceRecord soatText soatPick soatBoolean soatEDocument soatAccount soatIntegerCollection soatNumericCollection soatStringCollection soatPickCollection soatDatetimeCollection soatBooleanCollection soatReferenceRecordCollection soatEDocumentCollection soatAccountCollection soatContents soatUnknown "+"tarAbortByUser tarAbortByWorkflowException "+"tvtAllWords tvtExact\ Phrase tvtAnyWord "+"usNone usCompleted usRedSquare usBlueSquare usYellowSquare usGreenSquare usOrangeSquare usPurpleSquare usFollowUp "+"utUnknown utUser utDeveloper utAdministrator utSystemDeveloper utDisconnected "+"btAnd btDetailAnd btOr btNotOr btOnly "+"vmView vmSelect vmNavigation "+"vsmSingle vsmMultiple vsmMultipleCheck vsmNoSelection "+"wfatPrevious wfatNext wfatCancel wfatFinish "+"wfepUndefined wfepText3 wfepText6 wfepText9 wfepSpinEdit wfepDropDown wfepRadioGroup wfepFlag wfepText12\ wfepText15 wfepText18 wfepText21 wfepText24 wfepText27 wfepText30 wfepRadioGroupColumn1 wfepRadioGroupColumn2 wfepRadioGroupColumn3 "+"wfetQueryParameter wfetText wfetDelimiter wfetLabel "+"wptString wptInteger wptNumeric wptBoolean wptDateTime wptPick wptText wptUser wptUserList wptEDocumentInfo wptEDocumentInfoList wptReferenceRecordInfo wptReferenceRecordInfoList wptFolderInfo wptTaskInfo wptContents wptFileName wptDate "+"wsrComplete wsrGoNext wsrGoPrevious wsrCustom wsrCancel wsrGoFinal "+ "wstForm wstEDocument wstTaskCard wstReferenceRecordCard wstFinal "+"waAll waPerformers waManual "+"wsbStart wsbFinish wsbNotice wsbStep wsbDecision wsbWait wsbMonitor wsbScript wsbConnector wsbSubTask wsbLifeCycleStage wsbPause "+"wdtInteger wdtFloat wdtString wdtPick wdtDateTime wdtBoolean wdtTask wdtJob wdtFolder wdtEDocument wdtReferenceRecord wdtUser wdtGroup wdtRole wdtIntegerCollection wdtFloatCollection wdtStringCollection wdtPickCollection wdtDateTimeCollection wdtBooleanCollection wdtT\ askCollection wdtJobCollection wdtFolderCollection wdtEDocumentCollection wdtReferenceRecordCollection wdtUserCollection wdtGroupCollection wdtRoleCollection wdtContents wdtUserList wdtSearchDescription wdtDeadLine wdtPickSet wdtAccountCollection "+"wiLow wiNormal wiHigh "+"wrtSoft wrtHard "+"wsInit wsRunning wsDone wsControlled wsAborted wsContinued "+"wtmFull wtmFromCurrent wtmOnlyCurrent ",system_functions="AddSubString AdjustLineBreaks AmountInWords Analysis ArrayDimCount ArrayHighBound Arra\ yLowBound ArrayOf ArrayReDim Assert Assigned BeginOfMonth BeginOfPeriod BuildProfilingOperationAnalysis CallProcedure CanReadFile CArrayElement CDataSetRequisite ChangeDate ChangeReferenceDataset Char CharPos CheckParam CheckParamValue CompareStrings ConstantExists ControlState ConvertDateStr Copy CopyFile CreateArray CreateCachedReference CreateConnection CreateDialog CreateDualListDialog CreateEditor CreateException CreateFile CreateFolderDialog CreateInputDialog CreateLinkFile CreateList Crea\ teLock CreateMemoryDataSet CreateObject CreateOpenDialog CreateProgress CreateQuery CreateReference CreateReport CreateSaveDialog CreateScript CreateSQLPivotFunction CreateStringList CreateTreeListSelectDialog CSelectSQL CSQL CSubString CurrentUserID CurrentUserName CurrentVersion DataSetLocateEx DateDiff DateTimeDiff DateToStr DayOfWeek DeleteFile DirectoryExists DisableCheckAccessRights DisableCheckFullShowingRestriction DisableMassTaskSendingRestrictions DropTable DupeString EditText EnableCh\ eckAccessRights EnableCheckFullShowingRestriction EnableMassTaskSendingRestrictions EndOfMonth EndOfPeriod ExceptionExists ExceptionsOff ExceptionsOn Execute ExecuteProcess Exit ExpandEnvironmentVariables ExtractFileDrive ExtractFileExt ExtractFileName ExtractFilePath ExtractParams FileExists FileSize FindFile FindSubString FirmContext ForceDirectories Format FormatDate FormatNumeric FormatSQLDate FormatString FreeException GetComponent GetComponentLaunchParam GetConstant GetLastException GetRef\ erenceRecord GetRefTypeByRefID GetTableID GetTempFolder IfThen In IndexOf InputDialog InputDialogEx InteractiveMode IsFileLocked IsGraphicFile IsNumeric Length LoadString LoadStringFmt LocalTimeToUTC LowerCase Max MessageBox MessageBoxEx MimeDecodeBinary MimeDecodeString MimeEncodeBinary MimeEncodeString Min MoneyInWords MoveFile NewID Now OpenFile Ord Precision Raise ReadCertificateFromFile ReadFile ReferenceCodeByID ReferenceNumber ReferenceRequisiteMode ReferenceRequisiteValue RegionDateSetti\ ngs RegionNumberSettings RegionTimeSettings RegRead RegWrite RenameFile Replace Round SelectServerCode SelectSQL ServerDateTime SetConstant SetManagedFolderFieldsState ShowConstantsInputDialog ShowMessage Sleep Split SQL SQL2XLSTAB SQLProfilingSendReport StrToDate SubString SubStringCount SystemSetting Time TimeDiff Today Transliterate Trim UpperCase UserStatus UTCToLocalTime ValidateXML VarIsClear VarIsEmpty VarIsNull WorkTimeDiff WriteFile WriteFileEx WriteObjectHistory Анализ БазаДанных БлокЕ\ сть БлокЕстьРасш БлокИнфо БлокСнять БлокСнятьРасш БлокУстановить Ввод ВводМеню ВедС ВедСпр ВерхняяГраницаМассива ВнешПрогр Восст ВременнаяПапка Время ВыборSQL ВыбратьЗапись ВыделитьСтр Вызвать Выполнить ВыпПрогр ГрафическийФайл ГруппаДополнительно ДатаВремяСерв ДеньНедели ДиалогДаНет ДлинаСтр ДобПодстр ЕПусто ЕслиТо ЕЧисло ЗамПодстр ЗаписьСправочника ЗначПоляСпр ИДТипСпр ИзвлечьДиск ИзвлечьИмяФайла ИзвлечьПуть ИзвлечьРасширение ИзмДат ИзменитьРазмерМассива ИзмеренийМассива ИмяОрг ИмяПоляСпр Инде\ кс ИндикаторЗакрыть ИндикаторОткрыть ИндикаторШаг ИнтерактивныйРежим ИтогТблСпр КодВидВедСпр КодВидСпрПоИД КодПоAnalit КодСимвола КодСпр КолПодстр КолПроп КонМес Конст КонстЕсть КонстЗнач КонТран КопироватьФайл КопияСтр КПериод КСтрТблСпр Макс МаксСтрТблСпр Массив Меню МенюРасш Мин НаборДанныхНайтиРасш НаимВидСпр НаимПоAnalit НаимСпр НастроитьПереводыСтрок НачМес НачТран НижняяГраницаМассива НомерСпр НПериод Окно Окр Окружение ОтлИнфДобавить ОтлИнфУдалить Отчет ОтчетАнал ОтчетИнт ПапкаСуществует\ Пауза ПВыборSQL ПереименоватьФайл Переменные ПереместитьФайл Подстр ПоискПодстр ПоискСтр ПолучитьИДТаблицы ПользовательДополнительно ПользовательИД ПользовательИмя ПользовательСтатус Прервать ПроверитьПараметр ПроверитьПараметрЗнач ПроверитьУсловие РазбСтр РазнВремя РазнДат РазнДатаВремя РазнРабВремя РегУстВрем РегУстДат РегУстЧсл РедТекст РеестрЗапись РеестрСписокИменПарам РеестрЧтение РеквСпр РеквСпрПр Сегодня Сейчас Сервер СерверПроцессИД СертификатФайлСчитать СжПроб Символ СистемаДиректумКо\ д СистемаИнформация СистемаКод Содержит СоединениеЗакрыть СоединениеОткрыть СоздатьДиалог СоздатьДиалогВыбораИзДвухСписков СоздатьДиалогВыбораПапки СоздатьДиалогОткрытияФайла СоздатьДиалогСохраненияФайла СоздатьЗапрос СоздатьИндикатор СоздатьИсключение СоздатьКэшированныйСправочник СоздатьМассив СоздатьНаборДанных СоздатьОбъект СоздатьОтчет СоздатьПапку СоздатьРедактор СоздатьСоединение СоздатьСписок СоздатьСписокСтрок СоздатьСправочник СоздатьСценарий СоздСпр СостСпр Сохр СохрСпр СписокСистем С\ пр Справочник СпрБлокЕсть СпрБлокСнять СпрБлокСнятьРасш СпрБлокУстановить СпрИзмНабДан СпрКод СпрНомер СпрОбновить СпрОткрыть СпрОтменить СпрПарам СпрПолеЗнач СпрПолеИмя СпрРекв СпрРеквВведЗн СпрРеквНовые СпрРеквПр СпрРеквПредЗн СпрРеквРежим СпрРеквТипТекст СпрСоздать СпрСост СпрСохранить СпрТблИтог СпрТблСтр СпрТблСтрКол СпрТблСтрМакс СпрТблСтрМин СпрТблСтрПред СпрТблСтрСлед СпрТблСтрСозд СпрТблСтрУд СпрТекПредст СпрУдалить СравнитьСтр СтрВерхРегистр СтрНижнРегистр СтрТблСпр СумПроп Сценарий Сц\ енарийПарам ТекВерсия ТекОрг Точн Тран Транслитерация УдалитьТаблицу УдалитьФайл УдСпр УдСтрТблСпр Уст УстановкиКонстант ФайлАтрибутСчитать ФайлАтрибутУстановить ФайлВремя ФайлВремяУстановить ФайлВыбрать ФайлЗанят ФайлЗаписать ФайлИскать ФайлКопировать ФайлМожноЧитать ФайлОткрыть ФайлПереименовать ФайлПерекодировать ФайлПереместить ФайлПросмотреть ФайлРазмер ФайлСоздать ФайлСсылкаСоздать ФайлСуществует ФайлСчитать ФайлУдалить ФмтSQLДат ФмтДат ФмтСтр ФмтЧсл Формат ЦМассивЭлемент ЦНаборДанныхРекви\ зит ЦПодстр ",predefined_variables="AltState Application CallType ComponentTokens CreatedJobs CreatedNotices ControlState DialogResult Dialogs EDocuments EDocumentVersionSource Folders GlobalIDs Job Jobs InputValue LookUpReference LookUpRequisiteNames LookUpSearch Object ParentComponent Processes References Requisite ReportName Reports Result Scripts Searches SelectedAttachments SelectedItems SelectMode Sender ServerEvents ServiceFactory ShiftState SubTask SystemDialogs Tasks Wizard Wi\ zards Work ВызовСпособ ИмяОтчета РеквЗнач ",interfaces="IApplication IAccessRights IAccountRepository IAccountSelectionRestrictions IAction IActionList IAdministrationHistoryDescription IAnchors IApplication IArchiveInfo IAttachment IAttachmentList ICheckListBox ICheckPointedList IColumn IComponent IComponentDescription IComponentToken IComponentTokenFactory IComponentTokenInfo ICompRecordInfo IConnection IContents IControl IControlJob IControlJobInfo IControlList ICr\ ypto ICrypto2 ICustomJob ICustomJobInfo ICustomListBox ICustomObjectWizardStep ICustomWork ICustomWorkInfo IDataSet IDataSetAccessInfo IDataSigner IDateCriterion IDateRequisite IDateRequisiteDescription IDateValue IDeaAccessRights IDeaObjectInfo IDevelopmentComponentLock IDialog IDialogFactory IDialogPickRequisiteItems IDialogsFactory IDICSFactory IDocRequisite IDocumentInfo IDualListDialog IECertificate IECertificateInfo IECertificates IEditControl IEditorForm IEdmsExplorer IEdmsObject IEdmsObj\ ectDescription IEdmsObjectFactory IEdmsObjectInfo IEDocument IEDocumentAccessRights IEDocumentDescription IEDocumentEditor IEDocumentFactory IEDocumentInfo IEDocumentStorage IEDocumentVersion IEDocumentVersionListDialog IEDocumentVersionSource IEDocumentWizardStep IEDocVerSignature IEDocVersionState IEnabledMode IEncodeProvider IEncrypter IEvent IEventList IException IExternalEvents IExternalHandler IFactory IField IFileDialog IFolder IFolderDescription IFolderDialog IFolderFactory IFolderInfo I\ ForEach IForm IFormTitle IFormWizardStep IGlobalIDFactory IGlobalIDInfo IGrid IHasher IHistoryDescription IHyperLinkControl IImageButton IImageControl IInnerPanel IInplaceHint IIntegerCriterion IIntegerList IIntegerRequisite IIntegerValue IISBLEditorForm IJob IJobDescription IJobFactory IJobForm IJobInfo ILabelControl ILargeIntegerCriterion ILargeIntegerRequisite ILargeIntegerValue ILicenseInfo ILifeCycleStage IList IListBox ILocalIDInfo ILocalization ILock IMemoryDataSet IMessagingFactory IMeta\ dataRepository INotice INoticeInfo INumericCriterion INumericRequisite INumericValue IObject IObjectDescription IObjectImporter IObjectInfo IObserver IPanelGroup IPickCriterion IPickProperty IPickRequisite IPickRequisiteDescription IPickRequisiteItem IPickRequisiteItems IPickValue IPrivilege IPrivilegeList IProcess IProcessFactory IProcessMessage IProgress IProperty IPropertyChangeEvent IQuery IReference IReferenceCriterion IReferenceEnabledMode IReferenceFactory IReferenceHistoryDescription IRe\ ferenceInfo IReferenceRecordCardWizardStep IReferenceRequisiteDescription IReferencesFactory IReferenceValue IRefRequisite IReport IReportFactory IRequisite IRequisiteDescription IRequisiteDescriptionList IRequisiteFactory IRichEdit IRouteStep IRule IRuleList ISchemeBlock IScript IScriptFactory ISearchCriteria ISearchCriterion ISearchDescription ISearchFactory ISearchFolderInfo ISearchForObjectDescription ISearchResultRestrictions ISecuredContext ISelectDialog IServerEvent IServerEventFactory IS\ erviceDialog IServiceFactory ISignature ISignProvider ISignProvider2 ISignProvider3 ISimpleCriterion IStringCriterion IStringList IStringRequisite IStringRequisiteDescription IStringValue ISystemDialogsFactory ISystemInfo ITabSheet ITask ITaskAbortReasonInfo ITaskCardWizardStep ITaskDescription ITaskFactory ITaskInfo ITaskRoute ITextCriterion ITextRequisite ITextValue ITreeListSelectDialog IUser IUserList IValue IView IWebBrowserControl IWizard IWizardAction IWizardFactory IWizardFormElement IWi\ zardParam IWizardPickParam IWizardReferenceParam IWizardStep IWorkAccessRights IWorkDescription IWorkflowAskableParam IWorkflowAskableParams IWorkflowBlock IWorkflowBlockResult IWorkflowEnabledMode IWorkflowParam IWorkflowPickParam IWorkflowReferenceParam IWorkState IWorkTreeCustomNode IWorkTreeJobNode IWorkTreeTaskNode IXMLEditorForm SBCrypto ",BUILTIN=CONSTANTS+ENUMS,CLASS2=predefined_variables,LITERAL="null true false nil ",NUMBERS={className:"number",begin:hljs.NUMBER_RE,relevance:0},STRINGS={ className:"string",variants:[{begin:'"',end:'"'},{begin:"'",end:"'"}]},DOCTAGS={className:"doctag",begin:"\\b(?:TODO|DONE|BEGIN|END|STUB|CHG|FIXME|NOTE|BUG|XXX)\\b",relevance:0},ISBL_LINE_COMMENT_MODE={className:"comment",begin:"//",end:"$",relevance:0,contains:[hljs.PHRASAL_WORDS_MODE,DOCTAGS]},ISBL_BLOCK_COMMENT_MODE={className:"comment",begin:"/\\*",end:"\\*/",relevance:0,contains:[hljs.PHRASAL_WORDS_MODE,DOCTAGS]},COMMENTS={variants:[ISBL_LINE_COMMENT_MODE,ISBL_BLOCK_COMMENT_MODE]},KEYWORDS2={ $pattern:UNDERSCORE_IDENT_RE,keyword:KEYWORD,built_in:BUILTIN,class:CLASS2,literal:LITERAL},METHODS={begin:"\\.\\s*"+hljs.UNDERSCORE_IDENT_RE,keywords:KEYWORDS2,relevance:0},TYPES2={className:"type",begin:":[ \\t]*("+interfaces.trim().replace(/\s/g,"|")+")",end:"[ \\t]*=",excludeEnd:!0},VARIABLES={className:"variable",keywords:KEYWORDS2,begin:UNDERSCORE_IDENT_RE,relevance:0,contains:[TYPES2,METHODS]},FUNCTION_TITLE=FUNCTION_NAME_IDENT_RE+"\\(";return{name:"ISBL",case_insensitive:!0,keywords:KEYWORDS2, illegal:"\\$|\\?|%|,|;$|~|#|@|/,relevance:10,starts:{end:/^(?![ ]{6})/,subLanguage:"julia"}}],aliases:["jldoctest"]}}function lasso(hljs){const LASSO_IDENT_RE="[a-zA-Z_][\\w.]*",LASSO_ANGLE_RE="<\\?(lasso(script)?|=)",LASSO_CLOSE_RE="\\]|\\?>",LASSO_KEYWORDS={$pattern:LASSO_IDENT_RE+"|&[lg]t;",literal:"true false none minimal full all void and or not bw nb\ w ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentr\ ecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else fail_if fail_ifnot fail if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_chi\ ldren soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},HTML_COMMENT=hljs.COMMENT("",{relevance:0}),LASSO_NOPROCESS={className:"meta",begin:"\\[noprocess\\]",starts:{end:"\\[/noprocess\\]",returnEnd:!0,contains:[HTML_COMMENT]}},LASSO_START={ className:"meta",begin:"\\[/noprocess|"+LASSO_ANGLE_RE},LASSO_DATAMEMBER={className:"symbol",begin:"'"+LASSO_IDENT_RE+"'"},LASSO_CODE=[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.inherit(hljs.C_NUMBER_MODE,{begin:hljs.C_NUMBER_RE+"|(-?infinity|NaN)\\b"}),hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"`",end:"`"},{variants:[{begin:"[#$]"+LASSO_IDENT_RE},{begin:"#",end:"\\d+",illegal:"\\W"}]},{className:"\ type",begin:"::\\s*",end:LASSO_IDENT_RE,illegal:"\\W"},{className:"params",variants:[{begin:"-(?!infinity)"+LASSO_IDENT_RE,relevance:0},{begin:"(\\.\\.\\.)"}]},{begin:/(->|\.)\s*/,relevance:0,contains:[LASSO_DATAMEMBER]},{className:"class",beginKeywords:"define",returnEnd:!0,end:"\\(|=>",contains:[hljs.inherit(hljs.TITLE_MODE,{begin:LASSO_IDENT_RE+"(=(?!>))?|[-+*/%](?!>)"})]}];return{name:"Lasso",aliases:["ls","lassoscript"],case_insensitive:!0,keywords:LASSO_KEYWORDS,contains:[{className:"meta", begin:LASSO_CLOSE_RE,relevance:0,starts:{end:"\\[|"+LASSO_ANGLE_RE,returnEnd:!0,relevance:0,contains:[HTML_COMMENT]}},LASSO_NOPROCESS,LASSO_START,{className:"meta",begin:"\\[no_square_brackets",starts:{end:"\\[/no_square_brackets\\]",keywords:LASSO_KEYWORDS,contains:[{className:"meta",begin:LASSO_CLOSE_RE,relevance:0,starts:{end:"\\[noprocess\\]|"+LASSO_ANGLE_RE,returnEnd:!0,contains:[HTML_COMMENT]}},LASSO_NOPROCESS,LASSO_START].concat(LASSO_CODE)}},{className:"meta",begin:"\\[",relevance:0},{className:"\ meta",begin:"^#!",end:"lasso9$",relevance:10}].concat(LASSO_CODE)}}function latex(hljs){const KNOWN_CONTROL_WORDS=hljs.regex.either(...["(?:NeedsTeXFormat|RequirePackage|GetIdInfo)","Provides(?:Expl)?(?:Package|Class|File)","(?:DeclareOption|ProcessOptions)","(?:documentclass|usepackage|input|include)","makeat(?:letter|other)","ExplSyntax(?:On|Off)","(?:new|renew|provide)?command","(?:re)newenvironment","(?:New|Renew|Provide|Declare)(?:Expandable)?DocumentCommand","(?:New|Renew|Provide|Declare)D\ ocumentEnvironment","(?:(?:e|g|x)?def|let)","(?:begin|end)","(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph)","caption","(?:label|(?:eq|page|name)?ref|(?:paren|foot|super)?cite)","(?:alpha|beta|[Gg]amma|[Dd]elta|(?:var)?epsilon|zeta|eta|[Tt]heta|vartheta)","(?:iota|(?:var)?kappa|[Ll]ambda|mu|nu|[Xx]i|[Pp]i|varpi|(?:var)rho)","(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)","(?:frac|sum|prod|lim|infty|times|sqrt|leq|geq|left|right|middle|[bB]igg?)","(?:[lr]angle|q?q\ uad|[lcvdi]?dots|d?dot|hat|tilde|bar)"].map(word=>word+"(?![a-zA-Z@:_])")),L3_REGEX=new RegExp(["(?:__)?[a-zA-Z]{2,}_[a-zA-Z](?:_?[a-zA-Z])+:[a-zA-Z]*","[lgc]__?[a-zA-Z](?:_?[a-zA-Z])*_[a-zA-Z]{2,}","[qs]__?[a-zA-Z](?:_?[a-zA-Z])+","use(?:_i)?:[a-zA-Z]*","(?:else|fi|or):","(?:if|cs|exp):w","(?:hbox|vbox):n","::[a-zA-Z]_unbraced","::[a-zA-Z:]"].map(pattern2=>pattern2+"(?![a-zA-Z:_])").join("|")),L2_VARIANTS=[{begin:/[a-zA-Z@]+/},{begin:/[^a-zA-Z@]?/}],DOUBLE_CARET_VARIANTS=[{begin:/\^{6}[0-9a-f]{6}/}, {begin:/\^{5}[0-9a-f]{5}/},{begin:/\^{4}[0-9a-f]{4}/},{begin:/\^{3}[0-9a-f]{3}/},{begin:/\^{2}[0-9a-f]{2}/},{begin:/\^{2}[\u0000-\u007f]/}],CONTROL_SEQUENCE={className:"keyword",begin:/\\/,relevance:0,contains:[{endsParent:!0,begin:KNOWN_CONTROL_WORDS},{endsParent:!0,begin:L3_REGEX},{endsParent:!0,variants:DOUBLE_CARET_VARIANTS},{endsParent:!0,relevance:0,variants:L2_VARIANTS}]},MACRO_PARAM={className:"params",relevance:0,begin:/#+\d?/},DOUBLE_CARET_CHAR={variants:DOUBLE_CARET_VARIANTS},SPECIAL_CATCODE={ className:"built_in",relevance:0,begin:/[$&^_]/},MAGIC_COMMENT={className:"meta",begin:/% ?!(T[eE]X|tex|BIB|bib)/,end:"$",relevance:10},COMMENT=hljs.COMMENT("%","$",{relevance:0}),EVERYTHING_BUT_VERBATIM=[CONTROL_SEQUENCE,MACRO_PARAM,DOUBLE_CARET_CHAR,SPECIAL_CATCODE,MAGIC_COMMENT,COMMENT],BRACE_GROUP_NO_VERBATIM={begin:/\{/,end:/\}/,relevance:0,contains:["self",...EVERYTHING_BUT_VERBATIM]},ARGUMENT_BRACES=hljs.inherit(BRACE_GROUP_NO_VERBATIM,{relevance:0,endsParent:!0,contains:[BRACE_GROUP_NO_VERBATIM, ...EVERYTHING_BUT_VERBATIM]}),ARGUMENT_BRACKETS={begin:/\[/,end:/\]/,endsParent:!0,relevance:0,contains:[BRACE_GROUP_NO_VERBATIM,...EVERYTHING_BUT_VERBATIM]},SPACE_GOBBLER={begin:/\s+/,relevance:0},ARGUMENT_M=[ARGUMENT_BRACES],ARGUMENT_O=[ARGUMENT_BRACKETS],ARGUMENT_AND_THEN=function(arg,starts_mode){return{contains:[SPACE_GOBBLER],starts:{relevance:0,contains:arg,starts:starts_mode}}},CSNAME=function(csname,starts_mode){return{begin:"\\\\"+csname+"(?![a-zA-Z@:_])",keywords:{$pattern:/\\[a-zA-Z]+/, keyword:"\\"+csname},relevance:0,contains:[SPACE_GOBBLER],starts:starts_mode}},BEGIN_ENV=function(envname,starts_mode){return hljs.inherit({begin:"\\\\begin(?=[ ]*(\\r?\\n[ ]*)?\\{"+envname+"\\})",keywords:{$pattern:/\\[a-zA-Z]+/,keyword:"\\begin"},relevance:0},ARGUMENT_AND_THEN(ARGUMENT_M,starts_mode))},VERBATIM_DELIMITED_EQUAL=(innerName="string")=>hljs.END_SAME_AS_BEGIN({className:innerName,begin:/(.|\r?\n)/,end:/(.|\r?\n)/,excludeBegin:!0,excludeEnd:!0,endsParent:!0}),VERBATIM_DELIMITED_ENV=function(envname){ return{className:"string",end:"(?=\\\\end\\{"+envname+"\\})"}},VERBATIM_DELIMITED_BRACES=(innerName="string")=>({relevance:0,begin:/\{/,starts:{endsParent:!0,contains:[{className:innerName,end:/(?=\})/,endsParent:!0,contains:[{begin:/\{/,end:/\}/,relevance:0,contains:["self"]}]}]}}),VERBATIM=[...["verb","lstinline"].map(csname=>CSNAME(csname,{contains:[VERBATIM_DELIMITED_EQUAL()]})),CSNAME("mint",ARGUMENT_AND_THEN(ARGUMENT_M,{contains:[VERBATIM_DELIMITED_EQUAL()]})),CSNAME("mintinline",ARGUMENT_AND_THEN( ARGUMENT_M,{contains:[VERBATIM_DELIMITED_BRACES(),VERBATIM_DELIMITED_EQUAL()]})),CSNAME("url",{contains:[VERBATIM_DELIMITED_BRACES("link"),VERBATIM_DELIMITED_BRACES("link")]}),CSNAME("hyperref",{contains:[VERBATIM_DELIMITED_BRACES("link")]}),CSNAME("href",ARGUMENT_AND_THEN(ARGUMENT_O,{contains:[VERBATIM_DELIMITED_BRACES("link")]})),...[].concat(...["","\\*"].map(suffix=>[BEGIN_ENV("verbatim"+suffix,VERBATIM_DELIMITED_ENV("verbatim"+suffix)),BEGIN_ENV("filecontents"+suffix,ARGUMENT_AND_THEN(ARGUMENT_M, VERBATIM_DELIMITED_ENV("filecontents"+suffix))),...["","B","L"].map(prefix=>BEGIN_ENV(prefix+"Verbatim"+suffix,ARGUMENT_AND_THEN(ARGUMENT_O,VERBATIM_DELIMITED_ENV(prefix+"Verbatim"+suffix))))])),BEGIN_ENV("minted",ARGUMENT_AND_THEN(ARGUMENT_O,ARGUMENT_AND_THEN(ARGUMENT_M,VERBATIM_DELIMITED_ENV("minted"))))];return{name:"LaTeX",aliases:["tex"],contains:[...VERBATIM,...EVERYTHING_BUT_VERBATIM]}}function ldif(hljs){return{name:"LDIF",contains:[{className:"attribute",match:"^dn(?=:)",relevance:10},{ className:"attribute",match:"^\\w+(?=:)"},{className:"literal",match:"^-"},hljs.HASH_COMMENT_MODE]}}function leaf(hljs){const IDENT=/([A-Za-z_][A-Za-z_0-9]*)?/,PARAMS={scope:"params",begin:/\(/,end:/\)(?=\:?)/,endsParent:!0,relevance:7,contains:[{scope:"string",begin:'"',end:'"'},{scope:"keyword",match:["true","false","in"].join("|")},{scope:"variable",match:/[A-Za-z_][A-Za-z_0-9]*/},{scope:"operator",match:/\+|\-|\*|\/|\%|\=\=|\=|\!|\>|\<|\&\&|\|\|/}]},INSIDE_DISPATCH={match:[IDENT,/(?=\()/],scope:{ 1:"keyword"},contains:[PARAMS]};return PARAMS.contains.unshift(INSIDE_DISPATCH),{name:"Leaf",contains:[{match:[/#+/,IDENT,/(?=\()/],scope:{1:"punctuation",2:"keyword"},starts:{contains:[{match:/\:/,scope:"punctuation"}]},contains:[PARAMS]},{match:[/#+/,IDENT,/:?/],scope:{1:"punctuation",2:"keyword",3:"punctuation"}}]}}function lisp(hljs){const LISP_IDENT_RE="[a-zA-Z_\\-+\\*\\/<=>&#][a-zA-Z0-9_\\-+*\\/<=>&#!]*",MEC_RE="\\|[^]*?\\|",LISP_SIMPLE_NUMBER_RE="(-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|\ L|S)(\\+|-)?\\d+)?",LITERAL={className:"literal",begin:"\\b(t{1}|nil)\\b"},NUMBER={className:"number",variants:[{begin:LISP_SIMPLE_NUMBER_RE,relevance:0},{begin:"#(b|B)[0-1]+(/[0-1]+)?"},{begin:"#(o|O)[0-7]+(/[0-7]+)?"},{begin:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{begin:"#(c|C)\\("+LISP_SIMPLE_NUMBER_RE+" +"+LISP_SIMPLE_NUMBER_RE,end:"\\)"}]},STRING=hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),COMMENT=hljs.COMMENT(";","$",{relevance:0}),VARIABLE={begin:"\\*",end:"\\*"},KEYWORD={className:"\ symbol",begin:"[:&]"+LISP_IDENT_RE},IDENT={begin:LISP_IDENT_RE,relevance:0},MEC={begin:MEC_RE},QUOTED={contains:[NUMBER,STRING,VARIABLE,KEYWORD,{begin:"\\(",end:"\\)",contains:["self",LITERAL,STRING,NUMBER,IDENT]},IDENT],variants:[{begin:"['`]\\(",end:"\\)"},{begin:"\\(quote ",end:"\\)",keywords:{name:"quote"}},{begin:"'"+MEC_RE}]},QUOTED_ATOM={variants:[{begin:"'"+LISP_IDENT_RE},{begin:"#'"+LISP_IDENT_RE+"(::"+LISP_IDENT_RE+")*"}]},LIST={begin:"\\(\\s*",end:"\\)"},BODY={endsWithParent:!0,relevance:0}; return LIST.contains=[{className:"name",variants:[{begin:LISP_IDENT_RE,relevance:0},{begin:MEC_RE}]},BODY],BODY.contains=[QUOTED,QUOTED_ATOM,LIST,LITERAL,NUMBER,STRING,COMMENT,VARIABLE,KEYWORD,MEC,IDENT],{name:"Lisp",illegal:/\S/,contains:[NUMBER,hljs.SHEBANG(),LITERAL,STRING,COMMENT,QUOTED,QUOTED_ATOM,LIST,IDENT]}}function livecodeserver(hljs){const VARIABLE={className:"variable",variants:[{begin:"\\b([gtps][A-Z]{1}[a-zA-Z0-9]*)(\\[.+\\])?(?:\\s*?)"},{begin:"\\$_[A-Z]+"}],relevance:0},COMMENT_MODES=[ hljs.C_BLOCK_COMMENT_MODE,hljs.HASH_COMMENT_MODE,hljs.COMMENT("--","$"),hljs.COMMENT("[^:]//","$")],TITLE1=hljs.inherit(hljs.TITLE_MODE,{variants:[{begin:"\\b_*rig[A-Z][A-Za-z0-9_\\-]*"},{begin:"\\b_[a-z0-9\\-]+"}]}),TITLE2=hljs.inherit(hljs.TITLE_MODE,{begin:"\\b([A-Za-z0-9_\\-]+)\\b"});return{name:"LiveCode",case_insensitive:!1,keywords:{keyword:"$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER codepoint codepoints segment segments codeunit codeu\ nits sentence sentences trueWord trueWords paragraph after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word words fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s \ repeat end repeat URL in try into switch to words https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within contains ends with begins the keys of keys",literal:"SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE QUOTE EMPTY ONE TRUE RETURN\ CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five quote empty one true return cr linefeed right backslash null seven tab three two RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK",built_in:"put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg avgDev base64Decode base64En\ code baseConvert binaryDecode binaryEncode byteOffset byteToNum cachedURL cachedURLs charToNum cipherNames codepointOffset codepointProperty codepointToNum codeunitOffset commandNames compound compress constantNames cos date dateFormat decompress difference directories diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames geometricMean global globals hasMemory harmonicMean hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOff\ set keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge messageAuthenticationCode messageDigest millisec millisecs millisecond milliseconds min monthNames nativeCharToNum normalizeText num number numToByte numToChar numToCodepoint numToNativeChar\ offset open openfiles openProcesses openProcessIDs openSockets paragraphOffset paramCount param params peerAddress pendingMessages platform popStdDev populationStandardDeviation populationVariance popVariance processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnN\ umbered revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst re\ vdb_movelast revdb_movenext revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLCreateTreeFromFileWithNamespaces revXMLCreateTreeWithNamespaces revXMLDataFromXPathQuery revXMLEva\ luateXPath revXMLFirstChild revXMLMatchingNode revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_Execute revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXML\ Tree revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sampVariance sec secs seconds sentenceOffset sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound stdDev sum sysError systemVersion tan tempName textDecode textEncode tick ticks time to tokenOffset toLower toUpper transpose truewordOffset trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus uuid value variableNames variance version waitDepth weekdayNames w\ ordOffset xsltApplyStylesheet xsltApplyStylesheetFromFile xsltLoadStylesheet xsltLoadStylesheetFromFile add breakpoint cancel clear local variable file word line folder directory URL close socket process combine constant convert create new alias folder directory decrypt delete variable word line folder directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback l\ ibURLSetDriver libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime libURLSetStatusCallback load extension loadedExtensions multiply socket prepare process post seek rel relative read from process rename replace require resetAll resolve revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees revDeleteXMLTree revExecuteSQL revGo\ URL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData revZip\ AddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split start stop subtract symmetric union unload vectorDotProduct wait write"},contains:[VARIABLE,{className:"keyword",begin:"\\bend\\sif\\b"},{className:"function",beginKeywords:"function", end:"$",contains:[VARIABLE,TITLE2,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE,TITLE1]},{className:"function",begin:"\\bend\\s+",end:"$",keywords:"end",contains:[TITLE2,TITLE1],relevance:0},{beginKeywords:"command on",end:"$",contains:[VARIABLE,TITLE2,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE,TITLE1]},{className:"meta",variants:[{begin:"<\\?(rev|lc|livecode)",relevance:10},{begin:"<\\?"},{begin:"\\?>"}]},hljs. APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE,TITLE1].concat(COMMENT_MODES),illegal:";$|^\\[|^=|&|\\{"}}const KEYWORDS$2=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],LITERALS$2=["true","false","nul\ l","undefined","NaN","Infinity"],TYPES$2=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ERROR_TYPES$2=[ "Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],BUILT_IN_GLOBALS$2=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],BUILT_INS$2=[].concat(BUILT_IN_GLOBALS$2,TYPES$2,ERROR_TYPES$2);function livescript(hljs){const LIVESCRIPT_BUILT_INS=["npm","print"],LIVESCRIPT_LITERALS=["yes","\ no","on","off","it","that","void"],LIVESCRIPT_KEYWORDS=["then","unless","until","loop","of","by","when","and","or","is","isnt","not","it","that","otherwise","from","to","til","fallthrough","case","enum","native","list","map","__hasProp","__extends","__slice","__bind","__indexOf"],KEYWORDS$12={keyword:KEYWORDS$2.concat(LIVESCRIPT_KEYWORDS),literal:LITERALS$2.concat(LIVESCRIPT_LITERALS),built_in:BUILT_INS$2.concat(LIVESCRIPT_BUILT_INS)},JS_IDENT_RE="[A-Za-z$_](?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*",TITLE=hljs. inherit(hljs.TITLE_MODE,{begin:JS_IDENT_RE}),SUBST={className:"subst",begin:/#\{/,end:/\}/,keywords:KEYWORDS$12},SUBST_SIMPLE={className:"subst",begin:/#[A-Za-z$_]/,end:/(?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,keywords:KEYWORDS$12},EXPRESSIONS=[hljs.BINARY_NUMBER_MODE,{className:"number",begin:"(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*)",relevance:0,starts:{end:"(\\s*/)?",relevance:0}},{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[ hljs.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[hljs.BACKSLASH_ESCAPE,SUBST,SUBST_SIMPLE]},{begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,SUBST,SUBST_SIMPLE]},{begin:/\\/,end:/(\s|$)/,excludeEnd:!0}]},{className:"regexp",variants:[{begin:"//",end:"//[gim]*",contains:[SUBST,hljs.HASH_COMMENT_MODE]},{begin:/\/(?![ *])(\\.|[^\\\n])*?\/[gim]*(?=\W)/}]},{begin:"@"+JS_IDENT_RE},{begin:"``",end:"``",excludeBegin:!0,excludeEnd:!0,subLanguage:"\ javascript"}];SUBST.contains=EXPRESSIONS;const PARAMS={className:"params",begin:"\\(",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:KEYWORDS$12,contains:["self"].concat(EXPRESSIONS)}]},SYMBOLS={begin:"(#=>|=>|\\|>>|-?->|!->)"},CLASS_DEFINITION={variants:[{match:[/class\s+/,JS_IDENT_RE,/\s+extends\s+/,JS_IDENT_RE]},{match:[/class\s+/,JS_IDENT_RE]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:KEYWORDS$12};return{name:"LiveScript",aliases:["ls"],keywords:KEYWORDS$12,illegal:/\/\*/, contains:EXPRESSIONS.concat([hljs.COMMENT("\\/\\*","\\*\\/"),hljs.HASH_COMMENT_MODE,SYMBOLS,{className:"function",contains:[TITLE,PARAMS],returnBegin:!0,variants:[{begin:"("+JS_IDENT_RE+"\\s*(?:=|:=)\\s*)?(\\(.*\\)\\s*)?\\B->\\*?",end:"->\\*?"},{begin:"("+JS_IDENT_RE+"\\s*(?:=|:=)\\s*)?!?(\\(.*\\)\\s*)?\\B[-~]{1,2}>\\*?",end:"[-~]{1,2}>\\*?"},{begin:"("+JS_IDENT_RE+"\\s*(?:=|:=)\\s*)?(\\(.*\\)\\s*)?\\B!?[-~]{1,2}>\\*?",end:"!?[-~]{1,2}>\\*?"}]},CLASS_DEFINITION,{begin:JS_IDENT_RE+":",end:":",returnBegin:!0, returnEnd:!0,relevance:0}])}}function llvm(hljs){const regex=hljs.regex,IDENT_RE2=/([-a-zA-Z$._][\w$.-]*)/,TYPE={className:"type",begin:/\bi\d+(?=\s|\b)/},OPERATOR={className:"operator",relevance:0,begin:/=/},PUNCTUATION={className:"punctuation",relevance:0,begin:/,/},NUMBER={className:"number",variants:[{begin:/[su]?0[xX][KMLHR]?[a-fA-F0-9]+/},{begin:/[-+]?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?/}],relevance:0},LABEL={className:"symbol",variants:[{begin:/^\s*[a-z]+:/}],relevance:0},VARIABLE={ className:"variable",variants:[{begin:regex.concat(/%/,IDENT_RE2)},{begin:/%\d+/},{begin:/#\d+/}]},FUNCTION={className:"title",variants:[{begin:regex.concat(/@/,IDENT_RE2)},{begin:/@\d+/},{begin:regex.concat(/!/,IDENT_RE2)},{begin:regex.concat(/!\d+/,IDENT_RE2)},{begin:/!\d+/}]};return{name:"LLVM IR",keywords:{keyword:"begin end true false declare define global constant private linker_private internal available_externally linkonce linkonce_odr weak weak_odr appending dllimport dllexport common d\ efault hidden protected extern_weak external thread_local zeroinitializer undef null to tail target triple datalayout volatile nuw nsw nnan ninf nsz arcp fast exact inbounds align addrspace section alias module asm sideeffect gc dbg linker_private_weak attributes blockaddress initialexec localdynamic localexec prefix unnamed_addr ccc fastcc coldcc x86_stdcallcc x86_fastcallcc arm_apcscc arm_aapcscc arm_aapcs_vfpcc ptx_device ptx_kernel intel_ocl_bicc msp430_intrcc spir_func spir_kernel x86_64_sy\ svcc x86_64_win64cc x86_thiscallcc cc c signext zeroext inreg sret nounwind noreturn noalias nocapture byval nest readnone readonly inlinehint noinline alwaysinline optsize ssp sspreq noredzone noimplicitfloat naked builtin cold nobuiltin noduplicate nonlazybind optnone returns_twice sanitize_address sanitize_memory sanitize_thread sspstrong uwtable returned type opaque eq ne slt sgt sle sge ult ugt ule uge oeq one olt ogt ole oge ord uno ueq une x acq_rel acquire alignstack atomic catch cleanup\ filter inteldialect max min monotonic nand personality release seq_cst singlethread umax umin unordered xchg add fadd sub fsub mul fmul udiv sdiv fdiv urem srem frem shl lshr ashr and or xor icmp fcmp phi call trunc zext sext fptrunc fpext uitofp sitofp fptoui fptosi inttoptr ptrtoint bitcast addrspacecast select va_arg ret br switch invoke unwind unreachable indirectbr landingpad resume malloc alloca free load store getelementptr extractelement insertelement shufflevector getresult extractvalu\ e insertvalue atomicrmw cmpxchg fence argmemonly",type:"void half bfloat float double fp128 x86_fp80 ppc_fp128 x86_amx x86_mmx ptr label token metadata opaque"},contains:[TYPE,hljs.COMMENT(/;\s*$/,null,{relevance:0}),hljs.COMMENT(/;/,/$/),{className:"string",begin:/"/,end:/"/,contains:[{className:"char.escape",match:/\\\d\d/}]},FUNCTION,PUNCTUATION,OPERATOR,VARIABLE,LABEL,NUMBER]}}function lsl(hljs){const LSL_STRINGS={className:"string",begin:'"',end:'"',contains:[{className:"subst",begin:/\\[tn"\\]/}]}, LSL_NUMBERS={className:"number",relevance:0,begin:hljs.C_NUMBER_RE},LSL_CONSTANTS={className:"literal",variants:[{begin:"\\b(PI|TWO_PI|PI_BY_TWO|DEG_TO_RAD|RAD_TO_DEG|SQRT2)\\b"},{begin:"\\b(XP_ERROR_(EXPERIENCES_DISABLED|EXPERIENCE_(DISABLED|SUSPENDED)|INVALID_(EXPERIENCE|PARAMETERS)|KEY_NOT_FOUND|MATURITY_EXCEEDED|NONE|NOT_(FOUND|PERMITTED(_LAND)?)|NO_EXPERIENCE|QUOTA_EXCEEDED|RETRY_UPDATE|STORAGE_EXCEPTION|STORE_DISABLED|THROTTLED|UNKNOWN_ERROR)|JSON_APPEND|STATUS_(PHYSICS|ROTATE_[XYZ]|PHANTOM\ |SANDBOX|BLOCK_GRAB(_OBJECT)?|(DIE|RETURN)_AT_EDGE|CAST_SHADOWS|OK|MALFORMED_PARAMS|TYPE_MISMATCH|BOUNDS_ERROR|NOT_(FOUND|SUPPORTED)|INTERNAL_ERROR|WHITELIST_FAILED)|AGENT(_(BY_(LEGACY_|USER)NAME|FLYING|ATTACHMENTS|SCRIPTED|MOUSELOOK|SITTING|ON_OBJECT|AWAY|WALKING|IN_AIR|TYPING|CROUCHING|BUSY|ALWAYS_RUN|AUTOPILOT|LIST_(PARCEL(_OWNER)?|REGION)))?|CAMERA_(PITCH|DISTANCE|BEHINDNESS_(ANGLE|LAG)|(FOCUS|POSITION)(_(THRESHOLD|LOCKED|LAG))?|FOCUS_OFFSET|ACTIVE)|ANIM_ON|LOOP|REVERSE|PING_PONG|SMOOTH|ROTA\ TE|SCALE|ALL_SIDES|LINK_(ROOT|SET|ALL_(OTHERS|CHILDREN)|THIS)|ACTIVE|PASS(IVE|_(ALWAYS|IF_NOT_HANDLED|NEVER))|SCRIPTED|CONTROL_(FWD|BACK|(ROT_)?(LEFT|RIGHT)|UP|DOWN|(ML_)?LBUTTON)|PERMISSION_(RETURN_OBJECTS|DEBIT|OVERRIDE_ANIMATIONS|SILENT_ESTATE_MANAGEMENT|TAKE_CONTROLS|TRIGGER_ANIMATION|ATTACH|CHANGE_LINKS|(CONTROL|TRACK)_CAMERA|TELEPORT)|INVENTORY_(TEXTURE|SOUND|OBJECT|SCRIPT|LANDMARK|CLOTHING|NOTECARD|BODYPART|ANIMATION|GESTURE|ALL|NONE)|CHANGED_(INVENTORY|COLOR|SHAPE|SCALE|TEXTURE|LINK|ALLO\ WED_DROP|OWNER|REGION(_START)?|TELEPORT|MEDIA)|OBJECT_(CLICK_ACTION|HOVER_HEIGHT|LAST_OWNER_ID|(PHYSICS|SERVER|STREAMING)_COST|UNKNOWN_DETAIL|CHARACTER_TIME|PHANTOM|PHYSICS|TEMP_(ATTACHED|ON_REZ)|NAME|DESC|POS|PRIM_(COUNT|EQUIVALENCE)|RETURN_(PARCEL(_OWNER)?|REGION)|REZZER_KEY|ROO?T|VELOCITY|OMEGA|OWNER|GROUP(_TAG)?|CREATOR|ATTACHED_(POINT|SLOTS_AVAILABLE)|RENDER_WEIGHT|(BODY_SHAPE|PATHFINDING)_TYPE|(RUNNING|TOTAL)_SCRIPT_COUNT|TOTAL_INVENTORY_COUNT|SCRIPT_(MEMORY|TIME))|TYPE_(INTEGER|FLOAT|STRI\ NG|KEY|VECTOR|ROTATION|INVALID)|(DEBUG|PUBLIC)_CHANNEL|ATTACH_(AVATAR_CENTER|CHEST|HEAD|BACK|PELVIS|MOUTH|CHIN|NECK|NOSE|BELLY|[LR](SHOULDER|HAND|FOOT|EAR|EYE|[UL](ARM|LEG)|HIP)|(LEFT|RIGHT)_PEC|HUD_(CENTER_[12]|TOP_(RIGHT|CENTER|LEFT)|BOTTOM(_(RIGHT|LEFT))?)|[LR]HAND_RING1|TAIL_(BASE|TIP)|[LR]WING|FACE_(JAW|[LR]EAR|[LR]EYE|TOUNGE)|GROIN|HIND_[LR]FOOT)|LAND_(LEVEL|RAISE|LOWER|SMOOTH|NOISE|REVERT)|DATA_(ONLINE|NAME|BORN|SIM_(POS|STATUS|RATING)|PAYINFO)|PAYMENT_INFO_(ON_FILE|USED)|REMOTE_DATA_(CHA\ NNEL|REQUEST|REPLY)|PSYS_(PART_(BF_(ZERO|ONE(_MINUS_(DEST_COLOR|SOURCE_(ALPHA|COLOR)))?|DEST_COLOR|SOURCE_(ALPHA|COLOR))|BLEND_FUNC_(DEST|SOURCE)|FLAGS|(START|END)_(COLOR|ALPHA|SCALE|GLOW)|MAX_AGE|(RIBBON|WIND|INTERP_(COLOR|SCALE)|BOUNCE|FOLLOW_(SRC|VELOCITY)|TARGET_(POS|LINEAR)|EMISSIVE)_MASK)|SRC_(MAX_AGE|PATTERN|ANGLE_(BEGIN|END)|BURST_(RATE|PART_COUNT|RADIUS|SPEED_(MIN|MAX))|ACCEL|TEXTURE|TARGET_KEY|OMEGA|PATTERN_(DROP|EXPLODE|ANGLE(_CONE(_EMPTY)?)?)))|VEHICLE_(REFERENCE_FRAME|TYPE_(NONE|SLE\ D|CAR|BOAT|AIRPLANE|BALLOON)|(LINEAR|ANGULAR)_(FRICTION_TIMESCALE|MOTOR_DIRECTION)|LINEAR_MOTOR_OFFSET|HOVER_(HEIGHT|EFFICIENCY|TIMESCALE)|BUOYANCY|(LINEAR|ANGULAR)_(DEFLECTION_(EFFICIENCY|TIMESCALE)|MOTOR_(DECAY_)?TIMESCALE)|VERTICAL_ATTRACTION_(EFFICIENCY|TIMESCALE)|BANKING_(EFFICIENCY|MIX|TIMESCALE)|FLAG_(NO_DEFLECTION_UP|LIMIT_(ROLL_ONLY|MOTOR_UP)|HOVER_((WATER|TERRAIN|UP)_ONLY|GLOBAL_HEIGHT)|MOUSELOOK_(STEER|BANK)|CAMERA_DECOUPLED))|PRIM_(ALLOW_UNSIT|ALPHA_MODE(_(BLEND|EMISSIVE|MASK|NONE))?\ |NORMAL|SPECULAR|TYPE(_(BOX|CYLINDER|PRISM|SPHERE|TORUS|TUBE|RING|SCULPT))?|HOLE_(DEFAULT|CIRCLE|SQUARE|TRIANGLE)|MATERIAL(_(STONE|METAL|GLASS|WOOD|FLESH|PLASTIC|RUBBER))?|SHINY_(NONE|LOW|MEDIUM|HIGH)|BUMP_(NONE|BRIGHT|DARK|WOOD|BARK|BRICKS|CHECKER|CONCRETE|TILE|STONE|DISKS|GRAVEL|BLOBS|SIDING|LARGETILE|STUCCO|SUCTION|WEAVE)|TEXGEN_(DEFAULT|PLANAR)|SCRIPTED_SIT_ONLY|SCULPT_(TYPE_(SPHERE|TORUS|PLANE|CYLINDER|MASK)|FLAG_(MIRROR|INVERT))|PHYSICS(_(SHAPE_(CONVEX|NONE|PRIM|TYPE)))?|(POS|ROT)_LOCAL|SL\ ICE|TEXT|FLEXIBLE|POINT_LIGHT|TEMP_ON_REZ|PHANTOM|POSITION|SIT_TARGET|SIZE|ROTATION|TEXTURE|NAME|OMEGA|DESC|LINK_TARGET|COLOR|BUMP_SHINY|FULLBRIGHT|TEXGEN|GLOW|MEDIA_(ALT_IMAGE_ENABLE|CONTROLS|(CURRENT|HOME)_URL|AUTO_(LOOP|PLAY|SCALE|ZOOM)|FIRST_CLICK_INTERACT|(WIDTH|HEIGHT)_PIXELS|WHITELIST(_ENABLE)?|PERMS_(INTERACT|CONTROL)|PARAM_MAX|CONTROLS_(STANDARD|MINI)|PERM_(NONE|OWNER|GROUP|ANYONE)|MAX_(URL_LENGTH|WHITELIST_(SIZE|COUNT)|(WIDTH|HEIGHT)_PIXELS)))|MASK_(BASE|OWNER|GROUP|EVERYONE|NEXT)|PERM\ _(TRANSFER|MODIFY|COPY|MOVE|ALL)|PARCEL_(MEDIA_COMMAND_(STOP|PAUSE|PLAY|LOOP|TEXTURE|URL|TIME|AGENT|UNLOAD|AUTO_ALIGN|TYPE|SIZE|DESC|LOOP_SET)|FLAG_(ALLOW_(FLY|(GROUP_)?SCRIPTS|LANDMARK|TERRAFORM|DAMAGE|CREATE_(GROUP_)?OBJECTS)|USE_(ACCESS_(GROUP|LIST)|BAN_LIST|LAND_PASS_LIST)|LOCAL_SOUND_ONLY|RESTRICT_PUSHOBJECT|ALLOW_(GROUP|ALL)_OBJECT_ENTRY)|COUNT_(TOTAL|OWNER|GROUP|OTHER|SELECTED|TEMP)|DETAILS_(NAME|DESC|OWNER|GROUP|AREA|ID|SEE_AVATARS))|LIST_STAT_(MAX|MIN|MEAN|MEDIAN|STD_DEV|SUM(_SQUARES)?|\ NUM_COUNT|GEOMETRIC_MEAN|RANGE)|PAY_(HIDE|DEFAULT)|REGION_FLAG_(ALLOW_DAMAGE|FIXED_SUN|BLOCK_TERRAFORM|SANDBOX|DISABLE_(COLLISIONS|PHYSICS)|BLOCK_FLY|ALLOW_DIRECT_TELEPORT|RESTRICT_PUSHOBJECT)|HTTP_(METHOD|MIMETYPE|BODY_(MAXLENGTH|TRUNCATED)|CUSTOM_HEADER|PRAGMA_NO_CACHE|VERBOSE_THROTTLE|VERIFY_CERT)|SIT_(INVALID_(AGENT|LINK_OBJECT)|NO(T_EXPERIENCE|_(ACCESS|EXPERIENCE_PERMISSION|SIT_TARGET)))|STRING_(TRIM(_(HEAD|TAIL))?)|CLICK_ACTION_(NONE|TOUCH|SIT|BUY|PAY|OPEN(_MEDIA)?|PLAY|ZOOM)|TOUCH_INVALID\ _FACE|PROFILE_(NONE|SCRIPT_MEMORY)|RC_(DATA_FLAGS|DETECT_PHANTOM|GET_(LINK_NUM|NORMAL|ROOT_KEY)|MAX_HITS|REJECT_(TYPES|AGENTS|(NON)?PHYSICAL|LAND))|RCERR_(CAST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN)|ESTATE_ACCESS_(ALLOWED_(AGENT|GROUP)_(ADD|REMOVE)|BANNED_AGENT_(ADD|REMOVE))|DENSITY|FRICTION|RESTITUTION|GRAVITY_MULTIPLIER|KFM_(COMMAND|CMD_(PLAY|STOP|PAUSE)|MODE|FORWARD|LOOP|PING_PONG|REVERSE|DATA|ROTATION|TRANSLATION)|ERR_(GENERIC|PARCEL_PERMISSIONS|MALFORMED_PARAMS|RUNTIME_PERMISSIONS|THROTTLED)|C\ HARACTER_(CMD_((SMOOTH_)?STOP|JUMP)|DESIRED_(TURN_)?SPEED|RADIUS|STAY_WITHIN_PARCEL|LENGTH|ORIENTATION|ACCOUNT_FOR_SKIPPED_FRAMES|AVOIDANCE_MODE|TYPE(_([ABCD]|NONE))?|MAX_(DECEL|TURN_RADIUS|(ACCEL|SPEED)))|PURSUIT_(OFFSET|FUZZ_FACTOR|GOAL_TOLERANCE|INTERCEPT)|REQUIRE_LINE_OF_SIGHT|FORCE_DIRECT_PATH|VERTICAL|HORIZONTAL|AVOID_(CHARACTERS|DYNAMIC_OBSTACLES|NONE)|PU_(EVADE_(HIDDEN|SPOTTED)|FAILURE_(DYNAMIC_PATHFINDING_DISABLED|INVALID_(GOAL|START)|NO_(NAVMESH|VALID_DESTINATION)|OTHER|TARGET_GONE|(PA\ RCEL_)?UNREACHABLE)|(GOAL|SLOWDOWN_DISTANCE)_REACHED)|TRAVERSAL_TYPE(_(FAST|NONE|SLOW))?|CONTENT_TYPE_(ATOM|FORM|HTML|JSON|LLSD|RSS|TEXT|XHTML|XML)|GCNP_(RADIUS|STATIC)|(PATROL|WANDER)_PAUSE_AT_WAYPOINTS|OPT_(AVATAR|CHARACTER|EXCLUSION_VOLUME|LEGACY_LINKSET|MATERIAL_VOLUME|OTHER|STATIC_OBSTACLE|WALKABLE)|SIM_STAT_PCT_CHARS_STEPPED)\\b"},{begin:"\\b(FALSE|TRUE)\\b"},{begin:"\\b(ZERO_ROTATION)\\b"},{begin:"\\b(EOF|JSON_(ARRAY|DELETE|FALSE|INVALID|NULL|NUMBER|OBJECT|STRING|TRUE)|NULL_KEY|TEXTURE_(BL\ ANK|DEFAULT|MEDIA|PLYWOOD|TRANSPARENT)|URL_REQUEST_(GRANTED|DENIED))\\b"},{begin:"\\b(ZERO_VECTOR|TOUCH_INVALID_(TEXCOORD|VECTOR))\\b"}]},LSL_FUNCTIONS={className:"built_in",begin:"\\b(ll(AgentInExperience|(Create|DataSize|Delete|KeyCount|Keys|Read|Update)KeyValue|GetExperience(Details|ErrorMessage)|ReturnObjectsBy(ID|Owner)|Json(2List|[GS]etValue|ValueType)|Sin|Cos|Tan|Atan2|Sqrt|Pow|Abs|Fabs|Frand|Floor|Ceil|Round|Vec(Mag|Norm|Dist)|Rot(Between|2(Euler|Fwd|Left|Up))|(Euler|Axes)2Rot|Whisper|(Re\ gion|Owner)?Say|Shout|Listen(Control|Remove)?|Sensor(Repeat|Remove)?|Detected(Name|Key|Owner|Type|Pos|Vel|Grab|Rot|Group|LinkNumber)|Die|Ground|Wind|([GS]et)(AnimationOverride|MemoryLimit|PrimMediaParams|ParcelMusicURL|Object(Desc|Name)|PhysicsMaterial|Status|Scale|Color|Alpha|Texture|Pos|Rot|Force|Torque)|ResetAnimationOverride|(Scale|Offset|Rotate)Texture|(Rot)?Target(Remove)?|(Stop)?MoveToTarget|Apply(Rotational)?Impulse|Set(KeyframedMotion|ContentType|RegionPos|(Angular)?Velocity|Buoyancy|Ho\ verHeight|ForceAndTorque|TimerEvent|ScriptState|Damage|TextureAnim|Sound(Queueing|Radius)|Vehicle(Type|(Float|Vector|Rotation)Param)|(Touch|Sit)?Text|Camera(Eye|At)Offset|PrimitiveParams|ClickAction|Link(Alpha|Color|PrimitiveParams(Fast)?|Texture(Anim)?|Camera|Media)|RemoteScriptAccessPin|PayPrice|LocalRot)|ScaleByFactor|Get((Max|Min)ScaleFactor|ClosestNavPoint|StaticPath|SimStats|Env|PrimitiveParams|Link(PrimitiveParams|Number(OfSides)?|Key|Name|Media)|HTTPHeader|FreeURLs|Object(Details|PermMas\ k|PrimCount)|Parcel(MaxPrims|Details|Prim(Count|Owners))|Attached(List)?|(SPMax|Free|Used)Memory|Region(Name|TimeDilation|FPS|Corner|AgentCount)|Root(Position|Rotation)|UnixTime|(Parcel|Region)Flags|(Wall|GMT)clock|SimulatorHostname|BoundingBox|GeometricCenter|Creator|NumberOf(Prims|NotecardLines|Sides)|Animation(List)?|(Camera|Local)(Pos|Rot)|Vel|Accel|Omega|Time(stamp|OfDay)|(Object|CenterOf)?Mass|MassMKS|Energy|Owner|(Owner)?Key|SunDirection|Texture(Offset|Scale|Rot)|Inventory(Number|Name|Key\ |Type|Creator|PermMask)|Permissions(Key)?|StartParameter|List(Length|EntryType)|Date|Agent(Size|Info|Language|List)|LandOwnerAt|NotecardLine|Script(Name|State))|(Get|Reset|GetAndReset)Time|PlaySound(Slave)?|LoopSound(Master|Slave)?|(Trigger|Stop|Preload)Sound|((Get|Delete)Sub|Insert)String|To(Upper|Lower)|Give(InventoryList|Money)|RezObject|(Stop)?LookAt|Sleep|CollisionFilter|(Take|Release)Controls|DetachFromAvatar|AttachToAvatar(Temp)?|InstantMessage|(GetNext)?Email|StopHover|MinEventDelay|RotL\ ookAt|String(Length|Trim)|(Start|Stop)Animation|TargetOmega|Request(Experience)?Permissions|(Create|Break)Link|BreakAllLinks|(Give|Remove)Inventory|Water|PassTouches|Request(Agent|Inventory)Data|TeleportAgent(Home|GlobalCoords)?|ModifyLand|CollisionSound|ResetScript|MessageLinked|PushObject|PassCollisions|AxisAngle2Rot|Rot2(Axis|Angle)|A(cos|sin)|AngleBetween|AllowInventoryDrop|SubStringIndex|List2(CSV|Integer|Json|Float|String|Key|Vector|Rot|List(Strided)?)|DeleteSubList|List(Statistics|Sort|Ra\ ndomize|(Insert|Find|Replace)List)|EdgeOfWorld|AdjustSoundVolume|Key2Name|TriggerSoundLimited|EjectFromLand|(CSV|ParseString)2List|OverMyLand|SameGroup|UnSit|Ground(Slope|Normal|Contour)|GroundRepel|(Set|Remove)VehicleFlags|SitOnLink|(AvatarOn)?(Link)?SitTarget|Script(Danger|Profiler)|Dialog|VolumeDetect|ResetOtherScript|RemoteLoadScriptPin|(Open|Close)RemoteDataChannel|SendRemoteData|RemoteDataReply|(Integer|String)ToBase64|XorBase64|Log(10)?|Base64To(String|Integer)|ParseStringKeepNulls|RezAtR\ oot|RequestSimulatorData|ForceMouselook|(Load|Release|(E|Une)scape)URL|ParcelMedia(CommandList|Query)|ModPow|MapDestination|(RemoveFrom|AddTo|Reset)Land(Pass|Ban)List|(Set|Clear)CameraParams|HTTP(Request|Response)|TextBox|DetectedTouch(UV|Face|Pos|(N|Bin)ormal|ST)|(MD5|SHA1|DumpList2)String|Request(Secure)?URL|Clear(Prim|Link)Media|(Link)?ParticleSystem|(Get|Request)(Username|DisplayName)|RegionSayTo|CastRay|GenerateKey|TransferLindenDollars|ManageEstateAccess|(Create|Delete)Character|ExecCharac\ terCmd|Evade|FleeFrom|NavigateTo|PatrolPoints|Pursue|UpdateCharacter|WanderWithin))\\b"};return{name:"LSL (Linden Scripting Language)",illegal:":",contains:[LSL_STRINGS,{className:"comment",variants:[hljs.COMMENT("//","$"),hljs.COMMENT("/\\*","\\*/")],relevance:0},LSL_NUMBERS,{className:"section",variants:[{begin:"\\b(state|default)\\b"},{begin:"\\b(state_(entry|exit)|touch(_(start|end))?|(land_)?collision(_(start|end))?|timer|listen|(no_)?sensor|control|(not_)?at_(rot_)?target|money|email|experi\ ence_permissions(_denied)?|run_time_permissions|changed|attach|dataserver|moving_(start|end)|link_message|(on|object)_rez|remote_data|http_re(sponse|quest)|path_update|transaction_result)\\b"}]},LSL_FUNCTIONS,LSL_CONSTANTS,{className:"type",begin:"\\b(integer|float|string|key|vector|quaternion|rotation|list)\\b"}]}}const SYSTEM_SYMBOLS=["AASTriangle","AbelianGroup","Abort","AbortKernels","AbortProtect","AbortScheduledTask","Above","Abs","AbsArg","AbsArgPlot","Absolute","AbsoluteCorrelation","Abs\ oluteCorrelationFunction","AbsoluteCurrentValue","AbsoluteDashing","AbsoluteFileName","AbsoluteOptions","AbsolutePointSize","AbsoluteThickness","AbsoluteTime","AbsoluteTiming","AcceptanceThreshold","AccountingForm","Accumulate","Accuracy","AccuracyGoal","AcousticAbsorbingValue","AcousticImpedanceValue","AcousticNormalVelocityValue","AcousticPDEComponent","AcousticPressureCondition","AcousticRadiationValue","AcousticSoundHardValue","AcousticSoundSoftCondition","ActionDelay","ActionMenu","ActionMe\ nuBox","ActionMenuBoxOptions","Activate","Active","ActiveClassification","ActiveClassificationObject","ActiveItem","ActivePrediction","ActivePredictionObject","ActiveStyle","AcyclicGraphQ","AddOnHelpPath","AddSides","AddTo","AddToSearchIndex","AddUsers","AdjacencyGraph","AdjacencyList","AdjacencyMatrix","AdjacentMeshCells","Adjugate","AdjustmentBox","AdjustmentBoxOptions","AdjustTimeSeriesForecast","AdministrativeDivisionData","AffineHalfSpace","AffineSpace","AffineStateSpaceModel","AffineTransf\ orm","After","AggregatedEntityClass","AggregationLayer","AircraftData","AirportData","AirPressureData","AirSoundAttenuation","AirTemperatureData","AiryAi","AiryAiPrime","AiryAiZero","AiryBi","AiryBiPrime","AiryBiZero","AlgebraicIntegerQ","AlgebraicNumber","AlgebraicNumberDenominator","AlgebraicNumberNorm","AlgebraicNumberPolynomial","AlgebraicNumberTrace","AlgebraicRules","AlgebraicRulesData","Algebraics","AlgebraicUnitQ","Alignment","AlignmentMarker","AlignmentPoint","All","AllowAdultContent","\ AllowChatServices","AllowedCloudExtraParameters","AllowedCloudParameterExtensions","AllowedDimensions","AllowedFrequencyRange","AllowedHeads","AllowGroupClose","AllowIncomplete","AllowInlineCells","AllowKernelInitialization","AllowLooseGrammar","AllowReverseGroupClose","AllowScriptLevelChange","AllowVersionUpdate","AllTrue","Alphabet","AlphabeticOrder","AlphabeticSort","AlphaChannel","AlternateImage","AlternatingFactorial","AlternatingGroup","AlternativeHypothesis","Alternatives","AltitudeMethod", "AmbientLight","AmbiguityFunction","AmbiguityList","Analytic","AnatomyData","AnatomyForm","AnatomyPlot3D","AnatomySkinStyle","AnatomyStyling","AnchoredSearch","And","AndersonDarlingTest","AngerJ","AngleBisector","AngleBracket","AnglePath","AnglePath3D","AngleVector","AngularGauge","Animate","AnimatedImage","AnimationCycleOffset","AnimationCycleRepetitions","AnimationDirection","AnimationDisplayTime","AnimationRate","AnimationRepetitions","AnimationRunning","AnimationRunTime","AnimationTimeIndex", "AnimationVideo","Animator","AnimatorBox","AnimatorBoxOptions","AnimatorElements","Annotate","Annotation","AnnotationDelete","AnnotationKeys","AnnotationRules","AnnotationValue","Annuity","AnnuityDue","Annulus","AnomalyDetection","AnomalyDetector","AnomalyDetectorFunction","Anonymous","Antialiasing","Antihermitian","AntihermitianMatrixQ","Antisymmetric","AntisymmetricMatrixQ","Antonyms","AnyOrder","AnySubset","AnyTrue","Apart","ApartSquareFree","APIFunction","Appearance","AppearanceElements","Ap\ pearanceRules","AppellF1","Append","AppendCheck","AppendLayer","AppendTo","Application","Apply","ApplyReaction","ApplySides","ApplyTo","ArcCos","ArcCosh","ArcCot","ArcCoth","ArcCsc","ArcCsch","ArcCurvature","ARCHProcess","ArcLength","ArcSec","ArcSech","ArcSin","ArcSinDistribution","ArcSinh","ArcTan","ArcTanh","Area","Arg","ArgMax","ArgMin","ArgumentCountQ","ArgumentsOptions","ARIMAProcess","ArithmeticGeometricMean","ARMAProcess","Around","AroundReplace","ARProcess","Array","ArrayComponents","Arr\ ayDepth","ArrayFilter","ArrayFlatten","ArrayMesh","ArrayPad","ArrayPlot","ArrayPlot3D","ArrayQ","ArrayReduce","ArrayResample","ArrayReshape","ArrayRules","Arrays","Arrow","Arrow3DBox","ArrowBox","Arrowheads","ASATriangle","Ask","AskAppend","AskConfirm","AskDisplay","AskedQ","AskedValue","AskFunction","AskState","AskTemplateDisplay","AspectRatio","AspectRatioFixed","Assert","AssessmentFunction","AssessmentResultObject","AssociateTo","Association","AssociationFormat","AssociationMap","AssociationQ", "AssociationThread","AssumeDeterministic","Assuming","Assumptions","AstroAngularSeparation","AstroBackground","AstroCenter","AstroDistance","AstroGraphics","AstroGridLines","AstroGridLinesStyle","AstronomicalData","AstroPosition","AstroProjection","AstroRange","AstroRangePadding","AstroReferenceFrame","AstroStyling","AstroZoomLevel","Asymptotic","AsymptoticDSolveValue","AsymptoticEqual","AsymptoticEquivalent","AsymptoticExpectation","AsymptoticGreater","AsymptoticGreaterEqual","AsymptoticIntegra\ te","AsymptoticLess","AsymptoticLessEqual","AsymptoticOutputTracker","AsymptoticProbability","AsymptoticProduct","AsymptoticRSolveValue","AsymptoticSolve","AsymptoticSum","Asynchronous","AsynchronousTaskObject","AsynchronousTasks","Atom","AtomCoordinates","AtomCount","AtomDiagramCoordinates","AtomLabels","AtomLabelStyle","AtomList","AtomQ","AttachCell","AttachedCell","AttentionLayer","Attributes","Audio","AudioAmplify","AudioAnnotate","AudioAnnotationLookup","AudioBlockMap","AudioCapture","Audio\ ChannelAssignment","AudioChannelCombine","AudioChannelMix","AudioChannels","AudioChannelSeparate","AudioData","AudioDelay","AudioDelete","AudioDevice","AudioDistance","AudioEncoding","AudioFade","AudioFrequencyShift","AudioGenerator","AudioIdentify","AudioInputDevice","AudioInsert","AudioInstanceQ","AudioIntervals","AudioJoin","AudioLabel","AudioLength","AudioLocalMeasurements","AudioLooping","AudioLoudness","AudioMeasurements","AudioNormalize","AudioOutputDevice","AudioOverlay","AudioPad","Audi\ oPan","AudioPartition","AudioPause","AudioPitchShift","AudioPlay","AudioPlot","AudioQ","AudioRecord","AudioReplace","AudioResample","AudioReverb","AudioReverse","AudioSampleRate","AudioSpectralMap","AudioSpectralTransformation","AudioSplit","AudioStop","AudioStream","AudioStreams","AudioTimeStretch","AudioTrackApply","AudioTrackSelection","AudioTrim","AudioType","AugmentedPolyhedron","AugmentedSymmetricPolynomial","Authenticate","Authentication","AuthenticationDialog","AutoAction","Autocomplete", "AutocompletionFunction","AutoCopy","AutocorrelationTest","AutoDelete","AutoEvaluateEvents","AutoGeneratedPackage","AutoIndent","AutoIndentSpacings","AutoItalicWords","AutoloadPath","AutoMatch","Automatic","AutomaticImageSize","AutoMultiplicationSymbol","AutoNumberFormatting","AutoOpenNotebooks","AutoOpenPalettes","AutoOperatorRenderings","AutoQuoteCharacters","AutoRefreshed","AutoRemove","AutorunSequencing","AutoScaling","AutoScroll","AutoSpacing","AutoStyleOptions","AutoStyleWords","AutoSubmit\ ting","Axes","AxesEdge","AxesLabel","AxesOrigin","AxesStyle","AxiomaticTheory","Axis","Axis3DBox","Axis3DBoxOptions","AxisBox","AxisBoxOptions","AxisLabel","AxisObject","AxisStyle","BabyMonsterGroupB","Back","BackFaceColor","BackFaceGlowColor","BackFaceOpacity","BackFaceSpecularColor","BackFaceSpecularExponent","BackFaceSurfaceAppearance","BackFaceTexture","Background","BackgroundAppearance","BackgroundTasksSettings","Backslash","Backsubstitution","Backward","Ball","Band","BandpassFilter","Bands\ topFilter","BarabasiAlbertGraphDistribution","BarChart","BarChart3D","BarcodeImage","BarcodeRecognize","BaringhausHenzeTest","BarLegend","BarlowProschanImportance","BarnesG","BarOrigin","BarSpacing","BartlettHannWindow","BartlettWindow","BaseDecode","BaseEncode","BaseForm","Baseline","BaselinePosition","BaseStyle","BasicRecurrentLayer","BatchNormalizationLayer","BatchSize","BatesDistribution","BattleLemarieWavelet","BayesianMaximization","BayesianMaximizationObject","BayesianMinimization","Bayes\ ianMinimizationObject","Because","BeckmannDistribution","Beep","Before","Begin","BeginDialogPacket","BeginPackage","BellB","BellY","Below","BenfordDistribution","BeniniDistribution","BenktanderGibratDistribution","BenktanderWeibullDistribution","BernoulliB","BernoulliDistribution","BernoulliGraphDistribution","BernoulliProcess","BernsteinBasis","BesagL","BesselFilterModel","BesselI","BesselJ","BesselJZero","BesselK","BesselY","BesselYZero","Beta","BetaBinomialDistribution","BetaDistribution","Be\ taNegativeBinomialDistribution","BetaPrimeDistribution","BetaRegularized","Between","BetweennessCentrality","Beveled","BeveledPolyhedron","BezierCurve","BezierCurve3DBox","BezierCurve3DBoxOptions","BezierCurveBox","BezierCurveBoxOptions","BezierFunction","BilateralFilter","BilateralLaplaceTransform","BilateralZTransform","Binarize","BinaryDeserialize","BinaryDistance","BinaryFormat","BinaryImageQ","BinaryRead","BinaryReadList","BinarySerialize","BinaryWrite","BinCounts","BinLists","BinnedVariogr\ amList","Binomial","BinomialDistribution","BinomialPointProcess","BinomialProcess","BinormalDistribution","BiorthogonalSplineWavelet","BioSequence","BioSequenceBackTranslateList","BioSequenceComplement","BioSequenceInstances","BioSequenceModify","BioSequencePlot","BioSequenceQ","BioSequenceReverseComplement","BioSequenceTranscribe","BioSequenceTranslate","BipartiteGraphQ","BiquadraticFilterModel","BirnbaumImportance","BirnbaumSaundersDistribution","BitAnd","BitClear","BitGet","BitLength","BitNot", "BitOr","BitRate","BitSet","BitShiftLeft","BitShiftRight","BitXor","BiweightLocation","BiweightMidvariance","Black","BlackmanHarrisWindow","BlackmanNuttallWindow","BlackmanWindow","Blank","BlankForm","BlankNullSequence","BlankSequence","Blend","Block","BlockchainAddressData","BlockchainBase","BlockchainBlockData","BlockchainContractValue","BlockchainData","BlockchainGet","BlockchainKeyEncode","BlockchainPut","BlockchainTokenData","BlockchainTransaction","BlockchainTransactionData","BlockchainTra\ nsactionSign","BlockchainTransactionSubmit","BlockDiagonalMatrix","BlockLowerTriangularMatrix","BlockMap","BlockRandom","BlockUpperTriangularMatrix","BlomqvistBeta","BlomqvistBetaTest","Blue","Blur","Blurring","BodePlot","BohmanWindow","Bold","Bond","BondCount","BondLabels","BondLabelStyle","BondList","BondQ","Bookmarks","Boole","BooleanConsecutiveFunction","BooleanConvert","BooleanCountingFunction","BooleanFunction","BooleanGraph","BooleanMaxterms","BooleanMinimize","BooleanMinterms","BooleanQ", "BooleanRegion","Booleans","BooleanStrings","BooleanTable","BooleanVariables","BorderDimensions","BorelTannerDistribution","Bottom","BottomHatTransform","BoundaryDiscretizeGraphics","BoundaryDiscretizeRegion","BoundaryMesh","BoundaryMeshRegion","BoundaryMeshRegionQ","BoundaryStyle","BoundedRegionQ","BoundingRegion","Bounds","Box","BoxBaselineShift","BoxData","BoxDimensions","Boxed","Boxes","BoxForm","BoxFormFormatTypes","BoxFrame","BoxID","BoxMargins","BoxMatrix","BoxObject","BoxRatios","BoxRota\ tion","BoxRotationPoint","BoxStyle","BoxWhiskerChart","Bra","BracketingBar","BraKet","BrayCurtisDistance","BreadthFirstScan","Break","BridgeData","BrightnessEqualize","BroadcastStationData","Brown","BrownForsytheTest","BrownianBridgeProcess","BrowserCategory","BSplineBasis","BSplineCurve","BSplineCurve3DBox","BSplineCurve3DBoxOptions","BSplineCurveBox","BSplineCurveBoxOptions","BSplineFunction","BSplineSurface","BSplineSurface3DBox","BSplineSurface3DBoxOptions","BubbleChart","BubbleChart3D","Bub\ bleScale","BubbleSizes","BuckyballGraph","BuildCompiledComponent","BuildingData","BulletGauge","BusinessDayQ","ButterflyGraph","ButterworthFilterModel","Button","ButtonBar","ButtonBox","ButtonBoxOptions","ButtonCell","ButtonContents","ButtonData","ButtonEvaluator","ButtonExpandable","ButtonFrame","ButtonFunction","ButtonMargins","ButtonMinHeight","ButtonNote","ButtonNotebook","ButtonSource","ButtonStyle","ButtonStyleMenuListing","Byte","ByteArray","ByteArrayFormat","ByteArrayFormatQ","ByteArrayQ", "ByteArrayToString","ByteCount","ByteOrdering","C","CachedValue","CacheGraphics","CachePersistence","CalendarConvert","CalendarData","CalendarType","Callout","CalloutMarker","CalloutStyle","CallPacket","CanberraDistance","Cancel","CancelButton","CandlestickChart","CanonicalGraph","CanonicalizePolygon","CanonicalizePolyhedron","CanonicalizeRegion","CanonicalName","CanonicalWarpingCorrespondence","CanonicalWarpingDistance","CantorMesh","CantorStaircase","Canvas","Cap","CapForm","CapitalDifferentia\ lD","Capitalize","CapsuleShape","CaptureRunning","CaputoD","CardinalBSplineBasis","CarlemanLinearize","CarlsonRC","CarlsonRD","CarlsonRE","CarlsonRF","CarlsonRG","CarlsonRJ","CarlsonRK","CarlsonRM","CarmichaelLambda","CaseOrdering","Cases","CaseSensitive","Cashflow","Casoratian","Cast","Catalan","CatalanNumber","Catch","CategoricalDistribution","Catenate","CatenateLayer","CauchyDistribution","CauchyMatrix","CauchyPointProcess","CauchyWindow","CayleyGraph","CDF","CDFDeploy","CDFInformation","CDFW\ avelet","Ceiling","CelestialSystem","Cell","CellAutoOverwrite","CellBaseline","CellBoundingBox","CellBracketOptions","CellChangeTimes","CellContents","CellContext","CellDingbat","CellDingbatMargin","CellDynamicExpression","CellEditDuplicate","CellElementsBoundingBox","CellElementSpacings","CellEpilog","CellEvaluationDuplicate","CellEvaluationFunction","CellEvaluationLanguage","CellEventActions","CellFrame","CellFrameColor","CellFrameLabelMargins","CellFrameLabels","CellFrameMargins","CellFrameSt\ yle","CellGroup","CellGroupData","CellGrouping","CellGroupingRules","CellHorizontalScrolling","CellID","CellInsertionPointCell","CellLabel","CellLabelAutoDelete","CellLabelMargins","CellLabelPositioning","CellLabelStyle","CellLabelTemplate","CellMargins","CellObject","CellOpen","CellPrint","CellProlog","Cells","CellSize","CellStyle","CellTags","CellTrayPosition","CellTrayWidgets","CellularAutomaton","CensoredDistribution","Censoring","Center","CenterArray","CenterDot","CenteredInterval","Central\ Feature","CentralMoment","CentralMomentGeneratingFunction","Cepstrogram","CepstrogramArray","CepstrumArray","CForm","ChampernowneNumber","ChangeOptions","ChannelBase","ChannelBrokerAction","ChannelDatabin","ChannelHistoryLength","ChannelListen","ChannelListener","ChannelListeners","ChannelListenerWait","ChannelObject","ChannelPreSendFunction","ChannelReceiverFunction","ChannelSend","ChannelSubscribers","ChanVeseBinarize","Character","CharacterCounts","CharacterEncoding","CharacterEncodingsPath", "CharacteristicFunction","CharacteristicPolynomial","CharacterName","CharacterNormalize","CharacterRange","Characters","ChartBaseStyle","ChartElementData","ChartElementDataFunction","ChartElementFunction","ChartElements","ChartLabels","ChartLayout","ChartLegends","ChartStyle","Chebyshev1FilterModel","Chebyshev2FilterModel","ChebyshevDistance","ChebyshevT","ChebyshevU","Check","CheckAbort","CheckAll","CheckArguments","Checkbox","CheckboxBar","CheckboxBox","CheckboxBoxOptions","ChemicalConvert","C\ hemicalData","ChemicalFormula","ChemicalInstance","ChemicalReaction","ChessboardDistance","ChiDistribution","ChineseRemainder","ChiSquareDistribution","ChoiceButtons","ChoiceDialog","CholeskyDecomposition","Chop","ChromaticityPlot","ChromaticityPlot3D","ChromaticPolynomial","Circle","CircleBox","CircleDot","CircleMinus","CirclePlus","CirclePoints","CircleThrough","CircleTimes","CirculantGraph","CircularArcThrough","CircularOrthogonalMatrixDistribution","CircularQuaternionMatrixDistribution","Cir\ cularRealMatrixDistribution","CircularSymplecticMatrixDistribution","CircularUnitaryMatrixDistribution","Circumsphere","CityData","ClassifierFunction","ClassifierInformation","ClassifierMeasurements","ClassifierMeasurementsObject","Classify","ClassPriors","Clear","ClearAll","ClearAttributes","ClearCookies","ClearPermissions","ClearSystemCache","ClebschGordan","ClickPane","ClickToCopy","ClickToCopyEnabled","Clip","ClipboardNotebook","ClipFill","ClippingStyle","ClipPlanes","ClipPlanesStyle","ClipR\ ange","Clock","ClockGauge","ClockwiseContourIntegral","Close","Closed","CloseKernels","ClosenessCentrality","Closing","ClosingAutoSave","ClosingEvent","CloudAccountData","CloudBase","CloudConnect","CloudConnections","CloudDeploy","CloudDirectory","CloudDisconnect","CloudEvaluate","CloudExport","CloudExpression","CloudExpressions","CloudFunction","CloudGet","CloudImport","CloudLoggingData","CloudObject","CloudObjectInformation","CloudObjectInformationData","CloudObjectNameFormat","CloudObjects","\ CloudObjectURLType","CloudPublish","CloudPut","CloudRenderingMethod","CloudSave","CloudShare","CloudSubmit","CloudSymbol","CloudUnshare","CloudUserID","ClusterClassify","ClusterDissimilarityFunction","ClusteringComponents","ClusteringMeasurements","ClusteringTree","CMYKColor","Coarse","CodeAssistOptions","Coefficient","CoefficientArrays","CoefficientDomain","CoefficientList","CoefficientRules","CoifletWavelet","Collect","CollinearPoints","Colon","ColonForm","ColorBalance","ColorCombine","ColorCo\ nvert","ColorCoverage","ColorData","ColorDataFunction","ColorDetect","ColorDistance","ColorFunction","ColorFunctionBinning","ColorFunctionScaling","Colorize","ColorNegate","ColorOutput","ColorProfileData","ColorQ","ColorQuantize","ColorReplace","ColorRules","ColorSelectorSettings","ColorSeparate","ColorSetter","ColorSetterBox","ColorSetterBoxOptions","ColorSlider","ColorsNear","ColorSpace","ColorToneMapping","Column","ColumnAlignments","ColumnBackgrounds","ColumnForm","ColumnLines","ColumnsEqual", "ColumnSpacings","ColumnWidths","CombinatorB","CombinatorC","CombinatorI","CombinatorK","CombinatorS","CombinatorW","CombinatorY","CombinedEntityClass","CombinerFunction","CometData","CommonDefaultFormatTypes","Commonest","CommonestFilter","CommonName","CommonUnits","CommunityBoundaryStyle","CommunityGraphPlot","CommunityLabels","CommunityRegionStyle","CompanyData","CompatibleUnitQ","CompilationOptions","CompilationTarget","Compile","Compiled","CompiledCodeFunction","CompiledComponent","Compiled\ ExpressionDeclaration","CompiledFunction","CompiledLayer","CompilerCallback","CompilerEnvironment","CompilerEnvironmentAppend","CompilerEnvironmentAppendTo","CompilerEnvironmentObject","CompilerOptions","Complement","ComplementedEntityClass","CompleteGraph","CompleteGraphQ","CompleteIntegral","CompleteKaryTree","CompletionsListPacket","Complex","ComplexArrayPlot","ComplexContourPlot","Complexes","ComplexExpand","ComplexInfinity","ComplexityFunction","ComplexListPlot","ComplexPlot","ComplexPlot3D", "ComplexRegionPlot","ComplexStreamPlot","ComplexVectorPlot","ComponentMeasurements","ComponentwiseContextMenu","Compose","ComposeList","ComposeSeries","CompositeQ","Composition","CompoundElement","CompoundExpression","CompoundPoissonDistribution","CompoundPoissonProcess","CompoundRenewalProcess","Compress","CompressedData","CompressionLevel","ComputeUncertainty","ConcaveHullMesh","Condition","ConditionalExpression","Conditioned","Cone","ConeBox","ConfidenceLevel","ConfidenceRange","ConfidenceTra\ nsform","ConfigurationPath","Confirm","ConfirmAssert","ConfirmBy","ConfirmMatch","ConfirmQuiet","ConformationMethod","ConformAudio","ConformImages","Congruent","ConicGradientFilling","ConicHullRegion","ConicHullRegion3DBox","ConicHullRegion3DBoxOptions","ConicHullRegionBox","ConicHullRegionBoxOptions","ConicOptimization","Conjugate","ConjugateTranspose","Conjunction","Connect","ConnectedComponents","ConnectedGraphComponents","ConnectedGraphQ","ConnectedMeshComponents","ConnectedMoleculeComponent\ s","ConnectedMoleculeQ","ConnectionSettings","ConnectLibraryCallbackFunction","ConnectSystemModelComponents","ConnectSystemModelController","ConnesWindow","ConoverTest","ConservativeConvectionPDETerm","ConsoleMessage","Constant","ConstantArray","ConstantArrayLayer","ConstantImage","ConstantPlusLayer","ConstantRegionQ","Constants","ConstantTimesLayer","ConstellationData","ConstrainedMax","ConstrainedMin","Construct","Containing","ContainsAll","ContainsAny","ContainsExactly","ContainsNone","Contai\ nsOnly","ContentDetectorFunction","ContentFieldOptions","ContentLocationFunction","ContentObject","ContentPadding","ContentsBoundingBox","ContentSelectable","ContentSize","Context","ContextMenu","Contexts","ContextToFileName","Continuation","Continue","ContinuedFraction","ContinuedFractionK","ContinuousAction","ContinuousMarkovProcess","ContinuousTask","ContinuousTimeModelQ","ContinuousWaveletData","ContinuousWaveletTransform","ContourDetect","ContourGraphics","ContourIntegral","ContourLabels","\ ContourLines","ContourPlot","ContourPlot3D","Contours","ContourShading","ContourSmoothing","ContourStyle","ContraharmonicMean","ContrastiveLossLayer","Control","ControlActive","ControlAlignment","ControlGroupContentsBox","ControllabilityGramian","ControllabilityMatrix","ControllableDecomposition","ControllableModelQ","ControllerDuration","ControllerInformation","ControllerInformationData","ControllerLinking","ControllerManipulate","ControllerMethod","ControllerPath","ControllerState","ControlPla\ cement","ControlsRendering","ControlType","ConvectionPDETerm","Convergents","ConversionOptions","ConversionRules","ConvertToPostScript","ConvertToPostScriptPacket","ConvexHullMesh","ConvexHullRegion","ConvexOptimization","ConvexPolygonQ","ConvexPolyhedronQ","ConvexRegionQ","ConvolutionLayer","Convolve","ConwayGroupCo1","ConwayGroupCo2","ConwayGroupCo3","CookieFunction","Cookies","CoordinateBoundingBox","CoordinateBoundingBoxArray","CoordinateBounds","CoordinateBoundsArray","CoordinateChartData", "CoordinatesToolOptions","CoordinateTransform","CoordinateTransformData","CoplanarPoints","CoprimeQ","Coproduct","CopulaDistribution","Copyable","CopyDatabin","CopyDirectory","CopyFile","CopyFunction","CopyTag","CopyToClipboard","CoreNilpotentDecomposition","CornerFilter","CornerNeighbors","Correlation","CorrelationDistance","CorrelationFunction","CorrelationTest","Cos","Cosh","CoshIntegral","CosineDistance","CosineWindow","CosIntegral","Cot","Coth","CoulombF","CoulombG","CoulombH1","CoulombH2", "Count","CountDistinct","CountDistinctBy","CounterAssignments","CounterBox","CounterBoxOptions","CounterClockwiseContourIntegral","CounterEvaluator","CounterFunction","CounterIncrements","CounterStyle","CounterStyleMenuListing","CountRoots","CountryData","Counts","CountsBy","Covariance","CovarianceEstimatorFunction","CovarianceFunction","CoxianDistribution","CoxIngersollRossProcess","CoxModel","CoxModelFit","CramerVonMisesTest","CreateArchive","CreateCellID","CreateChannel","CreateCloudExpressio\ n","CreateCompilerEnvironment","CreateDatabin","CreateDataStructure","CreateDataSystemModel","CreateDialog","CreateDirectory","CreateDocument","CreateFile","CreateIntermediateDirectories","CreateLicenseEntitlement","CreateManagedLibraryExpression","CreateNotebook","CreatePacletArchive","CreatePalette","CreatePermissionsGroup","CreateScheduledTask","CreateSearchIndex","CreateSystemModel","CreateTemporary","CreateTypeInstance","CreateUUID","CreateWindow","CriterionFunction","CriticalityFailureImpo\ rtance","CriticalitySuccessImportance","CriticalSection","Cross","CrossEntropyLossLayer","CrossingCount","CrossingDetect","CrossingPolygon","CrossMatrix","Csc","Csch","CSGRegion","CSGRegionQ","CSGRegionTree","CTCLossLayer","Cube","CubeRoot","Cubics","Cuboid","CuboidBox","CuboidBoxOptions","Cumulant","CumulantGeneratingFunction","CumulativeFeatureImpactPlot","Cup","CupCap","Curl","CurlyDoubleQuote","CurlyQuote","CurrencyConvert","CurrentDate","CurrentImage","CurrentNotebookImage","CurrentScreenIm\ age","CurrentValue","Curry","CurryApplied","CurvatureFlowFilter","CurveClosed","Cyan","CycleGraph","CycleIndexPolynomial","Cycles","CyclicGroup","Cyclotomic","Cylinder","CylinderBox","CylinderBoxOptions","CylindricalDecomposition","CylindricalDecompositionFunction","D","DagumDistribution","DamData","DamerauLevenshteinDistance","DampingFactor","Darker","Dashed","Dashing","DatabaseConnect","DatabaseDisconnect","DatabaseReference","Databin","DatabinAdd","DatabinRemove","Databins","DatabinSubmit","D\ atabinUpload","DataCompression","DataDistribution","DataRange","DataReversed","Dataset","DatasetDisplayPanel","DatasetTheme","DataStructure","DataStructureQ","Date","DateBounds","Dated","DateDelimiters","DateDifference","DatedUnit","DateFormat","DateFunction","DateGranularity","DateHistogram","DateInterval","DateList","DateListLogPlot","DateListPlot","DateListStepPlot","DateObject","DateObjectQ","DateOverlapsQ","DatePattern","DatePlus","DateRange","DateReduction","DateScale","DateSelect","DateSt\ ring","DateTicksFormat","DateValue","DateWithinQ","DaubechiesWavelet","DavisDistribution","DawsonF","DayCount","DayCountConvention","DayHemisphere","DaylightQ","DayMatchQ","DayName","DayNightTerminator","DayPlus","DayRange","DayRound","DeBruijnGraph","DeBruijnSequence","Debug","DebugTag","Decapitalize","Decimal","DecimalForm","DeclareCompiledComponent","DeclareKnownSymbols","DeclarePackage","Decompose","DeconvolutionLayer","Decrement","Decrypt","DecryptFile","DedekindEta","DeepSpaceProbeData","D\ efault","Default2DTool","Default3DTool","DefaultAttachedCellStyle","DefaultAxesStyle","DefaultBaseStyle","DefaultBoxStyle","DefaultButton","DefaultColor","DefaultControlPlacement","DefaultDockedCellStyle","DefaultDuplicateCellStyle","DefaultDuration","DefaultElement","DefaultFaceGridsStyle","DefaultFieldHintStyle","DefaultFont","DefaultFontProperties","DefaultFormatType","DefaultFrameStyle","DefaultFrameTicksStyle","DefaultGridLinesStyle","DefaultInlineFormatType","DefaultInputFormatType","Defau\ ltLabelStyle","DefaultMenuStyle","DefaultNaturalLanguage","DefaultNewCellStyle","DefaultNewInlineCellStyle","DefaultNotebook","DefaultOptions","DefaultOutputFormatType","DefaultPrintPrecision","DefaultStyle","DefaultStyleDefinitions","DefaultTextFormatType","DefaultTextInlineFormatType","DefaultTicksStyle","DefaultTooltipStyle","DefaultValue","DefaultValues","Defer","DefineExternal","DefineInputStreamMethod","DefineOutputStreamMethod","DefineResourceFunction","Definition","Degree","DegreeCentral\ ity","DegreeGraphDistribution","DegreeLexicographic","DegreeReverseLexicographic","DEigensystem","DEigenvalues","Deinitialization","Del","DelaunayMesh","Delayed","Deletable","Delete","DeleteAdjacentDuplicates","DeleteAnomalies","DeleteBorderComponents","DeleteCases","DeleteChannel","DeleteCloudExpression","DeleteContents","DeleteDirectory","DeleteDuplicates","DeleteDuplicatesBy","DeleteElements","DeleteFile","DeleteMissing","DeleteObject","DeletePermissionsKey","DeleteSearchIndex","DeleteSmallCo\ mponents","DeleteStopwords","DeleteWithContents","DeletionWarning","DelimitedArray","DelimitedSequence","Delimiter","DelimiterAutoMatching","DelimiterFlashTime","DelimiterMatching","Delimiters","DeliveryFunction","Dendrogram","Denominator","DensityGraphics","DensityHistogram","DensityPlot","DensityPlot3D","DependentVariables","Deploy","Deployed","Depth","DepthFirstScan","Derivative","DerivativeFilter","DerivativePDETerm","DerivedKey","DescriptorStateSpace","DesignMatrix","DestroyAfterEvaluation", "Det","DeviceClose","DeviceConfigure","DeviceExecute","DeviceExecuteAsynchronous","DeviceObject","DeviceOpen","DeviceOpenQ","DeviceRead","DeviceReadBuffer","DeviceReadLatest","DeviceReadList","DeviceReadTimeSeries","Devices","DeviceStreams","DeviceWrite","DeviceWriteBuffer","DGaussianWavelet","DiacriticalPositioning","Diagonal","DiagonalizableMatrixQ","DiagonalMatrix","DiagonalMatrixQ","Dialog","DialogIndent","DialogInput","DialogLevel","DialogNotebook","DialogProlog","DialogReturn","DialogSymbo\ ls","Diamond","DiamondMatrix","DiceDissimilarity","DictionaryLookup","DictionaryWordQ","DifferenceDelta","DifferenceOrder","DifferenceQuotient","DifferenceRoot","DifferenceRootReduce","Differences","DifferentialD","DifferentialRoot","DifferentialRootReduce","DifferentiatorFilter","DiffusionPDETerm","DiggleGatesPointProcess","DiggleGrattonPointProcess","DigitalSignature","DigitBlock","DigitBlockMinimum","DigitCharacter","DigitCount","DigitQ","DihedralAngle","DihedralGroup","Dilation","Dimensional\ Combinations","DimensionalMeshComponents","DimensionReduce","DimensionReducerFunction","DimensionReduction","Dimensions","DiracComb","DiracDelta","DirectedEdge","DirectedEdges","DirectedGraph","DirectedGraphQ","DirectedInfinity","Direction","DirectionalLight","Directive","Directory","DirectoryName","DirectoryQ","DirectoryStack","DirichletBeta","DirichletCharacter","DirichletCondition","DirichletConvolve","DirichletDistribution","DirichletEta","DirichletL","DirichletLambda","DirichletTransform","\ DirichletWindow","DisableConsolePrintPacket","DisableFormatting","DiscreteAsymptotic","DiscreteChirpZTransform","DiscreteConvolve","DiscreteDelta","DiscreteHadamardTransform","DiscreteIndicator","DiscreteInputOutputModel","DiscreteLimit","DiscreteLQEstimatorGains","DiscreteLQRegulatorGains","DiscreteLyapunovSolve","DiscreteMarkovProcess","DiscreteMaxLimit","DiscreteMinLimit","DiscretePlot","DiscretePlot3D","DiscreteRatio","DiscreteRiccatiSolve","DiscreteShift","DiscreteTimeModelQ","DiscreteUnifo\ rmDistribution","DiscreteVariables","DiscreteWaveletData","DiscreteWaveletPacketTransform","DiscreteWaveletTransform","DiscretizeGraphics","DiscretizeRegion","Discriminant","DisjointQ","Disjunction","Disk","DiskBox","DiskBoxOptions","DiskMatrix","DiskSegment","Dispatch","DispatchQ","DispersionEstimatorFunction","Display","DisplayAllSteps","DisplayEndPacket","DisplayForm","DisplayFunction","DisplayPacket","DisplayRules","DisplayString","DisplayTemporary","DisplayWith","DisplayWithRef","DisplayWit\ hVariable","DistanceFunction","DistanceMatrix","DistanceTransform","Distribute","Distributed","DistributedContexts","DistributeDefinitions","DistributionChart","DistributionDomain","DistributionFitTest","DistributionParameterAssumptions","DistributionParameterQ","Dithering","Div","Divergence","Divide","DivideBy","Dividers","DivideSides","Divisible","Divisors","DivisorSigma","DivisorSum","DMSList","DMSString","Do","DockedCell","DockedCells","DocumentGenerator","DocumentGeneratorInformation","Docu\ mentGeneratorInformationData","DocumentGenerators","DocumentNotebook","DocumentWeightingRules","Dodecahedron","DomainRegistrationInformation","DominantColors","DominatorTreeGraph","DominatorVertexList","DOSTextFormat","Dot","DotDashed","DotEqual","DotLayer","DotPlusLayer","Dotted","DoubleBracketingBar","DoubleContourIntegral","DoubleDownArrow","DoubleLeftArrow","DoubleLeftRightArrow","DoubleLeftTee","DoubleLongLeftArrow","DoubleLongLeftRightArrow","DoubleLongRightArrow","DoubleRightArrow","Doubl\ eRightTee","DoubleUpArrow","DoubleUpDownArrow","DoubleVerticalBar","DoublyInfinite","Down","DownArrow","DownArrowBar","DownArrowUpArrow","DownLeftRightVector","DownLeftTeeVector","DownLeftVector","DownLeftVectorBar","DownRightTeeVector","DownRightVector","DownRightVectorBar","Downsample","DownTee","DownTeeArrow","DownValues","DownValuesFunction","DragAndDrop","DrawBackFaces","DrawEdges","DrawFrontFaces","DrawHighlighted","DrazinInverse","Drop","DropoutLayer","DropShadowing","DSolve","DSolveChang\ eVariables","DSolveValue","Dt","DualLinearProgramming","DualPlanarGraph","DualPolyhedron","DualSystemsModel","DumpGet","DumpSave","DuplicateFreeQ","Duration","Dynamic","DynamicBox","DynamicBoxOptions","DynamicEvaluationTimeout","DynamicGeoGraphics","DynamicImage","DynamicLocation","DynamicModule","DynamicModuleBox","DynamicModuleBoxOptions","DynamicModuleParent","DynamicModuleValues","DynamicName","DynamicNamespace","DynamicReference","DynamicSetting","DynamicUpdating","DynamicWrapper","DynamicW\ rapperBox","DynamicWrapperBoxOptions","E","EarthImpactData","EarthquakeData","EccentricityCentrality","Echo","EchoEvaluation","EchoFunction","EchoLabel","EchoTiming","EclipseType","EdgeAdd","EdgeBetweennessCentrality","EdgeCapacity","EdgeCapForm","EdgeChromaticNumber","EdgeColor","EdgeConnectivity","EdgeContract","EdgeCost","EdgeCount","EdgeCoverQ","EdgeCycleMatrix","EdgeDashing","EdgeDelete","EdgeDetect","EdgeForm","EdgeIndex","EdgeJoinForm","EdgeLabeling","EdgeLabels","EdgeLabelStyle","EdgeLis\ t","EdgeOpacity","EdgeQ","EdgeRenderingFunction","EdgeRules","EdgeShapeFunction","EdgeStyle","EdgeTaggedGraph","EdgeTaggedGraphQ","EdgeTags","EdgeThickness","EdgeTransitiveGraphQ","EdgeValueRange","EdgeValueSizes","EdgeWeight","EdgeWeightedGraphQ","Editable","EditButtonSettings","EditCellTagsSettings","EditDistance","EffectiveInterest","Eigensystem","Eigenvalues","EigenvectorCentrality","Eigenvectors","Element","ElementData","ElementwiseLayer","ElidedForms","Eliminate","EliminationOrder","Ellips\ oid","EllipticE","EllipticExp","EllipticExpPrime","EllipticF","EllipticFilterModel","EllipticK","EllipticLog","EllipticNomeQ","EllipticPi","EllipticReducedHalfPeriods","EllipticTheta","EllipticThetaPrime","EmbedCode","EmbeddedHTML","EmbeddedService","EmbeddedSQLEntityClass","EmbeddedSQLExpression","EmbeddingLayer","EmbeddingObject","EmitSound","EmphasizeSyntaxErrors","EmpiricalDistribution","Empty","EmptyGraphQ","EmptyRegion","EmptySpaceF","EnableConsolePrintPacket","Enabled","Enclose","Encode", "Encrypt","EncryptedObject","EncryptFile","End","EndAdd","EndDialogPacket","EndOfBuffer","EndOfFile","EndOfLine","EndOfString","EndPackage","EngineEnvironment","EngineeringForm","Enter","EnterExpressionPacket","EnterTextPacket","Entity","EntityClass","EntityClassList","EntityCopies","EntityFunction","EntityGroup","EntityInstance","EntityList","EntityPrefetch","EntityProperties","EntityProperty","EntityPropertyClass","EntityRegister","EntityStore","EntityStores","EntityTypeName","EntityUnregister", "EntityValue","Entropy","EntropyFilter","Environment","Epilog","EpilogFunction","Equal","EqualColumns","EqualRows","EqualTilde","EqualTo","EquatedTo","Equilibrium","EquirippleFilterKernel","Equivalent","Erf","Erfc","Erfi","ErlangB","ErlangC","ErlangDistribution","Erosion","ErrorBox","ErrorBoxOptions","ErrorNorm","ErrorPacket","ErrorsDialogSettings","EscapeRadius","EstimatedBackground","EstimatedDistribution","EstimatedPointNormals","EstimatedPointProcess","EstimatedProcess","EstimatedVariogramMo\ del","EstimatorGains","EstimatorRegulator","EuclideanDistance","EulerAngles","EulerCharacteristic","EulerE","EulerGamma","EulerianGraphQ","EulerMatrix","EulerPhi","Evaluatable","Evaluate","Evaluated","EvaluatePacket","EvaluateScheduledTask","EvaluationBox","EvaluationCell","EvaluationCompletionAction","EvaluationData","EvaluationElements","EvaluationEnvironment","EvaluationMode","EvaluationMonitor","EvaluationNotebook","EvaluationObject","EvaluationOrder","EvaluationPrivileges","EvaluationRateLi\ mit","Evaluator","EvaluatorNames","EvenQ","EventData","EventEvaluator","EventHandler","EventHandlerTag","EventLabels","EventSeries","ExactBlackmanWindow","ExactNumberQ","ExactRootIsolation","ExampleData","Except","ExcludedContexts","ExcludedForms","ExcludedLines","ExcludedPhysicalQuantities","ExcludePods","Exclusions","ExclusionsStyle","Exists","Exit","ExitDialog","ExoplanetData","Exp","Expand","ExpandAll","ExpandDenominator","ExpandFileName","ExpandNumerator","Expectation","ExpectationE","Expec\ tedValue","ExpGammaDistribution","ExpIntegralE","ExpIntegralEi","ExpirationDate","Exponent","ExponentFunction","ExponentialDistribution","ExponentialFamily","ExponentialGeneratingFunction","ExponentialMovingAverage","ExponentialPowerDistribution","ExponentPosition","ExponentStep","Export","ExportAutoReplacements","ExportByteArray","ExportForm","ExportPacket","ExportString","Expression","ExpressionCell","ExpressionGraph","ExpressionPacket","ExpressionTree","ExpressionUUID","ExpToTrig","ExtendedEn\ tityClass","ExtendedGCD","Extension","ExtentElementFunction","ExtentMarkers","ExtentSize","ExternalBundle","ExternalCall","ExternalDataCharacterEncoding","ExternalEvaluate","ExternalFunction","ExternalFunctionName","ExternalIdentifier","ExternalObject","ExternalOptions","ExternalSessionObject","ExternalSessions","ExternalStorageBase","ExternalStorageDownload","ExternalStorageGet","ExternalStorageObject","ExternalStoragePut","ExternalStorageUpload","ExternalTypeSignature","ExternalValue","Extract", "ExtractArchive","ExtractLayer","ExtractPacletArchive","ExtremeValueDistribution","FaceAlign","FaceForm","FaceGrids","FaceGridsStyle","FaceRecognize","FacialFeatures","Factor","FactorComplete","Factorial","Factorial2","FactorialMoment","FactorialMomentGeneratingFunction","FactorialPower","FactorInteger","FactorList","FactorSquareFree","FactorSquareFreeList","FactorTerms","FactorTermsList","Fail","Failure","FailureAction","FailureDistribution","FailureQ","False","FareySequence","FARIMAProcess","F\ eatureDistance","FeatureExtract","FeatureExtraction","FeatureExtractor","FeatureExtractorFunction","FeatureImpactPlot","FeatureNames","FeatureNearest","FeatureSpacePlot","FeatureSpacePlot3D","FeatureTypes","FeatureValueDependencyPlot","FeatureValueImpactPlot","FEDisableConsolePrintPacket","FeedbackLinearize","FeedbackSector","FeedbackSectorStyle","FeedbackType","FEEnableConsolePrintPacket","FetalGrowthData","Fibonacci","Fibonorial","FieldCompletionFunction","FieldHint","FieldHintStyle","FieldMas\ ked","FieldSize","File","FileBaseName","FileByteCount","FileConvert","FileDate","FileExistsQ","FileExtension","FileFormat","FileFormatProperties","FileFormatQ","FileHandler","FileHash","FileInformation","FileName","FileNameDepth","FileNameDialogSettings","FileNameDrop","FileNameForms","FileNameJoin","FileNames","FileNameSetter","FileNameSplit","FileNameTake","FileNameToFormatList","FilePrint","FileSize","FileSystemMap","FileSystemScan","FileSystemTree","FileTemplate","FileTemplateApply","FileTyp\ e","FilledCurve","FilledCurveBox","FilledCurveBoxOptions","FilledTorus","FillForm","Filling","FillingStyle","FillingTransform","FilteredEntityClass","FilterRules","FinancialBond","FinancialData","FinancialDerivative","FinancialIndicator","Find","FindAnomalies","FindArgMax","FindArgMin","FindChannels","FindClique","FindClusters","FindCookies","FindCurvePath","FindCycle","FindDevices","FindDistribution","FindDistributionParameters","FindDivisions","FindEdgeColoring","FindEdgeCover","FindEdgeCut","\ FindEdgeIndependentPaths","FindEquationalProof","FindEulerianCycle","FindExternalEvaluators","FindFaces","FindFile","FindFit","FindFormula","FindFundamentalCycles","FindGeneratingFunction","FindGeoLocation","FindGeometricConjectures","FindGeometricTransform","FindGraphCommunities","FindGraphIsomorphism","FindGraphPartition","FindHamiltonianCycle","FindHamiltonianPath","FindHiddenMarkovStates","FindImageText","FindIndependentEdgeSet","FindIndependentVertexSet","FindInstance","FindIntegerNullVecto\ r","FindIsomers","FindIsomorphicSubgraph","FindKClan","FindKClique","FindKClub","FindKPlex","FindLibrary","FindLinearRecurrence","FindList","FindMatchingColor","FindMaximum","FindMaximumCut","FindMaximumFlow","FindMaxValue","FindMeshDefects","FindMinimum","FindMinimumCostFlow","FindMinimumCut","FindMinValue","FindMoleculeSubstructure","FindPath","FindPeaks","FindPermutation","FindPlanarColoring","FindPointProcessParameters","FindPostmanTour","FindProcessParameters","FindRegionTransform","FindRep\ eat","FindRoot","FindSequenceFunction","FindSettings","FindShortestPath","FindShortestTour","FindSpanningTree","FindSubgraphIsomorphism","FindSystemModelEquilibrium","FindTextualAnswer","FindThreshold","FindTransientRepeat","FindVertexColoring","FindVertexCover","FindVertexCut","FindVertexIndependentPaths","Fine","FinishDynamic","FiniteAbelianGroupCount","FiniteGroupCount","FiniteGroupData","First","FirstCase","FirstPassageTimeDistribution","FirstPosition","FischerGroupFi22","FischerGroupFi23","\ FischerGroupFi24Prime","FisherHypergeometricDistribution","FisherRatioTest","FisherZDistribution","Fit","FitAll","FitRegularization","FittedModel","FixedOrder","FixedPoint","FixedPointList","FlashSelection","Flat","FlatShading","Flatten","FlattenAt","FlattenLayer","FlatTopWindow","FlightData","FlipView","Floor","FlowPolynomial","Fold","FoldList","FoldPair","FoldPairList","FoldWhile","FoldWhileList","FollowRedirects","Font","FontColor","FontFamily","FontForm","FontName","FontOpacity","FontPostScr\ iptName","FontProperties","FontReencoding","FontSize","FontSlant","FontSubstitutions","FontTracking","FontVariations","FontWeight","For","ForAll","ForAllType","ForceVersionInstall","Format","FormatRules","FormatType","FormatTypeAutoConvert","FormatValues","FormBox","FormBoxOptions","FormControl","FormFunction","FormLayoutFunction","FormObject","FormPage","FormProtectionMethod","FormTheme","FormulaData","FormulaLookup","FortranForm","Forward","ForwardBackward","ForwardCloudCredentials","Fourier", "FourierCoefficient","FourierCosCoefficient","FourierCosSeries","FourierCosTransform","FourierDCT","FourierDCTFilter","FourierDCTMatrix","FourierDST","FourierDSTMatrix","FourierMatrix","FourierParameters","FourierSequenceTransform","FourierSeries","FourierSinCoefficient","FourierSinSeries","FourierSinTransform","FourierTransform","FourierTrigSeries","FoxH","FoxHReduce","FractionalBrownianMotionProcess","FractionalD","FractionalGaussianNoiseProcess","FractionalPart","FractionBox","FractionBoxOpti\ ons","FractionLine","Frame","FrameBox","FrameBoxOptions","Framed","FrameInset","FrameLabel","Frameless","FrameListVideo","FrameMargins","FrameRate","FrameStyle","FrameTicks","FrameTicksStyle","FRatioDistribution","FrechetDistribution","FreeQ","FrenetSerretSystem","FrequencySamplingFilterKernel","FresnelC","FresnelF","FresnelG","FresnelS","Friday","FrobeniusNumber","FrobeniusSolve","FromAbsoluteTime","FromCharacterCode","FromCoefficientRules","FromContinuedFraction","FromDate","FromDateString","F\ romDigits","FromDMS","FromEntity","FromJulianDate","FromLetterNumber","FromPolarCoordinates","FromRawPointer","FromRomanNumeral","FromSphericalCoordinates","FromUnixTime","Front","FrontEndDynamicExpression","FrontEndEventActions","FrontEndExecute","FrontEndObject","FrontEndResource","FrontEndResourceString","FrontEndStackSize","FrontEndToken","FrontEndTokenExecute","FrontEndValueCache","FrontEndVersion","FrontFaceColor","FrontFaceGlowColor","FrontFaceOpacity","FrontFaceSpecularColor","FrontFaceS\ pecularExponent","FrontFaceSurfaceAppearance","FrontFaceTexture","Full","FullAxes","FullDefinition","FullForm","FullGraphics","FullInformationOutputRegulator","FullOptions","FullRegion","FullSimplify","Function","FunctionAnalytic","FunctionBijective","FunctionCompile","FunctionCompileExport","FunctionCompileExportByteArray","FunctionCompileExportLibrary","FunctionCompileExportString","FunctionContinuous","FunctionConvexity","FunctionDeclaration","FunctionDiscontinuities","FunctionDomain","Functi\ onExpand","FunctionInjective","FunctionInterpolation","FunctionLayer","FunctionMeromorphic","FunctionMonotonicity","FunctionPeriod","FunctionPoles","FunctionRange","FunctionSign","FunctionSingularities","FunctionSpace","FunctionSurjective","FussellVeselyImportance","GaborFilter","GaborMatrix","GaborWavelet","GainMargins","GainPhaseMargins","GalaxyData","GalleryView","Gamma","GammaDistribution","GammaRegularized","GapPenalty","GARCHProcess","GatedRecurrentLayer","Gather","GatherBy","GaugeFaceElem\ entFunction","GaugeFaceStyle","GaugeFrameElementFunction","GaugeFrameSize","GaugeFrameStyle","GaugeLabels","GaugeMarkers","GaugeStyle","GaussianFilter","GaussianIntegers","GaussianMatrix","GaussianOrthogonalMatrixDistribution","GaussianSymplecticMatrixDistribution","GaussianUnitaryMatrixDistribution","GaussianWindow","GCD","GegenbauerC","General","GeneralizedLinearModelFit","GenerateAsymmetricKeyPair","GenerateConditions","GeneratedAssetFormat","GeneratedAssetLocation","GeneratedCell","Generated\ CellStyles","GeneratedDocumentBinding","GenerateDerivedKey","GenerateDigitalSignature","GenerateDocument","GeneratedParameters","GeneratedQuantityMagnitudes","GenerateFileSignature","GenerateHTTPResponse","GenerateSecuredAuthenticationKey","GenerateSymmetricKey","GeneratingFunction","GeneratorDescription","GeneratorHistoryLength","GeneratorOutputType","Generic","GenericCylindricalDecomposition","GenomeData","GenomeLookup","GeoAntipode","GeoArea","GeoArraySize","GeoBackground","GeoBoundary","GeoB\ oundingBox","GeoBounds","GeoBoundsRegion","GeoBoundsRegionBoundary","GeoBubbleChart","GeoCenter","GeoCircle","GeoContourPlot","GeoDensityPlot","GeodesicClosing","GeodesicDilation","GeodesicErosion","GeodesicOpening","GeodesicPolyhedron","GeoDestination","GeodesyData","GeoDirection","GeoDisk","GeoDisplacement","GeoDistance","GeoDistanceList","GeoElevationData","GeoEntities","GeoGraphics","GeoGraphPlot","GeoGraphValuePlot","GeogravityModelData","GeoGridDirectionDifference","GeoGridLines","GeoGridL\ inesStyle","GeoGridPosition","GeoGridRange","GeoGridRangePadding","GeoGridUnitArea","GeoGridUnitDistance","GeoGridVector","GeoGroup","GeoHemisphere","GeoHemisphereBoundary","GeoHistogram","GeoIdentify","GeoImage","GeoLabels","GeoLength","GeoListPlot","GeoLocation","GeologicalPeriodData","GeomagneticModelData","GeoMarker","GeometricAssertion","GeometricBrownianMotionProcess","GeometricDistribution","GeometricMean","GeometricMeanFilter","GeometricOptimization","GeometricScene","GeometricStep","Geo\ metricStylingRules","GeometricTest","GeometricTransformation","GeometricTransformation3DBox","GeometricTransformation3DBoxOptions","GeometricTransformationBox","GeometricTransformationBoxOptions","GeoModel","GeoNearest","GeoOrientationData","GeoPath","GeoPolygon","GeoPosition","GeoPositionENU","GeoPositionXYZ","GeoProjection","GeoProjectionData","GeoRange","GeoRangePadding","GeoRegionValuePlot","GeoResolution","GeoScaleBar","GeoServer","GeoSmoothHistogram","GeoStreamPlot","GeoStyling","GeoStylin\ gImageFunction","GeoVariant","GeoVector","GeoVectorENU","GeoVectorPlot","GeoVectorXYZ","GeoVisibleRegion","GeoVisibleRegionBoundary","GeoWithinQ","GeoZoomLevel","GestureHandler","GestureHandlerTag","Get","GetContext","GetEnvironment","GetFileName","GetLinebreakInformationPacket","GibbsPointProcess","Glaisher","GlobalClusteringCoefficient","GlobalPreferences","GlobalSession","Glow","GoldenAngle","GoldenRatio","GompertzMakehamDistribution","GoochShading","GoodmanKruskalGamma","GoodmanKruskalGammaT\ est","Goto","GouraudShading","Grad","Gradient","GradientFilter","GradientFittedMesh","GradientOrientationFilter","GrammarApply","GrammarRules","GrammarToken","Graph","Graph3D","GraphAssortativity","GraphAutomorphismGroup","GraphCenter","GraphComplement","GraphData","GraphDensity","GraphDiameter","GraphDifference","GraphDisjointUnion","GraphDistance","GraphDistanceMatrix","GraphEmbedding","GraphHighlight","GraphHighlightStyle","GraphHub","Graphics","Graphics3D","Graphics3DBox","Graphics3DBoxOptio\ ns","GraphicsArray","GraphicsBaseline","GraphicsBox","GraphicsBoxOptions","GraphicsColor","GraphicsColumn","GraphicsComplex","GraphicsComplex3DBox","GraphicsComplex3DBoxOptions","GraphicsComplexBox","GraphicsComplexBoxOptions","GraphicsContents","GraphicsData","GraphicsGrid","GraphicsGridBox","GraphicsGroup","GraphicsGroup3DBox","GraphicsGroup3DBoxOptions","GraphicsGroupBox","GraphicsGroupBoxOptions","GraphicsGrouping","GraphicsHighlightColor","GraphicsRow","GraphicsSpacing","GraphicsStyle","Gra\ phIntersection","GraphJoin","GraphLayerLabels","GraphLayers","GraphLayerStyle","GraphLayout","GraphLinkEfficiency","GraphPeriphery","GraphPlot","GraphPlot3D","GraphPower","GraphProduct","GraphPropertyDistribution","GraphQ","GraphRadius","GraphReciprocity","GraphRoot","GraphStyle","GraphSum","GraphTree","GraphUnion","Gray","GrayLevel","Greater","GreaterEqual","GreaterEqualLess","GreaterEqualThan","GreaterFullEqual","GreaterGreater","GreaterLess","GreaterSlantEqual","GreaterThan","GreaterTilde","G\ reekStyle","Green","GreenFunction","Grid","GridBaseline","GridBox","GridBoxAlignment","GridBoxBackground","GridBoxDividers","GridBoxFrame","GridBoxItemSize","GridBoxItemStyle","GridBoxOptions","GridBoxSpacings","GridCreationSettings","GridDefaultElement","GridElementStyleOptions","GridFrame","GridFrameMargins","GridGraph","GridLines","GridLinesStyle","GridVideo","GroebnerBasis","GroupActionBase","GroupBy","GroupCentralizer","GroupElementFromWord","GroupElementPosition","GroupElementQ","GroupElem\ ents","GroupElementToWord","GroupGenerators","Groupings","GroupMultiplicationTable","GroupOpenerColor","GroupOpenerInsideFrame","GroupOrbits","GroupOrder","GroupPageBreakWithin","GroupSetwiseStabilizer","GroupStabilizer","GroupStabilizerChain","GroupTogetherGrouping","GroupTogetherNestedGrouping","GrowCutComponents","Gudermannian","GuidedFilter","GumbelDistribution","HaarWavelet","HadamardMatrix","HalfLine","HalfNormalDistribution","HalfPlane","HalfSpace","HalftoneShading","HamiltonianGraphQ","H\ ammingDistance","HammingWindow","HandlerFunctions","HandlerFunctionsKeys","HankelH1","HankelH2","HankelMatrix","HankelTransform","HannPoissonWindow","HannWindow","HaradaNortonGroupHN","HararyGraph","HardcorePointProcess","HarmonicMean","HarmonicMeanFilter","HarmonicNumber","Hash","HatchFilling","HatchShading","Haversine","HazardFunction","Head","HeadCompose","HeaderAlignment","HeaderBackground","HeaderDisplayFunction","HeaderLines","Headers","HeaderSize","HeaderStyle","Heads","HeatFluxValue","He\ atInsulationValue","HeatOutflowValue","HeatRadiationValue","HeatSymmetryValue","HeatTemperatureCondition","HeatTransferPDEComponent","HeatTransferValue","HeavisideLambda","HeavisidePi","HeavisideTheta","HeldGroupHe","HeldPart","HelmholtzPDEComponent","HelpBrowserLookup","HelpBrowserNotebook","HelpBrowserSettings","HelpViewerSettings","Here","HermiteDecomposition","HermiteH","Hermitian","HermitianMatrixQ","HessenbergDecomposition","Hessian","HeunB","HeunBPrime","HeunC","HeunCPrime","HeunD","HeunD\ Prime","HeunG","HeunGPrime","HeunT","HeunTPrime","HexadecimalCharacter","Hexahedron","HexahedronBox","HexahedronBoxOptions","HiddenItems","HiddenMarkovProcess","HiddenSurface","Highlighted","HighlightGraph","HighlightImage","HighlightMesh","HighlightString","HighpassFilter","HigmanSimsGroupHS","HilbertCurve","HilbertFilter","HilbertMatrix","Histogram","Histogram3D","HistogramDistribution","HistogramList","HistogramPointDensity","HistogramTransform","HistogramTransformInterpolation","HistoricalPe\ riodData","HitMissTransform","HITSCentrality","HjorthDistribution","HodgeDual","HoeffdingD","HoeffdingDTest","Hold","HoldAll","HoldAllComplete","HoldComplete","HoldFirst","HoldForm","HoldPattern","HoldRest","HolidayCalendar","HomeDirectory","HomePage","Horizontal","HorizontalForm","HorizontalGauge","HorizontalScrollPosition","HornerForm","HostLookup","HotellingTSquareDistribution","HoytDistribution","HTMLSave","HTTPErrorResponse","HTTPRedirect","HTTPRequest","HTTPRequestData","HTTPResponse","Hue", "HumanGrowthData","HumpDownHump","HumpEqual","HurwitzLerchPhi","HurwitzZeta","HyperbolicDistribution","HypercubeGraph","HyperexponentialDistribution","Hyperfactorial","Hypergeometric0F1","Hypergeometric0F1Regularized","Hypergeometric1F1","Hypergeometric1F1Regularized","Hypergeometric2F1","Hypergeometric2F1Regularized","HypergeometricDistribution","HypergeometricPFQ","HypergeometricPFQRegularized","HypergeometricU","Hyperlink","HyperlinkAction","HyperlinkCreationSettings","Hyperplane","Hyphenatio\ n","HyphenationOptions","HypoexponentialDistribution","HypothesisTestData","I","IconData","Iconize","IconizedObject","IconRules","Icosahedron","Identity","IdentityMatrix","If","IfCompiled","IgnoreCase","IgnoreDiacritics","IgnoreIsotopes","IgnorePunctuation","IgnoreSpellCheck","IgnoreStereochemistry","IgnoringInactive","Im","Image","Image3D","Image3DProjection","Image3DSlices","ImageAccumulate","ImageAdd","ImageAdjust","ImageAlign","ImageApply","ImageApplyIndexed","ImageAspectRatio","ImageAssembl\ e","ImageAugmentationLayer","ImageBoundingBoxes","ImageCache","ImageCacheValid","ImageCapture","ImageCaptureFunction","ImageCases","ImageChannels","ImageClip","ImageCollage","ImageColorSpace","ImageCompose","ImageContainsQ","ImageContents","ImageConvolve","ImageCooccurrence","ImageCorners","ImageCorrelate","ImageCorrespondingPoints","ImageCrop","ImageData","ImageDeconvolve","ImageDemosaic","ImageDifference","ImageDimensions","ImageDisplacements","ImageDistance","ImageEditMode","ImageEffect","Ima\ geExposureCombine","ImageFeatureTrack","ImageFileApply","ImageFileFilter","ImageFileScan","ImageFilter","ImageFocusCombine","ImageForestingComponents","ImageFormattingWidth","ImageForwardTransformation","ImageGraphics","ImageHistogram","ImageIdentify","ImageInstanceQ","ImageKeypoints","ImageLabels","ImageLegends","ImageLevels","ImageLines","ImageMargins","ImageMarker","ImageMarkers","ImageMeasurements","ImageMesh","ImageMultiply","ImageOffset","ImagePad","ImagePadding","ImagePartition","ImagePer\ iodogram","ImagePerspectiveTransformation","ImagePosition","ImagePreviewFunction","ImagePyramid","ImagePyramidApply","ImageQ","ImageRangeCache","ImageRecolor","ImageReflect","ImageRegion","ImageResize","ImageResolution","ImageRestyle","ImageRotate","ImageRotated","ImageSaliencyFilter","ImageScaled","ImageScan","ImageSize","ImageSizeAction","ImageSizeCache","ImageSizeMultipliers","ImageSizeRaw","ImageStitch","ImageSubtract","ImageTake","ImageTransformation","ImageTrim","ImageType","ImageValue","I\ mageValuePositions","ImageVectorscopePlot","ImageWaveformPlot","ImagingDevice","ImplicitD","ImplicitRegion","Implies","Import","ImportAutoReplacements","ImportByteArray","ImportedObject","ImportOptions","ImportString","ImprovementImportance","In","Inactivate","Inactive","InactiveStyle","IncidenceGraph","IncidenceList","IncidenceMatrix","IncludeAromaticBonds","IncludeConstantBasis","IncludedContexts","IncludeDefinitions","IncludeDirectories","IncludeFileExtension","IncludeGeneratorTasks","Include\ Hydrogens","IncludeInflections","IncludeMetaInformation","IncludePods","IncludeQuantities","IncludeRelatedTables","IncludeSingularSolutions","IncludeSingularTerm","IncludeWindowTimes","Increment","IndefiniteMatrixQ","Indent","IndentingNewlineSpacings","IndentMaxFraction","IndependenceTest","IndependentEdgeSetQ","IndependentPhysicalQuantity","IndependentUnit","IndependentUnitDimension","IndependentVertexSetQ","Indeterminate","IndeterminateThreshold","IndexCreationOptions","Indexed","IndexEdgeTagg\ edGraph","IndexGraph","IndexTag","Inequality","InertEvaluate","InertExpression","InexactNumberQ","InexactNumbers","InfiniteFuture","InfiniteLine","InfiniteLineThrough","InfinitePast","InfinitePlane","Infinity","Infix","InflationAdjust","InflationMethod","Information","InformationData","InformationDataGrid","Inherited","InheritScope","InhomogeneousPoissonPointProcess","InhomogeneousPoissonProcess","InitialEvaluationHistory","Initialization","InitializationCell","InitializationCellEvaluation","Ini\ tializationCellWarning","InitializationObject","InitializationObjects","InitializationValue","Initialize","InitialSeeding","InlineCounterAssignments","InlineCounterIncrements","InlineRules","Inner","InnerPolygon","InnerPolyhedron","Inpaint","Input","InputAliases","InputAssumptions","InputAutoReplacements","InputField","InputFieldBox","InputFieldBoxOptions","InputForm","InputGrouping","InputNamePacket","InputNotebook","InputPacket","InputPorts","InputSettings","InputStream","InputString","InputSt\ ringPacket","InputToBoxFormPacket","Insert","InsertionFunction","InsertionPointObject","InsertLinebreaks","InsertResults","Inset","Inset3DBox","Inset3DBoxOptions","InsetBox","InsetBoxOptions","Insphere","Install","InstallService","InstanceNormalizationLayer","InString","Integer","IntegerDigits","IntegerExponent","IntegerLength","IntegerName","IntegerPart","IntegerPartitions","IntegerQ","IntegerReverse","Integers","IntegerString","Integral","Integrate","IntegrateChangeVariables","Interactive","In\ teractiveTradingChart","InterfaceSwitched","Interlaced","Interleaving","InternallyBalancedDecomposition","InterpolatingFunction","InterpolatingPolynomial","Interpolation","InterpolationOrder","InterpolationPoints","InterpolationPrecision","Interpretation","InterpretationBox","InterpretationBoxOptions","InterpretationFunction","Interpreter","InterpretTemplate","InterquartileRange","Interrupt","InterruptSettings","IntersectedEntityClass","IntersectingQ","Intersection","Interval","IntervalIntersect\ ion","IntervalMarkers","IntervalMarkersStyle","IntervalMemberQ","IntervalSlider","IntervalUnion","Into","Inverse","InverseBetaRegularized","InverseBilateralLaplaceTransform","InverseBilateralZTransform","InverseCDF","InverseChiSquareDistribution","InverseContinuousWaveletTransform","InverseDistanceTransform","InverseEllipticNomeQ","InverseErf","InverseErfc","InverseFourier","InverseFourierCosTransform","InverseFourierSequenceTransform","InverseFourierSinTransform","InverseFourierTransform","Inve\ rseFunction","InverseFunctions","InverseGammaDistribution","InverseGammaRegularized","InverseGaussianDistribution","InverseGudermannian","InverseHankelTransform","InverseHaversine","InverseImagePyramid","InverseJacobiCD","InverseJacobiCN","InverseJacobiCS","InverseJacobiDC","InverseJacobiDN","InverseJacobiDS","InverseJacobiNC","InverseJacobiND","InverseJacobiNS","InverseJacobiSC","InverseJacobiSD","InverseJacobiSN","InverseLaplaceTransform","InverseMellinTransform","InversePermutation","InverseR\ adon","InverseRadonTransform","InverseSeries","InverseShortTimeFourier","InverseSpectrogram","InverseSurvivalFunction","InverseTransformedRegion","InverseWaveletTransform","InverseWeierstrassP","InverseWishartMatrixDistribution","InverseZTransform","Invisible","InvisibleApplication","InvisibleTimes","IPAddress","IrreduciblePolynomialQ","IslandData","IsolatingInterval","IsomorphicGraphQ","IsomorphicSubgraphQ","IsotopeData","Italic","Item","ItemAspectRatio","ItemBox","ItemBoxOptions","ItemDisplayF\ unction","ItemSize","ItemStyle","ItoProcess","JaccardDissimilarity","JacobiAmplitude","Jacobian","JacobiCD","JacobiCN","JacobiCS","JacobiDC","JacobiDN","JacobiDS","JacobiEpsilon","JacobiNC","JacobiND","JacobiNS","JacobiP","JacobiSC","JacobiSD","JacobiSN","JacobiSymbol","JacobiZeta","JacobiZN","JankoGroupJ1","JankoGroupJ2","JankoGroupJ3","JankoGroupJ4","JarqueBeraALMTest","JohnsonDistribution","Join","JoinAcross","Joined","JoinedCurve","JoinedCurveBox","JoinedCurveBoxOptions","JoinForm","JordanDe\ composition","JordanModelDecomposition","JulianDate","JuliaSetBoettcher","JuliaSetIterationCount","JuliaSetPlot","JuliaSetPoints","K","KagiChart","KaiserBesselWindow","KaiserWindow","KalmanEstimator","KalmanFilter","KarhunenLoeveDecomposition","KaryTree","KatzCentrality","KCoreComponents","KDistribution","KEdgeConnectedComponents","KEdgeConnectedGraphQ","KeepExistingVersion","KelvinBei","KelvinBer","KelvinKei","KelvinKer","KendallTau","KendallTauTest","KernelConfiguration","KernelExecute","Kerne\ lFunction","KernelMixtureDistribution","KernelObject","Kernels","Ket","Key","KeyCollisionFunction","KeyComplement","KeyDrop","KeyDropFrom","KeyExistsQ","KeyFreeQ","KeyIntersection","KeyMap","KeyMemberQ","KeypointStrength","Keys","KeySelect","KeySort","KeySortBy","KeyTake","KeyUnion","KeyValueMap","KeyValuePattern","Khinchin","KillProcess","KirchhoffGraph","KirchhoffMatrix","KleinInvariantJ","KnapsackSolve","KnightTourGraph","KnotData","KnownUnitQ","KochCurve","KolmogorovSmirnovTest","KroneckerDe\ lta","KroneckerModelDecomposition","KroneckerProduct","KroneckerSymbol","KuiperTest","KumaraswamyDistribution","Kurtosis","KuwaharaFilter","KVertexConnectedComponents","KVertexConnectedGraphQ","LABColor","Label","Labeled","LabeledSlider","LabelingFunction","LabelingSize","LabelStyle","LabelVisibility","LaguerreL","LakeData","LambdaComponents","LambertW","LameC","LameCPrime","LameEigenvalueA","LameEigenvalueB","LameS","LameSPrime","LaminaData","LanczosWindow","LandauDistribution","Language","Lang\ uageCategory","LanguageData","LanguageIdentify","LanguageOptions","LaplaceDistribution","LaplaceTransform","Laplacian","LaplacianFilter","LaplacianGaussianFilter","LaplacianPDETerm","Large","Larger","Last","Latitude","LatitudeLongitude","LatticeData","LatticeReduce","Launch","LaunchKernels","LayeredGraphPlot","LayeredGraphPlot3D","LayerSizeFunction","LayoutInformation","LCHColor","LCM","LeaderSize","LeafCount","LeapVariant","LeapYearQ","LearnDistribution","LearnedDistribution","LearningRate","Le\ arningRateMultipliers","LeastSquares","LeastSquaresFilterKernel","Left","LeftArrow","LeftArrowBar","LeftArrowRightArrow","LeftDownTeeVector","LeftDownVector","LeftDownVectorBar","LeftRightArrow","LeftRightVector","LeftTee","LeftTeeArrow","LeftTeeVector","LeftTriangle","LeftTriangleBar","LeftTriangleEqual","LeftUpDownVector","LeftUpTeeVector","LeftUpVector","LeftUpVectorBar","LeftVector","LeftVectorBar","LegendAppearance","Legended","LegendFunction","LegendLabel","LegendLayout","LegendMargins","L\ egendMarkers","LegendMarkerSize","LegendreP","LegendreQ","LegendreType","Length","LengthWhile","LerchPhi","Less","LessEqual","LessEqualGreater","LessEqualThan","LessFullEqual","LessGreater","LessLess","LessSlantEqual","LessThan","LessTilde","LetterCharacter","LetterCounts","LetterNumber","LetterQ","Level","LeveneTest","LeviCivitaTensor","LevyDistribution","Lexicographic","LexicographicOrder","LexicographicSort","LibraryDataType","LibraryFunction","LibraryFunctionDeclaration","LibraryFunctionErro\ r","LibraryFunctionInformation","LibraryFunctionLoad","LibraryFunctionUnload","LibraryLoad","LibraryUnload","LicenseEntitlementObject","LicenseEntitlements","LicenseID","LicensingSettings","LiftingFilterData","LiftingWaveletTransform","LightBlue","LightBrown","LightCyan","Lighter","LightGray","LightGreen","Lighting","LightingAngle","LightMagenta","LightOrange","LightPink","LightPurple","LightRed","LightSources","LightYellow","Likelihood","Limit","LimitsPositioning","LimitsPositioningTokens","Lin\ dleyDistribution","Line","Line3DBox","Line3DBoxOptions","LinearFilter","LinearFractionalOptimization","LinearFractionalTransform","LinearGradientFilling","LinearGradientImage","LinearizingTransformationData","LinearLayer","LinearModelFit","LinearOffsetFunction","LinearOptimization","LinearProgramming","LinearRecurrence","LinearSolve","LinearSolveFunction","LineBox","LineBoxOptions","LineBreak","LinebreakAdjustments","LineBreakChart","LinebreakSemicolonWeighting","LineBreakWithin","LineColor","Li\ neGraph","LineIndent","LineIndentMaxFraction","LineIntegralConvolutionPlot","LineIntegralConvolutionScale","LineLegend","LineOpacity","LineSpacing","LineWrapParts","LinkActivate","LinkClose","LinkConnect","LinkConnectedQ","LinkCreate","LinkError","LinkFlush","LinkFunction","LinkHost","LinkInterrupt","LinkLaunch","LinkMode","LinkObject","LinkOpen","LinkOptions","LinkPatterns","LinkProtocol","LinkRankCentrality","LinkRead","LinkReadHeld","LinkReadyQ","Links","LinkService","LinkWrite","LinkWriteHel\ d","LiouvilleLambda","List","Listable","ListAnimate","ListContourPlot","ListContourPlot3D","ListConvolve","ListCorrelate","ListCurvePathPlot","ListDeconvolve","ListDensityPlot","ListDensityPlot3D","Listen","ListFormat","ListFourierSequenceTransform","ListInterpolation","ListLineIntegralConvolutionPlot","ListLinePlot","ListLinePlot3D","ListLogLinearPlot","ListLogLogPlot","ListLogPlot","ListPicker","ListPickerBox","ListPickerBoxBackground","ListPickerBoxOptions","ListPlay","ListPlot","ListPlot3D", "ListPointPlot3D","ListPolarPlot","ListQ","ListSliceContourPlot3D","ListSliceDensityPlot3D","ListSliceVectorPlot3D","ListStepPlot","ListStreamDensityPlot","ListStreamPlot","ListStreamPlot3D","ListSurfacePlot3D","ListVectorDensityPlot","ListVectorDisplacementPlot","ListVectorDisplacementPlot3D","ListVectorPlot","ListVectorPlot3D","ListZTransform","Literal","LiteralSearch","LiteralType","LoadCompiledComponent","LocalAdaptiveBinarize","LocalCache","LocalClusteringCoefficient","LocalEvaluate","Local\ izeDefinitions","LocalizeVariables","LocalObject","LocalObjects","LocalResponseNormalizationLayer","LocalSubmit","LocalSymbol","LocalTime","LocalTimeZone","LocationEquivalenceTest","LocationTest","Locator","LocatorAutoCreate","LocatorBox","LocatorBoxOptions","LocatorCentering","LocatorPane","LocatorPaneBox","LocatorPaneBoxOptions","LocatorRegion","Locked","Log","Log10","Log2","LogBarnesG","LogGamma","LogGammaDistribution","LogicalExpand","LogIntegral","LogisticDistribution","LogisticSigmoid","Lo\ gitModelFit","LogLikelihood","LogLinearPlot","LogLogisticDistribution","LogLogPlot","LogMultinormalDistribution","LogNormalDistribution","LogPlot","LogRankTest","LogSeriesDistribution","LongEqual","Longest","LongestCommonSequence","LongestCommonSequencePositions","LongestCommonSubsequence","LongestCommonSubsequencePositions","LongestMatch","LongestOrderedSequence","LongForm","Longitude","LongLeftArrow","LongLeftRightArrow","LongRightArrow","LongShortTermMemoryLayer","Lookup","Loopback","LoopFree\ GraphQ","Looping","LossFunction","LowerCaseQ","LowerLeftArrow","LowerRightArrow","LowerTriangularize","LowerTriangularMatrix","LowerTriangularMatrixQ","LowpassFilter","LQEstimatorGains","LQGRegulator","LQOutputRegulatorGains","LQRegulatorGains","LUBackSubstitution","LucasL","LuccioSamiComponents","LUDecomposition","LunarEclipse","LUVColor","LyapunovSolve","LyonsGroupLy","MachineID","MachineName","MachineNumberQ","MachinePrecision","MacintoshSystemPageSetup","Magenta","Magnification","Magnify","M\ ailAddressValidation","MailExecute","MailFolder","MailItem","MailReceiverFunction","MailResponseFunction","MailSearch","MailServerConnect","MailServerConnection","MailSettings","MainSolve","MaintainDynamicCaches","Majority","MakeBoxes","MakeExpression","MakeRules","ManagedLibraryExpressionID","ManagedLibraryExpressionQ","MandelbrotSetBoettcher","MandelbrotSetDistance","MandelbrotSetIterationCount","MandelbrotSetMemberQ","MandelbrotSetPlot","MangoldtLambda","ManhattanDistance","Manipulate","Manip\ ulator","MannedSpaceMissionData","MannWhitneyTest","MantissaExponent","Manual","Map","MapAll","MapApply","MapAt","MapIndexed","MAProcess","MapThread","MarchenkoPasturDistribution","MarcumQ","MardiaCombinedTest","MardiaKurtosisTest","MardiaSkewnessTest","MarginalDistribution","MarkovProcessProperties","Masking","MassConcentrationCondition","MassFluxValue","MassImpermeableBoundaryValue","MassOutflowValue","MassSymmetryValue","MassTransferValue","MassTransportPDEComponent","MatchingDissimilarity","\ MatchLocalNameQ","MatchLocalNames","MatchQ","Material","MaterialShading","MaternPointProcess","MathematicalFunctionData","MathematicaNotation","MathieuC","MathieuCharacteristicA","MathieuCharacteristicB","MathieuCharacteristicExponent","MathieuCPrime","MathieuGroupM11","MathieuGroupM12","MathieuGroupM22","MathieuGroupM23","MathieuGroupM24","MathieuS","MathieuSPrime","MathMLForm","MathMLText","Matrices","MatrixExp","MatrixForm","MatrixFunction","MatrixLog","MatrixNormalDistribution","MatrixPlot", "MatrixPower","MatrixPropertyDistribution","MatrixQ","MatrixRank","MatrixTDistribution","Max","MaxBend","MaxCellMeasure","MaxColorDistance","MaxDate","MaxDetect","MaxDisplayedChildren","MaxDuration","MaxExtraBandwidths","MaxExtraConditions","MaxFeatureDisplacement","MaxFeatures","MaxFilter","MaximalBy","Maximize","MaxItems","MaxIterations","MaxLimit","MaxMemoryUsed","MaxMixtureKernels","MaxOverlapFraction","MaxPlotPoints","MaxPoints","MaxRecursion","MaxStableDistribution","MaxStepFraction","MaxS\ teps","MaxStepSize","MaxTrainingRounds","MaxValue","MaxwellDistribution","MaxWordGap","McLaughlinGroupMcL","Mean","MeanAbsoluteLossLayer","MeanAround","MeanClusteringCoefficient","MeanDegreeConnectivity","MeanDeviation","MeanFilter","MeanGraphDistance","MeanNeighborDegree","MeanPointDensity","MeanShift","MeanShiftFilter","MeanSquaredLossLayer","Median","MedianDeviation","MedianFilter","MedicalTestData","Medium","MeijerG","MeijerGReduce","MeixnerDistribution","MellinConvolve","MellinTransform","M\ emberQ","MemoryAvailable","MemoryConstrained","MemoryConstraint","MemoryInUse","MengerMesh","Menu","MenuAppearance","MenuCommandKey","MenuEvaluator","MenuItem","MenuList","MenuPacket","MenuSortingValue","MenuStyle","MenuView","Merge","MergeDifferences","MergingFunction","MersennePrimeExponent","MersennePrimeExponentQ","Mesh","MeshCellCentroid","MeshCellCount","MeshCellHighlight","MeshCellIndex","MeshCellLabel","MeshCellMarker","MeshCellMeasure","MeshCellQuality","MeshCells","MeshCellShapeFunctio\ n","MeshCellStyle","MeshConnectivityGraph","MeshCoordinates","MeshFunctions","MeshPrimitives","MeshQualityGoal","MeshRange","MeshRefinementFunction","MeshRegion","MeshRegionQ","MeshShading","MeshStyle","Message","MessageDialog","MessageList","MessageName","MessageObject","MessageOptions","MessagePacket","Messages","MessagesNotebook","MetaCharacters","MetaInformation","MeteorShowerData","Method","MethodOptions","MexicanHatWavelet","MeyerWavelet","Midpoint","MIMETypeToFormatList","Min","MinColorDi\ stance","MinDate","MinDetect","MineralData","MinFilter","MinimalBy","MinimalPolynomial","MinimalStateSpaceModel","Minimize","MinimumTimeIncrement","MinIntervalSize","MinkowskiQuestionMark","MinLimit","MinMax","MinorPlanetData","Minors","MinPointSeparation","MinRecursion","MinSize","MinStableDistribution","Minus","MinusPlus","MinValue","Missing","MissingBehavior","MissingDataMethod","MissingDataRules","MissingQ","MissingString","MissingStyle","MissingValuePattern","MissingValueSynthesis","MittagL\ efflerE","MixedFractionParts","MixedGraphQ","MixedMagnitude","MixedRadix","MixedRadixQuantity","MixedUnit","MixtureDistribution","Mod","Modal","Mode","ModelPredictiveController","Modular","ModularInverse","ModularLambda","Module","Modulus","MoebiusMu","Molecule","MoleculeAlign","MoleculeContainsQ","MoleculeDraw","MoleculeEquivalentQ","MoleculeFreeQ","MoleculeGraph","MoleculeMatchQ","MoleculeMaximumCommonSubstructure","MoleculeModify","MoleculeName","MoleculePattern","MoleculePlot","MoleculePlot3\ D","MoleculeProperty","MoleculeQ","MoleculeRecognize","MoleculeSubstructureCount","MoleculeValue","Moment","MomentConvert","MomentEvaluate","MomentGeneratingFunction","MomentOfInertia","Monday","Monitor","MonomialList","MonomialOrder","MonsterGroupM","MoonPhase","MoonPosition","MorletWavelet","MorphologicalBinarize","MorphologicalBranchPoints","MorphologicalComponents","MorphologicalEulerNumber","MorphologicalGraph","MorphologicalPerimeter","MorphologicalTransform","MortalityData","Most","Mounta\ inData","MouseAnnotation","MouseAppearance","MouseAppearanceTag","MouseButtons","Mouseover","MousePointerNote","MousePosition","MovieData","MovingAverage","MovingMap","MovingMedian","MoyalDistribution","MultiaxisArrangement","Multicolumn","MultiedgeStyle","MultigraphQ","MultilaunchWarning","MultiLetterItalics","MultiLetterStyle","MultilineFunction","Multinomial","MultinomialDistribution","MultinormalDistribution","MultiplicativeOrder","Multiplicity","MultiplySides","MultiscriptBoxOptions","Multi\ selection","MultivariateHypergeometricDistribution","MultivariatePoissonDistribution","MultivariateTDistribution","N","NakagamiDistribution","NameQ","Names","NamespaceBox","NamespaceBoxOptions","Nand","NArgMax","NArgMin","NBernoulliB","NBodySimulation","NBodySimulationData","NCache","NCaputoD","NDEigensystem","NDEigenvalues","NDSolve","NDSolveValue","Nearest","NearestFunction","NearestMeshCells","NearestNeighborG","NearestNeighborGraph","NearestTo","NebulaData","NeedlemanWunschSimilarity","Needs", "Negative","NegativeBinomialDistribution","NegativeDefiniteMatrixQ","NegativeIntegers","NegativelyOrientedPoints","NegativeMultinomialDistribution","NegativeRationals","NegativeReals","NegativeSemidefiniteMatrixQ","NeighborhoodData","NeighborhoodGraph","Nest","NestedGreaterGreater","NestedLessLess","NestedScriptRules","NestGraph","NestList","NestTree","NestWhile","NestWhileList","NetAppend","NetArray","NetArrayLayer","NetBidirectionalOperator","NetChain","NetDecoder","NetDelete","NetDrop","NetEn\ coder","NetEvaluationMode","NetExternalObject","NetExtract","NetFlatten","NetFoldOperator","NetGANOperator","NetGraph","NetInformation","NetInitialize","NetInsert","NetInsertSharedArrays","NetJoin","NetMapOperator","NetMapThreadOperator","NetMeasurements","NetModel","NetNestOperator","NetPairEmbeddingOperator","NetPort","NetPortGradient","NetPrepend","NetRename","NetReplace","NetReplacePart","NetSharedArray","NetStateObject","NetTake","NetTrain","NetTrainResultsObject","NetUnfold","NetworkPacket\ Capture","NetworkPacketRecording","NetworkPacketRecordingDuring","NetworkPacketTrace","NeumannValue","NevilleThetaC","NevilleThetaD","NevilleThetaN","NevilleThetaS","NewPrimitiveStyle","NExpectation","Next","NextCell","NextDate","NextPrime","NextScheduledTaskTime","NeymanScottPointProcess","NFractionalD","NHoldAll","NHoldFirst","NHoldRest","NicholsGridLines","NicholsPlot","NightHemisphere","NIntegrate","NMaximize","NMaxValue","NMinimize","NMinValue","NominalScale","NominalVariables","NonAssociat\ ive","NoncentralBetaDistribution","NoncentralChiSquareDistribution","NoncentralFRatioDistribution","NoncentralStudentTDistribution","NonCommutativeMultiply","NonConstants","NondimensionalizationTransform","None","NoneTrue","NonlinearModelFit","NonlinearStateSpaceModel","NonlocalMeansFilter","NonNegative","NonNegativeIntegers","NonNegativeRationals","NonNegativeReals","NonPositive","NonPositiveIntegers","NonPositiveRationals","NonPositiveReals","Nor","NorlundB","Norm","Normal","NormalDistribution", "NormalGrouping","NormalizationLayer","Normalize","Normalized","NormalizedSquaredEuclideanDistance","NormalMatrixQ","NormalsFunction","NormFunction","Not","NotCongruent","NotCupCap","NotDoubleVerticalBar","Notebook","NotebookApply","NotebookAutoSave","NotebookBrowseDirectory","NotebookClose","NotebookConvertSettings","NotebookCreate","NotebookDefault","NotebookDelete","NotebookDirectory","NotebookDynamicExpression","NotebookEvaluate","NotebookEventActions","NotebookFileName","NotebookFind","Note\ bookGet","NotebookImport","NotebookInformation","NotebookInterfaceObject","NotebookLocate","NotebookObject","NotebookOpen","NotebookPath","NotebookPrint","NotebookPut","NotebookRead","Notebooks","NotebookSave","NotebookSelection","NotebooksMenu","NotebookTemplate","NotebookWrite","NotElement","NotEqualTilde","NotExists","NotGreater","NotGreaterEqual","NotGreaterFullEqual","NotGreaterGreater","NotGreaterLess","NotGreaterSlantEqual","NotGreaterTilde","Nothing","NotHumpDownHump","NotHumpEqual","Not\ ificationFunction","NotLeftTriangle","NotLeftTriangleBar","NotLeftTriangleEqual","NotLess","NotLessEqual","NotLessFullEqual","NotLessGreater","NotLessLess","NotLessSlantEqual","NotLessTilde","NotNestedGreaterGreater","NotNestedLessLess","NotPrecedes","NotPrecedesEqual","NotPrecedesSlantEqual","NotPrecedesTilde","NotReverseElement","NotRightTriangle","NotRightTriangleBar","NotRightTriangleEqual","NotSquareSubset","NotSquareSubsetEqual","NotSquareSuperset","NotSquareSupersetEqual","NotSubset","Not\ SubsetEqual","NotSucceeds","NotSucceedsEqual","NotSucceedsSlantEqual","NotSucceedsTilde","NotSuperset","NotSupersetEqual","NotTilde","NotTildeEqual","NotTildeFullEqual","NotTildeTilde","NotVerticalBar","Now","NoWhitespace","NProbability","NProduct","NProductFactors","NRoots","NSolve","NSolveValues","NSum","NSumTerms","NuclearExplosionData","NuclearReactorData","Null","NullRecords","NullSpace","NullWords","Number","NumberCompose","NumberDecompose","NumberDigit","NumberExpand","NumberFieldClassNum\ ber","NumberFieldDiscriminant","NumberFieldFundamentalUnits","NumberFieldIntegralBasis","NumberFieldNormRepresentatives","NumberFieldRegulator","NumberFieldRootsOfUnity","NumberFieldSignature","NumberForm","NumberFormat","NumberLinePlot","NumberMarks","NumberMultiplier","NumberPadding","NumberPoint","NumberQ","NumberSeparator","NumberSigns","NumberString","Numerator","NumeratorDenominator","NumericalOrder","NumericalSort","NumericArray","NumericArrayQ","NumericArrayType","NumericFunction","Numer\ icQ","NuttallWindow","NValues","NyquistGridLines","NyquistPlot","O","ObjectExistsQ","ObservabilityGramian","ObservabilityMatrix","ObservableDecomposition","ObservableModelQ","OceanData","Octahedron","OddQ","Off","Offset","OLEData","On","ONanGroupON","Once","OneIdentity","Opacity","OpacityFunction","OpacityFunctionScaling","Open","OpenAppend","Opener","OpenerBox","OpenerBoxOptions","OpenerView","OpenFunctionInspectorPacket","Opening","OpenRead","OpenSpecialOptions","OpenTemporary","OpenWrite","Op\ erate","OperatingSystem","OperatorApplied","OptimumFlowData","Optional","OptionalElement","OptionInspectorSettings","OptionQ","Options","OptionsPacket","OptionsPattern","OptionValue","OptionValueBox","OptionValueBoxOptions","Or","Orange","Order","OrderDistribution","OrderedQ","Ordering","OrderingBy","OrderingLayer","Orderless","OrderlessPatternSequence","OrdinalScale","OrnsteinUhlenbeckProcess","Orthogonalize","OrthogonalMatrixQ","Out","Outer","OuterPolygon","OuterPolyhedron","OutputAutoOverwrit\ e","OutputControllabilityMatrix","OutputControllableModelQ","OutputForm","OutputFormData","OutputGrouping","OutputMathEditExpression","OutputNamePacket","OutputPorts","OutputResponse","OutputSizeLimit","OutputStream","Over","OverBar","OverDot","Overflow","OverHat","Overlaps","Overlay","OverlayBox","OverlayBoxOptions","OverlayVideo","Overscript","OverscriptBox","OverscriptBoxOptions","OverTilde","OverVector","OverwriteTarget","OwenT","OwnValues","Package","PackingMethod","PackPaclet","PacletDataR\ ebuild","PacletDirectoryAdd","PacletDirectoryLoad","PacletDirectoryRemove","PacletDirectoryUnload","PacletDisable","PacletEnable","PacletFind","PacletFindRemote","PacletInformation","PacletInstall","PacletInstallSubmit","PacletNewerQ","PacletObject","PacletObjectQ","PacletSite","PacletSiteObject","PacletSiteRegister","PacletSites","PacletSiteUnregister","PacletSiteUpdate","PacletSymbol","PacletUninstall","PacletUpdate","PaddedForm","Padding","PaddingLayer","PaddingSize","PadeApproximant","PadLef\ t","PadRight","PageBreakAbove","PageBreakBelow","PageBreakWithin","PageFooterLines","PageFooters","PageHeaderLines","PageHeaders","PageHeight","PageRankCentrality","PageTheme","PageWidth","Pagination","PairCorrelationG","PairedBarChart","PairedHistogram","PairedSmoothHistogram","PairedTTest","PairedZTest","PaletteNotebook","PalettePath","PalettesMenuSettings","PalindromeQ","Pane","PaneBox","PaneBoxOptions","Panel","PanelBox","PanelBoxOptions","Paneled","PaneSelector","PaneSelectorBox","PaneSelec\ torBoxOptions","PaperWidth","ParabolicCylinderD","ParagraphIndent","ParagraphSpacing","ParallelArray","ParallelAxisPlot","ParallelCombine","ParallelDo","Parallelepiped","ParallelEvaluate","Parallelization","Parallelize","ParallelKernels","ParallelMap","ParallelNeeds","Parallelogram","ParallelProduct","ParallelSubmit","ParallelSum","ParallelTable","ParallelTry","Parameter","ParameterEstimator","ParameterMixtureDistribution","ParameterVariables","ParametricConvexOptimization","ParametricFunction", "ParametricNDSolve","ParametricNDSolveValue","ParametricPlot","ParametricPlot3D","ParametricRampLayer","ParametricRegion","ParentBox","ParentCell","ParentConnect","ParentDirectory","ParentEdgeLabel","ParentEdgeLabelFunction","ParentEdgeLabelStyle","ParentEdgeShapeFunction","ParentEdgeStyle","ParentEdgeStyleFunction","ParentForm","Parenthesize","ParentList","ParentNotebook","ParetoDistribution","ParetoPickandsDistribution","ParkData","Part","PartBehavior","PartialCorrelationFunction","PartialD","\ ParticleAcceleratorData","ParticleData","Partition","PartitionGranularity","PartitionsP","PartitionsQ","PartLayer","PartOfSpeech","PartProtection","ParzenWindow","PascalDistribution","PassEventsDown","PassEventsUp","Paste","PasteAutoQuoteCharacters","PasteBoxFormInlineCells","PasteButton","Path","PathGraph","PathGraphQ","Pattern","PatternFilling","PatternReaction","PatternSequence","PatternTest","PauliMatrix","PaulWavelet","Pause","PausedTime","PDF","PeakDetect","PeanoCurve","PearsonChiSquareTes\ t","PearsonCorrelationTest","PearsonDistribution","PenttinenPointProcess","PercentForm","PerfectNumber","PerfectNumberQ","PerformanceGoal","Perimeter","PeriodicBoundaryCondition","PeriodicInterpolation","Periodogram","PeriodogramArray","Permanent","Permissions","PermissionsGroup","PermissionsGroupMemberQ","PermissionsGroups","PermissionsKey","PermissionsKeys","PermutationCycles","PermutationCyclesQ","PermutationGroup","PermutationLength","PermutationList","PermutationListQ","PermutationMatrix","\ PermutationMax","PermutationMin","PermutationOrder","PermutationPower","PermutationProduct","PermutationReplace","Permutations","PermutationSupport","Permute","PeronaMalikFilter","Perpendicular","PerpendicularBisector","PersistenceLocation","PersistenceTime","PersistentObject","PersistentObjects","PersistentSymbol","PersistentValue","PersonData","PERTDistribution","PetersenGraph","PhaseMargins","PhaseRange","PhongShading","PhysicalSystemData","Pi","Pick","PickedElements","PickMode","PIDData","PI\ DDerivativeFilter","PIDFeedforward","PIDTune","Piecewise","PiecewiseExpand","PieChart","PieChart3D","PillaiTrace","PillaiTraceTest","PingTime","Pink","PitchRecognize","Pivoting","PixelConstrained","PixelValue","PixelValuePositions","Placed","Placeholder","PlaceholderLayer","PlaceholderReplace","Plain","PlanarAngle","PlanarFaceList","PlanarGraph","PlanarGraphQ","PlanckRadiationLaw","PlaneCurveData","PlanetaryMoonData","PlanetData","PlantData","Play","PlaybackSettings","PlayRange","Plot","Plot3D", "Plot3Matrix","PlotDivision","PlotJoined","PlotLabel","PlotLabels","PlotLayout","PlotLegends","PlotMarkers","PlotPoints","PlotRange","PlotRangeClipping","PlotRangeClipPlanesStyle","PlotRangePadding","PlotRegion","PlotStyle","PlotTheme","Pluralize","Plus","PlusMinus","Pochhammer","PodStates","PodWidth","Point","Point3DBox","Point3DBoxOptions","PointBox","PointBoxOptions","PointCountDistribution","PointDensity","PointDensityFunction","PointFigureChart","PointLegend","PointLight","PointProcessEstim\ ator","PointProcessFitTest","PointProcessParameterAssumptions","PointProcessParameterQ","PointSize","PointStatisticFunction","PointValuePlot","PoissonConsulDistribution","PoissonDistribution","PoissonPDEComponent","PoissonPointProcess","PoissonProcess","PoissonWindow","PolarAxes","PolarAxesOrigin","PolarGridLines","PolarPlot","PolarTicks","PoleZeroMarkers","PolyaAeppliDistribution","PolyGamma","Polygon","Polygon3DBox","Polygon3DBoxOptions","PolygonalNumber","PolygonAngle","PolygonBox","PolygonBo\ xOptions","PolygonCoordinates","PolygonDecomposition","PolygonHoleScale","PolygonIntersections","PolygonScale","Polyhedron","PolyhedronAngle","PolyhedronBox","PolyhedronBoxOptions","PolyhedronCoordinates","PolyhedronData","PolyhedronDecomposition","PolyhedronGenus","PolyLog","PolynomialExpressionQ","PolynomialExtendedGCD","PolynomialForm","PolynomialGCD","PolynomialLCM","PolynomialMod","PolynomialQ","PolynomialQuotient","PolynomialQuotientRemainder","PolynomialReduce","PolynomialRemainder","Poly\ nomials","PolynomialSumOfSquaresList","PoolingLayer","PopupMenu","PopupMenuBox","PopupMenuBoxOptions","PopupView","PopupWindow","Position","PositionIndex","PositionLargest","PositionSmallest","Positive","PositiveDefiniteMatrixQ","PositiveIntegers","PositivelyOrientedPoints","PositiveRationals","PositiveReals","PositiveSemidefiniteMatrixQ","PossibleZeroQ","Postfix","PostScript","Power","PowerDistribution","PowerExpand","PowerMod","PowerModList","PowerRange","PowerSpectralDensity","PowersRepresent\ ations","PowerSymmetricPolynomial","Precedence","PrecedenceForm","Precedes","PrecedesEqual","PrecedesSlantEqual","PrecedesTilde","Precision","PrecisionGoal","PreDecrement","Predict","PredictionRoot","PredictorFunction","PredictorInformation","PredictorMeasurements","PredictorMeasurementsObject","PreemptProtect","PreferencesPath","PreferencesSettings","Prefix","PreIncrement","Prepend","PrependLayer","PrependTo","PreprocessingRules","PreserveColor","PreserveImageOptions","Previous","PreviousCell", "PreviousDate","PriceGraphDistribution","PrimaryPlaceholder","Prime","PrimeNu","PrimeOmega","PrimePi","PrimePowerQ","PrimeQ","Primes","PrimeZetaP","PrimitivePolynomialQ","PrimitiveRoot","PrimitiveRootList","PrincipalComponents","PrincipalValue","Print","PrintableASCIIQ","PrintAction","PrintForm","PrintingCopies","PrintingOptions","PrintingPageRange","PrintingStartingPageNumber","PrintingStyleEnvironment","Printout3D","Printout3DPreviewer","PrintPrecision","PrintTemporary","Prism","PrismBox","Pri\ smBoxOptions","PrivateCellOptions","PrivateEvaluationOptions","PrivateFontOptions","PrivateFrontEndOptions","PrivateKey","PrivateNotebookOptions","PrivatePaths","Probability","ProbabilityDistribution","ProbabilityPlot","ProbabilityPr","ProbabilityScalePlot","ProbitModelFit","ProcessConnection","ProcessDirectory","ProcessEnvironment","Processes","ProcessEstimator","ProcessInformation","ProcessObject","ProcessParameterAssumptions","ProcessParameterQ","ProcessStateDomain","ProcessStatus","ProcessTi\ meDomain","Product","ProductDistribution","ProductLog","ProgressIndicator","ProgressIndicatorBox","ProgressIndicatorBoxOptions","ProgressReporting","Projection","Prolog","PromptForm","ProofObject","PropagateAborts","Properties","Property","PropertyList","PropertyValue","Proportion","Proportional","Protect","Protected","ProteinData","Pruning","PseudoInverse","PsychrometricPropertyData","PublicKey","PublisherID","PulsarData","PunctuationCharacter","Purple","Put","PutAppend","Pyramid","PyramidBox", "PyramidBoxOptions","QBinomial","QFactorial","QGamma","QHypergeometricPFQ","QnDispersion","QPochhammer","QPolyGamma","QRDecomposition","QuadraticIrrationalQ","QuadraticOptimization","Quantile","QuantilePlot","Quantity","QuantityArray","QuantityDistribution","QuantityForm","QuantityMagnitude","QuantityQ","QuantityUnit","QuantityVariable","QuantityVariableCanonicalUnit","QuantityVariableDimensions","QuantityVariableIdentifier","QuantityVariablePhysicalQuantity","Quartics","QuartileDeviation","Quar\ tiles","QuartileSkewness","Query","QuestionGenerator","QuestionInterface","QuestionObject","QuestionSelector","QueueingNetworkProcess","QueueingProcess","QueueProperties","Quiet","QuietEcho","Quit","Quotient","QuotientRemainder","RadialAxisPlot","RadialGradientFilling","RadialGradientImage","RadialityCentrality","RadicalBox","RadicalBoxOptions","RadioButton","RadioButtonBar","RadioButtonBox","RadioButtonBoxOptions","Radon","RadonTransform","RamanujanTau","RamanujanTauL","RamanujanTauTheta","Rama\ nujanTauZ","Ramp","Random","RandomArrayLayer","RandomChoice","RandomColor","RandomComplex","RandomDate","RandomEntity","RandomFunction","RandomGeneratorState","RandomGeoPosition","RandomGraph","RandomImage","RandomInstance","RandomInteger","RandomPermutation","RandomPoint","RandomPointConfiguration","RandomPolygon","RandomPolyhedron","RandomPrime","RandomReal","RandomSample","RandomSeed","RandomSeeding","RandomTime","RandomTree","RandomVariate","RandomWalkProcess","RandomWord","Range","RangeFilt\ er","RangeSpecification","RankedMax","RankedMin","RarerProbability","Raster","Raster3D","Raster3DBox","Raster3DBoxOptions","RasterArray","RasterBox","RasterBoxOptions","Rasterize","RasterSize","Rational","RationalExpressionQ","RationalFunctions","Rationalize","Rationals","Ratios","RawArray","RawBoxes","RawData","RawMedium","RayleighDistribution","Re","ReactionBalance","ReactionBalancedQ","ReactionPDETerm","Read","ReadByteArray","ReadLine","ReadList","ReadProtected","ReadString","Real","RealAbs", "RealBlockDiagonalForm","RealDigits","RealExponent","Reals","RealSign","Reap","RebuildPacletData","RecalibrationFunction","RecognitionPrior","RecognitionThreshold","ReconstructionMesh","Record","RecordLists","RecordSeparators","Rectangle","RectangleBox","RectangleBoxOptions","RectangleChart","RectangleChart3D","RectangularRepeatingElement","RecurrenceFilter","RecurrenceTable","RecurringDigitsForm","Red","Reduce","RefBox","ReferenceLineStyle","ReferenceMarkers","ReferenceMarkerStyle","Refine","Re\ flectionMatrix","ReflectionTransform","Refresh","RefreshRate","Region","RegionBinarize","RegionBoundary","RegionBoundaryStyle","RegionBounds","RegionCentroid","RegionCongruent","RegionConvert","RegionDifference","RegionDilation","RegionDimension","RegionDisjoint","RegionDistance","RegionDistanceFunction","RegionEmbeddingDimension","RegionEqual","RegionErosion","RegionFillingStyle","RegionFit","RegionFunction","RegionImage","RegionIntersection","RegionMeasure","RegionMember","RegionMemberFunction", "RegionMoment","RegionNearest","RegionNearestFunction","RegionPlot","RegionPlot3D","RegionProduct","RegionQ","RegionResize","RegionSimilar","RegionSize","RegionSymmetricDifference","RegionUnion","RegionWithin","RegisterExternalEvaluator","RegularExpression","Regularization","RegularlySampledQ","RegularPolygon","ReIm","ReImLabels","ReImPlot","ReImStyle","Reinstall","RelationalDatabase","RelationGraph","Release","ReleaseHold","ReliabilityDistribution","ReliefImage","ReliefPlot","RemoteAuthorizatio\ nCaching","RemoteBatchJobAbort","RemoteBatchJobObject","RemoteBatchJobs","RemoteBatchMapSubmit","RemoteBatchSubmissionEnvironment","RemoteBatchSubmit","RemoteConnect","RemoteConnectionObject","RemoteEvaluate","RemoteFile","RemoteInputFiles","RemoteKernelObject","RemoteProviderSettings","RemoteRun","RemoteRunProcess","RemovalConditions","Remove","RemoveAlphaChannel","RemoveAsynchronousTask","RemoveAudioStream","RemoveBackground","RemoveChannelListener","RemoveChannelSubscribers","Removed","Remove\ Diacritics","RemoveInputStreamMethod","RemoveOutputStreamMethod","RemoveProperty","RemoveScheduledTask","RemoveUsers","RemoveVideoStream","RenameDirectory","RenameFile","RenderAll","RenderingOptions","RenewalProcess","RenkoChart","RepairMesh","Repeated","RepeatedNull","RepeatedString","RepeatedTiming","RepeatingElement","Replace","ReplaceAll","ReplaceAt","ReplaceHeldPart","ReplaceImageValue","ReplaceList","ReplacePart","ReplacePixelValue","ReplaceRepeated","ReplicateLayer","RequiredPhysicalQuant\ ities","Resampling","ResamplingAlgorithmData","ResamplingMethod","Rescale","RescalingTransform","ResetDirectory","ResetScheduledTask","ReshapeLayer","Residue","ResidueSum","ResizeLayer","Resolve","ResolveContextAliases","ResourceAcquire","ResourceData","ResourceFunction","ResourceObject","ResourceRegister","ResourceRemove","ResourceSearch","ResourceSubmissionObject","ResourceSubmit","ResourceSystemBase","ResourceSystemPath","ResourceUpdate","ResourceVersion","ResponseForm","Rest","RestartInterva\ l","Restricted","Resultant","ResumePacket","Return","ReturnCreatesNewCell","ReturnEntersInput","ReturnExpressionPacket","ReturnInputFormPacket","ReturnPacket","ReturnReceiptFunction","ReturnTextPacket","Reverse","ReverseApplied","ReverseBiorthogonalSplineWavelet","ReverseElement","ReverseEquilibrium","ReverseGraph","ReverseSort","ReverseSortBy","ReverseUpEquilibrium","RevolutionAxis","RevolutionPlot3D","RGBColor","RiccatiSolve","RiceDistribution","RidgeFilter","RiemannR","RiemannSiegelTheta","Ri\ emannSiegelZ","RiemannXi","Riffle","Right","RightArrow","RightArrowBar","RightArrowLeftArrow","RightComposition","RightCosetRepresentative","RightDownTeeVector","RightDownVector","RightDownVectorBar","RightTee","RightTeeArrow","RightTeeVector","RightTriangle","RightTriangleBar","RightTriangleEqual","RightUpDownVector","RightUpTeeVector","RightUpVector","RightUpVectorBar","RightVector","RightVectorBar","RipleyK","RipleyRassonRegion","RiskAchievementImportance","RiskReductionImportance","RobustCon\ vexOptimization","RogersTanimotoDissimilarity","RollPitchYawAngles","RollPitchYawMatrix","RomanNumeral","Root","RootApproximant","RootIntervals","RootLocusPlot","RootMeanSquare","RootOfUnityQ","RootReduce","Roots","RootSum","RootTree","Rotate","RotateLabel","RotateLeft","RotateRight","RotationAction","RotationBox","RotationBoxOptions","RotationMatrix","RotationTransform","Round","RoundImplies","RoundingRadius","Row","RowAlignments","RowBackgrounds","RowBox","RowHeights","RowLines","RowMinHeight", "RowReduce","RowsEqual","RowSpacings","RSolve","RSolveValue","RudinShapiro","RudvalisGroupRu","Rule","RuleCondition","RuleDelayed","RuleForm","RulePlot","RulerUnits","RulesTree","Run","RunProcess","RunScheduledTask","RunThrough","RuntimeAttributes","RuntimeOptions","RussellRaoDissimilarity","SameAs","SameQ","SameTest","SameTestProperties","SampledEntityClass","SampleDepth","SampledSoundFunction","SampledSoundList","SampleRate","SamplingPeriod","SARIMAProcess","SARMAProcess","SASTriangle","Satell\ iteData","SatisfiabilityCount","SatisfiabilityInstances","SatisfiableQ","Saturday","Save","Saveable","SaveAutoDelete","SaveConnection","SaveDefinitions","SavitzkyGolayMatrix","SawtoothWave","Scale","Scaled","ScaleDivisions","ScaledMousePosition","ScaleOrigin","ScalePadding","ScaleRanges","ScaleRangeStyle","ScalingFunctions","ScalingMatrix","ScalingTransform","Scan","ScheduledTask","ScheduledTaskActiveQ","ScheduledTaskInformation","ScheduledTaskInformationData","ScheduledTaskObject","ScheduledTas\ ks","SchurDecomposition","ScientificForm","ScientificNotationThreshold","ScorerGi","ScorerGiPrime","ScorerHi","ScorerHiPrime","ScreenRectangle","ScreenStyleEnvironment","ScriptBaselineShifts","ScriptForm","ScriptLevel","ScriptMinSize","ScriptRules","ScriptSizeMultipliers","Scrollbars","ScrollingOptions","ScrollPosition","SearchAdjustment","SearchIndexObject","SearchIndices","SearchQueryString","SearchResultObject","Sec","Sech","SechDistribution","SecondOrderConeOptimization","SectionGrouping","S\ ectorChart","SectorChart3D","SectorOrigin","SectorSpacing","SecuredAuthenticationKey","SecuredAuthenticationKeys","SecurityCertificate","SeedRandom","Select","Selectable","SelectComponents","SelectedCells","SelectedNotebook","SelectFirst","Selection","SelectionAnimate","SelectionCell","SelectionCellCreateCell","SelectionCellDefaultStyle","SelectionCellParentStyle","SelectionCreateCell","SelectionDebuggerTag","SelectionEvaluate","SelectionEvaluateCreateCell","SelectionMove","SelectionPlaceholder", "SelectWithContents","SelfLoops","SelfLoopStyle","SemanticImport","SemanticImportString","SemanticInterpretation","SemialgebraicComponentInstances","SemidefiniteOptimization","SendMail","SendMessage","Sequence","SequenceAlignment","SequenceAttentionLayer","SequenceCases","SequenceCount","SequenceFold","SequenceFoldList","SequenceForm","SequenceHold","SequenceIndicesLayer","SequenceLastLayer","SequenceMostLayer","SequencePosition","SequencePredict","SequencePredictorFunction","SequenceReplace","S\ equenceRestLayer","SequenceReverseLayer","SequenceSplit","Series","SeriesCoefficient","SeriesData","SeriesTermGoal","ServiceConnect","ServiceDisconnect","ServiceExecute","ServiceObject","ServiceRequest","ServiceResponse","ServiceSubmit","SessionSubmit","SessionTime","Set","SetAccuracy","SetAlphaChannel","SetAttributes","Setbacks","SetCloudDirectory","SetCookies","SetDelayed","SetDirectory","SetEnvironment","SetFileDate","SetFileFormatProperties","SetOptions","SetOptionsPacket","SetPermissions","\ SetPrecision","SetProperty","SetSecuredAuthenticationKey","SetSelectedNotebook","SetSharedFunction","SetSharedVariable","SetStreamPosition","SetSystemModel","SetSystemOptions","Setter","SetterBar","SetterBox","SetterBoxOptions","Setting","SetUsers","Shading","Shallow","ShannonWavelet","ShapiroWilkTest","Share","SharingList","Sharpen","ShearingMatrix","ShearingTransform","ShellRegion","ShenCastanMatrix","ShiftedGompertzDistribution","ShiftRegisterSequence","Short","ShortDownArrow","Shortest","Sho\ rtestMatch","ShortestPathFunction","ShortLeftArrow","ShortRightArrow","ShortTimeFourier","ShortTimeFourierData","ShortUpArrow","Show","ShowAutoConvert","ShowAutoSpellCheck","ShowAutoStyles","ShowCellBracket","ShowCellLabel","ShowCellTags","ShowClosedCellArea","ShowCodeAssist","ShowContents","ShowControls","ShowCursorTracker","ShowGroupOpenCloseIcon","ShowGroupOpener","ShowInvisibleCharacters","ShowPageBreaks","ShowPredictiveInterface","ShowSelection","ShowShortBoxForm","ShowSpecialCharacters","S\ howStringCharacters","ShowSyntaxStyles","ShrinkingDelay","ShrinkWrapBoundingBox","SiderealTime","SiegelTheta","SiegelTukeyTest","SierpinskiCurve","SierpinskiMesh","Sign","Signature","SignedRankTest","SignedRegionDistance","SignificanceLevel","SignPadding","SignTest","SimilarityRules","SimpleGraph","SimpleGraphQ","SimplePolygonQ","SimplePolyhedronQ","Simplex","Simplify","Sin","Sinc","SinghMaddalaDistribution","SingleEvaluation","SingleLetterItalics","SingleLetterStyle","SingularValueDecomposition", "SingularValueList","SingularValuePlot","SingularValues","Sinh","SinhIntegral","SinIntegral","SixJSymbol","Skeleton","SkeletonTransform","SkellamDistribution","Skewness","SkewNormalDistribution","SkinStyle","Skip","SliceContourPlot3D","SliceDensityPlot3D","SliceDistribution","SliceVectorPlot3D","Slider","Slider2D","Slider2DBox","Slider2DBoxOptions","SliderBox","SliderBoxOptions","SlideShowVideo","SlideView","Slot","SlotSequence","Small","SmallCircle","Smaller","SmithDecomposition","SmithDelayCom\ pensator","SmithWatermanSimilarity","SmoothDensityHistogram","SmoothHistogram","SmoothHistogram3D","SmoothKernelDistribution","SmoothPointDensity","SnDispersion","Snippet","SnippetsVideo","SnubPolyhedron","SocialMediaData","Socket","SocketConnect","SocketListen","SocketListener","SocketObject","SocketOpen","SocketReadMessage","SocketReadyQ","Sockets","SocketWaitAll","SocketWaitNext","SoftmaxLayer","SokalSneathDissimilarity","SolarEclipse","SolarSystemFeatureData","SolarTime","SolidAngle","SolidB\ oundaryLoadValue","SolidData","SolidDisplacementCondition","SolidFixedCondition","SolidMechanicsPDEComponent","SolidMechanicsStrain","SolidMechanicsStress","SolidRegionQ","Solve","SolveAlways","SolveDelayed","SolveValues","Sort","SortBy","SortedBy","SortedEntityClass","Sound","SoundAndGraphics","SoundNote","SoundVolume","SourceLink","SourcePDETerm","Sow","Space","SpaceCurveData","SpaceForm","Spacer","Spacings","Span","SpanAdjustments","SpanCharacterRounding","SpanFromAbove","SpanFromBoth","SpanF\ romLeft","SpanLineThickness","SpanMaxSize","SpanMinSize","SpanningCharacters","SpanSymmetric","SparseArray","SparseArrayQ","SpatialBinnedPointData","SpatialBoundaryCorrection","SpatialEstimate","SpatialEstimatorFunction","SpatialGraphDistribution","SpatialJ","SpatialMedian","SpatialNoiseLevel","SpatialObservationRegionQ","SpatialPointData","SpatialPointSelect","SpatialRandomnessTest","SpatialTransformationLayer","SpatialTrendFunction","Speak","SpeakerMatchQ","SpearmanRankTest","SpearmanRho","Spe\ ciesData","SpecificityGoal","SpectralLineData","Spectrogram","SpectrogramArray","Specularity","SpeechCases","SpeechInterpreter","SpeechRecognize","SpeechSynthesize","SpellingCorrection","SpellingCorrectionList","SpellingDictionaries","SpellingDictionariesPath","SpellingOptions","Sphere","SphereBox","SphereBoxOptions","SpherePoints","SphericalBesselJ","SphericalBesselY","SphericalHankelH1","SphericalHankelH2","SphericalHarmonicY","SphericalPlot3D","SphericalRegion","SphericalShell","SpheroidalEig\ envalue","SpheroidalJoiningFactor","SpheroidalPS","SpheroidalPSPrime","SpheroidalQS","SpheroidalQSPrime","SpheroidalRadialFactor","SpheroidalS1","SpheroidalS1Prime","SpheroidalS2","SpheroidalS2Prime","Splice","SplicedDistribution","SplineClosed","SplineDegree","SplineKnots","SplineWeights","Split","SplitBy","SpokenString","SpotLight","Sqrt","SqrtBox","SqrtBoxOptions","Square","SquaredEuclideanDistance","SquareFreeQ","SquareIntersection","SquareMatrixQ","SquareRepeatingElement","SquaresR","Square\ Subset","SquareSubsetEqual","SquareSuperset","SquareSupersetEqual","SquareUnion","SquareWave","SSSTriangle","StabilityMargins","StabilityMarginsStyle","StableDistribution","Stack","StackBegin","StackComplete","StackedDateListPlot","StackedListPlot","StackInhibit","StadiumShape","StandardAtmosphereData","StandardDeviation","StandardDeviationFilter","StandardForm","Standardize","Standardized","StandardOceanData","StandbyDistribution","Star","StarClusterData","StarData","StarGraph","StartAsynchrono\ usTask","StartExternalSession","StartingStepSize","StartOfLine","StartOfString","StartProcess","StartScheduledTask","StartupSound","StartWebSession","StateDimensions","StateFeedbackGains","StateOutputEstimator","StateResponse","StateSpaceModel","StateSpaceRealization","StateSpaceTransform","StateTransformationLinearize","StationaryDistribution","StationaryWaveletPacketTransform","StationaryWaveletTransform","StatusArea","StatusCentrality","StepMonitor","StereochemistryElements","StieltjesGamma", "StippleShading","StirlingS1","StirlingS2","StopAsynchronousTask","StoppingPowerData","StopScheduledTask","StrataVariables","StratonovichProcess","StraussHardcorePointProcess","StraussPointProcess","StreamColorFunction","StreamColorFunctionScaling","StreamDensityPlot","StreamMarkers","StreamPlot","StreamPlot3D","StreamPoints","StreamPosition","Streams","StreamScale","StreamStyle","StrictInequalities","String","StringBreak","StringByteCount","StringCases","StringContainsQ","StringCount","StringDe\ lete","StringDrop","StringEndsQ","StringExpression","StringExtract","StringForm","StringFormat","StringFormatQ","StringFreeQ","StringInsert","StringJoin","StringLength","StringMatchQ","StringPadLeft","StringPadRight","StringPart","StringPartition","StringPosition","StringQ","StringRepeat","StringReplace","StringReplaceList","StringReplacePart","StringReverse","StringRiffle","StringRotateLeft","StringRotateRight","StringSkeleton","StringSplit","StringStartsQ","StringTake","StringTakeDrop","String\ Template","StringToByteArray","StringToStream","StringTrim","StripBoxes","StripOnInput","StripStyleOnPaste","StripWrapperBoxes","StrokeForm","Struckthrough","StructuralImportance","StructuredArray","StructuredArrayHeadQ","StructuredSelection","StruveH","StruveL","Stub","StudentTDistribution","Style","StyleBox","StyleBoxAutoDelete","StyleData","StyleDefinitions","StyleForm","StyleHints","StyleKeyMapping","StyleMenuListing","StyleNameDialogSettings","StyleNames","StylePrint","StyleSheetPath","Subd\ ivide","Subfactorial","Subgraph","SubMinus","SubPlus","SubresultantPolynomialRemainders","SubresultantPolynomials","Subresultants","Subscript","SubscriptBox","SubscriptBoxOptions","Subscripted","Subsequences","Subset","SubsetCases","SubsetCount","SubsetEqual","SubsetMap","SubsetPosition","SubsetQ","SubsetReplace","Subsets","SubStar","SubstitutionSystem","Subsuperscript","SubsuperscriptBox","SubsuperscriptBoxOptions","SubtitleEncoding","SubtitleTrackSelection","Subtract","SubtractFrom","SubtractS\ ides","SubValues","Succeeds","SucceedsEqual","SucceedsSlantEqual","SucceedsTilde","Success","SuchThat","Sum","SumConvergence","SummationLayer","Sunday","SunPosition","Sunrise","Sunset","SuperDagger","SuperMinus","SupernovaData","SuperPlus","Superscript","SuperscriptBox","SuperscriptBoxOptions","Superset","SupersetEqual","SuperStar","Surd","SurdForm","SurfaceAppearance","SurfaceArea","SurfaceColor","SurfaceData","SurfaceGraphics","SurvivalDistribution","SurvivalFunction","SurvivalModel","Survival\ ModelFit","SuspendPacket","SuzukiDistribution","SuzukiGroupSuz","SwatchLegend","Switch","Symbol","SymbolName","SymletWavelet","Symmetric","SymmetricDifference","SymmetricGroup","SymmetricKey","SymmetricMatrixQ","SymmetricPolynomial","SymmetricReduction","Symmetrize","SymmetrizedArray","SymmetrizedArrayRules","SymmetrizedDependentComponents","SymmetrizedIndependentComponents","SymmetrizedReplacePart","SynchronousInitialization","SynchronousUpdating","Synonyms","Syntax","SyntaxForm","SyntaxInforma\ tion","SyntaxLength","SyntaxPacket","SyntaxQ","SynthesizeMissingValues","SystemCredential","SystemCredentialData","SystemCredentialKey","SystemCredentialKeys","SystemCredentialStoreObject","SystemDialogInput","SystemException","SystemGet","SystemHelpPath","SystemInformation","SystemInformationData","SystemInstall","SystemModel","SystemModeler","SystemModelExamples","SystemModelLinearize","SystemModelMeasurements","SystemModelParametricSimulate","SystemModelPlot","SystemModelProgressReporting","S\ ystemModelReliability","SystemModels","SystemModelSimulate","SystemModelSimulateSensitivity","SystemModelSimulationData","SystemOpen","SystemOptions","SystemProcessData","SystemProcesses","SystemsConnectionsModel","SystemsModelControllerData","SystemsModelDelay","SystemsModelDelayApproximate","SystemsModelDelete","SystemsModelDimensions","SystemsModelExtract","SystemsModelFeedbackConnect","SystemsModelLabels","SystemsModelLinearity","SystemsModelMerge","SystemsModelOrder","SystemsModelParallelCo\ nnect","SystemsModelSeriesConnect","SystemsModelStateFeedbackConnect","SystemsModelVectorRelativeOrders","SystemStub","SystemTest","Tab","TabFilling","Table","TableAlignments","TableDepth","TableDirections","TableForm","TableHeadings","TableSpacing","TableView","TableViewBox","TableViewBoxAlignment","TableViewBoxBackground","TableViewBoxHeaders","TableViewBoxItemSize","TableViewBoxItemStyle","TableViewBoxOptions","TabSpacings","TabView","TabViewBox","TabViewBoxOptions","TagBox","TagBoxNote","Tag\ BoxOptions","TaggingRules","TagSet","TagSetDelayed","TagStyle","TagUnset","Take","TakeDrop","TakeLargest","TakeLargestBy","TakeList","TakeSmallest","TakeSmallestBy","TakeWhile","Tally","Tan","Tanh","TargetDevice","TargetFunctions","TargetSystem","TargetUnits","TaskAbort","TaskExecute","TaskObject","TaskRemove","TaskResume","Tasks","TaskSuspend","TaskWait","TautologyQ","TelegraphProcess","TemplateApply","TemplateArgBox","TemplateBox","TemplateBoxOptions","TemplateEvaluate","TemplateExpression","T\ emplateIf","TemplateObject","TemplateSequence","TemplateSlot","TemplateSlotSequence","TemplateUnevaluated","TemplateVerbatim","TemplateWith","TemporalData","TemporalRegularity","Temporary","TemporaryVariable","TensorContract","TensorDimensions","TensorExpand","TensorProduct","TensorQ","TensorRank","TensorReduce","TensorSymmetry","TensorTranspose","TensorWedge","TerminatedEvaluation","TernaryListPlot","TernaryPlotCorners","TestID","TestReport","TestReportObject","TestResultObject","Tetrahedron","\ TetrahedronBox","TetrahedronBoxOptions","TeXForm","TeXSave","Text","Text3DBox","Text3DBoxOptions","TextAlignment","TextBand","TextBoundingBox","TextBox","TextCases","TextCell","TextClipboardType","TextContents","TextData","TextElement","TextForm","TextGrid","TextJustification","TextLine","TextPacket","TextParagraph","TextPosition","TextRecognize","TextSearch","TextSearchReport","TextSentences","TextString","TextStructure","TextStyle","TextTranslation","Texture","TextureCoordinateFunction","Textu\ reCoordinateScaling","TextWords","Therefore","ThermodynamicData","ThermometerGauge","Thick","Thickness","Thin","Thinning","ThisLink","ThomasPointProcess","ThompsonGroupTh","Thread","Threaded","ThreadingLayer","ThreeJSymbol","Threshold","Through","Throw","ThueMorse","Thumbnail","Thursday","TickDirection","TickLabelOrientation","TickLabelPositioning","TickLabels","TickLengths","TickPositions","Ticks","TicksStyle","TideData","Tilde","TildeEqual","TildeFullEqual","TildeTilde","TimeConstrained","Time\ Constraint","TimeDirection","TimeFormat","TimeGoal","TimelinePlot","TimeObject","TimeObjectQ","TimeRemaining","Times","TimesBy","TimeSeries","TimeSeriesAggregate","TimeSeriesForecast","TimeSeriesInsert","TimeSeriesInvertibility","TimeSeriesMap","TimeSeriesMapThread","TimeSeriesModel","TimeSeriesModelFit","TimeSeriesResample","TimeSeriesRescale","TimeSeriesShift","TimeSeriesThread","TimeSeriesWindow","TimeSystem","TimeSystemConvert","TimeUsed","TimeValue","TimeWarpingCorrespondence","TimeWarpingD\ istance","TimeZone","TimeZoneConvert","TimeZoneOffset","Timing","Tiny","TitleGrouping","TitsGroupT","ToBoxes","ToCharacterCode","ToColor","ToContinuousTimeModel","ToDate","Today","ToDiscreteTimeModel","ToEntity","ToeplitzMatrix","ToExpression","ToFileName","Together","Toggle","ToggleFalse","Toggler","TogglerBar","TogglerBox","TogglerBoxOptions","ToHeldExpression","ToInvertibleTimeSeries","TokenWords","Tolerance","ToLowerCase","Tomorrow","ToNumberField","TooBig","Tooltip","TooltipBox","TooltipBox\ Options","TooltipDelay","TooltipStyle","ToonShading","Top","TopHatTransform","ToPolarCoordinates","TopologicalSort","ToRadicals","ToRawPointer","ToRules","Torus","TorusGraph","ToSphericalCoordinates","ToString","Total","TotalHeight","TotalLayer","TotalVariationFilter","TotalWidth","TouchPosition","TouchscreenAutoZoom","TouchscreenControlPlacement","ToUpperCase","TourVideo","Tr","Trace","TraceAbove","TraceAction","TraceBackward","TraceDepth","TraceDialog","TraceForward","TraceInternal","TraceLeve\ l","TraceOff","TraceOn","TraceOriginal","TracePrint","TraceScan","TrackCellChangeTimes","TrackedSymbols","TrackingFunction","TracyWidomDistribution","TradingChart","TraditionalForm","TraditionalFunctionNotation","TraditionalNotation","TraditionalOrder","TrainImageContentDetector","TrainingProgressCheckpointing","TrainingProgressFunction","TrainingProgressMeasurements","TrainingProgressReporting","TrainingStoppingCriterion","TrainingUpdateSchedule","TrainTextContentDetector","TransferFunctionCanc\ el","TransferFunctionExpand","TransferFunctionFactor","TransferFunctionModel","TransferFunctionPoles","TransferFunctionTransform","TransferFunctionZeros","TransformationClass","TransformationFunction","TransformationFunctions","TransformationMatrix","TransformedDistribution","TransformedField","TransformedProcess","TransformedRegion","TransitionDirection","TransitionDuration","TransitionEffect","TransitiveClosureGraph","TransitiveReductionGraph","Translate","TranslationOptions","TranslationTrans\ form","Transliterate","Transparent","TransparentColor","Transpose","TransposeLayer","TrapEnterKey","TrapSelection","TravelDirections","TravelDirectionsData","TravelDistance","TravelDistanceList","TravelMethod","TravelTime","Tree","TreeCases","TreeChildren","TreeCount","TreeData","TreeDelete","TreeDepth","TreeElementCoordinates","TreeElementLabel","TreeElementLabelFunction","TreeElementLabelStyle","TreeElementShape","TreeElementShapeFunction","TreeElementSize","TreeElementSizeFunction","TreeEleme\ ntStyle","TreeElementStyleFunction","TreeExpression","TreeExtract","TreeFold","TreeForm","TreeGraph","TreeGraphQ","TreeInsert","TreeLayout","TreeLeafCount","TreeLeafQ","TreeLeaves","TreeLevel","TreeMap","TreeMapAt","TreeOutline","TreePlot","TreePosition","TreeQ","TreeReplacePart","TreeRules","TreeScan","TreeSelect","TreeSize","TreeTraversalOrder","TrendStyle","Triangle","TriangleCenter","TriangleConstruct","TriangleMeasurement","TriangleWave","TriangularDistribution","TriangulateMesh","Trig","Tr\ igExpand","TrigFactor","TrigFactorList","Trigger","TrigReduce","TrigToExp","TrimmedMean","TrimmedVariance","TropicalStormData","True","TrueQ","TruncatedDistribution","TruncatedPolyhedron","TsallisQExponentialDistribution","TsallisQGaussianDistribution","TTest","Tube","TubeBezierCurveBox","TubeBezierCurveBoxOptions","TubeBox","TubeBoxOptions","TubeBSplineCurveBox","TubeBSplineCurveBoxOptions","Tuesday","TukeyLambdaDistribution","TukeyWindow","TunnelData","Tuples","TuranGraph","TuringMachine","Tut\ tePolynomial","TwoWayRule","Typed","TypeDeclaration","TypeEvaluate","TypeHint","TypeOf","TypeSpecifier","UnateQ","Uncompress","UnconstrainedParameters","Undefined","UnderBar","Underflow","Underlined","Underoverscript","UnderoverscriptBox","UnderoverscriptBoxOptions","Underscript","UnderscriptBox","UnderscriptBoxOptions","UnderseaFeatureData","UndirectedEdge","UndirectedGraph","UndirectedGraphQ","UndoOptions","UndoTrackedVariables","Unequal","UnequalTo","Unevaluated","UniformDistribution","Unifor\ mGraphDistribution","UniformPolyhedron","UniformSumDistribution","Uninstall","Union","UnionedEntityClass","UnionPlus","Unique","UniqueElements","UnitaryMatrixQ","UnitBox","UnitConvert","UnitDimensions","Unitize","UnitRootTest","UnitSimplify","UnitStep","UnitSystem","UnitTriangle","UnitVector","UnitVectorLayer","UnityDimensions","UniverseModelData","UniversityData","UnixTime","UnlabeledTree","UnmanageObject","Unprotect","UnregisterExternalEvaluator","UnsameQ","UnsavedVariables","Unset","UnsetShar\ ed","Until","UntrackedVariables","Up","UpArrow","UpArrowBar","UpArrowDownArrow","Update","UpdateDynamicObjects","UpdateDynamicObjectsSynchronous","UpdateInterval","UpdatePacletSites","UpdateSearchIndex","UpDownArrow","UpEquilibrium","UpperCaseQ","UpperLeftArrow","UpperRightArrow","UpperTriangularize","UpperTriangularMatrix","UpperTriangularMatrixQ","Upsample","UpSet","UpSetDelayed","UpTee","UpTeeArrow","UpTo","UpValues","URL","URLBuild","URLDecode","URLDispatcher","URLDownload","URLDownloadSubmi\ t","URLEncode","URLExecute","URLExpand","URLFetch","URLFetchAsynchronous","URLParse","URLQueryDecode","URLQueryEncode","URLRead","URLResponseTime","URLSave","URLSaveAsynchronous","URLShorten","URLSubmit","UseEmbeddedLibrary","UseGraphicsRange","UserDefinedWavelet","Using","UsingFrontEnd","UtilityFunction","V2Get","ValenceErrorHandling","ValenceFilling","ValidationLength","ValidationSet","ValueBox","ValueBoxOptions","ValueDimensions","ValueForm","ValuePreprocessingFunction","ValueQ","Values","Val\ uesData","VandermondeMatrix","Variables","Variance","VarianceEquivalenceTest","VarianceEstimatorFunction","VarianceGammaDistribution","VarianceGammaPointProcess","VarianceTest","VariogramFunction","VariogramModel","VectorAngle","VectorAround","VectorAspectRatio","VectorColorFunction","VectorColorFunctionScaling","VectorDensityPlot","VectorDisplacementPlot","VectorDisplacementPlot3D","VectorGlyphData","VectorGreater","VectorGreaterEqual","VectorLess","VectorLessEqual","VectorMarkers","VectorPlot", "VectorPlot3D","VectorPoints","VectorQ","VectorRange","Vectors","VectorScale","VectorScaling","VectorSizes","VectorStyle","Vee","Verbatim","Verbose","VerificationTest","VerifyConvergence","VerifyDerivedKey","VerifyDigitalSignature","VerifyFileSignature","VerifyInterpretation","VerifySecurityCertificates","VerifySolutions","VerifyTestAssumptions","VersionedPreferences","VertexAdd","VertexCapacity","VertexChromaticNumber","VertexColors","VertexComponent","VertexConnectivity","VertexContract","Vert\ exCoordinateRules","VertexCoordinates","VertexCorrelationSimilarity","VertexCosineSimilarity","VertexCount","VertexCoverQ","VertexDataCoordinates","VertexDegree","VertexDelete","VertexDiceSimilarity","VertexEccentricity","VertexInComponent","VertexInComponentGraph","VertexInDegree","VertexIndex","VertexJaccardSimilarity","VertexLabeling","VertexLabels","VertexLabelStyle","VertexList","VertexNormals","VertexOutComponent","VertexOutComponentGraph","VertexOutDegree","VertexQ","VertexRenderingFuncti\ on","VertexReplace","VertexShape","VertexShapeFunction","VertexSize","VertexStyle","VertexTextureCoordinates","VertexTransitiveGraphQ","VertexWeight","VertexWeightedGraphQ","Vertical","VerticalBar","VerticalForm","VerticalGauge","VerticalSeparator","VerticalSlider","VerticalTilde","Video","VideoCapture","VideoCombine","VideoDelete","VideoEncoding","VideoExtractFrames","VideoFrameList","VideoFrameMap","VideoGenerator","VideoInsert","VideoIntervals","VideoJoin","VideoMap","VideoMapList","VideoMapT\ imeSeries","VideoPadding","VideoPause","VideoPlay","VideoQ","VideoRecord","VideoReplace","VideoScreenCapture","VideoSplit","VideoStop","VideoStream","VideoStreams","VideoTimeStretch","VideoTrackSelection","VideoTranscode","VideoTransparency","VideoTrim","ViewAngle","ViewCenter","ViewMatrix","ViewPoint","ViewPointSelectorSettings","ViewPort","ViewProjection","ViewRange","ViewVector","ViewVertical","VirtualGroupData","Visible","VisibleCell","VoiceStyleData","VoigtDistribution","VolcanoData","Volum\ e","VonMisesDistribution","VoronoiMesh","WaitAll","WaitAsynchronousTask","WaitNext","WaitUntil","WakebyDistribution","WalleniusHypergeometricDistribution","WaringYuleDistribution","WarpingCorrespondence","WarpingDistance","WatershedComponents","WatsonUSquareTest","WattsStrogatzGraphDistribution","WaveletBestBasis","WaveletFilterCoefficients","WaveletImagePlot","WaveletListPlot","WaveletMapIndexed","WaveletMatrixPlot","WaveletPhi","WaveletPsi","WaveletScale","WaveletScalogram","WaveletThreshold", "WavePDEComponent","WeaklyConnectedComponents","WeaklyConnectedGraphComponents","WeaklyConnectedGraphQ","WeakStationarity","WeatherData","WeatherForecastData","WebAudioSearch","WebColumn","WebElementObject","WeberE","WebExecute","WebImage","WebImageSearch","WebItem","WebPageMetaInformation","WebRow","WebSearch","WebSessionObject","WebSessions","WebWindowObject","Wedge","Wednesday","WeibullDistribution","WeierstrassE1","WeierstrassE2","WeierstrassE3","WeierstrassEta1","WeierstrassEta2","Weierstra\ ssEta3","WeierstrassHalfPeriods","WeierstrassHalfPeriodW1","WeierstrassHalfPeriodW2","WeierstrassHalfPeriodW3","WeierstrassInvariantG2","WeierstrassInvariantG3","WeierstrassInvariants","WeierstrassP","WeierstrassPPrime","WeierstrassSigma","WeierstrassZeta","WeightedAdjacencyGraph","WeightedAdjacencyMatrix","WeightedData","WeightedGraphQ","Weights","WelchWindow","WheelGraph","WhenEvent","Which","While","White","WhiteNoiseProcess","WhitePoint","Whitespace","WhitespaceCharacter","WhittakerM","Whitt\ akerW","WholeCellGroupOpener","WienerFilter","WienerProcess","WignerD","WignerSemicircleDistribution","WikidataData","WikidataSearch","WikipediaData","WikipediaSearch","WilksW","WilksWTest","WindDirectionData","WindingCount","WindingPolygon","WindowClickSelect","WindowElements","WindowFloating","WindowFrame","WindowFrameElements","WindowMargins","WindowMovable","WindowOpacity","WindowPersistentStyles","WindowSelected","WindowSize","WindowStatusArea","WindowTitle","WindowToolbars","WindowWidth","\ WindSpeedData","WindVectorData","WinsorizedMean","WinsorizedVariance","WishartMatrixDistribution","With","WithCleanup","WithLock","WolframAlpha","WolframAlphaDate","WolframAlphaQuantity","WolframAlphaResult","WolframCloudSettings","WolframLanguageData","Word","WordBoundary","WordCharacter","WordCloud","WordCount","WordCounts","WordData","WordDefinition","WordFrequency","WordFrequencyData","WordList","WordOrientation","WordSearch","WordSelectionFunction","WordSeparators","WordSpacings","WordStem", "WordTranslation","WorkingPrecision","WrapAround","Write","WriteLine","WriteString","Wronskian","XMLElement","XMLObject","XMLTemplate","Xnor","Xor","XYZColor","Yellow","Yesterday","YuleDissimilarity","ZernikeR","ZeroSymmetric","ZeroTest","ZeroWidthTimes","Zeta","ZetaZero","ZIPCodeData","ZipfDistribution","ZoomCenter","ZoomFactor","ZTest","ZTransform","$Aborted","$ActivationGroupID","$ActivationKey","$ActivationUserRegistered","$AddOnsDirectory","$AllowDataUpdates","$AllowExternalChannelFunctions", "$AllowInternet","$AssertFunction","$Assumptions","$AsynchronousTask","$AudioDecoders","$AudioEncoders","$AudioInputDevices","$AudioOutputDevices","$BaseDirectory","$BasePacletsDirectory","$BatchInput","$BatchOutput","$BlockchainBase","$BoxForms","$ByteOrdering","$CacheBaseDirectory","$Canceled","$ChannelBase","$CharacterEncoding","$CharacterEncodings","$CloudAccountName","$CloudBase","$CloudConnected","$CloudConnection","$CloudCreditsAvailable","$CloudEvaluation","$CloudExpressionBase","$CloudO\ bjectNameFormat","$CloudObjectURLType","$CloudRootDirectory","$CloudSymbolBase","$CloudUserID","$CloudUserUUID","$CloudVersion","$CloudVersionNumber","$CloudWolframEngineVersionNumber","$CommandLine","$CompilationTarget","$CompilerEnvironment","$ConditionHold","$ConfiguredKernels","$Context","$ContextAliases","$ContextPath","$ControlActiveSetting","$Cookies","$CookieStore","$CreationDate","$CryptographicEllipticCurveNames","$CurrentLink","$CurrentTask","$CurrentWebSession","$DataStructures","$Da\ teStringFormat","$DefaultAudioInputDevice","$DefaultAudioOutputDevice","$DefaultFont","$DefaultFrontEnd","$DefaultImagingDevice","$DefaultKernels","$DefaultLocalBase","$DefaultLocalKernel","$DefaultMailbox","$DefaultNetworkInterface","$DefaultPath","$DefaultProxyRules","$DefaultRemoteBatchSubmissionEnvironment","$DefaultRemoteKernel","$DefaultSystemCredentialStore","$Display","$DisplayFunction","$DistributedContexts","$DynamicEvaluation","$Echo","$EmbedCodeEnvironments","$EmbeddableServices","$E\ ntityStores","$Epilog","$EvaluationCloudBase","$EvaluationCloudObject","$EvaluationEnvironment","$ExportFormats","$ExternalIdentifierTypes","$ExternalStorageBase","$Failed","$FinancialDataSource","$FontFamilies","$FormatType","$FrontEnd","$FrontEndSession","$GeneratedAssetLocation","$GeoEntityTypes","$GeoLocation","$GeoLocationCity","$GeoLocationCountry","$GeoLocationPrecision","$GeoLocationSource","$HistoryLength","$HomeDirectory","$HTMLExportRules","$HTTPCookies","$HTTPRequest","$IgnoreEOF","$\ ImageFormattingWidth","$ImageResolution","$ImagingDevice","$ImagingDevices","$ImportFormats","$IncomingMailSettings","$InitialDirectory","$Initialization","$InitializationContexts","$Input","$InputFileName","$InputStreamMethods","$Inspector","$InstallationDate","$InstallationDirectory","$InterfaceEnvironment","$InterpreterTypes","$IterationLimit","$KernelCount","$KernelID","$Language","$LaunchDirectory","$LibraryPath","$LicenseExpirationDate","$LicenseID","$LicenseProcesses","$LicenseServer","$L\ icenseSubprocesses","$LicenseType","$Line","$Linked","$LinkSupported","$LoadedFiles","$LocalBase","$LocalSymbolBase","$MachineAddresses","$MachineDomain","$MachineDomains","$MachineEpsilon","$MachineID","$MachineName","$MachinePrecision","$MachineType","$MaxDisplayedChildren","$MaxExtraPrecision","$MaxLicenseProcesses","$MaxLicenseSubprocesses","$MaxMachineNumber","$MaxNumber","$MaxPiecewiseCases","$MaxPrecision","$MaxRootDegree","$MessageGroups","$MessageList","$MessagePrePrint","$Messages","$M\ inMachineNumber","$MinNumber","$MinorReleaseNumber","$MinPrecision","$MobilePhone","$ModuleNumber","$NetworkConnected","$NetworkInterfaces","$NetworkLicense","$NewMessage","$NewSymbol","$NotebookInlineStorageLimit","$Notebooks","$NoValue","$NumberMarks","$Off","$OperatingSystem","$Output","$OutputForms","$OutputSizeLimit","$OutputStreamMethods","$Packages","$ParentLink","$ParentProcessID","$PasswordFile","$PatchLevelID","$Path","$PathnameSeparator","$PerformanceGoal","$Permissions","$Permissions\ GroupBase","$PersistenceBase","$PersistencePath","$PipeSupported","$PlotTheme","$Post","$Pre","$PreferencesDirectory","$PreInitialization","$PrePrint","$PreRead","$PrintForms","$PrintLiteral","$Printout3DPreviewer","$ProcessID","$ProcessorCount","$ProcessorType","$ProductInformation","$ProgramName","$ProgressReporting","$PublisherID","$RandomGeneratorState","$RandomState","$RecursionLimit","$RegisteredDeviceClasses","$RegisteredUserName","$ReleaseNumber","$RequesterAddress","$RequesterCloudUserI\ D","$RequesterCloudUserUUID","$RequesterWolframID","$RequesterWolframUUID","$ResourceSystemBase","$ResourceSystemPath","$RootDirectory","$ScheduledTask","$ScriptCommandLine","$ScriptInputString","$SecuredAuthenticationKeyTokens","$ServiceCreditsAvailable","$Services","$SessionID","$SetParentLink","$SharedFunctions","$SharedVariables","$SoundDisplay","$SoundDisplayFunction","$SourceLink","$SSHAuthentication","$SubtitleDecoders","$SubtitleEncoders","$SummaryBoxDataSizeLimit","$SuppressInputFormHea\ ds","$SynchronousEvaluation","$SyntaxHandler","$System","$SystemCharacterEncoding","$SystemCredentialStore","$SystemID","$SystemMemory","$SystemShell","$SystemTimeZone","$SystemWordLength","$TargetSystems","$TemplatePath","$TemporaryDirectory","$TemporaryPrefix","$TestFileName","$TextStyle","$TimedOut","$TimeUnit","$TimeZone","$TimeZoneEntity","$TopDirectory","$TraceOff","$TraceOn","$TracePattern","$TracePostAction","$TracePreAction","$UnitSystem","$Urgent","$UserAddOnsDirectory","$UserAgentLang\ uages","$UserAgentMachine","$UserAgentName","$UserAgentOperatingSystem","$UserAgentString","$UserAgentVersion","$UserBaseDirectory","$UserBasePacletsDirectory","$UserDocumentsDirectory","$Username","$UserName","$UserURLBase","$Version","$VersionNumber","$VideoDecoders","$VideoEncoders","$VoiceStyles","$WolframDocumentsDirectory","$WolframID","$WolframUUID"];function mathematica(hljs){const regex=hljs.regex,BASE_RE=/([2-9]|[1-2]\d|[3][0-5])\^\^/,BASE_DIGITS_RE=/(\w*\.\w+|\w+\.\w*|\w+)/,NUMBER_RE=/(\d*\.\d+|\d+\.\d*|\d+)/, BASE_NUMBER_RE=regex.either(regex.concat(BASE_RE,BASE_DIGITS_RE),NUMBER_RE),ACCURACY_RE=/``[+-]?(\d*\.\d+|\d+\.\d*|\d+)/,PRECISION_RE=/`([+-]?(\d*\.\d+|\d+\.\d*|\d+))?/,APPROXIMATE_NUMBER_RE=regex.either(ACCURACY_RE,PRECISION_RE),SCIENTIFIC_NOTATION_RE=/\*\^[+-]?\d+/,NUMBERS={className:"number",relevance:0,begin:regex.concat(BASE_NUMBER_RE,regex.optional(APPROXIMATE_NUMBER_RE),regex.optional(SCIENTIFIC_NOTATION_RE))},SYMBOL_RE=/[a-zA-Z$][a-zA-Z0-9$]*/,SYSTEM_SYMBOLS_SET=new Set(SYSTEM_SYMBOLS),SYMBOLS={ variants:[{className:"builtin-symbol",begin:SYMBOL_RE,"on:begin":(match,response)=>{SYSTEM_SYMBOLS_SET.has(match[0])||response.ignoreMatch()}},{className:"symbol",relevance:0,begin:SYMBOL_RE}]},NAMED_CHARACTER={className:"named-character",begin:/\\\[[$a-zA-Z][$a-zA-Z0-9]+\]/},OPERATORS={className:"operator",relevance:0,begin:/[+\-*/,;.:@~=><&|_`'^?!%]+/},PATTERNS={className:"pattern",relevance:0,begin:/([a-zA-Z$][a-zA-Z0-9$]*)?_+([a-zA-Z$][a-zA-Z0-9$]*)?/},SLOTS={className:"slot",relevance:0,begin:/#[a-zA-Z$][a-zA-Z0-9$]*|#+[0-9]?/}, BRACES={className:"brace",relevance:0,begin:/[[\](){}]/},MESSAGES={className:"message-name",relevance:0,begin:regex.concat("::",SYMBOL_RE)};return{name:"Mathematica",aliases:["mma","wl"],classNameAliases:{brace:"punctuation",pattern:"type",slot:"type",symbol:"variable","named-character":"variable","builtin-symbol":"built_in","message-name":"string"},contains:[hljs.COMMENT(/\(\*/,/\*\)/,{contains:["self"]}),PATTERNS,SLOTS,MESSAGES,SYMBOLS,NAMED_CHARACTER,hljs.QUOTE_STRING_MODE,NUMBERS,OPERATORS,BRACES]}} function matlab(hljs){const TRANSPOSE_RE="('|\\.')+",TRANSPOSE={relevance:0,contains:[{begin:TRANSPOSE_RE}]};return{name:"Matlab",keywords:{keyword:"arguments break case catch classdef continue else elseif end enumeration events for function global if methods otherwise parfor persistent properties return spmd switch try while",built_in:"sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch \ cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repm\ at rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i|0 inf nan isnan isinf isfinite j|0 why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson max min nanmax nanmin mean nanmean type table readtabl\ e writetable sortrows sort figure plot plot3 scatter scatter3 cellfun legend intersect ismember procrustes hold num2cell "},illegal:'(//|"|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[hljs.UNDERSCORE_TITLE_MODE,{className:"params",variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}]}]},{className:"built_in",begin:/true|false/,relevance:0,starts:TRANSPOSE},{begin:"[a-zA-Z][a-zA-Z_0-9]*"+TRANSPOSE_RE,relevance:0},{className:"number",begin:hljs. C_NUMBER_RE,relevance:0,starts:TRANSPOSE},{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},{begin:/\]|\}|\)/,relevance:0,starts:TRANSPOSE},{className:"string",begin:'"',end:'"',contains:[{begin:'""'}],starts:TRANSPOSE},hljs.COMMENT("^\\s*%\\{\\s*$","^\\s*%\\}\\s*$"),hljs.COMMENT("%","$")]}}function maxima(hljs){return{name:"Maxima",keywords:{$pattern:"[A-Za-z_%][0-9A-Za-z_%]*",keyword:"if then else elseif for thru do while unless step in and or not",literal:"true false unknown inf \ minf ind und %e %i %pi %phi %gamma",built_in:" abasep abs absint absolute_real_time acos acosh acot acoth acsc acsch activate addcol add_edge add_edges addmatrices addrow add_vertex add_vertices adjacency_matrix adjoin adjoint af agd airy airy_ai airy_bi airy_dai airy_dbi algsys alg_type alias allroots alphacharp alphanumericp amortization %and annuity_fv annuity_pv antid antidiff AntiDifference append appendfile apply apply1 apply2 applyb1 apropos args arit_amortization arithmetic arithsum arra\ y arrayapply arrayinfo arraymake arraysetapply ascii asec asech asin asinh askinteger asksign assoc assoc_legendre_p assoc_legendre_q assume assume_external_byte_order asympa at atan atan2 atanh atensimp atom atvalue augcoefmatrix augmented_lagrangian_method av average_degree backtrace bars barsplot barsplot_description base64 base64_decode bashindices batch batchload bc2 bdvac belln benefit_cost bern bernpoly bernstein_approx bernstein_expand bernstein_poly bessel bessel_i bessel_j bessel_k bes\ sel_simplify bessel_y beta beta_incomplete beta_incomplete_generalized beta_incomplete_regularized bezout bfallroots bffac bf_find_root bf_fmin_cobyla bfhzeta bfloat bfloatp bfpsi bfpsi0 bfzeta biconnected_components bimetric binomial bipartition block blockmatrixp bode_gain bode_phase bothcoef box boxplot boxplot_description break bug_report build_info|10 buildq build_sample burn cabs canform canten cardinality carg cartan cartesian_product catch cauchy_matrix cbffac cdf_bernoulli cdf_beta cdf_\ binomial cdf_cauchy cdf_chi2 cdf_continuous_uniform cdf_discrete_uniform cdf_exp cdf_f cdf_gamma cdf_general_finite_discrete cdf_geometric cdf_gumbel cdf_hypergeometric cdf_laplace cdf_logistic cdf_lognormal cdf_negative_binomial cdf_noncentral_chi2 cdf_noncentral_student_t cdf_normal cdf_pareto cdf_poisson cdf_rank_sum cdf_rayleigh cdf_signed_rank cdf_student_t cdf_weibull cdisplay ceiling central_moment cequal cequalignore cf cfdisrep cfexpand cgeodesic cgreaterp cgreaterpignore changename cha\ ngevar chaosgame charat charfun charfun2 charlist charp charpoly chdir chebyshev_t chebyshev_u checkdiv check_overlaps chinese cholesky christof chromatic_index chromatic_number cint circulant_graph clear_edge_weight clear_rules clear_vertex_label clebsch_gordan clebsch_graph clessp clesspignore close closefile cmetric coeff coefmatrix cograd col collapse collectterms columnop columnspace columnswap columnvector combination combine comp2pui compare compfile compile compile_file complement_graph \ complete_bipartite_graph complete_graph complex_number_p components compose_functions concan concat conjugate conmetderiv connected_components connect_vertices cons constant constantp constituent constvalue cont2part content continuous_freq contortion contour_plot contract contract_edge contragrad contrib_ode convert coord copy copy_file copy_graph copylist copymatrix cor cos cosh cot coth cov cov1 covdiff covect covers crc24sum create_graph create_list csc csch csetup cspline ctaylor ct_coordsy\ s ctransform ctranspose cube_graph cuboctahedron_graph cunlisp cv cycle_digraph cycle_graph cylindrical days360 dblint deactivate declare declare_constvalue declare_dimensions declare_fundamental_dimensions declare_fundamental_units declare_qty declare_translated declare_unit_conversion declare_units declare_weights decsym defcon define define_alt_display define_variable defint defmatch defrule defstruct deftaylor degree_sequence del delete deleten delta demo demoivre denom depends derivdegree d\ erivlist describe desolve determinant dfloat dgauss_a dgauss_b dgeev dgemm dgeqrf dgesv dgesvd diag diagmatrix diag_matrix diagmatrixp diameter diff digitcharp dimacs_export dimacs_import dimension dimensionless dimensions dimensions_as_list direct directory discrete_freq disjoin disjointp disolate disp dispcon dispform dispfun dispJordan display disprule dispterms distrib divide divisors divsum dkummer_m dkummer_u dlange dodecahedron_graph dotproduct dotsimp dpart draw draw2d draw3d drawdf draw\ _file draw_graph dscalar echelon edge_coloring edge_connectivity edges eigens_by_jacobi eigenvalues eigenvectors eighth einstein eivals eivects elapsed_real_time elapsed_run_time ele2comp ele2polynome ele2pui elem elementp elevation_grid elim elim_allbut eliminate eliminate_using ellipse elliptic_e elliptic_ec elliptic_eu elliptic_f elliptic_kc elliptic_pi ematrix empty_graph emptyp endcons entermatrix entertensor entier equal equalp equiv_classes erf erfc erf_generalized erfi errcatch error err\ ormsg errors euler ev eval_string evenp every evolution evolution2d evundiff example exp expand expandwrt expandwrt_factored expint expintegral_chi expintegral_ci expintegral_e expintegral_e1 expintegral_ei expintegral_e_simplify expintegral_li expintegral_shi expintegral_si explicit explose exponentialize express expt exsec extdiff extract_linear_equations extremal_subset ezgcd %f f90 facsum factcomb factor factorfacsum factorial factorout factorsum facts fast_central_elements fast_linsolve fas\ ttimes featurep fernfale fft fib fibtophi fifth filename_merge file_search file_type fillarray findde find_root find_root_abs find_root_error find_root_rel first fix flatten flength float floatnump floor flower_snark flush flush1deriv flushd flushnd flush_output fmin_cobyla forget fortran fourcos fourexpand fourier fourier_elim fourint fourintcos fourintsin foursimp foursin fourth fposition frame_bracket freeof freshline fresnel_c fresnel_s from_adjacency_matrix frucht_graph full_listify fullmap\ fullmapl fullratsimp fullratsubst fullsetify funcsolve fundamental_dimensions fundamental_units fundef funmake funp fv g0 g1 gamma gamma_greek gamma_incomplete gamma_incomplete_generalized gamma_incomplete_regularized gauss gauss_a gauss_b gaussprob gcd gcdex gcdivide gcfac gcfactor gd generalized_lambert_w genfact gen_laguerre genmatrix gensym geo_amortization geo_annuity_fv geo_annuity_pv geomap geometric geometric_mean geosum get getcurrentdirectory get_edge_weight getenv get_lu_factors get_\ output_stream_string get_pixel get_plot_option get_tex_environment get_tex_environment_default get_vertex_label gfactor gfactorsum ggf girth global_variances gn gnuplot_close gnuplot_replot gnuplot_reset gnuplot_restart gnuplot_start go Gosper GosperSum gr2d gr3d gradef gramschmidt graph6_decode graph6_encode graph6_export graph6_import graph_center graph_charpoly graph_eigenvalues graph_flow graph_order graph_periphery graph_product graph_size graph_union great_rhombicosidodecahedron_graph grea\ t_rhombicuboctahedron_graph grid_graph grind grobner_basis grotzch_graph hamilton_cycle hamilton_path hankel hankel_1 hankel_2 harmonic harmonic_mean hav heawood_graph hermite hessian hgfred hilbertmap hilbert_matrix hipow histogram histogram_description hodge horner hypergeometric i0 i1 %ibes ic1 ic2 ic_convert ichr1 ichr2 icosahedron_graph icosidodecahedron_graph icurvature ident identfor identity idiff idim idummy ieqn %if ifactors iframes ifs igcdex igeodesic_coords ilt image imagpart imetri\ c implicit implicit_derivative implicit_plot indexed_tensor indices induced_subgraph inferencep inference_result infix info_display init_atensor init_ctensor in_neighbors innerproduct inpart inprod inrt integerp integer_partitions integrate intersect intersection intervalp intopois intosum invariant1 invariant2 inverse_fft inverse_jacobi_cd inverse_jacobi_cn inverse_jacobi_cs inverse_jacobi_dc inverse_jacobi_dn inverse_jacobi_ds inverse_jacobi_nc inverse_jacobi_nd inverse_jacobi_ns inverse_jacob\ i_sc inverse_jacobi_sd inverse_jacobi_sn invert invert_by_adjoint invert_by_lu inv_mod irr is is_biconnected is_bipartite is_connected is_digraph is_edge_in_graph is_graph is_graph_or_digraph ishow is_isomorphic isolate isomorphism is_planar isqrt isreal_p is_sconnected is_tree is_vertex_in_graph items_inference %j j0 j1 jacobi jacobian jacobi_cd jacobi_cn jacobi_cs jacobi_dc jacobi_dn jacobi_ds jacobi_nc jacobi_nd jacobi_ns jacobi_p jacobi_sc jacobi_sd jacobi_sn JF jn join jordan julia julia_se\ t julia_sin %k kdels kdelta kill killcontext kostka kron_delta kronecker_product kummer_m kummer_u kurtosis kurtosis_bernoulli kurtosis_beta kurtosis_binomial kurtosis_chi2 kurtosis_continuous_uniform kurtosis_discrete_uniform kurtosis_exp kurtosis_f kurtosis_gamma kurtosis_general_finite_discrete kurtosis_geometric kurtosis_gumbel kurtosis_hypergeometric kurtosis_laplace kurtosis_logistic kurtosis_lognormal kurtosis_negative_binomial kurtosis_noncentral_chi2 kurtosis_noncentral_student_t kurtos\ is_normal kurtosis_pareto kurtosis_poisson kurtosis_rayleigh kurtosis_student_t kurtosis_weibull label labels lagrange laguerre lambda lambert_w laplace laplacian_matrix last lbfgs lc2kdt lcharp lc_l lcm lc_u ldefint ldisp ldisplay legendre_p legendre_q leinstein length let letrules letsimp levi_civita lfreeof lgtreillis lhs li liediff limit Lindstedt linear linearinterpol linear_program linear_regression line_graph linsolve listarray list_correlations listify list_matrix_entries list_nc_monomia\ ls listoftens listofvars listp lmax lmin load loadfile local locate_matrix_entry log logcontract log_gamma lopow lorentz_gauge lowercasep lpart lratsubst lreduce lriemann lsquares_estimates lsquares_estimates_approximate lsquares_estimates_exact lsquares_mse lsquares_residual_mse lsquares_residuals lsum ltreillis lu_backsub lucas lu_factor %m macroexpand macroexpand1 make_array makebox makefact makegamma make_graph make_level_picture makelist makeOrders make_poly_continent make_poly_country make\ _polygon make_random_state make_rgb_picture makeset make_string_input_stream make_string_output_stream make_transform mandelbrot mandelbrot_set map mapatom maplist matchdeclare matchfix mat_cond mat_fullunblocker mat_function mathml_display mat_norm matrix matrixmap matrixp matrix_size mattrace mat_trace mat_unblocker max max_clique max_degree max_flow maximize_lp max_independent_set max_matching maybe md5sum mean mean_bernoulli mean_beta mean_binomial mean_chi2 mean_continuous_uniform mean_devi\ ation mean_discrete_uniform mean_exp mean_f mean_gamma mean_general_finite_discrete mean_geometric mean_gumbel mean_hypergeometric mean_laplace mean_logistic mean_lognormal mean_negative_binomial mean_noncentral_chi2 mean_noncentral_student_t mean_normal mean_pareto mean_poisson mean_rayleigh mean_student_t mean_weibull median median_deviation member mesh metricexpandall mgf1_sha1 min min_degree min_edge_cut minfactorial minimalPoly minimize_lp minimum_spanning_tree minor minpack_lsquares minpac\ k_solve min_vertex_cover min_vertex_cut mkdir mnewton mod mode_declare mode_identity ModeMatrix moebius mon2schur mono monomial_dimensions multibernstein_poly multi_display_for_texinfo multi_elem multinomial multinomial_coeff multi_orbit multiplot_mode multi_pui multsym multthru mycielski_graph nary natural_unit nc_degree ncexpt ncharpoly negative_picture neighbors new newcontext newdet new_graph newline newton new_variable next_prime nicedummies niceindices ninth nofix nonarray noncentral_momen\ t nonmetricity nonnegintegerp nonscalarp nonzeroandfreeof notequal nounify nptetrad npv nroots nterms ntermst nthroot nullity nullspace num numbered_boundaries numberp number_to_octets num_distinct_partitions numerval numfactor num_partitions nusum nzeta nzetai nzetar octets_to_number octets_to_oid odd_girth oddp ode2 ode_check odelin oid_to_octets op opena opena_binary openr openr_binary openw openw_binary operatorp opsubst optimize %or orbit orbits ordergreat ordergreatp orderless orderlessp o\ rthogonal_complement orthopoly_recur orthopoly_weight outermap out_neighbors outofpois pade parabolic_cylinder_d parametric parametric_surface parg parGosper parse_string parse_timedate part part2cont partfrac partition partition_set partpol path_digraph path_graph pathname_directory pathname_name pathname_type pdf_bernoulli pdf_beta pdf_binomial pdf_cauchy pdf_chi2 pdf_continuous_uniform pdf_discrete_uniform pdf_exp pdf_f pdf_gamma pdf_general_finite_discrete pdf_geometric pdf_gumbel pdf_hyperg\ eometric pdf_laplace pdf_logistic pdf_lognormal pdf_negative_binomial pdf_noncentral_chi2 pdf_noncentral_student_t pdf_normal pdf_pareto pdf_poisson pdf_rank_sum pdf_rayleigh pdf_signed_rank pdf_student_t pdf_weibull pearson_skewness permanent permut permutation permutations petersen_graph petrov pickapart picture_equalp picturep piechart piechart_description planar_embedding playback plog plot2d plot3d plotdf ploteq plsquares pochhammer points poisdiff poisexpt poisint poismap poisplus poissimp\ poissubst poistimes poistrim polar polarform polartorect polar_to_xy poly_add poly_buchberger poly_buchberger_criterion poly_colon_ideal poly_content polydecomp poly_depends_p poly_elimination_ideal poly_exact_divide poly_expand poly_expt poly_gcd polygon poly_grobner poly_grobner_equal poly_grobner_member poly_grobner_subsetp poly_ideal_intersection poly_ideal_polysaturation poly_ideal_polysaturation1 poly_ideal_saturation poly_ideal_saturation1 poly_lcm poly_minimization polymod poly_multiply\ polynome2ele polynomialp poly_normal_form poly_normalize poly_normalize_list poly_polysaturation_extension poly_primitive_part poly_pseudo_divide poly_reduced_grobner poly_reduction poly_saturation_extension poly_s_polynomial poly_subtract polytocompanion pop postfix potential power_mod powerseries powerset prefix prev_prime primep primes principal_components print printf printfile print_graph printpois printprops prodrac product properties propvars psi psubst ptriangularize pui pui2comp pui2el\ e pui2polynome pui_direct puireduc push put pv qput qrange qty quad_control quad_qag quad_qagi quad_qagp quad_qags quad_qawc quad_qawf quad_qawo quad_qaws quadrilateral quantile quantile_bernoulli quantile_beta quantile_binomial quantile_cauchy quantile_chi2 quantile_continuous_uniform quantile_discrete_uniform quantile_exp quantile_f quantile_gamma quantile_general_finite_discrete quantile_geometric quantile_gumbel quantile_hypergeometric quantile_laplace quantile_logistic quantile_lognormal qu\ antile_negative_binomial quantile_noncentral_chi2 quantile_noncentral_student_t quantile_normal quantile_pareto quantile_poisson quantile_rayleigh quantile_student_t quantile_weibull quartile_skewness quit qunit quotient racah_v racah_w radcan radius random random_bernoulli random_beta random_binomial random_bipartite_graph random_cauchy random_chi2 random_continuous_uniform random_digraph random_discrete_uniform random_exp random_f random_gamma random_general_finite_discrete random_geometric ra\ ndom_graph random_graph1 random_gumbel random_hypergeometric random_laplace random_logistic random_lognormal random_negative_binomial random_network random_noncentral_chi2 random_noncentral_student_t random_normal random_pareto random_permutation random_poisson random_rayleigh random_regular_graph random_student_t random_tournament random_tree random_weibull range rank rat ratcoef ratdenom ratdiff ratdisrep ratexpand ratinterpol rational rationalize ratnumer ratnump ratp ratsimp ratsubst ratvars\ ratweight read read_array read_binary_array read_binary_list read_binary_matrix readbyte readchar read_hashed_array readline read_list read_matrix read_nested_list readonly read_xpm real_imagpart_to_conjugate realpart realroots rearray rectangle rectform rectform_log_if_constant recttopolar rediff reduce_consts reduce_order region region_boundaries region_boundaries_plus rem remainder remarray rembox remcomps remcon remcoord remfun remfunction remlet remove remove_constvalue remove_dimensions r\ emove_edge remove_fundamental_dimensions remove_fundamental_units remove_plot_option remove_vertex rempart remrule remsym remvalue rename rename_file reset reset_displays residue resolvante resolvante_alternee1 resolvante_bipartite resolvante_diedrale resolvante_klein resolvante_klein3 resolvante_produit_sym resolvante_unitaire resolvante_vierer rest resultant return reveal reverse revert revert2 rgb2level rhs ricci riemann rinvariant risch rk rmdir rncombine romberg room rootscontract round row\ rowop rowswap rreduce run_testsuite %s save saving scalarp scaled_bessel_i scaled_bessel_i0 scaled_bessel_i1 scalefactors scanmap scatterplot scatterplot_description scene schur2comp sconcat scopy scsimp scurvature sdowncase sec sech second sequal sequalignore set_alt_display setdifference set_draw_defaults set_edge_weight setelmx setequalp setify setp set_partitions set_plot_option set_prompt set_random_state set_tex_environment set_tex_environment_default setunits setup_autoload set_up_dot_si\ mplifications set_vertex_label seventh sexplode sf sha1sum sha256sum shortest_path shortest_weighted_path show showcomps showratvars sierpinskiale sierpinskimap sign signum similaritytransform simp_inequality simplify_sum simplode simpmetderiv simtran sin sinh sinsert sinvertcase sixth skewness skewness_bernoulli skewness_beta skewness_binomial skewness_chi2 skewness_continuous_uniform skewness_discrete_uniform skewness_exp skewness_f skewness_gamma skewness_general_finite_discrete skewness_geom\ etric skewness_gumbel skewness_hypergeometric skewness_laplace skewness_logistic skewness_lognormal skewness_negative_binomial skewness_noncentral_chi2 skewness_noncentral_student_t skewness_normal skewness_pareto skewness_poisson skewness_rayleigh skewness_student_t skewness_weibull slength smake small_rhombicosidodecahedron_graph small_rhombicuboctahedron_graph smax smin smismatch snowmap snub_cube_graph snub_dodecahedron_graph solve solve_rec solve_rec_rat some somrac sort sparse6_decode spar\ se6_encode sparse6_export sparse6_import specint spherical spherical_bessel_j spherical_bessel_y spherical_hankel1 spherical_hankel2 spherical_harmonic spherical_to_xyz splice split sposition sprint sqfr sqrt sqrtdenest sremove sremovefirst sreverse ssearch ssort sstatus ssubst ssubstfirst staircase standardize standardize_inverse_trig starplot starplot_description status std std1 std_bernoulli std_beta std_binomial std_chi2 std_continuous_uniform std_discrete_uniform std_exp std_f std_gamma std\ _general_finite_discrete std_geometric std_gumbel std_hypergeometric std_laplace std_logistic std_lognormal std_negative_binomial std_noncentral_chi2 std_noncentral_student_t std_normal std_pareto std_poisson std_rayleigh std_student_t std_weibull stemplot stirling stirling1 stirling2 strim striml strimr string stringout stringp strong_components struve_h struve_l sublis sublist sublist_indices submatrix subsample subset subsetp subst substinpart subst_parallel substpart substring subvar subvarp\ sum sumcontract summand_to_rec supcase supcontext symbolp symmdifference symmetricp system take_channel take_inference tan tanh taylor taylorinfo taylorp taylor_simplifier taytorat tcl_output tcontract tellrat tellsimp tellsimpafter tentex tenth test_mean test_means_difference test_normality test_proportion test_proportions_difference test_rank_sum test_sign test_signed_rank test_variance test_variance_ratio tex tex1 tex_display texput %th third throw time timedate timer timer_info tldefint tli\ mit todd_coxeter toeplitz tokens to_lisp topological_sort to_poly to_poly_solve totaldisrep totalfourier totient tpartpol trace tracematrix trace_options transform_sample translate translate_file transpose treefale tree_reduce treillis treinat triangle triangularize trigexpand trigrat trigreduce trigsimp trunc truncate truncated_cube_graph truncated_dodecahedron_graph truncated_icosahedron_graph truncated_tetrahedron_graph tr_warnings_get tube tutte_graph ueivects uforget ultraspherical underlyi\ ng_graph undiff union unique uniteigenvectors unitp units unit_step unitvector unorder unsum untellrat untimer untrace uppercasep uricci uriemann uvect vandermonde_matrix var var1 var_bernoulli var_beta var_binomial var_chi2 var_continuous_uniform var_discrete_uniform var_exp var_f var_gamma var_general_finite_discrete var_geometric var_gumbel var_hypergeometric var_laplace var_logistic var_lognormal var_negative_binomial var_noncentral_chi2 var_noncentral_student_t var_normal var_pareto var_poi\ sson var_rayleigh var_student_t var_weibull vector vectorpotential vectorsimp verbify vers vertex_coloring vertex_connectivity vertex_degree vertex_distance vertex_eccentricity vertex_in_degree vertex_out_degree vertices vertices_to_cycle vertices_to_path %w weyl wheel_graph wiener_index wigner_3j wigner_6j wigner_9j with_stdout write_binary_data writebyte write_data writefile wronskian xreduce xthru %y Zeilberger zeroequiv zerofor zeromatrix zeromatrixp zeta zgeev zheev zlange zn_add_table zn_c\ armichael_lambda zn_characteristic_factors zn_determinant zn_factor_generators zn_invert_by_lu zn_log zn_mult_table absboxchar activecontexts adapt_depth additive adim aform algebraic algepsilon algexact aliases allbut all_dotsimp_denoms allocation allsym alphabetic animation antisymmetric arrays askexp assume_pos assume_pos_pred assumescalar asymbol atomgrad atrig1 axes axis_3d axis_bottom axis_left axis_right axis_top azimuth background background_color backsubst berlefact bernstein_explicit b\ esselexpand beta_args_sum_to_integer beta_expand bftorat bftrunc bindtest border boundaries_array box boxchar breakup %c capping cauchysum cbrange cbtics center cflength cframe_flag cnonmet_flag color color_bar color_bar_tics colorbox columns commutative complex cone context contexts contour contour_levels cosnpiflag ctaypov ctaypt ctayswitch ctayvar ct_coords ctorsion_flag ctrgsimp cube current_let_rule_package cylinder data_file_name debugmode decreasing default_let_rule_package delay dependen\ cies derivabbrev derivsubst detout diagmetric diff dim dimensions dispflag display2d|10 display_format_internal distribute_over doallmxops domain domxexpt domxmxops domxnctimes dontfactor doscmxops doscmxplus dot0nscsimp dot0simp dot1simp dotassoc dotconstrules dotdistrib dotexptsimp dotident dotscrules draw_graph_program draw_realpart edge_color edge_coloring edge_partition edge_type edge_width %edispflag elevation %emode endphi endtheta engineering_format_floats enhanced3d %enumer epsilon_lp e\ rfflag erf_representation errormsg error_size error_syms error_type %e_to_numlog eval even evenfun evflag evfun ev_point expandwrt_denom expintexpand expintrep expon expop exptdispflag exptisolate exptsubst facexpand facsum_combine factlim factorflag factorial_expand factors_only fb feature features file_name file_output_append file_search_demo file_search_lisp file_search_maxima|10 file_search_tests file_search_usage file_type_lisp file_type_maxima|10 fill_color fill_density filled_func fixed_v\ ertices flipflag float2bf font font_size fortindent fortspaces fpprec fpprintprec functions gamma_expand gammalim gdet genindex gensumnum GGFCFMAX GGFINFINITY globalsolve gnuplot_command gnuplot_curve_styles gnuplot_curve_titles gnuplot_default_term_command gnuplot_dumb_term_command gnuplot_file_args gnuplot_file_name gnuplot_out_file gnuplot_pdf_term_command gnuplot_pm3d gnuplot_png_term_command gnuplot_postamble gnuplot_preamble gnuplot_ps_term_command gnuplot_svg_term_command gnuplot_term gnu\ plot_view_args Gosper_in_Zeilberger gradefs grid grid2d grind halfangles head_angle head_both head_length head_type height hypergeometric_representation %iargs ibase icc1 icc2 icounter idummyx ieqnprint ifb ifc1 ifc2 ifg ifgi ifr iframe_bracket_form ifri igeowedge_flag ikt1 ikt2 imaginary inchar increasing infeval infinity inflag infolists inm inmc1 inmc2 intanalysis integer integervalued integrate_use_rootsof integration_constant integration_constant_counter interpolate_color intfaclim ip_grid \ ip_grid_in irrational isolate_wrt_times iterations itr julia_parameter %k1 %k2 keepfloat key key_pos kinvariant kt label label_alignment label_orientation labels lassociative lbfgs_ncorrections lbfgs_nfeval_max leftjust legend letrat let_rule_packages lfg lg lhospitallim limsubst linear linear_solver linechar linel|10 linenum line_type linewidth line_width linsolve_params linsolvewarn lispdisp listarith listconstvars listdummyvars lmxchar load_pathname loadprint logabs logarc logcb logconcoeffp \ logexpand lognegint logsimp logx logx_secondary logy logy_secondary logz lriem m1pbranch macroexpansion macros mainvar manual_demo maperror mapprint matrix_element_add matrix_element_mult matrix_element_transpose maxapplydepth maxapplyheight maxima_tempdir|10 maxima_userdir|10 maxnegex MAX_ORD maxposex maxpsifracdenom maxpsifracnum maxpsinegint maxpsiposint maxtayorder mesh_lines_color method mod_big_prime mode_check_errorp mode_checkp mode_check_warnp mod_test mod_threshold modular_linear_solve\ r modulus multiplicative multiplicities myoptions nary negdistrib negsumdispflag newline newtonepsilon newtonmaxiter nextlayerfactor niceindicespref nm nmc noeval nolabels nonegative_lp noninteger nonscalar noun noundisp nouns np npi nticks ntrig numer numer_pbranch obase odd oddfun opacity opproperties opsubst optimprefix optionset orientation origin orthopoly_returns_intervals outative outchar packagefile palette partswitch pdf_file pfeformat phiresolution %piargs piece pivot_count_sx pivot_ma\ x_sx plot_format plot_options plot_realpart png_file pochhammer_max_index points pointsize point_size points_joined point_type poislim poisson poly_coefficient_ring poly_elimination_order polyfactor poly_grobner_algorithm poly_grobner_debug poly_monomial_order poly_primary_elimination_order poly_return_term_list poly_secondary_elimination_order poly_top_reduction_only posfun position powerdisp pred prederror primep_number_of_tests product_use_gamma program programmode promote_float_to_bigfloat p\ rompt proportional_axes props psexpand ps_file radexpand radius radsubstflag rassociative ratalgdenom ratchristof ratdenomdivide rateinstein ratepsilon ratfac rational ratmx ratprint ratriemann ratsimpexpons ratvarswitch ratweights ratweyl ratwtlvl real realonly redraw refcheck resolution restart resultant ric riem rmxchar %rnum_list rombergabs rombergit rombergmin rombergtol rootsconmode rootsepsilon run_viewer same_xy same_xyz savedef savefactors scalar scalarmatrixp scale scale_lp setcheck se\ tcheckbreak setval show_edge_color show_edges show_edge_type show_edge_width show_id show_label showtime show_vertex_color show_vertex_size show_vertex_type show_vertices show_weight simp simplified_output simplify_products simpproduct simpsum sinnpiflag solvedecomposes solveexplicit solvefactors solvenullwarn solveradcan solvetrigwarn space sparse sphere spring_embedding_depth sqrtdispflag stardisp startphi starttheta stats_numer stringdisp structures style sublis_apply_lambda subnumsimp sumexp\ and sumsplitfact surface surface_hide svg_file symmetric tab taylordepth taylor_logexpand taylor_order_coefficients taylor_truncate_polynomials tensorkill terminal testsuite_files thetaresolution timer_devalue title tlimswitch tr track transcompile transform transform_xy translate_fast_arrays transparent transrun tr_array_as_ref tr_bound_function_applyp tr_file_tty_messagesp tr_float_can_branch_complex tr_function_call_default trigexpandplus trigexpandtimes triginverses trigsign trivial_solution\ s tr_numer tr_optimize_max_loop tr_semicompile tr_state_vars tr_warn_bad_function_calls tr_warn_fexpr tr_warn_meval tr_warn_mode tr_warn_undeclared tr_warn_undefined_variable tstep ttyoff tube_extremes ufg ug %unitexpand unit_vectors uric uriem use_fast_arrays user_preamble usersetunits values vect_cross verbose vertex_color vertex_coloring vertex_partition vertex_size vertex_type view warnings weyl width windowname windowtitle wired_surface wireframe xaxis xaxis_color xaxis_secondary xaxis_type\ xaxis_width xlabel xlabel_secondary xlength xrange xrange_secondary xtics xtics_axis xtics_rotate xtics_rotate_secondary xtics_secondary xtics_secondary_axis xu_grid x_voxel xy_file xyplane xy_scale yaxis yaxis_color yaxis_secondary yaxis_type yaxis_width ylabel ylabel_secondary ylength yrange yrange_secondary ytics ytics_axis ytics_rotate ytics_rotate_secondary ytics_secondary ytics_secondary_axis yv_grid y_voxel yx_ratio zaxis zaxis_color zaxis_type zaxis_width zeroa zerob zerobern zeta%pi zl\ abel zlabel_rotate zlength zmin zn_primroot_limit zn_primroot_pretest",symbol:"_ __ %|0 %%|0"},contains:[{className:"comment",begin:"/\\*",end:"\\*/",contains:["self"]},hljs.QUOTE_STRING_MODE,{className:"number",relevance:0,variants:[{begin:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Ee][-+]?\\d+\\b"},{begin:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Bb][-+]?\\d+\\b",relevance:10},{begin:"\\b(\\.\\d+|\\d+\\.\\d+)\\b"},{begin:"\\b(\\d+|0[0-9A-Za-z]+)\\.?\\b"}]}],illegal:/@/}}function mel(hljs){return{name:"\ MEL",keywords:"int float string vector matrix if else switch case default while do for in break continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor animDisplay animView annotate appendStringArray applicationName applyAttrPreset ap\ plyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp attrPresetEditWin a\ ttributeExists attributeInfo attributeMenu attributeQuery autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge cacheFileTrack camera cameraView c\ anCreateManip canvas capitalizeString catch catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter cmdScrollFieldReporter cmdShell coarsenSubdivSelecti\ onList collision color colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem componentEditor compositingInterop computePolysetVolume condition cone confirmDialog connectAttr connectControl connectDynamic connectJoint connectionInfo constrain constrainValue constructionHistory container containsMultibyte contextInfo control convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx co\ nvertTessellation convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode c\ txTraverse currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo dg\ dirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected displayColor displayCull displayLevelOfDetail displayPref displayRGBColor displaySmoothness displayStats displayString displaySurface distanceDimContext distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator duplicate duplicateCurve duplicateSurfac\ e dynCache dynControl dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor editorTemplate effector emit emitter enableDevice encodeString endString endsWith env equivalent equivalentTol erf error eval evalDeferred evalEcho event exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject\ exists exp expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo filetest filletCurve filter filterCurve filterExpand filterStudioImport findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow flu\ idCacheInfo fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss geometryConstraint getApplicationVersionAsFloat getAttr getClassification getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl gradientControlNo\ Attr graphDollyCtx graphSelectContext graphTrackCtx gravity grid gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey hotkeyCheck hsv_to_rgb hudButto\ n hudSlider hudSliderButton hwReflectionMap hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance instanceable instancer intField intF\ ieldGrp intScrollBar intSlider intSliderGrp interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyfra\ meRegionScaleKeyCtx keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation \ listNodeTypes listPanelCategories listRelatives listSets listTransforms listUnselected listerEditor loadFluid loadNewShelf loadPlugin loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx manipScaleContext manipScaleLimitsCtx marker matc\ h max memory menu menuBarLayout menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV \ nurbsPlane nurbsSelect nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration pan\ elHistory paramDimContext paramDimension paramLocator parent parentConstraint particle particleExists particleInstancer particleRenderInfo partition pasteKey pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend polyAppendFacetCt\ x polyAppendVertex polyAutoProjection polyAverageNormal polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection polyDelEdge polyDelFacet polyDelVe\ rtex polyDuplicateAndConnect polyDuplicateEdge polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNorma\ l polyNormalPerVertex polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing poly\ SplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection ra\ dioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE registerPluginResource rehash reloadImage removeJoint removeMultiInstance removePanelCategory rename renameAttr renameSelectionList renameUI render renderGlobalsNode renderInfo renderLayerButton renderLayerParent renderLayerPostProcess renderLayerUnparent renderManip \ renderPartition renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor renderWindowSelectContext renderer reorder reorderDeformers requires reroot resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage saveIn\ itialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType select\ edNodes selectionConnection separator setAttr setAttrEnumResource setAttrMapping setAttrNiceNameResource setConstraintRestPosition setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject setStampDensity setStartupMessage setState setTool\ To setUITemplate setXformManip sets shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField shortNameOf showHelp showHidden showManipCtx showSelectionInTitle showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx s\ ort sound soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString stringToStringArray strip stripPrefixFro\ mName stroke subdAutoProjection subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext\ texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList textToShelf textureDisplacePlane textureHairColor texturePlacementContext textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower toolButton toolC\ ollection toolDropped toolHasOptions toolPropertyWindow torus toupper trace track trackCtx transferAttributes transformCompare transformLimits translator trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane viewFit viewHeadOn viewLoo\ kAt viewManip viewPlace viewSet visor volumeAxis vortex waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform",illegal:""},{begin:"<=",relevance:0},{begin:"=>",relevance:0},{begin:"/\\\\"},{begin:"\\\\/"}]},{className:"built_in",variants:[{begin:":-\\|-->"},{begin:"=",relevance:0}]},COMMENT,hljs. C_BLOCK_COMMENT_MODE,NUMCODE,hljs.NUMBER_MODE,ATOM,STRING,{begin:/:-/},{begin:/\.$/}]}}function mipsasm(hljs){return{name:"MIPS Assembly",case_insensitive:!0,aliases:["mips"],keywords:{$pattern:"\\.?"+hljs.IDENT_RE,meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .ltorg ",built_in:"$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $10\ $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 $31 zero at v0 v1 a0 a1 a2 a3 a4 a5 a6 a7 t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 s0 s1 s2 s3 s4 s5 s6 s7 s8 k0 k1 gp sp fp ra $f0 $f1 $f2 $f2 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15 $f16 $f17 $f18 $f19 $f20 $f21 $f22 $f23 $f24 $f25 $f26 $f27 $f28 $f29 $f30 $f31 Context Random EntryLo0 EntryLo1 Context PageMask Wired EntryHi HWREna BadVAddr Count Compare SR IntCtl SRSCtl SRSMap Cause EPC PRId EBase Config Config\ 1 Config2 Config3 LLAddr Debug DEPC DESAVE CacheErr ECC ErrorEPC TagLo DataLo TagHi DataHi WatchLo WatchHi PerfCtl PerfCnt "},contains:[{className:"keyword",begin:"\\b(addi?u?|andi?|b(al)?|beql?|bgez(al)?l?|bgtzl?|blezl?|bltz(al)?l?|bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(\\.hb)?|jr(\\.hb)?|lbu?|lhu?|ll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|move|msubu?|mthi|mtlo|mul|multu?|nop|nor|ori?|rotrv?|sb|sc|se[bh]|sh|sllv?|slti?u?|srav?|srlv?|subu?|sw[lr]?|xori?|wsbh|abs\\.[sd]|add\\.[sd]|alnv.ps|bc1[ft]l?|c\\\ .(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et])\\.[sd]|(ceil|floor|round|trunc)\\.[lw]\\.[sd]|cfc1|cvt\\.d\\.[lsw]|cvt\\.l\\.[dsw]|cvt\\.ps\\.s|cvt\\.s\\.[dlw]|cvt\\.s\\.p[lu]|cvt\\.w\\.[dls]|div\\.[ds]|ldx?c1|luxc1|lwx?c1|madd\\.[sd]|mfc1|mov[fntz]?\\.[ds]|msub\\.[sd]|mth?c1|mul\\.[ds]|neg\\.[ds]|nmadd\\.[ds]|nmsub\\.[ds]|p[lu][lu]\\.ps|recip\\.fmt|r?sqrt\\.[ds]|sdx?c1|sub\\.[ds]|suxc1|swx?c1|break|cache|d?eret|[de]i|ehb|mfc0|mtc0|pause|prefx?|rdhwr|rdpgpr|sdbbp|ssnop|synci?|syscall|teqi?|tgei?u?|tlb(p|r|w[ir])|tlti?\ u?|tnei?|wait|wrpgpr)",end:"\\s"},hljs.COMMENT("[;#](?!\\s*$)","$"),hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"0x[0-9a-f]+"},{begin:"\\b-?\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^\\s*[0-9]+:"},{begin:"[0-9]+[bf]"}],relevance:0}],illegal:/\//}}function mizar(hljs){return{ name:"Mizar",keywords:"environ vocabularies notations constructors definitions registrations theorems schemes requirements begin end definition registration cluster existence pred func defpred deffunc theorem proof let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from be being by means equals implies iff redefine define now not or attr is mode suppose per cases set thesis contradiction scheme reserve struct correctness compatibility coherence sy\ mmetry assymetry reflexivity irreflexivity connectedness uniqueness commutativity idempotence involutiveness projectivity",contains:[hljs.COMMENT("::","$")]}}function mojolicious(hljs){return{name:"Mojolicious",subLanguage:"xml",contains:[{className:"meta",begin:"^__(END|DATA)__$"},{begin:"^\\s*%{1,2}={0,2}",end:"$",subLanguage:"perl"},{begin:"<%{1,2}={0,2}",end:"={0,1}%>",subLanguage:"perl",excludeBegin:!0,excludeEnd:!0}]}}function monkey(hljs){const NUMBER={className:"number",relevance:0,variants:[ {begin:"[$][a-fA-F0-9]+"},hljs.NUMBER_MODE]},FUNC_DEFINITION={variants:[{match:[/(function|method)/,/\s+/,hljs.UNDERSCORE_IDENT_RE]}],scope:{1:"keyword",3:"title.function"}},CLASS_DEFINITION={variants:[{match:[/(class|interface|extends|implements)/,/\s+/,hljs.UNDERSCORE_IDENT_RE]}],scope:{1:"keyword",3:"title.class"}};return{name:"Monkey",case_insensitive:!0,keywords:{keyword:["public","private","property","continue","exit","extern","new","try","catch","eachin","not","abstract","final","select", "case","default","const","local","global","field","end","if","then","else","elseif","endif","while","wend","repeat","until","forever","for","to","step","next","return","module","inline","throw","import","and","or","shl","shr","mod"],built_in:["DebugLog","DebugStop","Error","Print","ACos","ACosr","ASin","ASinr","ATan","ATan2","ATan2r","ATanr","Abs","Abs","Ceil","Clamp","Clamp","Cos","Cosr","Exp","Floor","Log","Max","Max","Min","Min","Pow","Sgn","Sgn","Sin","Sinr","Sqrt","Tan","Tanr","Seed","PI","\ HALFPI","TWOPI"],literal:["true","false","null"]},illegal:/\/\*/,contains:[hljs.COMMENT("#rem","#end"),hljs.COMMENT("'","$",{relevance:0}),FUNC_DEFINITION,CLASS_DEFINITION,{className:"variable.language",begin:/\b(self|super)\b/},{className:"meta",begin:/\s*#/,end:"$",keywords:{keyword:"if else elseif endif end then"}},{match:[/^\s*/,/strict\b/],scope:{2:"meta"}},{beginKeywords:"alias",end:"=",contains:[hljs.UNDERSCORE_TITLE_MODE]},hljs.QUOTE_STRING_MODE,NUMBER]}}function moonscript(hljs){const KEYWORDS2={ keyword:"if then not for in while do return else elseif break continue switch and or unless when class extends super local import export from using",literal:"true false nil",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},JS_IDENT_RE="[A-Za-z$_][0-9A-Za-z$_]*",SUBST={ className:"subst",begin:/#\{/,end:/\}/,keywords:KEYWORDS2},EXPRESSIONS=[hljs.inherit(hljs.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'/,end:/'/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,SUBST]}]},{className:"built_in",begin:"@__"+hljs.IDENT_RE},{begin:"@"+hljs.IDENT_RE},{begin:hljs.IDENT_RE+"\\\\"+hljs.IDENT_RE}];SUBST.contains=EXPRESSIONS;const TITLE=hljs.inherit(hljs.TITLE_MODE,{begin:JS_IDENT_RE}),POSSIBLE_PARAMS_RE="\ (\\(.*\\)\\s*)?\\B[-=]>",PARAMS={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:["self"].concat(EXPRESSIONS)}]};return{name:"MoonScript",aliases:["moon"],keywords:KEYWORDS2,illegal:/\/\*/,contains:EXPRESSIONS.concat([hljs.COMMENT("--","$"),{className:"function",begin:"^\\s*"+JS_IDENT_RE+"\\s*=\\s*"+POSSIBLE_PARAMS_RE,end:"[-=]>",returnBegin:!0,contains:[TITLE,PARAMS]},{begin:/[\(,:=]\s*/,relevance:0,contains:[{className:"function",begin:POSSIBLE_PARAMS_RE, end:"[-=]>",returnBegin:!0,contains:[PARAMS]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[TITLE]},TITLE]},{className:"name",begin:JS_IDENT_RE+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}function n1ql(hljs){return{name:"N1QL",case_insensitive:!0,contains:[{beginKeywords:"build create index delete drop explain infer|10 insert merge prepare select update upsert|10",end:/;/,keywords:{ keyword:["all","alter","analyze","and","any","array","as","asc","begin","between","binary","boolean","break","bucket","build","by","call","case","cast","cluster","collate","collection","commit","connect","continue","correlate","cover","create","database","dataset","datastore","declare","decrement","delete","derived","desc","describe","distinct","do","drop","each","element","else","end","every","except","exclude","execute","exists","explain","fetch","first","flatten","for","force","from","functio\ n","grant","group","gsi","having","if","ignore","ilike","in","include","increment","index","infer","inline","inner","insert","intersect","into","is","join","key","keys","keyspace","known","last","left","let","letting","like","limit","lsm","map","mapping","matched","materialized","merge","minus","namespace","nest","not","number","object","offset","on","option","or","order","outer","over","parse","partition","password","path","pool","prepare","primary","private","privilege","procedure","public","r\ aw","realm","reduce","rename","return","returning","revoke","right","role","rollback","satisfies","schema","select","self","semi","set","show","some","start","statistics","string","system","then","to","transaction","trigger","truncate","under","union","unique","unknown","unnest","unset","update","upsert","use","user","using","validate","value","valued","values","via","view","when","where","while","with","within","work","xor"],literal:["true","false","null","missing|5"],built_in:["array_agg","arr\ ay_append","array_concat","array_contains","array_count","array_distinct","array_ifnull","array_length","array_max","array_min","array_position","array_prepend","array_put","array_range","array_remove","array_repeat","array_replace","array_reverse","array_sort","array_sum","avg","count","max","min","sum","greatest","least","ifmissing","ifmissingornull","ifnull","missingif","nullif","ifinf","ifnan","ifnanorinf","naninf","neginfif","posinfif","clock_millis","clock_str","date_add_millis","date_add_\ str","date_diff_millis","date_diff_str","date_part_millis","date_part_str","date_trunc_millis","date_trunc_str","duration_to_str","millis","str_to_millis","millis_to_str","millis_to_utc","millis_to_zone_name","now_millis","now_str","str_to_duration","str_to_utc","str_to_zone_name","decode_json","encode_json","encoded_size","poly_length","base64","base64_encode","base64_decode","meta","uuid","abs","acos","asin","atan","atan2","ceil","cos","degrees","e","exp","ln","log","floor","pi","power","radia\ ns","random","round","sign","sin","sqrt","tan","trunc","object_length","object_names","object_pairs","object_inner_pairs","object_values","object_inner_values","object_add","object_put","object_remove","object_unwrap","regexp_contains","regexp_like","regexp_position","regexp_replace","contains","initcap","length","lower","ltrim","position","repeat","replace","rtrim","split","substr","title","trim","upper","isarray","isatom","isboolean","isnumber","isobject","isstring","type","toarray","toatom","\ toboolean","tonumber","toobject","tostring"]},contains:[{className:"string",begin:"'",end:"'",contains:[hljs.BACKSLASH_ESCAPE]},{className:"string",begin:'"',end:'"',contains:[hljs.BACKSLASH_ESCAPE]},{className:"symbol",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE]},hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE]},hljs.C_BLOCK_COMMENT_MODE]}}function nestedtext(hljs){const NESTED={match:[/^\s*(?=\S)/,/[^:]+/,/:\s*/,/$/],className:{2:"attribute",3:"punctuation"}},DICTIONARY_ITEM={match:[/^\s*(?=\S)/, /[^:]*[^: ]/,/[ ]*:/,/[ ]/,/.*$/],className:{2:"attribute",3:"punctuation",5:"string"}},STRING={match:[/^\s*/,/>/,/[ ]/,/.*$/],className:{2:"punctuation",4:"string"}},LIST_ITEM={variants:[{match:[/^\s*/,/-/,/[ ]/,/.*$/]},{match:[/^\s*/,/-$/]}],className:{2:"bullet",4:"string"}};return{name:"Nested Text",aliases:["nt"],contains:[hljs.inherit(hljs.HASH_COMMENT_MODE,{begin:/^\s*(?=#)/,excludeBegin:!0}),LIST_ITEM,STRING,NESTED,DICTIONARY_ITEM]}}function nginx(hljs){const regex=hljs.regex,VAR={className:"\ variable",variants:[{begin:/\$\d+/},{begin:/\$\{\w+\}/},{begin:regex.concat(/[$@]/,hljs.UNDERSCORE_IDENT_RE)}]},DEFAULT={endsWithParent:!0,keywords:{$pattern:/[a-z_]{2,}|\/dev\/poll/,literal:["on","off","yes","no","true","false","none","blocked","debug","info","notice","warn","error","crit","select","break","last","permanent","redirect","kqueue","rtsig","epoll","poll","/dev/poll"]},relevance:0,illegal:"=>",contains:[hljs.HASH_COMMENT_MODE,{className:"string",contains:[hljs.BACKSLASH_ESCAPE,VAR], variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[VAR]},{className:"regexp",contains:[hljs.BACKSLASH_ESCAPE,VAR],variants:[{begin:"\\s\\^",end:"\\s|\\{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|\\{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]?\\b",relevance:0}, VAR]};return{name:"Nginx config",aliases:["nginxconf"],contains:[hljs.HASH_COMMENT_MODE,{beginKeywords:"upstream location",end:/;|\{/,contains:DEFAULT.contains,keywords:{section:"upstream location"}},{className:"section",begin:regex.concat(hljs.UNDERSCORE_IDENT_RE+regex.lookahead(/\s+\{/)),relevance:0},{begin:regex.lookahead(hljs.UNDERSCORE_IDENT_RE+"\\s"),end:";|\\{",contains:[{className:"attribute",begin:hljs.UNDERSCORE_IDENT_RE,starts:DEFAULT}],relevance:0}],illegal:"[^\\s\\}\\{]"}}function nim(hljs){ return{name:"Nim",keywords:{keyword:["addr","and","as","asm","bind","block","break","case","cast","concept","const","continue","converter","defer","discard","distinct","div","do","elif","else","end","enum","except","export","finally","for","from","func","generic","guarded","if","import","in","include","interface","is","isnot","iterator","let","macro","method","mixin","mod","nil","not","notin","object","of","or","out","proc","ptr","raise","ref","return","shared","shl","shr","static","template","t\ ry","tuple","type","using","var","when","while","with","without","xor","yield"],literal:["true","false"],type:["int","int8","int16","int32","int64","uint","uint8","uint16","uint32","uint64","float","float32","float64","bool","char","string","cstring","pointer","expr","stmt","void","auto","any","range","array","openarray","varargs","seq","set","clong","culong","cchar","cschar","cshort","cint","csize","clonglong","cfloat","cdouble","clongdouble","cuchar","cushort","cuint","culonglong","cstringarra\ y","semistatic"],built_in:["stdin","stdout","stderr","result"]},contains:[{className:"meta",begin:/\{\./,end:/\.\}/,relevance:10},{className:"string",begin:/[a-zA-Z]\w*"/,end:/"/,contains:[{begin:/""/}]},{className:"string",begin:/([a-zA-Z]\w*)?"""/,end:/"""/},hljs.QUOTE_STRING_MODE,{className:"type",begin:/\b[A-Z]\w+\b/,relevance:0},{className:"number",relevance:0,variants:[{begin:/\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/},{begin:/\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/},{ begin:/\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/}]},hljs.HASH_COMMENT_MODE]}}function nix(hljs){const regex=hljs.regex,KEYWORDS2={keyword:["assert","else","if","in","inherit","let","or","rec","then","with"],literal:["true","false","null"],built_in:["abort","baseNameOf","builtins","derivation","derivationStrict","dirOf","fetchGit","fetchMercurial","fetchTarball","fetchTree","fromTOML","import","isNull","map","placeholder","removeAttrs","scopedI\ mport","throw","toString"]},BUILTINS={scope:"built_in",match:regex.either(...["abort","add","addDrvOutputDependencies","addErrorContext","all","any","appendContext","attrNames","attrValues","baseNameOf","bitAnd","bitOr","bitXor","break","builtins","catAttrs","ceil","compareVersions","concatLists","concatMap","concatStringsSep","convertHash","currentSystem","currentTime","deepSeq","derivation","derivationStrict","dirOf","div","elem","elemAt","false","fetchGit","fetchMercurial","fetchTarball","fet\ chTree","fetchurl","filter","filterSource","findFile","flakeRefToString","floor","foldl'","fromJSON","fromTOML","functionArgs","genList","genericClosure","getAttr","getContext","getEnv","getFlake","groupBy","hasAttr","hasContext","hashFile","hashString","head","import","intersectAttrs","isAttrs","isBool","isFloat","isFunction","isInt","isList","isNull","isPath","isString","langVersion","length","lessThan","listToAttrs","map","mapAttrs","match","mul","nixPath","nixVersion","null","parseDrvName","\ parseFlakeRef","partition","path","pathExists","placeholder","readDir","readFile","readFileType","removeAttrs","replaceStrings","scopedImport","seq","sort","split","splitVersion","storeDir","storePath","stringLength","sub","substring","tail","throw","toFile","toJSON","toPath","toString","toXML","trace","traceVerbose","true","tryEval","typeOf","unsafeDiscardOutputDependency","unsafeDiscardStringContext","unsafeGetAttrPos","warn","zipAttrsWith"].map(b=>`builtins\\.${b}`)),relevance:10},IDENTIFIER_REGEX="\ [A-Za-z_][A-Za-z0-9_'-]*",LOOKUP_PATH={scope:"symbol",match:new RegExp(`<${IDENTIFIER_REGEX}(/${IDENTIFIER_REGEX})*>`)},PATH_PIECE="[A-Za-z0-9_\\+\\.-]+",PATH={scope:"symbol",match:new RegExp(`(\\.\\.|\\.|~)?/(${PATH_PIECE})?(/${PATH_PIECE})*(?=[\\s;])`)},OPERATOR_WITHOUT_MINUS_REGEX=regex.either("==","=","\\+\\+","\\+","<=","<\\|","<",">=",">","->","//","/","!=","!","\\|\\|","\\|>","\\?","\\*","&&"),OPERATOR={scope:"operator",match:regex.concat(OPERATOR_WITHOUT_MINUS_REGEX,/(?!-)/),relevance:0}, NUMBER={scope:"number",match:new RegExp(`${hljs.NUMBER_RE}(?!-)`),relevance:0},MINUS_OPERATOR={variants:[{scope:"operator",beforeMatch:/\s/,begin:/-(?!>)/},{begin:[new RegExp(`${hljs.NUMBER_RE}`),/-/,/(?!>)/],beginScope:{1:"number",2:"operator"}},{begin:[OPERATOR_WITHOUT_MINUS_REGEX,/-/,/(?!>)/],beginScope:{1:"operator",2:"operator"}}],relevance:0},ATTRS={beforeMatch:/(^|\{|;)\s*/,begin:new RegExp(`${IDENTIFIER_REGEX}(\\.${IDENTIFIER_REGEX})*\\s*=(?!=)`),returnBegin:!0,relevance:0,contains:[{scope:"\ attr",match:new RegExp(`${IDENTIFIER_REGEX}(\\.${IDENTIFIER_REGEX})*(?=\\s*=)`),relevance:.2}]},NORMAL_ESCAPED_DOLLAR={scope:"char.escape",match:/\\\$/},INDENTED_ESCAPED_DOLLAR={scope:"char.escape",match:/''\$/},ANTIQUOTE={scope:"subst",begin:/\$\{/,end:/\}/,keywords:KEYWORDS2},ESCAPED_DOUBLEQUOTE={scope:"char.escape",match:/'''/},ESCAPED_LITERAL={scope:"char.escape",match:/\\(?!\$)./},STRING={scope:"string",variants:[{begin:"''",end:"''",contains:[INDENTED_ESCAPED_DOLLAR,ANTIQUOTE,ESCAPED_DOUBLEQUOTE, ESCAPED_LITERAL]},{begin:'"',end:'"',contains:[NORMAL_ESCAPED_DOLLAR,ANTIQUOTE,ESCAPED_LITERAL]}]},FUNCTION_PARAMS={scope:"params",match:new RegExp(`${IDENTIFIER_REGEX}\\s*:(?=\\s)`)},EXPRESSIONS=[NUMBER,hljs.HASH_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT(/\/\*\*(?!\/)/,/\*\//,{subLanguage:"markdown",relevance:0}),BUILTINS,STRING,LOOKUP_PATH,PATH,FUNCTION_PARAMS,ATTRS,MINUS_OPERATOR,OPERATOR];ANTIQUOTE.contains=EXPRESSIONS;const REPL=[{scope:"meta.prompt",match:/^nix-repl>(?=\s)/,relevance:10}, {scope:"meta",beforeMatch:/\s+/,begin:/:([a-z]+|\?)/}];return{name:"Nix",aliases:["nixos"],keywords:KEYWORDS2,contains:EXPRESSIONS.concat(REPL)}}function nodeRepl(hljs){return{name:"Node REPL",contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"javascript"}},variants:[{begin:/^>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function nsis(hljs){const regex=hljs.regex,LANGUAGE_CONSTANTS=["ADMINTOOLS","APPDATA","CDBURN_AREA","CMDLINE","COMMONFILES32","COMMONFILES64","COMMO\ NFILES","COOKIES","DESKTOP","DOCUMENTS","EXEDIR","EXEFILE","EXEPATH","FAVORITES","FONTS","HISTORY","HWNDPARENT","INSTDIR","INTERNET_CACHE","LANGUAGE","LOCALAPPDATA","MUSIC","NETHOOD","OUTDIR","PICTURES","PLUGINSDIR","PRINTHOOD","PROFILE","PROGRAMFILES32","PROGRAMFILES64","PROGRAMFILES","QUICKLAUNCH","RECENT","RESOURCES_LOCALIZED","RESOURCES","SENDTO","SMPROGRAMS","SMSTARTUP","STARTMENU","SYSDIR","TEMP","TEMPLATES","VIDEOS","WINDIR"],PARAM_NAMES=["ARCHIVE","FILE_ATTRIBUTE_ARCHIVE","FILE_ATTRIBUTE\ _NORMAL","FILE_ATTRIBUTE_OFFLINE","FILE_ATTRIBUTE_READONLY","FILE_ATTRIBUTE_SYSTEM","FILE_ATTRIBUTE_TEMPORARY","HKCR","HKCU","HKDD","HKEY_CLASSES_ROOT","HKEY_CURRENT_CONFIG","HKEY_CURRENT_USER","HKEY_DYN_DATA","HKEY_LOCAL_MACHINE","HKEY_PERFORMANCE_DATA","HKEY_USERS","HKLM","HKPD","HKU","IDABORT","IDCANCEL","IDIGNORE","IDNO","IDOK","IDRETRY","IDYES","MB_ABORTRETRYIGNORE","MB_DEFBUTTON1","MB_DEFBUTTON2","MB_DEFBUTTON3","MB_DEFBUTTON4","MB_ICONEXCLAMATION","MB_ICONINFORMATION","MB_ICONQUESTION","M\ B_ICONSTOP","MB_OK","MB_OKCANCEL","MB_RETRYCANCEL","MB_RIGHT","MB_RTLREADING","MB_SETFOREGROUND","MB_TOPMOST","MB_USERICON","MB_YESNO","NORMAL","OFFLINE","READONLY","SHCTX","SHELL_CONTEXT","SYSTEM|TEMPORARY"],COMPILER_FLAGS=["addincludedir","addplugindir","appendfile","assert","cd","define","delfile","echo","else","endif","error","execute","finalize","getdllversion","gettlbversion","if","ifdef","ifmacrodef","ifmacrondef","ifndef","include","insertmacro","macro","macroend","makensis","packhdr","s\ earchparse","searchreplace","system","tempfile","undef","uninstfinalize","verbose","warning"],CONSTANTS={className:"variable.constant",begin:regex.concat(/\$/,regex.either(...LANGUAGE_CONSTANTS))},DEFINES={className:"variable",begin:/\$+\{[\!\w.:-]+\}/},VARIABLES={className:"variable",begin:/\$+\w[\w\.]*/,illegal:/\(\)\{\}/},LANGUAGES={className:"variable",begin:/\$+\([\w^.:!-]+\)/},PARAMETERS={className:"params",begin:regex.either(...PARAM_NAMES)},COMPILER={className:"keyword",begin:regex.concat( /!/,regex.either(...COMPILER_FLAGS))},ESCAPE_CHARS={className:"char.escape",begin:/\$(\\[nrt]|\$)/},PLUGINS={className:"title.function",begin:/\w+::\w+/},STRING={className:"string",variants:[{begin:'"',end:'"'},{begin:"'",end:"'"},{begin:"`",end:"`"}],illegal:/\n/,contains:[ESCAPE_CHARS,CONSTANTS,DEFINES,VARIABLES,LANGUAGES]},KEYWORDS2=["Abort","AddBrandingImage","AddSize","AllowRootDirInstall","AllowSkipFiles","AutoCloseWindow","BGFont","BGGradient","BrandingText","BringToFront","Call","CallIns\ tDLL","Caption","ChangeUI","CheckBitmap","ClearErrors","CompletedText","ComponentText","CopyFiles","CRCCheck","CreateDirectory","CreateFont","CreateShortCut","Delete","DeleteINISec","DeleteINIStr","DeleteRegKey","DeleteRegValue","DetailPrint","DetailsButtonText","DirText","DirVar","DirVerify","EnableWindow","EnumRegKey","EnumRegValue","Exch","Exec","ExecShell","ExecShellWait","ExecWait","ExpandEnvStrings","File","FileBufSize","FileClose","FileErrorText","FileOpen","FileRead","FileReadByte","File\ ReadUTF16LE","FileReadWord","FileWriteUTF16LE","FileSeek","FileWrite","FileWriteByte","FileWriteWord","FindClose","FindFirst","FindNext","FindWindow","FlushINI","GetCurInstType","GetCurrentAddress","GetDlgItem","GetDLLVersion","GetDLLVersionLocal","GetErrorLevel","GetFileTime","GetFileTimeLocal","GetFullPathName","GetFunctionAddress","GetInstDirError","GetKnownFolderPath","GetLabelAddress","GetTempFileName","GetWinVer","Goto","HideWindow","Icon","IfAbort","IfErrors","IfFileExists","IfRebootFlag", "IfRtlLanguage","IfShellVarContextAll","IfSilent","InitPluginsDir","InstallButtonText","InstallColors","InstallDir","InstallDirRegKey","InstProgressFlags","InstType","InstTypeGetText","InstTypeSetText","Int64Cmp","Int64CmpU","Int64Fmt","IntCmp","IntCmpU","IntFmt","IntOp","IntPtrCmp","IntPtrCmpU","IntPtrOp","IsWindow","LangString","LicenseBkColor","LicenseData","LicenseForceSelection","LicenseLangString","LicenseText","LoadAndSetImage","LoadLanguageFile","LockWindow","LogSet","LogText","ManifestD\ PIAware","ManifestLongPathAware","ManifestMaxVersionTested","ManifestSupportedOS","MessageBox","MiscButtonText","Name|0","Nop","OutFile","Page","PageCallbacks","PEAddResource","PEDllCharacteristics","PERemoveResource","PESubsysVer","Pop","Push","Quit","ReadEnvStr","ReadINIStr","ReadRegDWORD","ReadRegStr","Reboot","RegDLL","Rename","RequestExecutionLevel","ReserveFile","Return","RMDir","SearchPath","SectionGetFlags","SectionGetInstTypes","SectionGetSize","SectionGetText","SectionIn","SectionSetFl\ ags","SectionSetInstTypes","SectionSetSize","SectionSetText","SendMessage","SetAutoClose","SetBrandingImage","SetCompress","SetCompressor","SetCompressorDictSize","SetCtlColors","SetCurInstType","SetDatablockOptimize","SetDateSave","SetDetailsPrint","SetDetailsView","SetErrorLevel","SetErrors","SetFileAttributes","SetFont","SetOutPath","SetOverwrite","SetRebootFlag","SetRegView","SetShellVarContext","SetSilent","ShowInstDetails","ShowUninstDetails","ShowWindow","SilentInstall","SilentUnInstall", "Sleep","SpaceTexts","StrCmp","StrCmpS","StrCpy","StrLen","SubCaption","Unicode","UninstallButtonText","UninstallCaption","UninstallIcon","UninstallSubCaption","UninstallText","UninstPage","UnRegDLL","Var","VIAddVersionKey","VIFileVersion","VIProductVersion","WindowIcon","WriteINIStr","WriteRegBin","WriteRegDWORD","WriteRegExpandStr","WriteRegMultiStr","WriteRegNone","WriteRegStr","WriteUninstaller","XPStyle"],LITERALS2=["admin","all","auto","both","bottom","bzip2","colored","components","curren\ t","custom","directory","false","force","hide","highest","ifdiff","ifnewer","instfiles","lastused","leave","left","license","listonly","lzma","nevershow","none","normal","notset","off","on","open","print","right","show","silent","silentlog","smooth","textonly","top","true","try","un.components","un.custom","un.directory","un.instfiles","un.license","uninstConfirm","user","Win10","Win7","Win8","WinVista","zlib"],FUNCTION_DEFINITION={match:[/Function/,/\s+/,regex.concat(/(\.)?/,hljs.IDENT_RE)],scope:{ 1:"keyword",3:"title.function"}},VARIABLE_DEFINITION={match:[/Var/,/\s+/,/(?:\/GLOBAL\s+)?/,/[A-Za-z][\w.]*/],scope:{1:"keyword",3:"params",4:"variable"}};return{name:"NSIS",case_insensitive:!0,keywords:{keyword:KEYWORDS2,literal:LITERALS2},contains:[hljs.HASH_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT(";","$",{relevance:0}),VARIABLE_DEFINITION,FUNCTION_DEFINITION,{beginKeywords:"Function PageEx Section SectionGroup FunctionEnd SectionEnd"},STRING,COMPILER,DEFINES,VARIABLES,LANGUAGES,PARAMETERS, PLUGINS,hljs.NUMBER_MODE]}}function ocaml(hljs){return{name:"OCaml",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",built_in:"array bool bytes char e\ xn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref",literal:"true false"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},hljs.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*",relevance:0},hljs.inherit(hljs.APOS_STRING_MODE,{className:"stri\ ng",relevance:0}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/->/}]}}function openscad(hljs){const SPECIAL_VARS={className:"keyword",begin:"\\$(f[asn]|t|vp[rtd]|children)"},LITERALS2={className:"literal",begin:"false|true|PI|undef"},NUMBERS={className:"number",begin:"\\b\\d+(\\.\\d+)?(e-?\\d+)?",relevance:0},STRING=hljs. inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),PREPRO={className:"meta",keywords:{keyword:"include use"},begin:"include|use <",end:">"},PARAMS={className:"params",begin:"\\(",end:"\\)",contains:["self",NUMBERS,STRING,SPECIAL_VARS,LITERALS2]},MODIFIERS={begin:"[*!#%]",relevance:0},FUNCTIONS={className:"function",beginKeywords:"module function",end:/=|\{/,contains:[PARAMS,hljs.UNDERSCORE_TITLE_MODE]};return{name:"OpenSCAD",aliases:["scad"],keywords:{keyword:"function module include use for interse\ ction_for if else \\%",literal:"false true PI undef",built_in:"circle square polygon text sphere cube cylinder polyhedron translate rotate scale resize mirror multmatrix color offset hull minkowski union difference intersection abs sign sin cos tan acos asin atan atan2 floor round ceil ln log pow sqrt exp rands min max concat lookup str chr search version version_num norm cross parent_module echo import import_dxf dxf_linear_extrude linear_extrude rotate_extrude surface projection render childre\ n dxf_cross dxf_dim let assign"},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,NUMBERS,PREPRO,STRING,SPECIAL_VARS,MODIFIERS,FUNCTIONS]}}function oxygene(hljs){const OXYGENE_KEYWORDS={$pattern:/\.?\w+/,keyword:"abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false final fina\ lize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly record reintroduce remove repeat require result reverse sealed select self se\ quence set shl shr skip static step soft take then to true try tuple type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained"},CURLY_COMMENT=hljs.COMMENT(/\{/,/\}/,{relevance:0}),PAREN_COMMENT=hljs.COMMENT("\\(\\*","\\*\\)",{relevance:10}),STRING={className:"string",begin:"'",end:"'", contains:[{begin:"''"}]},CHAR_STRING={className:"string",begin:"(#\\d+)+"},FUNCTION={beginKeywords:"function constructor destructor procedure method",end:"[:;]",keywords:"function constructor|10 destructor|10 procedure|10 method|10",contains:[hljs.inherit(hljs.TITLE_MODE,{scope:"title.function"}),{className:"params",begin:"\\(",end:"\\)",keywords:OXYGENE_KEYWORDS,contains:[STRING,CHAR_STRING]},CURLY_COMMENT,PAREN_COMMENT]},SEMICOLON={scope:"punctuation",match:/;/,relevance:0};return{name:"Oxygen\ e",case_insensitive:!0,keywords:OXYGENE_KEYWORDS,illegal:'("|\\$[G-Zg-z]|\\/\\*||->)',contains:[CURLY_COMMENT,PAREN_COMMENT,hljs.C_LINE_COMMENT_MODE,STRING,CHAR_STRING,hljs.NUMBER_MODE,FUNCTION,SEMICOLON]}}function parser3(hljs){const CURLY_SUBCOMMENT=hljs.COMMENT(/\{/,/\}/,{contains:["self"]});return{name:"Parser3",subLanguage:"xml",relevance:0,contains:[hljs.COMMENT("^#","$"),hljs.COMMENT(/\^rem\{/,/\}/,{relevance:10,contains:[CURLY_SUBCOMMENT]}),{className:"meta",begin:"^@(?:BASE|USE|CLA\ SS|OPTIONS)$",relevance:10},{className:"title",begin:"@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$"},{className:"variable",begin:/\$\{?[\w\-.:]+\}?/},{className:"keyword",begin:/\^[\w\-.:]+/},{className:"number",begin:"\\^#[0-9a-fA-F]+"},hljs.C_NUMBER_MODE]}}function pf(hljs){const MACRO={className:"variable",begin:/\$[\w\d#@][\w\d_]*/,relevance:0},TABLE={className:"variable",begin:/<(?!\/)/,end:/>/};return{name:"Packet Filter config",aliases:["pf.conf"],keywords:{$pattern:/[a-z0-9_<>-]+/, built_in:"block match pass load anchor|5 antispoof|10 set table",keyword:"in out log quick on rdomain inet inet6 proto from port os to route allow-opts divert-packet divert-reply divert-to flags group icmp-type icmp6-type label once probability recieved-on rtable prio queue tos tag tagged user keep fragment for os drop af-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robin source-hash static-port dup-to reply-to route-to parent bandwidth default min max qlimit block-poli\ cy debug fingerprints hostid limit loginterface optimization reassemble ruleset-optimization basic none profile skip state-defaults state-policy timeout const counters persist no modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppy source-track global rule max-src-nodes max-src-states max-src-conn max-src-conn-rate overload flush scrub|5 max-mss min-ttl no-df|10 random-id",literal:"all any no-route self urpf-failed egress|5 unknown"},contains:[hljs.HASH_COMMENT_MODE,hljs.NUMBER_MODE, hljs.QUOTE_STRING_MODE,MACRO,TABLE]}}function pgsql(hljs){const COMMENT_MODE=hljs.COMMENT("--","$"),UNQUOTED_IDENT="[a-zA-Z_][a-zA-Z_0-9$]*",DOLLAR_STRING="\\$([a-zA-Z_]?|[a-zA-Z_][a-zA-Z_0-9]*)\\$",LABEL="<<\\s*"+UNQUOTED_IDENT+"\\s*>>",SQL_KW="ABORT ALTER ANALYZE BEGIN CALL CHECKPOINT|10 CLOSE CLUSTER COMMENT COMMIT COPY CREATE DEALLOCATE DECLARE DELETE DISCARD DO DROP END EXECUTE EXPLAIN FETCH GRANT IMPORT INSERT LISTEN LOAD LOCK MOVE NOTIFY PREPARE REASSIGN|10 REFRESH REINDEX RELEASE RESET R\ EVOKE ROLLBACK SAVEPOINT SECURITY SELECT SET SHOW START TRUNCATE UNLISTEN|10 UPDATE VACUUM|10 VALUES AGGREGATE COLLATION CONVERSION|10 DATABASE DEFAULT PRIVILEGES DOMAIN TRIGGER EXTENSION FOREIGN WRAPPER|10 TABLE FUNCTION GROUP LANGUAGE LARGE OBJECT MATERIALIZED VIEW OPERATOR CLASS FAMILY POLICY PUBLICATION|10 ROLE RULE SCHEMA SEQUENCE SERVER STATISTICS SUBSCRIPTION SYSTEM TABLESPACE CONFIGURATION DICTIONARY PARSER TEMPLATE TYPE USER MAPPING PREPARED ACCESS METHOD CAST AS TRANSFORM TRANSACTION O\ WNED TO INTO SESSION AUTHORIZATION INDEX PROCEDURE ASSERTION ALL ANALYSE AND ANY ARRAY ASC ASYMMETRIC|10 BOTH CASE CHECK COLLATE COLUMN CONCURRENTLY|10 CONSTRAINT CROSS DEFERRABLE RANGE DESC DISTINCT ELSE EXCEPT FOR FREEZE|10 FROM FULL HAVING ILIKE IN INITIALLY INNER INTERSECT IS ISNULL JOIN LATERAL LEADING LIKE LIMIT NATURAL NOT NOTNULL NULL OFFSET ON ONLY OR ORDER OUTER OVERLAPS PLACING PRIMARY REFERENCES RETURNING SIMILAR SOME SYMMETRIC TABLESAMPLE THEN TRAILING UNION UNIQUE USING VARIADIC|10\ VERBOSE WHEN WHERE WINDOW WITH BY RETURNS INOUT OUT SETOF|10 IF STRICT CURRENT CONTINUE OWNER LOCATION OVER PARTITION WITHIN BETWEEN ESCAPE EXTERNAL INVOKER DEFINER WORK RENAME VERSION CONNECTION CONNECT TABLES TEMP TEMPORARY FUNCTIONS SEQUENCES TYPES SCHEMAS OPTION CASCADE RESTRICT ADD ADMIN EXISTS VALID VALIDATE ENABLE DISABLE REPLICA|10 ALWAYS PASSING COLUMNS PATH REF VALUE OVERRIDING IMMUTABLE STABLE VOLATILE BEFORE AFTER EACH ROW PROCEDURAL ROUTINE NO HANDLER VALIDATOR OPTIONS STORAGE OIDS\ |10 WITHOUT INHERIT DEPENDS CALLED INPUT LEAKPROOF|10 COST ROWS NOWAIT SEARCH UNTIL ENCRYPTED|10 PASSWORD CONFLICT|10 INSTEAD INHERITS CHARACTERISTICS WRITE CURSOR ALSO STATEMENT SHARE EXCLUSIVE INLINE ISOLATION REPEATABLE READ COMMITTED SERIALIZABLE UNCOMMITTED LOCAL GLOBAL SQL PROCEDURES RECURSIVE SNAPSHOT ROLLUP CUBE TRUSTED|10 INCLUDE FOLLOWING PRECEDING UNBOUNDED RANGE GROUPS UNENCRYPTED|10 SYSID FORMAT DELIMITER HEADER QUOTE ENCODING FILTER OFF FORCE_QUOTE FORCE_NOT_NULL FORCE_NULL COSTS B\ UFFERS TIMING SUMMARY DISABLE_PAGE_SKIPPING RESTART CYCLE GENERATED IDENTITY DEFERRED IMMEDIATE LEVEL LOGGED UNLOGGED OF NOTHING NONE EXCLUDE ATTRIBUTE USAGE ROUTINES TRUE FALSE NAN INFINITY ",ROLE_ATTRS="SUPERUSER NOSUPERUSER CREATEDB NOCREATEDB CREATEROLE NOCREATEROLE INHERIT NOINHERIT LOGIN NOLOGIN REPLICATION NOREPLICATION BYPASSRLS NOBYPASSRLS ",PLPGSQL_KW="ALIAS BEGIN CONSTANT DECLARE END EXCEPTION RETURN PERFORM|10 RAISE GET DIAGNOSTICS STACKED|10 FOREACH LOOP ELSIF EXIT WHILE REVERSE SLI\ CE DEBUG LOG INFO NOTICE WARNING ASSERT OPEN ",TYPES2="BIGINT INT8 BIGSERIAL SERIAL8 BIT VARYING VARBIT BOOLEAN BOOL BOX BYTEA CHARACTER CHAR VARCHAR CIDR CIRCLE DATE DOUBLE PRECISION FLOAT8 FLOAT INET INTEGER INT INT4 INTERVAL JSON JSONB LINE LSEG|10 MACADDR MACADDR8 MONEY NUMERIC DEC DECIMAL PATH POINT POLYGON REAL FLOAT4 SMALLINT INT2 SMALLSERIAL|10 SERIAL2|10 SERIAL|10 SERIAL4|10 TEXT TIME ZONE TIMETZ|10 TIMESTAMP TIMESTAMPTZ|10 TSQUERY|10 TSVECTOR|10 TXID_SNAPSHOT|10 UUID XML NATIONAL NCHAR\ INT4RANGE|10 INT8RANGE|10 NUMRANGE|10 TSRANGE|10 TSTZRANGE|10 DATERANGE|10 ANYELEMENT ANYARRAY ANYNONARRAY ANYENUM ANYRANGE CSTRING INTERNAL RECORD PG_DDL_COMMAND VOID UNKNOWN OPAQUE REFCURSOR NAME OID REGPROC|10 REGPROCEDURE|10 REGOPER|10 REGOPERATOR|10 REGCLASS|10 REGTYPE|10 REGROLE|10 REGNAMESPACE|10 REGCONFIG|10 REGDICTIONARY|10 ",TYPES_RE=TYPES2.trim().split(" ").map(function(val){return val.split("|")[0]}).join("|"),SQL_BI="CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER CURRENT_CATALOG|10 CU\ RRENT_DATE LOCALTIME LOCALTIMESTAMP CURRENT_ROLE|10 CURRENT_SCHEMA|10 SESSION_USER PUBLIC ",PLPGSQL_BI="FOUND NEW OLD TG_NAME|10 TG_WHEN|10 TG_LEVEL|10 TG_OP|10 TG_RELID|10 TG_RELNAME|10 TG_TABLE_NAME|10 TG_TABLE_SCHEMA|10 TG_NARGS|10 TG_ARGV|10 TG_EVENT|10 TG_TAG|10 ROW_COUNT RESULT_OID|10 PG_CONTEXT|10 RETURNED_SQLSTATE COLUMN_NAME CONSTRAINT_NAME PG_DATATYPE_NAME|10 MESSAGE_TEXT TABLE_NAME SCHEMA_NAME PG_EXCEPTION_DETAIL|10 PG_EXCEPTION_HINT|10 PG_EXCEPTION_CONTEXT|10 ",PLPGSQL_EXCEPTIONS="SQ\ LSTATE SQLERRM|10 SUCCESSFUL_COMPLETION WARNING DYNAMIC_RESULT_SETS_RETURNED IMPLICIT_ZERO_BIT_PADDING NULL_VALUE_ELIMINATED_IN_SET_FUNCTION PRIVILEGE_NOT_GRANTED PRIVILEGE_NOT_REVOKED STRING_DATA_RIGHT_TRUNCATION DEPRECATED_FEATURE NO_DATA NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED SQL_STATEMENT_NOT_YET_COMPLETE CONNECTION_EXCEPTION CONNECTION_DOES_NOT_EXIST CONNECTION_FAILURE SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION TRANSACTION_RESOLUTION_UN\ KNOWN PROTOCOL_VIOLATION TRIGGERED_ACTION_EXCEPTION FEATURE_NOT_SUPPORTED INVALID_TRANSACTION_INITIATION LOCATOR_EXCEPTION INVALID_LOCATOR_SPECIFICATION INVALID_GRANTOR INVALID_GRANT_OPERATION INVALID_ROLE_SPECIFICATION DIAGNOSTICS_EXCEPTION STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER CASE_NOT_FOUND CARDINALITY_VIOLATION DATA_EXCEPTION ARRAY_SUBSCRIPT_ERROR CHARACTER_NOT_IN_REPERTOIRE DATETIME_FIELD_OVERFLOW DIVISION_BY_ZERO ERROR_IN_ASSIGNMENT ESCAPE_CHARACTER_CONFLICT INDICATOR_OVERFLO\ W INTERVAL_FIELD_OVERFLOW INVALID_ARGUMENT_FOR_LOGARITHM INVALID_ARGUMENT_FOR_NTILE_FUNCTION INVALID_ARGUMENT_FOR_NTH_VALUE_FUNCTION INVALID_ARGUMENT_FOR_POWER_FUNCTION INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION INVALID_CHARACTER_VALUE_FOR_CAST INVALID_DATETIME_FORMAT INVALID_ESCAPE_CHARACTER INVALID_ESCAPE_OCTET INVALID_ESCAPE_SEQUENCE NONSTANDARD_USE_OF_ESCAPE_CHARACTER INVALID_INDICATOR_PARAMETER_VALUE INVALID_PARAMETER_VALUE INVALID_REGULAR_EXPRESSION INVALID_ROW_COUNT_IN_LIMIT_CLAUSE INVALI\ D_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE INVALID_TABLESAMPLE_ARGUMENT INVALID_TABLESAMPLE_REPEAT INVALID_TIME_ZONE_DISPLACEMENT_VALUE INVALID_USE_OF_ESCAPE_CHARACTER MOST_SPECIFIC_TYPE_MISMATCH NULL_VALUE_NOT_ALLOWED NULL_VALUE_NO_INDICATOR_PARAMETER NUMERIC_VALUE_OUT_OF_RANGE SEQUENCE_GENERATOR_LIMIT_EXCEEDED STRING_DATA_LENGTH_MISMATCH STRING_DATA_RIGHT_TRUNCATION SUBSTRING_ERROR TRIM_ERROR UNTERMINATED_C_STRING ZERO_LENGTH_CHARACTER_STRING FLOATING_POINT_EXCEPTION INVALID_TEXT_REPRESENTATION INVAL\ ID_BINARY_REPRESENTATION BAD_COPY_FILE_FORMAT UNTRANSLATABLE_CHARACTER NOT_AN_XML_DOCUMENT INVALID_XML_DOCUMENT INVALID_XML_CONTENT INVALID_XML_COMMENT INVALID_XML_PROCESSING_INSTRUCTION INTEGRITY_CONSTRAINT_VIOLATION RESTRICT_VIOLATION NOT_NULL_VIOLATION FOREIGN_KEY_VIOLATION UNIQUE_VIOLATION CHECK_VIOLATION EXCLUSION_VIOLATION INVALID_CURSOR_STATE INVALID_TRANSACTION_STATE ACTIVE_SQL_TRANSACTION BRANCH_TRANSACTION_ALREADY_ACTIVE HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL INAPPROPRIATE_ACCESS_MO\ DE_FOR_BRANCH_TRANSACTION INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION READ_ONLY_SQL_TRANSACTION SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED NO_ACTIVE_SQL_TRANSACTION IN_FAILED_SQL_TRANSACTION IDLE_IN_TRANSACTION_SESSION_TIMEOUT INVALID_SQL_STATEMENT_NAME TRIGGERED_DATA_CHANGE_VIOLATION INVALID_AUTHORIZATION_SPECIFICATION INVALID_PASSWORD DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST DEPENDENT_OBJECTS_STILL_EXIST INVALID_TRANSACTION_TERMI\ NATION SQL_ROUTINE_EXCEPTION FUNCTION_EXECUTED_NO_RETURN_STATEMENT MODIFYING_SQL_DATA_NOT_PERMITTED PROHIBITED_SQL_STATEMENT_ATTEMPTED READING_SQL_DATA_NOT_PERMITTED INVALID_CURSOR_NAME EXTERNAL_ROUTINE_EXCEPTION CONTAINING_SQL_NOT_PERMITTED MODIFYING_SQL_DATA_NOT_PERMITTED PROHIBITED_SQL_STATEMENT_ATTEMPTED READING_SQL_DATA_NOT_PERMITTED EXTERNAL_ROUTINE_INVOCATION_EXCEPTION INVALID_SQLSTATE_RETURNED NULL_VALUE_NOT_ALLOWED TRIGGER_PROTOCOL_VIOLATED SRF_PROTOCOL_VIOLATED EVENT_TRIGGER_PROTOCOL_V\ IOLATED SAVEPOINT_EXCEPTION INVALID_SAVEPOINT_SPECIFICATION INVALID_CATALOG_NAME INVALID_SCHEMA_NAME TRANSACTION_ROLLBACK TRANSACTION_INTEGRITY_CONSTRAINT_VIOLATION SERIALIZATION_FAILURE STATEMENT_COMPLETION_UNKNOWN DEADLOCK_DETECTED SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION SYNTAX_ERROR INSUFFICIENT_PRIVILEGE CANNOT_COERCE GROUPING_ERROR WINDOWING_ERROR INVALID_RECURSION INVALID_FOREIGN_KEY INVALID_NAME NAME_TOO_LONG RESERVED_NAME DATATYPE_MISMATCH INDETERMINATE_DATATYPE COLLATION_MISMATCH INDETERM\ INATE_COLLATION WRONG_OBJECT_TYPE GENERATED_ALWAYS UNDEFINED_COLUMN UNDEFINED_FUNCTION UNDEFINED_TABLE UNDEFINED_PARAMETER UNDEFINED_OBJECT DUPLICATE_COLUMN DUPLICATE_CURSOR DUPLICATE_DATABASE DUPLICATE_FUNCTION DUPLICATE_PREPARED_STATEMENT DUPLICATE_SCHEMA DUPLICATE_TABLE DUPLICATE_ALIAS DUPLICATE_OBJECT AMBIGUOUS_COLUMN AMBIGUOUS_FUNCTION AMBIGUOUS_PARAMETER AMBIGUOUS_ALIAS INVALID_COLUMN_REFERENCE INVALID_COLUMN_DEFINITION INVALID_CURSOR_DEFINITION INVALID_DATABASE_DEFINITION INVALID_FUNCTION\ _DEFINITION INVALID_PREPARED_STATEMENT_DEFINITION INVALID_SCHEMA_DEFINITION INVALID_TABLE_DEFINITION INVALID_OBJECT_DEFINITION WITH_CHECK_OPTION_VIOLATION INSUFFICIENT_RESOURCES DISK_FULL OUT_OF_MEMORY TOO_MANY_CONNECTIONS CONFIGURATION_LIMIT_EXCEEDED PROGRAM_LIMIT_EXCEEDED STATEMENT_TOO_COMPLEX TOO_MANY_COLUMNS TOO_MANY_ARGUMENTS OBJECT_NOT_IN_PREREQUISITE_STATE OBJECT_IN_USE CANT_CHANGE_RUNTIME_PARAM LOCK_NOT_AVAILABLE OPERATOR_INTERVENTION QUERY_CANCELED ADMIN_SHUTDOWN CRASH_SHUTDOWN CANNOT_C\ ONNECT_NOW DATABASE_DROPPED SYSTEM_ERROR IO_ERROR UNDEFINED_FILE DUPLICATE_FILE SNAPSHOT_TOO_OLD CONFIG_FILE_ERROR LOCK_FILE_EXISTS FDW_ERROR FDW_COLUMN_NAME_NOT_FOUND FDW_DYNAMIC_PARAMETER_VALUE_NEEDED FDW_FUNCTION_SEQUENCE_ERROR FDW_INCONSISTENT_DESCRIPTOR_INFORMATION FDW_INVALID_ATTRIBUTE_VALUE FDW_INVALID_COLUMN_NAME FDW_INVALID_COLUMN_NUMBER FDW_INVALID_DATA_TYPE FDW_INVALID_DATA_TYPE_DESCRIPTORS FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER FDW_INVALID_HANDLE FDW_INVALID_OPTION_INDEX FDW_INVALID\ _OPTION_NAME FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH FDW_INVALID_STRING_FORMAT FDW_INVALID_USE_OF_NULL_POINTER FDW_TOO_MANY_HANDLES FDW_OUT_OF_MEMORY FDW_NO_SCHEMAS FDW_OPTION_NAME_NOT_FOUND FDW_REPLY_HANDLE FDW_SCHEMA_NOT_FOUND FDW_TABLE_NOT_FOUND FDW_UNABLE_TO_CREATE_EXECUTION FDW_UNABLE_TO_CREATE_REPLY FDW_UNABLE_TO_ESTABLISH_CONNECTION PLPGSQL_ERROR RAISE_EXCEPTION NO_DATA_FOUND TOO_MANY_ROWS ASSERT_FAILURE INTERNAL_ERROR DATA_CORRUPTED INDEX_CORRUPTED ",FUNCTIONS_RE="ARRAY_AGG AVG BIT_AN\ D BIT_OR BOOL_AND BOOL_OR COUNT EVERY JSON_AGG JSONB_AGG JSON_OBJECT_AGG JSONB_OBJECT_AGG MAX MIN MODE STRING_AGG SUM XMLAGG CORR COVAR_POP COVAR_SAMP REGR_AVGX REGR_AVGY REGR_COUNT REGR_INTERCEPT REGR_R2 REGR_SLOPE REGR_SXX REGR_SXY REGR_SYY STDDEV STDDEV_POP STDDEV_SAMP VARIANCE VAR_POP VAR_SAMP PERCENTILE_CONT PERCENTILE_DISC ROW_NUMBER RANK DENSE_RANK PERCENT_RANK CUME_DIST NTILE LAG LEAD FIRST_VALUE LAST_VALUE NTH_VALUE NUM_NONNULLS NUM_NULLS ABS CBRT CEIL CEILING DEGREES DIV EXP FLOOR LN L\ OG MOD PI POWER RADIANS ROUND SCALE SIGN SQRT TRUNC WIDTH_BUCKET RANDOM SETSEED ACOS ACOSD ASIN ASIND ATAN ATAND ATAN2 ATAN2D COS COSD COT COTD SIN SIND TAN TAND BIT_LENGTH CHAR_LENGTH CHARACTER_LENGTH LOWER OCTET_LENGTH OVERLAY POSITION SUBSTRING TREAT TRIM UPPER ASCII BTRIM CHR CONCAT CONCAT_WS CONVERT CONVERT_FROM CONVERT_TO DECODE ENCODE INITCAP LEFT LENGTH LPAD LTRIM MD5 PARSE_IDENT PG_CLIENT_ENCODING QUOTE_IDENT|10 QUOTE_LITERAL|10 QUOTE_NULLABLE|10 REGEXP_MATCH REGEXP_MATCHES REGEXP_REPLA\ CE REGEXP_SPLIT_TO_ARRAY REGEXP_SPLIT_TO_TABLE REPEAT REPLACE REVERSE RIGHT RPAD RTRIM SPLIT_PART STRPOS SUBSTR TO_ASCII TO_HEX TRANSLATE OCTET_LENGTH GET_BIT GET_BYTE SET_BIT SET_BYTE TO_CHAR TO_DATE TO_NUMBER TO_TIMESTAMP AGE CLOCK_TIMESTAMP|10 DATE_PART DATE_TRUNC ISFINITE JUSTIFY_DAYS JUSTIFY_HOURS JUSTIFY_INTERVAL MAKE_DATE MAKE_INTERVAL|10 MAKE_TIME MAKE_TIMESTAMP|10 MAKE_TIMESTAMPTZ|10 NOW STATEMENT_TIMESTAMP|10 TIMEOFDAY TRANSACTION_TIMESTAMP|10 ENUM_FIRST ENUM_LAST ENUM_RANGE AREA CENTE\ R DIAMETER HEIGHT ISCLOSED ISOPEN NPOINTS PCLOSE POPEN RADIUS WIDTH BOX BOUND_BOX CIRCLE LINE LSEG PATH POLYGON ABBREV BROADCAST HOST HOSTMASK MASKLEN NETMASK NETWORK SET_MASKLEN TEXT INET_SAME_FAMILY INET_MERGE MACADDR8_SET7BIT ARRAY_TO_TSVECTOR GET_CURRENT_TS_CONFIG NUMNODE PLAINTO_TSQUERY PHRASETO_TSQUERY WEBSEARCH_TO_TSQUERY QUERYTREE SETWEIGHT STRIP TO_TSQUERY TO_TSVECTOR JSON_TO_TSVECTOR JSONB_TO_TSVECTOR TS_DELETE TS_FILTER TS_HEADLINE TS_RANK TS_RANK_CD TS_REWRITE TSQUERY_PHRASE TSVECTOR\ _TO_ARRAY TSVECTOR_UPDATE_TRIGGER TSVECTOR_UPDATE_TRIGGER_COLUMN XMLCOMMENT XMLCONCAT XMLELEMENT XMLFOREST XMLPI XMLROOT XMLEXISTS XML_IS_WELL_FORMED XML_IS_WELL_FORMED_DOCUMENT XML_IS_WELL_FORMED_CONTENT XPATH XPATH_EXISTS XMLTABLE XMLNAMESPACES TABLE_TO_XML TABLE_TO_XMLSCHEMA TABLE_TO_XML_AND_XMLSCHEMA QUERY_TO_XML QUERY_TO_XMLSCHEMA QUERY_TO_XML_AND_XMLSCHEMA CURSOR_TO_XML CURSOR_TO_XMLSCHEMA SCHEMA_TO_XML SCHEMA_TO_XMLSCHEMA SCHEMA_TO_XML_AND_XMLSCHEMA DATABASE_TO_XML DATABASE_TO_XMLSCHEMA D\ ATABASE_TO_XML_AND_XMLSCHEMA XMLATTRIBUTES TO_JSON TO_JSONB ARRAY_TO_JSON ROW_TO_JSON JSON_BUILD_ARRAY JSONB_BUILD_ARRAY JSON_BUILD_OBJECT JSONB_BUILD_OBJECT JSON_OBJECT JSONB_OBJECT JSON_ARRAY_LENGTH JSONB_ARRAY_LENGTH JSON_EACH JSONB_EACH JSON_EACH_TEXT JSONB_EACH_TEXT JSON_EXTRACT_PATH JSONB_EXTRACT_PATH JSON_OBJECT_KEYS JSONB_OBJECT_KEYS JSON_POPULATE_RECORD JSONB_POPULATE_RECORD JSON_POPULATE_RECORDSET JSONB_POPULATE_RECORDSET JSON_ARRAY_ELEMENTS JSONB_ARRAY_ELEMENTS JSON_ARRAY_ELEMENTS_TEX\ T JSONB_ARRAY_ELEMENTS_TEXT JSON_TYPEOF JSONB_TYPEOF JSON_TO_RECORD JSONB_TO_RECORD JSON_TO_RECORDSET JSONB_TO_RECORDSET JSON_STRIP_NULLS JSONB_STRIP_NULLS JSONB_SET JSONB_INSERT JSONB_PRETTY CURRVAL LASTVAL NEXTVAL SETVAL COALESCE NULLIF GREATEST LEAST ARRAY_APPEND ARRAY_CAT ARRAY_NDIMS ARRAY_DIMS ARRAY_FILL ARRAY_LENGTH ARRAY_LOWER ARRAY_POSITION ARRAY_POSITIONS ARRAY_PREPEND ARRAY_REMOVE ARRAY_REPLACE ARRAY_TO_STRING ARRAY_UPPER CARDINALITY STRING_TO_ARRAY UNNEST ISEMPTY LOWER_INC UPPER_INC L\ OWER_INF UPPER_INF RANGE_MERGE GENERATE_SERIES GENERATE_SUBSCRIPTS CURRENT_DATABASE CURRENT_QUERY CURRENT_SCHEMA|10 CURRENT_SCHEMAS|10 INET_CLIENT_ADDR INET_CLIENT_PORT INET_SERVER_ADDR INET_SERVER_PORT ROW_SECURITY_ACTIVE FORMAT_TYPE TO_REGCLASS TO_REGPROC TO_REGPROCEDURE TO_REGOPER TO_REGOPERATOR TO_REGTYPE TO_REGNAMESPACE TO_REGROLE COL_DESCRIPTION OBJ_DESCRIPTION SHOBJ_DESCRIPTION TXID_CURRENT TXID_CURRENT_IF_ASSIGNED TXID_CURRENT_SNAPSHOT TXID_SNAPSHOT_XIP TXID_SNAPSHOT_XMAX TXID_SNAPSHOT_X\ MIN TXID_VISIBLE_IN_SNAPSHOT TXID_STATUS CURRENT_SETTING SET_CONFIG BRIN_SUMMARIZE_NEW_VALUES BRIN_SUMMARIZE_RANGE BRIN_DESUMMARIZE_RANGE GIN_CLEAN_PENDING_LIST SUPPRESS_REDUNDANT_UPDATES_TRIGGER LO_FROM_BYTEA LO_PUT LO_GET LO_CREAT LO_CREATE LO_UNLINK LO_IMPORT LO_EXPORT LOREAD LOWRITE GROUPING CAST ".trim().split(" ").map(function(val){return val.split("|")[0]}).join("|");return{name:"PostgreSQL",aliases:["postgres","postgresql"],supersetOf:"sql",case_insensitive:!0,keywords:{keyword:SQL_KW+PLPGSQL_KW+ ROLE_ATTRS,built_in:SQL_BI+PLPGSQL_BI+PLPGSQL_EXCEPTIONS},illegal:/:==|\W\s*\(\*|(^|\s)\$[a-z]|\{\{|[a-z]:\s*$|\.\.\.|TO:|DO:/,contains:[{className:"keyword",variants:[{begin:/\bTEXT\s*SEARCH\b/},{begin:/\b(PRIMARY|FOREIGN|FOR(\s+NO)?)\s+KEY\b/},{begin:/\bPARALLEL\s+(UNSAFE|RESTRICTED|SAFE)\b/},{begin:/\bSTORAGE\s+(PLAIN|EXTERNAL|EXTENDED|MAIN)\b/},{begin:/\bMATCH\s+(FULL|PARTIAL|SIMPLE)\b/},{begin:/\bNULLS\s+(FIRST|LAST)\b/},{begin:/\bEVENT\s+TRIGGER\b/},{begin:/\b(MAPPING|OR)\s+REPLACE\b/},{begin:/\b(FROM|TO)\s+(PROGRAM|STDIN|STDOUT)\b/}, {begin:/\b(SHARE|EXCLUSIVE)\s+MODE\b/},{begin:/\b(LEFT|RIGHT)\s+(OUTER\s+)?JOIN\b/},{begin:/\b(FETCH|MOVE)\s+(NEXT|PRIOR|FIRST|LAST|ABSOLUTE|RELATIVE|FORWARD|BACKWARD)\b/},{begin:/\bPRESERVE\s+ROWS\b/},{begin:/\bDISCARD\s+PLANS\b/},{begin:/\bREFERENCING\s+(OLD|NEW)\b/},{begin:/\bSKIP\s+LOCKED\b/},{begin:/\bGROUPING\s+SETS\b/},{begin:/\b(BINARY|INSENSITIVE|SCROLL|NO\s+SCROLL)\s+(CURSOR|FOR)\b/},{begin:/\b(WITH|WITHOUT)\s+HOLD\b/},{begin:/\bWITH\s+(CASCADED|LOCAL)\s+CHECK\s+OPTION\b/},{begin:/\bEXCLUDE\s+(TIES|NO\s+OTHERS)\b/}, {begin:/\bFORMAT\s+(TEXT|XML|JSON|YAML)\b/},{begin:/\bSET\s+((SESSION|LOCAL)\s+)?NAMES\b/},{begin:/\bIS\s+(NOT\s+)?UNKNOWN\b/},{begin:/\bSECURITY\s+LABEL\b/},{begin:/\bSTANDALONE\s+(YES|NO|NO\s+VALUE)\b/},{begin:/\bWITH\s+(NO\s+)?DATA\b/},{begin:/\b(FOREIGN|SET)\s+DATA\b/},{begin:/\bSET\s+(CATALOG|CONSTRAINTS)\b/},{begin:/\b(WITH|FOR)\s+ORDINALITY\b/},{begin:/\bIS\s+(NOT\s+)?DOCUMENT\b/},{begin:/\bXML\s+OPTION\s+(DOCUMENT|CONTENT)\b/},{begin:/\b(STRIP|PRESERVE)\s+WHITESPACE\b/},{begin:/\bNO\s+(ACTION|MAXVALUE|MINVALUE)\b/}, {begin:/\bPARTITION\s+BY\s+(RANGE|LIST|HASH)\b/},{begin:/\bAT\s+TIME\s+ZONE\b/},{begin:/\bGRANTED\s+BY\b/},{begin:/\bRETURN\s+(QUERY|NEXT)\b/},{begin:/\b(ATTACH|DETACH)\s+PARTITION\b/},{begin:/\bFORCE\s+ROW\s+LEVEL\s+SECURITY\b/},{begin:/\b(INCLUDING|EXCLUDING)\s+(COMMENTS|CONSTRAINTS|DEFAULTS|IDENTITY|INDEXES|STATISTICS|STORAGE|ALL)\b/},{begin:/\bAS\s+(ASSIGNMENT|IMPLICIT|PERMISSIVE|RESTRICTIVE|ENUM|RANGE)\b/}]},{begin:/\b(FORMAT|FAMILY|VERSION)\s*\(/},{begin:/\bINCLUDE\s*\(/,keywords:"INCLUDE"}, {begin:/\bRANGE(?!\s*(BETWEEN|UNBOUNDED|CURRENT|[-0-9]+))/},{begin:/\b(VERSION|OWNER|TEMPLATE|TABLESPACE|CONNECTION\s+LIMIT|PROCEDURE|RESTRICT|JOIN|PARSER|COPY|START|END|COLLATION|INPUT|ANALYZE|STORAGE|LIKE|DEFAULT|DELIMITER|ENCODING|COLUMN|CONSTRAINT|TABLE|SCHEMA)\s*=/},{begin:/\b(PG_\w+?|HAS_[A-Z_]+_PRIVILEGE)\b/,relevance:10},{begin:/\bEXTRACT\s*\(/,end:/\bFROM\b/,returnEnd:!0,keywords:{type:"CENTURY DAY DECADE DOW DOY EPOCH HOUR ISODOW ISOYEAR MICROSECONDS MILLENNIUM MILLISECONDS MINUTE MONT\ H QUARTER SECOND TIMEZONE TIMEZONE_HOUR TIMEZONE_MINUTE WEEK YEAR"}},{begin:/\b(XMLELEMENT|XMLPI)\s*\(\s*NAME/,keywords:{keyword:"NAME"}},{begin:/\b(XMLPARSE|XMLSERIALIZE)\s*\(\s*(DOCUMENT|CONTENT)/,keywords:{keyword:"DOCUMENT CONTENT"}},{beginKeywords:"CACHE INCREMENT MAXVALUE MINVALUE",end:hljs.C_NUMBER_RE,returnEnd:!0,keywords:"BY CACHE INCREMENT MAXVALUE MINVALUE"},{className:"type",begin:/\b(WITH|WITHOUT)\s+TIME\s+ZONE\b/},{className:"type",begin:/\bINTERVAL\s+(YEAR|MONTH|DAY|HOUR|MINUTE|SECOND)(\s+TO\s+(MONTH|HOUR|MINUTE|SECOND))?\b/}, {begin:/\bRETURNS\s+(LANGUAGE_HANDLER|TRIGGER|EVENT_TRIGGER|FDW_HANDLER|INDEX_AM_HANDLER|TSM_HANDLER)\b/,keywords:{keyword:"RETURNS",type:"LANGUAGE_HANDLER TRIGGER EVENT_TRIGGER FDW_HANDLER INDEX_AM_HANDLER TSM_HANDLER"}},{begin:"\\b("+FUNCTIONS_RE+")\\s*\\("},{begin:"\\.("+TYPES_RE+")\\b"},{begin:"\\b("+TYPES_RE+")\\s+PATH\\b",keywords:{keyword:"PATH",type:TYPES2.replace("PATH ","")}},{className:"type",begin:"\\b("+TYPES_RE+")\\b"},{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]}, {className:"string",begin:"(e|E|u&|U&)'",end:"'",contains:[{begin:"\\\\."}],relevance:10},hljs.END_SAME_AS_BEGIN({begin:DOLLAR_STRING,end:DOLLAR_STRING,contains:[{subLanguage:["pgsql","perl","python","tcl","r","lua","java","php","ruby","bash","scheme","xml","json"],endsWithParent:!0}]}),{begin:'"',end:'"',contains:[{begin:'""'}]},hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE,COMMENT_MODE,{className:"meta",variants:[{begin:"%(ROW)?TYPE",relevance:10},{begin:"\\$\\d+"},{begin:"^#\\w",end:"$"}]},{className:"\ symbol",begin:LABEL,relevance:10}]}}function pony(hljs){const KEYWORDS2={keyword:"actor addressof and as be break class compile_error compile_intrinsic consume continue delegate digestof do else elseif embed end error for fun if ifdef in interface is isnt lambda let match new not object or primitive recover repeat return struct then trait try type until use var where while with xor",meta:"iso val tag trn box ref",literal:"this false true"},TRIPLE_QUOTE_STRING_MODE={className:"string",begin:'"""', end:'"""',relevance:10},QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',contains:[hljs.BACKSLASH_ESCAPE]},SINGLE_QUOTE_CHAR_MODE={className:"string",begin:"'",end:"'",contains:[hljs.BACKSLASH_ESCAPE],relevance:0},TYPE_NAME={className:"type",begin:"\\b_?[A-Z][\\w]*",relevance:0},PRIMED_NAME={begin:hljs.IDENT_RE+"'",relevance:0};return{name:"Pony",keywords:KEYWORDS2,contains:[TYPE_NAME,TRIPLE_QUOTE_STRING_MODE,QUOTE_STRING_MODE,SINGLE_QUOTE_CHAR_MODE,PRIMED_NAME,{className:"number",begin:"\ (-?)(\\b0[xX][a-fA-F0-9]+|\\b0[bB][01]+|(\\b\\d+(_\\d+)?(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",relevance:0},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]}}function powershell(hljs){const TYPES2=["string","char","byte","int","long","bool","decimal","single","double","DateTime","xml","array","hashtable","void"],VALID_VERBS="Add|Clear|Close|Copy|Enter|Exit|Find|Format|Get|Hide|Join|Lock|Move|New|Open|Optimize|Pop|Push|Redo|Remove|Rename|Reset|Resize|Search|Select|Set|Show|Skip|Split|Step|Switc\ h|Undo|Unlock|Watch|Backup|Checkpoint|Compare|Compress|Convert|ConvertFrom|ConvertTo|Dismount|Edit|Expand|Export|Group|Import|Initialize|Limit|Merge|Mount|Out|Publish|Restore|Save|Sync|Unpublish|Update|Approve|Assert|Build|Complete|Confirm|Deny|Deploy|Disable|Enable|Install|Invoke|Register|Request|Restart|Resume|Start|Stop|Submit|Suspend|Uninstall|Unregister|Wait|Debug|Measure|Ping|Repair|Resolve|Test|Trace|Connect|Disconnect|Read|Receive|Send|Write|Block|Grant|Protect|Revoke|Unblock|Unprotect|U\ se|ForEach|Sort|Tee|Where",COMPARISON_OPERATORS="-and|-as|-band|-bnot|-bor|-bxor|-casesensitive|-ccontains|-ceq|-cge|-cgt|-cle|-clike|-clt|-cmatch|-cne|-cnotcontains|-cnotlike|-cnotmatch|-contains|-creplace|-csplit|-eq|-exact|-f|-file|-ge|-gt|-icontains|-ieq|-ige|-igt|-ile|-ilike|-ilt|-imatch|-in|-ine|-inotcontains|-inotlike|-inotmatch|-ireplace|-is|-isnot|-isplit|-join|-le|-like|-lt|-match|-ne|-not|-notcontains|-notin|-notlike|-notmatch|-or|-regex|-replace|-shl|-shr|-split|-wildcard|-xor",KEYWORDS2={ $pattern:/-?[A-z\.\-]+\b/,keyword:"if else foreach return do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch hidden static parameter",built_in:"ac asnp cat cd CFS chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo|0 epal epcsv epsn erase etsn exsn fc fhx fl ft fw gal gbp gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group gsn gsnp gsv gtz gu\ gv gwmi h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp spjb spps spsv start stz sujb sv swmi tee trcm type wget where wjb write"},TITLE_NAME_RE=/\w[\w\d]*((-)[\w\d]+)*/,BACKTICK_ESCAPE={begin:"`[\\s\\S]",relevance:0},VAR={className:"\ variable",variants:[{begin:/\$\B/},{className:"keyword",begin:/\$this/},{begin:/\$[\w\d][\w\d_:]*/}]},LITERAL={className:"literal",begin:/\$(null|true|false)\b/},QUOTE_STRING={className:"string",variants:[{begin:/"/,end:/"/},{begin:/@"/,end:/^"@/}],contains:[BACKTICK_ESCAPE,VAR,{className:"variable",begin:/\$[A-z]/,end:/[^A-z]/}]},APOS_STRING={className:"string",variants:[{begin:/'/,end:/'/},{begin:/@'/,end:/^'@/}]},PS_HELPTAGS={className:"doctag",variants:[{begin:/\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/}, {begin:/\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/}]},PS_COMMENT=hljs.inherit(hljs.COMMENT(null,null),{variants:[{begin:/#/,end:/$/},{begin:/<#/,end:/#>/}],contains:[PS_HELPTAGS]}),CMDLETS={className:"built_in",variants:[{begin:"(".concat(VALID_VERBS,")+(-)[\\w\\d]+")}]},PS_CLASS={className:"class",beginKeywords:"class enum",end:/\s*[{]/,excludeEnd:!0,relevance:0,contains:[hljs.TITLE_MODE]},PS_FUNCTION={className:"function",begin:/function\s+/, end:/\s*\{|$/,excludeEnd:!0,returnBegin:!0,relevance:0,contains:[{begin:"function",relevance:0,className:"keyword"},{className:"title",begin:TITLE_NAME_RE,relevance:0},{begin:/\(/,end:/\)/,className:"params",relevance:0,contains:[VAR]}]},PS_USING={begin:/using\s/,end:/$/,returnBegin:!0,contains:[QUOTE_STRING,APOS_STRING,{className:"keyword",begin:/(using|assembly|command|module|namespace|type)/}]},PS_ARGUMENTS={variants:[{className:"operator",begin:"(".concat(COMPARISON_OPERATORS,")\\b")},{className:"\ literal",begin:/(-){1,2}[\w\d-]+/,relevance:0}]},HASH_SIGNS={className:"selector-tag",begin:/@\B/,relevance:0},PS_METHODS={className:"function",begin:/\[.*\]\s*[\w]+[ ]??\(/,end:/$/,returnBegin:!0,relevance:0,contains:[{className:"keyword",begin:"(".concat(KEYWORDS2.keyword.toString().replace(/\s/g,"|"),")\\b"),endsParent:!0,relevance:0},hljs.inherit(hljs.TITLE_MODE,{endsParent:!0})]},GENTLEMANS_SET=[PS_METHODS,PS_COMMENT,BACKTICK_ESCAPE,hljs.NUMBER_MODE,QUOTE_STRING,APOS_STRING,CMDLETS,VAR,LITERAL, HASH_SIGNS],PS_TYPE={begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[].concat("self",GENTLEMANS_SET,{begin:"("+TYPES2.join("|")+")",className:"built_in",relevance:0},{className:"type",begin:/[\.\w\d]+/,relevance:0})};return PS_METHODS.contains.unshift(PS_TYPE),{name:"PowerShell",aliases:["pwsh","ps","ps1"],case_insensitive:!0,keywords:KEYWORDS2,contains:GENTLEMANS_SET.concat(PS_CLASS,PS_FUNCTION,PS_USING,PS_ARGUMENTS,PS_TYPE)}}function processing(hljs){const regex=hljs.regex, BUILT_INS2=["displayHeight","displayWidth","mouseY","mouseX","mousePressed","pmouseX","pmouseY","key","keyCode","pixels","focused","frameCount","frameRate","height","width","size","createGraphics","beginDraw","createShape","loadShape","PShape","arc","ellipse","line","point","quad","rect","triangle","bezier","bezierDetail","bezierPoint","bezierTangent","curve","curveDetail","curvePoint","curveTangent","curveTightness","shape","shapeMode","beginContour","beginShape","bezierVertex","curveVertex","e\ ndContour","endShape","quadraticVertex","vertex","ellipseMode","noSmooth","rectMode","smooth","strokeCap","strokeJoin","strokeWeight","mouseClicked","mouseDragged","mouseMoved","mousePressed","mouseReleased","mouseWheel","keyPressed","keyPressedkeyReleased","keyTyped","print","println","save","saveFrame","day","hour","millis","minute","month","second","year","background","clear","colorMode","fill","noFill","noStroke","stroke","alpha","blue","brightness","color","green","hue","lerpColor","red","s\ aturation","modelX","modelY","modelZ","screenX","screenY","screenZ","ambient","emissive","shininess","specular","add","createImage","beginCamera","camera","endCamera","frustum","ortho","perspective","printCamera","printProjection","cursor","frameRate","noCursor","exit","loop","noLoop","popStyle","pushStyle","redraw","binary","boolean","byte","char","float","hex","int","str","unbinary","unhex","join","match","matchAll","nf","nfc","nfp","nfs","split","splitTokens","trim","append","arrayCopy","conc\ at","expand","reverse","shorten","sort","splice","subset","box","sphere","sphereDetail","createInput","createReader","loadBytes","loadJSONArray","loadJSONObject","loadStrings","loadTable","loadXML","open","parseXML","saveTable","selectFolder","selectInput","beginRaw","beginRecord","createOutput","createWriter","endRaw","endRecord","PrintWritersaveBytes","saveJSONArray","saveJSONObject","saveStream","saveStrings","saveXML","selectOutput","popMatrix","printMatrix","pushMatrix","resetMatrix","rotat\ e","rotateX","rotateY","rotateZ","scale","shearX","shearY","translate","ambientLight","directionalLight","lightFalloff","lights","lightSpecular","noLights","normal","pointLight","spotLight","image","imageMode","loadImage","noTint","requestImage","tint","texture","textureMode","textureWrap","blend","copy","filter","get","loadPixels","set","updatePixels","blendMode","loadShader","PShaderresetShader","shader","createFont","loadFont","text","textFont","textAlign","textLeading","textMode","textSize", "textWidth","textAscent","textDescent","abs","ceil","constrain","dist","exp","floor","lerp","log","mag","map","max","min","norm","pow","round","sq","sqrt","acos","asin","atan","atan2","cos","degrees","radians","sin","tan","noise","noiseDetail","noiseSeed","random","randomGaussian","randomSeed"],IDENT=hljs.IDENT_RE,FUNC_NAME={variants:[{match:regex.concat(regex.either(...BUILT_INS2),regex.lookahead(/\s*\(/)),className:"built_in"},{relevance:0,match:regex.concat(/\b(?!for|if|while)/,IDENT,regex.lookahead( /\s*\(/)),className:"title.function"}]},NEW_CLASS={match:[/new\s+/,IDENT],className:{1:"keyword",2:"class.title"}},PROPERTY={relevance:0,match:[/\./,IDENT],className:{2:"property"}},CLASS2={variants:[{match:[/class/,/\s+/,IDENT,/\s+/,/extends/,/\s+/,IDENT]},{match:[/class/,/\s+/,IDENT]}],className:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},TYPES2=["boolean","byte","char","color","double","float","int","long","short"],CLASSES=["BufferedReader","PVector","PFont","PImage", "PGraphics","HashMap","String","Array","FloatDict","ArrayList","FloatList","IntDict","IntList","JSONArray","JSONObject","Object","StringDict","StringList","Table","TableRow","XML"];return{name:"Processing",aliases:["pde"],keywords:{keyword:[...["abstract","assert","break","case","catch","const","continue","default","else","enum","final","finally","for","if","import","instanceof","long","native","new","package","private","private","protected","protected","public","public","return","static","stric\ tfp","switch","synchronized","throw","throws","transient","try","void","volatile","while"]],literal:"P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI null true false",title:"setup draw",variable:"super this",built_in:[...BUILT_INS2,...CLASSES],type:TYPES2},contains:[CLASS2,NEW_CLASS,FUNC_NAME,PROPERTY,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE]}}function profile(hljs){return{name:"Python profiler",contains:[hljs.C_NUMBER_MODE,{begin:"\ [a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}",end:":",excludeEnd:!0},{begin:"(ncalls|tottime|cumtime)",end:"$",keywords:"ncalls tottime|10 cumtime|10 filename",relevance:10},{begin:"function calls",end:"$",contains:[hljs.C_NUMBER_MODE],relevance:10},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{className:"string",begin:"\\(",end:"\\)$",excludeBegin:!0,excludeEnd:!0,relevance:0}]}}function prolog(hljs){const ATOM={begin:/[a-z][A-Za-z0-9_]*/,relevance:0},VAR={className:"symbol",variants:[{begin:/[A-Z][a-zA-Z0-9_]*/}, {begin:/_[A-Za-z0-9_]*/}],relevance:0},PARENTED={begin:/\(/,end:/\)/,relevance:0},LIST={begin:/\[/,end:/\]/},LINE_COMMENT={className:"comment",begin:/%/,end:/$/,contains:[hljs.PHRASAL_WORDS_MODE]},BACKTICK_STRING={className:"string",begin:/`/,end:/`/,contains:[hljs.BACKSLASH_ESCAPE]},CHAR_CODE={className:"string",begin:/0'(\\'|.)/},SPACE_CODE={className:"string",begin:/0'\\s/},inner2=[ATOM,VAR,PARENTED,{begin:/:-/},LIST,LINE_COMMENT,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE, BACKTICK_STRING,CHAR_CODE,SPACE_CODE,hljs.C_NUMBER_MODE];return PARENTED.contains=inner2,LIST.contains=inner2,{name:"Prolog",contains:inner2.concat([{begin:/\.$/}])}}function properties(hljs){const WS0="[ \\t\\f]*",WS1="[ \\t\\f]+",EQUAL_DELIM=WS0+"[:=]"+WS0,WS_DELIM=WS1,DELIM="("+EQUAL_DELIM+"|"+WS_DELIM+")",KEY="([^\\\\:= \\t\\f\\n]|\\\\.)+",DELIM_AND_VALUE={end:DELIM,relevance:0,starts:{className:"string",end:/$/,relevance:0,contains:[{begin:"\\\\\\\\"},{begin:"\\\\\\n"}]}};return{name:".prop\ erties",disableAutodetect:!0,case_insensitive:!0,illegal:/\S/,contains:[hljs.COMMENT("^\\s*[!#]","$"),{returnBegin:!0,variants:[{begin:KEY+EQUAL_DELIM},{begin:KEY+WS_DELIM}],contains:[{className:"attr",begin:KEY,endsParent:!0}],starts:DELIM_AND_VALUE},{className:"attr",begin:KEY+WS0+"$"}]}}function protobuf(hljs){const KEYWORDS2=["package","import","option","optional","required","repeated","group","oneof"],TYPES2=["double","float","int32","int64","uint32","uint64","sint32","sint64","fixed32","fi\ xed64","sfixed32","sfixed64","bool","string","bytes"],CLASS_DEFINITION={match:[/(message|enum|service)\s+/,hljs.IDENT_RE],scope:{1:"keyword",2:"title.class"}};return{name:"Protocol Buffers",aliases:["proto"],keywords:{keyword:KEYWORDS2,type:TYPES2,literal:["true","false"]},contains:[hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,CLASS_DEFINITION,{className:"function",beginKeywords:"rpc",end:/[{;]/,excludeEnd:!0,keywords:"rpc returns"},{begin:/^\s*[A-Z_]+(?=\s*=[^\n]+;$)/}]}} function puppet(hljs){const PUPPET_KEYWORDS={keyword:"and case default else elsif false if in import enherits node or true undef unless main settings $string ",literal:"alias audit before loglevel noop require subscribe tag owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check en_address ip_address realname command environment hour monute month monthday special target weekday creates cwd ogoutput refresh refreshonly tries try_s\ leep umask backup checksum content ctime force ignore links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel native_vlan speed principals allow_root auth_class auth_type authenticate_user k_of\ _n mechanisms rule session_owner shared options device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running start stop allowdupe auths expiry gid groups home iterations\ key_membership keys managehome membership password password_max_age password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert sslclientcert sslclientkey sslverify mounted",built_in:"arch\ itecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdistrelease lsbminordistrelease lsbrelease macaddress macaddre\ ss_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode selinux_current_mode selinux_enforced selinux_policyversi\ on serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version"},COMMENT=hljs.COMMENT("#","$"),IDENT_RE2="([A-Za-z_]|::)(\\w|::)*",TITLE=hljs.inherit(hljs.TITLE_MODE,{begin:IDENT_RE2}),VARIABLE={className:"variable",begin:"\\$"+IDENT_RE2},STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE,VARIABLE],variants:[{begin:/'/,end:/'/},{ begin:/"/,end:/"/}]};return{name:"Puppet",aliases:["pp"],contains:[COMMENT,VARIABLE,STRING,{beginKeywords:"class",end:"\\{|;",illegal:/=/,contains:[TITLE,COMMENT]},{beginKeywords:"define",end:/\{/,contains:[{className:"section",begin:hljs.IDENT_RE,endsParent:!0}]},{begin:hljs.IDENT_RE+"\\s+\\{",returnBegin:!0,end:/\S/,contains:[{className:"keyword",begin:hljs.IDENT_RE,relevance:.2},{begin:/\{/,end:/\}/,keywords:PUPPET_KEYWORDS,relevance:0,contains:[STRING,COMMENT,{begin:"[a-zA-Z_]+\\s*=>",returnBegin:!0, end:"=>",contains:[{className:"attr",begin:hljs.IDENT_RE}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},VARIABLE]}],relevance:0}]}}function purebasic(hljs){const STRINGS={className:"string",begin:'(~)?"',end:'"',illegal:"\\n"},CONSTANTS={className:"symbol",begin:"#[a-zA-Z_]\\w*\\$?"};return{name:"PureBASIC",aliases:["pb","pbi"],keywords:"Align And Array As Break CallDebugger Case CompilerCase CompilerDefault CompilerElse Comp\ ilerElseIf CompilerEndIf CompilerEndSelect CompilerError CompilerIf CompilerSelect CompilerWarning Continue Data DataSection Debug DebugLevel Declare DeclareC DeclareCDLL DeclareDLL DeclareModule Default Define Dim DisableASM DisableDebugger DisableExplicit Else ElseIf EnableASM EnableDebugger EnableExplicit End EndDataSection EndDeclareModule EndEnumeration EndIf EndImport EndInterface EndMacro EndModule EndProcedure EndSelect EndStructure EndStructureUnion EndWith Enumeration EnumerationBinary\ Extends FakeReturn For ForEach ForEver Global Gosub Goto If Import ImportC IncludeBinary IncludeFile IncludePath Interface List Macro MacroExpandedCount Map Module NewList NewMap Next Not Or Procedure ProcedureC ProcedureCDLL ProcedureDLL ProcedureReturn Protected Prototype PrototypeC ReDim Read Repeat Restore Return Runtime Select Shared Static Step Structure StructureUnion Swap Threaded To UndefineMacro Until Until UnuseModule UseModule Wend While With XIncludeFile XOr",contains:[hljs.COMMENT( ";","$",{relevance:0}),{className:"function",begin:"\\b(Procedure|Declare)(C|CDLL|DLL)?\\b",end:"\\(",excludeEnd:!0,returnBegin:!0,contains:[{className:"keyword",begin:"(Procedure|Declare)(C|CDLL|DLL)?",excludeEnd:!0},{className:"type",begin:"\\.\\w*"},hljs.UNDERSCORE_TITLE_MODE]},STRINGS,CONSTANTS]}}function q(hljs){return{name:"Q",aliases:["k","kdb"],keywords:{$pattern:/(`?)[A-Za-z0-9_]+\b/,keyword:"do while select delete by update from",literal:"0b 1b",built_in:"neg not null string reciprocal\ floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas ratios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tabl\ es views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg wsum sin cos tan sum",type:"`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid"},contains:[hljs.C_LINE_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE]}}function qml(hljs){const regex=hljs.regex,KEYWORDS2={keyword:"in of on if for wh\ ile finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await import",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number\ Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Behavior bool color coordinate date double enumeration font geocircle georectangle geoshape int list matrix4x4 parent point quaternion real rect size string url variant vector2d vector3d vector4d Promise"},QML_IDENT_RE="[a-zA-Z_][a-z\ A-Z0-9\\._]*",PROPERTY={className:"keyword",begin:"\\bproperty\\b",starts:{className:"string",end:"(:|=|;|,|//|/\\*|$)",returnEnd:!0}},SIGNAL={className:"keyword",begin:"\\bsignal\\b",starts:{className:"string",end:"(\\(|:|=|;|,|//|/\\*|$)",returnEnd:!0}},ID_ID={className:"attribute",begin:"\\bid\\s*:",starts:{className:"string",end:QML_IDENT_RE,returnEnd:!1}},QML_ATTRIBUTE={begin:QML_IDENT_RE+"\\s*:",returnBegin:!0,contains:[{className:"attribute",begin:QML_IDENT_RE,end:"\\s*:",excludeEnd:!0,relevance:0}], relevance:0},QML_OBJECT={begin:regex.concat(QML_IDENT_RE,/\s*\{/),end:/\{/,returnBegin:!0,relevance:0,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:QML_IDENT_RE})]};return{name:"QML",aliases:["qt"],case_insensitive:!1,keywords:KEYWORDS2,contains:[{className:"meta",begin:/^\s*['"]use (strict|asm)['"]/},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"}]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE, {className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:hljs.C_NUMBER_RE}],relevance:0},{begin:"("+hljs.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.REGEXP_MODE,{begin:/\s*[);\]]/,relevance:0,subLanguage:"xml"}],relevance:0},SIGNAL,PROPERTY,{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}), {className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]}],illegal:/\[|%/},{begin:"\\."+hljs.IDENT_RE,relevance:0},ID_ID,QML_ATTRIBUTE,QML_OBJECT],illegal:/#/}}function reasonml(hljs){return{name:"ReasonML",aliases:["re"],keywords:{$pattern:/[a-z_]\w*!?/,keyword:["and","as","asr","assert","begin","class","constraint","do","done","downto","else","end","esfun","exception","external","for","fun","function","functor","if","in", "include","inherit","initializer","land","lazy","let","lor","lsl","lsr","lxor","mod","module","mutable","new","nonrec","object","of","open","or","pri","pub","rec","sig","struct","switch","then","to","try","type","val","virtual","when","while","with"],built_in:["array","bool","bytes","char","exn|5","float","int","int32","int64","list","lazy_t|5","nativeint|5","ref","string","unit"],literal:["true","false"]},illegal:/(:-|:=|\$\{|\+=)/,contains:[{scope:"literal",match:/\[(\|\|)?\]|\(\)/,relevance:0}, hljs.C_LINE_COMMENT_MODE,hljs.COMMENT(/\/\*/,/\*\//,{illegal:/^(#,\/\/)/}),{scope:"symbol",match:/\'[A-Za-z_](?!\')[\w\']*/},{scope:"type",match:/`[A-Z][\w\']*/},{scope:"type",match:/\b[A-Z][\w\']*/,relevance:0},{match:/[a-z_]\w*\'[\w\']*/,relevance:0},{scope:"operator",match:/\s+(\|\||\+[\+\.]?|\*[\*\/\.]?|\/[\.]?|\.\.\.|\|>|&&|===?)\s+/,relevance:0},hljs.inherit(hljs.APOS_STRING_MODE,{scope:"string",relevance:0}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{scope:"number",variants:[{match:/\b0[xX][a-fA-F0-9_]+[Lln]?/}, {match:/\b0[oO][0-7_]+[Lln]?/},{match:/\b0[bB][01_]+[Lln]?/},{match:/\b[0-9][0-9_]*([Lln]|(\.[0-9_]*)?([eE][-+]?[0-9_]+)?)/}],relevance:0}]}}function rib(hljs){return{name:"RenderMan RIB",keywords:"ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail DetailRange Disk Displacement Display End ErrorHandle\ r Exposure Exterior Format FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry Hider Hyperboloid Identity Illuminate Imager Interior LightSource MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection Q\ uantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd TransformPoints Translate TrimCurve WorldBegin WorldEnd",illegal:"/}],illegal:/./},hljs.COMMENT("^#","$"),QUOTE_STRING,APOS_STRING,VAR,{begin:/[\w-]+=([^\s{}[\]()>]+)/,relevance:0,returnBegin:!0,contains:[{className:"attribute",begin:/[^=]+/},{begin:/=/,endsWithParent:!0,relevance:0,contains:[QUOTE_STRING,APOS_STRING,VAR,{className:"literal",begin:"\\b("+LITERALS2.split(" ").join("|")+")\\b"}, {begin:/("[^"]*"|[^\s{}[\]]+)/}]}]},{className:"number",begin:/\*[0-9a-fA-F]+/},{begin:"\\b("+COMMON_COMMANDS.split(" ").join("|")+")([\\s[(\\]|])",returnBegin:!0,contains:[{className:"built_in",begin:/\w+/}]},{className:"built_in",variants:[{begin:"(\\.\\./|/|\\s)(("+OBJECTS.split(" ").join("|")+");?\\s)+"},{begin:/\.\./,relevance:0}]}]}}function rsl(hljs){const BUILT_INS2=["abs","acos","ambient","area","asin","atan","atmosphere","attribute","calculatenormal","ceil","cellnoise","clamp","comp","\ concat","cos","degrees","depth","Deriv","diffuse","distance","Du","Dv","environment","exp","faceforward","filterstep","floor","format","fresnel","incident","length","lightsource","log","match","max","min","mod","noise","normalize","ntransform","opposite","option","phong","pnoise","pow","printf","ptlined","radians","random","reflect","refract","renderinfo","round","setcomp","setxcomp","setycomp","setzcomp","shadow","sign","sin","smoothstep","specular","specularbrdf","spline","sqrt","step","tan","\ texture","textureinfo","trace","transform","vtransform","xcomp","ycomp","zcomp"],TYPES2=["matrix","float","color","point","normal","vector"],KEYWORDS2=["while","for","if","do","return","else","break","extern","continue"],CLASS_DEFINITION={match:[/(surface|displacement|light|volume|imager)/,/\s+/,hljs.IDENT_RE],scope:{1:"keyword",3:"title.class"}};return{name:"RenderMan RSL",keywords:{keyword:KEYWORDS2,built_in:BUILT_INS2,type:TYPES2},illegal:"",/\s+/,/using/,/\s+/,/\S+/],beginScope:{1:"comment",3:"keyword",5:"type"},end:/$/,contains:[{className:"string",begin:/\S+/}]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRING,TYPE,METHOD,CLASS2,hljs.C_NUMBER_MODE,EXTENSION,END2,...INLINE_MODES,USING_PARAM_CLAUSE, ANNOTATION]}}function scheme(hljs){const SCHEME_IDENT_RE="[^\\(\\)\\[\\]\\{\\}\",'`;#|\\\\\\s]+",SCHEME_SIMPLE_NUMBER_RE="(-|\\+)?\\d+([./]\\d+)?",SCHEME_COMPLEX_NUMBER_RE=SCHEME_SIMPLE_NUMBER_RE+"[+\\-]"+SCHEME_SIMPLE_NUMBER_RE+"i",KEYWORDS2={$pattern:SCHEME_IDENT_RE,built_in:"case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-\ case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules ' * + , ,@ - ... / ; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabe\ tic? char-ci<=? char-ci=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm le\ ngth list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt str\ ing string->list string->number string->symbol string-append string-ci<=? string-ci=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string symbol? tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"},LITERAL={className:"literal",begin:"(#t|#f\ |#\\\\"+SCHEME_IDENT_RE+"|#\\\\.)"},NUMBER={className:"number",variants:[{begin:SCHEME_SIMPLE_NUMBER_RE,relevance:0},{begin:SCHEME_COMPLEX_NUMBER_RE,relevance:0},{begin:"#b[0-1]+(/[0-1]+)?"},{begin:"#o[0-7]+(/[0-7]+)?"},{begin:"#x[0-9a-f]+(/[0-9a-f]+)?"}]},STRING=hljs.QUOTE_STRING_MODE,COMMENT_MODES=[hljs.COMMENT(";","$",{relevance:0}),hljs.COMMENT("#\\|","\\|#")],IDENT={begin:SCHEME_IDENT_RE,relevance:0},QUOTED_IDENT={className:"symbol",begin:"'"+SCHEME_IDENT_RE},BODY={endsWithParent:!0,relevance:0}, QUOTED_LIST={variants:[{begin:/'/},{begin:"`"}],contains:[{begin:"\\(",end:"\\)",contains:["self",LITERAL,STRING,NUMBER,IDENT,QUOTED_IDENT]}]},NAME={className:"name",relevance:0,begin:SCHEME_IDENT_RE,keywords:KEYWORDS2},LIST={variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}],contains:[{begin:/lambda/,endsWithParent:!0,returnBegin:!0,contains:[NAME,{endsParent:!0,variants:[{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/}],contains:[IDENT]}]},NAME,BODY]};return BODY.contains=[LITERAL,NUMBER,STRING, IDENT,QUOTED_IDENT,QUOTED_LIST,LIST].concat(COMMENT_MODES),{name:"Scheme",aliases:["scm"],illegal:/\S/,contains:[hljs.SHEBANG(),NUMBER,STRING,QUOTED_IDENT,QUOTED_LIST,LIST].concat(COMMENT_MODES)}}function scilab(hljs){const COMMON_CONTAINS=[hljs.C_NUMBER_MODE,{className:"string",begin:`'|"`,end:`'|"`,contains:[hljs.BACKSLASH_ESCAPE,{begin:"''"}]}];return{name:"Scilab",aliases:["sci"],keywords:{$pattern:/%?\w+/,keyword:"abort break case clear catch continue do elseif else endfunction end for func\ tion global if pause return resume select try then while",literal:"%f %F %t %T %pi %eps %inf %nan %e %i %z %s",built_in:"abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp error exec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isempty isinfisnan isvector lasterror length load linspace list listfiles log10 log2 log max min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand real round sinh sin size gsort sprintf sqrt strcat strcmps\ tring sum system tanh tan type typename warning zeros matrix"},illegal:'("|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[hljs.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},{begin:"[a-zA-Z_][a-zA-Z_0-9]*[\\.']+",relevance:0},{begin:"\\[",end:"\\][\\.']*",relevance:0,contains:COMMON_CONTAINS},hljs.COMMENT("//","$")].concat(COMMON_CONTAINS)}}function smali(hljs){const smali_instr_low_prio=["add","and","cmp","cmpg","cmpl","const", "div","double","float","goto","if","int","long","move","mul","neg","new","nop","not","or","rem","return","shl","shr","sput","sub","throw","ushr","xor"],smali_instr_high_prio=["aget","aput","array","check","execute","fill","filled","goto/16","goto/32","iget","instance","invoke","iput","monitor","packed","sget","sparse"],smali_keywords=["transient","constructor","abstract","final","synthetic","public","private","protected","static","bridge","system"];return{name:"Smali",contains:[{className:"strin\ g",begin:'"',end:'"',relevance:0},hljs.COMMENT("#","$",{relevance:0}),{className:"keyword",variants:[{begin:"\\s*\\.end\\s[a-zA-Z0-9]*"},{begin:"^[ ]*\\.[a-zA-Z]*",relevance:0},{begin:"\\s:[a-zA-Z_0-9]*",relevance:0},{begin:"\\s("+smali_keywords.join("|")+")"}]},{className:"built_in",variants:[{begin:"\\s("+smali_instr_low_prio.join("|")+")\\s"},{begin:"\\s("+smali_instr_low_prio.join("|")+")((-|/)[a-zA-Z0-9]+)+\\s",relevance:10},{begin:"\\s("+smali_instr_high_prio.join("|")+")((-|/)[a-zA-Z0-9]+\ )*\\s",relevance:10}]},{className:"class",begin:`L[^(;: ]*;`,relevance:0},{begin:"[vp][0-9]+"}]}}function smalltalk(hljs){const VAR_IDENT_RE="[a-z][a-zA-Z0-9_]*",CHAR={className:"string",begin:"\\$.{1}"},SYMBOL={className:"symbol",begin:"#"+hljs.UNDERSCORE_IDENT_RE};return{name:"Smalltalk",aliases:["st"],keywords:["self","super","nil","true","false","thisContext"],contains:[hljs.COMMENT('"','"'),hljs.APOS_STRING_MODE,{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:VAR_IDENT_RE+":",relevance:0},hljs.C_NUMBER_MODE,SYMBOL,CHAR,{begin:"\ \\|[ ]*"+VAR_IDENT_RE+"([ ]+"+VAR_IDENT_RE+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+VAR_IDENT_RE}]},{begin:"#\\(",end:"\\)",contains:[hljs.APOS_STRING_MODE,CHAR,hljs.C_NUMBER_MODE,SYMBOL]}]}}function sml(hljs){return{name:"SML (Standard ML)",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sh\ aring sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0},hljs.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*", relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},hljs.inherit(hljs.APOS_STRING_MODE,{className:"string",relevance:0}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}function sqf(hljs){const VARIABLE={className:"variable",begin:/\b_+[a-zA-Z]\w*/},FUNCTION={className:"title",begin:/[a-zA-Z][a-zA-Z_0-9]*_fnc_[a-zA-Z_0-9]+/}, STRINGS={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]},{begin:"'",end:"'",contains:[{begin:"''",relevance:0}]}]},KEYWORDS2=["break","breakWith","breakOut","breakTo","case","catch","continue","continueWith","default","do","else","exit","exitWith","for","forEach","from","if","local","private","switch","step","then","throw","to","try","waitUntil","while","with"],LITERAL=["blufor","civilian","configNull","controlNull","displayNull","diaryRecordNull","east","end\ l","false","grpNull","independent","lineBreak","locationNull","nil","objNull","opfor","pi","resistance","scriptNull","sideAmbientLife","sideEmpty","sideEnemy","sideFriendly","sideLogic","sideUnknown","taskNull","teamMemberNull","true","west"],BUILT_IN=["abs","accTime","acos","action","actionIDs","actionKeys","actionKeysEx","actionKeysImages","actionKeysNames","actionKeysNamesArray","actionName","actionParams","activateAddons","activatedAddons","activateKey","activeTitleEffectParams","add3DENConn\ ection","add3DENEventHandler","add3DENLayer","addAction","addBackpack","addBackpackCargo","addBackpackCargoGlobal","addBackpackGlobal","addBinocularItem","addCamShake","addCuratorAddons","addCuratorCameraArea","addCuratorEditableObjects","addCuratorEditingArea","addCuratorPoints","addEditorObject","addEventHandler","addForce","addForceGeneratorRTD","addGoggles","addGroupIcon","addHandgunItem","addHeadgear","addItem","addItemCargo","addItemCargoGlobal","addItemPool","addItemToBackpack","addItemTo\ Uniform","addItemToVest","addLiveStats","addMagazine","addMagazineAmmoCargo","addMagazineCargo","addMagazineCargoGlobal","addMagazineGlobal","addMagazinePool","addMagazines","addMagazineTurret","addMenu","addMenuItem","addMissionEventHandler","addMPEventHandler","addMusicEventHandler","addonFiles","addOwnedMine","addPlayerScores","addPrimaryWeaponItem","addPublicVariableEventHandler","addRating","addResources","addScore","addScoreSide","addSecondaryWeaponItem","addSwitchableUnit","addTeamMember", "addToRemainsCollector","addTorque","addUniform","addUserActionEventHandler","addVehicle","addVest","addWaypoint","addWeapon","addWeaponCargo","addWeaponCargoGlobal","addWeaponGlobal","addWeaponItem","addWeaponPool","addWeaponTurret","addWeaponWithAttachmentsCargo","addWeaponWithAttachmentsCargoGlobal","admin","agent","agents","AGLToASL","aimedAtTarget","aimPos","airDensityCurveRTD","airDensityRTD","airplaneThrottle","airportSide","AISFinishHeal","alive","all3DENEntities","allActiveTitleEffects", "allAddonsInfo","allAirports","allControls","allCurators","allCutLayers","allDead","allDeadMen","allDiaryRecords","allDiarySubjects","allDisplays","allEnv3DSoundSources","allGroups","allLODs","allMapMarkers","allMines","allMissionObjects","allObjects","allow3DMode","allowCrewInImmobile","allowCuratorLogicIgnoreAreas","allowDamage","allowDammage","allowedService","allowFileOperations","allowFleeing","allowGetIn","allowService","allowSprint","allPlayers","allSimpleObjects","allSites","allTurrets", "allUnits","allUnitsUAV","allUsers","allVariables","ambientTemperature","ammo","ammoOnPylon","and","animate","animateBay","animateDoor","animatePylon","animateSource","animationNames","animationPhase","animationSourcePhase","animationState","apertureParams","append","apply","armoryPoints","arrayIntersect","asin","ASLToAGL","ASLToATL","assert","assignAsCargo","assignAsCargoIndex","assignAsCommander","assignAsDriver","assignAsGunner","assignAsTurret","assignCurator","assignedCargo","assignedComman\ der","assignedDriver","assignedGroup","assignedGunner","assignedItems","assignedTarget","assignedTeam","assignedVehicle","assignedVehicleRole","assignedVehicles","assignItem","assignTeam","assignToAirport","atan","atan2","atg","ATLToASL","attachedObject","attachedObjects","attachedTo","attachObject","attachTo","attackEnabled","awake","backpack","backpackCargo","backpackContainer","backpackItems","backpackMagazines","backpackSpaceFor","behaviour","benchmark","bezierInterpolation","binocular","bin\ ocularItems","binocularMagazine","boundingBox","boundingBoxReal","boundingCenter","brakesDisabled","briefingName","buildingExit","buildingPos","buldozer_EnableRoadDiag","buldozer_IsEnabledRoadDiag","buldozer_LoadNewRoads","buldozer_reloadOperMap","buttonAction","buttonSetAction","cadetMode","calculatePath","calculatePlayerVisibilityByFriendly","call","callExtension","camCommand","camCommit","camCommitPrepared","camCommitted","camConstuctionSetParams","camCreate","camDestroy","cameraEffect","came\ raEffectEnableHUD","cameraInterest","cameraOn","cameraView","campaignConfigFile","camPreload","camPreloaded","camPrepareBank","camPrepareDir","camPrepareDive","camPrepareFocus","camPrepareFov","camPrepareFovRange","camPreparePos","camPrepareRelPos","camPrepareTarget","camSetBank","camSetDir","camSetDive","camSetFocus","camSetFov","camSetFovRange","camSetPos","camSetRelPos","camSetTarget","camTarget","camUseNVG","canAdd","canAddItemToBackpack","canAddItemToUniform","canAddItemToVest","cancelSimpl\ eTaskDestination","canDeployWeapon","canFire","canMove","canSlingLoad","canStand","canSuspend","canTriggerDynamicSimulation","canUnloadInCombat","canVehicleCargo","captive","captiveNum","cbChecked","cbSetChecked","ceil","channelEnabled","cheatsEnabled","checkAIFeature","checkVisibility","className","clear3DENAttribute","clear3DENInventory","clearAllItemsFromBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearForcesRTD","clearGroupIcons","clearItemCargo","clearItemCargoGlobal","clearI\ temPool","clearMagazineCargo","clearMagazineCargoGlobal","clearMagazinePool","clearOverlay","clearRadio","clearWeaponCargo","clearWeaponCargoGlobal","clearWeaponPool","clientOwner","closeDialog","closeDisplay","closeOverlay","collapseObjectTree","collect3DENHistory","collectiveRTD","collisionDisabledWith","combatBehaviour","combatMode","commandArtilleryFire","commandChat","commander","commandFire","commandFollow","commandFSM","commandGetOut","commandingMenu","commandMove","commandRadio","command\ Stop","commandSuppressiveFire","commandTarget","commandWatch","comment","commitOverlay","compatibleItems","compatibleMagazines","compile","compileFinal","compileScript","completedFSM","composeText","configClasses","configFile","configHierarchy","configName","configOf","configProperties","configSourceAddonList","configSourceMod","configSourceModList","confirmSensorTarget","connectTerminalToUAV","connectToServer","controlsGroupCtrl","conversationDisabled","copyFromClipboard","copyToClipboard","cop\ yWaypoints","cos","count","countEnemy","countFriendly","countSide","countType","countUnknown","create3DENComposition","create3DENEntity","createAgent","createCenter","createDialog","createDiaryLink","createDiaryRecord","createDiarySubject","createDisplay","createGearDialog","createGroup","createGuardedPoint","createHashMap","createHashMapFromArray","createLocation","createMarker","createMarkerLocal","createMenu","createMine","createMissionDisplay","createMPCampaignDisplay","createSimpleObject","\ createSimpleTask","createSite","createSoundSource","createTask","createTeam","createTrigger","createUnit","createVehicle","createVehicleCrew","createVehicleLocal","crew","ctAddHeader","ctAddRow","ctClear","ctCurSel","ctData","ctFindHeaderRows","ctFindRowHeader","ctHeaderControls","ctHeaderCount","ctRemoveHeaders","ctRemoveRows","ctrlActivate","ctrlAddEventHandler","ctrlAngle","ctrlAnimateModel","ctrlAnimationPhaseModel","ctrlAt","ctrlAutoScrollDelay","ctrlAutoScrollRewind","ctrlAutoScrollSpeed", "ctrlBackgroundColor","ctrlChecked","ctrlClassName","ctrlCommit","ctrlCommitted","ctrlCreate","ctrlDelete","ctrlEnable","ctrlEnabled","ctrlFade","ctrlFontHeight","ctrlForegroundColor","ctrlHTMLLoaded","ctrlIDC","ctrlIDD","ctrlMapAnimAdd","ctrlMapAnimClear","ctrlMapAnimCommit","ctrlMapAnimDone","ctrlMapCursor","ctrlMapMouseOver","ctrlMapPosition","ctrlMapScale","ctrlMapScreenToWorld","ctrlMapSetPosition","ctrlMapWorldToScreen","ctrlModel","ctrlModelDirAndUp","ctrlModelScale","ctrlMousePosition","\ ctrlParent","ctrlParentControlsGroup","ctrlPosition","ctrlRemoveAllEventHandlers","ctrlRemoveEventHandler","ctrlScale","ctrlScrollValues","ctrlSetActiveColor","ctrlSetAngle","ctrlSetAutoScrollDelay","ctrlSetAutoScrollRewind","ctrlSetAutoScrollSpeed","ctrlSetBackgroundColor","ctrlSetChecked","ctrlSetDisabledColor","ctrlSetEventHandler","ctrlSetFade","ctrlSetFocus","ctrlSetFont","ctrlSetFontH1","ctrlSetFontH1B","ctrlSetFontH2","ctrlSetFontH2B","ctrlSetFontH3","ctrlSetFontH3B","ctrlSetFontH4","ctrl\ SetFontH4B","ctrlSetFontH5","ctrlSetFontH5B","ctrlSetFontH6","ctrlSetFontH6B","ctrlSetFontHeight","ctrlSetFontHeightH1","ctrlSetFontHeightH2","ctrlSetFontHeightH3","ctrlSetFontHeightH4","ctrlSetFontHeightH5","ctrlSetFontHeightH6","ctrlSetFontHeightSecondary","ctrlSetFontP","ctrlSetFontPB","ctrlSetFontSecondary","ctrlSetForegroundColor","ctrlSetModel","ctrlSetModelDirAndUp","ctrlSetModelScale","ctrlSetMousePosition","ctrlSetPixelPrecision","ctrlSetPosition","ctrlSetPositionH","ctrlSetPositionW","\ ctrlSetPositionX","ctrlSetPositionY","ctrlSetScale","ctrlSetScrollValues","ctrlSetShadow","ctrlSetStructuredText","ctrlSetText","ctrlSetTextColor","ctrlSetTextColorSecondary","ctrlSetTextSecondary","ctrlSetTextSelection","ctrlSetTooltip","ctrlSetTooltipColorBox","ctrlSetTooltipColorShade","ctrlSetTooltipColorText","ctrlSetTooltipMaxWidth","ctrlSetURL","ctrlSetURLOverlayMode","ctrlShadow","ctrlShow","ctrlShown","ctrlStyle","ctrlText","ctrlTextColor","ctrlTextHeight","ctrlTextSecondary","ctrlTextS\ election","ctrlTextWidth","ctrlTooltip","ctrlType","ctrlURL","ctrlURLOverlayMode","ctrlVisible","ctRowControls","ctRowCount","ctSetCurSel","ctSetData","ctSetHeaderTemplate","ctSetRowTemplate","ctSetValue","ctValue","curatorAddons","curatorCamera","curatorCameraArea","curatorCameraAreaCeiling","curatorCoef","curatorEditableObjects","curatorEditingArea","curatorEditingAreaType","curatorMouseOver","curatorPoints","curatorRegisteredObjects","curatorSelected","curatorWaypointCost","current3DENOperati\ on","currentChannel","currentCommand","currentMagazine","currentMagazineDetail","currentMagazineDetailTurret","currentMagazineTurret","currentMuzzle","currentNamespace","currentPilot","currentTask","currentTasks","currentThrowable","currentVisionMode","currentWaypoint","currentWeapon","currentWeaponMode","currentWeaponTurret","currentZeroing","cursorObject","cursorTarget","customChat","customRadio","customWaypointPosition","cutFadeOut","cutObj","cutRsc","cutText","damage","date","dateToNumber","\ dayTime","deActivateKey","debriefingText","debugFSM","debugLog","decayGraphValues","deg","delete3DENEntities","deleteAt","deleteCenter","deleteCollection","deleteEditorObject","deleteGroup","deleteGroupWhenEmpty","deleteIdentity","deleteLocation","deleteMarker","deleteMarkerLocal","deleteRange","deleteResources","deleteSite","deleteStatus","deleteTeam","deleteVehicle","deleteVehicleCrew","deleteWaypoint","detach","detectedMines","diag_activeMissionFSMs","diag_activeScripts","diag_activeSQFScript\ s","diag_activeSQSScripts","diag_allMissionEventHandlers","diag_captureFrame","diag_captureFrameToFile","diag_captureSlowFrame","diag_codePerformance","diag_deltaTime","diag_drawmode","diag_dumpCalltraceToLog","diag_dumpScriptAssembly","diag_dumpTerrainSynth","diag_dynamicSimulationEnd","diag_enable","diag_enabled","diag_exportConfig","diag_exportTerrainSVG","diag_fps","diag_fpsmin","diag_frameno","diag_getTerrainSegmentOffset","diag_lightNewLoad","diag_list","diag_localized","diag_log","diag_lo\ gSlowFrame","diag_mergeConfigFile","diag_recordTurretLimits","diag_resetFSM","diag_resetshapes","diag_scope","diag_setLightNew","diag_stacktrace","diag_tickTime","diag_toggle","dialog","diarySubjectExists","didJIP","didJIPOwner","difficulty","difficultyEnabled","difficultyEnabledRTD","difficultyOption","direction","directionStabilizationEnabled","directSay","disableAI","disableBrakes","disableCollisionWith","disableConversation","disableDebriefingStats","disableMapIndicators","disableNVGEquipmen\ t","disableRemoteSensors","disableSerialization","disableTIEquipment","disableUAVConnectability","disableUserInput","displayAddEventHandler","displayChild","displayCtrl","displayParent","displayRemoveAllEventHandlers","displayRemoveEventHandler","displaySetEventHandler","displayUniqueName","displayUpdate","dissolveTeam","distance","distance2D","distanceSqr","distributionRegion","do3DENAction","doArtilleryFire","doFire","doFollow","doFSM","doGetOut","doMove","doorPhase","doStop","doSuppressiveFir\ e","doTarget","doWatch","drawArrow","drawEllipse","drawIcon","drawIcon3D","drawLaser","drawLine","drawLine3D","drawLink","drawLocation","drawPolygon","drawRectangle","drawTriangle","driver","drop","dynamicSimulationDistance","dynamicSimulationDistanceCoef","dynamicSimulationEnabled","dynamicSimulationSystemEnabled","echo","edit3DENMissionAttributes","editObject","editorSetEventHandler","effectiveCommander","elevatePeriscope","emptyPositions","enableAI","enableAIFeature","enableAimPrecision","ena\ bleAttack","enableAudioFeature","enableAutoStartUpRTD","enableAutoTrimRTD","enableCamShake","enableCaustics","enableChannel","enableCollisionWith","enableCopilot","enableDebriefingStats","enableDiagLegend","enableDirectionStabilization","enableDynamicSimulation","enableDynamicSimulationSystem","enableEndDialog","enableEngineArtillery","enableEnvironment","enableFatigue","enableGunLights","enableInfoPanelComponent","enableIRLasers","enableMimics","enablePersonTurret","enableRadio","enableReload", "enableRopeAttach","enableSatNormalOnDetail","enableSaving","enableSentences","enableSimulation","enableSimulationGlobal","enableStamina","enableStressDamage","enableTeamSwitch","enableTraffic","enableUAVConnectability","enableUAVWaypoints","enableVehicleCargo","enableVehicleSensor","enableWeaponDisassembly","endLoadingScreen","endMission","engineOn","enginesIsOnRTD","enginesPowerRTD","enginesRpmRTD","enginesTorqueRTD","entities","environmentEnabled","environmentVolume","equipmentDisabled","esti\ matedEndServerTime","estimatedTimeLeft","evalObjectArgument","everyBackpack","everyContainer","exec","execEditorScript","execFSM","execVM","exp","expectedDestination","exportJIPMessages","eyeDirection","eyePos","face","faction","fadeEnvironment","fadeMusic","fadeRadio","fadeSound","fadeSpeech","failMission","fileExists","fillWeaponsFromPool","find","findAny","findCover","findDisplay","findEditorObject","findEmptyPosition","findEmptyPositionReady","findIf","findNearestEnemy","finishMissionInit","\ finite","fire","fireAtTarget","firstBackpack","flag","flagAnimationPhase","flagOwner","flagSide","flagTexture","flatten","fleeing","floor","flyInHeight","flyInHeightASL","focusedCtrl","fog","fogForecast","fogParams","forceAddUniform","forceAtPositionRTD","forceCadetDifficulty","forcedMap","forceEnd","forceFlagTexture","forceFollowRoad","forceGeneratorRTD","forceMap","forceRespawn","forceSpeed","forceUnicode","forceWalk","forceWeaponFire","forceWeatherChange","forEachMember","forEachMemberAgent", "forEachMemberTeam","forgetTarget","format","formation","formationDirection","formationLeader","formationMembers","formationPosition","formationTask","formatText","formLeader","freeExtension","freeLook","fromEditor","fuel","fullCrew","gearIDCAmmoCount","gearSlotAmmoCount","gearSlotData","gestureState","get","get3DENActionState","get3DENAttribute","get3DENCamera","get3DENConnections","get3DENEntity","get3DENEntityID","get3DENGrid","get3DENIconsVisible","get3DENLayerEntities","get3DENLinesVisible", "get3DENMissionAttribute","get3DENMouseOver","get3DENSelected","getAimingCoef","getAllEnv3DSoundControllers","getAllEnvSoundControllers","getAllHitPointsDamage","getAllOwnedMines","getAllPylonsInfo","getAllSoundControllers","getAllUnitTraits","getAmmoCargo","getAnimAimPrecision","getAnimSpeedCoef","getArray","getArtilleryAmmo","getArtilleryComputerSettings","getArtilleryETA","getAssetDLCInfo","getAssignedCuratorLogic","getAssignedCuratorUnit","getAttackTarget","getAudioOptionVolumes","getBackpac\ kCargo","getBleedingRemaining","getBurningValue","getCalculatePlayerVisibilityByFriendly","getCameraViewDirection","getCargoIndex","getCenterOfMass","getClientState","getClientStateNumber","getCompatiblePylonMagazines","getConnectedUAV","getConnectedUAVUnit","getContainerMaxLoad","getCorpse","getCruiseControl","getCursorObjectParams","getCustomAimCoef","getCustomSoundController","getCustomSoundControllerCount","getDammage","getDebriefingText","getDescription","getDir","getDirVisual","getDiverSta\ te","getDLCAssetsUsage","getDLCAssetsUsageByName","getDLCs","getDLCUsageTime","getEditorCamera","getEditorMode","getEditorObjectScope","getElevationOffset","getEngineTargetRPMRTD","getEnv3DSoundController","getEnvSoundController","getEventHandlerInfo","getFatigue","getFieldManualStartPage","getForcedFlagTexture","getForcedSpeed","getFriend","getFSMVariable","getFuelCargo","getGraphValues","getGroupIcon","getGroupIconParams","getGroupIcons","getHideFrom","getHit","getHitIndex","getHitPointDamage", "getItemCargo","getLighting","getLightingAt","getLoadedModsInfo","getMagazineCargo","getMarkerColor","getMarkerPos","getMarkerSize","getMarkerType","getMass","getMissionConfig","getMissionConfigValue","getMissionDLCs","getMissionLayerEntities","getMissionLayers","getMissionPath","getModelInfo","getMousePosition","getMusicPlayedTime","getNumber","getObjectArgument","getObjectChildren","getObjectDLC","getObjectFOV","getObjectID","getObjectMaterials","getObjectProxy","getObjectScale","getObjectText\ ures","getObjectType","getObjectViewDistance","getOpticsMode","getOrDefault","getOrDefaultCall","getOxygenRemaining","getPersonUsedDLCs","getPilotCameraDirection","getPilotCameraPosition","getPilotCameraRotation","getPilotCameraTarget","getPiPViewDistance","getPlateNumber","getPlayerChannel","getPlayerID","getPlayerScores","getPlayerUID","getPlayerVoNVolume","getPos","getPosASL","getPosASLVisual","getPosASLW","getPosATL","getPosATLVisual","getPosVisual","getPosWorld","getPosWorldVisual","getPylo\ nMagazines","getRelDir","getRelPos","getRemoteSensorsDisabled","getRepairCargo","getResolution","getRoadInfo","getRotorBrakeRTD","getSensorTargets","getSensorThreats","getShadowDistance","getShotParents","getSlingLoad","getSoundController","getSoundControllerResult","getSpeed","getStamina","getStatValue","getSteamFriendsServers","getSubtitleOptions","getSuppression","getTerrainGrid","getTerrainHeight","getTerrainHeightASL","getTerrainInfo","getText","getTextRaw","getTextureInfo","getTextWidth","\ getTiParameters","getTotalDLCUsageTime","getTrimOffsetRTD","getTurretLimits","getTurretOpticsMode","getUnitFreefallInfo","getUnitLoadout","getUnitTrait","getUnloadInCombat","getUserInfo","getUserMFDText","getUserMFDValue","getVariable","getVehicleCargo","getVehicleTiPars","getWeaponCargo","getWeaponSway","getWingsOrientationRTD","getWingsPositionRTD","getWPPos","glanceAt","globalChat","globalRadio","goggles","goto","group","groupChat","groupFromNetId","groupIconSelectable","groupIconsVisible","g\ roupID","groupOwner","groupRadio","groups","groupSelectedUnits","groupSelectUnit","gunner","gusts","halt","handgunItems","handgunMagazine","handgunWeapon","handsHit","hashValue","hasInterface","hasPilotCamera","hasWeapon","hcAllGroups","hcGroupParams","hcLeader","hcRemoveAllGroups","hcRemoveGroup","hcSelected","hcSelectGroup","hcSetGroup","hcShowBar","hcShownBar","headgear","hideBody","hideObject","hideObjectGlobal","hideSelection","hint","hintC","hintCadet","hintSilent","hmd","hostMission","htm\ lLoad","HUDMovementLevels","humidity","image","importAllGroups","importance","in","inArea","inAreaArray","incapacitatedState","inflame","inflamed","infoPanel","infoPanelComponentEnabled","infoPanelComponents","infoPanels","inGameUISetEventHandler","inheritsFrom","initAmbientLife","inPolygon","inputAction","inputController","inputMouse","inRangeOfArtillery","insert","insertEditorObject","intersect","is3DEN","is3DENMultiplayer","is3DENPreview","isAbleToBreathe","isActionMenuVisible","isAgent","isA\ imPrecisionEnabled","isAllowedCrewInImmobile","isArray","isAutoHoverOn","isAutonomous","isAutoStartUpEnabledRTD","isAutotest","isAutoTrimOnRTD","isAwake","isBleeding","isBurning","isClass","isCollisionLightOn","isCopilotEnabled","isDamageAllowed","isDedicated","isDLCAvailable","isEngineOn","isEqualRef","isEqualTo","isEqualType","isEqualTypeAll","isEqualTypeAny","isEqualTypeArray","isEqualTypeParams","isFilePatchingEnabled","isFinal","isFlashlightOn","isFlatEmpty","isForcedWalk","isFormationLeade\ r","isGameFocused","isGamePaused","isGroupDeletedWhenEmpty","isHidden","isInRemainsCollector","isInstructorFigureEnabled","isIRLaserOn","isKeyActive","isKindOf","isLaserOn","isLightOn","isLocalized","isManualFire","isMarkedForCollection","isMissionProfileNamespaceLoaded","isMultiplayer","isMultiplayerSolo","isNil","isNotEqualRef","isNotEqualTo","isNull","isNumber","isObjectHidden","isObjectRTD","isOnRoad","isPiPEnabled","isPlayer","isRealTime","isRemoteExecuted","isRemoteExecutedJIP","isSaving", "isSensorTargetConfirmed","isServer","isShowing3DIcons","isSimpleObject","isSprintAllowed","isStaminaEnabled","isSteamMission","isSteamOverlayEnabled","isStreamFriendlyUIEnabled","isStressDamageEnabled","isText","isTouchingGround","isTurnedOut","isTutHintsEnabled","isUAVConnectable","isUAVConnected","isUIContext","isUniformAllowed","isVehicleCargo","isVehicleRadarOn","isVehicleSensorEnabled","isWalking","isWeaponDeployed","isWeaponRested","itemCargo","items","itemsWithMagazines","join","joinAs", "joinAsSilent","joinSilent","joinString","kbAddDatabase","kbAddDatabaseTargets","kbAddTopic","kbHasTopic","kbReact","kbRemoveTopic","kbTell","kbWasSaid","keyImage","keyName","keys","knowsAbout","land","landAt","landResult","language","laserTarget","lbAdd","lbClear","lbColor","lbColorRight","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbPictureRight","lbSelection","lbSetColor","lbSetColorRight","lbSetCurSel","lbSetData","lbSetPicture","lbSetPictureColor","lbSetPictureColorDisabled", "lbSetPictureColorSelected","lbSetPictureRight","lbSetPictureRightColor","lbSetPictureRightColorDisabled","lbSetPictureRightColorSelected","lbSetSelectColor","lbSetSelectColorRight","lbSetSelected","lbSetText","lbSetTextRight","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortBy","lbSortByValue","lbText","lbTextRight","lbTooltip","lbValue","leader","leaderboardDeInit","leaderboardGetRows","leaderboardInit","leaderboardRequestRowsFriends","leaderboardRequestRowsGlobal","leaderboardRequestRowsG\ lobalAroundUser","leaderboardsRequestUploadScore","leaderboardsRequestUploadScoreKeepBest","leaderboardState","leaveVehicle","libraryCredits","libraryDisclaimers","lifeState","lightAttachObject","lightDetachObject","lightIsOn","lightnings","limitSpeed","linearConversion","lineIntersects","lineIntersectsObjs","lineIntersectsSurfaces","lineIntersectsWith","linkItem","list","listObjects","listRemoteTargets","listVehicleSensors","ln","lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","ln\ bColorRight","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbPictureRight","lnbSetColor","lnbSetColorRight","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetPictureColor","lnbSetPictureColorRight","lnbSetPictureColorSelected","lnbSetPictureColorSelectedRight","lnbSetPictureRight","lnbSetText","lnbSetTextRight","lnbSetTooltip","lnbSetValue","lnbSize","lnbSort","lnbSortBy","lnbSortByValue","lnbText","lnbTextRight","lnbValue", "load","loadAbs","loadBackpack","loadConfig","loadFile","loadGame","loadIdentity","loadMagazine","loadOverlay","loadStatus","loadUniform","loadVest","localize","localNamespace","locationPosition","lock","lockCameraTo","lockCargo","lockDriver","locked","lockedCameraTo","lockedCargo","lockedDriver","lockedInventory","lockedTurret","lockIdentity","lockInventory","lockTurret","lockWp","log","logEntities","logNetwork","logNetworkTerminate","lookAt","lookAtPos","magazineCargo","magazines","magazinesAl\ lTurrets","magazinesAmmo","magazinesAmmoCargo","magazinesAmmoFull","magazinesDetail","magazinesDetailBackpack","magazinesDetailUniform","magazinesDetailVest","magazinesTurret","magazineTurretAmmo","mapAnimAdd","mapAnimClear","mapAnimCommit","mapAnimDone","mapCenterOnCamera","mapGridPosition","markAsFinishedOnSteam","markerAlpha","markerBrush","markerChannel","markerColor","markerDir","markerPolyline","markerPos","markerShadow","markerShape","markerSize","markerText","markerType","matrixMultiply", "matrixTranspose","max","maxLoad","members","menuAction","menuAdd","menuChecked","menuClear","menuCollapse","menuData","menuDelete","menuEnable","menuEnabled","menuExpand","menuHover","menuPicture","menuSetAction","menuSetCheck","menuSetData","menuSetPicture","menuSetShortcut","menuSetText","menuSetURL","menuSetValue","menuShortcut","menuShortcutText","menuSize","menuSort","menuText","menuURL","menuValue","merge","min","mineActive","mineDetectedBy","missileTarget","missileTargetPos","missionConf\ igFile","missionDifficulty","missionEnd","missionName","missionNameSource","missionNamespace","missionProfileNamespace","missionStart","missionVersion","mod","modelToWorld","modelToWorldVisual","modelToWorldVisualWorld","modelToWorldWorld","modParams","moonIntensity","moonPhase","morale","move","move3DENCamera","moveInAny","moveInCargo","moveInCommander","moveInDriver","moveInGunner","moveInTurret","moveObjectToEnd","moveOut","moveTime","moveTo","moveToCompleted","moveToFailed","musicVolume","na\ me","namedProperties","nameSound","nearEntities","nearestBuilding","nearestLocation","nearestLocations","nearestLocationWithDubbing","nearestMines","nearestObject","nearestObjects","nearestTerrainObjects","nearObjects","nearObjectsReady","nearRoads","nearSupplies","nearTargets","needReload","needService","netId","netObjNull","newOverlay","nextMenuItemIndex","nextWeatherChange","nMenuItems","not","numberOfEnginesRTD","numberToDate","objectCurators","objectFromNetId","objectParent","objStatus","on\ BriefingGroup","onBriefingNotes","onBriefingPlan","onBriefingTeamSwitch","onCommandModeChanged","onDoubleClick","onEachFrame","onGroupIconClick","onGroupIconOverEnter","onGroupIconOverLeave","onHCGroupSelectionChanged","onMapSingleClick","onPlayerConnected","onPlayerDisconnected","onPreloadFinished","onPreloadStarted","onShowNewObject","onTeamSwitch","openCuratorInterface","openDLCPage","openGPS","openMap","openSteamApp","openYoutubeVideo","or","orderGetIn","overcast","overcastForecast","owner", "param","params","parseNumber","parseSimpleArray","parseText","parsingNamespace","particlesQuality","periscopeElevation","pickWeaponPool","pitch","pixelGrid","pixelGridBase","pixelGridNoUIScale","pixelH","pixelW","playableSlotsNumber","playableUnits","playAction","playActionNow","player","playerRespawnTime","playerSide","playersNumber","playGesture","playMission","playMove","playMoveNow","playMusic","playScriptedMission","playSound","playSound3D","playSoundUI","pose","position","positionCameraTo\ World","posScreenToWorld","posWorldToScreen","ppEffectAdjust","ppEffectCommit","ppEffectCommitted","ppEffectCreate","ppEffectDestroy","ppEffectEnable","ppEffectEnabled","ppEffectForceInNVG","precision","preloadCamera","preloadObject","preloadSound","preloadTitleObj","preloadTitleRsc","preprocessFile","preprocessFileLineNumbers","primaryWeapon","primaryWeaponItems","primaryWeaponMagazine","priority","processDiaryLink","productVersion","profileName","profileNamespace","profileNameSteam","progressL\ oadingScreen","progressPosition","progressSetPosition","publicVariable","publicVariableClient","publicVariableServer","pushBack","pushBackUnique","putWeaponPool","queryItemsPool","queryMagazinePool","queryWeaponPool","rad","radioChannelAdd","radioChannelCreate","radioChannelInfo","radioChannelRemove","radioChannelSetCallSign","radioChannelSetLabel","radioEnabled","radioVolume","rain","rainbow","rainParams","random","rank","rankId","rating","rectangular","regexFind","regexMatch","regexReplace","r\ egisteredTasks","registerTask","reload","reloadEnabled","remoteControl","remoteExec","remoteExecCall","remoteExecutedOwner","remove3DENConnection","remove3DENEventHandler","remove3DENLayer","removeAction","removeAll3DENEventHandlers","removeAllActions","removeAllAssignedItems","removeAllBinocularItems","removeAllContainers","removeAllCuratorAddons","removeAllCuratorCameraAreas","removeAllCuratorEditingAreas","removeAllEventHandlers","removeAllHandgunItems","removeAllItems","removeAllItemsWithMag\ azines","removeAllMissionEventHandlers","removeAllMPEventHandlers","removeAllMusicEventHandlers","removeAllOwnedMines","removeAllPrimaryWeaponItems","removeAllSecondaryWeaponItems","removeAllUserActionEventHandlers","removeAllWeapons","removeBackpack","removeBackpackGlobal","removeBinocularItem","removeCuratorAddons","removeCuratorCameraArea","removeCuratorEditableObjects","removeCuratorEditingArea","removeDiaryRecord","removeDiarySubject","removeDrawIcon","removeDrawLinks","removeEventHandler", "removeFromRemainsCollector","removeGoggles","removeGroupIcon","removeHandgunItem","removeHeadgear","removeItem","removeItemFromBackpack","removeItemFromUniform","removeItemFromVest","removeItems","removeMagazine","removeMagazineGlobal","removeMagazines","removeMagazinesTurret","removeMagazineTurret","removeMenuItem","removeMissionEventHandler","removeMPEventHandler","removeMusicEventHandler","removeOwnedMine","removePrimaryWeaponItem","removeSecondaryWeaponItem","removeSimpleTask","removeSwitch\ ableUnit","removeTeamMember","removeUniform","removeUserActionEventHandler","removeVest","removeWeapon","removeWeaponAttachmentCargo","removeWeaponCargo","removeWeaponGlobal","removeWeaponTurret","reportRemoteTarget","requiredVersion","resetCamShake","resetSubgroupDirection","resize","resources","respawnVehicle","restartEditorCamera","reveal","revealMine","reverse","reversedMouseY","roadAt","roadsConnectedTo","roleDescription","ropeAttachedObjects","ropeAttachedTo","ropeAttachEnabled","ropeAttac\ hTo","ropeCreate","ropeCut","ropeDestroy","ropeDetach","ropeEndPosition","ropeLength","ropes","ropesAttachedTo","ropeSegments","ropeUnwind","ropeUnwound","rotorsForcesRTD","rotorsRpmRTD","round","runInitScript","safeZoneH","safeZoneW","safeZoneWAbs","safeZoneX","safeZoneXAbs","safeZoneY","save3DENInventory","saveGame","saveIdentity","saveJoysticks","saveMissionProfileNamespace","saveOverlay","saveProfileNamespace","saveStatus","saveVar","savingEnabled","say","say2D","say3D","scopeName","score","\ scoreSide","screenshot","screenToWorld","scriptDone","scriptName","scudState","secondaryWeapon","secondaryWeaponItems","secondaryWeaponMagazine","select","selectBestPlaces","selectDiarySubject","selectedEditorObjects","selectEditorObject","selectionNames","selectionPosition","selectionVectorDirAndUp","selectLeader","selectMax","selectMin","selectNoPlayer","selectPlayer","selectRandom","selectRandomWeighted","selectWeapon","selectWeaponTurret","sendAUMessage","sendSimpleCommand","sendTask","sendT\ askResult","sendUDPMessage","sentencesEnabled","serverCommand","serverCommandAvailable","serverCommandExecutable","serverName","serverNamespace","serverTime","set","set3DENAttribute","set3DENAttributes","set3DENGrid","set3DENIconsVisible","set3DENLayer","set3DENLinesVisible","set3DENLogicType","set3DENMissionAttribute","set3DENMissionAttributes","set3DENModelsVisible","set3DENObjectType","set3DENSelected","setAccTime","setActualCollectiveRTD","setAirplaneThrottle","setAirportSide","setAmmo","set\ AmmoCargo","setAmmoOnPylon","setAnimSpeedCoef","setAperture","setApertureNew","setArmoryPoints","setAttributes","setAutonomous","setBehaviour","setBehaviourStrong","setBleedingRemaining","setBrakesRTD","setCameraInterest","setCamShakeDefParams","setCamShakeParams","setCamUseTi","setCaptive","setCenterOfMass","setCollisionLight","setCombatBehaviour","setCombatMode","setCompassOscillation","setConvoySeparation","setCruiseControl","setCuratorCameraAreaCeiling","setCuratorCoef","setCuratorEditingAre\ aType","setCuratorWaypointCost","setCurrentChannel","setCurrentTask","setCurrentWaypoint","setCustomAimCoef","SetCustomMissionData","setCustomSoundController","setCustomWeightRTD","setDamage","setDammage","setDate","setDebriefingText","setDefaultCamera","setDestination","setDetailMapBlendPars","setDiaryRecordText","setDiarySubjectPicture","setDir","setDirection","setDrawIcon","setDriveOnPath","setDropInterval","setDynamicSimulationDistance","setDynamicSimulationDistanceCoef","setEditorMode","set\ EditorObjectScope","setEffectCondition","setEffectiveCommander","setEngineRpmRTD","setFace","setFaceanimation","setFatigue","setFeatureType","setFlagAnimationPhase","setFlagOwner","setFlagSide","setFlagTexture","setFog","setForceGeneratorRTD","setFormation","setFormationTask","setFormDir","setFriend","setFromEditor","setFSMVariable","setFuel","setFuelCargo","setGroupIcon","setGroupIconParams","setGroupIconsSelectable","setGroupIconsVisible","setGroupid","setGroupIdGlobal","setGroupOwner","setGus\ ts","setHideBehind","setHit","setHitIndex","setHitPointDamage","setHorizonParallaxCoef","setHUDMovementLevels","setHumidity","setIdentity","setImportance","setInfoPanel","setLeader","setLightAmbient","setLightAttenuation","setLightBrightness","setLightColor","setLightConePars","setLightDayLight","setLightFlareMaxDistance","setLightFlareSize","setLightIntensity","setLightIR","setLightnings","setLightUseFlare","setLightVolumeShape","setLocalWindParams","setMagazineTurretAmmo","setMarkerAlpha","set\ MarkerAlphaLocal","setMarkerBrush","setMarkerBrushLocal","setMarkerColor","setMarkerColorLocal","setMarkerDir","setMarkerDirLocal","setMarkerPolyline","setMarkerPolylineLocal","setMarkerPos","setMarkerPosLocal","setMarkerShadow","setMarkerShadowLocal","setMarkerShape","setMarkerShapeLocal","setMarkerSize","setMarkerSizeLocal","setMarkerText","setMarkerTextLocal","setMarkerType","setMarkerTypeLocal","setMass","setMaxLoad","setMimic","setMissileTarget","setMissileTargetPos","setMousePosition","set\ MusicEffect","setMusicEventHandler","setName","setNameSound","setObjectArguments","setObjectMaterial","setObjectMaterialGlobal","setObjectProxy","setObjectScale","setObjectTexture","setObjectTextureGlobal","setObjectViewDistance","setOpticsMode","setOvercast","setOwner","setOxygenRemaining","setParticleCircle","setParticleClass","setParticleFire","setParticleParams","setParticleRandom","setPilotCameraDirection","setPilotCameraRotation","setPilotCameraTarget","setPilotLight","setPiPEffect","setPi\ PViewDistance","setPitch","setPlateNumber","setPlayable","setPlayerRespawnTime","setPlayerVoNVolume","setPos","setPosASL","setPosASL2","setPosASLW","setPosATL","setPosition","setPosWorld","setPylonLoadout","setPylonsPriority","setRadioMsg","setRain","setRainbow","setRandomLip","setRank","setRectangular","setRepairCargo","setRotorBrakeRTD","setShadowDistance","setShotParents","setSide","setSimpleTaskAlwaysVisible","setSimpleTaskCustomData","setSimpleTaskDescription","setSimpleTaskDestination","se\ tSimpleTaskTarget","setSimpleTaskType","setSimulWeatherLayers","setSize","setSkill","setSlingLoad","setSoundEffect","setSpeaker","setSpeech","setSpeedMode","setStamina","setStaminaScheme","setStatValue","setSuppression","setSystemOfUnits","setTargetAge","setTaskMarkerOffset","setTaskResult","setTaskState","setTerrainGrid","setTerrainHeight","setText","setTimeMultiplier","setTiParameter","setTitleEffect","setTowParent","setTrafficDensity","setTrafficDistance","setTrafficGap","setTrafficSpeed","se\ tTriggerActivation","setTriggerArea","setTriggerInterval","setTriggerStatements","setTriggerText","setTriggerTimeout","setTriggerType","setTurretLimits","setTurretOpticsMode","setType","setUnconscious","setUnitAbility","setUnitCombatMode","setUnitFreefallHeight","setUnitLoadout","setUnitPos","setUnitPosWeak","setUnitRank","setUnitRecoilCoefficient","setUnitTrait","setUnloadInCombat","setUserActionText","setUserMFDText","setUserMFDValue","setVariable","setVectorDir","setVectorDirAndUp","setVector\ Up","setVehicleAmmo","setVehicleAmmoDef","setVehicleArmor","setVehicleCargo","setVehicleId","setVehicleLock","setVehiclePosition","setVehicleRadar","setVehicleReceiveRemoteTargets","setVehicleReportOwnPosition","setVehicleReportRemoteTargets","setVehicleTiPars","setVehicleVarName","setVelocity","setVelocityModelSpace","setVelocityTransformation","setViewDistance","setVisibleIfTreeCollapsed","setWantedRPMRTD","setWaves","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius", "setWaypointDescription","setWaypointForceBehaviour","setWaypointFormation","setWaypointHousePosition","setWaypointLoiterAltitude","setWaypointLoiterRadius","setWaypointLoiterType","setWaypointName","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","setWeaponReloadingTime","setWeaponZeroing","setWind","setWindDir","setWindForce","setWindStr","setWingForceScaleRTD","setWPPos","show3DIcons","showChat","s\ howCinemaBorder","showCommandingMenu","showCompass","showCuratorCompass","showGps","showHUD","showLegend","showMap","shownArtilleryComputer","shownChat","shownCompass","shownCuratorCompass","showNewEditorObject","shownGps","shownHUD","shownMap","shownPad","shownRadio","shownScoretable","shownSubtitles","shownUAVFeed","shownWarrant","shownWatch","showPad","showRadio","showScoretable","showSubtitles","showUAVFeed","showWarrant","showWatch","showWaypoint","showWaypoints","side","sideChat","sideRadi\ o","simpleTasks","simulationEnabled","simulCloudDensity","simulCloudOcclusion","simulInClouds","simulWeatherSync","sin","size","sizeOf","skill","skillFinal","skipTime","sleep","sliderPosition","sliderRange","sliderSetPosition","sliderSetRange","sliderSetSpeed","sliderSpeed","slingLoadAssistantShown","soldierMagazines","someAmmo","sort","soundVolume","spawn","speaker","speechVolume","speed","speedMode","splitString","sqrt","squadParams","stance","startLoadingScreen","stop","stopEngineRTD","stoppe\ d","str","sunOrMoon","supportInfo","suppressFor","surfaceIsWater","surfaceNormal","surfaceTexture","surfaceType","swimInDepth","switchableUnits","switchAction","switchCamera","switchGesture","switchLight","switchMove","synchronizedObjects","synchronizedTriggers","synchronizedWaypoints","synchronizeObjectsAdd","synchronizeObjectsRemove","synchronizeTrigger","synchronizeWaypoint","systemChat","systemOfUnits","systemTime","systemTimeUTC","tan","targetKnowledge","targets","targetsAggregate","targets\ Query","taskAlwaysVisible","taskChildren","taskCompleted","taskCustomData","taskDescription","taskDestination","taskHint","taskMarkerOffset","taskName","taskParent","taskResult","taskState","taskType","teamMember","teamName","teams","teamSwitch","teamSwitchEnabled","teamType","terminate","terrainIntersect","terrainIntersectASL","terrainIntersectAtASL","text","textLog","textLogFormat","tg","time","timeMultiplier","titleCut","titleFadeOut","titleObj","titleRsc","titleText","toArray","toFixed","toL\ ower","toLowerANSI","toString","toUpper","toUpperANSI","triggerActivated","triggerActivation","triggerAmmo","triggerArea","triggerAttachedVehicle","triggerAttachObject","triggerAttachVehicle","triggerDynamicSimulation","triggerInterval","triggerStatements","triggerText","triggerTimeout","triggerTimeoutCurrent","triggerType","trim","turretLocal","turretOwner","turretUnit","tvAdd","tvClear","tvCollapse","tvCollapseAll","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvExpandAll","tvIsSelected", "tvPicture","tvPictureRight","tvSelection","tvSetColor","tvSetCurSel","tvSetData","tvSetPicture","tvSetPictureColor","tvSetPictureColorDisabled","tvSetPictureColorSelected","tvSetPictureRight","tvSetPictureRightColor","tvSetPictureRightColorDisabled","tvSetPictureRightColorSelected","tvSetSelectColor","tvSetSelected","tvSetText","tvSetTooltip","tvSetValue","tvSort","tvSortAll","tvSortByValue","tvSortByValueAll","tvText","tvTooltip","tvValue","type","typeName","typeOf","UAVControl","uiNamespace", "uiSleep","unassignCurator","unassignItem","unassignTeam","unassignVehicle","underwater","uniform","uniformContainer","uniformItems","uniformMagazines","uniqueUnitItems","unitAddons","unitAimPosition","unitAimPositionVisual","unitBackpack","unitCombatMode","unitIsUAV","unitPos","unitReady","unitRecoilCoefficient","units","unitsBelowHeight","unitTurret","unlinkItem","unlockAchievement","unregisterTask","updateDrawIcon","updateMenuItem","updateObjectTree","useAIOperMapObstructionTest","useAISteeri\ ngComponent","useAudioTimeForMoves","userInputDisabled","values","vectorAdd","vectorCos","vectorCrossProduct","vectorDiff","vectorDir","vectorDirVisual","vectorDistance","vectorDistanceSqr","vectorDotProduct","vectorFromTo","vectorLinearConversion","vectorMagnitude","vectorMagnitudeSqr","vectorModelToWorld","vectorModelToWorldVisual","vectorMultiply","vectorNormalized","vectorUp","vectorUpVisual","vectorWorldToModel","vectorWorldToModelVisual","vehicle","vehicleCargoEnabled","vehicleChat","vehic\ leMoveInfo","vehicleRadio","vehicleReceiveRemoteTargets","vehicleReportOwnPosition","vehicleReportRemoteTargets","vehicles","vehicleVarName","velocity","velocityModelSpace","verifySignature","vest","vestContainer","vestItems","vestMagazines","viewDistance","visibleCompass","visibleGps","visibleMap","visiblePosition","visiblePositionASL","visibleScoretable","visibleWatch","waves","waypointAttachedObject","waypointAttachedVehicle","waypointAttachObject","waypointAttachVehicle","waypointBehaviour", "waypointCombatMode","waypointCompletionRadius","waypointDescription","waypointForceBehaviour","waypointFormation","waypointHousePosition","waypointLoiterAltitude","waypointLoiterRadius","waypointLoiterType","waypointName","waypointPosition","waypoints","waypointScript","waypointsEnabledUAV","waypointShow","waypointSpeed","waypointStatements","waypointTimeout","waypointTimeoutCurrent","waypointType","waypointVisible","weaponAccessories","weaponAccessoriesCargo","weaponCargo","weaponDirection","w\ eaponInertia","weaponLowered","weaponReloadingTime","weapons","weaponsInfo","weaponsItems","weaponsItemsCargo","weaponState","weaponsTurret","weightRTD","WFSideText","wind","windDir","windRTD","windStr","wingsForcesRTD","worldName","worldSize","worldToModel","worldToModelVisual","worldToScreen"],PREPROCESSOR={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:"define undef ifdef ifndef else endif include if",contains:[{begin:/\\\n/,relevance:0},hljs.inherit(STRINGS,{className:"string"}),{begin:/<[^\n>]*>/, end:/$/,illegal:"\\n"},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]};return{name:"SQF",case_insensitive:!0,keywords:{keyword:KEYWORDS2,built_in:BUILT_IN,literal:LITERAL},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.NUMBER_MODE,VARIABLE,FUNCTION,STRINGS,PREPROCESSOR],illegal:[/\$[^a-fA-F0-9]/,/\w\$/,/\?/,/@/,/ \| /,/[a-zA-Z_]\./,/\:\=/,/\[\:/]}}function stan(hljs){const regex=hljs.regex,BLOCKS=["functions","model","data","parameters","quantities","transformed","generat\ ed"],STATEMENTS=["for","in","if","else","while","break","continue","return"],TYPES2=["array","tuple","complex","int","real","vector","complex_vector","ordered","positive_ordered","simplex","unit_vector","row_vector","complex_row_vector","matrix","complex_matrix","cholesky_factor_corr|10","cholesky_factor_cov|10","corr_matrix|10","cov_matrix|10","void"],FUNCTIONS=["abs","acos","acosh","add_diag","algebra_solver","algebra_solver_newton","append_array","append_col","append_row","asin","asinh","atan", "atan2","atanh","bessel_first_kind","bessel_second_kind","binary_log_loss","block","cbrt","ceil","chol2inv","cholesky_decompose","choose","col","cols","columns_dot_product","columns_dot_self","complex_schur_decompose","complex_schur_decompose_t","complex_schur_decompose_u","conj","cos","cosh","cov_exp_quad","crossprod","csr_extract","csr_extract_u","csr_extract_v","csr_extract_w","csr_matrix_times_vector","csr_to_dense_matrix","cumulative_sum","dae","dae_tol","determinant","diag_matrix","diagona\ l","diag_post_multiply","diag_pre_multiply","digamma","dims","distance","dot_product","dot_self","eigendecompose","eigendecompose_sym","eigenvalues","eigenvalues_sym","eigenvectors","eigenvectors_sym","erf","erfc","exp","exp2","expm1","falling_factorial","fdim","fft","fft2","floor","fma","fmax","fmin","fmod","gamma_p","gamma_q","generalized_inverse","get_imag","get_real","head","hmm_hidden_state_prob","hmm_marginal","hypot","identity_matrix","inc_beta","integrate_1d","integrate_ode","integrate_o\ de_adams","integrate_ode_bdf","integrate_ode_rk45","int_step","inv","inv_cloglog","inv_erfc","inverse","inverse_spd","inv_fft","inv_fft2","inv_inc_beta","inv_logit","inv_Phi","inv_sqrt","inv_square","is_inf","is_nan","lambert_w0","lambert_wm1","lbeta","lchoose","ldexp","lgamma","linspaced_array","linspaced_int_array","linspaced_row_vector","linspaced_vector","lmgamma","lmultiply","log","log1m","log1m_exp","log1m_inv_logit","log1p","log1p_exp","log_determinant","log_diff_exp","log_falling_factori\ al","log_inv_logit","log_inv_logit_diff","logit","log_mix","log_modified_bessel_first_kind","log_rising_factorial","log_softmax","log_sum_exp","machine_precision","map_rect","matrix_exp","matrix_exp_multiply","matrix_power","max","mdivide_left_spd","mdivide_left_tri_low","mdivide_right_spd","mdivide_right_tri_low","mean","min","modified_bessel_first_kind","modified_bessel_second_kind","multiply_lower_tri_self_transpose","negative_infinity","norm","norm1","norm2","not_a_number","num_elements","od\ e_adams","ode_adams_tol","ode_adjoint_tol_ctl","ode_bdf","ode_bdf_tol","ode_ckrk","ode_ckrk_tol","ode_rk45","ode_rk45_tol","one_hot_array","one_hot_int_array","one_hot_row_vector","one_hot_vector","ones_array","ones_int_array","ones_row_vector","ones_vector","owens_t","Phi","Phi_approx","polar","positive_infinity","pow","print","prod","proj","qr","qr_Q","qr_R","qr_thin","qr_thin_Q","qr_thin_R","quad_form","quad_form_diag","quad_form_sym","quantile","rank","reduce_sum","reject","rep_array","rep_m\ atrix","rep_row_vector","rep_vector","reverse","rising_factorial","round","row","rows","rows_dot_product","rows_dot_self","scale_matrix_exp_multiply","sd","segment","sin","singular_values","sinh","size","softmax","sort_asc","sort_desc","sort_indices_asc","sort_indices_desc","sqrt","square","squared_distance","step","sub_col","sub_row","sum","svd","svd_U","svd_V","symmetrize_from_lower_tri","tail","tan","tanh","target","tcrossprod","tgamma","to_array_1d","to_array_2d","to_complex","to_int","to_ma\ trix","to_row_vector","to_vector","trace","trace_gen_quad_form","trace_quad_form","trigamma","trunc","uniform_simplex","variance","zeros_array","zeros_int_array","zeros_row_vector"],DISTRIBUTIONS=["bernoulli","bernoulli_logit","bernoulli_logit_glm","beta","beta_binomial","beta_proportion","binomial","binomial_logit","categorical","categorical_logit","categorical_logit_glm","cauchy","chi_square","dirichlet","discrete_range","double_exponential","exp_mod_normal","exponential","frechet","gamma","ga\ ussian_dlm_obs","gumbel","hmm_latent","hypergeometric","inv_chi_square","inv_gamma","inv_wishart","inv_wishart_cholesky","lkj_corr","lkj_corr_cholesky","logistic","loglogistic","lognormal","multi_gp","multi_gp_cholesky","multinomial","multinomial_logit","multi_normal","multi_normal_cholesky","multi_normal_prec","multi_student_cholesky_t","multi_student_t","multi_student_t_cholesky","neg_binomial","neg_binomial_2","neg_binomial_2_log","neg_binomial_2_log_glm","normal","normal_id_glm","ordered_log\ istic","ordered_logistic_glm","ordered_probit","pareto","pareto_type_2","poisson","poisson_log","poisson_log_glm","rayleigh","scaled_inv_chi_square","skew_double_exponential","skew_normal","std_normal","std_normal_log","student_t","uniform","von_mises","weibull","wiener","wishart","wishart_cholesky"],BLOCK_COMMENT=hljs.COMMENT(/\/\*/,/\*\//,{relevance:0,contains:[{scope:"doctag",match:/@(return|param)/}]}),INCLUDE={scope:"meta",begin:/#include\b/,end:/$/,contains:[{match:/[a-z][a-z-._]+/,scope:"\ string"},hljs.C_LINE_COMMENT_MODE]},RANGE_CONSTRAINTS=["lower","upper","offset","multiplier"];return{name:"Stan",aliases:["stanfuncs"],keywords:{$pattern:hljs.IDENT_RE,title:BLOCKS,type:TYPES2,keyword:STATEMENTS,built_in:FUNCTIONS},contains:[hljs.C_LINE_COMMENT_MODE,INCLUDE,hljs.HASH_COMMENT_MODE,BLOCK_COMMENT,{scope:"built_in",match:/\s(pi|e|sqrt2|log2|log10)(?=\()/,relevance:0},{match:regex.concat(/[<,]\s*/,regex.either(...RANGE_CONSTRAINTS),/\s*=/),keywords:RANGE_CONSTRAINTS},{scope:"keyword", match:/\btarget(?=\s*\+=)/},{match:[/~\s*/,regex.either(...DISTRIBUTIONS),/(?:\(\))/,/\s*T(?=\s*\[)/],scope:{2:"built_in",4:"keyword"}},{scope:"built_in",keywords:DISTRIBUTIONS,begin:regex.concat(/\w*/,regex.either(...DISTRIBUTIONS),/(_lpdf|_lupdf|_lpmf|_cdf|_lcdf|_lccdf|_qf)(?=\s*[\(.*\)])/)},{begin:[/~/,/\s*/,regex.concat(regex.either(...DISTRIBUTIONS),/(?=\s*[\(.*\)])/)],scope:{3:"built_in"}},{begin:[/~/,/\s*\w+(?=\s*[\(.*\)])/,"(?!.*/\b("+regex.either(...DISTRIBUTIONS)+")\b)"],scope:{2:"titl\ e.function"}},{scope:"title.function",begin:/\w*(_lpdf|_lupdf|_lpmf|_cdf|_lcdf|_lccdf|_qf)(?=\s*[\(.*\)])/},{scope:"number",match:regex.concat(/(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)/,/(?:[eE][+-]?\d+(?:_\d+)*)?i?(?!\w)/),relevance:0},{scope:"string",begin:/"/,end:/"/}]}}function stata(hljs){return{name:"Stata",aliases:["do","ado"],case_insensitive:!0,keywords:"if else in foreach for forv forva forval forvalu forvalue forvalues by bys bysort xi quietly qui capture about ac a\ c_7 acprplot acprplot_7 adjust ado adopath adoupdate alpha ameans an ano anov anova anova_estat anova_terms anovadef aorder ap app appe appen append arch arch_dr arch_estat arch_p archlm areg areg_p args arima arima_dr arima_estat arima_p as asmprobit asmprobit_estat asmprobit_lf asmprobit_mfx__dlg asmprobit_p ass asse asser assert avplot avplot_7 avplots avplots_7 bcskew0 bgodfrey bias binreg bip0_lf biplot bipp_lf bipr_lf bipr_p biprobit bitest bitesti bitowt blogit bmemsize boot bootsamp boot\ strap bootstrap_8 boxco_l boxco_p boxcox boxcox_6 boxcox_p bprobit br break brier bro brow brows browse brr brrstat bs bs_7 bsampl_w bsample bsample_7 bsqreg bstat bstat_7 bstat_8 bstrap bstrap_7 bubble bubbleplot ca ca_estat ca_p cabiplot camat canon canon_8 canon_8_p canon_estat canon_p cap caprojection capt captu captur capture cat cc cchart cchart_7 cci cd censobs_table centile cf char chdir checkdlgfiles checkestimationsample checkhlpfiles checksum chelp ci cii cl class classutil clear cli \ clis clist clo clog clog_lf clog_p clogi clogi_sw clogit clogit_lf clogit_p clogitp clogl_sw cloglog clonevar clslistarray cluster cluster_measures cluster_stop cluster_tree cluster_tree_8 clustermat cmdlog cnr cnre cnreg cnreg_p cnreg_sw cnsreg codebook collaps4 collapse colormult_nb colormult_nw compare compress conf confi confir confirm conren cons const constr constra constrai constrain constraint continue contract copy copyright copysource cor corc corr corr2data corr_anti corr_kmo corr_smc\ corre correl correla correlat correlate corrgram cou coun count cox cox_p cox_sw coxbase coxhaz coxvar cprplot cprplot_7 crc cret cretu cretur creturn cross cs cscript cscript_log csi ct ct_is ctset ctst_5 ctst_st cttost cumsp cumsp_7 cumul cusum cusum_7 cutil d|0 datasig datasign datasigna datasignat datasignatu datasignatur datasignature datetof db dbeta de dec deco decod decode deff des desc descr descri describ describe destring dfbeta dfgls dfuller di di_g dir dirstats dis discard disp dis\ p_res disp_s displ displa display distinct do doe doed doedi doedit dotplot dotplot_7 dprobit drawnorm drop ds ds_util dstdize duplicates durbina dwstat dydx e|0 ed edi edit egen eivreg emdef en enc enco encod encode eq erase ereg ereg_lf ereg_p ereg_sw ereghet ereghet_glf ereghet_glf_sh ereghet_gp ereghet_ilf ereghet_ilf_sh ereghet_ip eret eretu eretur ereturn err erro error esize est est_cfexist est_cfname est_clickable est_expand est_hold est_table est_unhold est_unholdok estat estat_default \ estat_summ estat_vce_only esti estimates etodow etof etomdy ex exi exit expand expandcl fac fact facto factor factor_estat factor_p factor_pca_rotated factor_rotate factormat fcast fcast_compute fcast_graph fdades fdadesc fdadescr fdadescri fdadescrib fdadescribe fdasav fdasave fdause fh_st file open file read file close file filefilter fillin find_hlp_file findfile findit findit_7 fit fl fli flis flist for5_0 forest forestplot form forma format fpredict frac_154 frac_adj frac_chk frac_cox frac_\ ddp frac_dis frac_dv frac_in frac_mun frac_pp frac_pq frac_pv frac_wgt frac_xo fracgen fracplot fracplot_7 fracpoly fracpred fron_ex fron_hn fron_p fron_tn fron_tn2 frontier ftodate ftoe ftomdy ftowdate funnel funnelplot g|0 gamhet_glf gamhet_gp gamhet_ilf gamhet_ip gamma gamma_d2 gamma_p gamma_sw gammahet gdi_hexagon gdi_spokes ge gen gene gener genera generat generate genrank genstd genvmean gettoken gl gladder gladder_7 glim_l01 glim_l02 glim_l03 glim_l04 glim_l05 glim_l06 glim_l07 glim_l08 g\ lim_l09 glim_l10 glim_l11 glim_l12 glim_lf glim_mu glim_nw1 glim_nw2 glim_nw3 glim_p glim_v1 glim_v2 glim_v3 glim_v4 glim_v5 glim_v6 glim_v7 glm glm_6 glm_p glm_sw glmpred glo glob globa global glogit glogit_8 glogit_p gmeans gnbre_lf gnbreg gnbreg_5 gnbreg_p gomp_lf gompe_sw gomper_p gompertz gompertzhet gomphet_glf gomphet_glf_sh gomphet_gp gomphet_ilf gomphet_ilf_sh gomphet_ip gphdot gphpen gphprint gprefs gprobi_p gprobit gprobit_8 gr gr7 gr_copy gr_current gr_db gr_describe gr_dir gr_draw g\ r_draw_replay gr_drop gr_edit gr_editviewopts gr_example gr_example2 gr_export gr_print gr_qscheme gr_query gr_read gr_rename gr_replay gr_save gr_set gr_setscheme gr_table gr_undo gr_use graph graph7 grebar greigen greigen_7 greigen_8 grmeanby grmeanby_7 gs_fileinfo gs_filetype gs_graphinfo gs_stat gsort gwood h|0 hadimvo hareg hausman haver he heck_d2 heckma_p heckman heckp_lf heckpr_p heckprob hel help hereg hetpr_lf hetpr_p hetprob hettest hexdump hilite hist hist_7 histogram hlogit hlu hmea\ ns hotel hotelling hprobit hreg hsearch icd9 icd9_ff icd9p iis impute imtest inbase include inf infi infil infile infix inp inpu input ins insheet insp inspe inspec inspect integ inten intreg intreg_7 intreg_p intrg2_ll intrg_ll intrg_ll2 ipolate iqreg ir irf irf_create irfm iri is_svy is_svysum isid istdize ivprob_1_lf ivprob_lf ivprobit ivprobit_p ivreg ivreg_footnote ivtob_1_lf ivtob_lf ivtobit ivtobit_p jackknife jacknife jknife jknife_6 jknife_8 jkstat joinby kalarma1 kap kap_3 kapmeier kap\ pa kapwgt kdensity kdensity_7 keep ksm ksmirnov ktau kwallis l|0 la lab labbe labbeplot labe label labelbook ladder levels levelsof leverage lfit lfit_p li lincom line linktest lis list lloghet_glf lloghet_glf_sh lloghet_gp lloghet_ilf lloghet_ilf_sh lloghet_ip llogi_sw llogis_p llogist llogistic llogistichet lnorm_lf lnorm_sw lnorma_p lnormal lnormalhet lnormhet_glf lnormhet_glf_sh lnormhet_gp lnormhet_ilf lnormhet_ilf_sh lnormhet_ip lnskew0 loadingplot loc loca local log logi logis_lf logistic\ logistic_p logit logit_estat logit_p loglogs logrank loneway lookfor lookup lowess lowess_7 lpredict lrecomp lroc lroc_7 lrtest ls lsens lsens_7 lsens_x lstat ltable ltable_7 ltriang lv lvr2plot lvr2plot_7 m|0 ma mac macr macro makecns man manova manova_estat manova_p manovatest mantel mark markin markout marksample mat mat_capp mat_order mat_put_rr mat_rapp mata mata_clear mata_describe mata_drop mata_matdescribe mata_matsave mata_matuse mata_memory mata_mlib mata_mosave mata_rename mata_which\ matalabel matcproc matlist matname matr matri matrix matrix_input__dlg matstrik mcc mcci md0_ md1_ md1debug_ md2_ md2debug_ mds mds_estat mds_p mdsconfig mdslong mdsmat mdsshepard mdytoe mdytof me_derd mean means median memory memsize menl meqparse mer merg merge meta mfp mfx mhelp mhodds minbound mixed_ll mixed_ll_reparm mkassert mkdir mkmat mkspline ml ml_5 ml_adjs ml_bhhhs ml_c_d ml_check ml_clear ml_cnt ml_debug ml_defd ml_e0 ml_e0_bfgs ml_e0_cycle ml_e0_dfp ml_e0i ml_e1 ml_e1_bfgs ml_e1_bh\ hh ml_e1_cycle ml_e1_dfp ml_e2 ml_e2_cycle ml_ebfg0 ml_ebfr0 ml_ebfr1 ml_ebh0q ml_ebhh0 ml_ebhr0 ml_ebr0i ml_ecr0i ml_edfp0 ml_edfr0 ml_edfr1 ml_edr0i ml_eds ml_eer0i ml_egr0i ml_elf ml_elf_bfgs ml_elf_bhhh ml_elf_cycle ml_elf_dfp ml_elfi ml_elfs ml_enr0i ml_enrr0 ml_erdu0 ml_erdu0_bfgs ml_erdu0_bhhh ml_erdu0_bhhhq ml_erdu0_cycle ml_erdu0_dfp ml_erdu0_nrbfgs ml_exde ml_footnote ml_geqnr ml_grad0 ml_graph ml_hbhhh ml_hd0 ml_hold ml_init ml_inv ml_log ml_max ml_mlout ml_mlout_8 ml_model ml_nb0 ml_\ opt ml_p ml_plot ml_query ml_rdgrd ml_repor ml_s_e ml_score ml_searc ml_technique ml_unhold mleval mlf_ mlmatbysum mlmatsum mlog mlogi mlogit mlogit_footnote mlogit_p mlopts mlsum mlvecsum mnl0_ mor more mov move mprobit mprobit_lf mprobit_p mrdu0_ mrdu1_ mvdecode mvencode mvreg mvreg_estat n|0 nbreg nbreg_al nbreg_lf nbreg_p nbreg_sw nestreg net newey newey_7 newey_p news nl nl_7 nl_9 nl_9_p nl_p nl_p_7 nlcom nlcom_p nlexp2 nlexp2_7 nlexp2a nlexp2a_7 nlexp3 nlexp3_7 nlgom3 nlgom3_7 nlgom4 nlgom\ 4_7 nlinit nllog3 nllog3_7 nllog4 nllog4_7 nlog_rd nlogit nlogit_p nlogitgen nlogittree nlpred no nobreak noi nois noisi noisil noisily note notes notes_dlg nptrend numlabel numlist odbc old_ver olo olog ologi ologi_sw ologit ologit_p ologitp on one onew onewa oneway op_colnm op_comp op_diff op_inv op_str opr opro oprob oprob_sw oprobi oprobi_p oprobit oprobitp opts_exclusive order orthog orthpoly ou out outf outfi outfil outfile outs outsh outshe outshee outsheet ovtest pac pac_7 palette parse \ parse_dissim pause pca pca_8 pca_display pca_estat pca_p pca_rotate pcamat pchart pchart_7 pchi pchi_7 pcorr pctile pentium pergram pergram_7 permute permute_8 personal peto_st pkcollapse pkcross pkequiv pkexamine pkexamine_7 pkshape pksumm pksumm_7 pl plo plot plugin pnorm pnorm_7 poisgof poiss_lf poiss_sw poisso_p poisson poisson_estat post postclose postfile postutil pperron pr prais prais_e prais_e2 prais_p predict predictnl preserve print pro prob probi probit probit_estat probit_p proc_tim\ e procoverlay procrustes procrustes_estat procrustes_p profiler prog progr progra program prop proportion prtest prtesti pwcorr pwd q\\s qby qbys qchi qchi_7 qladder qladder_7 qnorm qnorm_7 qqplot qqplot_7 qreg qreg_c qreg_p qreg_sw qu quadchk quantile quantile_7 que quer query range ranksum ratio rchart rchart_7 rcof recast reclink recode reg reg3 reg3_p regdw regr regre regre_p2 regres regres_p regress regress_estat regriv_p remap ren rena renam rename renpfix repeat replace report reshape rest\ ore ret retu retur return rm rmdir robvar roccomp roccomp_7 roccomp_8 rocf_lf rocfit rocfit_8 rocgold rocplot rocplot_7 roctab roctab_7 rolling rologit rologit_p rot rota rotat rotate rotatemat rreg rreg_p ru run runtest rvfplot rvfplot_7 rvpplot rvpplot_7 sa safesum sample sampsi sav save savedresults saveold sc sca scal scala scalar scatter scm_mine sco scob_lf scob_p scobi_sw scobit scor score scoreplot scoreplot_help scree screeplot screeplot_help sdtest sdtesti se search separate seperate s\ errbar serrbar_7 serset set set_defaults sfrancia sh she shel shell shewhart shewhart_7 signestimationsample signrank signtest simul simul_7 simulate simulate_8 sktest sleep slogit slogit_d2 slogit_p smooth snapspan so sor sort spearman spikeplot spikeplot_7 spikeplt spline_x split sqreg sqreg_p sret sretu sretur sreturn ssc st st_ct st_hc st_hcd st_hcd_sh st_is st_issys st_note st_promo st_set st_show st_smpl st_subid stack statsby statsby_8 stbase stci stci_7 stcox stcox_estat stcox_fr stcox_f\ r_ll stcox_p stcox_sw stcoxkm stcoxkm_7 stcstat stcurv stcurve stcurve_7 stdes stem stepwise stereg stfill stgen stir stjoin stmc stmh stphplot stphplot_7 stphtest stphtest_7 stptime strate strate_7 streg streg_sw streset sts sts_7 stset stsplit stsum sttocc sttoct stvary stweib su suest suest_8 sum summ summa summar summari summariz summarize sunflower sureg survcurv survsum svar svar_p svmat svy svy_disp svy_dreg svy_est svy_est_7 svy_estat svy_get svy_gnbreg_p svy_head svy_header svy_heckman_\ p svy_heckprob_p svy_intreg_p svy_ivreg_p svy_logistic_p svy_logit_p svy_mlogit_p svy_nbreg_p svy_ologit_p svy_oprobit_p svy_poisson_p svy_probit_p svy_regress_p svy_sub svy_sub_7 svy_x svy_x_7 svy_x_p svydes svydes_8 svygen svygnbreg svyheckman svyheckprob svyintreg svyintreg_7 svyintrg svyivreg svylc svylog_p svylogit svymarkout svymarkout_8 svymean svymlog svymlogit svynbreg svyolog svyologit svyoprob svyoprobit svyopts svypois svypois_7 svypoisson svyprobit svyprobt svyprop svyprop_7 svyrati\ o svyreg svyreg_p svyregress svyset svyset_7 svyset_8 svytab svytab_7 svytest svytotal sw sw_8 swcnreg swcox swereg swilk swlogis swlogit swologit swoprbt swpois swprobit swqreg swtobit swweib symmetry symmi symplot symplot_7 syntax sysdescribe sysdir sysuse szroeter ta tab tab1 tab2 tab_or tabd tabdi tabdis tabdisp tabi table tabodds tabodds_7 tabstat tabu tabul tabula tabulat tabulate te tempfile tempname tempvar tes test testnl testparm teststd tetrachoric time_it timer tis tob tobi tobit tob\ it_p tobit_sw token tokeni tokeniz tokenize tostring total translate translator transmap treat_ll treatr_p treatreg trim trimfill trnb_cons trnb_mean trpoiss_d2 trunc_ll truncr_p truncreg tsappend tset tsfill tsline tsline_ex tsreport tsrevar tsrline tsset tssmooth tsunab ttest ttesti tut_chk tut_wait tutorial tw tware_st two twoway twoway__fpfit_serset twoway__function_gen twoway__histogram_gen twoway__ipoint_serset twoway__ipoints_serset twoway__kdensity_gen twoway__lfit_serset twoway__normgen\ _gen twoway__pci_serset twoway__qfit_serset twoway__scatteri_serset twoway__sunflower_gen twoway_ksm_serset ty typ type typeof u|0 unab unabbrev unabcmd update us use uselabel var var_mkcompanion var_p varbasic varfcast vargranger varirf varirf_add varirf_cgraph varirf_create varirf_ctable varirf_describe varirf_dir varirf_drop varirf_erase varirf_graph varirf_ograph varirf_rename varirf_set varirf_table varlist varlmar varnorm varsoc varstable varstable_w varstable_w2 varwle vce vec vec_fevd ve\ c_mkphi vec_p vec_p_w vecirf_create veclmar veclmar_w vecnorm vecnorm_w vecrank vecstable verinst vers versi versio version view viewsource vif vwls wdatetof webdescribe webseek webuse weib1_lf weib2_lf weib_lf weib_lf0 weibhet_glf weibhet_glf_sh weibhet_glfa weibhet_glfa_sh weibhet_gp weibhet_ilf weibhet_ilf_sh weibhet_ilfa weibhet_ilfa_sh weibhet_ip weibu_sw weibul_p weibull weibull_c weibull_s weibullhet wh whelp whi which whil while wilc_st wilcoxon win wind windo window winexec wntestb wnte\ stb_7 wntestq xchart xchart_7 xcorr xcorr_7 xi xi_6 xmlsav xmlsave xmluse xpose xsh xshe xshel xshell xt_iis xt_tis xtab_p xtabond xtbin_p xtclog xtcloglog xtcloglog_8 xtcloglog_d2 xtcloglog_pa_p xtcloglog_re_p xtcnt_p xtcorr xtdata xtdes xtfront_p xtfrontier xtgee xtgee_elink xtgee_estat xtgee_makeivar xtgee_p xtgee_plink xtgls xtgls_p xthaus xthausman xtht_p xthtaylor xtile xtint_p xtintreg xtintreg_8 xtintreg_d2 xtintreg_p xtivp_1 xtivp_2 xtivreg xtline xtline_ex xtlogit xtlogit_8 xtlogit_d2 \ xtlogit_fe_p xtlogit_pa_p xtlogit_re_p xtmixed xtmixed_estat xtmixed_p xtnb_fe xtnb_lf xtnbreg xtnbreg_pa_p xtnbreg_refe_p xtpcse xtpcse_p xtpois xtpoisson xtpoisson_d2 xtpoisson_pa_p xtpoisson_refe_p xtpred xtprobit xtprobit_8 xtprobit_d2 xtprobit_re_p xtps_fe xtps_lf xtps_ren xtps_ren_8 xtrar_p xtrc xtrc_p xtrchh xtrefe_p xtreg xtreg_be xtreg_fe xtreg_ml xtreg_pa_p xtreg_re xtregar xtrere_p xtset xtsf_ll xtsf_llti xtsum xttab xttest0 xttobit xttobit_8 xttobit_p xttrans yx yxview__barlike_draw \ yxview_area_draw yxview_bar_draw yxview_dot_draw yxview_dropline_draw yxview_function_draw yxview_iarrow_draw yxview_ilabels_draw yxview_normal_draw yxview_pcarrow_draw yxview_pcbarrow_draw yxview_pccapsym_draw yxview_pcscatter_draw yxview_pcspike_draw yxview_rarea_draw yxview_rbar_draw yxview_rbarm_draw yxview_rcap_draw yxview_rcapsym_draw yxview_rconnected_draw yxview_rline_draw yxview_rscatter_draw yxview_rspike_draw yxview_spike_draw yxview_sunflower_draw zap_s zinb zinb_llf zinb_plf zip zip\ _llf zip_p zip_plf zt_ct_5 zt_hc_5 zt_hcd_5 zt_is_5 zt_iss_5 zt_sho_5 zt_smp_5 ztbase_5 ztcox_5 ztdes_5 ztereg_5 ztfill_5 ztgen_5 ztir_5 ztjoin_5 ztnb ztnb_p ztp ztp_p zts_5 ztset_5 ztspli_5 ztsum_5 zttoct_5 ztvary_5 ztweib_5",contains:[{className:"symbol",begin:/`[a-zA-Z0-9_]+'/},{className:"variable",begin:/\$\{?[a-zA-Z0-9_]+\}?/,relevance:0},{className:"string",variants:[{begin:`\`"[^\r ]*?"'`},{begin:`"[^\r "]*"`}]},{className:"built_in",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|\ invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlo\ ng|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\()"}]},hljs.COMMENT("^[ ]*\\*.*\ $",!1),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]}}function step21(hljs){return{name:"STEP Part 21",aliases:["p21","step","stp"],case_insensitive:!0,keywords:{$pattern:"[A-Z_][A-Z0-9_.]*",keyword:["HEADER","ENDSEC","DATA"]},contains:[{className:"meta",begin:"ISO-10303-21;",relevance:10},{className:"meta",begin:"END-ISO-10303-21;",relevance:10},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT("/\\*\\*!","\\*/"),hljs.C_NUMBER_MODE,hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null}), hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}]}}const MODES$3=hljs=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:hljs.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[ hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:hljs.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),HTML_TAGS$3=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form", "h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],SVG_TAGS$3=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolv\ eMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],TAGS$3=[...HTML_TAGS$3,...SVG_TAGS$3],MEDIA_FEATURES$3=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-\ height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),PSEUDO_CLASSES$3=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty", "enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-w\ ithin","user-invalid","valid","visited","where"].sort().reverse(),PSEUDO_ELEMENTS$3=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ATTRIBUTES$3=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","anim\ ation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-s\ hift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","b\ order-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-\ width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-\ after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","conta\ in-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","\ font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variat\ ion-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-r\ endering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","marg\ in-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth", "math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-bl\ ock","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pau\ se","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-en\ d","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-colo\ r","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip", "text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","tran\ sition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","\ will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function stylus(hljs){const modes2=MODES$3(hljs),AT_MODIFIERS="and or not only",VARIABLE={className:"variable",begin:"\\$"+hljs.IDENT_RE},AT_KEYWORDS=["charset","css","debug","extend","font-face","for","import","include","keyframes","media","mixin","page","warn","while"],LOOKAHEAD_TAG_END="(?=[.\\s\\n[:,(])";return{name:"Stylus",aliases:["styl"],case_insensitive:!1,keywords:"if else for\ in",illegal:"("+["\\?","(\\bReturn\\b)","(\\bEnd\\b)","(\\bend\\b)","(\\bdef\\b)",";","#\\s","\\*\\s","===\\s","\\|","%"].join("|")+")",contains:[hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,modes2.HEXCOLOR,{begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"+LOOKAHEAD_TAG_END,className:"selector-class"},{begin:"#[a-zA-Z][a-zA-Z0-9_-]*"+LOOKAHEAD_TAG_END,className:"selector-id"},{begin:"\\b("+TAGS$3.join("|")+")"+LOOKAHEAD_TAG_END,className:"selector-tag"},{className:"\ selector-pseudo",begin:"&?:("+PSEUDO_CLASSES$3.join("|")+")"+LOOKAHEAD_TAG_END},{className:"selector-pseudo",begin:"&?:(:)?("+PSEUDO_ELEMENTS$3.join("|")+")"+LOOKAHEAD_TAG_END},modes2.ATTRIBUTE_SELECTOR_MODE,{className:"keyword",begin:/@media/,starts:{end:/[{;}]/,keywords:{$pattern:/[a-z-]+/,keyword:AT_MODIFIERS,attribute:MEDIA_FEATURES$3.join(" ")},contains:[modes2.CSS_NUMBER_MODE]}},{className:"keyword",begin:"@((-(o|moz|ms|webkit)-)?("+AT_KEYWORDS.join("|")+"))\\b"},VARIABLE,modes2.CSS_NUMBER_MODE, {className:"function",begin:"^[a-zA-Z][a-zA-Z0-9_-]*\\(.*\\)",illegal:"[\\n]",returnBegin:!0,contains:[{className:"title",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"},{className:"params",begin:/\(/,end:/\)/,contains:[modes2.HEXCOLOR,VARIABLE,hljs.APOS_STRING_MODE,modes2.CSS_NUMBER_MODE,hljs.QUOTE_STRING_MODE]}]},modes2.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ATTRIBUTES$3.join("|")+")\\b",starts:{end:/;|$/,contains:[modes2.HEXCOLOR,VARIABLE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,modes2.CSS_NUMBER_MODE, hljs.C_BLOCK_COMMENT_MODE,modes2.IMPORTANT,modes2.FUNCTION_DISPATCH],illegal:/\./,relevance:0}},modes2.FUNCTION_DISPATCH]}}function subunit(hljs){return{name:"SubUnit",case_insensitive:!0,contains:[{className:"string",begin:`\\[ (multipart)?`,end:`\\] `},{className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},{className:"string",begin:"(\\+|-)\\d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}function taggerscript(hljs){return{name:"Tagger Script",contains:[{className:"comment",begin:/\$noop\(/,end:/\)/,contains:[{begin:/\\[()]/},{begin:/\(/,end:/\)/, contains:[{begin:/\\[()]/},"self"]}],relevance:10},{className:"keyword",begin:/\$[_a-zA-Z0-9]+(?=\()/},{className:"variable",begin:/%[_a-zA-Z0-9:]+%/},{className:"symbol",begin:/\\[\\nt$%,()]/},{className:"symbol",begin:/\\u[a-fA-F0-9]{4}/}]}}function tap(hljs){return{name:"Test Anything Protocol",case_insensitive:!0,contains:[hljs.HASH_COMMENT_MODE,{className:"meta",variants:[{begin:"^TAP version (\\d+)$"},{begin:"^1\\.\\.(\\d+)$"}]},{begin:/---$/,end:"\\.\\.\\.$",subLanguage:"yaml",relevance:0}, {className:"number",begin:" (\\d+) "},{className:"symbol",variants:[{begin:"^ok"},{begin:"^not ok"}]}]}}function tcl(hljs){const regex=hljs.regex,TCL_IDENT=/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER={className:"number",variants:[hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE]};return{name:"Tcl",aliases:["tk"],keywords:["after","append","apply","array","auto_execok","auto_import","auto_load","auto_mkindex","auto_mkindex_old","auto_qualify","auto_reset","bgerror","binary","break","catch","cd","chan","clock","clo\ se","concat","continue","dde","dict","encoding","eof","error","eval","exec","exit","expr","fblocked","fconfigure","fcopy","file","fileevent","filename","flush","for","foreach","format","gets","glob","global","history","http","if","incr","info","interp","join","lappend|10","lassign|10","lindex|10","linsert|10","list","llength|10","load","lrange|10","lrepeat|10","lreplace|10","lreverse|10","lsearch|10","lset|10","lsort|10","mathfunc","mathop","memory","msgcat","namespace","open","package","parray", "pid","pkg::create","pkg_mkIndex","platform","platform::shell","proc","puts","pwd","read","refchan","regexp","registry","regsub|10","rename","return","safe","scan","seek","set","socket","source","split","string","subst","switch","tcl_endOfWord","tcl_findLibrary","tcl_startOfNextWord","tcl_startOfPreviousWord","tcl_wordBreakAfter","tcl_wordBreakBefore","tcltest","tclvars","tell","time","tm","trace","unknown","unload","unset","update","uplevel","upvar","variable","vwait","while"],contains:[hljs.COMMENT( ";[ \\t]*#","$"),hljs.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"title",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",variants:[{begin:regex.concat(/\$/,regex.optional(/::/),TCL_IDENT,"(::",TCL_IDENT,")*")},{begin:"\\$\\{(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"\\}",contains:[NUMBER]}]},{className:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[hljs.inherit( hljs.QUOTE_STRING_MODE,{illegal:null})]},NUMBER]}}function thrift(hljs){const TYPES2=["bool","byte","i16","i32","i64","double","string","binary"];return{name:"Thrift",keywords:{keyword:["namespace","const","typedef","struct","enum","service","exception","void","oneway","set","list","map","required","optional"],type:TYPES2,literal:"true false"},contains:[hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service\ exception",end:/\{/,illegal:/\n/,contains:[hljs.inherit(hljs.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",keywords:{type:[...TYPES2,"set","list","map"]},end:">",contains:["self"]}]}}function tp(hljs){const TPID={className:"number",begin:"[1-9][0-9]*",relevance:0},TPLABEL={className:"symbol",begin:":[^\\]]+"},TPDATA={className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|D\ IAG_REC)\\[",end:"\\]",contains:["self",TPID,TPLABEL]},TPIO={className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",TPID,hljs.QUOTE_STRING_MODE,TPLABEL]};return{name:"TP",keywords:{keyword:["ABORT","ACC","ADJUST","AND","AP_LD","BREAK","CALL","CNT","COL","CONDITION","CONFIG","DA","DB","DIV","DETECT","ELSE","END","ENDFOR","ERR_NUM","ERROR_PROG","FINE","FOR","GP","GUARD","INC","IF","JMP","LINEAR_MAX_SPEED","LOCK","MOD","MONITOR","OFFSET","Offset","OR","OV\ ERRIDE","PAUSE","PREG","PTH","RT_LD","RUN","SELECT","SKIP","Skip","TA","TB","TO","TOOL_OFFSET","Tool_Offset","UF","UT","UFRAME_NUM","UTOOL_NUM","UNLOCK","WAIT","X","Y","Z","W","P","R","STRLEN","SUBSTR","FINDSTR","VOFFSET","PROG","ATTR","MN","POS"],literal:["ON","OFF","max_speed","LPOS","JPOS","ENABLE","DISABLE","START","STOP","RESET"]},contains:[TPDATA,TPIO,{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\ \\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},hljs.COMMENT("//","[;$]"),hljs.COMMENT("!","[;$]"),hljs.COMMENT("--eg:","$"),hljs.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"'"},hljs.C_NUMBER_MODE,{className:"variable",begin:"\\$[A-Za-z0-9_]+"}]}}function twig(hljs){const regex=hljs.regex,FUNCTION_NAMES=["absolute_url","asset|0","asset_version","attribute","block","constant","cont\ roller|0","country_timezones","csrf_token","cycle","date","dump","expression","form|0","form_end","form_errors","form_help","form_label","form_rest","form_row","form_start","form_widget","html_classes","include","is_granted","logout_path","logout_url","max","min","parent","path|0","random","range","relative_path","render","render_esi","source","template_from_string","url|0"],FILTERS=["abs","abbr_class","abbr_method","batch","capitalize","column","convert_encoding","country_name","currency_name", "currency_symbol","data_uri","date","date_modify","default","escape","file_excerpt","file_link","file_relative","filter","first","format","format_args","format_args_as_text","format_currency","format_date","format_datetime","format_file","format_file_from_text","format_number","format_time","html_to_markdown","humanize","inky_to_html","inline_css","join","json_encode","keys","language_name","last","length","locale_name","lower","map","markdown","markdown_to_html","merge","nl2br","number_format", "raw","reduce","replace","reverse","round","slice","slug","sort","spaceless","split","striptags","timezone_name","title","trans","transchoice","trim","u|0","upper","url_encode","yaml_dump","yaml_encode"];let TAG_NAMES=["apply","autoescape","block","cache","deprecated","do","embed","extends","filter","flush","for","form_theme","from","if","import","include","macro","sandbox","set","stopwatch","trans","trans_default_domain","transchoice","use","verbatim","with"];TAG_NAMES=TAG_NAMES.concat(TAG_NAMES. map(t=>`end${t}`));const STRING={scope:"string",variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},NUMBER={scope:"number",match:/\d+/},PARAMS={begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[STRING,NUMBER]},FUNCTIONS={beginKeywords:FUNCTION_NAMES.join(" "),keywords:{name:FUNCTION_NAMES},relevance:0,contains:[PARAMS]},FILTER={match:/\|(?=[A-Za-z_]+:?)/,beginScope:"punctuation",relevance:0,contains:[{match:/[A-Za-z_]+:?/,keywords:FILTERS}]},tagNamed=(tagnames,{relevance})=>({beginScope:{ 1:"template-tag",3:"name"},relevance:relevance||2,endScope:"template-tag",begin:[/\{%/,/\s*/,regex.either(...tagnames)],end:/%\}/,keywords:"in",contains:[FILTER,FUNCTIONS,STRING,NUMBER]}),CUSTOM_TAG_RE=/[a-z_]+/,TAG=tagNamed(TAG_NAMES,{relevance:2}),CUSTOM_TAG=tagNamed([CUSTOM_TAG_RE],{relevance:1});return{name:"Twig",aliases:["craftcms"],case_insensitive:!0,subLanguage:"xml",contains:[hljs.COMMENT(/\{#/,/#\}/),TAG,CUSTOM_TAG,{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:["self", FILTER,FUNCTIONS,STRING,NUMBER]}]}}function vala(hljs){return{name:"Vala",keywords:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override virtual delegate if while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib\ CCode Gee Object Gtk Posix",literal:"false true null"},contains:[{className:"class",beginKeywords:"class interface namespace",end:/\{/,excludeEnd:!0,illegal:"[^,:\\n\\s\\.]",contains:[hljs.UNDERSCORE_TITLE_MODE]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""',relevance:5},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,{className:"meta",begin:"^#",end:"$"}]}}function vbscript(hljs){const regex=hljs.regex,BUILT_IN_FUNCTIONS=["lcase","\ month","vartype","instrrev","ubound","setlocale","getobject","rgb","getref","string","weekdayname","rnd","dateadd","monthname","now","day","minute","isarray","cbool","round","formatcurrency","conversions","csng","timevalue","second","year","space","abs","clng","timeserial","fixs","len","asc","isempty","maths","dateserial","atn","timer","isobject","filter","weekday","datevalue","ccur","isdate","instr","datediff","formatdatetime","replace","isnull","right","sgn","array","snumeric","log","cdbl","he\ x","chr","lbound","msgbox","ucase","getlocale","cos","cdate","cbyte","rtrim","join","hour","oct","typename","trim","strcomp","int","createobject","loadpicture","tan","formatnumber","mid","split","cint","sin","datepart","ltrim","sqr","time","derived","eval","date","formatpercent","exp","inputbox","left","ascw","chrw","regexp","cstr","err"],BUILT_IN_OBJECTS=["server","response","request","scriptengine","scriptenginebuildversion","scriptengineminorversion","scriptenginemajorversion"],BUILT_IN_CALL={ begin:regex.concat(regex.either(...BUILT_IN_FUNCTIONS),"\\s*\\("),relevance:0,keywords:{built_in:BUILT_IN_FUNCTIONS}};return{name:"VBScript",aliases:["vbs"],case_insensitive:!0,keywords:{keyword:["call","class","const","dim","do","loop","erase","execute","executeglobal","exit","for","each","next","function","if","then","else","on","error","option","explicit","new","private","property","let","get","public","randomize","redim","rem","select","case","set","stop","sub","while","wend","with","end","t\ o","elseif","is","or","xor","and","not","class_initialize","class_terminate","default","preserve","in","me","byval","byref","step","resume","goto"],built_in:BUILT_IN_OBJECTS,literal:["true","false","null","nothing","empty"]},illegal:"//",contains:[BUILT_IN_CALL,hljs.inherit(hljs.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),hljs.COMMENT(/'/,/$/,{relevance:0}),hljs.C_NUMBER_MODE]}}function vbscriptHtml(hljs){return{name:"VBScript in HTML",subLanguage:"xml",contains:[{begin:"<%",end:"%>",subLanguage:"\ vbscript"}]}}function verilog(hljs){const regex=hljs.regex,KEYWORDS2={$pattern:/\$?[\w]+(\$[\w]+)*/,keyword:["accept_on","alias","always","always_comb","always_ff","always_latch","and","assert","assign","assume","automatic","before","begin","bind","bins","binsof","bit","break","buf|0","bufif0","bufif1","byte","case","casex","casez","cell","chandle","checker","class","clocking","cmos","config","const","constraint","context","continue","cover","covergroup","coverpoint","cross","deassign","default", "defparam","design","disable","dist","do","edge","else","end","endcase","endchecker","endclass","endclocking","endconfig","endfunction","endgenerate","endgroup","endinterface","endmodule","endpackage","endprimitive","endprogram","endproperty","endspecify","endsequence","endtable","endtask","enum","event","eventually","expect","export","extends","extern","final","first_match","for","force","foreach","forever","fork","forkjoin","function","generate|5","genvar","global","highz0","highz1","if","iff", "ifnone","ignore_bins","illegal_bins","implements","implies","import","incdir","include","initial","inout","input","inside","instance","int","integer","interconnect","interface","intersect","join","join_any","join_none","large","let","liblist","library","local","localparam","logic","longint","macromodule","matches","medium","modport","module","nand","negedge","nettype","new","nexttime","nmos","nor","noshowcancelled","not","notif0","notif1","or","output","package","packed","parameter","pmos","pos\ edge","primitive","priority","program","property","protected","pull0","pull1","pulldown","pullup","pulsestyle_ondetect","pulsestyle_onevent","pure","rand","randc","randcase","randsequence","rcmos","real","realtime","ref","reg","reject_on","release","repeat","restrict","return","rnmos","rpmos","rtran","rtranif0","rtranif1","s_always","s_eventually","s_nexttime","s_until","s_until_with","scalared","sequence","shortint","shortreal","showcancelled","signed","small","soft","solve","specify","specpara\ m","static","string","strong","strong0","strong1","struct","super","supply0","supply1","sync_accept_on","sync_reject_on","table","tagged","task","this","throughout","time","timeprecision","timeunit","tran","tranif0","tranif1","tri","tri0","tri1","triand","trior","trireg","type","typedef","union","unique","unique0","unsigned","until","until_with","untyped","use","uwire","var","vectored","virtual","void","wait","wait_order","wand","weak","weak0","weak1","while","wildcard","wire","with","within","w\ or","xnor","xor"],literal:["null"],built_in:["$finish","$stop","$exit","$fatal","$error","$warning","$info","$realtime","$time","$printtimescale","$bitstoreal","$bitstoshortreal","$itor","$signed","$cast","$bits","$stime","$timeformat","$realtobits","$shortrealtobits","$rtoi","$unsigned","$asserton","$assertkill","$assertpasson","$assertfailon","$assertnonvacuouson","$assertoff","$assertcontrol","$assertpassoff","$assertfailoff","$assertvacuousoff","$isunbounded","$sampled","$fell","$changed","$\ past_gclk","$fell_gclk","$changed_gclk","$rising_gclk","$steady_gclk","$coverage_control","$coverage_get","$coverage_save","$set_coverage_db_name","$rose","$stable","$past","$rose_gclk","$stable_gclk","$future_gclk","$falling_gclk","$changing_gclk","$display","$coverage_get_max","$coverage_merge","$get_coverage","$load_coverage_db","$typename","$unpacked_dimensions","$left","$low","$increment","$clog2","$ln","$log10","$exp","$sqrt","$pow","$floor","$ceil","$sin","$cos","$tan","$countbits","$oneh\ ot","$isunknown","$fatal","$warning","$dimensions","$right","$high","$size","$asin","$acos","$atan","$atan2","$hypot","$sinh","$cosh","$tanh","$asinh","$acosh","$atanh","$countones","$onehot0","$error","$info","$random","$dist_chi_square","$dist_erlang","$dist_exponential","$dist_normal","$dist_poisson","$dist_t","$dist_uniform","$q_initialize","$q_remove","$q_exam","$async$and$array","$async$nand$array","$async$or$array","$async$nor$array","$sync$and$array","$sync$nand$array","$sync$or$array","\ $sync$nor$array","$q_add","$q_full","$psprintf","$async$and$plane","$async$nand$plane","$async$or$plane","$async$nor$plane","$sync$and$plane","$sync$nand$plane","$sync$or$plane","$sync$nor$plane","$system","$display","$displayb","$displayh","$displayo","$strobe","$strobeb","$strobeh","$strobeo","$write","$readmemb","$readmemh","$writememh","$value$plusargs","$dumpvars","$dumpon","$dumplimit","$dumpports","$dumpportson","$dumpportslimit","$writeb","$writeh","$writeo","$monitor","$monitorb","$moni\ torh","$monitoro","$writememb","$dumpfile","$dumpoff","$dumpall","$dumpflush","$dumpportsoff","$dumpportsall","$dumpportsflush","$fclose","$fdisplay","$fdisplayb","$fdisplayh","$fdisplayo","$fstrobe","$fstrobeb","$fstrobeh","$fstrobeo","$swrite","$swriteb","$swriteh","$swriteo","$fscanf","$fread","$fseek","$fflush","$feof","$fopen","$fwrite","$fwriteb","$fwriteh","$fwriteo","$fmonitor","$fmonitorb","$fmonitorh","$fmonitoro","$sformat","$sformatf","$fgetc","$ungetc","$fgets","$sscanf","$rewind","\ $ftell","$ferror"]},BUILT_IN_CONSTANTS=["__FILE__","__LINE__"],DIRECTIVES=["begin_keywords","celldefine","default_nettype","default_decay_time","default_trireg_strength","define","delay_mode_distributed","delay_mode_path","delay_mode_unit","delay_mode_zero","else","elsif","end_keywords","endcelldefine","endif","ifdef","ifndef","include","line","nounconnected_drive","pragma","resetall","timescale","unconnected_drive","undef","undefineall"];return{name:"Verilog",aliases:["v","sv","svh"],case_insensitive:!1, keywords:KEYWORDS2,contains:[hljs.C_BLOCK_COMMENT_MODE,hljs.C_LINE_COMMENT_MODE,hljs.QUOTE_STRING_MODE,{scope:"number",contains:[hljs.BACKSLASH_ESCAPE],variants:[{begin:/\b((\d+'([bhodBHOD]))[0-9xzXZa-fA-F_]+)/},{begin:/\B(('([bhodBHOD]))[0-9xzXZa-fA-F_]+)/},{begin:/\b[0-9][0-9_]*/,relevance:0}]},{scope:"variable",variants:[{begin:"#\\((?!parameter).+\\)"},{begin:"\\.\\w+",relevance:0}]},{scope:"variable.constant",match:regex.concat(/`/,regex.either(...BUILT_IN_CONSTANTS))},{scope:"meta",begin:regex. concat(/`/,regex.either(...DIRECTIVES)),end:/$|\/\/|\/\*/,returnEnd:!0,keywords:DIRECTIVES}]}}function vhdl(hljs){const INTEGER_RE="\\d(_|\\d)*",EXPONENT_RE="[eE][-+]?"+INTEGER_RE,DECIMAL_LITERAL_RE=INTEGER_RE+"(\\."+INTEGER_RE+")?("+EXPONENT_RE+")?",BASED_INTEGER_RE="\\w+",NUMBER_RE="\\b("+(INTEGER_RE+"#"+BASED_INTEGER_RE+"(\\."+BASED_INTEGER_RE+")?#("+EXPONENT_RE+")?")+"|"+DECIMAL_LITERAL_RE+")";return{name:"VHDL",case_insensitive:!0,keywords:{keyword:["abs","access","after","alias","all","and", "architecture","array","assert","assume","assume_guarantee","attribute","begin","block","body","buffer","bus","case","component","configuration","constant","context","cover","disconnect","downto","default","else","elsif","end","entity","exit","fairness","file","for","force","function","generate","generic","group","guarded","if","impure","in","inertial","inout","is","label","library","linkage","literal","loop","map","mod","nand","new","next","nor","not","null","of","on","open","or","others","out", "package","parameter","port","postponed","procedure","process","property","protected","pure","range","record","register","reject","release","rem","report","restrict","restrict_guarantee","return","rol","ror","select","sequence","severity","shared","signal","sla","sll","sra","srl","strong","subtype","then","to","transport","type","unaffected","units","until","use","variable","view","vmode","vprop","vunit","wait","when","while","with","xnor","xor"],built_in:["boolean","bit","character","integer","\ time","delay_length","natural","positive","string","bit_vector","file_open_kind","file_open_status","std_logic","std_logic_vector","unsigned","signed","boolean_vector","integer_vector","std_ulogic","std_ulogic_vector","unresolved_unsigned","u_unsigned","unresolved_signed","u_signed","real_vector","time_vector"],literal:["false","true","note","warning","error","failure","line","text","side","width"]},illegal:/\{/,contains:[hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT("--","$"),hljs.QUOTE_STRING_MODE,{className:"\ number",begin:NUMBER_RE,relevance:0},{className:"string",begin:"'(U|X|0|1|Z|W|L|H|-)'",contains:[hljs.BACKSLASH_ESCAPE]},{className:"symbol",begin:"'[A-Za-z](_?[A-Za-z0-9])*",contains:[hljs.BACKSLASH_ESCAPE]}]}}function vim(hljs){return{name:"Vim Script",keywords:{$pattern:/[!#@\w]+/,keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc \ caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu\ go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa n\ o noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe \ spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Prin\ t append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close \ cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfuncti\ on endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd l\ chdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd nor\ emap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby r\ ubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert\ stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoreme\ nu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv complete_check add getwinposx getqflist getwinposy screencol clearmatches empty extend getcmdpos mzeval garbagecollect setreg ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable shiftwidth max sinh isdirectory synID system in\ putrestore winline atan visualmode inputlist tabpagewinnr round getregtype mapcheck hasmapto histdel argidx findfile sha256 exists toupper getcmdline taglist string getmatches bufnr strftime winwidth bufexists strtrans tabpagebuflist setcmdpos remote_read printf setloclist getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval resolve libcallnr foldclosedend reverse filter has_key bufname str2float strlen setline getcharmod setbufvar index searchpos shellescape undofile foldclosed s\ etqflist buflisted strchars str2nr virtcol floor remove undotree remote_expr winheight gettabwinvar reltime cursor tabpagenr finddir localtime acos getloclist search tanh matchend rename gettabvar strdisplaywidth type abs py3eval setwinvar tolower wildmenumode log10 spellsuggest bufloaded synconcealed nextnonblank server2client complete settabwinvar executable input wincol setmatches getftype hlID inputsave searchpair or screenrow line settabvar histadd deepcopy strpart remote_peek and eval getf\ time submatch screenchar winsaveview matchadd mkdir screenattr getfontname libcall reltimestr getfsize winnr invert pow getbufline byte2line soundfold repeat fnameescape tagfiles sin strwidth spellbadword trunc maparg log lispindent hostname setpos globpath remote_foreground getchar synIDattr fnamemodify cscope_connection stridx winbufnr indent min complete_add nr2char searchpairpos inputdialog values matchlist items hlexists strridx browsedir expand fmod pathshorten line2byte argc count getwinv\ ar glob foldtextresult getreg foreground cosh matchdelete has char2nr simplify histget searchdecl iconv winrestcmd pumvisible writefile foldlevel haslocaldir keys cos matchstr foldtext histnr tan tempname getcwd byteidx getbufvar islocked escape eventhandler remote_send serverlist winrestview synstack pyeval prevnonblank readfile cindent filereadable changenr exp"},illegal:/;/,contains:[hljs.NUMBER_MODE,{className:"string",begin:"'",end:"'",illegal:"\\n"},{className:"string",begin:/"(\\"|\n\\|[^"\n])*"/}, hljs.COMMENT('"',"$"),{className:"variable",begin:/[bwtglsav]:[\w\d_]+/},{begin:[/\b(?:function|function!)/,/\s+/,hljs.IDENT_RE],className:{1:"keyword",3:"title"},end:"$",relevance:0,contains:[{className:"params",begin:"\\(",end:"\\)"}]},{className:"symbol",begin:/<[\w-]+>/}]}}function wren(hljs){const regex=hljs.regex,IDENT_RE2=/[a-zA-Z]\w*/,KEYWORDS2=["as","break","class","construct","continue","else","for","foreign","if","import","in","is","return","static","var","while"],LITERALS2=["true","f\ alse","null"],LANGUAGE_VARS=["this","super"],CORE_CLASSES=["Bool","Class","Fiber","Fn","List","Map","Null","Num","Object","Range","Sequence","String","System"],OPERATORS=["-","~",/\*/,"%",/\.\.\./,/\.\./,/\+/,"<<",">>",">=","<=","<",">",/\^/,/!=/,/!/,/\bis\b/,"==","&&","&",/\|\|/,/\|/,/\?:/,"="],FUNCTION={relevance:0,match:regex.concat(/\b(?!(if|while|for|else|super)\b)/,IDENT_RE2,/(?=\s*[({])/),className:"title.function"},FUNCTION_DEFINITION={match:regex.concat(regex.either(regex.concat(/\b(?!(if|while|for|else|super)\b)/, IDENT_RE2),regex.either(...OPERATORS)),/(?=\s*\([^)]+\)\s*\{)/),className:"title.function",starts:{contains:[{begin:/\(/,end:/\)/,contains:[{relevance:0,scope:"params",match:IDENT_RE2}]}]}},CLASS_DEFINITION={variants:[{match:[/class\s+/,IDENT_RE2,/\s+is\s+/,IDENT_RE2]},{match:[/class\s+/,IDENT_RE2]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:KEYWORDS2},OPERATOR={relevance:0,match:regex.either(...OPERATORS),className:"operator"},TRIPLE_STRING={className:"string",begin:/"""/,end:/"""/}, PROPERTY={className:"property",begin:regex.concat(/\./,regex.lookahead(IDENT_RE2)),end:IDENT_RE2,excludeBegin:!0,relevance:0},FIELD={relevance:0,match:regex.concat(/\b_/,IDENT_RE2),scope:"variable"},CLASS_REFERENCE={relevance:0,match:/\b[A-Z]+[a-z]+([A-Z]+[a-z]+)*/,scope:"title.class",keywords:{_:CORE_CLASSES}},NUMBER=hljs.C_NUMBER_MODE,SETTER={match:[IDENT_RE2,/\s*/,/=/,/\s*/,/\(/,IDENT_RE2,/\)\s*\{/],scope:{1:"title.function",3:"operator",6:"params"}},COMMENT_DOCS=hljs.COMMENT(/\/\*\*/,/\*\//, {contains:[{match:/@[a-z]+/,scope:"doctag"},"self"]}),SUBST={scope:"subst",begin:/%\(/,end:/\)/,contains:[NUMBER,CLASS_REFERENCE,FUNCTION,FIELD,OPERATOR]},STRING={scope:"string",begin:/"/,end:/"/,contains:[SUBST,{scope:"char.escape",variants:[{match:/\\\\|\\["0%abefnrtv]/},{match:/\\x[0-9A-F]{2}/},{match:/\\u[0-9A-F]{4}/},{match:/\\U[0-9A-F]{8}/}]}]};SUBST.contains.push(STRING);const ALL_KWS=[...KEYWORDS2,...LANGUAGE_VARS,...LITERALS2],VARIABLE={relevance:0,match:regex.concat("\\b(?!",ALL_KWS.join( "|"),"\\b)",/[a-zA-Z_]\w*(?:[?!]|\b)/),className:"variable"};return{name:"Wren",keywords:{keyword:KEYWORDS2,"variable.language":LANGUAGE_VARS,literal:LITERALS2},contains:[{scope:"comment",variants:[{begin:[/#!?/,/[A-Za-z_]+(?=\()/],beginScope:{},keywords:{literal:LITERALS2},contains:[],end:/\)/},{begin:[/#!?/,/[A-Za-z_]+/],beginScope:{},end:/$/}]},NUMBER,STRING,TRIPLE_STRING,COMMENT_DOCS,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,CLASS_REFERENCE,CLASS_DEFINITION,SETTER,FUNCTION_DEFINITION, FUNCTION,OPERATOR,FIELD,PROPERTY,VARIABLE]}}function x86asm(hljs){return{name:"Intel x86 Assembly",case_insensitive:!0,keywords:{$pattern:"[.%]?"+hljs.IDENT_RE,keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2x\ m1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqr\ t fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movs\ xd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefe\ tchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs sysca\ ll sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb s\ etnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss\ rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq pun\ pckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorp\ d addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pe\ xtrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vadds\ ubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpuno\ rd_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uq\ ps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_o\ ssd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcm\ pfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vd\ ivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps v\ pabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxu\ b vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq\ vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312p\ d vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfm\ subadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vf\ madd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss\ vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcom\ uw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti\ 128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2u\ dq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq\ vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd\ vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckb\ w kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1ms\ g1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hi\ nt_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63",built_in:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi \ rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30\ ymm31 zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r1\ 3l r14l r15l db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr",meta:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment \ .nolist __FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __f\ loat80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[hljs.COMMENT(";","$",{relevance:0}),{className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*(\\.[0-9_]*)?(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0\ -9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},hljs.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"[^\\\\]`"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"subst",begin:"%[0-9]+",relevance:0},{className:"subst",begin:"%!S+",relevance:0}, {className:"meta",begin:/^\s*\.[\w_-]+/}]}}function xl(hljs){const KWS=["if","then","else","do","while","until","for","loop","import","with","is","as","where","when","by","data","constant","integer","real","text","name","boolean","symbol","infix","prefix","postfix","block","tree"],BUILT_INS2=["in","mod","rem","and","or","xor","not","abs","sign","floor","ceil","sqrt","sin","cos","tan","asin","acos","atan","exp","expm1","log","log2","log10","log1p","pi","at","text_length","text_range","text_find", "text_replace","contains","page","slide","basic_slide","title_slide","title","subtitle","fade_in","fade_out","fade_at","clear_color","color","line_color","line_width","texture_wrap","texture_transform","texture","scale_?x","scale_?y","scale_?z?","translate_?x","translate_?y","translate_?z?","rotate_?x","rotate_?y","rotate_?z?","rectangle","circle","ellipse","sphere","path","line_to","move_to","quad_to","curve_to","theme","background","contents","locally","time","mouse_?x","mouse_?y","mouse_butto\ ns"],BUILTIN_MODULES=["ObjectLoader","Animate","MovieCredits","Slides","Filters","Shading","Materials","LensFlare","Mapping","VLCAudioVideo","StereoDecoder","PointCloud","NetworkAccess","RemoteControl","RegExp","ChromaKey","Snowfall","NodeJS","Speech","Charts"],KEYWORDS2={$pattern:/[a-zA-Z][a-zA-Z0-9_?]*/,keyword:KWS,literal:["true","false","nil"],built_in:BUILT_INS2.concat(BUILTIN_MODULES)},DOUBLE_QUOTE_TEXT={className:"string",begin:'"',end:'"',illegal:"\\n"},SINGLE_QUOTE_TEXT={className:"stri\ ng",begin:"'",end:"'",illegal:"\\n"},LONG_TEXT={className:"string",begin:"<<",end:">>"},BASED_NUMBER={className:"number",begin:"[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?"},IMPORT={beginKeywords:"import",end:"$",keywords:KEYWORDS2,contains:[DOUBLE_QUOTE_TEXT]},FUNCTION_DEFINITION={className:"function",begin:/[a-z][^\n]*->/,returnBegin:!0,end:/->/,contains:[hljs.inherit(hljs.TITLE_MODE,{starts:{endsWithParent:!0,keywords:KEYWORDS2}})]};return{name:"XL",aliases:["tao"],keywords:KEYWORDS2, contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,DOUBLE_QUOTE_TEXT,SINGLE_QUOTE_TEXT,LONG_TEXT,FUNCTION_DEFINITION,IMPORT,BASED_NUMBER,hljs.NUMBER_MODE]}}function xquery(_hljs){return{name:"XQuery",aliases:["xpath","xq","xqm"],case_insensitive:!1,illegal:/(proc)|(abstract)|(extends)|(until)|(#)/,keywords:{$pattern:/[a-zA-Z$][a-zA-Z0-9_:-]*/,keyword:["module","schema","namespace","boundary-space","preserve","no-preserve","strip","default","collation","base-uri","ordering","context","d\ ecimal-format","decimal-separator","copy-namespaces","empty-sequence","except","exponent-separator","external","grouping-separator","inherit","no-inherit","lax","minus-sign","per-mille","percent","schema-attribute","schema-element","strict","unordered","zero-digit","declare","import","option","function","validate","variable","for","at","in","let","where","order","group","by","return","if","then","else","tumbling","sliding","window","start","when","only","end","previous","next","stable","ascendin\ g","descending","allowing","empty","greatest","least","some","every","satisfies","switch","case","typeswitch","try","catch","and","or","to","union","intersect","instance","of","treat","as","castable","cast","map","array","delete","insert","into","replace","value","rename","copy","modify","update"],type:["item","document-node","node","attribute","document","element","comment","namespace","namespace-node","processing-instruction","text","construction","xs:anyAtomicType","xs:untypedAtomic","xs:dura\ tion","xs:time","xs:decimal","xs:float","xs:double","xs:gYearMonth","xs:gYear","xs:gMonthDay","xs:gMonth","xs:gDay","xs:boolean","xs:base64Binary","xs:hexBinary","xs:anyURI","xs:QName","xs:NOTATION","xs:dateTime","xs:dateTimeStamp","xs:date","xs:string","xs:normalizedString","xs:token","xs:language","xs:NMTOKEN","xs:Name","xs:NCName","xs:ID","xs:IDREF","xs:ENTITY","xs:integer","xs:nonPositiveInteger","xs:negativeInteger","xs:long","xs:int","xs:short","xs:byte","xs:nonNegativeInteger","xs:unisign\ edLong","xs:unsignedInt","xs:unsignedShort","xs:unsignedByte","xs:positiveInteger","xs:yearMonthDuration","xs:dayTimeDuration"],literal:["eq","ne","lt","le","gt","ge","is","self::","child::","descendant::","descendant-or-self::","attribute::","following::","following-sibling::","parent::","ancestor::","ancestor-or-self::","preceding::","preceding-sibling::","NaN"]},contains:[{className:"variable",begin:/[$][\w\-:]+/},{className:"built_in",variants:[{begin:/\barray:/,end:/(?:append|filter|flatten|fold-(?:left|right)|for-each(?:-pair)?|get|head|insert-before|join|put|remove|reverse|size|sort|subarray|tail)\b/}, {begin:/\bmap:/,end:/(?:contains|entry|find|for-each|get|keys|merge|put|remove|size)\b/},{begin:/\bmath:/,end:/(?:a(?:cos|sin|tan[2]?)|cos|exp(?:10)?|log(?:10)?|pi|pow|sin|sqrt|tan)\b/},{begin:/\bop:/,end:/\(/,excludeEnd:!0},{begin:/\bfn:/,end:/\(/,excludeEnd:!0},{begin:/[^/,end:/(\/[\w._:-]+>)/,subLanguage:"xml",contains:[{begin:/\{/,end:/\}/,subLanguage:"xquery"},"self"]}]}}function zephir(hljs){const STRING={className:"string",contains:[hljs. BACKSLASH_ESCAPE],variants:[hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null})]},TITLE_MODE=hljs.UNDERSCORE_TITLE_MODE,NUMBER={variants:[hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE]},KEYWORDS2="namespace class interface use extends function return abstract final public protected private static deprecated throw try catch Exception echo empty isset instanceof unset let var new const self require if else elseif switch case default do while loop for\ continue break likely unlikely __LINE__ __FILE__ __DIR__ __FUNCTION__ __CLASS__ __TRAIT__ __METHOD__ __NAMESPACE__ array boolean float double integer object resource string char long unsigned bool int uint ulong uchar true false null undefined";return{name:"Zephir",aliases:["zep"],keywords:KEYWORDS2,contains:[hljs.C_LINE_COMMENT_MODE,hljs.COMMENT(/\/\*/,/\*\//,{contains:[{className:"doctag",begin:/@[A-Za-z]+/}]}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;/,contains:[hljs.BACKSLASH_ESCAPE]}, {begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function fn",end:/[;{]/,excludeEnd:!0,illegal:/\$|\[|%/,contains:[TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:["self",hljs.C_BLOCK_COMMENT_MODE,STRING,NUMBER]}]},{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,illegal:/[:($"]/,contains:[{beginKeywords:"extends implements"},TITLE_MODE]},{beginKeywords:"namespace",end:/;/,illegal:/[.']/,contains:[ TITLE_MODE]},{beginKeywords:"use",end:/;/,contains:[TITLE_MODE]},{begin:/=>/},STRING,NUMBER]}}function cPlusPlus(hljs){const regex=hljs.regex,C_LINE_COMMENT_MODE=hljs.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),DECLTYPE_AUTO_RE="decltype\\(auto\\)",NAMESPACE_RE="[a-zA-Z_]\\w*::",FUNCTION_TYPE_RE="(?!struct)("+DECLTYPE_AUTO_RE+"|"+regex.optional(NAMESPACE_RE)+"[a-zA-Z_]\\w*"+regex.optional("<[^<>]+>")+")",CPP_PRIMITIVE_TYPES={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},STRINGS={className:"stri\ ng",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},hljs.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},NUMBERS={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-F\ a-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},PREPROCESSOR={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef \ ifndef include"},contains:[{begin:/\\\n/,relevance:0},hljs.inherit(STRINGS,{className:"string"}),{className:"string",begin:/<.*?>/},C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},TITLE_MODE={className:"title",begin:regex.optional(NAMESPACE_RE)+hljs.IDENT_RE,relevance:0},FUNCTION_TITLE=regex.optional(NAMESPACE_RE)+hljs.IDENT_RE+"\\s*\\(",RESERVED_KEYWORDS=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","cl\ ass","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_ass\ ert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],RESERVED_TYPES=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],TYPE_HINTS=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","\ condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_typ\ e","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],FUNCTION_HINTS=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","ispr\ int","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh", "terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],CPP_KEYWORDS={type:RESERVED_TYPES,keyword:RESERVED_KEYWORDS,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:TYPE_HINTS},FUNCTION_DISPATCH={className:"function.dispatch",relevance:0,keywords:{_hint:FUNCTION_HINTS},begin:regex.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,hljs.IDENT_RE,regex.lookahead(/(<[^<>]+>|)\s*\(/))},EXPRESSION_CONTAINS=[FUNCTION_DISPATCH, PREPROCESSOR,CPP_PRIMITIVE_TYPES,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,NUMBERS,STRINGS],EXPRESSION_CONTEXT={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:CPP_KEYWORDS,contains:EXPRESSION_CONTAINS.concat([{begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,contains:EXPRESSION_CONTAINS.concat(["self"]),relevance:0}]),relevance:0},FUNCTION_DECLARATION={className:"function",begin:"("+FUNCTION_TYPE_RE+"[\\*&\\s]+)+"+FUNCTION_TITLE,returnBegin:!0, end:/[{;=]/,excludeEnd:!0,keywords:CPP_KEYWORDS,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:DECLTYPE_AUTO_RE,keywords:CPP_KEYWORDS,relevance:0},{begin:FUNCTION_TITLE,returnBegin:!0,contains:[TITLE_MODE],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[STRINGS,NUMBERS]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,relevance:0,contains:[C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,CPP_PRIMITIVE_TYPES,{begin:/\(/,end:/\)/, keywords:CPP_KEYWORDS,relevance:0,contains:["self",C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,CPP_PRIMITIVE_TYPES]}]},CPP_PRIMITIVE_TYPES,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,PREPROCESSOR]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:CPP_KEYWORDS,illegal:"",keywords:CPP_KEYWORDS,contains:["self",CPP_PRIMITIVE_TYPES]},{begin:hljs.IDENT_RE+"::",keywords:CPP_KEYWORDS},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function arduino(hljs){const ARDUINO_KW={type:["boo\ lean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server", "GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","begi\ nTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNa\ meWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket", "isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readS\ tring","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflo\ w","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","s\ etMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit", "tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},ARDUINO=cPlusPlus(hljs),kws=ARDUINO.keywords;return kws.type=[...kws.type,...ARDUINO_KW.type],kws.literal=[...kws.literal,...ARDUINO_KW.literal],kws.built_in=[...kws.built_in, ...ARDUINO_KW.built_in],kws._hints=ARDUINO_KW._hints,ARDUINO.name="Arduino",ARDUINO.aliases=["ino"],ARDUINO.supersetOf="cpp",ARDUINO}function bash(hljs){const regex=hljs.regex,VAR={},BRACED_VAR={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[VAR]}]};Object.assign(VAR,{className:"variable",variants:[{begin:regex.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},BRACED_VAR]});const SUBST={className:"subst",begin:/\$\(/,end:/\)/,contains:[hljs.BACKSLASH_ESCAPE]},COMMENT=hljs.inherit( hljs.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),HERE_DOC={begin:/<<-?\s*(?=\w+)/,starts:{contains:[hljs.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},QUOTE_STRING={className:"string",begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,VAR,SUBST]};SUBST.contains.push(QUOTE_STRING);const ESCAPED_QUOTE={match:/\\"/},APOS_STRING={className:"string",begin:/'/,end:/'/},ESCAPED_APOS={match:/\\'/},ARITHMETIC={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/, className:"number"},hljs.NUMBER_MODE,VAR]},SH_LIKE_SHELLS=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],KNOWN_SHEBANG=hljs.SHEBANG({binary:`(${SH_LIKE_SHELLS.join("|")})`,relevance:10}),FUNCTION={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},KEYWORDS2=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],LITERALS2=["t\ rue","false"],PATH_MODE={match:/(\/[a-z._-]+)+/},SHELL_BUILT_INS=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],BASH_BUILT_INS=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],ZSH_BUILT_INS=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments", "compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","\ zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],GNU_CORE_UTILS=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","\ tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:KEYWORDS2,literal:LITERALS2,built_in:[...SHELL_BUILT_INS, ...BASH_BUILT_INS,"set","shopt",...ZSH_BUILT_INS,...GNU_CORE_UTILS]},contains:[KNOWN_SHEBANG,hljs.SHEBANG(),FUNCTION,ARITHMETIC,COMMENT,HERE_DOC,PATH_MODE,QUOTE_STRING,ESCAPED_QUOTE,APOS_STRING,ESCAPED_APOS,VAR]}}function c(hljs){const regex=hljs.regex,C_LINE_COMMENT_MODE=hljs.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),DECLTYPE_AUTO_RE="decltype\\(auto\\)",NAMESPACE_RE="[a-zA-Z_]\\w*::",FUNCTION_TYPE_RE="("+DECLTYPE_AUTO_RE+"|"+regex.optional(NAMESPACE_RE)+"[a-zA-Z_]\\w*"+regex.optional("<[^<\ >]+>")+")",TYPES2={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},STRINGS={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},hljs.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},NUMBERS={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/}, {match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},PREPROCESSOR={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},hljs.inherit(STRINGS,{className:"string"}),{className:"string",begin:/<.*?>/}, C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},TITLE_MODE={className:"title",begin:regex.optional(NAMESPACE_RE)+hljs.IDENT_RE,relevance:0},FUNCTION_TITLE=regex.optional(NAMESPACE_RE)+hljs.IDENT_RE+"\\s*\\(",KEYWORDS2={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Gene\ ric","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"\ std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit t\ olower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},EXPRESSION_CONTAINS=[PREPROCESSOR,TYPES2,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,NUMBERS,STRINGS],EXPRESSION_CONTEXT={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"\ new throw return else",end:/;/}],keywords:KEYWORDS2,contains:EXPRESSION_CONTAINS.concat([{begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:EXPRESSION_CONTAINS.concat(["self"]),relevance:0}]),relevance:0},FUNCTION_DECLARATION={begin:"("+FUNCTION_TYPE_RE+"[\\*&\\s]+)+"+FUNCTION_TITLE,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:KEYWORDS2,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:DECLTYPE_AUTO_RE,keywords:KEYWORDS2,relevance:0},{begin:FUNCTION_TITLE,returnBegin:!0,contains:[hljs.inherit(TITLE_MODE, {className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,relevance:0,contains:[C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,TYPES2,{begin:/\(/,end:/\)/,keywords:KEYWORDS2,relevance:0,contains:["self",C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,TYPES2]}]},TYPES2,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,PREPROCESSOR]};return{name:"C",aliases:["h"],keywords:KEYWORDS2,disableAutodetect:!0,illegal:"\ =]/,contains:[{beginKeywords:"final class struct"},hljs.TITLE_MODE]}]),exports:{preprocessor:PREPROCESSOR,strings:STRINGS,keywords:KEYWORDS2}}}function cpp(hljs){const regex=hljs.regex,C_LINE_COMMENT_MODE=hljs.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),DECLTYPE_AUTO_RE="decltype\\(aut\ o\\)",NAMESPACE_RE="[a-zA-Z_]\\w*::",FUNCTION_TYPE_RE="(?!struct)("+DECLTYPE_AUTO_RE+"|"+regex.optional(NAMESPACE_RE)+"[a-zA-Z_]\\w*"+regex.optional("<[^<>]+>")+")",CPP_PRIMITIVE_TYPES={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},STRINGS={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},hljs.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/, end:/\)([^()\\ ]{0,16})"/})]},NUMBERS={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[\ 1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},PREPROCESSOR={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},hljs.inherit(STRINGS,{className:"string"}),{className:"string",begin:/<.*?>/},C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},TITLE_MODE={className:"title",begin:regex.optional(NAMESPACE_RE)+hljs.IDENT_RE, relevance:0},FUNCTION_TITLE=regex.optional(NAMESPACE_RE)+hljs.IDENT_RE+"\\s*\\(",RESERVED_KEYWORDS=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if", "import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],RESERVED_TYPES=[ "bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],TYPE_HINTS=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promis\ e","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],FUNCTION_HINTS=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil", "cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","real\ loc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],CPP_KEYWORDS={type:RESERVED_TYPES,keyword:RESERVED_KEYWORDS,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:TYPE_HINTS},FUNCTION_DISPATCH={ className:"function.dispatch",relevance:0,keywords:{_hint:FUNCTION_HINTS},begin:regex.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,hljs.IDENT_RE,regex.lookahead(/(<[^<>]+>|)\s*\(/))},EXPRESSION_CONTAINS=[FUNCTION_DISPATCH,PREPROCESSOR,CPP_PRIMITIVE_TYPES,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,NUMBERS,STRINGS],EXPRESSION_CONTEXT={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:CPP_KEYWORDS,contains:EXPRESSION_CONTAINS. concat([{begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,contains:EXPRESSION_CONTAINS.concat(["self"]),relevance:0}]),relevance:0},FUNCTION_DECLARATION={className:"function",begin:"("+FUNCTION_TYPE_RE+"[\\*&\\s]+)+"+FUNCTION_TITLE,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:CPP_KEYWORDS,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:DECLTYPE_AUTO_RE,keywords:CPP_KEYWORDS,relevance:0},{begin:FUNCTION_TITLE,returnBegin:!0,contains:[TITLE_MODE],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0, contains:[STRINGS,NUMBERS]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,relevance:0,contains:[C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,CPP_PRIMITIVE_TYPES,{begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,relevance:0,contains:["self",C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,CPP_PRIMITIVE_TYPES]}]},CPP_PRIMITIVE_TYPES,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,PREPROCESSOR]};return{name:"C++",aliases:["cc","c++","h++", "hpp","hh","hxx","cxx"],keywords:CPP_KEYWORDS,illegal:"",keywords:CPP_KEYWORDS,contains:["self",CPP_PRIMITIVE_TYPES]}, {begin:hljs.IDENT_RE+"::",keywords:CPP_KEYWORDS},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function csharp(hljs){const BUILT_IN_KEYWORDS=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],FUNCTION_MODIFIERS=["public","private","protected","static","internal","protected","abstract","async","extern","override", "unsafe","virtual","new","sealed","partial"],LITERAL_KEYWORDS=["default","false","null","true"],NORMAL_KEYWORDS=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct", "switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],CONTEXTUAL_KEYWORDS=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],KEYWORDS2={keyword:NORMAL_KEYWORDS.concat(CONTEXTUAL_KEYWORDS), built_in:BUILT_IN_KEYWORDS,literal:LITERAL_KEYWORDS},TITLE_MODE=hljs.inherit(hljs.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),NUMBERS={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},RAW_STRING={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},VERBATIM_STRING={className:"string",begin:'@"',end:'"', contains:[{begin:'""'}]},VERBATIM_STRING_NO_LF=hljs.inherit(VERBATIM_STRING,{illegal:/\n/}),SUBST={className:"subst",begin:/\{/,end:/\}/,keywords:KEYWORDS2},SUBST_NO_LF=hljs.inherit(SUBST,{illegal:/\n/}),INTERPOLATED_STRING={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},hljs.BACKSLASH_ESCAPE,SUBST_NO_LF]},INTERPOLATED_VERBATIM_STRING={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},SUBST]},INTERPOLATED_VERBATIM_STRING_NO_LF=hljs. inherit(INTERPOLATED_VERBATIM_STRING,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},SUBST_NO_LF]});SUBST.contains=[INTERPOLATED_VERBATIM_STRING,INTERPOLATED_STRING,VERBATIM_STRING,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,NUMBERS,hljs.C_BLOCK_COMMENT_MODE],SUBST_NO_LF.contains=[INTERPOLATED_VERBATIM_STRING_NO_LF,INTERPOLATED_STRING,VERBATIM_STRING_NO_LF,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,NUMBERS,hljs.inherit(hljs.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const STRING={ variants:[RAW_STRING,INTERPOLATED_VERBATIM_STRING,INTERPOLATED_STRING,VERBATIM_STRING,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},GENERIC_MODIFIER={begin:"<",end:">",contains:[{beginKeywords:"in out"},TITLE_MODE]},TYPE_IDENT_RE=hljs.IDENT_RE+"(<"+hljs.IDENT_RE+"(\\s*,\\s*"+hljs.IDENT_RE+")*>)?(\\[\\])?",AT_IDENTIFIER={begin:"@"+hljs.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:KEYWORDS2,illegal:/::/,contains:[hljs.COMMENT("///","$",{returnBegin:!0,contains:[{className:"\ doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},STRING,NUMBERS,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},TITLE_MODE,GENERIC_MODIFIER,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{beginKeywords:"\ namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[TITLE_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[TITLE_MODE,GENERIC_MODIFIER,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"\ ("+TYPE_IDENT_RE+"\\s+)+"+hljs.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:KEYWORDS2,contains:[{beginKeywords:FUNCTION_MODIFIERS.join(" "),relevance:0},{begin:hljs.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[hljs.TITLE_MODE,GENERIC_MODIFIER],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS2,relevance:0,contains:[STRING,NUMBERS,hljs.C_BLOCK_COMMENT_MODE]},hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE]},AT_IDENTIFIER]}}const MODES$2=hljs=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:hljs.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:hljs.NUMBER_RE+"(%|em|ex|ch|rem|\ vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),HTML_TAGS$2=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li", "main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],SVG_TAGS$2=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOf\ fset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],TAGS$2=[...HTML_TAGS$2,...SVG_TAGS$2],MEDIA_FEATURES$2=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orient\ ation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),PSEUDO_CLASSES$2=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has", "host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),PSEUDO_ELEMENTS$2=["after","backdrop","before","c\ ue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ATTRIBUTES$2=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-r\ ange-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border\ -block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-ima\ ge-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacin\ g","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","c\ olor-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment", "counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font\ -size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","\ grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","i\ nset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right", "margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","\ min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavio\ r","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","point\ er-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scro\ ll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","spe\ ak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color", "text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-funct\ ion","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function css(hljs){ const regex=hljs.regex,modes2=MODES$2(hljs),VENDOR_PREFIX={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},AT_MODIFIERS="and or not only",AT_PROPERTY_RE=/@-?\w[\w]*(-\w+)*/,IDENT_RE2="[a-zA-Z-][a-zA-Z0-9_-]*",STRINGS=[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[modes2.BLOCK_COMMENT,VENDOR_PREFIX,modes2.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/, relevance:0},{className:"selector-class",begin:"\\."+IDENT_RE2,relevance:0},modes2.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+PSEUDO_CLASSES$2.join("|")+")"},{begin:":(:)?("+PSEUDO_ELEMENTS$2.join("|")+")"}]},modes2.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ATTRIBUTES$2.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[modes2.BLOCK_COMMENT,modes2.HEXCOLOR,modes2.IMPORTANT,modes2.CSS_NUMBER_MODE,...STRINGS,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{ built_in:"url data-uri"},contains:[...STRINGS,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},modes2.FUNCTION_DISPATCH]},{begin:regex.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:AT_PROPERTY_RE},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:AT_MODIFIERS,attribute:MEDIA_FEATURES$2.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...STRINGS,modes2.CSS_NUMBER_MODE]}]},{className:"\ selector-tag",begin:"\\b("+TAGS$2.join("|")+")\\b"}]}}function diff(hljs){const regex=hljs.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:regex.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:regex.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/, end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function go(hljs){const KEYWORDS2={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","fa\ lse","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:KEYWORDS2,illegal:"recurRegex(re2,substitution,depth-1))}function java(hljs){const regex=hljs.regex,JAVA_IDENT_RE="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",GENERIC_IDENT_RE=JAVA_IDENT_RE+recurRegex("(?:<"+JAVA_IDENT_RE+"~~~(?:\\s*,\\s*"+JAVA_IDENT_RE+"~~~)*>)?",/~~~/g,2),KEYWORDS2={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally", "protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},ANNOTATION={className:"meta",begin:"@"+JAVA_IDENT_RE,contains:[{begin:/\(/, end:/\)/,contains:["self"]}]},PARAMS={className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,relevance:0,contains:[hljs.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:KEYWORDS2,illegal:/<\/|#/,contains:[hljs.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"\ string",contains:[hljs.BACKSLASH_ESCAPE]},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,JAVA_IDENT_RE],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[regex.concat(/(?!else)/,JAVA_IDENT_RE),/\s+/,JAVA_IDENT_RE,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,JAVA_IDENT_RE],className:{1:"keyword",3:"title.class"},contains:[PARAMS,hljs.C_LINE_COMMENT_MODE,hljs. C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+GENERIC_IDENT_RE+"\\s+)",hljs.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:KEYWORDS2,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,relevance:0,contains:[ANNOTATION,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,NUMERIC$1,hljs.C_BLOCK_COMMENT_MODE]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},NUMERIC$1,ANNOTATION]}}const IDENT_RE$1="[A-Za-z$_][0-9A-Za-\ z$_]*",KEYWORDS$1=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],LITERALS$1=["true","false","null","undefined","NaN","Infinity"],TYPES$1=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","\ Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ERROR_TYPES$1=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],BUILT_IN_GLOBALS$1=["setInte\ rval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],BUILT_IN_VARIABLES$1=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],BUILT_INS$1=[].concat(BUILT_IN_GLOBALS$1,TYPES$1,ERROR_TYPES$1);function javascript$1(hljs){const regex=hljs.regex,hasClosingTag=(match,{after})=>{const tag="",end:""},XML_SELF_CLOSING=/<[A-Za-z0-9\\._:-]+\s*\/>/,XML_TAG={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(match,response)=>{const afterMatchIndex=match[0].length+match.index,nextChar=match.input[afterMatchIndex];if(nextChar==="<"||nextChar===","){response.ignoreMatch();return}nextChar===">"&&(hasClosingTag(match,{after:afterMatchIndex})||response.ignoreMatch()); let m;const afterMatch=match.input.substring(afterMatchIndex);if(m=afterMatch.match(/^\s*=/)){response.ignoreMatch();return}if((m=afterMatch.match(/^\s+extends\s+/))&&m.index===0){response.ignoreMatch();return}}},KEYWORDS$1$1={$pattern:IDENT_RE$1,keyword:KEYWORDS$1,literal:LITERALS$1,built_in:BUILT_INS$1,"variable.language":BUILT_IN_VARIABLES$1},decimalDigits2="[0-9](_?[0-9])*",frac2=`\\.(${decimalDigits2})`,decimalInteger="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",NUMBER={className:"number",variants:[ {begin:`(\\b(${decimalInteger})((${frac2})|\\.)?|(${frac2}))[eE][+-]?(${decimalDigits2})\\b`},{begin:`\\b(${decimalInteger})\\b((${frac2})\\b|\\.)?|(${frac2})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},SUBST={className:"subst",begin:"\\$\\{",end:"\\}",keywords:KEYWORDS$1$1,contains:[]},HTML_TEMPLATE={begin:".?html`",end:"",starts:{ end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"xml"}},CSS_TEMPLATE={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"css"}},GRAPHQL_TEMPLATE={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"graphql"}},TEMPLATE_STRING={className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE,SUBST]},COMMENT={className:"comment",variants:[hljs.COMMENT(/\/\*\*(?!\/)/,"\\*\ /",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:IDENT_RE$1$1+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),hljs.C_BLOCK_COMMENT_MODE,hljs.C_LINE_COMMENT_MODE]},SUBST_INTERNALS=[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,HTML_TEMPLATE,CSS_TEMPLATE,GRAPHQL_TEMPLATE,TEMPLATE_STRING,{match:/\$\d+/}, NUMBER];SUBST.contains=SUBST_INTERNALS.concat({begin:/\{/,end:/\}/,keywords:KEYWORDS$1$1,contains:["self"].concat(SUBST_INTERNALS)});const SUBST_AND_COMMENTS=[].concat(COMMENT,SUBST.contains),PARAMS_CONTAINS=SUBST_AND_COMMENTS.concat([{begin:/(\s*)\(/,end:/\)/,keywords:KEYWORDS$1$1,contains:["self"].concat(SUBST_AND_COMMENTS)}]),PARAMS={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS$1$1,contains:PARAMS_CONTAINS},CLASS_OR_EXTENDS={variants:[{match:[/class/, /\s+/,IDENT_RE$1$1,/\s+/,/extends/,/\s+/,regex.concat(IDENT_RE$1$1,"(",regex.concat(/\./,IDENT_RE$1$1),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,IDENT_RE$1$1],scope:{1:"keyword",3:"title.class"}}]},CLASS_REFERENCE={relevance:0,match:regex.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...TYPES$1,...ERROR_TYPES$1]}}, USE_STRICT={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},FUNCTION_DEFINITION={variants:[{match:[/function/,/\s+/,IDENT_RE$1$1,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[PARAMS],illegal:/%/},UPPER_CASE_CONSTANT={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function noneOf(list2){return regex.concat("(?!",list2.join("|"),")")}const FUNCTION_CALL={match:regex. concat(/\b/,noneOf([...BUILT_IN_GLOBALS$1,"super","import"].map(x=>`${x}\\s*\\(`)),IDENT_RE$1$1,regex.lookahead(/\s*\(/)),className:"title.function",relevance:0},PROPERTY_ACCESS={begin:regex.concat(/\./,regex.lookahead(regex.concat(IDENT_RE$1$1,/(?![0-9A-Za-z$_(])/))),end:IDENT_RE$1$1,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},GETTER_OR_SETTER={match:[/get|set/,/\s+/,IDENT_RE$1$1,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},PARAMS]},FUNC_LEAD_IN_RE="\ (\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+hljs.UNDERSCORE_IDENT_RE+")\\s*=>",FUNCTION_VARIABLE={match:[/const|var|let/,/\s+/,IDENT_RE$1$1,/\s*/,/=\s*/,/(async\s*)?/,regex.lookahead(FUNC_LEAD_IN_RE)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[PARAMS]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:KEYWORDS$1$1,exports:{PARAMS_CONTAINS,CLASS_REFERENCE},illegal:/#(?![$_A-z])/,contains:[hljs.SHEBANG({label:"shebang",binary:"node",relevance:5}), USE_STRICT,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,HTML_TEMPLATE,CSS_TEMPLATE,GRAPHQL_TEMPLATE,TEMPLATE_STRING,COMMENT,{match:/\$\d+/},NUMBER,CLASS_REFERENCE,{scope:"attr",match:IDENT_RE$1$1+regex.lookahead(":"),relevance:0},FUNCTION_VARIABLE,{begin:"("+hljs.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[COMMENT,hljs.REGEXP_MODE,{className:"function",begin:FUNC_LEAD_IN_RE,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[ {begin:hljs.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS$1$1,contains:PARAMS_CONTAINS}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:FRAGMENT.begin,end:FRAGMENT.end},{match:XML_SELF_CLOSING},{begin:XML_TAG.begin,"on:begin":XML_TAG.isTrulyOpeningTag,end:XML_TAG.end}],subLanguage:"xml",contains:[{begin:XML_TAG.begin,end:XML_TAG.end,skip:!0,contains:["self"]}]}]},FUNCTION_DEFINITION, {beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+hljs.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[PARAMS,hljs.inherit(hljs.TITLE_MODE,{begin:IDENT_RE$1$1,className:"title.function"})]},{match:/\.\.\./,relevance:0},PROPERTY_ACCESS,{match:"\\$"+IDENT_RE$1$1,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[PARAMS]},FUNCTION_CALL,UPPER_CASE_CONSTANT,CLASS_OR_EXTENDS, GETTER_OR_SETTER,{match:/\$[(.]/}]}}function json(hljs){const ATTRIBUTE={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},PUNCTUATION={match:/[{}[\],:]/,className:"punctuation",relevance:0},LITERALS2=["true","false","null"],LITERALS_MODE={scope:"literal",beginKeywords:LITERALS2.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:LITERALS2},contains:[ATTRIBUTE,PUNCTUATION,hljs.QUOTE_STRING_MODE,LITERALS_MODE,hljs.C_NUMBER_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE], illegal:"\\S"}}var decimalDigits="[0-9](_*[0-9])*",frac=`\\.(${decimalDigits})`,hexDigits="[0-9a-fA-F](_*[0-9a-fA-F])*",NUMERIC={className:"number",variants:[{begin:`(\\b(${decimalDigits})((${frac})|\\.)?|(${frac}))[eE][+-]?(${decimalDigits})[fFdD]?\\b`},{begin:`\\b(${decimalDigits})((${frac})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${frac})[fFdD]?\\b`},{begin:`\\b(${decimalDigits})[fFdD]\\b`},{begin:`\\b0[xX]((${hexDigits})\\.?|(${hexDigits})?\\.(${hexDigits}))[pP][+-]?(${decimalDigits})[fFdD]?\\b`}, {begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${hexDigits})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function kotlin(hljs){const KEYWORDS2={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal \ infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},KEYWORDS_WITH_LABEL={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},LABEL={className:"symbol",begin:hljs.UNDERSCORE_IDENT_RE+"@"},SUBST={className:"subst",begin:/\$\{/,end:/\}/,contains:[hljs.C_NUMBER_MODE]},VARIABLE={className:"\ variable",begin:"\\$"+hljs.UNDERSCORE_IDENT_RE},STRING={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[VARIABLE,SUBST]},{begin:"'",end:"'",illegal:/\n/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[hljs.BACKSLASH_ESCAPE,VARIABLE,SUBST]}]};SUBST.contains.push(STRING);const ANNOTATION_USE_SITE={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+hljs.UNDERSCORE_IDENT_RE+")?"},ANNOTATION={className:"\ meta",begin:"@"+hljs.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[hljs.inherit(STRING,{className:"string"}),"self"]}]},KOTLIN_NUMBER_MODE=NUMERIC,KOTLIN_NESTED_COMMENT=hljs.COMMENT("/\\*","\\*/",{contains:[hljs.C_BLOCK_COMMENT_MODE]}),KOTLIN_PAREN_TYPE={variants:[{className:"type",begin:hljs.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},KOTLIN_PAREN_TYPE2=KOTLIN_PAREN_TYPE;return KOTLIN_PAREN_TYPE2.variants[1].contains=[KOTLIN_PAREN_TYPE],KOTLIN_PAREN_TYPE.variants[1]. contains=[KOTLIN_PAREN_TYPE2],{name:"Kotlin",aliases:["kt","kts"],keywords:KEYWORDS2,contains:[hljs.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),hljs.C_LINE_COMMENT_MODE,KOTLIN_NESTED_COMMENT,KEYWORDS_WITH_LABEL,LABEL,ANNOTATION_USE_SITE,ANNOTATION,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:KEYWORDS2,relevance:5,contains:[{begin:hljs.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[hljs. UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:KEYWORDS2,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[KOTLIN_PAREN_TYPE,hljs.C_LINE_COMMENT_MODE,KOTLIN_NESTED_COMMENT],relevance:0},hljs.C_LINE_COMMENT_MODE,KOTLIN_NESTED_COMMENT,ANNOTATION_USE_SITE,ANNOTATION,STRING,hljs.C_NUMBER_MODE]},KOTLIN_NESTED_COMMENT]},{begin:[/class|interface|trait/,/\s+/,hljs.UNDERSCORE_IDENT_RE], beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},hljs.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},ANNOTATION_USE_SITE,ANNOTATION]},STRING,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` `},KOTLIN_NUMBER_MODE]}}const MODES$1=hljs=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:hljs.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:hljs.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|m\ m|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),HTML_TAGS$1=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu", "nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],SVG_TAGS$1=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLigh\ ting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],TAGS$1=[...HTML_TAGS$1,...SVG_TAGS$1],MEDIA_FEATURES$1=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-bloc\ k","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),PSEUDO_CLASSES$1=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context", "hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),PSEUDO_ELEMENTS$1=["after","backdrop","before","cue","cue-region","firs\ t-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ATTRIBUTES$1=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation\ -timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","bor\ der-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-ima\ ge-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-r\ adius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","c\ olor-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","cou\ nter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-\ smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","g\ rid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-b\ lock-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marg\ in-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","\ min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-beh\ avior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","positi\ on","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block", "scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","sr\ c","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-pos\ ition","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","\ unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),PSEUDO_SELECTORS=PSEUDO_CLASSES$1. concat(PSEUDO_ELEMENTS$1).sort().reverse();function less(hljs){const modes2=MODES$1(hljs),PSEUDO_SELECTORS$1=PSEUDO_SELECTORS,AT_MODIFIERS="and or not only",IDENT_RE2="[\\w-]+",INTERP_IDENT_RE="("+IDENT_RE2+"|@\\{"+IDENT_RE2+"\\})",RULES=[],VALUE_MODES=[],STRING_MODE=function(c2){return{className:"string",begin:"~?"+c2+".*?"+c2}},IDENT_MODE=function(name,begin,relevance){return{className:name,begin,relevance}},AT_KEYWORDS={$pattern:/[a-z-]+/,keyword:AT_MODIFIERS,attribute:MEDIA_FEATURES$1.join("\ ")},PARENS_MODE={begin:"\\(",end:"\\)",contains:VALUE_MODES,keywords:AT_KEYWORDS,relevance:0};VALUE_MODES.push(hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRING_MODE("'"),STRING_MODE('"'),modes2.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},modes2.HEXCOLOR,PARENS_MODE,IDENT_MODE("variable","@@?"+IDENT_RE2,10),IDENT_MODE("variable","@\\{"+IDENT_RE2+"\\}"),IDENT_MODE("built_in","~?`[^`]*?`"),{className:"attribute",begin:IDENT_RE2+"\\s*\ :",end:":",returnBegin:!0,excludeEnd:!0},modes2.IMPORTANT,{beginKeywords:"and not"},modes2.FUNCTION_DISPATCH);const VALUE_WITH_RULESETS=VALUE_MODES.concat({begin:/\{/,end:/\}/,contains:RULES}),MIXIN_GUARD_MODE={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(VALUE_MODES)},RULE_MODE={begin:INTERP_IDENT_RE+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},modes2.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ATTRIBUTES$1.join( "|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:VALUE_MODES}}]},AT_RULE_MODE={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:AT_KEYWORDS,returnEnd:!0,contains:VALUE_MODES,relevance:0}},VAR_RULE_MODE={className:"variable",variants:[{begin:"@"+IDENT_RE2+"\\s*:",relevance:15},{begin:"@"+IDENT_RE2}],starts:{end:"[;}]",returnEnd:!0,contains:VALUE_WITH_RULESETS}}, SELECTOR_MODE={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:INTERP_IDENT_RE,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,MIXIN_GUARD_MODE,IDENT_MODE("keyword","all\\b"),IDENT_MODE("variable","@\\{"+IDENT_RE2+"\\}"),{begin:"\\b("+TAGS$1.join("|")+")\\b",className:"selector-tag"},modes2.CSS_NUMBER_MODE,IDENT_MODE("selector-tag",INTERP_IDENT_RE,0),IDENT_MODE("selector-id","#"+INTERP_IDENT_RE),IDENT_MODE("sel\ ector-class","\\."+INTERP_IDENT_RE,0),IDENT_MODE("selector-tag","&",0),modes2.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+PSEUDO_CLASSES$1.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+PSEUDO_ELEMENTS$1.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:VALUE_WITH_RULESETS},{begin:"!important"},modes2.FUNCTION_DISPATCH]},PSEUDO_SELECTOR_MODE={begin:IDENT_RE2+`:(:)?(${PSEUDO_SELECTORS$1.join("|")})`,returnBegin:!0,contains:[SELECTOR_MODE]};return RULES.push( hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,AT_RULE_MODE,VAR_RULE_MODE,PSEUDO_SELECTOR_MODE,RULE_MODE,SELECTOR_MODE,MIXIN_GUARD_MODE,modes2.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:RULES}}function lua(hljs){const OPENING_LONG_BRACKET="\\[=*\\[",CLOSING_LONG_BRACKET="\\]=*\\]",LONG_BRACKETS={begin:OPENING_LONG_BRACKET,end:CLOSING_LONG_BRACKET,contains:["self"]},COMMENTS=[hljs.COMMENT("--(?!"+OPENING_LONG_BRACKET+")","$"),hljs.COMMENT("--"+OPENING_LONG_BRACKET, CLOSING_LONG_BRACKET,{contains:[LONG_BRACKETS],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:hljs.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfi\ le loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random ra\ ndomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:COMMENTS.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[hljs.inherit(hljs.TITLE_MODE, {begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:COMMENTS}].concat(COMMENTS)},hljs.C_NUMBER_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{className:"string",begin:OPENING_LONG_BRACKET,end:CLOSING_LONG_BRACKET,contains:[LONG_BRACKETS],relevance:5}])}}function makefile(hljs){const VARIABLE={className:"variable",variants:[{begin:"\\$\\("+hljs.UNDERSCORE_IDENT_RE+"\\)",contains:[hljs.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},HORIZONTAL_RULE={begin:"^[-\\*]{3,}",end:"$"},CODE={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},LIST={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0}, LINK_REFERENCE={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},URL_SCHEME=/[A-Za-z][A-Za-z0-9+.-]*/,LINK={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:regex.concat(/\[.+?\]\(/,URL_SCHEME,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/, relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},BOLD={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},ITALIC={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/, end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},BOLD_WITHOUT_ITALIC=hljs.inherit(BOLD,{contains:[]}),ITALIC_WITHOUT_BOLD=hljs.inherit(ITALIC,{contains:[]});BOLD.contains.push(ITALIC_WITHOUT_BOLD),ITALIC.contains.push(BOLD_WITHOUT_ITALIC);let CONTAINABLE=[INLINE_HTML,LINK];return[BOLD,ITALIC,BOLD_WITHOUT_ITALIC,ITALIC_WITHOUT_BOLD].forEach(m=>{m.contains=m.contains.concat(CONTAINABLE)}),CONTAINABLE=CONTAINABLE.concat(BOLD,ITALIC),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"\ section",variants:[{begin:"^#{1,6}",end:"$",contains:CONTAINABLE},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:CONTAINABLE}]}]},INLINE_HTML,LIST,BOLD,ITALIC,{className:"quote",begin:"^>\\s+",contains:CONTAINABLE,end:"$"},CODE,HORIZONTAL_RULE,LINK,LINK_REFERENCE,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function objectivec(hljs){const API_CLASS={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|N\ S|SCN|SK|UI|WK|XC)\\w+"},IDENTIFIER_RE=/[a-zA-Z@][a-zA-Z0-9_]*/,KEYWORDS2={"variable.language":["this","super"],$pattern:IDENTIFIER_RE,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak", "copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__", "__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_\ VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},CLASS_KEYWORDS={$pattern:IDENTIFIER_RE,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c+\ +"],keywords:KEYWORDS2,illegal:"/,end:/$/,illegal:"\\n"},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+CLASS_KEYWORDS.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:CLASS_KEYWORDS,contains:[hljs.UNDERSCORE_TITLE_MODE]},{begin:"\\."+hljs.UNDERSCORE_IDENT_RE,relevance:0}]}}function perl(hljs){const regex=hljs.regex,KEYWORDS2=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","cho\ wn","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeern\ ame","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","\ pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","\ sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],REGEX_MODIFIERS=/[dualxmsipngr]{0,12}/,PERL_KEYWORDS={$pattern:/[\w.]+/, keyword:KEYWORDS2.join(" ")},SUBST={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:PERL_KEYWORDS},METHOD={begin:/->\{/,end:/\}/},ATTR={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},VAR={scope:"variable",variants:[{begin:/\$\d/},{begin:regex.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[ATTR]},NUMBER={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/}, {match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},STRING_CONTAINS=[hljs.BACKSLASH_ESCAPE,SUBST,VAR],REGEX_DELIMS=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],PAIRED_DOUBLE_RE=(prefix,open2,close2="\\1")=>{const middle=close2==="\\1"?close2:regex.concat(close2,open2);return regex.concat(regex.concat("(?:",prefix,")"),open2,/(?:\\.|[^\\\/])*?/,middle,/(?:\\.|[^\\\/])*?/,close2,REGEX_MODIFIERS)},PAIRED_RE=(prefix,open2,close2)=>regex.concat(regex.concat( "(?:",prefix,")"),open2,/(?:\\.|[^\\\/])*?/,close2,REGEX_MODIFIERS),PERL_DEFAULT_CONTAINS=[VAR,hljs.HASH_COMMENT_MODE,hljs.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),METHOD,{className:"string",contains:STRING_CONTAINS,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5}, {begin:"'",end:"'",contains:[hljs.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},NUMBER,{begin:"(\\/\\/|"+hljs.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[hljs.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:PAIRED_DOUBLE_RE("s|tr|y",regex.either(...REGEX_DELIMS,{capture:!0}))},{begin:PAIRED_DOUBLE_RE( "s|tr|y","\\(","\\)")},{begin:PAIRED_DOUBLE_RE("s|tr|y","\\[","\\]")},{begin:PAIRED_DOUBLE_RE("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:PAIRED_RE("(?:m|qr)?",/\//,/\//)},{begin:PAIRED_RE("m|qr",regex.either(...REGEX_DELIMS,{capture:!0}),/\1/)},{begin:PAIRED_RE("m|qr",/\(/,/\)/)},{begin:PAIRED_RE("m|qr",/\[/,/\]/)},{begin:PAIRED_RE("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0, relevance:5,contains:[hljs.TITLE_MODE,ATTR]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[hljs.TITLE_MODE,ATTR,NUMBER]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return SUBST.contains=PERL_DEFAULT_CONTAINS,METHOD.contains=PERL_DEFAULT_CONTAINS,{name:"Perl",aliases:["pl","pm"],keywords:PERL_KEYWORDS,contains:PERL_DEFAULT_CONTAINS}}function php(hljs){ const regex=hljs.regex,NOT_PERL_ETC=/(?![A-Za-z0-9])(?![$])/,IDENT_RE2=regex.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,NOT_PERL_ETC),PASCAL_CASE_CLASS_NAME_RE=regex.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,NOT_PERL_ETC),UPCASE_NAME_RE=regex.concat(/[A-Z]+/,NOT_PERL_ETC),VARIABLE={scope:"variable",match:"\\$+"+IDENT_RE2},PREPROCESSOR={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},SUBST={ scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},SINGLE_QUOTED=hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null}),DOUBLE_QUOTED=hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null,contains:hljs.QUOTE_STRING_MODE.contains.concat(SUBST)}),HEREDOC={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:hljs.QUOTE_STRING_MODE.contains.concat(SUBST),"on:begin":(m,resp)=>{resp.data._beginMatch=m[1]||m[2]},"on:end":(m,resp)=>{resp.data._beginMatch!==m[1]&&resp.ignoreMatch()}}, NOWDOC=hljs.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),WHITESPACE=`[ ]`,STRING={scope:"string",variants:[DOUBLE_QUOTED,SINGLE_QUOTED,HEREDOC,NOWDOC]},NUMBER={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},LITERALS2=["false","null","true"],KWS=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__\ TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","iss\ et","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],BUILT_INS2=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroEr\ ror","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveD\ irectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess", "BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],KEYWORDS2={keyword:KWS,literal:(items2=>{const result=[];return items2.forEach(item=>{result.push(item),item.toLowerCase()===item?result.push(item.toUpperCase()):result.push(item.toLowerCase())}),result})(LITERALS2),built_in:BUILT_INS2},normalizeKeywords=items2=>items2. map(item=>item.replace(/\|\d+$/,"")),CONSTRUCTOR_CALL={variants:[{match:[/new/,regex.concat(WHITESPACE,"+"),regex.concat("(?!",normalizeKeywords(BUILT_INS2).join("\\b|"),"\\b)"),PASCAL_CASE_CLASS_NAME_RE],scope:{1:"keyword",4:"title.class"}}]},CONSTANT_REFERENCE=regex.concat(IDENT_RE2,"\\b(?!\\()"),LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON={variants:[{match:[regex.concat(/::/,regex.lookahead(/(?!class\b)/)),CONSTANT_REFERENCE],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.lan\ guage"}},{match:[PASCAL_CASE_CLASS_NAME_RE,regex.concat(/::/,regex.lookahead(/(?!class\b)/)),CONSTANT_REFERENCE],scope:{1:"title.class",3:"variable.constant"}},{match:[PASCAL_CASE_CLASS_NAME_RE,regex.concat("::",regex.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[PASCAL_CASE_CLASS_NAME_RE,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},NAMED_ARGUMENT={scope:"attr",match:regex.concat(IDENT_RE2,regex.lookahead(":"),regex.lookahead(/(?!::)/))},PARAMS_MODE={relevance:0,begin:/\(/, end:/\)/,keywords:KEYWORDS2,contains:[NAMED_ARGUMENT,VARIABLE,LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,hljs.C_BLOCK_COMMENT_MODE,STRING,NUMBER,CONSTRUCTOR_CALL]},FUNCTION_INVOKE={relevance:0,match:[/\b/,regex.concat("(?!fn\\b|function\\b|",normalizeKeywords(KWS).join("\\b|"),"|",normalizeKeywords(BUILT_INS2).join("\\b|"),"\\b)"),IDENT_RE2,regex.concat(WHITESPACE,"*"),regex.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[PARAMS_MODE]};PARAMS_MODE.contains.push(FUNCTION_INVOKE);const ATTRIBUTE_CONTAINS=[ NAMED_ARGUMENT,LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,hljs.C_BLOCK_COMMENT_MODE,STRING,NUMBER,CONSTRUCTOR_CALL],ATTRIBUTES2={begin:regex.concat(/#\[\s*\\?/,regex.either(PASCAL_CASE_CLASS_NAME_RE,UPCASE_NAME_RE)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:LITERALS2,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:LITERALS2,keyword:["new","array"]},contains:["self",...ATTRIBUTE_CONTAINS]},...ATTRIBUTE_CONTAINS,{scope:"meta",variants:[{match:PASCAL_CASE_CLASS_NAME_RE}, {match:UPCASE_NAME_RE}]}]};return{case_insensitive:!1,keywords:KEYWORDS2,contains:[ATTRIBUTES2,hljs.HASH_COMMENT_MODE,hljs.COMMENT("//","$"),hljs.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:hljs.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},PREPROCESSOR,{scope:"variable.language",match:/\$this\b/},VARIABLE,FUNCTION_INVOKE,LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,{match:[ /const/,/\s/,IDENT_RE2],scope:{1:"keyword",3:"variable.constant"}},CONSTRUCTOR_CALL,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},hljs.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS2,contains:["self",ATTRIBUTES2,VARIABLE,LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,hljs.C_BLOCK_COMMENT_MODE,STRING,NUMBER]}]},{scope:"class",variants:[ {beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},hljs.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[hljs.inherit(hljs.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},hljs.UNDERSCORE_TITLE_MODE]},STRING,NUMBER]}}function phpTemplate(hljs){ return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function plaintext(hljs){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function python(hljs){ const regex=hljs.regex,IDENT_RE2=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),RESERVED_WORDS=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],KEYWORDS2={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:RESERVED_WORDS,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint", "bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","\ vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},PROMPT={className:"meta",begin:/^(>>>|\.\.\.) /},SUBST={className:"subst",begin:/\{/,end:/\}/,keywords:KEYWORDS2,illegal:/#/},LITERAL_BRACKET={begin:/\{\{/,relevance:0},STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/, contains:[hljs.BACKSLASH_ESCAPE,PROMPT],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[hljs.BACKSLASH_ESCAPE,PROMPT],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[hljs.BACKSLASH_ESCAPE,PROMPT,LITERAL_BRACKET,SUBST]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[hljs.BACKSLASH_ESCAPE,PROMPT,LITERAL_BRACKET,SUBST]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/, end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[hljs.BACKSLASH_ESCAPE,LITERAL_BRACKET,SUBST]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,LITERAL_BRACKET,SUBST]},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},digitpart="[0-9](_?[0-9])*",pointfloat=`(\\b(${digitpart}))?\\.(${digitpart})|\\b(${digitpart})\\.`,lookahead2=`\\b|${RESERVED_WORDS.join("|")}`,NUMBER={className:"number",relevance:0,variants:[{begin:`\ (\\b(${digitpart})|(${pointfloat}))[eE][+-]?(${digitpart})[jJ]?(?=${lookahead2})`},{begin:`(${pointfloat})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${lookahead2})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${lookahead2})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${lookahead2})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${lookahead2})`},{begin:`\\b(${digitpart})[jJ](?=${lookahead2})`}]},COMMENT_TYPE={className:"comment",begin:regex.lookahead(/# type:/),end:/$/,keywords:KEYWORDS2,contains:[{begin:/# type:/}, {begin:/#/,end:/\b\B/,endsWithParent:!0}]},PARAMS={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS2,contains:["self",PROMPT,NUMBER,STRING,hljs.HASH_COMMENT_MODE]}]};return SUBST.contains=[STRING,NUMBER,PROMPT],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:KEYWORDS2,illegal:/(<\/|\?)|=>/,contains:[PROMPT,NUMBER,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0}, {match:/\bor\b/,scope:"keyword"},STRING,COMMENT_TYPE,hljs.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,IDENT_RE2],scope:{1:"keyword",3:"title.function"},contains:[PARAMS]},{variants:[{match:[/\bclass/,/\s+/,IDENT_RE2,/\s*/,/\(\s*/,IDENT_RE2,/\s*\)/]},{match:[/\bclass/,/\s+/,IDENT_RE2]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[NUMBER,PARAMS,STRING]}]}}function pythonRepl(hljs){return{aliases:["pycon"],contains:[{className:"\ meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function r(hljs){const regex=hljs.regex,IDENT_RE2=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,NUMBER_TYPES_RE=regex.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),OPERATORS_RE=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,PUNCTUATION_RE=regex. either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:IDENT_RE2,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c\ call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log m\ ax min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[hljs.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:regex.lookahead(regex.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param", end:/$/,contains:[{scope:"variable",variants:[{match:IDENT_RE2},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),hljs.HASH_COMMENT_MODE,{scope:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[hljs.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),hljs.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),hljs.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),hljs.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}), hljs.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),hljs.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[OPERATORS_RE,NUMBER_TYPES_RE]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,NUMBER_TYPES_RE]},{scope:{1:"punctuation",2:"number"},match:[PUNCTUATION_RE,NUMBER_TYPES_RE]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,NUMBER_TYPES_RE]}]},{scope:{3:"\ operator"},match:[IDENT_RE2,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:OPERATORS_RE},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:PUNCTUATION_RE},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function ruby(hljs){const regex=hljs.regex,RUBY_METHOD_RE="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",CLASS_NAME_RE=regex.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),CLASS_NAME_WITH_NAMESPACE_RE=regex.concat(CLASS_NAME_RE, /(::\w+)*/),RUBY_KEYWORDS={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor", "attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},YARDOCTAG={className:"doctag",begin:"@[A-Za-z]+"},IRB_OBJECT={begin:"#<",end:">"},COMMENT_MODES=[hljs.COMMENT("#","$",{contains:[YARDOCTAG]}),hljs.COMMENT("^=begin","^=end",{contains:[YARDOCTAG],relevance:10}),hljs.COMMENT("^__END__",hljs.MATCH_NOTHING_RE)],SUBST={className:"subst",begin:/#\{/,end:/\}/,keywords:RUBY_KEYWORDS},STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE, SUBST],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/}, {begin:/\B\?\\?\S/},{begin:regex.concat(/<<[-~]?'?/,regex.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[hljs.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[hljs.BACKSLASH_ESCAPE,SUBST]})]}]},decimal="[1-9](_?[0-9])*|0",digits="[0-9](_?[0-9])*",NUMBER={className:"number",relevance:0,variants:[{begin:`\\b(${decimal})(\\.(${digits}))?([eE][+-]?(${digits})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0\ -7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},PARAMS={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:RUBY_KEYWORDS}]},RUBY_DEFAULT_CONTAINS=[STRING,{variants:[{match:[/class\s+/,CLASS_NAME_WITH_NAMESPACE_RE,/\s+<\s+/,CLASS_NAME_WITH_NAMESPACE_RE]},{match:[/\b(class|module)\s+/,CLASS_NAME_WITH_NAMESPACE_RE]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:RUBY_KEYWORDS}, {match:[/(include|extend)\s+/,CLASS_NAME_WITH_NAMESPACE_RE],scope:{2:"title.class"},keywords:RUBY_KEYWORDS},{relevance:0,match:[CLASS_NAME_WITH_NAMESPACE_RE,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:CLASS_NAME_RE,scope:"title.class"},{match:[/def/,/\s+/,RUBY_METHOD_RE],scope:{1:"keyword",3:"title.function"},contains:[PARAMS]},{begin:hljs.IDENT_RE+"::"},{className:"symbol",begin:hljs.UNDERSCORE_IDENT_RE+"(!|\\?\ )?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[STRING,{begin:RUBY_METHOD_RE}],relevance:0},NUMBER,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:RUBY_KEYWORDS},{begin:"("+hljs.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[hljs.BACKSLASH_ESCAPE,SUBST],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{ begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(IRB_OBJECT,COMMENT_MODES),relevance:0}].concat(IRB_OBJECT,COMMENT_MODES);SUBST.contains=RUBY_DEFAULT_CONTAINS,PARAMS.contains=RUBY_DEFAULT_CONTAINS;const IRB_DEFAULT=[{begin:/^\s*=>/,starts:{end:"$",contains:RUBY_DEFAULT_CONTAINS}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")\ (?=[ ])",starts:{end:"$",keywords:RUBY_KEYWORDS,contains:RUBY_DEFAULT_CONTAINS}}];return COMMENT_MODES.unshift(IRB_OBJECT),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:RUBY_KEYWORDS,illegal:/\/\*/,contains:[hljs.SHEBANG({binary:"ruby"})].concat(IRB_DEFAULT).concat(COMMENT_MODES).concat(RUBY_DEFAULT_CONTAINS)}}function rust(hljs){const regex=hljs.regex,RAW_IDENTIFIER=/(r#)?/,UNDERSCORE_IDENT_RE=regex.concat(RAW_IDENTIFIER,hljs.UNDERSCORE_IDENT_RE),IDENT_RE2=regex.concat(RAW_IDENTIFIER, hljs.IDENT_RE),FUNCTION_INVOKE={className:"title.function.invoke",relevance:0,begin:regex.concat(/\b/,/(?!let|for|while|if|else|match\b)/,IDENT_RE2,regex.lookahead(/\s*\(/))},NUMBER_SUFFIX="([ui](8|16|32|64|128|size)|f(32|64))?",KEYWORDS2=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self", "static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],LITERALS2=["true","false","Some","None","Ok","Err"],BUILTINS=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!", "bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],TYPES2=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","\ bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:hljs.IDENT_RE+"!?",type:TYPES2,keyword:KEYWORDS2,literal:LITERALS2,built_in:BUILTINS},illegal:""},FUNCTION_INVOKE]}}const MODES=hljs=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:hljs.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:hljs.NUMBER_RE+"(%|em|ex|ch|rem|vw|\ vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),HTML_TAGS=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","mai\ n","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],SVG_TAGS=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset", "feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],TAGS=[...HTML_TAGS,...SVG_TAGS],MEDIA_FEATURES=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overfl\ ow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),PSEUDO_CLASSES=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-con\ text","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),PSEUDO_ELEMENTS=["after","backdrop","before","cue","cue-region","\ first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ATTRIBUTES=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animati\ on-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","b\ order-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-i\ mage-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end\ -radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation", "color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","c\ ounter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","fon\ t-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area", "grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset\ -block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","ma\ rgin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size", "min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-be\ havior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","posit\ ion","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block", "scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","sr\ c","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-pos\ ition","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","\ unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function scss(hljs){const modes2=MODES( hljs),PSEUDO_ELEMENTS$12=PSEUDO_ELEMENTS,PSEUDO_CLASSES$12=PSEUDO_CLASSES,AT_IDENTIFIER="@[a-z-]+",AT_MODIFIERS="and or not only",VARIABLE={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,modes2.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},modes2.ATTRIBUTE_SELECTOR_MODE, {className:"selector-tag",begin:"\\b("+TAGS.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+PSEUDO_CLASSES$12.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+PSEUDO_ELEMENTS$12.join("|")+")"},VARIABLE,{begin:/\(/,end:/\)/,contains:[modes2.CSS_NUMBER_MODE]},modes2.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ATTRIBUTES.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|tr\ ansparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|lef\ t|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|alw\ ays|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[modes2.BLOCK_COMMENT,VARIABLE,modes2.HEXCOLOR,modes2.CSS_NUMBER_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,modes2.IMPORTANT,modes2.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:AT_IDENTIFIER,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:AT_MODIFIERS,attribute:MEDIA_FEATURES.join(" ")},contains:[{begin:AT_IDENTIFIER,className:"\ keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},VARIABLE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,modes2.HEXCOLOR,modes2.CSS_NUMBER_MODE]},modes2.FUNCTION_DISPATCH]}}function shell(hljs){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function sql(hljs){const regex=hljs.regex,COMMENT_MODE=hljs.COMMENT("--","$"),STRING={scope:"string",variants:[ {begin:/'/,end:/'/,contains:[{match:/''/}]}]},QUOTED_IDENTIFIER={begin:/"/,end:/"/,contains:[{match:/""/}]},LITERALS2=["true","false","unknown"],MULTI_WORD_TYPES=["double precision","large object","with timezone","without timezone"],TYPES2=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],NON_RESERVED_WORDS=[ "add","asc","collation","desc","final","first","last","view"],RESERVED_WORDS=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier", "clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle", "date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant", "group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lowe\ r","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentil\ e_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","sess\ ion_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_ar\ ray","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],RESERVED_FUNCTIONS=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_va\ lue","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","std\ dev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],POSSIBLE_WITHOUT_PARENS=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],COMBOS=[ "create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],FUNCTIONS=RESERVED_FUNCTIONS,KEYWORDS2=[...RESERVED_WORDS,...NON_RESERVED_WORDS].filter(keyword2=>!RESERVED_FUNCTIONS.includes(keyword2)),VARIABLE={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},OPERATOR={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/, relevance:0},FUNCTION_CALL={match:regex.concat(/\b/,regex.either(...FUNCTIONS),/\s*\(/),relevance:0,keywords:{built_in:FUNCTIONS}};function kws_to_regex(list2){return regex.concat(/\b/,regex.either(...list2.map(kw=>kw.replace(/\s+/,"\\s+"))),/\b/)}const MULTI_WORD_KEYWORDS={scope:"keyword",match:kws_to_regex(COMBOS),relevance:0};function reduceRelevancy(list2,{exceptions,when}={}){const qualifyFn=when;return exceptions=exceptions||[],list2.map(item=>item.match(/\|\d+$/)||exceptions.includes(item)? item:qualifyFn(item)?`${item}|0`:item)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:reduceRelevancy(KEYWORDS2,{when:x=>x.length<3}),literal:LITERALS2,type:TYPES2,built_in:POSSIBLE_WITHOUT_PARENS},contains:[{scope:"type",match:kws_to_regex(MULTI_WORD_TYPES)},MULTI_WORD_KEYWORDS,FUNCTION_CALL,VARIABLE,STRING,QUOTED_IDENTIFIER,hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE,COMMENT_MODE,OPERATOR]}}function source(re2){return re2?typeof re2=="string"?re2: re2.source:null}function lookahead(re2){return concat("(?=",re2,")")}function concat(...args){return args.map(x=>source(x)).join("")}function stripOptionsFromArgs(args){const opts=args[args.length-1];return typeof opts=="object"&&opts.constructor===Object?(args.splice(args.length-1,1),opts):{}}function either(...args){return"("+(stripOptionsFromArgs(args).capture?"":"?:")+args.map(x=>source(x)).join("|")+")"}const keywordWrapper=keyword2=>concat(/\b/,keyword2,/\w$/.test(keyword2)?/\b/:/\B/),dotKeywords=[ "Protocol","Type"].map(keywordWrapper),optionalDotKeywords=["init","self"].map(keywordWrapper),keywordTypes=["Any","Self"],keywords=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect", "infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unow\ ned","var","weak","where","while","willSet"],literals=["false","nil","true"],precedencegroupKeywords=["assignment","associativity","higherThan","left","lowerThan","none","right"],numberSignKeywords=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],builtIns=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalErro\ r","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],operatorHead=either(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/, /[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),operatorCharacter=either(operatorHead,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),operator=concat(operatorHead,operatorCharacter,"*"),identifierHead=either(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/, /[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),identifierCharacter=either(identifierHead,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/), identifier=concat(identifierHead,identifierCharacter,"*"),typeIdentifier=concat(/[A-Z]/,identifierCharacter,"*"),keywordAttributes=["attached","autoclosure",concat(/convention\(/,either("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",concat(/objc\(/,identifier,/\)/),"\ objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],availabilityKeywords=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function swift(hljs){const WHITESPACE={match:/\s+/,relevance:0},BLOCK_COMMENT=hljs. COMMENT("/\\*","\\*/",{contains:["self"]}),COMMENTS=[hljs.C_LINE_COMMENT_MODE,BLOCK_COMMENT],DOT_KEYWORD={match:[/\./,either(...dotKeywords,...optionalDotKeywords)],className:{2:"keyword"}},KEYWORD_GUARD={match:concat(/\./,either(...keywords)),relevance:0},PLAIN_KEYWORDS=keywords.filter(kw=>typeof kw=="string").concat(["_|0"]),REGEX_KEYWORDS=keywords.filter(kw=>typeof kw!="string").concat(keywordTypes).map(keywordWrapper),KEYWORD={variants:[{className:"keyword",match:either(...REGEX_KEYWORDS,...optionalDotKeywords)}]}, KEYWORDS2={$pattern:either(/\b\w+/,/#\w+/),keyword:PLAIN_KEYWORDS.concat(numberSignKeywords),literal:literals},KEYWORD_MODES=[DOT_KEYWORD,KEYWORD_GUARD,KEYWORD],BUILT_IN_GUARD={match:concat(/\./,either(...builtIns)),relevance:0},BUILT_IN={className:"built_in",match:concat(/\b/,either(...builtIns),/(?=\()/)},BUILT_INS2=[BUILT_IN_GUARD,BUILT_IN],OPERATOR_GUARD={match:/->/,relevance:0},OPERATOR={className:"operator",relevance:0,variants:[{match:operator},{match:`\\.(\\.|${operatorCharacter})+`}]},OPERATORS=[ OPERATOR_GUARD,OPERATOR],decimalDigits2="([0-9]_*)+",hexDigits2="([0-9a-fA-F]_*)+",NUMBER={className:"number",relevance:0,variants:[{match:`\\b(${decimalDigits2})(\\.(${decimalDigits2}))?([eE][+-]?(${decimalDigits2}))?\\b`},{match:`\\b0x(${hexDigits2})(\\.(${hexDigits2}))?([pP][+-]?(${decimalDigits2}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},ESCAPED_CHARACTER=(rawDelimiter="")=>({className:"subst",variants:[{match:concat(/\\/,rawDelimiter,/[0\\tnr"']/)},{match:concat(/\\/,rawDelimiter, /u\{[0-9a-fA-F]{1,8}\}/)}]}),ESCAPED_NEWLINE=(rawDelimiter="")=>({className:"subst",match:concat(/\\/,rawDelimiter,/[\t ]*(?:[\r\n]|\r\n)/)}),INTERPOLATION=(rawDelimiter="")=>({className:"subst",label:"interpol",begin:concat(/\\/,rawDelimiter,/\(/),end:/\)/}),MULTILINE_STRING=(rawDelimiter="")=>({begin:concat(rawDelimiter,/"""/),end:concat(/"""/,rawDelimiter),contains:[ESCAPED_CHARACTER(rawDelimiter),ESCAPED_NEWLINE(rawDelimiter),INTERPOLATION(rawDelimiter)]}),SINGLE_LINE_STRING=(rawDelimiter="")=>({ begin:concat(rawDelimiter,/"/),end:concat(/"/,rawDelimiter),contains:[ESCAPED_CHARACTER(rawDelimiter),INTERPOLATION(rawDelimiter)]}),STRING={className:"string",variants:[MULTILINE_STRING(),MULTILINE_STRING("#"),MULTILINE_STRING("##"),MULTILINE_STRING("###"),SINGLE_LINE_STRING(),SINGLE_LINE_STRING("#"),SINGLE_LINE_STRING("##"),SINGLE_LINE_STRING("###")]},REGEXP_CONTENTS=[hljs.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[hljs.BACKSLASH_ESCAPE]}],BARE_REGEXP_LITERAL={begin:/\/[^\s](?=[^/\n]*\/)/, end:/\//,contains:REGEXP_CONTENTS},EXTENDED_REGEXP_LITERAL=rawDelimiter=>{const begin=concat(rawDelimiter,/\//),end=concat(/\//,rawDelimiter);return{begin,end,contains:[...REGEXP_CONTENTS,{scope:"comment",begin:`#(?!.*${end})`,end:/$/}]}},REGEXP2={scope:"regexp",variants:[EXTENDED_REGEXP_LITERAL("###"),EXTENDED_REGEXP_LITERAL("##"),EXTENDED_REGEXP_LITERAL("#"),BARE_REGEXP_LITERAL]},QUOTED_IDENTIFIER={match:concat(/`/,identifier,/`/)},IMPLICIT_PARAMETER={className:"variable",match:/\$\d+/},PROPERTY_WRAPPER_PROJECTION={ className:"variable",match:`\\$${identifierCharacter}+`},IDENTIFIERS=[QUOTED_IDENTIFIER,IMPLICIT_PARAMETER,PROPERTY_WRAPPER_PROJECTION],AVAILABLE_ATTRIBUTE={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:availabilityKeywords,contains:[...OPERATORS,NUMBER,STRING]}]}},KEYWORD_ATTRIBUTE={scope:"keyword",match:concat(/@/,either(...keywordAttributes),lookahead(either(/\(/,/\s+/)))},USER_DEFINED_ATTRIBUTE={scope:"meta",match:concat(/@/,identifier)},ATTRIBUTES2=[ AVAILABLE_ATTRIBUTE,KEYWORD_ATTRIBUTE,USER_DEFINED_ATTRIBUTE],TYPE={match:lookahead(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:concat(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,identifierCharacter,"+")},{className:"type",match:typeIdentifier,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:concat(/\s+&\s+/,lookahead(typeIdentifier)),relevance:0}]},GENERIC_ARGUMENTS={begin://,keywords:KEYWORDS2,contains:[...COMMENTS,...KEYWORD_MODES, ...ATTRIBUTES2,OPERATOR_GUARD,TYPE]};TYPE.contains.push(GENERIC_ARGUMENTS);const TUPLE_ELEMENT_NAME={match:concat(identifier,/\s*:/),keywords:"_|0",relevance:0},TUPLE={begin:/\(/,end:/\)/,relevance:0,keywords:KEYWORDS2,contains:["self",TUPLE_ELEMENT_NAME,...COMMENTS,REGEXP2,...KEYWORD_MODES,...BUILT_INS2,...OPERATORS,NUMBER,STRING,...IDENTIFIERS,...ATTRIBUTES2,TYPE]},GENERIC_PARAMETERS={begin://,keywords:"repeat each",contains:[...COMMENTS,TYPE]},FUNCTION_PARAMETER_NAME={begin:either(lookahead( concat(identifier,/\s*:/)),lookahead(concat(identifier,/\s+/,identifier,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:identifier}]},FUNCTION_PARAMETERS={begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:[FUNCTION_PARAMETER_NAME,...COMMENTS,...KEYWORD_MODES,...OPERATORS,NUMBER,STRING,...ATTRIBUTES2,TYPE,TUPLE],endsParent:!0,illegal:/["']/},FUNCTION_OR_MACRO={match:[/(func|macro)/,/\s+/,either(QUOTED_IDENTIFIER.match,identifier,operator)],className:{ 1:"keyword",3:"title.function"},contains:[GENERIC_PARAMETERS,FUNCTION_PARAMETERS,WHITESPACE],illegal:[/\[/,/%/]},INIT_SUBSCRIPT={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[GENERIC_PARAMETERS,FUNCTION_PARAMETERS,WHITESPACE],illegal:/\[|%/},OPERATOR_DECLARATION={match:[/operator/,/\s+/,operator],className:{1:"keyword",3:"title"}},PRECEDENCEGROUP={begin:[/precedencegroup/,/\s+/,typeIdentifier],className:{1:"keyword",3:"title"},contains:[TYPE],keywords:[...precedencegroupKeywords, ...literals],end:/}/},CLASS_FUNC_DECLARATION={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},CLASS_VAR_DECLARATION={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},TYPE_DECLARATION={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,identifier,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:KEYWORDS2,contains:[GENERIC_PARAMETERS,...KEYWORD_MODES,{begin:/:/,end:/\{/,keywords:KEYWORDS2,contains:[ {scope:"title.class.inherited",match:typeIdentifier},...KEYWORD_MODES],relevance:0}]};for(const variant of STRING.variants){const interpolation=variant.contains.find(mode=>mode.label==="interpol");interpolation.keywords=KEYWORDS2;const submodes=[...KEYWORD_MODES,...BUILT_INS2,...OPERATORS,NUMBER,STRING,...IDENTIFIERS];interpolation.contains=[...submodes,{begin:/\(/,end:/\)/,contains:["self",...submodes]}]}return{name:"Swift",keywords:KEYWORDS2,contains:[...COMMENTS,FUNCTION_OR_MACRO,INIT_SUBSCRIPT, CLASS_FUNC_DECLARATION,CLASS_VAR_DECLARATION,TYPE_DECLARATION,OPERATOR_DECLARATION,PRECEDENCEGROUP,{beginKeywords:"import",end:/$/,contains:[...COMMENTS],relevance:0},REGEXP2,...KEYWORD_MODES,...BUILT_INS2,...OPERATORS,NUMBER,STRING,...IDENTIFIERS,...ATTRIBUTES2,TYPE,TUPLE]}}const IDENT_RE="[A-Za-z$_][0-9A-Za-z$_]*",KEYWORDS=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","\ continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],LITERALS=["true","false","null","undefined","NaN","Infinity"],TYPES=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","A\ rrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ERROR_TYPES=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],BUILT_IN_GLOBALS=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","une\ scape"],BUILT_IN_VARIABLES=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],BUILT_INS=[].concat(BUILT_IN_GLOBALS,TYPES,ERROR_TYPES);function javascript(hljs){const regex=hljs.regex,hasClosingTag=(match,{after})=>{const tag="",end:""},XML_SELF_CLOSING=/<[A-Za-z0-9\\._:-]+\s*\/>/,XML_TAG={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/, isTrulyOpeningTag:(match,response)=>{const afterMatchIndex=match[0].length+match.index,nextChar=match.input[afterMatchIndex];if(nextChar==="<"||nextChar===","){response.ignoreMatch();return}nextChar===">"&&(hasClosingTag(match,{after:afterMatchIndex})||response.ignoreMatch());let m;const afterMatch=match.input.substring(afterMatchIndex);if(m=afterMatch.match(/^\s*=/)){response.ignoreMatch();return}if((m=afterMatch.match(/^\s+extends\s+/))&&m.index===0){response.ignoreMatch();return}}},KEYWORDS$12={ $pattern:IDENT_RE,keyword:KEYWORDS,literal:LITERALS,built_in:BUILT_INS,"variable.language":BUILT_IN_VARIABLES},decimalDigits2="[0-9](_?[0-9])*",frac2=`\\.(${decimalDigits2})`,decimalInteger="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",NUMBER={className:"number",variants:[{begin:`(\\b(${decimalInteger})((${frac2})|\\.)?|(${frac2}))[eE][+-]?(${decimalDigits2})\\b`},{begin:`\\b(${decimalInteger})\\b((${frac2})\\b|\\.)?|(${frac2})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a\ -fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},SUBST={className:"subst",begin:"\\$\\{",end:"\\}",keywords:KEYWORDS$12,contains:[]},HTML_TEMPLATE={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"xml"}},CSS_TEMPLATE={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"css"}},GRAPHQL_TEMPLATE={begin:".?gql`", end:"",starts:{end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"graphql"}},TEMPLATE_STRING={className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE,SUBST]},COMMENT={className:"comment",variants:[hljs.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:IDENT_RE$12+"\ (?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),hljs.C_BLOCK_COMMENT_MODE,hljs.C_LINE_COMMENT_MODE]},SUBST_INTERNALS=[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,HTML_TEMPLATE,CSS_TEMPLATE,GRAPHQL_TEMPLATE,TEMPLATE_STRING,{match:/\$\d+/},NUMBER];SUBST.contains=SUBST_INTERNALS.concat({begin:/\{/,end:/\}/,keywords:KEYWORDS$12,contains:["self"].concat(SUBST_INTERNALS)});const SUBST_AND_COMMENTS=[].concat(COMMENT,SUBST.contains),PARAMS_CONTAINS=SUBST_AND_COMMENTS.concat( [{begin:/(\s*)\(/,end:/\)/,keywords:KEYWORDS$12,contains:["self"].concat(SUBST_AND_COMMENTS)}]),PARAMS={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS$12,contains:PARAMS_CONTAINS},CLASS_OR_EXTENDS={variants:[{match:[/class/,/\s+/,IDENT_RE$12,/\s+/,/extends/,/\s+/,regex.concat(IDENT_RE$12,"(",regex.concat(/\./,IDENT_RE$12),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,IDENT_RE$12],scope:{1:"keyw\ ord",3:"title.class"}}]},CLASS_REFERENCE={relevance:0,match:regex.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...TYPES,...ERROR_TYPES]}},USE_STRICT={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},FUNCTION_DEFINITION={variants:[{match:[/function/,/\s+/,IDENT_RE$12,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{ 1:"keyword",3:"title.function"},label:"func.def",contains:[PARAMS],illegal:/%/},UPPER_CASE_CONSTANT={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function noneOf(list2){return regex.concat("(?!",list2.join("|"),")")}const FUNCTION_CALL={match:regex.concat(/\b/,noneOf([...BUILT_IN_GLOBALS,"super","import"].map(x=>`${x}\\s*\\(`)),IDENT_RE$12,regex.lookahead(/\s*\(/)),className:"title.function",relevance:0},PROPERTY_ACCESS={begin:regex.concat(/\./,regex.lookahead(regex.concat( IDENT_RE$12,/(?![0-9A-Za-z$_(])/))),end:IDENT_RE$12,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},GETTER_OR_SETTER={match:[/get|set/,/\s+/,IDENT_RE$12,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},PARAMS]},FUNC_LEAD_IN_RE="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+hljs.UNDERSCORE_IDENT_RE+")\\s*=>",FUNCTION_VARIABLE={match:[/const|var|let/,/\s+/,IDENT_RE$12,/\s*/,/=\s*/,/(async\s*)?/,regex.lookahead(FUNC_LEAD_IN_RE)],keywords:"\ async",className:{1:"keyword",3:"title.function"},contains:[PARAMS]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:KEYWORDS$12,exports:{PARAMS_CONTAINS,CLASS_REFERENCE},illegal:/#(?![$_A-z])/,contains:[hljs.SHEBANG({label:"shebang",binary:"node",relevance:5}),USE_STRICT,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,HTML_TEMPLATE,CSS_TEMPLATE,GRAPHQL_TEMPLATE,TEMPLATE_STRING,COMMENT,{match:/\$\d+/},NUMBER,CLASS_REFERENCE,{scope:"attr",match:IDENT_RE$12+regex.lookahead(":"),relevance:0}, FUNCTION_VARIABLE,{begin:"("+hljs.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[COMMENT,hljs.REGEXP_MODE,{className:"function",begin:FUNC_LEAD_IN_RE,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:hljs.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS$12,contains:PARAMS_CONTAINS}]}]},{begin:/,/,relevance:0},{match:/\s+/, relevance:0},{variants:[{begin:FRAGMENT.begin,end:FRAGMENT.end},{match:XML_SELF_CLOSING},{begin:XML_TAG.begin,"on:begin":XML_TAG.isTrulyOpeningTag,end:XML_TAG.end}],subLanguage:"xml",contains:[{begin:XML_TAG.begin,end:XML_TAG.end,skip:!0,contains:["self"]}]}]},FUNCTION_DEFINITION,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+hljs.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[PARAMS,hljs.inherit( hljs.TITLE_MODE,{begin:IDENT_RE$12,className:"title.function"})]},{match:/\.\.\./,relevance:0},PROPERTY_ACCESS,{match:"\\$"+IDENT_RE$12,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[PARAMS]},FUNCTION_CALL,UPPER_CASE_CONSTANT,CLASS_OR_EXTENDS,GETTER_OR_SETTER,{match:/\$[(.]/}]}}function typescript(hljs){const regex=hljs.regex,tsLanguage=javascript(hljs),IDENT_RE$12=IDENT_RE,TYPES2=["any","void","number","boolean","string","object","never","symbol","bigint", "unknown"],NAMESPACE={begin:[/namespace/,/\s+/,hljs.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},INTERFACE={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:TYPES2},contains:[tsLanguage.exports.CLASS_REFERENCE]},USE_STRICT={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},TS_SPECIFIC_KEYWORDS=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],KEYWORDS$12={ $pattern:IDENT_RE,keyword:KEYWORDS.concat(TS_SPECIFIC_KEYWORDS),literal:LITERALS,built_in:BUILT_INS.concat(TYPES2),"variable.language":BUILT_IN_VARIABLES},DECORATOR={className:"meta",begin:"@"+IDENT_RE$12},swapMode=(mode,label,replacement)=>{const indx=mode.contains.findIndex(m=>m.label===label);if(indx===-1)throw new Error("can not find mode to replace");mode.contains.splice(indx,1,replacement)};Object.assign(tsLanguage.keywords,KEYWORDS$12),tsLanguage.exports.PARAMS_CONTAINS.push(DECORATOR);const ATTRIBUTE_HIGHLIGHT=tsLanguage. contains.find(c2=>c2.scope==="attr"),OPTIONAL_KEY_OR_ARGUMENT=Object.assign({},ATTRIBUTE_HIGHLIGHT,{match:regex.concat(IDENT_RE$12,regex.lookahead(/\s*\?:/))});tsLanguage.exports.PARAMS_CONTAINS.push([tsLanguage.exports.CLASS_REFERENCE,ATTRIBUTE_HIGHLIGHT,OPTIONAL_KEY_OR_ARGUMENT]),tsLanguage.contains=tsLanguage.contains.concat([DECORATOR,NAMESPACE,INTERFACE,OPTIONAL_KEY_OR_ARGUMENT]),swapMode(tsLanguage,"shebang",hljs.SHEBANG()),swapMode(tsLanguage,"use_strict",USE_STRICT);const functionDeclaration=tsLanguage. contains.find(m=>m.label==="func.def");return functionDeclaration.relevance=0,Object.assign(tsLanguage,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),tsLanguage}function vbnet(hljs){const regex=hljs.regex,CHARACTER={className:"string",begin:/"(""|[^/n])"C\b/},STRING={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},MM_DD_YYYY=/\d{1,2}\/\d{1,2}\/\d{4}/,YYYY_MM_DD=/\d{4}-\d{1,2}-\d{1,2}/,TIME_12H=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,TIME_24H=/\d{1,2}(:\d{1,2}){1,2}/,DATE2={ className:"literal",variants:[{begin:regex.concat(/# */,regex.either(YYYY_MM_DD,MM_DD_YYYY),/ *#/)},{begin:regex.concat(/# */,TIME_24H,/ *#/)},{begin:regex.concat(/# */,TIME_12H,/ *#/)},{begin:regex.concat(/# */,regex.either(YYYY_MM_DD,MM_DD_YYYY),/ +/,regex.either(TIME_12H,TIME_24H),/ *#/)}]},NUMBER={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/}, {begin:/&B[01_]+((U?[SIL])|[%&])?/}]},LABEL={className:"label",begin:/^\w+:/},DOC_COMMENT=hljs.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),COMMENT=hljs.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue cust\ om declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public \ raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byt\ e char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[CHARACTER,STRING,DATE2,NUMBER,LABEL,DOC_COMMENT,COMMENT,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[COMMENT]}]}}function wasm(hljs){hljs.regex;const BLOCK_COMMENT=hljs. COMMENT(/\(;/,/;\)/);BLOCK_COMMENT.contains.push("self");const LINE_COMMENT=hljs.COMMENT(/;;/,/$/),KWS=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","\ then","type","unreachable"],FUNCTION_REFERENCE={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},ARGUMENT={className:"variable",begin:/\$[\w_]+/},PARENS={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},NUMBER={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/}, TYPE={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},MATH_OPERATIONS={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/}; return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:KWS},contains:[LINE_COMMENT,BLOCK_COMMENT,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},ARGUMENT,PARENS,FUNCTION_REFERENCE,hljs.QUOTE_STRING_MODE,TYPE,MATH_OPERATIONS,NUMBER]}}function xml$1(hljs){const regex=hljs.regex,TAG_NAME_RE=regex.concat(/[\p{L}_]/u,regex.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),XML_IDENT_RE=/[\p{L}0-9._:-]+/u,XML_ENTITIES={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/}, XML_META_KEYWORDS={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},XML_META_PAR_KEYWORDS=hljs.inherit(XML_META_KEYWORDS,{begin:/\(/,end:/\)/}),APOS_META_STRING_MODE=hljs.inherit(hljs.APOS_STRING_MODE,{className:"string"}),QUOTE_META_STRING_MODE=hljs.inherit(hljs.QUOTE_STRING_MODE,{className:"string"}),TAG_INTERNALS={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[XML_META_KEYWORDS,QUOTE_META_STRING_MODE,APOS_META_STRING_MODE,XML_META_PAR_KEYWORDS,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[XML_META_KEYWORDS,XML_META_PAR_KEYWORDS,QUOTE_META_STRING_MODE,APOS_META_STRING_MODE]}]}]},hljs.COMMENT(//,{relevance:10}),{begin://,relevance:10},XML_ENTITIES,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[QUOTE_META_STRING_MODE]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[TAG_INTERNALS],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}}, {className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[TAG_INTERNALS],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:regex.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:TAG_NAME_RE,relevance:0,starts:TAG_INTERNALS}]},{className:"tag",begin:regex.concat(/<\//,regex.lookahead(regex.concat(TAG_NAME_RE, />/))),contains:[{className:"name",begin:TAG_NAME_RE,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function yaml(hljs){const LITERALS2="true false yes no null",URI_CHARACTERS="[\\w#;/?:@&=+$,.~*'()[\\]]+",KEY={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},TEMPLATE_VARIABLES={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},SINGLE_QUOTE_STRING={ className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},STRING={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[hljs.BACKSLASH_ESCAPE,TEMPLATE_VARIABLES]},CONTAINER_STRING=hljs.inherit(STRING,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),TIMESTAMP={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2}\ )?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},VALUE_CONTAINER={end:",",endsWithParent:!0,excludeEnd:!0,keywords:LITERALS2,relevance:0},OBJECT2={begin:/\{/,end:/\}/,contains:[VALUE_CONTAINER],illegal:"\\n",relevance:0},ARRAY2={begin:"\\[",end:"\\]",contains:[VALUE_CONTAINER],illegal:"\\n",relevance:0},MODES2=[KEY,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"\ [%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+URI_CHARACTERS},{className:"type",begin:"!<"+URI_CHARACTERS+">"},{className:"type",begin:"!"+URI_CHARACTERS},{className:"type",begin:"!!"+URI_CHARACTERS},{className:"meta",begin:"&"+hljs.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+hljs.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},hljs.HASH_COMMENT_MODE,{beginKeywords:LITERALS2,keywords:{literal:LITERALS2}}, TIMESTAMP,{className:"number",begin:hljs.C_NUMBER_RE+"\\b",relevance:0},OBJECT2,ARRAY2,SINGLE_QUOTE_STRING,STRING],VALUE_MODES=[...MODES2];return VALUE_MODES.pop(),VALUE_MODES.push(CONTAINER_STRING),VALUE_CONTAINER.contains=VALUE_MODES,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:MODES2}}const grammars$1={arduino,bash,c,cpp,csharp,css,diff,go,graphql,ini,java,javascript:javascript$1,json,kotlin,less,lua,makefile,markdown,objectivec,perl,php,"php-template":phpTemplate,plaintext,python, "python-repl":pythonRepl,r,ruby,rust,scss,shell,sql,swift,typescript,vbnet,wasm,xml:xml$1,yaml},grammars={...grammars$1,"1c":_1c,abnf,accesslog,actionscript,ada,angelscript,apache,applescript,arcade,armasm,asciidoc,aspectj,autohotkey,autoit,avrasm,awk,axapta,basic,bnf,brainfuck,cal,capnproto,ceylon,clean,clojure,"clojure-repl":clojureRepl,cmake,coffeescript,coq,cos,crmsh,crystal,csp,d,dart,delphi,django,dns,dockerfile,dos,dsconfig,dts,dust,ebnf,elixir,elm,erb,erlang,"erlang-repl":erlangRepl,excel, fix,flix,fortran,fsharp,gams,gauss,gcode,gherkin,glsl,gml,golo,gradle,groovy,haml,handlebars,haskell,haxe,hsp,http,hy,inform7,irpf90,isbl,"jboss-cli":jbossCli,julia,"julia-repl":juliaRepl,lasso,latex,ldif,leaf,lisp,livecodeserver,livescript,llvm,lsl,mathematica,matlab,maxima,mel,mercury,mipsasm,mizar,mojolicious,monkey,moonscript,n1ql,nestedtext,nginx,nim,nix,"node-repl":nodeRepl,nsis,ocaml,openscad,oxygene,parser3,pf,pgsql,pony,powershell,processing,profile,prolog,properties,protobuf,puppet,purebasic, q,qml,reasonml,rib,roboconf,routeros,rsl,ruleslanguage,sas,scala,scheme,scilab,smali,smalltalk,sml,sqf,stan,stata,step21,stylus,subunit,taggerscript,tap,tcl,thrift,tp,twig,vala,vbscript,"vbscript-html":vbscriptHtml,verilog,vhdl,vim,wren,x86asm,xl,xquery,zephir};var coreExports=requireCore$4();const HighlightJS=getDefaultExportFromCjs(coreExports),emptyOptions$4={},defaultPrefix="hljs-";function createLowlight(grammars2){const high=HighlightJS.newInstance();return grammars2&®ister(grammars2),{ highlight,highlightAuto,listLanguages,register,registerAlias,registered};function highlight(language2,value,options){const settings=options||emptyOptions$4,prefix=typeof settings.prefix=="string"?settings.prefix:defaultPrefix;if(!high.getLanguage(language2))throw new Error("Unknown language: `"+language2+"` is not registered");high.configure({__emitter:HastEmitter,classPrefix:prefix});const result=high.highlight(value,{ignoreIllegals:!0,language:language2});if(result.errorRaised)throw new Error( "Could not highlight with `Highlight.js`",{cause:result.errorRaised});const root2=result._emitter.root,data=root2.data;return data.language=result.language,data.relevance=result.relevance,root2}function highlightAuto(value,options){const subset=(options||emptyOptions$4).subset||listLanguages();let index2=-1,relevance=0,result;for(;++index2relevance&&(relevance=current2.data.relevance,result=current2)}return result||{type:"root",children:[],data:{language:void 0,relevance}}}function listLanguages(){return high.listLanguages()}function register(grammarsOrName,grammar){if(typeof grammarsOrName=="string")high.registerLanguage(grammarsOrName,grammar);else{let name;for(name in grammarsOrName)Object.hasOwn(grammarsOrName,name)&&high.registerLanguage(name,grammarsOrName[name])}}function registerAlias(aliasesOrName,alias){ if(typeof aliasesOrName=="string")high.registerAliases(typeof alias=="string"?alias:[...alias],{languageName:aliasesOrName});else{let key2;for(key2 in aliasesOrName)if(Object.hasOwn(aliasesOrName,key2)){const aliases=aliasesOrName[key2];high.registerAliases(typeof aliases=="string"?aliases:[...aliases],{languageName:key2})}}}function registered(aliasOrName){return!!high.getLanguage(aliasOrName)}}class HastEmitter{constructor(options){this.options=options,this.root={type:"root",children:[],data:{ language:void 0,relevance:0}},this.stack=[this.root]}addText(value){if(value==="")return;const current2=this.stack[this.stack.length-1],tail=current2.children[current2.children.length-1];tail&&tail.type==="text"?tail.value+=value:current2.children.push({type:"text",value})}startScope(rawName){this.openNode(String(rawName))}endScope(){this.closeNode()}__addSublanguage(other,name){const current2=this.stack[this.stack.length-1],results=other.root.children;name?current2.children.push({type:"element", tagName:"span",properties:{className:[name]},children:results}):current2.children.push(...results)}openNode(name){const self2=this,className=name.split(".").map(function(d2,i){return i?d2+"_".repeat(i):self2.options.classPrefix+d2}),current2=this.stack[this.stack.length-1],child2={type:"element",tagName:"span",properties:{className},children:[]};current2.children.push(child2),this.stack.push(child2)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const emptyOptions$3={};function rehypeHighlight(options){ const settings=options||emptyOptions$3,aliases=settings.aliases,detect=settings.detect||!1,languages=settings.languages||grammars$1,plainText=settings.plainText,prefix=settings.prefix,subset=settings.subset;let name="hljs";const lowlight=createLowlight(languages);if(aliases&&lowlight.registerAlias(aliases),prefix){const pos=prefix.indexOf("-");name=pos===-1?prefix:prefix.slice(0,pos)}return function(tree,file){visit(tree,"element",function(node2,_,parent){if(node2.tagName!=="code"||!parent||parent. type!=="element"||parent.tagName!=="pre")return;const lang=language(node2);if(lang===!1||!lang&&!detect||lang&&plainText&&plainText.includes(lang))return;Array.isArray(node2.properties.className)||(node2.properties.className=[]),node2.properties.className.includes(name)||node2.properties.className.unshift(name);const text2=toText(node2,{whitespace:"pre"});let result;try{result=lang?lowlight.highlight(lang,text2,{prefix}):lowlight.highlightAuto(text2,{prefix,subset})}catch(error2){const cause=error2; if(lang&&/Unknown language/.test(cause.message)){file.message("Cannot highlight as `"+lang+"`, it’s not registered",{ancestors:[parent,node2],cause,place:node2.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw cause}!lang&&result.data&&result.data.language&&node2.properties.className.push("language-"+result.data.language),result.children.length>0&&(node2.children=result.children)})}}function language(node2){const list2=node2.properties.className;let index2=-1;if(!Array. isArray(list2))return;let name;for(;++index20&&(properties2.className=["language-"+language2[0]]);let result={type:"element",tagName:"code",properties:properties2,children:[{type:"text",value}]};return node2.meta&&(result.data={meta:node2.meta}),state2.patch(node2,result),result=state2.applyData(node2,result),result={type:"element",tagName:"pre",properties:{},children:[result]},state2.patch(node2,result),result}function strikethrough(state2,node2){const result={ type:"element",tagName:"del",properties:{},children:state2.all(node2)};return state2.patch(node2,result),state2.applyData(node2,result)}function emphasis(state2,node2){const result={type:"element",tagName:"em",properties:{},children:state2.all(node2)};return state2.patch(node2,result),state2.applyData(node2,result)}function footnoteReference(state2,node2){const clobberPrefix=typeof state2.options.clobberPrefix=="string"?state2.options.clobberPrefix:"user-content-",id2=String(node2.identifier).toUpperCase(), safeId=normalizeUri(id2.toLowerCase()),index2=state2.footnoteOrder.indexOf(id2);let counter,reuseCounter=state2.footnoteCounts.get(id2);reuseCounter===void 0?(reuseCounter=0,state2.footnoteOrder.push(id2),counter=state2.footnoteOrder.length):counter=index2+1,reuseCounter+=1,state2.footnoteCounts.set(id2,reuseCounter);const link2={type:"element",tagName:"a",properties:{href:"#"+clobberPrefix+"fn-"+safeId,id:clobberPrefix+"fnref-"+safeId+(reuseCounter>1?"-"+reuseCounter:""),dataFootnoteRef:!0,ariaDescribedBy:[ "footnote-label"]},children:[{type:"text",value:String(counter)}]};state2.patch(node2,link2);const sup2={type:"element",tagName:"sup",properties:{},children:[link2]};return state2.patch(node2,sup2),state2.applyData(node2,sup2)}function heading(state2,node2){const result={type:"element",tagName:"h"+node2.depth,properties:{},children:state2.all(node2)};return state2.patch(node2,result),state2.applyData(node2,result)}function html$4(state2,node2){if(state2.options.allowDangerousHtml){const result={ type:"raw",value:node2.value};return state2.patch(node2,result),state2.applyData(node2,result)}}function revert(state2,node2){const subtype=node2.referenceType;let suffix="]";if(subtype==="collapsed"?suffix+="[]":subtype==="full"&&(suffix+="["+(node2.label||node2.identifier)+"]"),node2.type==="imageReference")return[{type:"text",value:"!["+node2.alt+suffix}];const contents=state2.all(node2),head2=contents[0];head2&&head2.type==="text"?head2.value="["+head2.value:contents.unshift({type:"text",value:"\ ["});const tail=contents[contents.length-1];return tail&&tail.type==="text"?tail.value+=suffix:contents.push({type:"text",value:suffix}),contents}function imageReference(state2,node2){const id2=String(node2.identifier).toUpperCase(),definition2=state2.definitionById.get(id2);if(!definition2)return revert(state2,node2);const properties2={src:normalizeUri(definition2.url||""),alt:node2.alt};definition2.title!==null&&definition2.title!==void 0&&(properties2.title=definition2.title);const result={type:"\ element",tagName:"img",properties:properties2,children:[]};return state2.patch(node2,result),state2.applyData(node2,result)}function image(state2,node2){const properties2={src:normalizeUri(node2.url)};node2.alt!==null&&node2.alt!==void 0&&(properties2.alt=node2.alt),node2.title!==null&&node2.title!==void 0&&(properties2.title=node2.title);const result={type:"element",tagName:"img",properties:properties2,children:[]};return state2.patch(node2,result),state2.applyData(node2,result)}function inlineCode(state2,node2){ const text2={type:"text",value:node2.value.replace(/\r?\n|\r/g," ")};state2.patch(node2,text2);const result={type:"element",tagName:"code",properties:{},children:[text2]};return state2.patch(node2,result),state2.applyData(node2,result)}function linkReference(state2,node2){const id2=String(node2.identifier).toUpperCase(),definition2=state2.definitionById.get(id2);if(!definition2)return revert(state2,node2);const properties2={href:normalizeUri(definition2.url||"")};definition2.title!==null&&definition2. title!==void 0&&(properties2.title=definition2.title);const result={type:"element",tagName:"a",properties:properties2,children:state2.all(node2)};return state2.patch(node2,result),state2.applyData(node2,result)}function link(state2,node2){const properties2={href:normalizeUri(node2.url)};node2.title!==null&&node2.title!==void 0&&(properties2.title=node2.title);const result={type:"element",tagName:"a",properties:properties2,children:state2.all(node2)};return state2.patch(node2,result),state2.applyData( node2,result)}function listItem(state2,node2,parent){const results=state2.all(node2),loose=parent?listLoose(parent):listItemLoose(node2),properties2={},children=[];if(typeof node2.checked=="boolean"){const head2=results[0];let paragraph2;head2&&head2.type==="element"&&head2.tagName==="p"?paragraph2=head2:(paragraph2={type:"element",tagName:"p",properties:{},children:[]},results.unshift(paragraph2)),paragraph2.children.length>0&¶graph2.children.unshift({type:"text",value:" "}),paragraph2.children. unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:node2.checked,disabled:!0},children:[]}),properties2.className=["task-list-item"]}let index2=-1;for(;++index21}function list(state2,node2){const properties2={}, results=state2.all(node2);let index2=-1;for(typeof node2.start=="number"&&node2.start!==1&&(properties2.start=node2.start);++index20&&typeof point3.column=="number"&&point3.column>0)return{line:point3.line,column:point3.column,offset:typeof point3.offset=="number"&&point3.offset>-1?point3.offset:void 0}}} function position(node2){const start2=pointStart(node2),end=pointEnd(node2);if(start2&&end)return{start:start2,end}}function table(state2,node2){const rows=state2.all(node2),firstRow=rows.shift(),tableContent=[];if(firstRow){const head2={type:"element",tagName:"thead",properties:{},children:state2.wrap([firstRow],!0)};state2.patch(node2.children[0],head2),tableContent.push(head2)}if(rows.length>0){const body2={type:"element",tagName:"tbody",properties:{},children:state2.wrap(rows,!0)},start2=pointStart( node2.children[1]),end=pointEnd(node2.children[node2.children.length-1]);start2&&end&&(body2.position={start:start2,end}),tableContent.push(body2)}const result={type:"element",tagName:"table",properties:{},children:state2.wrap(tableContent,!0)};return state2.patch(node2,result),state2.applyData(node2,result)}function tableRow(state2,node2,parent){const siblings2=parent?parent.children:void 0,tagName=(siblings2?siblings2.indexOf(node2):1)===0?"th":"td",align=parent&&parent.type==="table"?parent.align: void 0,length=align?align.length:node2.children.length;let cellIndex=-1;const cells2=[];for(;++cellIndex0, !0),match[0]),last=match.index+match[0].length,match=search2.exec(source2);return lines.push(trimLine(source2.slice(last),last>0,!1)),lines.join("")}function trimLine(value,start2,end){let startIndex=0,endIndex=value.length;if(start2){let code2=value.codePointAt(startIndex);for(;code2===tab||code2===space;)startIndex++,code2=value.codePointAt(startIndex)}if(end){let code2=value.codePointAt(endIndex-1);for(;code2===tab||code2===space;)endIndex--,code2=value.codePointAt(endIndex-1)}return endIndex> startIndex?value.slice(startIndex,endIndex):""}function text$2(state2,node2){const result={type:"text",value:trimLines(String(node2.value))};return state2.patch(node2,result),state2.applyData(node2,result)}function thematicBreak(state2,node2){const result={type:"element",tagName:"hr",properties:{},children:[]};return state2.patch(node2,result),state2.applyData(node2,result)}const handlers={blockquote,break:hardBreak,code,delete:strikethrough,emphasis,footnoteReference,heading,html:html$4,imageReference, image,inlineCode,linkReference,link,listItem,list,paragraph,root:root$t,strong,table,tableCell,tableRow,text:text$2,thematicBreak,toml:ignore,yaml:ignore,definition:ignore,footnoteDefinition:ignore};function ignore(){}const VOID=-1,PRIMITIVE=0,ARRAY=1,OBJECT=2,DATE=3,REGEXP=4,MAP=5,SET=6,ERROR=7,BIGINT=8,env=typeof self=="object"?self:globalThis,deserializer=($,_)=>{const as=(out,index2)=>($.set(index2,out),out),unpair=index2=>{if($.has(index2))return $.get(index2);const[type2,value]=_[index2];switch(type2){case PRIMITIVE:case VOID: return as(value,index2);case ARRAY:{const arr=as([],index2);for(const index3 of value)arr.push(unpair(index3));return arr}case OBJECT:{const object2=as({},index2);for(const[key2,index3]of value)object2[unpair(key2)]=unpair(index3);return object2}case DATE:return as(new Date(value),index2);case REGEXP:{const{source:source2,flags:flags2}=value;return as(new RegExp(source2,flags2),index2)}case MAP:{const map2=as(new Map,index2);for(const[key2,index3]of value)map2.set(unpair(key2),unpair(index3));return map2}case SET:{ const set2=as(new Set,index2);for(const index3 of value)set2.add(unpair(index3));return set2}case ERROR:{const{name,message}=value;return as(new env[name](message),index2)}case BIGINT:return as(BigInt(value),index2);case"BigInt":return as(Object(BigInt(value)),index2);case"ArrayBuffer":return as(new Uint8Array(value).buffer,value);case"DataView":{const{buffer}=new Uint8Array(value);return as(new DataView(buffer),value)}}return as(new env[type2](value),index2)};return unpair},deserialize=serialized=>deserializer( new Map,serialized)(0),EMPTY="",{toString}={},{keys}=Object,typeOf=value=>{const type2=typeof value;if(type2!=="object"||!value)return[PRIMITIVE,type2];const asString=toString.call(value).slice(8,-1);switch(asString){case"Array":return[ARRAY,EMPTY];case"Object":return[OBJECT,EMPTY];case"Date":return[DATE,EMPTY];case"RegExp":return[REGEXP,EMPTY];case"Map":return[MAP,EMPTY];case"Set":return[SET,EMPTY];case"DataView":return[ARRAY,asString]}return asString.includes("Array")?[ARRAY,asString]:asString. includes("Error")?[ERROR,asString]:[OBJECT,asString]},shouldSkip=([TYPE,type2])=>TYPE===PRIMITIVE&&(type2==="function"||type2==="symbol"),serializer=(strict,json2,$,_)=>{const as=(out,value)=>{const index2=_.push(out)-1;return $.set(value,index2),index2},pair=value=>{if($.has(value))return $.get(value);let[TYPE,type2]=typeOf(value);switch(TYPE){case PRIMITIVE:{let entry=value;switch(type2){case"bigint":TYPE=BIGINT,entry=value.toString();break;case"function":case"symbol":if(strict)throw new TypeError( "unable to serialize "+type2);entry=null;break;case"undefined":return as([VOID],value)}return as([TYPE,entry],value)}case ARRAY:{if(type2){let spread=value;return type2==="DataView"?spread=new Uint8Array(value.buffer):type2==="ArrayBuffer"&&(spread=new Uint8Array(value)),as([type2,[...spread]],value)}const arr=[],index2=as([TYPE,arr],value);for(const entry of value)arr.push(pair(entry));return index2}case OBJECT:{if(type2)switch(type2){case"BigInt":return as([type2,value.toString()],value);case"\ Boolean":case"Number":case"String":return as([type2,value.valueOf()],value)}if(json2&&"toJSON"in value)return pair(value.toJSON());const entries=[],index2=as([TYPE,entries],value);for(const key2 of keys(value))(strict||!shouldSkip(typeOf(value[key2])))&&entries.push([pair(key2),pair(value[key2])]);return index2}case DATE:return as([TYPE,value.toISOString()],value);case REGEXP:{const{source:source2,flags:flags2}=value;return as([TYPE,{source:source2,flags:flags2}],value)}case MAP:{const entries=[], index2=as([TYPE,entries],value);for(const[key2,entry]of value)(strict||!(shouldSkip(typeOf(key2))||shouldSkip(typeOf(entry))))&&entries.push([pair(key2),pair(entry)]);return index2}case SET:{const entries=[],index2=as([TYPE,entries],value);for(const entry of value)(strict||!shouldSkip(typeOf(entry)))&&entries.push(pair(entry));return index2}}const{message}=value;return as([TYPE,{name:type2,message}],value)};return pair},serialize=(value,{json:json2,lossy}={})=>{const _=[];return serializer(!(json2|| lossy),!!json2,new Map,_)(value),_},structuredClone$1=typeof structuredClone=="function"?(any2,options)=>options&&("json"in options||"lossy"in options)?deserialize(serialize(any2,options)):structuredClone(any2):(any2,options)=>deserialize(serialize(any2,options));function defaultFootnoteBackContent(_,rereferenceIndex){const result=[{type:"text",value:"↩"}];return rereferenceIndex>1&&result.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(rereferenceIndex)}]}), result}function defaultFootnoteBackLabel(referenceIndex,rereferenceIndex){return"Back to reference "+(referenceIndex+1)+(rereferenceIndex>1?"-"+rereferenceIndex:"")}function footer(state2){const clobberPrefix=typeof state2.options.clobberPrefix=="string"?state2.options.clobberPrefix:"user-content-",footnoteBackContent=state2.options.footnoteBackContent||defaultFootnoteBackContent,footnoteBackLabel=state2.options.footnoteBackLabel||defaultFootnoteBackLabel,footnoteLabel=state2.options.footnoteLabel|| "Footnotes",footnoteLabelTagName=state2.options.footnoteLabelTagName||"h2",footnoteLabelProperties=state2.options.footnoteLabelProperties||{className:["sr-only"]},listItems=[];let referenceIndex=-1;for(;++referenceIndex0&&backReferences.push({type:"text",value:" "});let children=typeof footnoteBackContent=="string"?footnoteBackContent:footnoteBackContent(referenceIndex,rereferenceIndex);typeof children=="string"&&(children={type:"text",value:children}),backReferences.push({type:"element",tagName:"a",properties:{href:"#"+clobberPrefix+"fnref-"+safeId+(rereferenceIndex>1?"-"+rereferenceIndex: ""),dataFootnoteBackref:"",ariaLabel:typeof footnoteBackLabel=="string"?footnoteBackLabel:footnoteBackLabel(referenceIndex,rereferenceIndex),className:["data-footnote-backref"]},children:Array.isArray(children)?children:[children]})}const tail=content2[content2.length-1];if(tail&&tail.type==="element"&&tail.tagName==="p"){const tailTail=tail.children[tail.children.length-1];tailTail&&tailTail.type==="text"?tailTail.value+=" ":tail.children.push({type:"text",value:" "}),tail.children.push(...backReferences)}else content2.push(...backReferences);const listItem2={type:"element",tagName:"li",properties:{id:clobberPrefix+"fn-"+safeId},children:state2.wrap(content2,!0)};state2.patch(definition2,listItem2),listItems.push(listItem2)}if(listItems.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:footnoteLabelTagName,properties:{...structuredClone$1(footnoteLabelProperties),id:"footnote-label"},children:[{type:"text",value:footnoteLabel}]}, {type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:state2.wrap(listItems,!0)},{type:"text",value:` `}]}}const own$2={}.hasOwnProperty,emptyOptions$2={};function createState(tree,options){const settings=options||emptyOptions$2,definitionById=new Map,footnoteById=new Map,footnoteCounts=new Map,handlers$1={...handlers,...settings.handlers},state2={all:all2,applyData,definitionById,footnoteById,footnoteCounts,footnoteOrder:[],handlers:handlers$1,one:one2,options:settings,patch,wrap};return visit(tree,function(node2){if(node2.type==="definition"||node2.type==="footnoteDefinition"){const map2=node2. type==="definition"?definitionById:footnoteById,id2=String(node2.identifier).toUpperCase();map2.has(id2)||map2.set(id2,node2)}}),state2;function one2(node2,parent){const type2=node2.type,handle2=state2.handlers[type2];if(own$2.call(state2.handlers,type2)&&handle2)return handle2(state2,node2,parent);if(state2.options.passThrough&&state2.options.passThrough.includes(type2)){if("children"in node2){const{children,...shallow}=node2,result=structuredClone$1(shallow);return result.children=state2.all(node2), result}return structuredClone$1(node2)}return(state2.options.unknownHandler||defaultUnknownHandler)(state2,node2,parent)}function all2(parent){const values=[];if("children"in parent){const nodes2=parent.children;let index2=-1;for(;++index20&&result.push({type:"text",value:` `}),result}function trimMarkdownSpaceStart(value){let index2=0,code2=value.charCodeAt(index2);for(;code2===9||code2===32;)index2++,code2=value.charCodeAt(index2);return value.slice(index2)}function toHast(tree,options){const state2=createState(tree,options),node2=state2.one(tree,void 0),foot=footer(state2),result=Array.isArray(node2)?{type:"root",children:node2}:node2||{type:"root",children:[]};return foot&&result.children.push({type:"text",value:` `},foot),result}function remarkRehype(destination,options){return destination&&"run"in destination?async function(tree,file){const hastTree=toHast(tree,{file,...options});await destination.run(hastTree,file)}:function(tree,file){return toHast(tree,{file,...destination||options})}}class Schema{constructor(property,normal,space2){this.normal=normal,this.property=property,space2&&(this.space=space2)}}Schema.prototype.normal={};Schema.prototype.property={};Schema.prototype.space=void 0;function merge(definitions2,space2){ const property={},normal={};for(const definition2 of definitions2)Object.assign(property,definition2.property),Object.assign(normal,definition2.normal);return new Schema(property,normal,space2)}function normalize(value){return value.toLowerCase()}class Info{constructor(property,attribute){this.attribute=attribute,this.property=property}}Info.prototype.attribute="";Info.prototype.booleanish=!1;Info.prototype.boolean=!1;Info.prototype.commaOrSpaceSeparated=!1;Info.prototype.commaSeparated=!1;Info. prototype.defined=!1;Info.prototype.mustUseProperty=!1;Info.prototype.number=!1;Info.prototype.overloadedBoolean=!1;Info.prototype.property="";Info.prototype.spaceSeparated=!1;Info.prototype.space=void 0;let powers=0;const boolean=increment(),booleanish=increment(),overloadedBoolean=increment(),number=increment(),spaceSeparated=increment(),commaSeparated=increment(),commaOrSpaceSeparated=increment();function increment(){return 2**++powers}const types=Object.freeze(Object.defineProperty({__proto__:null, boolean,booleanish,commaOrSpaceSeparated,commaSeparated,number,overloadedBoolean,spaceSeparated},Symbol.toStringTag,{value:"Module"})),checks=Object.keys(types);class DefinedInfo extends Info{constructor(property,attribute,mask,space2){let index2=-1;if(super(property,attribute),mark(this,"space",space2),typeof mask=="number")for(;++index24&&normal.slice(0,4)==="data"&&valid.test(value)){if(value.charAt(4)==="-"){const rest=value.slice(5).replace(dash,camelcase);property="data"+rest.charAt(0).toUpperCase()+rest.slice(1)}else{const rest=value.slice(4);if(!dash.test(rest)){let dashes=rest.replace(cap,kebab);dashes.charAt(0)!=="-"&&(dashes="-"+dashes),value="data"+dashes}}Type=DefinedInfo}return new Type(property,value)}function kebab($0){return"-"+$0.toLowerCase()}function camelcase($0){return $0.charAt(1).toUpperCase()} const html$2=merge([aria,html$3,xlink,xmlns,xml],"html"),svg=merge([aria,svg$1,xlink,xmlns,xml],"svg");function parse$1(value){const tokens=[],input=String(value||"");let index2=input.indexOf(","),start2=0,end=!1;for(;!end;){index2===-1&&(index2=input.length,end=!0);const token2=input.slice(start2,index2).trim();(token2||!end)&&tokens.push(token2),start2=index2+1,index2=input.indexOf(",",start2)}return tokens}function stringify$1(values,options){const settings=options||{};return(values[values.length- 1]===""?[...values,""]:values).join((settings.padRight?" ":"")+","+(settings.padLeft===!1?"":" ")).trim()}const search=/[#.]/g;function parseSelector(selector,defaultTagName){const value=selector||"",props={};let start2=0,previous2,tagName;for(;start2`]/g,surrogatePairsRegex=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,controlCharactersRegex=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,regexEscapeRegex=/[|\\{}()[\]^$+*?.]/g,subsetToRegexCache=new WeakMap;function core(value,options){if(value=value.replace(options.subset?charactersToExpressionCached(options.subset):defaultSubsetRegex,basic2),options.subset||options.escapeOnly)return value;return value. replace(surrogatePairsRegex,surrogate).replace(controlCharactersRegex,basic2);function surrogate(pair,index2,all2){return options.format((pair.charCodeAt(0)-55296)*1024+pair.charCodeAt(1)-56320+65536,all2.charCodeAt(index2+2),options)}function basic2(character,index2,all2){return options.format(character.charCodeAt(0),all2.charCodeAt(index2+1),options)}}function charactersToExpressionCached(subset){let cached2=subsetToRegexCache.get(subset);return cached2||(cached2=charactersToExpression(subset), subsetToRegexCache.set(subset,cached2)),cached2}function charactersToExpression(subset){const groups=[];let index2=-1;for(;++index2",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"\ ˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},dangerous=["cent","copy","divide","gt","lt","not","para","times"],own$1={}.hasOwnProperty,characters={};let key;for(key in characterEntitiesHtml4)own$1.call(characterEntitiesHtml4,key)&&(characters[characterEntitiesHtml4[key]]=key);const notAlphanumericRegex=/[^\dA-Za-z]/; function toNamed(code2,next2,omit2,attribute){const character=String.fromCharCode(code2);if(own$1.call(characters,character)){const name=characters[character],value="&"+name;return omit2&&characterEntitiesLegacy.includes(name)&&!dangerous.includes(name)&&(!attribute||next2&&next2!==61&¬AlphanumericRegex.test(String.fromCharCode(next2)))?value:value+";"}return""}function formatSmart(code2,next2,options){let numeric=toHexadecimal(code2,next2,options.omitOptionalSemicolons),named;if((options.useNamedReferences|| options.useShortestReferences)&&(named=toNamed(code2,next2,options.omitOptionalSemicolons,options.attribute)),(options.useShortestReferences||!named)&&options.useShortestReferences){const decimal=toDecimal(code2,next2,options.omitOptionalSemicolons);decimal.length|^->||--!>|"],commentEntitySubset=["<",">"];function comment(node2,_12,_22,state2){return state2.settings.bogusComments?"":"";function encode2($0){return stringifyEntities($0,Object.assign({},state2.settings.characterReferences,{subset:commentEntitySubset}))}}function doctype(_12,_22,_32,state2){return"\ "}const re=/[ \t\n\f\r]/g;function whitespace(thing){return typeof thing=="object"?thing.type==="text"?empty(thing.value):!1:empty(thing)}function empty(value){return value.replace(re,"")===""}const siblingAfter=siblings(1),siblingBefore=siblings(-1),emptyChildren$1=[];function siblings(increment2){return sibling2;function sibling2(parent,index2,includeWhitespace){const siblings2=parent?parent.children: emptyChildren$1;let offset2=(index2||0)+increment2,next2=siblings2[offset2];if(!includeWhitespace)for(;next2&&whitespace(next2);)offset2+=increment2,next2=siblings2[offset2];return next2}}const own={}.hasOwnProperty;function omission(handlers2){return omit2;function omit2(node2,index2,parent){return own.call(handlers2,node2.tagName)&&handlers2[node2.tagName](node2,index2,parent)}}const closing=omission({body:body$1,caption:headOrColgroupOrCaption,colgroup:headOrColgroupOrCaption,dd,dt,head:headOrColgroupOrCaption, html:html$1,li,optgroup,option,p,rp:rubyElement,rt:rubyElement,tbody:tbody$1,td:cells,tfoot,th:cells,thead,tr});function headOrColgroupOrCaption(_,index2,parent){const next2=siblingAfter(parent,index2,!0);return!next2||next2.type!=="comment"&&!(next2.type==="text"&&whitespace(next2.value.charAt(0)))}function html$1(_,index2,parent){const next2=siblingAfter(parent,index2);return!next2||next2.type!=="comment"}function body$1(_,index2,parent){const next2=siblingAfter(parent,index2);return!next2||next2. type!=="comment"}function p(_,index2,parent){const next2=siblingAfter(parent,index2);return next2?next2.type==="element"&&(next2.tagName==="address"||next2.tagName==="article"||next2.tagName==="aside"||next2.tagName==="blockquote"||next2.tagName==="details"||next2.tagName==="div"||next2.tagName==="dl"||next2.tagName==="fieldset"||next2.tagName==="figcaption"||next2.tagName==="figure"||next2.tagName==="footer"||next2.tagName==="form"||next2.tagName==="h1"||next2.tagName==="h2"||next2.tagName==="h\ 3"||next2.tagName==="h4"||next2.tagName==="h5"||next2.tagName==="h6"||next2.tagName==="header"||next2.tagName==="hgroup"||next2.tagName==="hr"||next2.tagName==="main"||next2.tagName==="menu"||next2.tagName==="nav"||next2.tagName==="ol"||next2.tagName==="p"||next2.tagName==="pre"||next2.tagName==="section"||next2.tagName==="table"||next2.tagName==="ul"):!parent||!(parent.type==="element"&&(parent.tagName==="a"||parent.tagName==="audio"||parent.tagName==="del"||parent.tagName==="ins"||parent.tagName=== "map"||parent.tagName==="noscript"||parent.tagName==="video"))}function li(_,index2,parent){const next2=siblingAfter(parent,index2);return!next2||next2.type==="element"&&next2.tagName==="li"}function dt(_,index2,parent){const next2=siblingAfter(parent,index2);return!!(next2&&next2.type==="element"&&(next2.tagName==="dt"||next2.tagName==="dd"))}function dd(_,index2,parent){const next2=siblingAfter(parent,index2);return!next2||next2.type==="element"&&(next2.tagName==="dt"||next2.tagName==="dd")}function rubyElement(_,index2,parent){ const next2=siblingAfter(parent,index2);return!next2||next2.type==="element"&&(next2.tagName==="rp"||next2.tagName==="rt")}function optgroup(_,index2,parent){const next2=siblingAfter(parent,index2);return!next2||next2.type==="element"&&next2.tagName==="optgroup"}function option(_,index2,parent){const next2=siblingAfter(parent,index2);return!next2||next2.type==="element"&&(next2.tagName==="option"||next2.tagName==="optgroup")}function thead(_,index2,parent){const next2=siblingAfter(parent,index2); return!!(next2&&next2.type==="element"&&(next2.tagName==="tbody"||next2.tagName==="tfoot"))}function tbody$1(_,index2,parent){const next2=siblingAfter(parent,index2);return!next2||next2.type==="element"&&(next2.tagName==="tbody"||next2.tagName==="tfoot")}function tfoot(_,index2,parent){return!siblingAfter(parent,index2)}function tr(_,index2,parent){const next2=siblingAfter(parent,index2);return!next2||next2.type==="element"&&next2.tagName==="tr"}function cells(_,index2,parent){const next2=siblingAfter( parent,index2);return!next2||next2.type==="element"&&(next2.tagName==="td"||next2.tagName==="th")}const opening=omission({body,colgroup,head,html,tbody});function html(node2){const head2=siblingAfter(node2,-1);return!head2||head2.type!=="comment"}function head(node2){const seen2=new Set;for(const child3 of node2.children)if(child3.type==="element"&&(child3.tagName==="base"||child3.tagName==="title")){if(seen2.has(child3.tagName))return!1;seen2.add(child3.tagName)}const child2=node2.children[0];return!child2|| child2.type==="element"}function body(node2){const head2=siblingAfter(node2,-1,!0);return!head2||head2.type!=="comment"&&!(head2.type==="text"&&whitespace(head2.value.charAt(0)))&&!(head2.type==="element"&&(head2.tagName==="meta"||head2.tagName==="link"||head2.tagName==="script"||head2.tagName==="style"||head2.tagName==="template"))}function colgroup(node2,index2,parent){const previous2=siblingBefore(parent,index2),head2=siblingAfter(node2,-1,!0);return parent&&previous2&&previous2.type==="eleme\ nt"&&previous2.tagName==="colgroup"&&closing(previous2,parent.children.indexOf(previous2),parent)?!1:!!(head2&&head2.type==="element"&&head2.tagName==="col")}function tbody(node2,index2,parent){const previous2=siblingBefore(parent,index2),head2=siblingAfter(node2,-1);return parent&&previous2&&previous2.type==="element"&&(previous2.tagName==="thead"||previous2.tagName==="tbody")&&closing(previous2,parent.children.indexOf(previous2),parent)?!1:!!(head2&&head2.type==="element"&&head2.tagName==="tr")} const constants={name:[[` \f\r &/=>`.split(""),` \f\r "&'/=>\``.split("")],[`\0 \f\r "&'/<=>`.split(""),`\0 \f\r "&'/<=>\``.split("")]],unquoted:[[` \f\r &>`.split(""),`\0 \f\r "&'<=>\``.split("")],[`\0 \f\r "&'<=>\``.split(""),`\0 \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function element(node2,index2,parent,state2){const schema=state2.schema,omit2=schema.space==="svg"?!1:state2.settings.omitOptionalTags;let selfClosing=schema.space==="svg"?state2.settings.closeEmptyElements:state2.settings.voids.includes(node2.tagName.toLowerCase());const parts=[];let last;schema.space=== "html"&&node2.tagName==="svg"&&(state2.schema=svg);const attributes=serializeAttributes(state2,node2.properties),content2=state2.all(schema.space==="html"&&node2.tagName==="template"?node2.content:node2);return state2.schema=schema,content2&&(selfClosing=!1),(attributes||!omit2||!opening(node2,index2,parent))&&(parts.push("<",node2.tagName,attributes?" "+attributes:""),selfClosing&&(schema.space==="svg"||state2.settings.closeSelfClosing)&&(last=attributes.charAt(attributes.length-1),(!state2.settings. tightSelfClosing||last==="/"||last&&last!=='"'&&last!=="'")&&parts.push(" "),parts.push("/")),parts.push(">")),parts.push(content2),!selfClosing&&(!omit2||!closing(node2,index2,parent))&&parts.push(""),parts.join("")}function serializeAttributes(state2,properties2){const values=[];let index2=-1,key2;if(properties2){for(key2 in properties2)if(properties2[key2]!==null&&properties2[key2]!==void 0){const value=serializeAttribute(state2,key2,properties2[key2]);value&&values.push(value)}} for(;++index2ccount(value,state2.alternative)&&(quote=state2.alternative),result=quote+stringifyEntities(value,Object.assign({},state2.settings.characterReferences,{subset:(quote==="'"?constants.single:constants. double)[x][y],attribute:!0}))+quote),name+(result&&"="+result))}const textEntitySubset=["<","&"];function text(node2,_,parent,state2){return parent&&parent.type==="element"&&(parent.tagName==="script"||parent.tagName==="style")?node2.value:stringifyEntities(node2.value,Object.assign({},state2.settings.characterReferences,{subset:textEntitySubset}))}function raw(node2,index2,parent,state2){return state2.settings.allowDangerousHtml?node2.value:text(node2,index2,parent,state2)}function root$r(node2,_12,_22,state2){ return state2.all(node2)}const handle=zwitch("type",{invalid,unknown,handlers:{comment,doctype,element,raw,root:root$r,text}});function invalid(node2){throw new Error("Expected node, not `"+node2+"`")}function unknown(node_){const node2=node_;throw new Error("Cannot compile unknown node `"+node2.type+"`")}const emptyOptions={},emptyCharacterReferences={},emptyChildren=[];function toHtml(tree,options){const options_=options||emptyOptions,quote=options_.quote||'"',alternative=quote==='"'?"'":'"';if(quote!== '"'&"e!=="'")throw new Error("Invalid quote `"+quote+"`, expected `'` or `\"`");return{one,all,settings:{omitOptionalTags:options_.omitOptionalTags||!1,allowParseErrors:options_.allowParseErrors||!1,allowDangerousCharacters:options_.allowDangerousCharacters||!1,quoteSmart:options_.quoteSmart||!1,preferUnquoted:options_.preferUnquoted||!1,tightAttributes:options_.tightAttributes||!1,upperDoctype:options_.upperDoctype||!1,tightDoctype:options_.tightDoctype||!1,bogusComments:options_.bogusComments|| !1,tightCommaSeparatedLists:options_.tightCommaSeparatedLists||!1,tightSelfClosing:options_.tightSelfClosing||!1,collapseEmptyAttributes:options_.collapseEmptyAttributes||!1,allowDangerousHtml:options_.allowDangerousHtml||!1,voids:options_.voids||htmlVoidElements,characterReferences:options_.characterReferences||emptyCharacterReferences,closeSelfClosing:options_.closeSelfClosing||!1,closeEmptyElements:options_.closeEmptyElements||!1},schema:options_.space==="svg"?svg:html$2,quote,alternative}.one( Array.isArray(tree)?{type:"root",children:tree}:tree,void 0,void 0)}function one(node2,index2,parent){return handle(node2,index2,parent,this)}function all(parent){const results=[],children=parent&&parent.children||emptyChildren;let index2=-1;for(;++index2cursor&&result.push({type:"text",value:value.slice(cursor,m.index)}),result.push({type:"element",tagName:"br",properties:{},children:[]}),cursor=m.index+m[0].length;return cursor{const parent=ancestors[ancestors.length-1];if(!parent||parent.type!=="element")return;const siblings2=parent.children,startIndex=siblings2.indexOf(textNode);if(startIndex===-1)return;let combined="",endIndex=startIndex;for(let i=startIndex;itree=>{visit(tree,"element",node2=>{(node2.tagName==="td"||node2.tagName==="th")&&processCell(node2)})},rehypeEnhanceLinks=()=>tree=>{visit(tree,"element",node2=>{if(node2.tagName!=="a")return;const props=node2. properties??{};props.href&&(props.target="_blank",props.rel="noopener noreferrer",node2.properties=props)})},COPY_ICON_SVG='',PREVIEW_ICON_SVG='';function createRawHtmlElement(html2){return{type:"element",tagName:"span",properties:{},children:[ {type:"raw",value:html2}]}}function createCopyButton(codeId){return{type:"element",tagName:"button",properties:{className:[COPY_CODE_BTN_CLASS],"data-code-id":codeId,title:"Copy code",type:"button"},children:[createRawHtmlElement(COPY_ICON_SVG)]}}function createPreviewButton(codeId){return{type:"element",tagName:"button",properties:{className:[PREVIEW_CODE_BTN_CLASS],"data-code-id":codeId,title:"Preview code",type:"button"},children:[createRawHtmlElement(PREVIEW_ICON_SVG)]}}function createHeader(language2,codeId){ const actions=[createCopyButton(codeId)];return language2.toLowerCase()==="html"&&actions.push(createPreviewButton(codeId)),{type:"element",tagName:"div",properties:{className:[CODE_BLOCK_HEADER_CLASS]},children:[{type:"element",tagName:"span",properties:{className:[CODE_LANGUAGE_CLASS]},children:[{type:"text",value:language2}]},{type:"element",tagName:"div",properties:{className:[CODE_BLOCK_ACTIONS_CLASS]},children:actions}]}}function createScrollContainer(preElement){return{type:"element",tagName:"\ div",properties:{className:[CODE_BLOCK_SCROLL_CONTAINER_CLASS]},children:[preElement]}}function createWrapper(header,preElement){return{type:"element",tagName:"div",properties:{className:[CODE_BLOCK_WRAPPER_CLASS,RELATIVE_CLASS]},children:[header,createScrollContainer(preElement)]}}function extractLanguage(codeElement){const className=codeElement.properties?.className;if(!Array.isArray(className))return"text";for(const cls of className)if(typeof cls=="string"&&cls.startsWith("language-"))return cls. replace("language-","");return"text"}function generateCodeId(){return typeof window<"u"?`code-${window.idxCodeBlock=(window.idxCodeBlock??0)+1}`:`code-${Date.now()}-${Math.random().toString(36).slice(2,7)}`}const rehypeEnhanceCodeBlocks=()=>tree=>{visit(tree,"element",(node2,index2,parent)=>{if(node2.tagName!=="pre"||!parent||index2===void 0)return;const codeElement=node2.children.find(child2=>child2.type==="element"&&child2.tagName==="code");if(!codeElement)return;const language2=extractLanguage( codeElement),codeId=generateCodeId();codeElement.properties={...codeElement.properties,"data-code-id":codeId};const header=createHeader(language2,codeId),wrapper=createWrapper(header,node2);parent.children[index2]=wrapper})};function rehypeResolveAttachmentImages(options){return tree=>{visit(tree,"element",node2=>{if(node2.tagName==="img"&&node2.properties?.src){const src=String(node2.properties.src);if(src.startsWith(UrlProtocol.DATA)||src.startsWith(UrlProtocol.HTTP))return;const attachment=options. attachments?.find(a=>a.type===AttachmentType.IMAGE&&a.name===src);attachment?.base64Url&&(node2.properties.src=attachment.base64Url)}})}}const rehypeRtlSupport=()=>tree=>{visit(tree,"element",node2=>{node2.children&&node2.children.length>0&&(node2.properties={...node2.properties,dir:"auto"})})};function preserveIndent(line){let index2=0,output="";for(;index20&&nodes2.push({type:"break"}),nodes2.push({type:"text",value:preserveIndent(rawLine)});return nodes2.length||nodes2.push({type:"text",value:""}),nodes2}const remarkLiteralHtml=()=>tree=>{visit(tree,"html",(node2,index2,parent)=>{if(!parent||typeof index2!="number")return;const replacement=createLiteralChildren(node2.value); if(!PHRASE_PARENTS.has(parent.type)){const paragraph2={type:"paragraph",children:replacement,data:{literalHtml:!0}},siblings2=parent.children;if(siblings2.splice(index2,1,paragraph2),index2>0){const previous2=siblings2[index2-1];if(previous2?.type==="paragraph"&&previous2.data?.literalHtml){const prevChildren=previous2.children;return prevChildren.length&&prevChildren[prevChildren.length-1].type!=="break"&&prevChildren.push({type:"break"}),prevChildren.push(...paragraph2.children),siblings2.splice( index2,1),index2}}return index2+1}return parent.children.splice(index2,1,...replacement),index2+replacement.length})},githubDarkCss="pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hl\ js-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#79c0ff}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-comment,.hljs-code,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.\ hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c}",githubLightCss="pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-titl\ e.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#\ 24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}";var root_1$g=from_html('
        '),root_2$l=from_html('
        '),root_3$h=from_html( '
        '),root$q=from_html("
        ",1);function MarkdownContent($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),disableMath=prop($$props,"disable\ Math",3,!1),containerRef=state$1(void 0),renderedBlocks=state$1(proxy([])),unstableBlockHtml=state$1(""),incompleteCodeBlock=state$1(null),previewDialogOpen=state$1(!1),previewCode=state$1(""),previewLanguage=state$1("text"),streamingCodeScrollContainer=state$1(void 0);const streamingAutoScroll=createAutoScrollController();let pendingMarkdown=null,isProcessing=!1;const transformCache=new SvelteMap;let previousContent="";const themeStyleId=`highlight-theme-${window.idxThemeStyle=(window.idxThemeStyle?? 0)+1}`;let processor=user_derived(()=>()=>{$$props.attachments;let proc=remark().use(remarkGfm);return disableMath()||(proc=proc.use(remarkMath)),proc=proc.use(remarkBreaks).use(remarkLiteralHtml).use(remarkRehype),disableMath()||(proc=proc.use(rehypeKatex)),proc.use(rehypeHighlight,{languages:grammars,aliases:{[FileTypeText.XML]:[FileTypeText.SVELTE,FileTypeText.VUE]}}).use(rehypeRestoreTableHtml).use(rehypeEnhanceLinks).use(rehypeEnhanceCodeBlocks).use(rehypeResolveAttachmentImages,{attachments:$$props. attachments}).use(rehypeRtlSupport).use(rehypeStringify,{allowDangerousHtml:!0})});function cleanupEventListeners(){if(!get$4(containerRef))return;const copyButtons=get$4(containerRef).querySelectorAll(".copy-code-btn"),previewButtons=get$4(containerRef).querySelectorAll(".preview-code-btn");for(const button of copyButtons)button.removeEventListener("click",handleCopyClick);for(const button of previewButtons)button.removeEventListener("click",handlePreviewClick)}function cleanupHighlightTheme(){ document.getElementById(themeStyleId)?.remove()}function loadHighlightTheme(isDark){document.getElementById(themeStyleId)?.remove();const style2=document.createElement("style");style2.id=themeStyleId,style2.textContent=isDark?githubDarkCss:githubLightCss,document.head.appendChild(style2)}function getCodeInfoFromTarget(target2){const wrapper=target2.closest(".code-block-wrapper");if(!wrapper)return console.error("No wrapper found"),null;const codeElement=wrapper.querySelector("code[data-code-id]"); if(!codeElement)return console.error("No code element found in wrapper"),null;const rawCode=codeElement.textContent??"",language2=wrapper.querySelector(".code-language")?.textContent?.trim()||"text";return{rawCode,language:language2}}function getHastNodeId(node2,indexFallback){const position2=node2.position;return position2?.start?.offset!=null&&position2?.end?.offset!=null?`hast-${position2.start.offset}-${position2.end.offset}`:`${node2.type}-${indexFallback}`}function getMdastNodeHash(node2,index2){ const n=node2;return n.position?.start?.offset!=null&&n.position?.end?.offset!=null?`${n.type}-${n.position.start.offset}-${n.position.end.offset}`:`${n.type}-idx${index2}`}function isAppendMode(newContent){return previousContent.length>0&&newContent.startsWith(previousContent)}async function transformMdastNode(processorInstance,node2,index2){const hash2=getMdastNodeHash(node2,index2),cached2=transformCache.get(hash2);if(cached2)return{html:cached2,hash:hash2};const singleNodeRoot={type:"root",children:[ node2]},transformedRoot=await processorInstance.run(singleNodeRoot),html2=processorInstance.stringify(transformedRoot);return transformCache.set(hash2,html2),{html:html2,hash:hash2}}async function handleCopyClick(event2){event2.preventDefault(),event2.stopPropagation();const target2=event2.currentTarget;if(!target2)return;const info2=getCodeInfoFromTarget(target2);if(info2)try{await copyCodeToClipboard(info2.rawCode)}catch(error2){console.error("Failed to copy code:",error2)}}function handlePreviewDialogOpenChange(open2){ set$1(previewDialogOpen,open2,!0),open2||(set$1(previewCode,""),set$1(previewLanguage,"text"))}function handlePreviewClick(event2){event2.preventDefault(),event2.stopPropagation();const target2=event2.currentTarget;if(!target2)return;const info2=getCodeInfoFromTarget(target2);info2&&(set$1(previewCode,info2.rawCode,!0),set$1(previewLanguage,info2.language,!0),set$1(previewDialogOpen,!0))}async function processMarkdown(markdown2){if(markdown2===previousContent)return;if(!markdown2){set$1(renderedBlocks, [],!0),set$1(unstableBlockHtml,""),set$1(incompleteCodeBlock,null),previousContent="";return}const incompleteBlock=detectIncompleteCodeBlock(markdown2);if(incompleteBlock){const prefixMarkdown=markdown2.slice(0,incompleteBlock.openingIndex);if(prefixMarkdown.trim()){const normalizedPrefix=preprocessLaTeX(prefixMarkdown),processorInstance2=get$4(processor)(),mdastChildren2=processorInstance2.parse(normalizedPrefix).children??[],nextBlocks2=[],appendMode2=isAppendMode(prefixMarkdown),previousBlockCount2=appendMode2? get$4(renderedBlocks).length:0;for(let index2=0;index2stableCount){const singleNodeRoot={type:"root",children:[mdastChildren[stableCount]]},transformedRoot=await processorInstance.run(singleNodeRoot);unstableHtml=processorInstance.stringify(transformedRoot)}set$1(renderedBlocks,nextBlocks,!0),previousContent=markdown2,await tick(),set$1(unstableBlockHtml,unstableHtml,!0)}function setupCodeBlockActions(){if(!get$4(containerRef))return;const wrappers=get$4(containerRef).querySelectorAll(".code-block-wrapper"); for(const wrapper of wrappers){const copyButton=wrapper.querySelector(".copy-code-btn"),previewButton=wrapper.querySelector(".preview-code-btn");copyButton&©Button.dataset.listenerBound!=="true"&&(copyButton.dataset.listenerBound="true",copyButton.addEventListener("click",handleCopyClick)),previewButton&&previewButton.dataset.listenerBound!=="true"&&(previewButton.dataset.listenerBound="true",previewButton.addEventListener("click",handlePreviewClick))}}function setupImageErrorHandlers(){if(!get$4( containerRef))return;const images=get$4(containerRef).querySelectorAll(IMAGE_NOT_ERROR_BOUND_SELECTOR);for(const img of images)img.dataset[DATA_ERROR_BOUND_ATTR]=BOOL_TRUE_STRING,img.addEventListener("error",handleImageError)}function handleImageError(event2){const img=event2.target;if(!img||!img.src||img.src.startsWith(UrlProtocol.DATA)||img.dataset[DATA_ERROR_HANDLED_ATTR]===BOOL_TRUE_STRING)return;img.dataset[DATA_ERROR_HANDLED_ATTR]=BOOL_TRUE_STRING;const src=img.src,fallback2=document.createElement( "div");fallback2.className="image-load-error",fallback2.innerHTML=getImageErrorFallbackHtml(src),img.parentNode?.replaceChild(fallback2,img)}async function updateRenderedBlocks(markdown2){if(pendingMarkdown=markdown2,!isProcessing){isProcessing=!0;try{for(;pendingMarkdown!==null;){const nextMarkdown=pendingMarkdown;pendingMarkdown=null,await processMarkdown(nextMarkdown),pendingMarkdown!==null&&await new Promise(resolve2=>requestAnimationFrame(resolve2))}}catch(error2){console.error("Failed to p\ rocess markdown:",error2),set$1(renderedBlocks,[],!0),set$1(unstableBlockHtml,markdown2.replace(/\n/g,"
        "),!0)}finally{isProcessing=!1}}}user_effect(()=>{const isDark=derivedMode.current===ColorMode.DARK;loadHighlightTheme(isDark)}),user_effect(()=>{updateRenderedBlocks($$props.content)}),user_effect(()=>{const hasRenderedBlocks=get$4(renderedBlocks).length>0,hasUnstableBlock=!!get$4(unstableBlockHtml);(hasRenderedBlocks||hasUnstableBlock)&&get$4(containerRef)&&(setupCodeBlockActions(),setupImageErrorHandlers())}), user_effect(()=>{streamingAutoScroll.setContainer(get$4(streamingCodeScrollContainer))}),user_effect(()=>{streamingAutoScroll.updateInterval(get$4(incompleteCodeBlock)!==null)}),onDestroy(()=>{cleanupEventListeners(),cleanupHighlightTheme(),streamingAutoScroll.destroy()});var fragment=root$q(),div=first_child(fragment),node_1=child(div);each(node_1,17,()=>get$4(renderedBlocks),block2=>block2.id,($$anchor2,block2)=>{var div_1=root_1$g(),node_2=child(div_1);html$6(node_2,()=>get$4(block2).html),reset( div_1),action(div_1,($$node,$$action_arg)=>fadeInView?.($$node,$$action_arg),()=>({skipIfVisible:!0})),template_effect(()=>set_attribute(div_1,"data-block-id",get$4(block2).id)),append($$anchor2,div_1)});var node_3=sibling(node_1,2);{var consequent=$$anchor2=>{var div_2=root_2$l(),node_4=child(div_2);html$6(node_4,()=>get$4(unstableBlockHtml)),reset(div_2),append($$anchor2,div_2)};if_block(node_3,$$render=>{get$4(unstableBlockHtml)&&$$render(consequent)})}var node_5=sibling(node_3,2);{var consequent_1=$$anchor2=>{ var div_3=root_3$h(),div_4=child(div_3),span=child(div_4),text2=child(span,!0);reset(span);var node_6=sibling(span,2);{let $0=user_derived(()=>get$4(incompleteCodeBlock).language||"text");ActionIconsCodeBlock(node_6,{get code(){return get$4(incompleteCodeBlock).code},get language(){return get$4($0)},disabled:!0,onPreview:(code2,lang)=>{set$1(previewCode,code2,!0),set$1(previewLanguage,lang,!0),set$1(previewDialogOpen,!0)}})}reset(div_4);var div_5=sibling(div_4,2),pre=child(div_5),code_1=child(pre), node_7=child(code_1);html$6(node_7,()=>highlightCode(get$4(incompleteCodeBlock).code,get$4(incompleteCodeBlock).language||"text")),reset(code_1),reset(pre),reset(div_5),bind_this(div_5,$$value=>set$1(streamingCodeScrollContainer,$$value),()=>get$4(streamingCodeScrollContainer)),reset(div_3),template_effect(()=>{set_text(text2,get$4(incompleteCodeBlock).language||"text"),set_class(code_1,1,`hljs language-${get$4(incompleteCodeBlock).language||"text"}`,"svelte-15eq738")}),event("scroll",div_5,()=>streamingAutoScroll. handleScroll()),append($$anchor2,div_3)};if_block(node_5,$$render=>{get$4(incompleteCodeBlock)&&$$render(consequent_1)})}reset(div),bind_this(div,$$value=>set$1(containerRef,$$value),()=>get$4(containerRef));var node_8=sibling(div,2);DialogCodePreview(node_8,{get open(){return get$4(previewDialogOpen)},get code(){return get$4(previewCode)},get language(){return get$4(previewLanguage)},onOpenChange:handlePreviewDialogOpenChange}),template_effect($0=>set_class(div,1,`${className()??""}${$0??""}`,"\ svelte-15eq738"),[()=>config$1()[SETTINGS_KEYS.FULL_HEIGHT_CODE_BLOCKS]?" full-height-code-blocks":""]),append($$anchor,fragment),pop()}var root$p=from_html('
        ');function SyntaxHighlightedCode($$anchor,$$props){push$1($$props,!0);let language2=prop($$props,"language",3,"text"),className=prop($$props,"class",3,""),maxHeight=prop($$props,"maxHeight",3,"60vh"),maxWidth=prop($$props,"max\ Width",3,""),highlightedHtml=state$1("");function loadHighlightTheme(isDark){document.querySelectorAll("style[data-highlight-theme-preview]").forEach(style3=>style3.remove());const style2=document.createElement("style");style2.setAttribute("data-highlight-theme-preview","true"),style2.textContent=isDark?githubDarkCss:githubLightCss,document.head.appendChild(style2)}user_effect(()=>{const isDark=derivedMode.current===ColorMode.DARK;loadHighlightTheme(isDark)}),user_effect(()=>{if(!$$props.code){set$1( highlightedHtml,"");return}try{const lang=language2().toLowerCase();if(HighlightJS$1.getLanguage(lang)){const result=HighlightJS$1.highlight($$props.code,{language:lang});set$1(highlightedHtml,result.value,!0)}else{const result=HighlightJS$1.highlightAuto($$props.code);set$1(highlightedHtml,result.value,!0)}}catch{set$1(highlightedHtml,$$props.code.replace(/&/g,"&").replace(//g,">"),!0)}});var div=root$p(),pre=child(div),code_1=child(pre),node2=child(code_1);html$6(node2, ()=>get$4(highlightedHtml)),reset(code_1),reset(pre),reset(div),template_effect(()=>{set_class(div,1,`code-preview-wrapper rounded-lg border border-border bg-muted ${className()??""}`,"svelte-hp0zxr"),set_style(div,`max-height: ${maxHeight()??""}; max-width: ${maxWidth()??""};`)}),append($$anchor,div),pop()}function Collapsible($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),open2=prop($$props,"open",15,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","\ ref","open"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Collapsible$1,($$anchor2,CollapsiblePrimitive_Root)=>{CollapsiblePrimitive_Root($$anchor2,spread_props({"data-slot":"collapsible"},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},get open(){return open2()},set open($$value){open2($$value)}}))}),append($$anchor,fragment),pop()}function Collapsible_trigger($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props( $$props,["$$slots","$$events","$$legacy","ref"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Collapsible_trigger$1,($$anchor2,CollapsiblePrimitive_Trigger)=>{CollapsiblePrimitive_Trigger($$anchor2,spread_props({"data-slot":"collapsible-trigger"},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))}),append($$anchor,fragment),pop()}function Collapsible_content($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props( $$props,["$$slots","$$events","$$legacy","ref"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Collapsible_content$1,($$anchor2,CollapsiblePrimitive_Content)=>{CollapsiblePrimitive_Content($$anchor2,spread_props({"data-slot":"collapsible-content"},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))}),append($$anchor,fragment),pop()}var root_5$c=from_html(' '),root_3$g=from_html('
        Toggle content
        ',1),root_6$b=from_html('
        '),root_2$k=from_html(" ",1);function CollapsibleContentBlock($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),className=prop($$props,"c\ lass",3,""),iconClass=prop($$props,"iconClass",3,"h-4 w-4"),isStreaming=prop($$props,"isStreaming",3,!1),contentContainer=state$1(void 0);const autoScroll=createAutoScrollController();user_effect(()=>{autoScroll.setContainer(get$4(contentContainer))}),user_effect(()=>{autoScroll.updateInterval(open2()&&isStreaming())});function handleScroll(){autoScroll.handleScroll()}var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Collapsible,($$anchor2,Collapsible_Root)=>{Collapsible_Root( $$anchor2,{get open(){return open2()},onOpenChange:value=>{open2(value),$$props.onToggle?.()},get class(){return className()},children:($$anchor3,$$slotProps)=>{Card($$anchor3,{class:"gap-0 border-muted bg-muted/30 py-0",children:($$anchor4,$$slotProps2)=>{var fragment_2=root_2$k(),node_1=first_child(fragment_2);component(node_1,()=>Collapsible_trigger,($$anchor5,Collapsible_Trigger)=>{Collapsible_Trigger($$anchor5,{class:"flex w-full cursor-pointer items-center justify-between p-3",children:($$anchor6,$$slotProps3)=>{ var fragment_3=root_3$g(),div=first_child(fragment_3),node_2=child(div);{var consequent=$$anchor7=>{var fragment_4=comment$2(),node_3=first_child(fragment_4);component(node_3,()=>$$props.icon,($$anchor8,Icon_1)=>{Icon_1($$anchor8,{get class(){return iconClass()}})}),append($$anchor7,fragment_4)};if_block(node_2,$$render=>{$$props.icon&&$$render(consequent)})}var span=sibling(node_2,2),text2=child(span,!0);reset(span);var node_4=sibling(span,2);{var consequent_1=$$anchor7=>{var span_1=root_5$c(), text_1=child(span_1,!0);reset(span_1),template_effect(()=>set_text(text_1,$$props.subtitle)),append($$anchor7,span_1)};if_block(node_4,$$render=>{$$props.subtitle&&$$render(consequent_1)})}reset(div);var div_1=sibling(div,2),node_5=child(div_1);Chevrons_up_down(node_5,{class:"h-4 w-4"}),next$1(2),reset(div_1),template_effect($0=>{set_text(text2,$$props.title),set_class(div_1,1,$0)},[()=>clsx(buttonVariants({variant:"ghost",size:"sm",class:"h-6 w-6 p-0 text-muted-foreground hover:text-foreground"}))]), append($$anchor6,fragment_3)},$$slots:{default:!0}})});var node_6=sibling(node_1,2);component(node_6,()=>Collapsible_content,($$anchor5,Collapsible_Content)=>{Collapsible_Content($$anchor5,{children:($$anchor6,$$slotProps3)=>{var div_2=root_6$b(),node_7=child(div_2);snippet(node_7,()=>$$props.children),reset(div_2),bind_this(div_2,$$value=>set$1(contentContainer,$$value),()=>get$4(contentContainer)),event("scroll",div_2,handleScroll),append($$anchor6,div_2)},$$slots:{default:!0}})}),append($$anchor4, fragment_2)},$$slots:{default:!0}})},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_2$j=from_html('...'),root_1$f=from_html(' * ',1),root_4$7=from_html(''),root_3$f=from_html('
        '),root$o=from_html( '
        ');function InputWithSuggestions($$anchor,$$props){push$1($$props,!0);let value=prop($$props,"value",3,""),suggestions=prop($$props,"suggestions",19,()=>[]),isLoadingSuggestions=prop($$props,"isLoadingSuggestions",3,!1),isAutocompleteActive=prop($$props,"isAutocompleteActive",3,!1),autocompleteIndex=prop($$props,"autocompleteIndex",3,0);var div=root$o(),node2=child(div);Label(node2,{get for(){return`tpl-arg-${$$props.name??""}`},class:"mb-1 text\ -muted-foreground",children:($$anchor2,$$slotProps)=>{var fragment=root_1$f(),span=first_child(fragment),text2=child(span);next$1(),reset(span);var node_1=sibling(span,2);{var consequent=$$anchor3=>{var span_1=root_2$j();append($$anchor3,span_1)};if_block(node_1,$$render=>{isLoadingSuggestions()&&$$render(consequent)})}template_effect(()=>set_text(text2,`${$$props.name??""} `)),append($$anchor2,fragment)},$$slots:{default:!0}});var node_2=sibling(node2,2);Input(node_2,{get id(){return`tpl-arg-${$$props. name??""}`},type:"text",get value(){return value()},oninput:e=>$$props.onInput(e.currentTarget.value),get onkeydown(){return $$props.onKeydown},get onblur(){return $$props.onBlur},get onfocus(){return $$props.onFocus},get placeholder(){return`Enter ${$$props.name??""}`},autocomplete:"off"});var node_3=sibling(node_2,2);{var consequent_1=$$anchor2=>{var div_1=root_3$f();each(div_1,22,suggestions,suggestion=>suggestion,($$anchor3,suggestion,i)=>{var button=root_4$7();button.__mousedown=()=>$$props. onSelectSuggestion(suggestion);var text_1=child(button,!0);reset(button),template_effect(()=>{set_class(button,1,`w-full px-3 py-1.5 text-left text-sm hover:bg-accent ${get$4(i)===autocompleteIndex()?"bg-accent":""}`),set_text(text_1,suggestion)}),append($$anchor3,button)}),reset(div_1),transition(3,div_1,()=>fly,()=>({y:-5,duration:100})),append($$anchor2,div_1)};if_block(node_3,$$render=>{isAutocompleteActive()&&suggestions().length>0&&$$render(consequent_1)})}reset(div),append($$anchor,div),pop()} delegate(["mousedown"]);var root_2$i=from_html('(optional)'),root_1$e=from_html(' '),root_4$6=from_html('
        '),root_3$e=from_html('
        '),root_5$b=from_html('

        '),root$n=from_html('
        ');function KeyValuePairs($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),keyPlaceholder=prop($$props,"keyPlaceholder",3,"Key"),valuePlaceholder=prop($$props,"valuePlaceholder",3,"Value"),addButtonLabel=prop($$props,"addButtonLabel",3,"Add"),emptyMessage=prop($$props,"emptyMessage",3,"No items configured."),sectionLabelOptional=prop($$props,"sectionLabelOptional",3,!0);function addPair(){$$props.onPairsChange([ ...$$props.pairs,{key:"",value:""}])}function removePair(index2){$$props.onPairsChange($$props.pairs.filter((_,i)=>i!==index2))}function updatePairKey(index2,rawKey){const key2=sanitizeKeyValuePairKey(rawKey),newPairs=[...$$props.pairs];newPairs[index2]={...newPairs[index2],key:key2},$$props.onPairsChange(newPairs)}function trimPairKey(index2,key2){const trimmed=key2.trim();if(trimmed===key2)return;const newPairs=[...$$props.pairs];newPairs[index2]={...newPairs[index2],key:trimmed},$$props.onPairsChange( newPairs)}function updatePairValue(index2,rawValue){const value=sanitizeKeyValuePairValue(rawValue),newPairs=[...$$props.pairs];newPairs[index2]={...newPairs[index2],value},$$props.onPairsChange(newPairs)}function trimPairValue(index2,value){const trimmed=value.trim();if(trimmed===value)return;const newPairs=[...$$props.pairs];newPairs[index2]={...newPairs[index2],value:trimmed},$$props.onPairsChange(newPairs)}var div=root$n(),div_1=child(div),node2=child(div_1);{var consequent_1=$$anchor2=>{var span=root_1$e(), text2=child(span),node_1=sibling(text2);{var consequent=$$anchor3=>{var span_1=root_2$i();append($$anchor3,span_1)};if_block(node_1,$$render=>{sectionLabelOptional()&&$$render(consequent)})}reset(span),template_effect(()=>set_text(text2,`${$$props.sectionLabel??""} `)),append($$anchor2,span)};if_block(node2,$$render=>{$$props.sectionLabel&&$$render(consequent_1)})}var button=sibling(node2,2);button.__click=addPair;var node_2=child(button);Plus(node_2,{class:"h-3 w-3"});var text_1=sibling(node_2); reset(button),reset(div_1);var node_3=sibling(div_1,2);{var consequent_2=$$anchor2=>{var div_2=root_3$e();each(div_2,21,()=>$$props.pairs,index$2,($$anchor3,pair,index2)=>{var div_3=root_4$6(),node_4=child(div_3);Input(node_4,{type:"text",get placeholder(){return keyPlaceholder()},get value(){return get$4(pair).key},get maxlength(){return KEY_VALUE_PAIR_KEY_MAX_LENGTH},oninput:e=>updatePairKey(index2,e.currentTarget.value),onblur:e=>trimPairKey(index2,e.currentTarget.value),class:"flex-1"});var textarea=sibling( node_4,2);remove_textarea_child(textarea),textarea.__input=e=>{updatePairValue(index2,e.currentTarget.value),autoResizeTextarea(e.currentTarget)},action(textarea,$$node=>autoResizeTextarea?.($$node));var button_1=sibling(textarea,2);button_1.__click=()=>removePair(index2);var node_5=child(button_1);Trash_2(node_5,{class:"h-3.5 w-3.5"}),reset(button_1),reset(div_3),template_effect(()=>{set_attribute(textarea,"placeholder",valuePlaceholder()),set_value(textarea,get$4(pair).value),set_attribute(textarea, "maxlength",KEY_VALUE_PAIR_VALUE_MAX_LENGTH)}),event("blur",textarea,e=>trimPairValue(index2,e.currentTarget.value)),append($$anchor3,div_3)}),reset(div_2),append($$anchor2,div_2)},alternate=$$anchor2=>{var p2=root_5$b(),text_2=child(p2,!0);reset(p2),template_effect(()=>set_text(text_2,emptyMessage())),append($$anchor2,p2)};if_block(node_3,$$render=>{$$props.pairs.length>0?$$render(consequent_2):$$render(alternate,!1)})}reset(div),template_effect(()=>{set_class(div,1,clsx(className())),set_text( text_1,` ${addButtonLabel()??""}`)}),append($$anchor,div),pop()}delegate(["click","input"]);var root_1$d=from_html(''),root$m=from_html("
        ");function SearchInput($$anchor,$$props){push$1($$props,!0);let value=prop($$props,"value",15,""),placeholder=prop($$props,"placeholder",3,"Search..."),ref2=prop($$props,"ref",15,null), showClearButton=user_derived(()=>!!value()||!!$$props.onClose);function handleInput(event2){const target2=event2.target;value(target2.value),$$props.onInput?.(target2.value)}function handleClear(){value()?(value(""),$$props.onInput?.(""),ref2()?.focus()):$$props.onClose?.()}var div=root$m(),node2=child(div);Search(node2,{class:"absolute top-1/2 left-3 z-10 h-4 w-4 -translate-y-1/2 transform text-muted-foreground"});var node_1=sibling(node2,2);{let $0=user_derived(()=>get$4(showClearButton)?"pr-9": "");Input(node_1,{get id(){return $$props.id},get class(){return`pl-9 ${get$4($0)??""}`},oninput:handleInput,get onkeydown(){return $$props.onKeyDown},get placeholder(){return placeholder()},type:"search",get value(){return value()},set value($$value){value($$value)},get ref(){return ref2()},set ref($$value){ref2($$value)}})}var node_2=sibling(node_1,2);{var consequent=$$anchor2=>{var button=root_1$d();button.__click=handleClear;var node_3=child(button);X(node_3,{class:"h-4 w-4"}),reset(button), template_effect(()=>set_attribute(button,"aria-label",value()?"Clear search":"Close")),append($$anchor2,button)};if_block(node_2,$$render=>{get$4(showClearButton)&&$$render(consequent)})}reset(div),template_effect(()=>set_class(div,1,`relative ${$$props.class??""}`)),append($$anchor,div),pop()}delegate(["click"]);var root_2$h=from_html(" Add New Server",1),root_4$5=from_html('

        Add New Server

        \
        '),root_7$a=from_html('
        No MCP Servers configured yet. Add one to enable agentic features.
        '),root_8$8=from_html('
        '),root$l=from_html('

        Manage Servers

        ');function McpServersSettings($$anchor,$$props){push$1( $$props,!0);let servers=user_derived(()=>mcpStore.getServersSorted()),initialLoadComplete=state$1(!1);user_effect(()=>{if(get$4(initialLoadComplete))return;get$4(servers).length>0&&get$4(servers).every(server=>{const state2=mcpStore.getHealthCheckState(server.id);return state2.status===HealthCheckStatus.SUCCESS||state2.status===HealthCheckStatus.ERROR})&&set$1(initialLoadComplete,!0)});let isAddingServer=state$1(!1),newServerUrl=state$1(""),newServerHeaders=state$1(""),newServerUrlError=user_derived( ()=>{if(!get$4(newServerUrl).trim())return"URL is required";try{return new URL(get$4(newServerUrl)),null}catch{return"Invalid URL format"}});function showAddServerForm(){set$1(isAddingServer,!0),set$1(newServerUrl,""),set$1(newServerHeaders,"")}function cancelAddServer(){set$1(isAddingServer,!1),set$1(newServerUrl,""),set$1(newServerHeaders,"")}function saveNewServer(){if(get$4(newServerUrlError))return;const newServerId=uuid$1()??`${MCP_SERVER_ID_PREFIX}-${Date.now()}`;mcpStore.addServer({id:newServerId, enabled:!0,url:get$4(newServerUrl).trim(),headers:get$4(newServerHeaders).trim()||void 0}),conversationsStore.setMcpServerOverride(newServerId,!0),set$1(isAddingServer,!1),set$1(newServerUrl,""),set$1(newServerHeaders,"")}var div=root$l(),div_1=child(div),node2=sibling(child(div_1),2);{var consequent=$$anchor2=>{Button($$anchor2,{variant:"outline",size:"sm",class:"shrink-0",onclick:showAddServerForm,children:($$anchor3,$$slotProps)=>{var fragment_1=root_2$h(),node_1=first_child(fragment_1);Plus( node_1,{class:"h-4 w-4"}),next$1(),append($$anchor3,fragment_1)},$$slots:{default:!0}})};if_block(node2,$$render=>{get$4(isAddingServer)||$$render(consequent)})}reset(div_1);var node_2=sibling(div_1,2);{var consequent_1=$$anchor2=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);component(node_3,()=>Card,($$anchor3,Card_Root)=>{Card_Root($$anchor3,{class:"bg-muted/30 p-4",children:($$anchor4,$$slotProps)=>{var div_2=root_4$5(),node_4=sibling(child(div_2),2);{let $0=user_derived(()=>get$4( newServerUrl)?get$4(newServerUrlError):null);McpServerForm(node_4,{get url(){return get$4(newServerUrl)},get headers(){return get$4(newServerHeaders)},onUrlChange:v=>set$1(newServerUrl,v,!0),onHeadersChange:v=>set$1(newServerHeaders,v,!0),get urlError(){return get$4($0)},id:"new-server"})}var div_3=sibling(node_4,2),node_5=child(div_3);Button(node_5,{variant:"secondary",size:"sm",onclick:cancelAddServer,children:($$anchor5,$$slotProps2)=>{next$1();var text2=text$8("Cancel");append($$anchor5,text2)}, $$slots:{default:!0}});var node_6=sibling(node_5,2);{let $0=user_derived(()=>!!get$4(newServerUrlError));Button(node_6,{variant:"default",size:"sm",onclick:saveNewServer,get disabled(){return get$4($0)},"aria-label":"Save",children:($$anchor5,$$slotProps2)=>{next$1();var text_1=text$8("Add");append($$anchor5,text_1)},$$slots:{default:!0}})}reset(div_3),reset(div_2),append($$anchor4,div_2)},$$slots:{default:!0}})}),append($$anchor2,fragment_2)};if_block(node_2,$$render=>{get$4(isAddingServer)&&$$render( consequent_1)})}var node_7=sibling(node_2,2);{var consequent_2=$$anchor2=>{var div_4=root_7$a();append($$anchor2,div_4)};if_block(node_7,$$render=>{get$4(servers).length===0&&!get$4(isAddingServer)&&$$render(consequent_2)})}var node_8=sibling(node_7,2);{var consequent_4=$$anchor2=>{var div_5=root_8$8();each(div_5,21,()=>get$4(servers),server=>server.id,($$anchor3,server)=>{var fragment_3=comment$2(),node_9=first_child(fragment_3);{var consequent_3=$$anchor4=>{McpServerCardSkeleton($$anchor4)},alternate=$$anchor4=>{ {let $0=user_derived(()=>mcpStore.getServerFavicon(get$4(server).id)),$1=user_derived(()=>conversationsStore.isMcpServerEnabledForChat(get$4(server).id));McpServerCard($$anchor4,{get server(){return get$4(server)},get faviconUrl(){return get$4($0)},get enabled(){return get$4($1)},onToggle:async()=>await conversationsStore.toggleMcpServerForChat(get$4(server).id),onUpdate:updates=>mcpStore.updateServer(get$4(server).id,updates),onDelete:()=>mcpStore.removeServer(get$4(server).id)})}};if_block(node_9, $$render=>{get$4(initialLoadComplete)?$$render(alternate,!1):$$render(consequent_3)})}append($$anchor3,fragment_3)}),reset(div_5),append($$anchor2,div_5)};if_block(node_8,$$render=>{get$4(servers).length>0&&$$render(consequent_4)})}reset(div),append($$anchor,div),pop()}var root_2$g=from_html('
        '),root_3$d=from_html(' '),root_1$c=from_html( '
        ');function McpActiveServersAvatars($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),mcpServers=user_derived(()=>mcpStore.getServersSorted().filter(s2=>s2.enabled)),enabledMcpServersForChat=user_derived(()=>get$4(mcpServers).filter(s2=>conversationsStore.isMcpServerEnabledForChat(s2.id)&&s2.url.trim())),healthyEnabledMcpServers=user_derived(()=>get$4(enabledMcpServersForChat).filter(s2=>mcpStore.getHealthCheckState(s2. id).status!==HealthCheckStatus.ERROR)),hasEnabledMcpServers=user_derived(()=>get$4(enabledMcpServersForChat).length>0),extraServersCount=user_derived(()=>Math.max(0,get$4(healthyEnabledMcpServers).length-MAX_DISPLAYED_MCP_AVATARS)),mcpFavicons=user_derived(()=>get$4(healthyEnabledMcpServers).slice(0,MAX_DISPLAYED_MCP_AVATARS).map(s2=>({id:s2.id,url:mcpStore.getServerFavicon(s2.id)})).filter(f=>f.url!==null));var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{var div=root_1$c(), div_1=child(div);each(div_1,21,()=>get$4(mcpFavicons),favicon=>favicon.id,($$anchor3,favicon)=>{var div_2=root_2$g(),img=child(div_2);reset(div_2),template_effect(()=>set_attribute(img,"src",get$4(favicon).url)),event("error",img,e=>{e.currentTarget.style.display="none"}),replay_events(img),append($$anchor3,div_2)}),reset(div_1);var node_1=sibling(div_1,2);{var consequent=$$anchor3=>{var span=root_3$d(),text2=child(span);reset(span),template_effect(()=>set_text(text2,`+${get$4(extraServersCount)?? ""}`)),append($$anchor3,span)};if_block(node_1,$$render=>{get$4(extraServersCount)>0&&$$render(consequent)})}reset(div),template_effect($0=>set_class(div,1,$0),[()=>clsx(cn$1("inline-flex items-center gap-1.5",className()))]),append($$anchor2,div)};if_block(node2,$$render=>{get$4(hasEnabledMcpServers)&&get$4(mcpFavicons).length>0&&$$render(consequent_1)})}append($$anchor,fragment),pop()}var root_3$c=from_html(''),root_6$a=from_html(" Manage MCP Servers",1),root_9$6=from_html(''),root_10$6=from_html('Error'),root_8$7=from_html(''),root_7$9=from_html('
        '),root_2$f=from_html(" ",1);function McpServersSelector($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),disabled=prop($$props,"disabled",3,!1),searchQuery=state$1(""),mcpServers=user_derived(()=>mcpStore.getServersSorted().filter(s2=>s2. enabled)),hasMcpServers=user_derived(()=>get$4(mcpServers).length>0),enabledMcpServersForChat=user_derived(()=>get$4(mcpServers).filter(s2=>conversationsStore.isMcpServerEnabledForChat(s2.id)&&s2.url.trim())),healthyEnabledMcpServers=user_derived(()=>get$4(enabledMcpServersForChat).filter(s2=>mcpStore.getHealthCheckState(s2.id).status!==HealthCheckStatus.ERROR)),hasEnabledMcpServers=user_derived(()=>get$4(enabledMcpServersForChat).length>0),mcpFavicons=user_derived(()=>get$4(healthyEnabledMcpServers). slice(0,3).map(s2=>({id:s2.id,url:mcpStore.getServerFavicon(s2.id)})).filter(f=>f.url!==null)),filteredMcpServers=user_derived(()=>{const query=get$4(searchQuery).toLowerCase().trim();return query?get$4(mcpServers).filter(s2=>{const name=getServerLabel(s2).toLowerCase(),url2=s2.url.toLowerCase();return name.includes(query)||url2.includes(query)}):get$4(mcpServers)});function getServerLabel(server){return mcpStore.getServerLabel(server)}function handleDropdownOpen(open2){open2&&mcpStore.runHealthChecksForServers( get$4(mcpServers))}function isServerEnabledForChat(serverId){return conversationsStore.isMcpServerEnabledForChat(serverId)}async function toggleServerForChat(serverId){await conversationsStore.toggleMcpServerForChat(serverId)}var fragment=comment$2(),node2=first_child(fragment);{var consequent_2=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Root$2,($$anchor3,DropdownMenu_Root)=>{DropdownMenu_Root($$anchor3,{onOpenChange:open2=>{open2||set$1(searchQuery, ""),handleDropdownOpen(open2)},children:($$anchor4,$$slotProps)=>{var fragment_2=root_2$f(),node_2=first_child(fragment_2);component(node_2,()=>Dropdown_menu_trigger,($$anchor5,DropdownMenu_Trigger)=>{DropdownMenu_Trigger($$anchor5,{get disabled(){return disabled()},onclick:e=>{e.preventDefault(),e.stopPropagation()},children:($$anchor6,$$slotProps2)=>{var button=root_3$c(),node_3=child(button);McpActiveServersAvatars(node_3,{get class(){return className()}}),reset(button),template_effect(()=>button. disabled=disabled()),append($$anchor6,button)},$$slots:{default:!0}})});var node_4=sibling(node_2,2);component(node_4,()=>Dropdown_menu_content,($$anchor5,DropdownMenu_Content)=>{DropdownMenu_Content($$anchor5,{align:"start",class:"w-72 pt-0",children:($$anchor6,$$slotProps2)=>{{const footer2=$$anchor7=>{var fragment_4=comment$2(),node_5=first_child(fragment_4);component(node_5,()=>Dropdown_menu_item,($$anchor8,DropdownMenu_Item)=>{DropdownMenu_Item($$anchor8,{class:"flex cursor-pointer items-ce\ nter gap-2",get onclick(){return $$props.onSettingsClick},children:($$anchor9,$$slotProps3)=>{var fragment_5=root_6$a(),node_6=first_child(fragment_5);Settings$1(node_6,{class:"h-4 w-4"}),next$1(2),append($$anchor9,fragment_5)},$$slots:{default:!0}})}),append($$anchor7,fragment_4)};let $0=user_derived(()=>get$4(filteredMcpServers).length===0);DropdownMenuSearchable($$anchor6,{placeholder:"Search servers...",emptyMessage:"No servers found",get isEmpty(){return get$4($0)},get searchValue(){return get$4( searchQuery)},set searchValue($$value){set$1(searchQuery,$$value,!0)},footer:footer2,children:($$anchor7,$$slotProps3)=>{var div=root_7$9();each(div,21,()=>get$4(filteredMcpServers),server=>server.id,($$anchor8,server)=>{const healthState=user_derived(()=>mcpStore.getHealthCheckState(get$4(server).id)),hasError=user_derived(()=>get$4(healthState).status===HealthCheckStatus.ERROR),isEnabledForChat=user_derived(()=>isServerEnabledForChat(get$4(server).id));var button_1=root_8$7();button_1.__click= ()=>!get$4(hasError)&&toggleServerForChat(get$4(server).id);var div_1=child(button_1),node_7=child(div_1);{var consequent=$$anchor9=>{var img=root_9$6();template_effect($02=>set_attribute(img,"src",$02),[()=>mcpStore.getServerFavicon(get$4(server).id)]),event("error",img,e=>{e.currentTarget.style.display="none"}),replay_events(img),append($$anchor9,img)};if_block(node_7,$$render=>{mcpStore.getServerFavicon(get$4(server).id)&&$$render(consequent)})}var span=sibling(node_7,2),text2=child(span,!0); reset(span);var node_8=sibling(span,2);{var consequent_1=$$anchor9=>{var span_1=root_10$6();append($$anchor9,span_1)};if_block(node_8,$$render=>{get$4(hasError)&&$$render(consequent_1)})}reset(div_1);var node_9=sibling(div_1,2);Switch(node_9,{get checked(){return get$4(isEnabledForChat)},get disabled(){return get$4(hasError)},onclick:e=>e.stopPropagation(),onCheckedChange:()=>toggleServerForChat(get$4(server).id)}),reset(button_1),template_effect($02=>{button_1.disabled=get$4(hasError),set_text( text2,$02)},[()=>getServerLabel(get$4(server))]),append($$anchor8,button_1)}),reset(div),append($$anchor7,div)},$$slots:{footer:!0,default:!0}})}},$$slots:{default:!0}})}),append($$anchor4,fragment_2)},$$slots:{default:!0}})}),append($$anchor2,fragment_1)};if_block(node2,$$render=>{get$4(hasMcpServers)&&get$4(hasEnabledMcpServers)&&get$4(mcpFavicons).length>0&&$$render(consequent_2)})}append($$anchor,fragment),pop()}delegate(["click"]);var root_3$b=from_html(" Tools",1),root_5$a=from_html(" Resources",1),root_7$8=from_html(" Prompts",1),root_9$5=from_html(" Logging",1),root_11$3=from_html(" Completions",1),root_13$6=from_html(" Tasks",1),root_1$b=from_html(" ",1);function McpCapabilitiesBadges($$anchor,$$props){push$1($$props,!0);var fragment=comment$2(),node2=first_child(fragment);{var consequent_6=$$anchor2=>{var fragment_1=root_1$b(),node_1=first_child(fragment_1);{var consequent=$$anchor3=>{Badge($$anchor3,{variant:"outline",class:"h-5 gap-1 \ bg-green-50 px-1.5 text-[10px] dark:bg-green-950",children:($$anchor4,$$slotProps)=>{var fragment_3=root_3$b(),node_2=first_child(fragment_3);Wrench(node_2,{class:"h-3 w-3 text-green-600 dark:text-green-400"}),next$1(),append($$anchor4,fragment_3)},$$slots:{default:!0}})};if_block(node_1,$$render=>{$$props.capabilities.server.tools&&$$render(consequent)})}var node_3=sibling(node_1,2);{var consequent_1=$$anchor3=>{Badge($$anchor3,{variant:"outline",class:"h-5 gap-1 bg-blue-50 px-1.5 text-[10px] d\ ark:bg-blue-950",children:($$anchor4,$$slotProps)=>{var fragment_5=root_5$a(),node_4=first_child(fragment_5);Database(node_4,{class:"h-3 w-3 text-blue-600 dark:text-blue-400"}),next$1(),append($$anchor4,fragment_5)},$$slots:{default:!0}})};if_block(node_3,$$render=>{$$props.capabilities.server.resources&&$$render(consequent_1)})}var node_5=sibling(node_3,2);{var consequent_2=$$anchor3=>{Badge($$anchor3,{variant:"outline",class:"h-5 gap-1 bg-purple-50 px-1.5 text-[10px] dark:bg-purple-950",children:($$anchor4,$$slotProps)=>{ var fragment_7=root_7$8(),node_6=first_child(fragment_7);Message_square(node_6,{class:"h-3 w-3 text-purple-600 dark:text-purple-400"}),next$1(),append($$anchor4,fragment_7)},$$slots:{default:!0}})};if_block(node_5,$$render=>{$$props.capabilities.server.prompts&&$$render(consequent_2)})}var node_7=sibling(node_5,2);{var consequent_3=$$anchor3=>{Badge($$anchor3,{variant:"outline",class:"h-5 gap-1 bg-orange-50 px-1.5 text-[10px] dark:bg-orange-950",children:($$anchor4,$$slotProps)=>{var fragment_9=root_9$5(), node_8=first_child(fragment_9);File_text(node_8,{class:"h-3 w-3 text-orange-600 dark:text-orange-400"}),next$1(),append($$anchor4,fragment_9)},$$slots:{default:!0}})};if_block(node_7,$$render=>{$$props.capabilities.server.logging&&$$render(consequent_3)})}var node_9=sibling(node_7,2);{var consequent_4=$$anchor3=>{Badge($$anchor3,{variant:"outline",class:"h-5 gap-1 bg-cyan-50 px-1.5 text-[10px] dark:bg-cyan-950",children:($$anchor4,$$slotProps)=>{var fragment_11=root_11$3(),node_10=first_child(fragment_11); Sparkles(node_10,{class:"h-3 w-3 text-cyan-600 dark:text-cyan-400"}),next$1(),append($$anchor4,fragment_11)},$$slots:{default:!0}})};if_block(node_9,$$render=>{$$props.capabilities.server.completions&&$$render(consequent_4)})}var node_11=sibling(node_9,2);{var consequent_5=$$anchor3=>{Badge($$anchor3,{variant:"outline",class:"h-5 gap-1 bg-pink-50 px-1.5 text-[10px] dark:bg-pink-950",children:($$anchor4,$$slotProps)=>{var fragment_13=root_13$6(),node_12=first_child(fragment_13);List_checks(node_12, {class:"h-3 w-3 text-pink-600 dark:text-pink-400"}),next$1(),append($$anchor4,fragment_13)},$$slots:{default:!0}})};if_block(node_11,$$render=>{$$props.capabilities.server.tasks&&$$render(consequent_5)})}append($$anchor2,fragment_1)};if_block(node2,$$render=>{$$props.capabilities&&$$render(consequent_6)})}append($$anchor,fragment),pop()}var root_6$9=from_html(' '),root_3$a=from_html(" ",1),root_8$6=from_html('
        '),root_7$7=from_html('
        '),root_2$e=from_html('
        ',1);function McpConnectionLogs($$anchor,$$props){push$1($$props,!0);let defaultExpanded=prop($$props,"defaultExpanded",3,!1),isExpanded=user_derived(defaultExpanded);var fragment=comment$2(),node2=first_child(fragment);{var consequent_2=$$anchor2=>{var fragment_1=comment$2(), node_1=first_child(fragment_1);component(node_1,()=>Collapsible,($$anchor3,Collapsible_Root)=>{Collapsible_Root($$anchor3,{get class(){return $$props.class},get open(){return get$4(isExpanded)},set open($$value){set$1(isExpanded,$$value)},children:($$anchor4,$$slotProps)=>{var fragment_2=root_2$e(),div=first_child(fragment_2),node_2=child(div);component(node_2,()=>Collapsible_trigger,($$anchor5,Collapsible_Trigger)=>{Collapsible_Trigger($$anchor5,{class:"flex w-full items-center gap-1 text-xs te\ xt-muted-foreground hover:text-foreground",children:($$anchor6,$$slotProps2)=>{var fragment_3=root_3$a(),node_3=first_child(fragment_3);{var consequent=$$anchor7=>{Chevron_down($$anchor7,{class:"h-3.5 w-3.5"})},alternate=$$anchor7=>{Chevron_right($$anchor7,{class:"h-3.5 w-3.5"})};if_block(node_3,$$render=>{get$4(isExpanded)?$$render(consequent):$$render(alternate,!1)})}var span=sibling(node_3,2),text2=child(span);reset(span);var node_4=sibling(span,2);{var consequent_1=$$anchor7=>{var span_1=root_6$9(), text_1=child(span_1);reset(span_1),template_effect(()=>set_text(text_1,`· Connected in ${$$props.connectionTimeMs??""}ms`)),append($$anchor7,span_1)};if_block(node_4,$$render=>{$$props.connectionTimeMs!==void 0&&$$render(consequent_1)})}template_effect(()=>set_text(text2,`Connection Log (${$$props.logs.length??""})`)),append($$anchor6,fragment_3)},$$slots:{default:!0}})}),reset(div);var node_5=sibling(div,2);component(node_5,()=>Collapsible_content,($$anchor5,Collapsible_Content)=>{Collapsible_Content( $$anchor5,{class:"mt-2",children:($$anchor6,$$slotProps2)=>{var div_1=root_7$7();each(div_1,21,()=>$$props.logs,log=>log.timestamp.getTime()+log.message,($$anchor7,log)=>{const Icon2=user_derived(()=>getMcpLogLevelIcon(get$4(log).level));var div_2=root_8$6(),span_2=child(div_2),text_2=child(span_2,!0);reset(span_2);var node_6=sibling(span_2,2);component(node_6,()=>get$4(Icon2),($$anchor8,Icon_1)=>{Icon_1($$anchor8,{class:"mt-0.5 h-3 w-3 shrink-0"})});var span_3=sibling(node_6,2),text_3=child(span_3, !0);reset(span_3),reset(div_2),template_effect(($0,$1)=>{set_class(div_2,1,$0),set_text(text_2,$1),set_text(text_3,get$4(log).message)},[()=>clsx(cn$1("flex items-start gap-1.5",getMcpLogLevelClass(get$4(log).level))),()=>formatTime(get$4(log).timestamp)]),append($$anchor7,div_2)}),reset(div_1),append($$anchor6,div_1)},$$slots:{default:!0}})}),append($$anchor4,fragment_2)},$$slots:{default:!0}})}),append($$anchor2,fragment_1)};if_block(node2,$$render=>{$$props.logs.length>0&&$$render(consequent_2)})} append($$anchor,fragment),pop()}var root_1$a=from_html('

        '),root_3$9=from_html('(Run
        llama-server
        with
        --webui-mcp-proxy
        flag)
        '),root_2$d=from_html(''),root$k=from_html('
        ');function McpServerForm($$anchor,$$props){push$1($$props,!0);let useProxy=prop($$props,"useProxy",3,!1),urlError=prop($$props,"urlError",3,null),id2=prop($$props,"id",3,"server"),isWebSocket=user_derived(()=>$$props.url.toLowerCase().startsWith(UrlProtocol.WEBSOCKET)||$$props.url.toLowerCase().startsWith(UrlProtocol.WEBSOCKET_SECURE)),headerPairs=user_derived(()=>parseHeadersToArray($$props.headers));function updateHeaderPairs(newPairs){ set$1(headerPairs,newPairs),$$props.onHeadersChange(serializeHeaders(newPairs))}var div=root$k(),div_1=child(div),label=child(div_1),node2=sibling(label,2);{let $0=user_derived(()=>urlError()?"border-destructive":"");Input(node2,{get id(){return`server-url-${id2()??""}`},type:"url",get placeholder(){return MCP_SERVER_URL_PLACEHOLDER},get value(){return $$props.url},oninput:e=>$$props.onUrlChange(e.currentTarget.value),get class(){return get$4($0)}})}var node_1=sibling(node2,2);{var consequent=$$anchor2=>{ var p2=root_1$a(),text2=child(p2,!0);reset(p2),template_effect(()=>set_text(text2,urlError())),append($$anchor2,p2)};if_block(node_1,$$render=>{urlError()&&$$render(consequent)})}var node_2=sibling(node_1,2);{var consequent_2=$$anchor2=>{var label_1=root_2$d();let classes;var node_3=child(label_1);{let $0=user_derived(()=>!mcpStore.isProxyAvailable);Switch(node_3,{class:"mt-1",get id(){return`use-proxy-${id2()??""}`},get checked(){return useProxy()},get disabled(){return get$4($0)},onCheckedChange:checked=>$$props. onUseProxyChange?.(checked)})}var span=sibling(node_3,2),node_4=sibling(child(span),4);{var consequent_1=$$anchor3=>{var span_1=root_3$9();append($$anchor3,span_1)};if_block(node_4,$$render=>{mcpStore.isProxyAvailable||$$render(consequent_1)})}reset(span),reset(label_1),template_effect(()=>classes=set_class(label_1,1,"mt-3 flex items-start gap-2",null,classes,{"cursor-pointer":mcpStore.isProxyAvailable,"opacity-80":!mcpStore.isProxyAvailable})),append($$anchor2,label_1)};if_block(node_2,$$render=>{ !get$4(isWebSocket)&&$$props.onUseProxyChange&&$$render(consequent_2)})}reset(div_1);var node_5=sibling(div_1,2);KeyValuePairs(node_5,{class:"mt-2",get pairs(){return get$4(headerPairs)},onPairsChange:updateHeaderPairs,keyPlaceholder:"Header name",valuePlaceholder:"Value",addButtonLabel:"Add",emptyMessage:"No custom headers configured.",sectionLabel:"Custom Headers",sectionLabelOptional:!0}),reset(div),template_effect(()=>set_attribute(label,"for",`server-url-${id2()??""}`)),append($$anchor,div), pop()}var root$j=from_svg('');function McpLogo($$anchor,$$props){let className=prop($$props,"class",3,""),style2=prop($$props,"style",3,"");var svg2=root$j();template_effect(()=>{set_class(svg2,0,clsx(className())),set_style(svg2,style2())}),append($$anchor,svg2)}var root_4$4=from_html('

        '),root_5$9=from_html('

        '),root_6$8=from_html('
        ',1),root_7$6=from_html(" ",1),root_13$5=from_html('
        '),root_3$8=from_html('
        ',1),root$i=from_html(" ",1);function McpServerCard($$anchor,$$props){push$1($$props,!0);let healthState=user_derived(()=>mcpStore.getHealthCheckState($$props.server.id)),displayName=user_derived(()=>mcpStore.getServerLabel($$props.server)),isIdle=user_derived(()=>get$4(healthState).status===HealthCheckStatus.IDLE),isHealthChecking=user_derived(()=>get$4(healthState). status===HealthCheckStatus.CONNECTING),isConnected=user_derived(()=>get$4(healthState).status===HealthCheckStatus.SUCCESS),isError=user_derived(()=>get$4(healthState).status===HealthCheckStatus.ERROR),showSkeleton=user_derived(()=>get$4(isIdle)||get$4(isHealthChecking)),errorMessage=user_derived(()=>get$4(healthState).status===HealthCheckStatus.ERROR?get$4(healthState).message:void 0),tools=user_derived(()=>get$4(healthState).status===HealthCheckStatus.SUCCESS?get$4(healthState).tools:[]),connectionLogs=user_derived( ()=>get$4(healthState).status===HealthCheckStatus.CONNECTING||get$4(healthState).status===HealthCheckStatus.SUCCESS||get$4(healthState).status===HealthCheckStatus.ERROR?get$4(healthState).logs:[]),successState=user_derived(()=>get$4(healthState).status===HealthCheckStatus.SUCCESS?get$4(healthState):null),serverInfo=user_derived(()=>get$4(successState)?.serverInfo),capabilities=user_derived(()=>get$4(successState)?.capabilities),transportType=user_derived(()=>get$4(successState)?.transportType),protocolVersion=user_derived( ()=>get$4(successState)?.protocolVersion),connectionTimeMs=user_derived(()=>get$4(successState)?.connectionTimeMs),instructions=user_derived(()=>get$4(successState)?.instructions),isEditing2=user_derived(()=>!$$props.server.url.trim()),showDeleteDialog=state$1(!1),editFormRef=state$1(null);function handleHealthCheck(){mcpStore.runHealthCheck($$props.server)}async function startEditing(){set$1(isEditing2,!0),await tick(),get$4(editFormRef)?.setInitialValues($$props.server.url,$$props.server.headers|| "",$$props.server.useProxy||!1)}function cancelEditing(){$$props.server.url.trim()?set$1(isEditing2,!1):$$props.onDelete()}function saveEditing(url2,headers,useProxy){$$props.onUpdate({url:url2,headers:headers||void 0,useProxy}),set$1(isEditing2,!1),$$props.server.enabled&&url2&&setTimeout(()=>mcpStore.runHealthCheck({...$$props.server,url:url2,useProxy}),100)}function handleDeleteClick(){set$1(showDeleteDialog,!0)}var fragment=root$i(),node2=first_child(fragment);component(node2,()=>Card,($$anchor2,Card_Root)=>{ Card_Root($$anchor2,{class:"!gap-3 bg-muted/30 p-4",children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{var consequent=$$anchor4=>{bind_this(McpServerCardEditForm($$anchor4,{get serverId(){return $$props.server.id},get serverUrl(){return $$props.server.url},get serverUseProxy(){return $$props.server.useProxy},onSave:saveEditing,onCancel:cancelEditing}),$$value=>set$1(editFormRef,$$value,!0),()=>get$4(editFormRef))},alternate_2=$$anchor4=>{var fragment_3=root_3$8(), node_2=first_child(fragment_3);{let $0=user_derived(()=>$$props.enabled??$$props.server.enabled);McpServerCardHeader(node_2,{get displayName(){return get$4(displayName)},get faviconUrl(){return $$props.faviconUrl},get enabled(){return get$4($0)},get disabled(){return get$4(isError)},get onToggle(){return $$props.onToggle},get serverInfo(){return get$4(serverInfo)},get capabilities(){return get$4(capabilities)},get transportType(){return get$4(transportType)}})}var node_3=sibling(node_2,2);{var consequent_1=$$anchor5=>{ var p2=root_4$4(),text2=child(p2,!0);reset(p2),template_effect(()=>set_text(text2,get$4(errorMessage))),append($$anchor5,p2)};if_block(node_3,$$render=>{get$4(isError)&&get$4(errorMessage)&&$$render(consequent_1)})}var node_4=sibling(node_3,2);{var consequent_2=$$anchor5=>{var p_1=root_5$9(),text_1=child(p_1,!0);reset(p_1),template_effect(()=>set_text(text_1,get$4(serverInfo).description)),append($$anchor5,p_1)};if_block(node_4,$$render=>{get$4(isConnected)&&get$4(serverInfo)?.description&&$$render( consequent_2)})}var div=sibling(node_4,2),node_5=child(div);{var consequent_3=$$anchor5=>{var fragment_4=root_6$8(),div_1=first_child(fragment_4),div_2=child(div_1),node_6=child(div_2);Skeleton(node_6,{class:"h-4 w-4 rounded"});var node_7=sibling(node_6,2);Skeleton(node_7,{class:"h-3 w-24"}),reset(div_2);var div_3=sibling(div_2,2),node_8=child(div_3);Skeleton(node_8,{class:"h-5 w-16 rounded-full"});var node_9=sibling(node_8,2);Skeleton(node_9,{class:"h-5 w-20 rounded-full"});var node_10=sibling( node_9,2);Skeleton(node_10,{class:"h-5 w-14 rounded-full"}),reset(div_3),reset(div_1);var div_4=sibling(div_1,2),div_5=child(div_4),node_11=child(div_5);Skeleton(node_11,{class:"h-4 w-4 rounded"});var node_12=sibling(node_11,2);Skeleton(node_12,{class:"h-3 w-32"}),reset(div_5),reset(div_4),append($$anchor5,fragment_4)},alternate=$$anchor5=>{var fragment_5=root_7$6(),node_13=first_child(fragment_5);{var consequent_4=$$anchor6=>{McpServerInfo($$anchor6,{get instructions(){return get$4(instructions)}})}; if_block(node_13,$$render=>{get$4(isConnected)&&get$4(instructions)&&$$render(consequent_4)})}var node_14=sibling(node_13,2);{var consequent_5=$$anchor6=>{McpServerCardToolsList($$anchor6,{get tools(){return get$4(tools)}})};if_block(node_14,$$render=>{get$4(tools).length>0&&$$render(consequent_5)})}var node_15=sibling(node_14,2);{var consequent_6=$$anchor6=>{McpConnectionLogs($$anchor6,{get logs(){return get$4(connectionLogs)},get connectionTimeMs(){return get$4(connectionTimeMs)}})};if_block(node_15, $$render=>{get$4(connectionLogs).length>0&&$$render(consequent_6)})}append($$anchor5,fragment_5)};if_block(node_5,$$render=>{get$4(showSkeleton)?$$render(consequent_3):$$render(alternate,!1)})}reset(div);var div_6=sibling(div,2),node_16=child(div_6);{var consequent_7=$$anchor5=>{Skeleton($$anchor5,{class:"h-3 w-28"})},alternate_1=$$anchor5=>{var fragment_10=comment$2(),node_17=first_child(fragment_10);{var consequent_8=$$anchor6=>{var div_7=root_13$5(),span=child(div_7),text_2=child(span);reset( span),reset(div_7),template_effect(()=>set_text(text_2,`Protocol version: ${get$4(protocolVersion)??""}`)),append($$anchor6,div_7)};if_block(node_17,$$render=>{get$4(protocolVersion)&&$$render(consequent_8)},!0)}append($$anchor5,fragment_10)};if_block(node_16,$$render=>{get$4(showSkeleton)?$$render(consequent_7):$$render(alternate_1,!1)})}var node_18=sibling(node_16,2);McpServerCardActions(node_18,{get isHealthChecking(){return get$4(isHealthChecking)},onEdit:startEditing,onRefresh:handleHealthCheck, onDelete:handleDeleteClick}),reset(div_6),append($$anchor4,fragment_3)};if_block(node_1,$$render=>{get$4(isEditing2)?$$render(consequent):$$render(alternate_2,!1)})}append($$anchor3,fragment_1)},$$slots:{default:!0}})});var node_19=sibling(node2,2);McpServerCardDeleteDialog(node_19,{get displayName(){return get$4(displayName)},onOpenChange:open2=>set$1(showDeleteDialog,open2,!0),get onConfirm(){return $$props.onDelete},get open(){return get$4(showDeleteDialog)},set open($$value){set$1(showDeleteDialog, $$value,!0)}}),append($$anchor,fragment),pop()}var root_1$9=from_html(''),root_2$c=from_html('
        '),root_5$8=from_html(''),root_8$5=from_html(" ",1),root_6$7=from_html('
        '),root$h=from_html('

        ');function McpServerCardHeader($$anchor,$$props){push$1($$props,!0);let disabled=prop($$props,"disabled",3,!1);var div=root$h(),div_1=child(div),div_2=child( div_1),div_3=child(div_2),node2=child(div_3);{var consequent=$$anchor2=>{var img=root_1$9();template_effect(()=>set_attribute(img,"src",$$props.faviconUrl)),event("error",img,e=>{e.currentTarget.style.display="none"}),replay_events(img),append($$anchor2,img)},alternate=$$anchor2=>{var div_4=root_2$c(),node_1=child(div_4);Cable(node_1,{class:"h-3 w-3 text-muted-foreground"}),reset(div_4),append($$anchor2,div_4)};if_block(node2,$$render=>{$$props.faviconUrl?$$render(consequent):$$render(alternate, !1)})}var p2=sibling(node2,2),text2=child(p2,!0);reset(p2);var node_2=sibling(p2,2);{var consequent_1=$$anchor2=>{Badge($$anchor2,{variant:"secondary",class:"h-4 min-w-0 truncate px-1 text-[10px]",children:($$anchor3,$$slotProps)=>{next$1();var text_1=text$8();template_effect(()=>set_text(text_1,`v${$$props.serverInfo.version??""}`)),append($$anchor3,text_1)},$$slots:{default:!0}})};if_block(node_2,$$render=>{$$props.serverInfo?.version&&$$render(consequent_1)})}var node_3=sibling(node_2,2);{var consequent_2=$$anchor2=>{ var a=root_5$8(),node_4=child(a);External_link(node_4,{class:"h-3 w-3"}),reset(a),template_effect(()=>set_attribute(a,"href",$$props.serverInfo.websiteUrl)),append($$anchor2,a)};if_block(node_3,$$render=>{$$props.serverInfo?.websiteUrl&&$$render(consequent_2)})}reset(div_3);var node_5=sibling(div_3,2);{var consequent_6=$$anchor2=>{var div_5=root_6$7(),node_6=child(div_5);{var consequent_4=$$anchor3=>{const TransportIcon=user_derived(()=>MCP_TRANSPORT_ICONS[$$props.transportType]);Badge($$anchor3, {variant:"outline",class:"h-5 gap-1 px-1.5 text-[10px]",children:($$anchor4,$$slotProps)=>{var fragment_3=root_8$5(),node_7=first_child(fragment_3);{var consequent_3=$$anchor5=>{var fragment_4=comment$2(),node_8=first_child(fragment_4);component(node_8,()=>get$4(TransportIcon),($$anchor6,TransportIcon_1)=>{TransportIcon_1($$anchor6,{class:"h-3 w-3"})}),append($$anchor5,fragment_4)};if_block(node_7,$$render=>{get$4(TransportIcon)&&$$render(consequent_3)})}var text_2=sibling(node_7);template_effect( ()=>set_text(text_2,` ${(MCP_TRANSPORT_LABELS[$$props.transportType]||$$props.transportType)??""}`)),append($$anchor4,fragment_3)},$$slots:{default:!0}})};if_block(node_6,$$render=>{$$props.transportType&&$$render(consequent_4)})}var node_9=sibling(node_6,2);{var consequent_5=$$anchor3=>{McpCapabilitiesBadges($$anchor3,{get capabilities(){return $$props.capabilities}})};if_block(node_9,$$render=>{$$props.capabilities&&$$render(consequent_5)})}reset(div_5),append($$anchor2,div_5)};if_block(node_5, $$render=>{($$props.capabilities||$$props.transportType)&&$$render(consequent_6)})}reset(div_2);var div_6=sibling(div_2,2),node_10=child(div_6);Switch(node_10,{get checked(){return $$props.enabled},get disabled(){return disabled()},get onCheckedChange(){return $$props.onToggle}}),reset(div_6),reset(div_1),reset(div),template_effect(()=>set_text(text2,$$props.displayName)),append($$anchor,div),pop()}var root$g=from_html('
        ');function McpServerCardActions($$anchor,$$props){ var div=root$g(),node2=child(div);Button(node2,{variant:"ghost",size:"icon",class:"h-7 w-7",get onclick(){return $$props.onEdit},"aria-label":"Edit",children:($$anchor2,$$slotProps)=>{Pencil($$anchor2,{class:"h-3.5 w-3.5"})},$$slots:{default:!0}});var node_1=sibling(node2,2);Button(node_1,{variant:"ghost",size:"icon",class:"h-7 w-7",get onclick(){return $$props.onRefresh},get disabled(){return $$props.isHealthChecking},"aria-label":"Refresh",children:($$anchor2,$$slotProps)=>{Refresh_cw($$anchor2, {class:"h-3.5 w-3.5"})},$$slots:{default:!0}});var node_2=sibling(node_1,2);Button(node_2,{variant:"ghost",size:"icon",class:"hover:text-destructive-foreground h-7 w-7 text-destructive hover:bg-destructive/10",get onclick(){return $$props.onDelete},"aria-label":"Delete",children:($$anchor2,$$slotProps)=>{Trash_2($$anchor2,{class:"h-3.5 w-3.5"})},$$slots:{default:!0}}),reset(div),append($$anchor,div)}var root_2$b=from_html(" ",1),root_8$4=from_html('

        '),root_6$6=from_html("
        "),root_5$7=from_html('
        '),root_1$8=from_html(" ",1);function McpServerCardToolsList($$anchor,$$props){push$1($$props,!0);let isExpanded=state$1(!1),toolsCount=user_derived(()=>$$props.tools.length);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Collapsible,($$anchor2,Collapsible_Root)=>{Collapsible_Root($$anchor2,{get open(){return get$4(isExpanded)}, set open($$value){set$1(isExpanded,$$value,!0)},children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$8(),node_1=first_child(fragment_1);component(node_1,()=>Collapsible_trigger,($$anchor4,Collapsible_Trigger)=>{Collapsible_Trigger($$anchor4,{class:"flex w-full items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$b(),node_2=first_child(fragment_2);{var consequent=$$anchor6=>{Chevron_down($$anchor6,{class:"h-3.5 w-3.5"})}, alternate=$$anchor6=>{Chevron_right($$anchor6,{class:"h-3.5 w-3.5"})};if_block(node_2,$$render=>{get$4(isExpanded)?$$render(consequent):$$render(alternate,!1)})}var span=sibling(node_2,2),text2=child(span);reset(span),template_effect(()=>set_text(text2,`${get$4(toolsCount)??""} tools available · Show details`)),append($$anchor5,fragment_2)},$$slots:{default:!0}})});var node_3=sibling(node_1,2);component(node_3,()=>Collapsible_content,($$anchor4,Collapsible_Content)=>{Collapsible_Content($$anchor4, {class:"mt-2",children:($$anchor5,$$slotProps2)=>{var div=root_5$7();each(div,21,()=>$$props.tools,tool=>tool.name,($$anchor6,tool)=>{var div_1=root_6$6(),node_4=child(div_1);Badge(node_4,{variant:"secondary",children:($$anchor7,$$slotProps3)=>{next$1();var text_1=text$8();template_effect(()=>set_text(text_1,get$4(tool).name)),append($$anchor7,text_1)},$$slots:{default:!0}});var node_5=sibling(node_4,2);{var consequent_1=$$anchor7=>{var p2=root_8$4(),text_2=child(p2,!0);reset(p2),template_effect( ()=>set_text(text_2,get$4(tool).description)),append($$anchor7,p2)};if_block(node_5,$$render=>{get$4(tool).description&&$$render(consequent_1)})}reset(div_1),append($$anchor6,div_1)}),reset(div),append($$anchor5,div)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root$f=from_html('

        Configure Server

        ');function McpServerCardEditForm($$anchor,$$props){ push$1($$props,!0);let serverUseProxy=prop($$props,"serverUseProxy",3,!1),editUrl=user_derived(()=>$$props.serverUrl),editHeaders=state$1(""),editUseProxy=user_derived(serverUseProxy),urlError=user_derived(()=>{if(!get$4(editUrl).trim())return"URL is required";try{return new URL(get$4(editUrl)),null}catch{return"Invalid URL format"}}),canSave=user_derived(()=>!get$4(urlError));function handleSave(){get$4(canSave)&&$$props.onSave(get$4(editUrl).trim(),get$4(editHeaders).trim(),get$4(editUseProxy))} function setInitialValues(url2,headers,useProxy){set$1(editUrl,url2),set$1(editHeaders,headers,!0),set$1(editUseProxy,useProxy)}var $$exports={setInitialValues},div=root$f(),node2=sibling(child(div),2);{let $0=user_derived(()=>get$4(editUrl)?get$4(urlError):null);McpServerForm(node2,{get url(){return get$4(editUrl)},get headers(){return get$4(editHeaders)},get useProxy(){return get$4(editUseProxy)},onUrlChange:v=>set$1(editUrl,v),onHeadersChange:v=>set$1(editHeaders,v,!0),onUseProxyChange:v=>set$1( editUseProxy,v),get urlError(){return get$4($0)},get id(){return $$props.serverId}})}var div_1=sibling(node2,2),node_1=child(div_1);Button(node_1,{variant:"secondary",size:"sm",get onclick(){return $$props.onCancel},children:($$anchor2,$$slotProps)=>{next$1();var text2=text$8("Cancel");append($$anchor2,text2)},$$slots:{default:!0}});var node_2=sibling(node_1,2);{let $0=user_derived(()=>!get$4(canSave));Button(node_2,{size:"sm",onclick:handleSave,get disabled(){return get$4($0)},children:($$anchor2,$$slotProps)=>{ next$1();var text_1=text$8();template_effect($02=>set_text(text_1,$02),[()=>$$props.serverUrl.trim()?"Update":"Add"]),append($$anchor2,text_1)},$$slots:{default:!0}})}return reset(div_1),reset(div),append($$anchor,div),pop($$exports)}var root_5$6=from_html(`Are you sure you want to delete ? This action cannot be undone.`,1),root_3$7=from_html(" ",1),root_6$5=from_html(" ",1),root_2$a=from_html(" ",1);function McpServerCardDeleteDialog($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$3,($$anchor2,AlertDialog_Root)=>{AlertDialog_Root($$anchor2,{get onOpenChange(){return $$props.onOpenChange},get open(){return open2()},set open($$value){open2($$value)},children:($$anchor3,$$slotProps)=>{ var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Alert_dialog_content,($$anchor4,AlertDialog_Content)=>{AlertDialog_Content($$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$a(),node_2=first_child(fragment_2);component(node_2,()=>Alert_dialog_header,($$anchor6,AlertDialog_Header)=>{AlertDialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$7(),node_3=first_child(fragment_3);component(node_3,()=>Alert_dialog_title,($$anchor8,AlertDialog_Title)=>{ AlertDialog_Title($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text2=text$8("Delete Server");append($$anchor9,text2)},$$slots:{default:!0}})});var node_4=sibling(node_3,2);component(node_4,()=>Alert_dialog_description,($$anchor8,AlertDialog_Description)=>{AlertDialog_Description($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var fragment_4=root_5$6(),strong2=sibling(first_child(fragment_4)),text_1=child(strong2,!0);reset(strong2),next$1(),template_effect(()=>set_text(text_1, $$props.displayName)),append($$anchor9,fragment_4)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var node_5=sibling(node_2,2);component(node_5,()=>Alert_dialog_footer,($$anchor6,AlertDialog_Footer)=>{AlertDialog_Footer($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_5=root_6$5(),node_6=first_child(fragment_5);component(node_6,()=>Alert_dialog_cancel,($$anchor8,AlertDialog_Cancel)=>{AlertDialog_Cancel($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1(); var text_2=text$8("Cancel");append($$anchor9,text_2)},$$slots:{default:!0}})});var node_7=sibling(node_6,2);component(node_7,()=>Alert_dialog_action,($$anchor8,AlertDialog_Action)=>{AlertDialog_Action($$anchor8,{class:"text-destructive-foreground bg-destructive hover:bg-destructive/90",get onclick(){return $$props.onConfirm},children:($$anchor9,$$slotProps4)=>{next$1();var text_3=text$8("Delete");append($$anchor9,text_3)},$$slots:{default:!0}})}),append($$anchor7,fragment_5)},$$slots:{default:!0}})}), append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_1$7=from_html('
        ',1);function McpServerCardSkeleton($$anchor){Card($$anchor,{class:"\ grid gap-3 p-4",children:($$anchor2,$$slotProps)=>{var fragment_1=root_1$7(),div=first_child(fragment_1),div_1=child(div),node2=child(div_1);Skeleton(node2,{class:"h-5 w-5 rounded"});var node_1=sibling(node2,2);Skeleton(node_1,{class:"h-5 w-28"});var node_2=sibling(node_1,2);Skeleton(node_2,{class:"h-5 w-12 rounded-full"}),reset(div_1);var node_3=sibling(div_1,2);Skeleton(node_3,{class:"h-6 w-11 rounded-full"}),reset(div);var div_2=sibling(div,2),node_4=child(div_2);Skeleton(node_4,{class:"h-5 w\ -14 rounded-full"});var node_5=sibling(node_4,2);Skeleton(node_5,{class:"h-5 w-12 rounded-full"});var node_6=sibling(node_5,2);Skeleton(node_6,{class:"h-5 w-16 rounded-full"}),reset(div_2);var div_3=sibling(div_2,2),node_7=child(div_3);Skeleton(node_7,{class:"h-4 w-40"});var node_8=sibling(node_7,2);Skeleton(node_8,{class:"h-4 w-52"}),reset(div_3);var node_9=sibling(div_3,2);Skeleton(node_9,{class:"h-3.5 w-36"});var div_4=sibling(node_9,2),node_10=child(div_4);Skeleton(node_10,{class:"h-8 w-8 ro\ unded"});var node_11=sibling(node_10,2);Skeleton(node_11,{class:"h-8 w-8 rounded"});var node_12=sibling(node_11,2);Skeleton(node_12,{class:"h-8 w-8 rounded"}),reset(div_4),append($$anchor2,fragment_1)},$$slots:{default:!0}})}var root_3$6=from_html(" Server instructions",1),root_6$4=from_html('

        '),root_2$9=from_html(" ",1);function McpServerInfo($$anchor,$$props){let isExpanded=state$1(!1);var fragment=comment$2(), node2=first_child(fragment);{var consequent_1=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Collapsible,($$anchor3,Collapsible_Root)=>{Collapsible_Root($$anchor3,{get class(){return $$props.class},get open(){return get$4(isExpanded)},set open($$value){set$1(isExpanded,$$value,!0)},children:($$anchor4,$$slotProps)=>{var fragment_2=root_2$9(),node_2=first_child(fragment_2);component(node_2,()=>Collapsible_trigger,($$anchor5,Collapsible_Trigger)=>{Collapsible_Trigger( $$anchor5,{class:"flex w-full items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:($$anchor6,$$slotProps2)=>{var fragment_3=root_3$6(),node_3=first_child(fragment_3);{var consequent=$$anchor7=>{Chevron_down($$anchor7,{class:"h-3.5 w-3.5"})},alternate=$$anchor7=>{Chevron_right($$anchor7,{class:"h-3.5 w-3.5"})};if_block(node_3,$$render=>{get$4(isExpanded)?$$render(consequent):$$render(alternate,!1)})}next$1(2),append($$anchor6,fragment_3)},$$slots:{default:!0}})});var node_4=sibling( node_2,2);component(node_4,()=>Collapsible_content,($$anchor5,Collapsible_Content)=>{Collapsible_Content($$anchor5,{class:"mt-2",children:($$anchor6,$$slotProps2)=>{var p2=root_6$4(),text2=child(p2,!0);reset(p2),template_effect(()=>set_text(text2,$$props.instructions)),append($$anchor6,p2)},$$slots:{default:!0}})}),append($$anchor4,fragment_2)},$$slots:{default:!0}})}),append($$anchor2,fragment_1)};if_block(node2,$$render=>{$$props.instructions&&$$render(consequent_1)})}append($$anchor,fragment)} var root$e=from_html('

        Available resources

        ');function McpResourceBrowserHeader($$anchor,$$props){push$1($$props,!0);let searchQuery=prop($$props,"searchQuery",3,"");var div=root$e(),div_1=child(div),node2=child(div_1);SearchInput(node2,{placeholder:"Search resources...",get value(){return searchQuery()},onInput:value=>$$props.onSearch?.(value)});var node_1=sibling(node2, 2);Button(node_1,{variant:"ghost",size:"sm",class:"h-8 w-8 p-0",get onclick(){return $$props.onRefresh},get disabled(){return $$props.isLoading},title:"Refresh resources",children:($$anchor2,$$slotProps)=>{var fragment=comment$2(),node_2=first_child(fragment);{var consequent=$$anchor3=>{Loader_circle($$anchor3,{class:"h-4 w-4 animate-spin"})},alternate=$$anchor3=>{Refresh_cw($$anchor3,{class:"h-4 w-4"})};if_block(node_2,$$render=>{$$props.isLoading?$$render(consequent):$$render(alternate,!1)})}append( $$anchor2,fragment)},$$slots:{default:!0}}),reset(div_1),next$1(2),reset(div),append($$anchor,div),pop()}var root$d=from_html('
        ');function McpResourceBrowserEmptyState($$anchor,$$props){var div=root$d(),node2=child(div);{var consequent=$$anchor2=>{var text2=text$8("Loading resources...");append($$anchor2,text2)},alternate=$$anchor2=>{var text_1=text$8("No resources available");append($$anchor2,text_1)};if_block(node2,$$render=>{ $$props.isLoading?$$render(consequent):$$render(alternate,!1)})}reset(div),append($$anchor,div)}function resourceMatchesSearch(resource,query){return resource.title?.toLowerCase().includes(query)||resource.uri.toLowerCase().includes(query)}function buildResourceTree(resourceList,serverName,searchQuery){const root2={name:"root",children:new Map};if(!searchQuery||!searchQuery.trim()){for(const resource of resourceList){const pathParts=parseResourcePath(resource.uri);let current2=root2;for(let i=0;i< pathParts.length-1;i++){const part=pathParts[i];current2.children.has(part)||current2.children.set(part,{name:part,children:new Map}),current2=current2.children.get(part)}const fileName=pathParts[pathParts.length-1]||resource.name;current2.children.set(resource.uri,{name:fileName,resource:{...resource,serverName},children:new Map})}return root2}const query=searchQuery.toLowerCase();for(const resource of resourceList){if(!resourceMatchesSearch(resource,query))continue;const pathParts=parseResourcePath( resource.uri);let current2=root2;for(let i=0;i0}return cleanupEmptyFolders(root2),root2}function countTreeResources(node2){if(node2.resource)return 1;let count=0;for(const child2 of node2.children.values())count+=countTreeResources(child2);return count}function sortTreeChildren(children){return children.sort((a,b)=>{const aIsFolder=!a.resource&&a.children.size>0,bIsFolder=!b. resource&&b.children.size>0;return aIsFolder&&!bIsFolder?-1:!aIsFolder&&bIsFolder?1:a.name.localeCompare(b.name)})}var root_4$3=from_html(' ',1),root_7$5=from_html('
        '),root_3$5=from_html(" ",1),root_10$5=from_html('
        '),root_16$1=from_html(''),root_13$4=from_html(' ) ',1),root_20$2=from_html('
        '),root_22$2=from_html('
        No resources'),root_27=from_html('
        '),root_28=from_html(''),root_26$1=from_html('
        Templates
        ',1),root_23=from_html(" ",1),root_19=from_html('
        '),root_12$2=from_html(" ",1);function McpResourceBrowserServerItem($$anchor,$$props){ push$1($$props,!0);const renderTreeNode=($$anchor2,node2=noop$3,depth=noop$3,parentPath=noop$3)=>{const isFolder=user_derived(()=>!node2().resource&&node2().children.size>0),folderId=user_derived(()=>`${$$props.serverName}:${parentPath()}/${node2().name}`),isFolderExpanded=user_derived(()=>$$props.expandedFolders.has(get$4(folderId)));var fragment=comment$2(),node_1=first_child(fragment);{var consequent_1=$$anchor3=>{const folderCount=user_derived(()=>countTreeResources(node2()));var fragment_1=comment$2(), node_2=first_child(fragment_1);component(node_2,()=>Collapsible,($$anchor4,Collapsible_Root)=>{Collapsible_Root($$anchor4,{get open(){return get$4(isFolderExpanded)},onOpenChange:()=>$$props.onToggleFolder(get$4(folderId)),children:($$anchor5,$$slotProps)=>{var fragment_2=root_3$5(),node_3=first_child(fragment_2);component(node_3,()=>Collapsible_trigger,($$anchor6,Collapsible_Trigger)=>{Collapsible_Trigger($$anchor6,{class:"flex w-full items-center gap-2 rounded px-2 py-1 text-sm hover:bg-muted/\ 50",children:($$anchor7,$$slotProps2)=>{var fragment_3=root_4$3(),node_4=first_child(fragment_3);{var consequent=$$anchor8=>{Chevron_down($$anchor8,{class:"h-3 w-3"})},alternate=$$anchor8=>{Chevron_right($$anchor8,{class:"h-3 w-3"})};if_block(node_4,$$render=>{get$4(isFolderExpanded)?$$render(consequent):$$render(alternate,!1)})}var node_5=sibling(node_4,2);Folder_open(node_5,{class:"h-3.5 w-3.5 text-muted-foreground"});var span=sibling(node_5,2),text2=child(span,!0);reset(span);var span_1=sibling( span,2),text_1=child(span_1);reset(span_1),template_effect(()=>{set_text(text2,node2().name),set_text(text_1,`(${get$4(folderCount)??""})`)}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var node_6=sibling(node_3,2);component(node_6,()=>Collapsible_content,($$anchor6,Collapsible_Content)=>{Collapsible_Content($$anchor6,{children:($$anchor7,$$slotProps2)=>{var div=root_7$5();each(div,21,()=>sortTreeChildren([...node2().children.values()]),child2=>child2.resource?.uri||`${$$props.serverName}\ :${parentPath()}/${node2().name}/${child2.name}`,($$anchor8,child2)=>{renderTreeNode($$anchor8,()=>get$4(child2),()=>depth()+1,()=>`${parentPath()}/${node2().name}`)}),reset(div),append($$anchor7,div)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},alternate_1=$$anchor3=>{var fragment_7=comment$2(),node_7=first_child(fragment_7);{var consequent_3=$$anchor4=>{const resource=user_derived(()=>node2().resource),ResourceIcon=user_derived( ()=>getResourceIcon(get$4(resource).mimeType,get$4(resource).uri)),isSelected=user_derived(()=>isResourceSelected(get$4(resource))),resourceDisplayName=user_derived(()=>get$4(resource).title||getDisplayName(node2().name));var div_1=root_10$5(),node_8=child(div_1);{var consequent_2=$$anchor5=>{Checkbox($$anchor5,{get checked(){return get$4(isSelected)},onCheckedChange:checked=>handleCheckboxChange(get$4(resource),checked===!0),class:"h-4 w-4"})};if_block(node_8,$$render=>{$$props.onToggle&&$$render( consequent_2)})}var button=sibling(node_8,2);button.__click=e=>handleResourceClick(get$4(resource),e);var node_9=child(button);component(node_9,()=>get$4(ResourceIcon),($$anchor5,ResourceIcon_1)=>{ResourceIcon_1($$anchor5,{class:"h-3.5 w-3.5 shrink-0 text-muted-foreground"})});var span_2=sibling(node_9,2),text_2=child(span_2,!0);reset(span_2),reset(button),reset(div_1),template_effect($0=>{set_class(button,1,$0),set_attribute(button,"title",get$4(resourceDisplayName)),set_text(text_2,get$4(resourceDisplayName))}, [()=>clsx(cn$1("flex flex-1 items-center gap-2 rounded px-2 py-1 text-left text-sm transition-colors","hover:bg-muted/50",get$4(isSelected)&&"bg-muted"))]),append($$anchor4,div_1)};if_block(node_7,$$render=>{node2().resource&&$$render(consequent_3)},!0)}append($$anchor3,fragment_7)};if_block(node_1,$$render=>{get$4(isFolder)?$$render(consequent_1):$$render(alternate_1,!1)})}append($$anchor2,fragment)};let searchQuery=prop($$props,"searchQuery",3,"");const hasResources=user_derived(()=>$$props.serverRes. resources.length>0),hasTemplates=user_derived(()=>$$props.serverRes.templates.length>0),hasContent=user_derived(()=>get$4(hasResources)||get$4(hasTemplates)),displayName=user_derived(()=>mcpStore.getServerDisplayName($$props.serverName)),favicon=user_derived(()=>mcpStore.getServerFavicon($$props.serverName)),resourceTree=user_derived(()=>buildResourceTree($$props.serverRes.resources,$$props.serverName,searchQuery())),templateInfos=user_derived(()=>$$props.serverRes.templates.map(t=>({uriTemplate:t. uriTemplate,name:t.name,title:t.title,description:t.description,mimeType:t.mimeType,serverName:$$props.serverName,annotations:t.annotations,icons:t.icons})));function handleResourceClick(resource,event2){$$props.onSelect?.(resource,event2.shiftKey)}function handleCheckboxChange(resource,checked){$$props.onToggle?.(resource,checked)}function isResourceSelected(resource){return $$props.selectedUris.has(resource.uri)}var fragment_9=comment$2(),node_10=first_child(fragment_9);component(node_10,()=>Collapsible, ($$anchor2,Collapsible_Root_1)=>{Collapsible_Root_1($$anchor2,{get open(){return $$props.isExpanded},get onOpenChange(){return $$props.onToggleServer},children:($$anchor3,$$slotProps)=>{var fragment_10=root_12$2(),node_11=first_child(fragment_10);component(node_11,()=>Collapsible_trigger,($$anchor4,Collapsible_Trigger_1)=>{Collapsible_Trigger_1($$anchor4,{class:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-sm hover:bg-muted/50",children:($$anchor5,$$slotProps2)=>{var fragment_11=root_13$4(), node_12=first_child(fragment_11);{var consequent_4=$$anchor6=>{Chevron_down($$anchor6,{class:"h-3.5 w-3.5"})},alternate_2=$$anchor6=>{Chevron_right($$anchor6,{class:"h-3.5 w-3.5"})};if_block(node_12,$$render=>{$$props.isExpanded?$$render(consequent_4):$$render(alternate_2,!1)})}var span_3=sibling(node_12,2),span_4=child(span_3),node_13=child(span_4);{var consequent_5=$$anchor6=>{var img=root_16$1();template_effect(()=>set_attribute(img,"src",get$4(favicon))),event("error",img,e=>{e.currentTarget. style.display="none"}),replay_events(img),append($$anchor6,img)};if_block(node_13,$$render=>{get$4(favicon)&&$$render(consequent_5)})}var text_3=sibling(node_13);reset(span_4);var span_5=sibling(span_4,2),text_4=child(span_5),node_14=sibling(text_4);{var consequent_6=$$anchor6=>{var text_5=text$8();template_effect(()=>set_text(text_5,`, ${$$props.serverRes.templates.length??""} template${$$props.serverRes.templates.length!==1?"s":""}`)),append($$anchor6,text_5)};if_block(node_14,$$render=>{get$4( hasTemplates)&&$$render(consequent_6)})}next$1(),reset(span_5),reset(span_3);var node_15=sibling(span_3,2);{var consequent_7=$$anchor6=>{Loader_circle($$anchor6,{class:"ml-auto h-3 w-3 animate-spin text-muted-foreground"})};if_block(node_15,$$render=>{$$props.serverRes.loading&&$$render(consequent_7)})}template_effect(()=>{set_text(text_3,` ${get$4(displayName)??""}`),set_text(text_4,`(${$$props.serverRes.resources.length??""} resource${$$props.serverRes.resources.length!==1?"s":""}`)}),append($$anchor5, fragment_11)},$$slots:{default:!0}})});var node_16=sibling(node_11,2);component(node_16,()=>Collapsible_content,($$anchor4,Collapsible_Content_1)=>{Collapsible_Content_1($$anchor4,{children:($$anchor5,$$slotProps2)=>{var div_2=root_19(),node_17=child(div_2);{var consequent_8=$$anchor6=>{var div_3=root_20$2(),text_6=child(div_3);reset(div_3),template_effect(()=>set_text(text_6,`Error: ${$$props.serverRes.error??""}`)),append($$anchor6,div_3)},alternate_4=$$anchor6=>{var fragment_16=comment$2(),node_18=first_child( fragment_16);{var consequent_9=$$anchor7=>{var div_4=root_22$2();append($$anchor7,div_4)},alternate_3=$$anchor7=>{var fragment_17=root_23(),node_19=first_child(fragment_17);{var consequent_10=$$anchor8=>{var fragment_18=comment$2(),node_20=first_child(fragment_18);each(node_20,17,()=>sortTreeChildren([...get$4(resourceTree).children.values()]),child2=>child2.resource?.uri||`${$$props.serverName}:${child2.name}`,($$anchor9,child2)=>{renderTreeNode($$anchor9,()=>get$4(child2),()=>1,()=>"")}),append( $$anchor8,fragment_18)};if_block(node_19,$$render=>{get$4(hasResources)&&$$render(consequent_10)})}var node_21=sibling(node_19,2);{var consequent_12=$$anchor8=>{var fragment_20=root_26$1(),node_22=first_child(fragment_20);{var consequent_11=$$anchor9=>{var div_5=root_27();append($$anchor9,div_5)};if_block(node_22,$$render=>{get$4(hasResources)&&$$render(consequent_11)})}var node_23=sibling(node_22,4);each(node_23,17,()=>get$4(templateInfos),template=>template.uriTemplate,($$anchor9,template)=>{var button_1=root_28(); button_1.__click=()=>$$props.onTemplateSelect(get$4(template));var node_24=child(button_1);Braces(node_24,{class:"h-3.5 w-3.5 shrink-0 text-muted-foreground"});var span_6=sibling(node_24,2),text_7=child(span_6,!0);reset(span_6),reset(button_1),template_effect($0=>{set_class(button_1,1,$0),set_attribute(button_1,"title",get$4(template).uriTemplate),set_text(text_7,get$4(template).title||get$4(template).name)},[()=>clsx(cn$1("flex w-full items-center gap-2 rounded px-2 py-1 text-left text-sm trans\ ition-colors","hover:bg-muted/50",$$props.selectedTemplateUri===get$4(template).uriTemplate&&"bg-muted"))]),append($$anchor9,button_1)}),append($$anchor8,fragment_20)};if_block(node_21,$$render=>{get$4(hasTemplates)&&$$props.onTemplateSelect&&$$render(consequent_12)})}append($$anchor7,fragment_17)};if_block(node_18,$$render=>{get$4(hasContent)?$$render(alternate_3,!1):$$render(consequent_9)},!0)}append($$anchor6,fragment_16)};if_block(node_17,$$render=>{$$props.serverRes.error?$$render(consequent_8): $$render(alternate_4,!1)})}reset(div_2),append($$anchor5,div_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_10)},$$slots:{default:!0}})}),append($$anchor,fragment_9),pop()}delegate(["click"]);var root$c=from_html('
        ');function McpResourceBrowser($$anchor,$$props){push$1($$props,!0);let selectedUris=prop($$props,"selectedUris",19,()=>new Set),expandedServers=new SvelteSet,expandedFolders=new SvelteSet,searchQuery=state$1("");const resources=user_derived( mcpResources),isLoading2=user_derived(mcpResourcesLoading),filteredResources=user_derived(()=>{if(!get$4(searchQuery).trim())return get$4(resources);const query=get$4(searchQuery).toLowerCase(),filtered=new SvelteMap;for(const[serverName,serverRes]of get$4(resources).entries()){const filteredResources2=serverRes.resources.filter(r2=>r2.title?.toLowerCase().includes(query)||r2.uri.toLowerCase().includes(query)||serverName.toLowerCase().includes(query)),filteredTemplates=serverRes.templates.filter( t=>t.name?.toLowerCase().includes(query)||t.title?.toLowerCase().includes(query)||t.uriTemplate.toLowerCase().includes(query)||serverName.toLowerCase().includes(query));(filteredResources2.length>0||filteredTemplates.length>0||query.trim())&&filtered.set(serverName,{...serverRes,resources:filteredResources2,templates:filteredTemplates})}return filtered});user_effect(()=>{$$props.expandToUri&&get$4(resources).size>0&&autoExpandToResource($$props.expandToUri)});function autoExpandToResource(uri2){ for(const[serverName,serverRes]of get$4(resources).entries())if(serverRes.resources.find(r2=>r2.uri===uri2)){expandedServers.add(serverName);const pathParts=parseResourcePath(uri2);if(pathParts.length>1){let currentPath="";for(let i=0;iset$1(searchQuery,q2,!0),get searchQuery(){return get$4(searchQuery)}});var div_1=sibling(node2,2),node_1=child(div_1);{var consequent=$$anchor2=>{McpResourceBrowserEmptyState( $$anchor2,{get isLoading(){return get$4(isLoading2)}})},alternate=$$anchor2=>{var fragment_1=comment$2(),node_2=first_child(fragment_1);each(node_2,17,()=>[...get$4(filteredResources).entries()],([serverName,serverRes])=>serverName,($$anchor3,$$item)=>{var $$array=user_derived(()=>to_array(get$4($$item),2));let serverName=()=>get$4($$array)[0],serverRes=()=>get$4($$array)[1];{let $0=user_derived(()=>expandedServers.has(serverName()));McpResourceBrowserServerItem($$anchor3,{get serverName(){return serverName()}, get serverRes(){return serverRes()},get isExpanded(){return get$4($0)},get selectedUris(){return selectedUris()},get selectedTemplateUri(){return $$props.selectedTemplateUri},get expandedFolders(){return expandedFolders},onToggleServer:()=>toggleServer(serverName()),onToggleFolder:toggleFolder,get onSelect(){return $$props.onSelect},get onToggle(){return $$props.onToggle},get onTemplateSelect(){return $$props.onTemplateSelect},get searchQuery(){return get$4(searchQuery)}})}}),append($$anchor2,fragment_1)}; if_block(node_1,$$render=>{get$4(filteredResources).size===0?$$render(consequent):$$render(alternate,!1)})}reset(div_1),reset(div),template_effect($0=>set_class(div,1,$0),[()=>clsx(cn$1("flex flex-col gap-2",$$props.class))]),append($$anchor,div),pop()}var root_1$6=from_html('
        Select a resource to preview
        '),root_3$4=from_html('

        '),root_5$5=from_html('
        '),root_7$4=from_html('
        '),root_10$4=from_html('
         
        '),root_12$1=from_html('Resource content'),root_13$3=from_html('
        '),root_14$2=from_html('
        No content available
        '),root_9$4=from_html(" ",1),root_16=from_html(' '),root_17=from_html(' '),root_15$1=from_html('
        '),root_2$8=from_html( '

        ',1),root$b=from_html("
        ");function McpResourcePreview($$anchor,$$props){push$1($$props,!0);let content2=state$1(null),isLoading2=state$1(!1),error2=state$1( null);user_effect(()=>{$$props.resource?$$props.preloadedContent?(set$1(content2,$$props.preloadedContent,!0),set$1(isLoading2,!1),set$1(error2,null)):loadContent($$props.resource.uri):(set$1(content2,null),set$1(error2,null))});async function loadContent(uri2){set$1(isLoading2,!0),set$1(error2,null);try{const result=await mcpStore.readResource(uri2);result?set$1(content2,result,!0):set$1(error2,"Failed to load resource content")}catch(e){set$1(error2,e instanceof Error?e.message:"Unknown error", !0)}finally{set$1(isLoading2,!1)}}function handleDownload(){const text2=getResourceTextContent(get$4(content2));!text2||!$$props.resource||downloadResourceContent(text2,$$props.resource.mimeType||MimeTypeText.PLAIN,$$props.resource.name||"resource.txt")}var div=root$b(),node2=child(div);{var consequent=$$anchor2=>{var div_1=root_1$6(),node_1=child(div_1);File_text(node_1,{class:"h-8 w-8 opacity-50"}),next$1(2),reset(div_1),append($$anchor2,div_1)},alternate_3=$$anchor2=>{var fragment=root_2$8(), div_2=first_child(fragment),div_3=child(div_2),h3=child(div_3),text_1=child(h3,!0);reset(h3);var p2=sibling(h3,2),text_2=child(p2,!0);reset(p2);var node_2=sibling(p2,2);{var consequent_1=$$anchor3=>{var p_1=root_3$4(),text_3=child(p_1,!0);reset(p_1),template_effect(()=>set_text(text_3,$$props.resource.description)),append($$anchor3,p_1)};if_block(node_2,$$render=>{$$props.resource.description&&$$render(consequent_1)})}reset(div_3);var div_4=sibling(div_3,2),node_3=child(div_4);{let $0=user_derived( ()=>getResourceTextContent(get$4(content2))),$1=user_derived(()=>!get$4(isLoading2)&&!!getResourceTextContent(get$4(content2)));ActionIconCopyToClipboard(node_3,{get text(){return get$4($0)},get canCopy(){return get$4($1)},ariaLabel:"Copy content"})}var node_4=sibling(node_3,2);{let $0=user_derived(()=>get$4(isLoading2)||!getResourceTextContent(get$4(content2)));Button(node_4,{variant:"ghost",size:"sm",class:"h-7 w-7 p-0",onclick:handleDownload,get disabled(){return get$4($0)},title:"Download co\ ntent",children:($$anchor3,$$slotProps)=>{Download($$anchor3,{class:"h-3.5 w-3.5"})},$$slots:{default:!0}})}reset(div_4),reset(div_2);var div_5=sibling(div_2,2),node_5=child(div_5);{var consequent_2=$$anchor3=>{var div_6=root_5$5(),node_6=child(div_6);Loader_circle(node_6,{class:"h-6 w-6 animate-spin text-muted-foreground"}),reset(div_6),append($$anchor3,div_6)},alternate_2=$$anchor3=>{var fragment_2=comment$2(),node_7=first_child(fragment_2);{var consequent_3=$$anchor4=>{var div_7=root_7$4(),node_8=child( div_7);Circle_alert(node_8,{class:"h-6 w-6"});var span=sibling(node_8,2),text_4=child(span,!0);reset(span),reset(div_7),template_effect(()=>set_text(text_4,get$4(error2))),append($$anchor4,div_7)},alternate_1=$$anchor4=>{var fragment_3=comment$2(),node_9=first_child(fragment_3);{var consequent_7=$$anchor5=>{const textContent=user_derived(()=>getResourceTextContent(get$4(content2))),blobContent=user_derived(()=>getResourceBlobContent(get$4(content2)));var fragment_4=root_9$4(),node_10=first_child( fragment_4);{var consequent_4=$$anchor6=>{var pre=root_10$4(),text_5=child(pre,!0);reset(pre),template_effect(()=>set_text(text_5,get$4(textContent))),append($$anchor6,pre)};if_block(node_10,$$render=>{get$4(textContent)&&$$render(consequent_4)})}var node_11=sibling(node_10,2);each(node_11,17,()=>get$4(blobContent),blob=>blob.uri,($$anchor6,blob)=>{var fragment_5=comment$2(),node_12=first_child(fragment_5);{var consequent_5=$$anchor7=>{var img=root_12$1();template_effect($0=>set_attribute(img,"s\ rc",$0),[()=>createBase64DataUrl(get$4(blob).mimeType??MimeTypeApplication.OCTET_STREAM,get$4(blob).blob)]),append($$anchor7,img)},alternate=$$anchor7=>{var div_8=root_13$3(),node_13=child(div_8);File_text(node_13,{class:"h-4 w-4"});var span_1=sibling(node_13,2),text_6=child(span_1);reset(span_1),reset(div_8),template_effect(()=>set_text(text_6,`Binary content (${get$4(blob).mimeType||"unknown type"})`)),append($$anchor7,div_8)};if_block(node_12,$$render=>{isImageMimeType(get$4(blob).mimeType??MimeTypeApplication. OCTET_STREAM)?$$render(consequent_5):$$render(alternate,!1)})}append($$anchor6,fragment_5)});var node_14=sibling(node_11,2);{var consequent_6=$$anchor6=>{var div_9=root_14$2();append($$anchor6,div_9)};if_block(node_14,$$render=>{!get$4(textContent)&&get$4(blobContent).length===0&&$$render(consequent_6)})}append($$anchor5,fragment_4)};if_block(node_9,$$render=>{get$4(content2)&&$$render(consequent_7)},!0)}append($$anchor4,fragment_3)};if_block(node_7,$$render=>{get$4(error2)?$$render(consequent_3): $$render(alternate_1,!1)},!0)}append($$anchor3,fragment_2)};if_block(node_5,$$render=>{get$4(isLoading2)?$$render(consequent_2):$$render(alternate_2,!1)})}reset(div_5);var node_15=sibling(div_5,2);{var consequent_10=$$anchor3=>{var div_10=root_15$1(),node_16=child(div_10);{var consequent_8=$$anchor4=>{var span_2=root_16(),text_7=child(span_2,!0);reset(span_2),template_effect(()=>set_text(text_7,$$props.resource.mimeType)),append($$anchor4,span_2)};if_block(node_16,$$render=>{$$props.resource.mimeType&& $$render(consequent_8)})}var node_17=sibling(node_16,2);{var consequent_9=$$anchor4=>{var span_3=root_17(),text_8=child(span_3);reset(span_3),template_effect(()=>set_text(text_8,`Priority: ${$$props.resource.annotations.priority??""}`)),append($$anchor4,span_3)};if_block(node_17,$$render=>{$$props.resource.annotations?.priority!==void 0&&$$render(consequent_9)})}var span_4=sibling(node_17,2),text_9=child(span_4);reset(span_4),reset(div_10),template_effect(()=>set_text(text_9,`Server: ${$$props.resource. serverName??""}`)),append($$anchor3,div_10)};if_block(node_15,$$render=>{($$props.resource.mimeType||$$props.resource.annotations)&&$$render(consequent_10)})}template_effect(()=>{set_text(text_1,$$props.resource.title||$$props.resource.name),set_text(text_2,$$props.resource.uri)}),append($$anchor2,fragment)};if_block(node2,$$render=>{$$props.resource?$$render(alternate_3,!1):$$render(consequent)})}reset(div),template_effect($0=>set_class(div,1,$0),[()=>clsx(cn$1("flex flex-col gap-3",$$props.class))]), append($$anchor,div),pop()}var root_2$7=from_html('

        Resolved URI:

        '),root$a=from_html('
        ');function McpResourceTemplateForm($$anchor,$$props){push$1($$props,!0);const variables=user_derived(()=>extractTemplateVariables($$props.template.uriTemplate));let values=proxy( {}),suggestions=proxy({}),loadingSuggestions=proxy({}),activeAutocomplete=state$1(null),autocompleteIndex=state$1(0);const expandedUri=user_derived(()=>expandTemplate($$props.template.uriTemplate,values)),isComplete=user_derived(()=>isTemplateComplete($$props.template.uriTemplate,values)),fetchCompletions=debounce(async(argName,value)=>{if(value.length<1){suggestions[argName]=[];return}loadingSuggestions[argName]=!0;try{const result=await mcpStore.getResourceCompletions($$props.template.serverName, $$props.template.uriTemplate,argName,value);if(result&&result.values.length>0){const filteredValues=result.values.filter(v=>v.trim()!=="");filteredValues.length>0?(suggestions[argName]=filteredValues,set$1(activeAutocomplete,argName,!0),set$1(autocompleteIndex,0)):suggestions[argName]=[]}else suggestions[argName]=[]}catch(error2){console.error("[McpResourceTemplateForm] Failed to fetch completions:",error2),suggestions[argName]=[]}finally{loadingSuggestions[argName]=!1}},200);function handleArgInput(argName,value){ values[argName]=value,fetchCompletions(argName,value)}function selectSuggestion(argName,value){values[argName]=value,suggestions[argName]=[],set$1(activeAutocomplete,null)}function handleArgKeydown(event2,argName){const argSuggestions=suggestions[argName]??[];if(event2.key===KeyboardKey.ESCAPE){event2.preventDefault(),event2.stopPropagation(),argSuggestions.length>0&&get$4(activeAutocomplete)===argName?(suggestions[argName]=[],set$1(activeAutocomplete,null)):$$props.onCancel();return}argSuggestions. length===0||get$4(activeAutocomplete)!==argName||(event2.key===KeyboardKey.ARROW_DOWN?(event2.preventDefault(),set$1(autocompleteIndex,Math.min(get$4(autocompleteIndex)+1,argSuggestions.length-1),!0)):event2.key===KeyboardKey.ARROW_UP?(event2.preventDefault(),set$1(autocompleteIndex,Math.max(get$4(autocompleteIndex)-1,0),!0)):event2.key===KeyboardKey.ENTER&&argSuggestions[get$4(autocompleteIndex)]&&(event2.preventDefault(),event2.stopPropagation(),selectSuggestion(argName,argSuggestions[get$4(autocompleteIndex)])))} function handleArgBlur(argName){setTimeout(()=>{get$4(activeAutocomplete)===argName&&(suggestions[argName]=[],set$1(activeAutocomplete,null))},150)}function handleArgFocus(argName){const value=values[argName]??"";value.length>=MIN_AUTOCOMPLETE_INPUT_LENGTH&&fetchCompletions(argName,value)}function handleSubmit(event2){event2.preventDefault(),get$4(isComplete)&&$$props.onResolve(get$4(expandedUri),$$props.template.serverName)}var form=root$a(),node2=child(form);each(node2,17,()=>get$4(variables), variable=>variable.name,($$anchor2,variable)=>{{let $0=user_derived(()=>values[get$4(variable).name]??""),$1=user_derived(()=>suggestions[get$4(variable).name]??[]),$2=user_derived(()=>loadingSuggestions[get$4(variable).name]??!1),$3=user_derived(()=>get$4(activeAutocomplete)===get$4(variable).name),$4=user_derived(()=>get$4(activeAutocomplete)===get$4(variable).name?get$4(autocompleteIndex):0);InputWithSuggestions($$anchor2,{get name(){return get$4(variable).name},get value(){return get$4($0)}, get suggestions(){return get$4($1)},get isLoadingSuggestions(){return get$4($2)},get isAutocompleteActive(){return get$4($3)},get autocompleteIndex(){return get$4($4)},onInput:value=>handleArgInput(get$4(variable).name,value),onKeydown:e=>handleArgKeydown(e,get$4(variable).name),onBlur:()=>handleArgBlur(get$4(variable).name),onFocus:()=>handleArgFocus(get$4(variable).name),onSelectSuggestion:value=>selectSuggestion(get$4(variable).name,value)})}});var node_1=sibling(node2,2);{var consequent=$$anchor2=>{ var div=root_2$7(),p2=sibling(child(div),2),text2=child(p2,!0);reset(p2),reset(div),template_effect(()=>set_text(text2,get$4(expandedUri))),append($$anchor2,div)};if_block(node_1,$$render=>{get$4(isComplete)&&$$render(consequent)})}var div_1=sibling(node_1,2),node_2=child(div_1);Button(node_2,{type:"button",size:"sm",variant:"secondary",get onclick(){return $$props.onCancel},children:($$anchor2,$$slotProps)=>{next$1();var text_1=text$8("Cancel");append($$anchor2,text_1)},$$slots:{default:!0}});var node_3=sibling( node_2,2);{let $0=user_derived(()=>!get$4(isComplete));Button(node_3,{size:"sm",type:"submit",get disabled(){return get$4($0)},children:($$anchor2,$$slotProps)=>{next$1();var text_2=text$8("Read Resource");append($$anchor2,text_2)},$$slots:{default:!0}})}reset(div_1),reset(form),event("submit",form,handleSubmit),append($$anchor,form),pop()}function filterModelOptions(options,searchTerm){const term=searchTerm.trim().toLowerCase();return term?options.filter(option2=>option2.model.toLowerCase().includes( term)||option2.name?.toLowerCase().includes(term)||option2.aliases?.some(alias=>alias.toLowerCase().includes(term))||option2.tags?.some(tag=>tag.toLowerCase().includes(term))):options}function groupModelOptions(filteredOptions,favoriteIds,isModelLoaded){const loaded=[];for(let i=0;iitem.option.model)),favorites=[];for(let i=0;i Loading models…
        '),root_4$2=from_html(' '),root_5$4=from_html('

        No models available.

        '),root_13$2=from_html('

        '),root_11$2=from_html(" ",1), root_14$1=from_html('Select model'),root_9$3=from_html(" ",1),root_20$1=from_html(''),root_21$1=from_html('

        No models fo\ und.

        '),root_18$1=from_html('
        '),root_8$3=from_html(" ",1),root_26=from_html('

        '),root_24=from_html(" ",1),root_22$1=from_html(''),root$9=from_html("
        ",1);function ModelsSelector($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),currentModel=prop($$props,"currentModel",3,null),disabled=prop($$props, "disabled",3,!1),forceForegroundText=prop($$props,"forceForegroundText",3,!1),useGlobalSelection=prop($$props,"useGlobalSelection",3,!1),options=user_derived(()=>modelOptions().filter(option2=>modelsStore.getModelProps(option2.model)?.webui!==!1)),loading=user_derived(modelsLoading),updating=user_derived(modelsUpdating),activeId=user_derived(selectedModelId),isRouter=user_derived(isRouterMode),serverModel=user_derived(singleModelName),isHighlightedCurrentModelActive=user_derived(()=>{if(!get$4(isRouter)|| !currentModel())return!1;const currentOption=get$4(options).find(option2=>option2.model===currentModel());return currentOption?currentOption.id===get$4(activeId):!1}),isCurrentModelInCache=user_derived(()=>!get$4(isRouter)||!currentModel()?!0:get$4(options).some(option2=>option2.model===currentModel())),isLoadingModel=state$1(!1),searchTerm=state$1(""),highlightedIndex=state$1(-1),filteredOptions=user_derived(()=>filterModelOptions(get$4(options),get$4(searchTerm))),groupedFilteredOptions=user_derived( ()=>groupModelOptions(get$4(filteredOptions),modelsStore.favoriteModelIds,m=>modelsStore.isModelLoaded(m)));user_effect(()=>{get$4(searchTerm),set$1(highlightedIndex,-1)});let isOpen=state$1(!1),showModelDialog=state$1(!1),infoModelId=state$1(null);function handleInfoClick(modelName){set$1(infoModelId,modelName,!0),set$1(showModelDialog,!0)}onMount$1(()=>{modelsStore.fetch().catch(error2=>{console.error("Unable to load models:",error2)})});function handleOpenChange(open3){get$4(loading)||get$4(updating)|| (get$4(isRouter)?open3?(set$1(isOpen,!0),set$1(searchTerm,""),set$1(highlightedIndex,-1),modelsStore.fetchRouterModels().then(()=>{modelsStore.fetchModalitiesForLoadedModels()})):(set$1(isOpen,!1),set$1(searchTerm,""),set$1(highlightedIndex,-1)):set$1(showModelDialog,open3,!0))}function open2(){handleOpenChange(!0)}function handleSearchKeyDown(event2){if(!event2.isComposing){if(event2.key===KeyboardKey.ARROW_DOWN){if(event2.preventDefault(),get$4(filteredOptions).length===0)return;get$4(highlightedIndex)=== -1||get$4(highlightedIndex)===get$4(filteredOptions).length-1?set$1(highlightedIndex,0):set$1(highlightedIndex,get$4(highlightedIndex)+1)}else if(event2.key===KeyboardKey.ARROW_UP){if(event2.preventDefault(),get$4(filteredOptions).length===0)return;get$4(highlightedIndex)===-1||get$4(highlightedIndex)===0?set$1(highlightedIndex,get$4(filteredOptions).length-1):set$1(highlightedIndex,get$4(highlightedIndex)-1)}else if(event2.key===KeyboardKey.ENTER)if(event2.preventDefault(),get$4(highlightedIndex)>= 0&&get$4(highlightedIndex)0&&set$1(highlightedIndex,0)}}async function handleSelect(modelId){const option2=get$4(options).find(opt=>opt.id===modelId);if(!option2)return;let shouldCloseMenu=!0;$$props.onModelChange?await $$props.onModelChange(option2.id,option2.model)===!1&&(shouldCloseMenu=!1):await modelsStore.selectModelById(option2.id),shouldCloseMenu&& (handleOpenChange(!1),requestAnimationFrame(()=>{document.querySelector('[data-slot="chat-form"] textarea')?.focus()})),!$$props.onModelChange&&get$4(isRouter)&&!modelsStore.isModelLoaded(option2.model)&&(set$1(isLoadingModel,!0),modelsStore.loadModel(option2.model).catch(error2=>console.error("Failed to load model:",error2)).finally(()=>set$1(isLoadingModel,!1)))}function getDisplayOption(){if(!get$4(isRouter)){const displayModel=get$4(serverModel)||currentModel();return displayModel?{id:get$4( serverModel)?"current":"offline-current",model:displayModel,name:displayModel.split("/").pop()||displayModel,capabilities:[]}:void 0}if(useGlobalSelection()&&get$4(activeId)){const selected=get$4(options).find(option2=>option2.id===get$4(activeId));if(selected)return selected}if(currentModel())return get$4(isCurrentModelInCache)?get$4(options).find(option2=>option2.model===currentModel()):{id:"not-in-cache",model:currentModel(),name:currentModel().split("/").pop()||currentModel(),capabilities:[]}; if(get$4(activeId))return get$4(options).find(option2=>option2.id===get$4(activeId))}var $$exports={open:open2},fragment=root$9(),div=first_child(fragment),node2=child(div);{var consequent=$$anchor2=>{var div_1=root_1$5(),node_1=child(div_1);Loader_circle(node_1,{class:"h-3.5 w-3.5 animate-spin"}),next$1(),reset(div_1),append($$anchor2,div_1)},alternate_5=$$anchor2=>{var fragment_1=comment$2(),node_2=first_child(fragment_1);{var consequent_2=$$anchor3=>{var fragment_2=comment$2(),node_3=first_child( fragment_2);{var consequent_1=$$anchor4=>{var span=root_4$2(),node_4=child(span);Package(node_4,{class:"h-3.5 w-3.5"});var node_5=sibling(node_4,2);ModelId(node_5,{get modelId(){return currentModel()},class:"min-w-0",showOrgName:!0}),reset(span),template_effect($0=>set_class(span,1,$0),[()=>clsx(cn$1("inline-flex items-center gap-1.5 rounded-sm bg-muted-foreground/10 px-1.5 py-1 text-xs text-muted-foreground",className()))]),append($$anchor4,span)},alternate=$$anchor4=>{var p2=root_5$4();append( $$anchor4,p2)};if_block(node_3,$$render=>{currentModel()?$$render(consequent_1):$$render(alternate,!1)})}append($$anchor3,fragment_2)},alternate_4=$$anchor3=>{const selectedOption=user_derived(getDisplayOption);var fragment_3=comment$2(),node_6=first_child(fragment_3);{var consequent_7=$$anchor4=>{var fragment_4=comment$2(),node_7=first_child(fragment_4);component(node_7,()=>Root$2,($$anchor5,DropdownMenu_Root)=>{DropdownMenu_Root($$anchor5,{onOpenChange:handleOpenChange,get open(){return get$4( isOpen)},set open($$value){set$1(isOpen,$$value,!0)},children:($$anchor6,$$slotProps)=>{var fragment_5=root_8$3(),node_8=first_child(fragment_5);{let $0=user_derived(()=>cn$1("inline-grid cursor-pointer grid-cols-[1fr_auto_1fr] items-center gap-1.5 rounded-sm bg-muted-foreground/10 px-1.5 py-1 text-xs transition hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60",get$4(isCurrentModelInCache)? forceForegroundText()||get$4(isHighlightedCurrentModelActive)?"text-foreground":"text-muted-foreground":"bg-red-400/10 !text-red-400 hover:bg-red-400/20 hover:text-red-400",get$4(isOpen)?"text-foreground":"")),$1=user_derived(()=>disabled()||get$4(updating));component(node_8,()=>Dropdown_menu_trigger,($$anchor7,DropdownMenu_Trigger)=>{DropdownMenu_Trigger($$anchor7,{get class(){return get$4($0)},style:"max-width: min(calc(100cqw - 9rem), 20rem)",get disabled(){return get$4($1)},children:($$anchor8,$$slotProps2)=>{ var fragment_6=root_9$3(),node_9=first_child(fragment_6);Package(node_9,{class:"h-3.5 w-3.5"});var node_10=sibling(node_9,2);{var consequent_3=$$anchor9=>{var fragment_7=comment$2(),node_11=first_child(fragment_7);component(node_11,()=>Root$5,($$anchor10,Tooltip_Root)=>{Tooltip_Root($$anchor10,{children:($$anchor11,$$slotProps3)=>{var fragment_8=root_11$2(),node_12=first_child(fragment_8);{const child2=($$anchor12,$$arg0)=>{ModelId($$anchor12,spread_props({get modelId(){return get$4(selectedOption). model},class:"min-w-0 overflow-hidden",showOrgName:!0},()=>$$arg0?.().props))};component(node_12,()=>Tooltip_trigger,($$anchor12,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor12,{child:child2,$$slots:{child:!0}})})}var node_13=sibling(node_12,2);component(node_13,()=>Tooltip_content,($$anchor12,Tooltip_Content)=>{Tooltip_Content($$anchor12,{children:($$anchor13,$$slotProps4)=>{var p_1=root_13$2(),text2=child(p_1,!0);reset(p_1),template_effect(()=>set_text(text2,get$4(selectedOption).model)),append( $$anchor13,p_1)},$$slots:{default:!0}})}),append($$anchor11,fragment_8)},$$slots:{default:!0}})}),append($$anchor9,fragment_7)},alternate_1=$$anchor9=>{var span_1=root_14$1();append($$anchor9,span_1)};if_block(node_10,$$render=>{get$4(selectedOption)?$$render(consequent_3):$$render(alternate_1,!1)})}var node_14=sibling(node_10,2);{var consequent_4=$$anchor9=>{Loader_circle($$anchor9,{class:"h-3 w-3.5 animate-spin"})},alternate_2=$$anchor9=>{Chevron_down($$anchor9,{class:"h-3 w-3.5"})};if_block(node_14, $$render=>{get$4(updating)||get$4(isLoadingModel)?$$render(consequent_4):$$render(alternate_2,!1)})}append($$anchor8,fragment_6)},$$slots:{default:!0}})})}var node_15=sibling(node_8,2);component(node_15,()=>Dropdown_menu_content,($$anchor7,DropdownMenu_Content)=>{DropdownMenu_Content($$anchor7,{align:"end",class:"w-full max-w-[100vw] pt-0 sm:w-max sm:max-w-[calc(100vw-2rem)]",children:($$anchor8,$$slotProps2)=>{{let $0=user_derived(()=>get$4(filteredOptions).length===0&&get$4(isCurrentModelInCache)); DropdownMenuSearchable($$anchor8,{placeholder:"Search models...",onSearchKeyDown:handleSearchKeyDown,emptyMessage:"No models found.",get isEmpty(){return get$4($0)},get searchValue(){return get$4(searchTerm)},set searchValue($$value){set$1(searchTerm,$$value,!0)},children:($$anchor9,$$slotProps3)=>{var div_2=root_18$1();{const modelOption=($$anchor10,item=noop$3,showOrgName=noop$3)=>{const computed_const=user_derived(()=>{const{option:option2,flatIndex}=item();return{option:option2,flatIndex}}), isSelected=user_derived(()=>currentModel()===get$4(computed_const).option.model||get$4(activeId)===get$4(computed_const).option.id),isHighlighted=user_derived(()=>get$4(computed_const).flatIndex===get$4(highlightedIndex)),isFav=user_derived(()=>modelsStore.favoriteModelIds.has(get$4(computed_const).option.model));ModelsSelectorOption($$anchor10,{get option(){return get$4(computed_const).option},get isSelected(){return get$4(isSelected)},get isHighlighted(){return get$4(isHighlighted)},get isFav(){ return get$4(isFav)},get showOrgName(){return showOrgName()},onSelect:handleSelect,onInfoClick:handleInfoClick,onMouseEnter:()=>set$1(highlightedIndex,get$4(computed_const).flatIndex,!0),onKeyDown:e=>{(e.key===KeyboardKey.ENTER||e.key===KeyboardKey.SPACE)&&(e.preventDefault(),handleSelect(get$4(computed_const).option.id))}})};var node_16=child(div_2);{var consequent_5=$$anchor10=>{var button=root_20$1(),node_17=child(button);ModelId(node_17,{get modelId(){return currentModel()},class:"flex-1",showOrgName:!0}), next$1(2),reset(button),append($$anchor10,button)};if_block(node_16,$$render=>{!get$4(isCurrentModelInCache)&¤tModel()&&$$render(consequent_5)})}var node_18=sibling(node_16,2);{var consequent_6=$$anchor10=>{var p_2=root_21$1();append($$anchor10,p_2)};if_block(node_18,$$render=>{get$4(filteredOptions).length===0&&$$render(consequent_6)})}var node_19=sibling(node_18,2);ModelsSelectorList(node_19,{get groups(){return get$4(groupedFilteredOptions)},get currentModel(){return currentModel()},get activeId(){ return get$4(activeId)},sectionHeaderClass:"my-1.5 px-2 py-2 text-[13px] font-semibold text-muted-foreground/70 select-none",onSelect:handleSelect,onInfoClick:handleInfoClick,get renderOption(){return modelOption}}),reset(div_2)}append($$anchor9,div_2)},$$slots:{default:!0}})}},$$slots:{default:!0}})}),append($$anchor6,fragment_5)},$$slots:{default:!0}})}),append($$anchor4,fragment_4)},alternate_3=$$anchor4=>{var button_1=root_22$1();button_1.__click=()=>handleOpenChange(!0);var node_20=child(button_1); Package(node_20,{class:"h-3.5 w-3.5"});var node_21=sibling(node_20,2);{var consequent_8=$$anchor5=>{var fragment_14=comment$2(),node_22=first_child(fragment_14);component(node_22,()=>Root$5,($$anchor6,Tooltip_Root_1)=>{Tooltip_Root_1($$anchor6,{children:($$anchor7,$$slotProps)=>{var fragment_15=root_24(),node_23=first_child(fragment_15);{const child2=($$anchor8,$$arg0)=>{ModelId($$anchor8,spread_props({get modelId(){return get$4(selectedOption).model},class:"min-w-0 overflow-hidden",showOrgName:!0}, ()=>$$arg0?.().props))};component(node_23,()=>Tooltip_trigger,($$anchor8,Tooltip_Trigger_1)=>{Tooltip_Trigger_1($$anchor8,{child:child2,$$slots:{child:!0}})})}var node_24=sibling(node_23,2);component(node_24,()=>Tooltip_content,($$anchor8,Tooltip_Content_1)=>{Tooltip_Content_1($$anchor8,{children:($$anchor9,$$slotProps2)=>{var p_3=root_26(),text_1=child(p_3,!0);reset(p_3),template_effect(()=>set_text(text_1,get$4(selectedOption).model)),append($$anchor9,p_3)},$$slots:{default:!0}})}),append($$anchor7, fragment_15)},$$slots:{default:!0}})}),append($$anchor5,fragment_14)};if_block(node_21,$$render=>{get$4(selectedOption)&&$$render(consequent_8)})}var node_25=sibling(node_21,2);{var consequent_9=$$anchor5=>{Loader_circle($$anchor5,{class:"h-3 w-3.5 animate-spin"})};if_block(node_25,$$render=>{get$4(updating)&&$$render(consequent_9)})}reset(button_1),template_effect($0=>{set_class(button_1,1,$0),button_1.disabled=disabled()||get$4(updating)},[()=>clsx(cn$1("inline-flex cursor-pointer items-center\ gap-1.5 rounded-sm bg-muted-foreground/10 px-1.5 py-1 text-xs transition hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60",get$4(isCurrentModelInCache)?forceForegroundText()||get$4(isHighlightedCurrentModelActive)?"text-foreground":"text-muted-foreground":"bg-red-400/10 !text-red-400 hover:bg-red-400/20 hover:text-red-400",get$4(isOpen)?"text-foreground":""))]),append($$anchor4,button_1)}; if_block(node_6,$$render=>{get$4(isRouter)?$$render(consequent_7):$$render(alternate_3,!1)})}append($$anchor3,fragment_3)};if_block(node_2,$$render=>{get$4(options).length===0&&get$4(isRouter)?$$render(consequent_2):$$render(alternate_4,!1)},!0)}append($$anchor2,fragment_1)};if_block(node2,$$render=>{get$4(loading)&&get$4(options).length===0&&get$4(isRouter)?$$render(consequent):$$render(alternate_5,!1)})}reset(div);var node_26=sibling(div,2);{var consequent_10=$$anchor2=>{DialogModelInformation( $$anchor2,{get modelId(){return get$4(infoModelId)},get open(){return get$4(showModelDialog)},set open($$value){set$1(showModelDialog,$$value,!0)}})};if_block(node_26,$$render=>{get$4(showModelDialog)&&$$render(consequent_10)})}return template_effect($0=>set_class(div,1,$0),[()=>clsx(cn$1("relative inline-flex flex-col items-end gap-1",className()))]),append($$anchor,fragment),pop($$exports)}delegate(["click"]);var root_2$6=from_html("

        Loaded models

        ",1),root_4$1=from_html("

        Favorite \ models

        ",1),root_8$2=from_html("

        "),root_7$3=from_html(" ",1),root_6$3=from_html("

        Available models

        ",1),root$8=from_html(" ",1);function ModelsSelectorList($$anchor,$$props){push$1($$props,!0);const defaultOption=($$anchor2,item=noop$3,showOrgName=noop$3)=>{const computed_const=user_derived(()=>{const{option:option2}=item();return{option:option2}}),isSelected=user_derived(()=>$$props.currentModel===get$4(computed_const).option.model||$$props.activeId===get$4( computed_const).option.id),isFav=user_derived(()=>modelsStore.favoriteModelIds.has(get$4(computed_const).option.model));ModelsSelectorOption($$anchor2,{get option(){return get$4(computed_const).option},get isSelected(){return get$4(isSelected)},isHighlighted:!1,get isFav(){return get$4(isFav)},get showOrgName(){return showOrgName()},get onSelect(){return $$props.onSelect},get onInfoClick(){return $$props.onInfoClick},onMouseEnter:()=>{},onKeyDown:()=>{}})};let sectionHeaderClass=prop($$props,"se\ ctionHeaderClass",3,"my-1 px-2 py-2 text-[13px] font-semibold text-muted-foreground/70 select-none"),orgHeaderClass=prop($$props,"orgHeaderClass",3,"px-2 py-2 text-[11px] font-semibold text-muted-foreground/50 select-none [&:not(:first-child)]:mt-1"),render3=user_derived(()=>$$props.renderOption??defaultOption);var fragment_1=root$8(),node2=first_child(fragment_1);{var consequent=$$anchor2=>{var fragment_2=root_2$6(),p2=first_child(fragment_2),node_1=sibling(p2,2);each(node_1,17,()=>$$props.groups. loaded,item=>`loaded-${item.option.id}`,($$anchor3,item)=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);snippet(node_2,()=>get$4(render3),()=>get$4(item),()=>!0),append($$anchor3,fragment_3)}),template_effect(()=>set_class(p2,1,clsx(sectionHeaderClass()))),append($$anchor2,fragment_2)};if_block(node2,$$render=>{$$props.groups.loaded.length>0&&$$render(consequent)})}var node_3=sibling(node2,2);{var consequent_1=$$anchor2=>{var fragment_4=root_4$1(),p_1=first_child(fragment_4),node_4=sibling( p_1,2);each(node_4,17,()=>$$props.groups.favorites,item=>`fav-${item.option.id}`,($$anchor3,item)=>{var fragment_5=comment$2(),node_5=first_child(fragment_5);snippet(node_5,()=>get$4(render3),()=>get$4(item),()=>!0),append($$anchor3,fragment_5)}),template_effect(()=>set_class(p_1,1,clsx(sectionHeaderClass()))),append($$anchor2,fragment_4)};if_block(node_3,$$render=>{$$props.groups.favorites.length>0&&$$render(consequent_1)})}var node_6=sibling(node_3,2);{var consequent_3=$$anchor2=>{var fragment_6=root_6$3(), p_2=first_child(fragment_6),node_7=sibling(p_2,2);each(node_7,17,()=>$$props.groups.available,group=>group.orgName,($$anchor3,group)=>{var fragment_7=root_7$3(),node_8=first_child(fragment_7);{var consequent_2=$$anchor4=>{var p_3=root_8$2(),text2=child(p_3,!0);reset(p_3),template_effect(()=>{set_class(p_3,1,clsx(orgHeaderClass())),set_text(text2,get$4(group).orgName)}),append($$anchor4,p_3)};if_block(node_8,$$render=>{get$4(group).orgName&&$$render(consequent_2)})}var node_9=sibling(node_8,2);each( node_9,17,()=>get$4(group).items,item=>item.option.id,($$anchor4,item)=>{var fragment_8=comment$2(),node_10=first_child(fragment_8);snippet(node_10,()=>get$4(render3),()=>get$4(item),()=>!1),append($$anchor4,fragment_8)}),append($$anchor3,fragment_7)}),template_effect(()=>set_class(p_2,1,clsx(sectionHeaderClass()))),append($$anchor2,fragment_6)};if_block(node_6,$$render=>{$$props.groups.available.length>0&&$$render(consequent_3)})}append($$anchor,fragment_1),pop()}var root_6$2=from_html('
        '),root_8$1=from_html('
        '),root_10$3=from_html('
        '),root_11$1=from_html('
        '),root$7=from_html('
        ');function ModelsSelectorOption($$anchor,$$props){ push$1($$props,!0);let showOrgName=prop($$props,"showOrgName",3,!1),currentRouterModels=user_derived(routerModels),serverStatus=user_derived(()=>get$4(currentRouterModels).find(m=>m.id===$$props.option.model)?.status?.value??null),isOperationInProgress=user_derived(()=>modelsStore.isModelOperationInProgress($$props.option.model)),isFailed=user_derived(()=>get$4(serverStatus)===ServerModelStatus.FAILED),isSleeping=user_derived(()=>get$4(serverStatus)===ServerModelStatus.SLEEPING),isLoaded=user_derived( ()=>(get$4(serverStatus)===ServerModelStatus.LOADED||get$4(isSleeping))&&!get$4(isOperationInProgress)),isLoading2=user_derived(()=>get$4(serverStatus)===ServerModelStatus.LOADING||get$4(isOperationInProgress));var div=root$7();div.__click=()=>$$props.onSelect($$props.option.id),div.__keydown=function(...$$args){$$props.onKeyDown?.apply(this,$$args)};var node2=child(div);ModelId(node2,{get modelId(){return $$props.option.model},get showOrgName(){return showOrgName()},get aliases(){return $$props. option.aliases},get tags(){return $$props.option.tags},class:"flex-1"});var div_1=sibling(node2,2),div_2=child(div_1);div_2.__click=e=>e.stopPropagation();var node_1=child(div_2);{var consequent=$$anchor2=>{ActionIcon($$anchor2,{iconSize:"h-2.5 w-2.5",get icon(){return Heart_off},tooltip:"Remove from favorites",class:"h-3 w-3 hover:text-foreground",onclick:()=>modelsStore.toggleFavorite($$props.option.model)})},alternate=$$anchor2=>{ActionIcon($$anchor2,{iconSize:"h-2.5 w-2.5",get icon(){return Heart}, tooltip:"Add to favorites",class:"h-3 w-3 hover:text-foreground",onclick:()=>modelsStore.toggleFavorite($$props.option.model)})};if_block(node_1,$$render=>{$$props.isFav?$$render(consequent):$$render(alternate,!1)})}var node_2=sibling(node_1,2);{var consequent_1=$$anchor2=>{ActionIcon($$anchor2,{iconSize:"h-2.5 w-2.5",get icon(){return Info$1},tooltip:"Model information",class:"h-3 w-3 hover:text-foreground",onclick:()=>$$props.onInfoClick($$props.option.model)})};if_block(node_2,$$render=>{get$4( isLoaded)&&$$props.onInfoClick&&$$render(consequent_1)})}reset(div_2);var node_3=sibling(div_2,2);{var consequent_2=$$anchor2=>{Loader_circle($$anchor2,{class:"h-4 w-4 animate-spin text-muted-foreground"})},alternate_4=$$anchor2=>{var fragment_4=comment$2(),node_4=first_child(fragment_4);{var consequent_3=$$anchor3=>{var div_3=root_6$2(),node_5=child(div_3);Circle_alert(node_5,{class:"h-3.5 w-3.5 text-red-500 group-hover:hidden"});var div_4=sibling(node_5,2);div_4.__click=e=>e.stopPropagation(); var node_6=child(div_4);ActionIcon(node_6,{iconSize:"h-2.5 w-2.5",get icon(){return Rotate_cw},tooltip:"Retry loading model",class:"h-3 w-3 text-red-500 hover:text-foreground",onclick:()=>modelsStore.loadModel($$props.option.model)}),reset(div_4),reset(div_3),append($$anchor3,div_3)},alternate_3=$$anchor3=>{var fragment_5=comment$2(),node_7=first_child(fragment_5);{var consequent_4=$$anchor4=>{var div_5=root_8$1(),div_6=sibling(child(div_5),2),node_8=child(div_6);ActionIcon(node_8,{iconSize:"h-2\ .5 w-2.5",get icon(){return Power_off},tooltip:"Unload model",class:"h-3 w-3 text-red-500 hover:text-red-600",onclick:e=>{e?.stopPropagation(),modelsStore.unloadModel($$props.option.model)}}),reset(div_6),reset(div_5),append($$anchor4,div_5)},alternate_2=$$anchor4=>{var fragment_6=comment$2(),node_9=first_child(fragment_6);{var consequent_5=$$anchor5=>{var div_7=root_10$3(),div_8=sibling(child(div_7),2);div_8.__click=e=>e.stopPropagation();var node_10=child(div_8);ActionIcon(node_10,{iconSize:"h\ -2.5 w-2.5",get icon(){return Power_off},tooltip:"Unload model",class:"h-3 w-3 text-red-500 hover:text-red-600",onclick:()=>modelsStore.unloadModel($$props.option.model)}),reset(div_8),reset(div_7),append($$anchor5,div_7)},alternate_1=$$anchor5=>{var div_9=root_11$1(),div_10=sibling(child(div_9),2);div_10.__click=e=>e.stopPropagation();var node_11=child(div_10);ActionIcon(node_11,{iconSize:"h-2.5 w-2.5",get icon(){return Power},tooltip:"Load model",class:"h-3 w-3",onclick:()=>modelsStore.loadModel( $$props.option.model)}),reset(div_10),reset(div_9),append($$anchor5,div_9)};if_block(node_9,$$render=>{get$4(isLoaded)?$$render(consequent_5):$$render(alternate_1,!1)},!0)}append($$anchor4,fragment_6)};if_block(node_7,$$render=>{get$4(isSleeping)?$$render(consequent_4):$$render(alternate_2,!1)},!0)}append($$anchor3,fragment_5)};if_block(node_4,$$render=>{get$4(isFailed)?$$render(consequent_3):$$render(alternate_3,!1)},!0)}append($$anchor2,fragment_4)};if_block(node_3,$$render=>{get$4(isLoading2)? $$render(consequent_2):$$render(alternate_4,!1)})}reset(div_1),reset(div),template_effect($0=>{set_class(div,1,$0),set_attribute(div,"aria-selected",$$props.isSelected||$$props.isHighlighted)},[()=>clsx(cn$1("group flex w-full items-center gap-2 rounded-sm p-2 text-left text-sm transition focus:outline-none","cursor-pointer hover:bg-muted focus:bg-muted",$$props.isSelected||$$props.isHighlighted?"bg-accent text-accent-foreground":"hover:bg-accent hover:text-accent-foreground",get$4(isLoaded)?"te\ xt-popover-foreground":"text-muted-foreground"))]),event("mouseenter",div,function(...$$args){$$props.onMouseEnter?.apply(this,$$args)}),append($$anchor,div),pop()}delegate(["click","keydown"]);var root_1$4=from_html('
        Loading models…
        '),root_3$3=from_html('

        No models available.

        '),root_10$2=from_html(" ",1),root_13$1=from_html('
        ',1),root_14=from_html('

        No models found.

        '),root_9$2=from_html('
        ',1),root_5$3=from_html(' ',1),root_15=from_html(''),root$6=from_html("
        ",1);function ModelsSelectorSheet($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),currentModel=prop($$props,"currentModel",3,null),disabled=prop($$props, "disabled",3,!1),forceForegroundText=prop($$props,"forceForegroundText",3,!1),useGlobalSelection=prop($$props,"useGlobalSelection",3,!1),options=user_derived(()=>modelOptions().filter(option2=>modelsStore.getModelProps(option2.model)?.webui!==!1)),loading=user_derived(modelsLoading),updating=user_derived(modelsUpdating),activeId=user_derived(selectedModelId),isRouter=user_derived(isRouterMode),serverModel=user_derived(singleModelName),isLoadingModel=state$1(!1),isHighlightedCurrentModelActive=user_derived( ()=>!get$4(isRouter)||!currentModel()?!1:(()=>{const currentOption=get$4(options).find(option2=>option2.model===currentModel());return currentOption?currentOption.id===get$4(activeId):!1})()),isCurrentModelInCache=user_derived(()=>!get$4(isRouter)||!currentModel()?!0:get$4(options).some(option2=>option2.model===currentModel())),searchTerm=state$1(""),filteredOptions=user_derived(()=>filterModelOptions(get$4(options),get$4(searchTerm))),groupedFilteredOptions=user_derived(()=>groupModelOptions(get$4( filteredOptions),modelsStore.favoriteModelIds,m=>modelsStore.isModelLoaded(m))),sheetOpen=state$1(!1),showModelDialog=state$1(!1),infoModelId=state$1(null);function handleInfoClick(modelName){set$1(infoModelId,modelName,!0),set$1(showModelDialog,!0)}onMount$1(()=>{modelsStore.fetch().catch(error2=>{console.error("Unable to load models:",error2)})});function handleOpenChange(open3){get$4(loading)||get$4(updating)||(get$4(isRouter)?open3?(set$1(sheetOpen,!0),set$1(searchTerm,""),modelsStore.fetchRouterModels(). then(()=>{modelsStore.fetchModalitiesForLoadedModels()})):(set$1(sheetOpen,!1),set$1(searchTerm,"")):set$1(showModelDialog,open3,!0))}function open2(){handleOpenChange(!0)}function handleSheetOpenChange(open3){open3||handleOpenChange(!1)}async function handleSelect(modelId){const option2=get$4(options).find(opt=>opt.id===modelId);if(!option2)return;let shouldCloseMenu=!0;$$props.onModelChange?await $$props.onModelChange(option2.id,option2.model)===!1&&(shouldCloseMenu=!1):await modelsStore.selectModelById( option2.id),shouldCloseMenu&&(handleOpenChange(!1),requestAnimationFrame(()=>{document.querySelector('[data-slot="chat-form"] textarea')?.focus()})),!$$props.onModelChange&&get$4(isRouter)&&!modelsStore.isModelLoaded(option2.model)&&(set$1(isLoadingModel,!0),modelsStore.loadModel(option2.model).catch(error2=>console.error("Failed to load model:",error2)).finally(()=>set$1(isLoadingModel,!1)))}function getDisplayOption(){if(!get$4(isRouter))return get$4(serverModel)?{id:"current",model:get$4(serverModel), name:get$4(serverModel).split("/").pop()||get$4(serverModel),capabilities:[]}:void 0;if(useGlobalSelection()&&get$4(activeId)){const selected=get$4(options).find(option2=>option2.id===get$4(activeId));if(selected)return selected}if(currentModel())return get$4(isCurrentModelInCache)?get$4(options).find(option2=>option2.model===currentModel()):{id:"not-in-cache",model:currentModel(),name:currentModel().split("/").pop()||currentModel(),capabilities:[]};if(get$4(activeId))return get$4(options).find( option2=>option2.id===get$4(activeId))}var $$exports={open:open2},fragment=root$6(),div=first_child(fragment),node2=child(div);{var consequent=$$anchor2=>{var div_1=root_1$4(),node_1=child(div_1);Loader_circle(node_1,{class:"h-3.5 w-3.5 animate-spin"}),next$1(),reset(div_1),append($$anchor2,div_1)},alternate_3=$$anchor2=>{var fragment_1=comment$2(),node_2=first_child(fragment_1);{var consequent_1=$$anchor3=>{var p2=root_3$3();append($$anchor3,p2)},alternate_2=$$anchor3=>{const selectedOption=user_derived( getDisplayOption);var fragment_2=comment$2(),node_3=first_child(fragment_2);{var consequent_5=$$anchor4=>{var fragment_3=root_5$3(),button=first_child(fragment_3);button.__click=()=>handleOpenChange(!0);var node_4=child(button);Package(node_4,{class:"h-3.5 w-3.5"});var node_5=sibling(node_4,2);{let $0=user_derived(()=>get$4(selectedOption)?.model||"Select model");TruncatedText(node_5,{get text(){return get$4($0)},class:"min-w-0 font-medium"})}var node_6=sibling(node_5,2);{var consequent_2=$$anchor5=>{ Loader_circle($$anchor5,{class:"h-3 w-3.5 animate-spin"})},alternate=$$anchor5=>{Chevron_down($$anchor5,{class:"h-3 w-3.5"})};if_block(node_6,$$render=>{get$4(updating)||get$4(isLoadingModel)?$$render(consequent_2):$$render(alternate,!1)})}reset(button);var node_7=sibling(button,2);component(node_7,()=>Root$1,($$anchor5,Sheet_Root)=>{Sheet_Root($$anchor5,{onOpenChange:handleSheetOpenChange,get open(){return get$4(sheetOpen)},set open($$value){set$1(sheetOpen,$$value,!0)},children:($$anchor6,$$slotProps)=>{ var fragment_6=comment$2(),node_8=first_child(fragment_6);component(node_8,()=>Sheet_content,($$anchor7,Sheet_Content)=>{Sheet_Content($$anchor7,{side:"bottom",class:"max-h-[85vh] gap-1",children:($$anchor8,$$slotProps2)=>{var fragment_7=root_9$2(),node_9=first_child(fragment_7);component(node_9,()=>Sheet_header,($$anchor9,Sheet_Header)=>{Sheet_Header($$anchor9,{children:($$anchor10,$$slotProps3)=>{var fragment_8=root_10$2(),node_10=first_child(fragment_8);component(node_10,()=>Sheet_title,($$anchor11,Sheet_Title)=>{ Sheet_Title($$anchor11,{children:($$anchor12,$$slotProps4)=>{next$1();var text2=text$8("Select Model");append($$anchor12,text2)},$$slots:{default:!0}})});var node_11=sibling(node_10,2);component(node_11,()=>Sheet_description,($$anchor11,Sheet_Description)=>{Sheet_Description($$anchor11,{class:"sr-only",children:($$anchor12,$$slotProps4)=>{next$1();var text_1=text$8("Choose a model to use for the conversation");append($$anchor12,text_1)},$$slots:{default:!0}})}),append($$anchor10,fragment_8)},$$slots:{ default:!0}})});var div_2=sibling(node_9,2),div_3=child(div_2),node_12=child(div_3);SearchInput(node_12,{placeholder:"Search models...",get value(){return get$4(searchTerm)},set value($$value){set$1(searchTerm,$$value,!0)}}),reset(div_3);var div_4=sibling(div_3,2),node_13=child(div_4);{var consequent_3=$$anchor9=>{var fragment_9=root_13$1(),button_1=first_child(fragment_9),span=child(button_1),text_2=child(span,!0);reset(span),next$1(2),reset(button_1),next$1(2),template_effect(()=>set_text(text_2, get$4(selectedOption)?.name||currentModel())),append($$anchor9,fragment_9)};if_block(node_13,$$render=>{!get$4(isCurrentModelInCache)&¤tModel()&&$$render(consequent_3)})}var node_14=sibling(node_13,2);{var consequent_4=$$anchor9=>{var p_1=root_14();append($$anchor9,p_1)};if_block(node_14,$$render=>{get$4(filteredOptions).length===0&&$$render(consequent_4)})}var node_15=sibling(node_14,2);ModelsSelectorList(node_15,{get groups(){return get$4(groupedFilteredOptions)},get currentModel(){return currentModel()}, get activeId(){return get$4(activeId)},sectionHeaderClass:"px-2 py-2 text-xs font-semibold text-muted-foreground/60 select-none",orgHeaderClass:"px-2 py-2 text-xs font-semibold text-muted-foreground/60 select-none [&:not(:first-child)]:mt-2",onSelect:handleSelect,onInfoClick:handleInfoClick}),reset(div_4),reset(div_2),append($$anchor8,fragment_7)},$$slots:{default:!0}})}),append($$anchor6,fragment_6)},$$slots:{default:!0}})}),template_effect($0=>{set_class(button,1,$0),button.disabled=disabled()|| get$4(updating)},[()=>clsx(cn$1("inline-grid cursor-pointer grid-cols-[1fr_auto_1fr] items-center gap-1.5 rounded-sm bg-muted-foreground/10 px-1.5 py-1 text-xs transition hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60",get$4(isCurrentModelInCache)?forceForegroundText()||get$4(isHighlightedCurrentModelActive)?"text-foreground":"text-muted-foreground":"bg-red-400/10 !text-red-400 hove\ r:bg-red-400/20 hover:text-red-400",get$4(sheetOpen)?"text-foreground":""))]),append($$anchor4,fragment_3)},alternate_1=$$anchor4=>{var button_2=root_15();button_2.__click=()=>handleOpenChange(!0);var node_16=child(button_2);Package(node_16,{class:"h-3.5 w-3.5"});var node_17=sibling(node_16,2);{let $0=user_derived(()=>get$4(selectedOption)?.model||"");TruncatedText(node_17,{get text(){return get$4($0)},class:"min-w-0 font-medium"})}var node_18=sibling(node_17,2);{var consequent_6=$$anchor5=>{Loader_circle( $$anchor5,{class:"h-3 w-3.5 animate-spin"})};if_block(node_18,$$render=>{get$4(updating)&&$$render(consequent_6)})}reset(button_2),template_effect($0=>{set_class(button_2,1,$0),button_2.disabled=disabled()||get$4(updating)},[()=>clsx(cn$1("inline-flex cursor-pointer items-center gap-1.5 rounded-sm bg-muted-foreground/10 px-1.5 py-1 text-xs transition hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disab\ led:opacity-60",get$4(isCurrentModelInCache)?forceForegroundText()||get$4(isHighlightedCurrentModelActive)?"text-foreground":"text-muted-foreground":"bg-red-400/10 !text-red-400 hover:bg-red-400/20 hover:text-red-400"))]),append($$anchor4,button_2)};if_block(node_3,$$render=>{get$4(isRouter)?$$render(consequent_5):$$render(alternate_1,!1)})}append($$anchor3,fragment_2)};if_block(node_2,$$render=>{get$4(options).length===0&&get$4(isRouter)?$$render(consequent_1):$$render(alternate_2,!1)},!0)}append( $$anchor2,fragment_1)};if_block(node2,$$render=>{get$4(loading)&&get$4(options).length===0&&get$4(isRouter)?$$render(consequent):$$render(alternate_3,!1)})}reset(div);var node_19=sibling(div,2);{var consequent_7=$$anchor2=>{DialogModelInformation($$anchor2,{get modelId(){return get$4(infoModelId)},get open(){return get$4(showModelDialog)},set open($$value){set$1(showModelDialog,$$value,!0)}})};if_block(node_19,$$render=>{get$4(showModelDialog)&&$$render(consequent_7)})}return template_effect($0=>set_class( div,1,$0),[()=>clsx(cn$1("relative inline-flex flex-col items-end gap-1",className()))]),append($$anchor,fragment),pop($$exports)}delegate(["click"]);var root_4=from_html(" "),root_5$2=from_html(" "),root_7$2=from_html(" "),root_9$1=from_html(" "),root_2$5=from_html(' ');function ModelId($$anchor,$$props){push$1($$props,!0);let showOrgName=prop($$props,"showOrgNam\ e",3,!1),showRaw=prop($$props,"showRaw",3,void 0),className=prop($$props,"class",3,""),rest=rest_props($$props,["$$slots","$$events","$$legacy","modelId","showOrgName","showRaw","aliases","tags","class"]);const badgeClass="inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap rounded-md border border-border/50 px-1 py-0 text-[10px] font-mono bg-foreground/15 dark:bg-foreground/10 text-foreground [a&]:hover:bg-foreground/25",tagBadgeClass="inline-flex w-fit shrink-0 items-cente\ r justify-center whitespace-nowrap rounded-md border border-border/50 px-1 py-0 text-[10px] font-mono text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground";let parsed=user_derived(()=>ModelsService.parseModelId($$props.modelId)),resolvedShowRaw=user_derived(()=>showRaw()??config$1().showRawModelNames??!1),displayName=user_derived(()=>$$props.aliases&&$$props.aliases.length>0?$$props.aliases[0]:get$4(parsed).modelName??$$props.modelId),remainingAliases=user_derived(()=>$$props.aliases&& $$props.aliases.length>1?$$props.aliases.slice(1):[]),allTags=user_derived(()=>[...get$4(parsed).tags??[],...$$props.tags??[]]);var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{TruncatedText($$anchor2,spread_props({get class(){return`font-medium ${className()??""}`},showTooltip:!1,get text(){return $$props.modelId}},()=>rest))},alternate=$$anchor2=>{var span=root_2$5();attribute_effect(span,()=>({class:`flex min-w-0 flex-wrap items-center gap-1 ${className()??""}`, ...rest}));var span_1=child(span),node_1=child(span_1);{var consequent_1=$$anchor3=>{var text2=text$8();template_effect(()=>set_text(text2,`${get$4(parsed).orgName??""}/`)),append($$anchor3,text2)};if_block(node_1,$$render=>{showOrgName()&&get$4(parsed).orgName&&!($$props.aliases&&$$props.aliases.length>0)&&$$render(consequent_1)})}var text_1=sibling(node_1,1,!0);reset(span_1);var node_2=sibling(span_1,2);{var consequent_2=$$anchor3=>{var span_2=root_4();set_class(span_2,1,clsx(badgeClass));var text_2=child( span_2);reset(span_2),template_effect(()=>set_text(text_2,`${get$4(parsed).params??""}${get$4(parsed).activatedParams?`-${get$4(parsed).activatedParams}`:""}`)),append($$anchor3,span_2)};if_block(node_2,$$render=>{get$4(parsed).params&&$$render(consequent_2)})}var node_3=sibling(node_2,2);{var consequent_3=$$anchor3=>{var span_3=root_5$2();set_class(span_3,1,clsx(badgeClass));var text_3=child(span_3,!0);reset(span_3),template_effect(()=>set_text(text_3,get$4(parsed).quantization)),append($$anchor3, span_3)};if_block(node_3,$$render=>{get$4(parsed).quantization&&$$render(consequent_3)})}var node_4=sibling(node_3,2);{var consequent_4=$$anchor3=>{var fragment_3=comment$2(),node_5=first_child(fragment_3);each(node_5,16,()=>get$4(remainingAliases),alias=>alias,($$anchor4,alias)=>{var span_4=root_7$2();set_class(span_4,1,clsx(badgeClass));var text_4=child(span_4,!0);reset(span_4),template_effect(()=>set_text(text_4,alias)),append($$anchor4,span_4)}),append($$anchor3,fragment_3)};if_block(node_4, $$render=>{get$4(remainingAliases).length>0&&$$render(consequent_4)})}var node_6=sibling(node_4,2);{var consequent_5=$$anchor3=>{var fragment_4=comment$2(),node_7=first_child(fragment_4);each(node_7,16,()=>get$4(allTags),tag=>tag,($$anchor4,tag)=>{var span_5=root_9$1();set_class(span_5,1,clsx(tagBadgeClass));var text_5=child(span_5,!0);reset(span_5),template_effect(()=>set_text(text_5,tag)),append($$anchor4,span_5)}),append($$anchor3,fragment_4)};if_block(node_6,$$render=>{get$4(allTags).length> 0&&$$render(consequent_5)})}reset(span),template_effect(()=>set_text(text_1,get$4(displayName))),append($$anchor2,span)};if_block(node2,$$render=>{get$4(resolvedShowRaw)?$$render(consequent):$$render(alternate,!1)})}append($$anchor,fragment),pop()}var root_3$2=from_html(" ",1),root_8=from_html(" ",1);function ModelBadge($$anchor,$$props){push$1($$props,!0);const badgeContent=$$anchor2=>{BadgeInfo($$anchor2,{get class(){return className()},get onclick(){return $$props.onclick},icon:$$anchor3=>{ Package($$anchor3,{class:"h-3 w-3"})},children:($$anchor3,$$slotProps)=>{var fragment_2=root_3$2(),node2=first_child(fragment_2);{var consequent=$$anchor4=>{ModelId($$anchor4,{get modelId(){return get$4(model)}})};if_block(node2,$$render=>{get$4(model)&&$$render(consequent)})}var node_1=sibling(node2,2);{var consequent_1=$$anchor4=>{{let $0=user_derived(()=>get$4(model)||"");ActionIconCopyToClipboard($$anchor4,{get text(){return get$4($0)},ariaLabel:"Copy model name"})}};if_block(node_1,$$render=>{ showCopyIcon()&&$$render(consequent_1)})}append($$anchor3,fragment_2)},$$slots:{icon:!0,default:!0}})};let className=prop($$props,"class",3,""),showCopyIcon=prop($$props,"showCopyIcon",3,!1),showTooltip=prop($$props,"showTooltip",3,!1),model=user_derived(()=>$$props.model||modelsStore.singleModelName),isModelMode=user_derived(()=>serverStore.isModelMode),shouldShow=user_derived(()=>get$4(model)&&($$props.model!==void 0||get$4(isModelMode)));var fragment_5=comment$2(),node_2=first_child(fragment_5); {var consequent_3=$$anchor2=>{var fragment_6=comment$2(),node_3=first_child(fragment_6);{var consequent_2=$$anchor3=>{var fragment_7=comment$2(),node_4=first_child(fragment_7);component(node_4,()=>Root$5,($$anchor4,Tooltip_Root)=>{Tooltip_Root($$anchor4,{children:($$anchor5,$$slotProps)=>{var fragment_8=root_8(),node_5=first_child(fragment_8);component(node_5,()=>Tooltip_trigger,($$anchor6,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor6,{children:($$anchor7,$$slotProps2)=>{badgeContent($$anchor7)}, $$slots:{default:!0}})});var node_6=sibling(node_5,2);component(node_6,()=>Tooltip_content,($$anchor6,Tooltip_Content)=>{Tooltip_Content($$anchor6,{children:($$anchor7,$$slotProps2)=>{next$1();var text2=text$8();template_effect(()=>set_text(text2,$$props.onclick?"Click for model details":get$4(model))),append($$anchor7,text2)},$$slots:{default:!0}})}),append($$anchor5,fragment_8)},$$slots:{default:!0}})}),append($$anchor3,fragment_7)},alternate=$$anchor3=>{badgeContent($$anchor3)};if_block(node_3, $$render=>{showTooltip()?$$render(consequent_2):$$render(alternate,!1)})}append($$anchor2,fragment_6)};if_block(node_2,$$render=>{get$4(shouldShow)&&$$render(consequent_3)})}append($$anchor,fragment_5),pop()}var root_1$3=from_html('
        '),root_2$4=from_html(" ",1),root$5=from_html('
        ',1);function DropdownMenuSearchable($$anchor,$$props){ push$1($$props,!0);let placeholder=prop($$props,"placeholder",3,"Search..."),searchValue=prop($$props,"searchValue",15,""),emptyMessage=prop($$props,"emptyMessage",3,"No items found"),isEmpty=prop($$props,"isEmpty",3,!1);var fragment=root$5(),div=first_child(fragment),node2=child(div);SearchInput(node2,{get placeholder(){return placeholder()},get onInput(){return $$props.onSearchChange},get onKeyDown(){return $$props.onSearchKeyDown},get value(){return searchValue()},set value($$value){searchValue( $$value)}}),reset(div);var div_1=sibling(div,2),node_1=child(div_1);snippet(node_1,()=>$$props.children);var node_2=sibling(node_1,2);{var consequent=$$anchor2=>{var div_2=root_1$3(),text2=child(div_2,!0);reset(div_2),template_effect(()=>set_text(text2,emptyMessage())),append($$anchor2,div_2)};if_block(node_2,$$render=>{isEmpty()&&$$render(consequent)})}reset(div_1);var node_3=sibling(div_1,2);{var consequent_1=$$anchor2=>{var fragment_1=root_2$4(),node_4=first_child(fragment_1);component(node_4, ()=>Dropdown_menu_separator,($$anchor3,DropdownMenu_Separator)=>{DropdownMenu_Separator($$anchor3,{})});var node_5=sibling(node_4,2);snippet(node_5,()=>$$props.footer),append($$anchor2,fragment_1)};if_block(node_3,$$render=>{$$props.footer&&$$render(consequent_1)})}append($$anchor,fragment),pop()}const iconComponent=($$anchor,IconComponent=noop$3,className=noop$3)=>{var fragment=comment$2(),node2=first_child(fragment);component(node2,IconComponent,($$anchor2,IconComponent_1)=>{IconComponent_1($$anchor2, {get class(){return className()}})}),append($$anchor,fragment)};var root_6$1=from_html(' ',1),root_7$1=from_html("

        "),root_5$1=from_html(" ",1),root_12=from_html('
        ',1),root_10$1=from_html(" ",1),root_2$3=from_html(" ",1);function DropdownMenuActions($$anchor,$$props){push$1($$props,!0);let triggerClass=prop($$props,"triggerClass",3,""),align=prop($$props,"align",3,"end"),open2=prop($$props, "open",15,!1);var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Root$2,($$anchor2,DropdownMenu_Root)=>{DropdownMenu_Root($$anchor2,{get open(){return open2()},set open($$value){open2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_2=root_2$3(),node_2=first_child(fragment_2);component(node_2,()=>Dropdown_menu_trigger,($$anchor4,DropdownMenu_Trigger)=>{DropdownMenu_Trigger($$anchor4,{get class(){return`flex h-6 w-6 cursor-pointer items-center justify-center r\ ounded-md p-0 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground ${triggerClass()??""}`},onclick:e=>e.stopPropagation(),children:($$anchor5,$$slotProps2)=>{var fragment_3=comment$2(),node_3=first_child(fragment_3);{var consequent=$$anchor6=>{var fragment_4=comment$2(),node_4=first_child( fragment_4);component(node_4,()=>Root$5,($$anchor7,Tooltip_Root)=>{Tooltip_Root($$anchor7,{children:($$anchor8,$$slotProps3)=>{var fragment_5=root_5$1(),node_5=first_child(fragment_5);component(node_5,()=>Tooltip_trigger,($$anchor9,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor9,{children:($$anchor10,$$slotProps4)=>{var fragment_6=root_6$1(),node_6=first_child(fragment_6);iconComponent(node_6,()=>$$props.triggerIcon,()=>"h-3 w-3");var span=sibling(node_6,2),text2=child(span,!0);reset(span),template_effect( ()=>set_text(text2,$$props.triggerTooltip)),append($$anchor10,fragment_6)},$$slots:{default:!0}})});var node_7=sibling(node_5,2);component(node_7,()=>Tooltip_content,($$anchor9,Tooltip_Content)=>{Tooltip_Content($$anchor9,{children:($$anchor10,$$slotProps4)=>{var p2=root_7$1(),text_1=child(p2,!0);reset(p2),template_effect(()=>set_text(text_1,$$props.triggerTooltip)),append($$anchor10,p2)},$$slots:{default:!0}})}),append($$anchor8,fragment_5)},$$slots:{default:!0}})}),append($$anchor6,fragment_4)}, alternate=$$anchor6=>{iconComponent($$anchor6,()=>$$props.triggerIcon,()=>"h-3 w-3")};if_block(node_3,$$render=>{$$props.triggerTooltip?$$render(consequent):$$render(alternate,!1)})}append($$anchor5,fragment_3)},$$slots:{default:!0}})});var node_8=sibling(node_2,2);component(node_8,()=>Dropdown_menu_content,($$anchor4,DropdownMenu_Content)=>{DropdownMenu_Content($$anchor4,{get align(){return align()},class:"z-[999999] w-48",children:($$anchor5,$$slotProps2)=>{var fragment_8=comment$2(),node_9=first_child( fragment_8);each(node_9,19,()=>$$props.actions,action2=>action2.label,($$anchor6,action2,index2)=>{var fragment_9=root_10$1(),node_10=first_child(fragment_9);{var consequent_1=$$anchor7=>{var fragment_10=comment$2(),node_11=first_child(fragment_10);component(node_11,()=>Dropdown_menu_separator,($$anchor8,DropdownMenu_Separator)=>{DropdownMenu_Separator($$anchor8,{})}),append($$anchor7,fragment_10)};if_block(node_10,$$render=>{get$4(action2).separator&&get$4(index2)>0&&$$render(consequent_1)})}var node_12=sibling( node_10,2);component(node_12,()=>Dropdown_menu_item,($$anchor7,DropdownMenu_Item)=>{DropdownMenu_Item($$anchor7,{get onclick(){return get$4(action2).onclick},get variant(){return get$4(action2).variant},get disabled(){return get$4(action2).disabled},class:"flex items-center justify-between hover:[&>kbd]:opacity-100",children:($$anchor8,$$slotProps3)=>{var fragment_11=root_12(),div=first_child(fragment_11),node_13=child(div);iconComponent(node_13,()=>get$4(action2).icon,()=>`h-4 w-4 ${get$4(action2). variant==="destructive"?"text-destructive":""}`);var text_2=sibling(node_13);reset(div);var node_14=sibling(div,2);{var consequent_2=$$anchor9=>{KeyboardShortcutInfo($$anchor9,{get keys(){return get$4(action2).shortcut},get variant(){return get$4(action2).variant}})};if_block(node_14,$$render=>{get$4(action2).shortcut&&$$render(consequent_2)})}template_effect(()=>set_text(text_2,` ${get$4(action2).label??""}`)),append($$anchor8,fragment_11)},$$slots:{default:!0}})}),append($$anchor6,fragment_9)}), append($$anchor5,fragment_8)},$$slots:{default:!0}})}),append($$anchor3,fragment_2)},$$slots:{default:!0}})}),append($$anchor,fragment_1),pop()}var root_2$2=from_html(" ",1),root_1$2=from_html(" ",1),root_6=from_html(" ",1),root$4=from_html('
        ');function ServerStatus($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),showActions=prop( $$props,"showActions",3,!1),error2=user_derived(serverError),loading=user_derived(serverLoading),model=user_derived(singleModelName),serverData=user_derived(serverProps);function getStatusColor(){return get$4(loading)?"bg-yellow-500":get$4(error2)?"bg-red-500":get$4(serverData)?"bg-green-500":"bg-gray-500"}function getStatusText(){return get$4(loading)?"Connecting...":get$4(error2)?"Connection Error":get$4(serverData)?"Connected":"Unknown"}var div=root$4(),div_1=child(div),div_2=child(div_1),span=sibling( div_2,2),text2=child(span,!0);reset(span),reset(div_1);var node2=sibling(div_1,2);{var consequent_1=$$anchor2=>{var fragment=root_1$2(),node_1=first_child(fragment);Badge(node_1,{variant:"outline",class:"text-xs",children:($$anchor3,$$slotProps)=>{var fragment_1=root_2$2(),node_2=first_child(fragment_1);Server(node_2,{class:"mr-1 h-3 w-3"});var text_1=sibling(node_2);template_effect(()=>set_text(text_1,` ${get$4(model)||"Unknown Model"}`)),append($$anchor3,fragment_1)},$$slots:{default:!0}});var node_3=sibling( node_1,2);{var consequent=$$anchor3=>{Badge($$anchor3,{variant:"secondary",class:"text-xs",children:($$anchor4,$$slotProps)=>{next$1();var text_2=text$8();template_effect($0=>set_text(text_2,`ctx: ${$0??""}`),[()=>get$4(serverData).default_generation_settings.n_ctx.toLocaleString()]),append($$anchor4,text_2)},$$slots:{default:!0}})};if_block(node_3,$$render=>{get$4(serverData)?.default_generation_settings?.n_ctx&&$$render(consequent)})}append($$anchor2,fragment)};if_block(node2,$$render=>{get$4( serverData)&&!get$4(error2)&&$$render(consequent_1)})}var node_4=sibling(node2,2);{var consequent_2=$$anchor2=>{Button($$anchor2,{variant:"outline",size:"sm",class:"text-destructive",children:($$anchor3,$$slotProps)=>{var fragment_5=root_6(),node_5=first_child(fragment_5);Triangle_alert(node_5,{class:"h-4 w-4"});var text_3=sibling(node_5);template_effect(()=>set_text(text_3,` ${get$4(error2)??""}`)),append($$anchor3,fragment_5)},$$slots:{default:!0}})};if_block(node_4,$$render=>{showActions()&&get$4( error2)&&$$render(consequent_2)})}reset(div),template_effect(($0,$1)=>{set_class(div,1,`flex items-center space-x-3 ${className()??""}`),set_class(div_2,1,`h-2 w-2 rounded-full ${$0??""}`),set_text(text2,$1)},[getStatusColor,getStatusText]),append($$anchor,div),pop()}var root_2$1=from_html(" Enter API Key",1),root_1$1=from_html('
        '),root_5=from_html('
        '),root_7=from_html('
        '),root_9=from_html('
        '),root_10=from_html('

        '),root_11=from_html('

        ✓ API key validated successfully! Connecting...

        '),root_13=from_html(" Validating...",1),root_3$1=from_html('
        '),root_20=from_html(" Connecting...",1),root_21=from_html(" Retry Connection",1),root_18=from_html("
        "),root_22=from_html('
        Troubleshooting

        Start the llama-server:

        llama-server -hf ggml-org/gemma-3-4b-it-GGUF

        or

        llama-server -m locally-stored-model.gguf

        • Check that the server is accessible at the correct URL
        • Verify your network connection
        • Check server logs for any error messages
        '),root$3=from_html('

        Server Connection Error

        ');function ServerErrorSplash($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),showRetry=prop($$props,"showRetry",3,!0),showTroubleshooting=prop($$props,"showTroubleshooting",3,!1),isServerLoading=user_derived( serverLoading),isAccessDeniedError=user_derived(()=>$$props.error.toLowerCase().includes("access denied")||$$props.error.toLowerCase().includes("invalid api key")||$$props.error.toLowerCase().includes("unauthorized")||$$props.error.toLowerCase().includes("401")||$$props.error.toLowerCase().includes("403")),apiKeyInput=state$1(""),showApiKeyInput=state$1(!1),apiKeyState=state$1("idle"),apiKeyError=state$1("");function handleRetryConnection(){$$props.onRetry?$$props.onRetry():serverStore.fetch()}function handleShowApiKeyInput(){ set$1(showApiKeyInput,!0);const currentConfig=config$1();set$1(apiKeyInput,currentConfig.apiKey?.toString()||"",!0)}async function handleSaveApiKey(){if(get$4(apiKeyInput).trim()){set$1(apiKeyState,"validating"),set$1(apiKeyError,"");try{settingsStore.updateConfig("apiKey",get$4(apiKeyInput).trim());const response=await fetch(`${base}/props`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${get$4(apiKeyInput).trim()}`}});response.ok?(set$1(apiKeyState,"success"),setTimeout(()=>{ goto("#/")},1e3)):(set$1(apiKeyState,"error"),response.status===401||response.status===403?set$1(apiKeyError,"Invalid API key - please check and try again"):set$1(apiKeyError,`Authentication failed (${response.status})`),setTimeout(()=>{set$1(apiKeyState,"idle")},3e3))}catch(error2){set$1(apiKeyState,"error"),error2 instanceof Error?error2.message.includes("fetch")?set$1(apiKeyError,"Cannot connect to server - check if server is running"):set$1(apiKeyError,error2.message,!0):set$1(apiKeyError,"C\ onnection error - please try again"),setTimeout(()=>{set$1(apiKeyState,"idle")},3e3)}}}function handleApiKeyKeydown(event2){event2.key===KeyboardKey.ENTER&&handleSaveApiKey()}var div=root$3(),div_1=child(div),div_2=child(div_1),div_3=child(div_2),node2=child(div_3);Triangle_alert(node2,{class:"h-8 w-8 text-destructive"}),reset(div_3);var p2=sibling(div_3,4),text2=child(p2,!0);reset(p2),reset(div_2);var node_1=sibling(div_2,2);{var consequent=$$anchor2=>{var div_4=root_1$1(),node_2=child(div_4);Button( node_2,{onclick:handleShowApiKeyInput,variant:"outline",class:"w-full",children:($$anchor3,$$slotProps)=>{var fragment=root_2$1(),node_3=first_child(fragment);Key(node_3,{class:"h-4 w-4"}),next$1(),append($$anchor3,fragment)},$$slots:{default:!0}}),reset(div_4),transition(1,div_4,()=>fly,()=>({y:10,duration:300,delay:200})),append($$anchor2,div_4)};if_block(node_1,$$render=>{get$4(isAccessDeniedError)&&!get$4(showApiKeyInput)&&$$render(consequent)})}var node_4=sibling(node_1,2);{var consequent_8=$$anchor2=>{ var div_5=root_3$1(),div_6=child(div_5),node_5=child(div_6);Label(node_5,{for:"api-key-input",class:"text-sm font-medium",children:($$anchor3,$$slotProps)=>{next$1();var text_1=text$8("API Key");append($$anchor3,text_1)},$$slots:{default:!0}});var div_7=sibling(node_5,2),node_6=child(div_7);{let $0=user_derived(()=>get$4(apiKeyState)==="error"?"border-destructive":get$4(apiKeyState)==="success"?"border-green-500":""),$1=user_derived(()=>get$4(apiKeyState)==="validating");Input(node_6,{id:"api-ke\ y-input",placeholder:"Enter your API key...",onkeydown:handleApiKeyKeydown,get class(){return`w-full pr-10 ${get$4($0)??""}`},get disabled(){return get$4($1)},get value(){return get$4(apiKeyInput)},set value($$value){set$1(apiKeyInput,$$value,!0)}})}var node_7=sibling(node_6,2);{var consequent_1=$$anchor3=>{var div_8=root_5(),node_8=child(div_8);Refresh_cw(node_8,{class:"h-4 w-4 animate-spin text-muted-foreground"}),reset(div_8),append($$anchor3,div_8)},alternate_1=$$anchor3=>{var fragment_1=comment$2(), node_9=first_child(fragment_1);{var consequent_2=$$anchor4=>{var div_9=root_7(),node_10=child(div_9);Circle_check_big(node_10,{class:"h-4 w-4 text-green-500"}),reset(div_9),transition(1,div_9,()=>scale,()=>({duration:200,start:.8})),append($$anchor4,div_9)},alternate=$$anchor4=>{var fragment_2=comment$2(),node_11=first_child(fragment_2);{var consequent_3=$$anchor5=>{var div_10=root_9(),node_12=child(div_10);Circle_x(node_12,{class:"h-4 w-4 text-destructive"}),reset(div_10),transition(1,div_10,()=>scale, ()=>({duration:200,start:.8})),append($$anchor5,div_10)};if_block(node_11,$$render=>{get$4(apiKeyState)==="error"&&$$render(consequent_3)},!0)}append($$anchor4,fragment_2)};if_block(node_9,$$render=>{get$4(apiKeyState)==="success"?$$render(consequent_2):$$render(alternate,!1)},!0)}append($$anchor3,fragment_1)};if_block(node_7,$$render=>{get$4(apiKeyState)==="validating"?$$render(consequent_1):$$render(alternate_1,!1)})}reset(div_7);var node_13=sibling(div_7,2);{var consequent_4=$$anchor3=>{var p_1=root_10(), text_2=child(p_1,!0);reset(p_1),template_effect(()=>set_text(text_2,get$4(apiKeyError))),transition(1,p_1,()=>fly,()=>({y:-10,duration:200})),append($$anchor3,p_1)};if_block(node_13,$$render=>{get$4(apiKeyError)&&$$render(consequent_4)})}var node_14=sibling(node_13,2);{var consequent_5=$$anchor3=>{var p_2=root_11();transition(1,p_2,()=>fly,()=>({y:-10,duration:200})),append($$anchor3,p_2)};if_block(node_14,$$render=>{get$4(apiKeyState)==="success"&&$$render(consequent_5)})}reset(div_6);var div_11=sibling( div_6,2),node_15=child(div_11);{let $0=user_derived(()=>!get$4(apiKeyInput).trim()||get$4(apiKeyState)==="validating"||get$4(apiKeyState)==="success");Button(node_15,{onclick:handleSaveApiKey,get disabled(){return get$4($0)},class:"flex-1",children:($$anchor3,$$slotProps)=>{var fragment_3=comment$2(),node_16=first_child(fragment_3);{var consequent_6=$$anchor4=>{var fragment_4=root_13(),node_17=first_child(fragment_4);Refresh_cw(node_17,{class:"h-4 w-4 animate-spin"}),next$1(),append($$anchor4,fragment_4)}, alternate_3=$$anchor4=>{var fragment_5=comment$2(),node_18=first_child(fragment_5);{var consequent_7=$$anchor5=>{var text_3=text$8("Success!");append($$anchor5,text_3)},alternate_2=$$anchor5=>{var text_4=text$8("Save & Retry");append($$anchor5,text_4)};if_block(node_18,$$render=>{get$4(apiKeyState)==="success"?$$render(consequent_7):$$render(alternate_2,!1)},!0)}append($$anchor4,fragment_5)};if_block(node_16,$$render=>{get$4(apiKeyState)==="validating"?$$render(consequent_6):$$render(alternate_3, !1)})}append($$anchor3,fragment_3)},$$slots:{default:!0}})}var node_19=sibling(node_15,2);{let $0=user_derived(()=>get$4(apiKeyState)==="validating");Button(node_19,{onclick:()=>{set$1(showApiKeyInput,!1),set$1(apiKeyState,"idle"),set$1(apiKeyError,"")},variant:"outline",class:"flex-1",get disabled(){return get$4($0)},children:($$anchor3,$$slotProps)=>{next$1();var text_5=text$8("Cancel");append($$anchor3,text_5)},$$slots:{default:!0}})}reset(div_11),reset(div_5),transition(1,div_5,()=>fly,()=>({ y:10,duration:300,delay:200})),append($$anchor2,div_5)};if_block(node_4,$$render=>{get$4(showApiKeyInput)&&$$render(consequent_8)})}var node_20=sibling(node_4,2);{var consequent_10=$$anchor2=>{var div_12=root_18(),node_21=child(div_12);Button(node_21,{onclick:handleRetryConnection,get disabled(){return get$4(isServerLoading)},class:"w-full",children:($$anchor3,$$slotProps)=>{var fragment_6=comment$2(),node_22=first_child(fragment_6);{var consequent_9=$$anchor4=>{var fragment_7=root_20(),node_23=first_child( fragment_7);Refresh_cw(node_23,{class:"h-4 w-4 animate-spin"}),next$1(),append($$anchor4,fragment_7)},alternate_4=$$anchor4=>{var fragment_8=root_21(),node_24=first_child(fragment_8);Refresh_cw(node_24,{class:"h-4 w-4"}),next$1(),append($$anchor4,fragment_8)};if_block(node_22,$$render=>{get$4(isServerLoading)?$$render(consequent_9):$$render(alternate_4,!1)})}append($$anchor3,fragment_6)},$$slots:{default:!0}}),reset(div_12),transition(1,div_12,()=>fly,()=>({y:10,duration:300,delay:200})),append( $$anchor2,div_12)};if_block(node_20,$$render=>{showRetry()&&$$render(consequent_10)})}var node_25=sibling(node_20,2);{var consequent_11=$$anchor2=>{var div_13=root_22();transition(1,div_13,()=>fly,()=>({y:10,duration:300,delay:400})),append($$anchor2,div_13)};if_block(node_25,$$render=>{showTroubleshooting()&&$$render(consequent_11)})}reset(div_1),reset(div),template_effect(()=>{set_class(div,1,`flex h-full items-center justify-center ${className()??""}`),set_text(text2,$$props.error)}),transition( 1,div_2,()=>fade,()=>({duration:300})),append($$anchor,div),pop()}var root$2=from_html('

        Connecting to Server

        ');function ServerLoadingSplash($$anchor,$$props){let className=prop($$props,"class",3,""),message=prop($$props, "message",3,"Initializing connection to llama.cpp server...");var div=root$2(),div_1=child(div),div_2=child(div_1),div_3=child(div_2),node2=child(div_3);Server(node2,{class:"h-8 w-8 animate-pulse text-muted-foreground"}),reset(div_3);var p2=sibling(div_3,4),text2=child(p2,!0);reset(p2),reset(div_2);var div_4=sibling(div_2,2),node_1=child(div_4);ServerStatus(node_1,{class:"justify-center"}),reset(div_4),reset(div_1),reset(div),template_effect(()=>{set_class(div,1,`flex h-full items-center justify\ -center ${className()??""}`),set_text(text2,message())}),transition(1,div_2,()=>fade,()=>({duration:300})),append($$anchor,div)}var root_2=from_html('
        '),root_1=from_html(" ",1);function _layout($$anchor,$$props){push$1($$props,!0);let isChatRoute=user_derived(()=>page$1.route.id==="/chat/[id]"),isHomeRoute=user_derived(()=>page$1.route.id==="/"),isNewChatMode=user_derived(()=>page$1.url.searchParams.get("new_chat")==="true"),showSidebarByDefault=user_derived( ()=>activeMessages().length>0||isLoading()),alwaysShowSidebarOnDesktop=user_derived(()=>config$1().alwaysShowSidebarOnDesktop),autoShowSidebarOnNewChat=user_derived(()=>config$1().autoShowSidebarOnNewChat),isMobile=new IsMobile,isDesktop=user_derived(()=>!isMobile.current),sidebarOpen=state$1(!1),innerHeight=state$1(void 0),chatSidebar=state$1(void 0),titleUpdateDialogOpen=state$1(!1),titleUpdateCurrentTitle=state$1(""),titleUpdateNewTitle=state$1(""),titleUpdateResolve=null,chatSettingsDialogOpen=state$1( !1),chatSettingsDialogInitialSection=state$1(void 0);setChatSettingsDialogContext({open:initialSection=>{set$1(chatSettingsDialogInitialSection,initialSection,!0),set$1(chatSettingsDialogOpen,!0)}});function handleKeydown(event2){const isCtrlOrCmd=event2.ctrlKey||event2.metaKey;isCtrlOrCmd&&event2.key===KeyboardKey.K_LOWER&&(event2.preventDefault(),get$4(chatSidebar)?.activateSearchMode&&(get$4(chatSidebar).activateSearchMode(),set$1(sidebarOpen,!0))),isCtrlOrCmd&&event2.shiftKey&&event2.key===KeyboardKey. O_UPPER&&(event2.preventDefault(),goto("?new_chat=true#/")),event2.shiftKey&&isCtrlOrCmd&&event2.key===KeyboardKey.E_UPPER&&(event2.preventDefault(),get$4(chatSidebar)?.editActiveConversation&&get$4(chatSidebar).editActiveConversation())}function handleTitleUpdateCancel(){set$1(titleUpdateDialogOpen,!1),titleUpdateResolve&&(titleUpdateResolve(!1),titleUpdateResolve=null)}function handleTitleUpdateConfirm(){set$1(titleUpdateDialogOpen,!1),titleUpdateResolve&&(titleUpdateResolve(!0),titleUpdateResolve= null)}user_effect(()=>{if(get$4(alwaysShowSidebarOnDesktop)&&get$4(isDesktop)){set$1(sidebarOpen,!0);return}get$4(isHomeRoute)&&!get$4(isNewChatMode)?set$1(sidebarOpen,!1):get$4(isHomeRoute)&&get$4(isNewChatMode)?set$1(sidebarOpen,!0):get$4(isChatRoute)?get$4(autoShowSidebarOnNewChat)&&set$1(sidebarOpen,!0):set$1(sidebarOpen,get$4(showSidebarByDefault),!0)}),user_effect(()=>{serverStore.props||untrack$1(()=>{serverStore.fetch()})}),user_effect(()=>{serverStore.props&&settingsStore.syncWithServerDefaults()}); let routerModelsFetched=!1;user_effect(()=>{const isRouter=isRouterMode(),modelsCount=modelsStore.models.length;isRouter&&modelsCount>0&&!routerModelsFetched&&(routerModelsFetched=!0,untrack$1(()=>{modelsStore.fetchRouterModels()}))}),user_effect(()=>{const enabledServers=mcpStore.getServers().filter(s2=>s2.enabled&&s2.url.trim());enabledServers.length>0&&untrack$1(()=>{mcpStore.runHealthChecksForServers(enabledServers,!1).catch(error2=>{console.warn("[layout] MCP health checks failed:",error2)})})}), user_effect(()=>{const apiKey=config$1().apiKey;if((page$1.route.id==="/"||page$1.route.id==="/chat/[id]")&&page$1.status!==401&&page$1.status!==403){const headers={"Content-Type":"application/json"};apiKey&&apiKey.trim()!==""&&(headers.Authorization=`Bearer ${apiKey.trim()}`),fetch(`${base}/props`,{headers}).then(response=>{(response.status===401||response.status===403)&&window.location.reload()}).catch(e=>{console.error("Error checking API key:",e)})}}),user_effect(()=>{conversationsStore.setTitleUpdateConfirmationCallback( async(currentTitle,newTitle)=>new Promise(resolve2=>{set$1(titleUpdateCurrentTitle,currentTitle,!0),set$1(titleUpdateNewTitle,newTitle,!0),titleUpdateResolve=resolve2,set$1(titleUpdateDialogOpen,!0)}))});var fragment=comment$2();event("keydown",$window,handleKeydown);var node2=first_child(fragment);component(node2,()=>Provider,($$anchor2,Tooltip_Provider)=>{Tooltip_Provider($$anchor2,{get delayDuration(){return TOOLTIP_DELAY_DURATION},children:($$anchor3,$$slotProps)=>{var fragment_1=root_1(),node_1=first_child( fragment_1);Mode_watcher(node_1,{});var node_2=sibling(node_1,2);Toaster(node_2,{richColors:!0});var node_3=sibling(node_2,2);DialogChatSettings(node_3,{get open(){return get$4(chatSettingsDialogOpen)},onOpenChange:open2=>set$1(chatSettingsDialogOpen,open2,!0),get initialSection(){return get$4(chatSettingsDialogInitialSection)}});var node_4=sibling(node_3,2);DialogConversationTitleUpdate(node_4,{get currentTitle(){return get$4(titleUpdateCurrentTitle)},get newTitle(){return get$4(titleUpdateNewTitle)}, onConfirm:handleTitleUpdateConfirm,onCancel:handleTitleUpdateCancel,get open(){return get$4(titleUpdateDialogOpen)},set open($$value){set$1(titleUpdateDialogOpen,$$value,!0)}});var node_5=sibling(node_4,2);component(node_5,()=>Sidebar_provider,($$anchor4,Sidebar_Provider)=>{Sidebar_Provider($$anchor4,{get open(){return get$4(sidebarOpen)},set open($$value){set$1(sidebarOpen,$$value,!0)},children:($$anchor5,$$slotProps2)=>{var div=root_2();let styles2;var node_6=child(div);component(node_6,()=>Sidebar, ($$anchor6,Sidebar_Root)=>{Sidebar_Root($$anchor6,{class:"h-full",children:($$anchor7,$$slotProps3)=>{bind_this(ChatSidebar($$anchor7,{}),$$value=>set$1(chatSidebar,$$value,!0),()=>get$4(chatSidebar))},$$slots:{default:!0}})});var node_7=sibling(node_6,2);{var consequent=$$anchor6=>{var fragment_3=comment$2(),node_8=first_child(fragment_3);{let $0=user_derived(()=>get$4(sidebarOpen)?"md:left-[var(--sidebar-width)]":"md:left-0!");component(node_8,()=>Sidebar_trigger,($$anchor7,Sidebar_Trigger)=>{ Sidebar_Trigger($$anchor7,{get class(){return`transition-left absolute left-0 z-[900] duration-200 ease-linear ${get$4($0)??""}`},style:"translate: 1rem 1rem;"})})}append($$anchor6,fragment_3)};if_block(node_7,$$render=>{get$4(alwaysShowSidebarOnDesktop)&&get$4(isDesktop)||$$render(consequent)})}var node_9=sibling(node_7,2);component(node_9,()=>Sidebar_inset,($$anchor6,Sidebar_Inset)=>{Sidebar_Inset($$anchor6,{class:"flex flex-1 flex-col overflow-hidden",children:($$anchor7,$$slotProps3)=>{var fragment_4=comment$2(), node_10=first_child(fragment_4);snippet(node_10,()=>$$props.children??noop$3),append($$anchor7,fragment_4)},$$slots:{default:!0}})}),reset(div),template_effect(()=>styles2=set_style(div,"",styles2,{height:`${get$4(innerHeight)??""}px`})),append($$anchor5,div)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),bind_window_size("innerHeight",$$value=>set$1(innerHeight,$$value,!0)),append($$anchor,fragment),pop()}const _0=Object.freeze(Object.defineProperty({__proto__:null, component:_layout},Symbol.toStringTag,{value:"Module"})),getStores=()=>{const stores$1=stores;return{page:{subscribe:stores$1.page.subscribe},navigating:{subscribe:stores$1.navigating.subscribe},updated:stores$1.updated}},page={subscribe(fn){return getStores().page.subscribe(fn)}};var root_3=from_html('

        ');function _error($$anchor,$$props){push$1($$props,!0);const $page=()=>store_get(page,"$page",$$stores),[$$stores,$$cleanup]=setup_stores();let error2=user_derived(()=>$page().error),status=user_derived(()=>$page().status),isApiKeyError=user_derived(()=>get$4(status)===401||get$4(status)===403||get$4(error2)?.message?.toLowerCase().includes("access denied")||get$4(error2)?.message?.toLowerCase().includes("unauthorized")||get$4(error2)?.message?. toLowerCase().includes("invalid api key"));function handleRetry(){goto("#/")}var fragment=comment$2();head$1("1j96wlh",$$anchor2=>{deferred_template_effect(()=>{$document.title=`Error ${get$4(status)??""} - WebUI`})});var node2=first_child(fragment);{var consequent=$$anchor2=>{{let $0=user_derived(()=>get$4(error2)?.message||"Access denied - check server permissions");ServerErrorSplash($$anchor2,{get error(){return get$4($0)},onRetry:handleRetry,showRetry:!1,showTroubleshooting:!1})}},alternate=$$anchor2=>{ var div=root_3(),div_1=child(div),div_2=child(div_1),h1=sibling(child(div_2),2),text2=child(h1);reset(h1);var p2=sibling(h1,2),text_1=child(p2,!0);reset(p2),reset(div_2);var button=sibling(div_2,2);button.__click=()=>goto("#/"),reset(div_1),reset(div),template_effect(()=>{set_text(text2,`Error ${get$4(status)??""}`),set_text(text_1,get$4(error2)?.message||"Something went wrong")}),append($$anchor2,div)};if_block(node2,$$render=>{get$4(isApiKeyError)?$$render(consequent):$$render(alternate,!1)})} append($$anchor,fragment),pop(),$$cleanup()}delegate(["click"]);const _1=Object.freeze(Object.defineProperty({__proto__:null,component:_error},Symbol.toStringTag,{value:"Module"})),load$1=async({fetch:fetch2})=>{await validateApiKey(fetch2)},_page$3=Object.freeze(Object.defineProperty({__proto__:null,load:load$1},Symbol.toStringTag,{value:"Module"}));var root$1=from_html(" ",1);function _page$2($$anchor,$$props){push$1($$props,!0);let qParam=user_derived(()=>page$1.url.searchParams.get("q")), modelParam=user_derived(()=>page$1.url.searchParams.get("model")),newChatParam=user_derived(()=>page$1.url.searchParams.get("new_chat")),showModelNotAvailable=state$1(!1),requestedModelName=state$1(""),availableModelNames=user_derived(()=>modelOptions().map(m=>m.model));function clearUrlParams(){const url2=new URL(page$1.url);url2.searchParams.delete("q"),url2.searchParams.delete("model"),url2.searchParams.delete("new_chat"),replaceState(url2.toString(),{})}async function handleUrlParams(){if(await modelsStore. fetch(),get$4(modelParam)){const model=modelsStore.findModelByName(get$4(modelParam));if(model)try{await modelsStore.selectModelById(model.id)}catch(error2){console.error("Failed to select model:",error2),set$1(requestedModelName,get$4(modelParam),!0),set$1(showModelNotAvailable,!0);return}else{set$1(requestedModelName,get$4(modelParam),!0),set$1(showModelNotAvailable,!0);return}}get$4(qParam)!==null?(await conversationsStore.createConversation(),clearUrlParams()):(get$4(modelParam)||get$4(newChatParam)=== "true")&&clearUrlParams()}onMount$1(async()=>{if(isConversationsInitialized()||await conversationsStore.initialize(),conversationsStore.clearActiveConversation(),chatStore.clearUIState(),isRouterMode()&&modelsStore.selectedModelName&&!modelsStore.isModelLoaded(modelsStore.selectedModelName)){modelsStore.clearSelection();const first=modelOptions().find(m=>modelsStore.loadedModelIds.includes(m.model));first&&await modelsStore.selectModelById(first.id)}(get$4(qParam)!==null||get$4(modelParam)!==null|| get$4(newChatParam)==="true")&&await handleUrlParams()});var fragment=root$1();head$1("1uha8ag",$$anchor2=>{effect(()=>{$document.title="llama.cpp - AI Chat Interface"})});var node2=first_child(fragment);ChatScreen(node2,{showCenteredEmpty:!0});var node_1=sibling(node2,2);DialogModelNotAvailable(node_1,{get modelName(){return get$4(requestedModelName)},get availableModels(){return get$4(availableModelNames)},get open(){return get$4(showModelNotAvailable)},set open($$value){set$1(showModelNotAvailable, $$value,!0)}}),append($$anchor,fragment),pop()}const _2=Object.freeze(Object.defineProperty({__proto__:null,component:_page$2,universal:_page$3},Symbol.toStringTag,{value:"Module"})),load=async({fetch:fetch2})=>{await validateApiKey(fetch2)},_page$1=Object.freeze(Object.defineProperty({__proto__:null,load},Symbol.toStringTag,{value:"Module"}));var root=from_html(" ",1);function _page($$anchor,$$props){push$1($$props,!0);let chatId=user_derived(()=>page$1.params.id),currentChatId,qParam=user_derived( ()=>page$1.url.searchParams.get("q")),modelParam=user_derived(()=>page$1.url.searchParams.get("model")),showModelNotAvailable=state$1(!1),requestedModelName=state$1(""),availableModelNames=user_derived(()=>modelOptions().map(m=>m.model)),urlParamsProcessed=state$1(!1);function clearUrlParams(){const url2=new URL(page$1.url);url2.searchParams.delete("q"),url2.searchParams.delete("model"),replaceState(url2.toString(),{})}async function handleUrlParams(){if(await modelsStore.fetch(),get$4(modelParam)){ const model=modelsStore.findModelByName(get$4(modelParam));if(model)try{await modelsStore.selectModelById(model.id)}catch(error2){console.error("Failed to select model:",error2),set$1(requestedModelName,get$4(modelParam),!0),set$1(showModelNotAvailable,!0);return}else{set$1(requestedModelName,get$4(modelParam),!0),set$1(showModelNotAvailable,!0);return}}get$4(qParam)!==null?(await chatStore.sendMessage(get$4(qParam)),clearUrlParams()):get$4(modelParam)&&clearUrlParams(),set$1(urlParamsProcessed, !0)}async function selectModelFromLastAssistantResponse(){const messages=activeMessages();if(messages.length===0)return;let lastMessageWithModel;for(let i=messages.length-1;i>=0;i--)if(messages[i].model){lastMessageWithModel=messages[i];break}if(!lastMessageWithModel)return;const currentModelId=selectedModelId();if(modelOptions().find(m=>m.id===currentModelId)?.model===lastMessageWithModel.model)return;const matchingModel=modelOptions().find(option2=>option2.model===lastMessageWithModel.model);if(matchingModel&& modelsStore.isModelLoaded(matchingModel.model))try{await modelsStore.selectModelById(matchingModel.id),console.log(`Automatically selected model: ${lastMessageWithModel.model} from last message`)}catch(error2){console.warn("Failed to automatically select model from last message:",error2)}}afterNavigate(()=>{setTimeout(()=>{selectModelFromLastAssistantResponse()},100)}),user_effect(()=>{if(get$4(chatId)&&get$4(chatId)!==currentChatId){if(currentChatId=get$4(chatId),set$1(urlParamsProcessed,!1),activeConversation()?. id===get$4(chatId)){(get$4(qParam)!==null||get$4(modelParam)!==null)&&!get$4(urlParamsProcessed)&&handleUrlParams();return}(async()=>await conversationsStore.loadConversation(get$4(chatId))?(chatStore.syncLoadingStateForChat(get$4(chatId)),(get$4(qParam)!==null||get$4(modelParam)!==null)&&!get$4(urlParamsProcessed)&&await handleUrlParams()):await goto("#/"))()}}),user_effect(()=>{if(typeof window<"u"){const handleBeforeUnload=()=>{isLoading()&&(console.log("Page unload detected while streaming -\ aborting stream"),chatStore.stopGeneration())};return window.addEventListener("beforeunload",handleBeforeUnload),()=>{window.removeEventListener("beforeunload",handleBeforeUnload)}}});var fragment=root();head$1("gz601r",$$anchor2=>{deferred_template_effect($0=>{$document.title=`${$0??""} - llama.cpp`},[()=>activeConversation()?.name||"Chat"])});var node2=first_child(fragment);ChatScreen(node2,{});var node_1=sibling(node2,2);DialogModelNotAvailable(node_1,{get modelName(){return get$4(requestedModelName)}, get availableModels(){return get$4(availableModelNames)},get open(){return get$4(showModelNotAvailable)},set open($$value){set$1(showModelNotAvailable,$$value,!0)}}),append($$anchor,fragment),pop()}const _3=Object.freeze(Object.defineProperty({__proto__:null,component:_page,universal:_page$1},Symbol.toStringTag,{value:"Module"})),pdf_worker_min='/**\n * @licstart The following is the entire license notice for the\n * JavaScript code in this page\n *\n * Copyright 2024 Mozilla Foundation\n *\n * Licens\ ed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing perm\ issions and\n * limitations under the License.\n *\n * @licend The above is the entire license notice for the\n * JavaScript code in this page\n */\n/**\n * pdfjsVersion = 5.4.54\n * pdfjsBuild = 295fb3ec4\n */\nconst e=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type),t=[.001,0,0,.001,0,0],a=1.35,r=.35,i=.25925925925925924,n=1,s=2,o=4,c=8,l=16,h=64,u=128,d=256,f="pdfjs_internal_editor_",g=3,p=9,m=13,b=15,y=1\ 01,w={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},x=0,S=4,k=1,C=2,v=3,F=1,T=2,O=3,M=4,D=5,R=6,N=7,E=8,L=9,j=10,_=11,U=12,X=13,q=14,H=15,W=16,z=17,$=20,G="Group",V="R",K=1,J=2,Y=4,Z=16,Q=32,ee=128,te=512,ae=1,re=2,ie=4096,ne=8192,se=32768,oe=65536,ce=131072,le=1048576,he=2097152,ue=8388608,de=16777216,fe=1,ge=2,pe=3,me=4,be=5,ye={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"F\ ocus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},we={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},xe={O:"PageOpen",C:"PageClose"},Se=1,Ae=5,ke=1,Ce=2,ve=3,Fe=4,Ie=5,Te=6,Oe=7,Me=8,De=9,Be=10,Re=11,Ne=12,Ee=13,Pe=14,Le=15,je=16,_e=17,Ue=18,Xe=19,qe=20,He=21,We=22,ze=23,$e=24,Ge=25,Ve=26,Ke=27,Je=28,Ye=29,Ze=30,Qe=31,et=32,tt=33,at=34,rt=35,it=36,nt=37,st=38,ot=39,ct=40,lt=41,ht=42,ut=43\ ,dt=44,ft=45,gt=46,pt=47,mt=48,bt=49,yt=50,wt=51,xt=52,St=53,At=54,kt=55,Ct=56,vt=57,Ft=58,It=59,Tt=60,Ot=61,Mt=62,Dt=63,Bt=64,Rt=65,Nt=66,Et=67,Pt=68,Lt=69,jt=70,_t=71,Ut=72,Xt=73,qt=74,Ht=75,Wt=76,zt=77,$t=80,Gt=81,Vt=83,Kt=84,Jt=85,Yt=86,Zt=87,Qt=88,ea=89,ta=90,aa=91,ra=92,ia=93,na=94,sa=0,oa=1,ca=2,la=3,ha=1,ua=2;let da=Se;function getVerbosityLevel(){return da}function info(e){da>=Ae&&console.log(`Info: ${e}`)}function warn(e){da>=Se&&console.log(`Warning: ${e}`)}function unreachable(e){thr\ ow new Error(e)}function assert(e,t){e||unreachable(t)}function createValidAbsoluteUrl(e,t=null,a=null){if(!e)return null;if(a&&"string"==typeof e){if(a.addDefaultProtocol&&e.startsWith("www.")){const t=e.match(/\\./g);t?.length>=2&&(e=`http://${e}`)}if(a.tryConvertEncoding)try{e=stringToUTF8String(e)}catch{}}const r=t?URL.parse(e,t):URL.parse(e);return function _isValidProtocol(e){switch(e?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r)?r:nu\ ll}function shadow(e,t,a,r=!1){Object.defineProperty(e,t,{value:a,enumerable:!r,configurable:!0,writable:!1});return a}const fa=function BaseExceptionClosure(){function BaseException(e,t){this.message=e;this.name=t}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();class PasswordException extends fa{constructor(e,t){super(e,"PasswordException");this.code=t}}class UnknownErrorException extends fa{constructor(e,t){super(e,"UnknownErrorException");this\ .details=t}}class InvalidPDFException extends fa{constructor(e){super(e,"InvalidPDFException")}}class ResponseException extends fa{constructor(e,t,a){super(e,"ResponseException");this.status=t;this.missing=a}}class FormatError extends fa{constructor(e){super(e,"FormatError")}}class AbortException extends fa{constructor(e){super(e,"AbortException")}}function bytesToString(e){"object"==typeof e&&void 0!==e?.length||unreachable("Invalid argument for bytesToString");const t=e.length,a=8192;if(t>24&255,e>>16&255,e>>8&255,255&e)}function objectSize(e){return Object.keys(e).length}cla\ ss FeatureTest{static get isLittleEndian(){return shadow(this,"isLittleEndian",function isLittleEndian(){const e=new Uint8Array(4);e[0]=1;return 1===new Uint32Array(e.buffer,0,1)[0]}())}static get isEvalSupported(){return shadow(this,"isEvalSupported",function isEvalSupported(){try{new Function("");return!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return shadow(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}static get isImageDecoderSupported(){return sh\ adow(this,"isImageDecoderSupported","undefined"!=typeof ImageDecoder)}static get platform(){const{platform:e,userAgent:t}=navigator;return shadow(this,"platform",{isAndroid:t.includes("Android"),isLinux:e.includes("Linux"),isMac:e.includes("Mac"),isWindows:e.includes("Win"),isFirefox:t.includes("Firefox")})}static get isCSSRoundSupported(){return shadow(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}}const ga=Array.from(Array(256).keys(),(e=>e.toString(16).pad\ Start(2,"0")));class Util{static makeHexColor(e,t,a){return`#${ga[e]}${ga[t]}${ga[a]}`}static scaleMinMax(e,t){let a;if(e[0]){if(e[0]<0){a=t[0];t[0]=t[2];t[2]=a}t[0]*=e[0];t[2]*=e[0];if(e[3]<0){a=t[1];t[1]=t[3];t[3]=a}t[1]*=e[3];t[3]*=e[3]}else{a=t[0];t[0]=t[1];t[1]=a;a=t[2];t[2]=t[3];t[3]=a;if(e[1]<0){a=t[1];t[1]=t[3];t[3]=a}t[1]*=e[1];t[3]*=e[1];if(e[2]<0){a=t[0];t[0]=t[2];t[2]=a}t[0]*=e[2];t[2]*=e[2]}t[0]+=e[4];t[1]+=e[5];t[2]+=e[4];t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],\ e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t,a=0){const r=e[a],i=e[a+1];e[a]=r*t[0]+i*t[2]+t[4];e[a+1]=r*t[1]+i*t[3]+t[5]}static applyTransformToBezier(e,t,a=0){const r=t[0],i=t[1],n=t[2],s=t[3],o=t[4],c=t[5];for(let t=0;t<6;t+=2){const l=e[a+t],h=e[a+t+1];e[a+t]=l*r+h*n+o;e[a+t+1]=l*i+h*s+c}}static applyInverseTransform(e,t){const a=e[0],r=e[1],i=t[0]*t[3]-t[1]*t[2];e[0]=(a*t[3]-r*t[2]+t[2]*t[5]-t[4]*t[3\ ])/i;e[1]=(-a*t[1]+r*t[0]+t[4]*t[1]-t[5]*t[0])/i}static axialAlignedBoundingBox(e,t,a){const r=t[0],i=t[1],n=t[2],s=t[3],o=t[4],c=t[5],l=e[0],h=e[1],u=e[2],d=e[3];let f=r*l+o,g=f,p=r*u+o,m=p,b=s*h+c,y=b,w=s*d+c,x=w;if(0!==i||0!==n){const e=i*l,t=i*u,a=n*h,r=n*d;f+=a;m+=a;p+=r;g+=r;b+=e;x+=e;w+=t;y+=t}a[0]=Math.min(a[0],f,p,g,m);a[1]=Math.min(a[1],b,w,y,x);a[2]=Math.max(a[2],f,p,g,m);a[3]=Math.max(a[3],b,w,y,x)}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e\ [0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e,t){const a=e[0],r=e[1],i=e[2],n=e[3],s=a**2+r**2,o=a*i+r*n,c=i**2+n**2,l=(s+c)/2,h=Math.sqrt(l**2-(s*c-o**2));t[0]=Math.sqrt(l+h||1);t[1]=Math.sqrt(l-h||1)}static normalizeRect(e){const t=e.slice(0);if(e[0]>e[2]){t[0]=e[2];t[2]=e[0]}if(e[1]>e[3]){t[1]=e[3];t[3]=e[1]}return t}static intersect(e,t){const a=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),r=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2])\ );if(a>r)return null;const i=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),n=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return i>n?null:[a,i,r,n]}static pointBoundingBox(e,t,a){a[0]=Math.min(a[0],e);a[1]=Math.min(a[1],t);a[2]=Math.max(a[2],e);a[3]=Math.max(a[3],t)}static rectBoundingBox(e,t,a,r,i){i[0]=Math.min(i[0],e,a);i[1]=Math.min(i[1],t,r);i[2]=Math.max(i[2],e,a);i[3]=Math.max(i[3],t,r)}static#e(e,t,a,r,i,n,s,o,c,l){if(c<=0||c>=1)return;const h=1-c,u=c*c,d=u*c,f=h*(h*(h*e+3*c*t)+\ 3*u*a)+d*r,g=h*(h*(h*i+3*c*n)+3*u*s)+d*o;l[0]=Math.min(l[0],f);l[1]=Math.min(l[1],g);l[2]=Math.max(l[2],f);l[3]=Math.max(l[3],g)}static#t(e,t,a,r,i,n,s,o,c,l,h,u){if(Math.abs(c)<1e-12){Math.abs(l)>=1e-12&&this.#e(e,t,a,r,i,n,s,o,-h/l,u);return}const d=l**2-4*h*c;if(d<0)return;const f=Math.sqrt(d),g=2*c;this.#e(e,t,a,r,i,n,s,o,(-l+f)/g,u);this.#e(e,t,a,r,i,n,s,o,(-l-f)/g,u)}static bezierBoundingBox(e,t,a,r,i,n,s,o,c){c[0]=Math.min(c[0],e,s);c[1]=Math.min(c[1],t,o);c[2]=Math.max(c[2],e,s);c[3]=Mat\ h.max(c[3],t,o);this.#t(e,a,i,s,t,r,n,o,3*(3*(a-i)-e+s),6*(e-2*a+i),3*(a-e),c);this.#t(e,a,i,s,t,r,n,o,3*(3*(r-n)-t+o),6*(t-2*r+n),3*(r-t),c)}}const pa=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8\ 216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function stringToPDFString(e,t=!1){if(e[0]>="ï"){let a;if("þ"===e[0]&&"ÿ"===e[1]){a="utf-16be";e.length%2==1&&(e=e.slice(0,-1))}else if("ÿ"===e[0]&&"þ"===e[1]){a="utf-16le";e.length%2==1&&(e=e.slice(0,-1))}else"ï"===e[0]&&"»"===e[1]&&"¿"===e[2]&&(a="utf-8");if(a)try{const r=new TextDecoder(a,{fatal:!0}),i=stringToBytes(e),n=r.decode(i);return t||!n.includes("\x1B")?n:n.replaceAll(/\\x1b[^\\x1b]*(?:\\x1b|$)/g,"")}catch(e){wa\ rn(`stringToPDFString: "${e}".`)}}const a=[];for(let r=0,i=e.length;rga[e])).join("")}"function"!=typeof Promise.try&&(Promise.try=function(e,...t){return new Promise((a=>{a(e(...t))}))});"function"!=typeof Math.sumPrecise&&(Math.sumPrecise=function(e){return e.reduce(((e,t)=>e+t),0)});const ya=Symbol("CIRCULAR_REF"),wa=Symbol("EOF");let xa=Object.create(null),Sa=Object.create(null),Aa=Object.create(null);class Name{constructor(e){this.name=e}static get(e){return Sa[e]||=new Name(e)}}class Cmd{constructor(e){this.cmd=e}static get(e){return xa[e]||=new Cmd(e)\ }}const ka=function nonSerializableClosure(){return ka};class Dict{constructor(e=null){this._map=new Map;this.xref=e;this.objId=null;this.suppressEncryption=!1;this.__nonSerializable__=ka}assignXref(e){this.xref=e}get size(){return this._map.size}get(e,t,a){let r=this._map.get(e);if(void 0===r&&void 0!==t){r=this._map.get(t);void 0===r&&void 0!==a&&(r=this._map.get(a))}return r instanceof Ref&&this.xref?this.xref.fetch(r,this.suppressEncryption):r}async getAsync(e,t,a){let r=this._map.get(e);if(\ void 0===r&&void 0!==t){r=this._map.get(t);void 0===r&&void 0!==a&&(r=this._map.get(a))}return r instanceof Ref&&this.xref?this.xref.fetchAsync(r,this.suppressEncryption):r}getArray(e,t,a){let r=this._map.get(e);if(void 0===r&&void 0!==t){r=this._map.get(t);void 0===r&&void 0!==a&&(r=this._map.get(a))}r instanceof Ref&&this.xref&&(r=this.xref.fetch(r,this.suppressEncryption));if(Array.isArray(r)){r=r.slice();for(let e=0,t=r.length;e{unreachable("Should not call `set` on the empty dictionary.")};return shadow(this,"empty",e)}static merge({xref:e,dictArray:t,mergeSubDicts:a=!1}){const r=new Dict(e),i=new Map;for(const e of t)if(e instanceof Dict)for(const[t,r]of e._map){let e=i.get(t);if(void 0===e){e=[];i.set(t,e)}else if(!(a&&\ r instanceof Dict))continue;e.push(r)}for(const[t,a]of i){if(1===a.length||!(a[0]instanceof Dict)){r._map.set(t,a[0]);continue}const i=new Dict(e);for(const e of a)for(const[t,a]of e._map)i._map.has(t)||i._map.set(t,a);i.size>0&&r._map.set(t,i)}i.clear();return r.size>0?r:Dict.empty}clone(){const e=new Dict(this.xref);for(const t of this.getKeys())e.set(t,this.getRaw(t));return e}delete(e){delete this._map[e]}}class Ref{constructor(e,t){this.num=e;this.gen=t}toString(){return 0===this.gen?`${thi\ s.num}R`:`${this.num}R${this.gen}`}static fromString(e){const t=Aa[e];if(t)return t;const a=/^(\\d+)R(\\d*)$/.exec(e);return a&&"0"!==a[1]?Aa[e]=new Ref(parseInt(a[1]),a[2]?parseInt(a[2]):0):null}static get(e,t){const a=0===t?`${e}R`:`${e}R${t}`;return Aa[a]||=new Ref(e,t)}}class RefSet{constructor(e=null){this._set=new Set(e?._set)}has(e){return this._set.has(e.toString())}put(e){this._set.add(e.toString())}remove(e){this._set.delete(e.toString())}[Symbol.iterator](){return this._set.values()}cle\ ar(){this._set.clear()}}class RefSetCache{constructor(){this._map=new Map}get size(){return this._map.size}get(e){return this._map.get(e.toString())}has(e){return this._map.has(e.toString())}put(e,t){this._map.set(e.toString(),t)}putAlias(e,t){this._map.set(e.toString(),this.get(t))}[Symbol.iterator](){return this._map.values()}clear(){this._map.clear()}*values(){yield*this._map.values()}*items(){for(const[e,t]of this._map)yield[Ref.fromString(e),t]}}function isName(e,t){return e instanceof Name\ &&(void 0===t||e.name===t)}function isCmd(e,t){return e instanceof Cmd&&(void 0===t||e.cmd===t)}function isDict(e,t){return e instanceof Dict&&(void 0===t||isName(e.get("Type"),t))}function isRefsEqual(e,t){return e.num===t.num&&e.gen===t.gen}class BaseStream{get length(){unreachable("Abstract getter `length` accessed")}get isEmpty(){unreachable("Abstract getter `isEmpty` accessed")}get isDataLoaded(){return shadow(this,"isDataLoaded",!0)}getByte(){unreachable("Abstract method `getByte` called")\ }getBytes(e){unreachable("Abstract method `getBytes` called")}async getImageData(e,t){return this.getBytes(e,t)}async asyncGetBytes(){unreachable("Abstract method `asyncGetBytes` called")}get isAsync(){return!1}get isAsyncDecoder(){return!1}get canAsyncDecodeImageFromBuffer(){return!1}async getTransferableImage(){return null}peekByte(){const e=this.getByte();-1!==e&&this.pos--;return e}peekBytes(e){const t=this.getBytes(e);this.pos-=t.length;return t}getUint16(){const e=this.getByte(),t=this.get\ Byte();return-1===e||-1===t?-1:(e<<8)+t}getInt32(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()}getByteRange(e,t){unreachable("Abstract method `getByteRange` called")}getString(e){return bytesToString(this.getBytes(e))}skip(e){this.pos+=e||1}reset(){unreachable("Abstract method `reset` called")}moveStart(){unreachable("Abstract method `moveStart` called")}makeSubStream(e,t,a=null){unreachable("Abstract method `makeSubStream` called")}getBaseStreams(){return \ null}}const Ca=/^[1-9]\\.\\d$/,va=2**31-1,Fa=[1,0,0,1,0,0],Ia=["ColorSpace","ExtGState","Font","Pattern","Properties","Shading","XObject"],Ta=["ExtGState","Font","Properties","XObject"];function getLookupTableFactory(e){let t;return function(){if(e){t=Object.create(null);e(t);e=null}return t}}class MissingDataException extends fa{constructor(e,t){super(`Missing data [${e}, ${t})`,"MissingDataException");this.begin=e;this.end=t}}class ParserEOFException extends fa{constructor(e){super(e,"ParserEOFE\ xception")}}class XRefEntryException extends fa{constructor(e){super(e,"XRefEntryException")}}class XRefParseException extends fa{constructor(e){super(e,"XRefParseException")}}function arrayBuffersToBytes(e){const t=e.length;if(0===t)return new Uint8Array(0);if(1===t)return new Uint8Array(e[0]);let a=0;for(let r=0;r0,"The number should be a positive integer.");const a="M".repeat(e/1e3|0)+Oa[e%1e3/100|0]+Oa[10+(e%100/10|0)]+Oa[20+e%10];return t?a.toLowerCase():a}function log2(e){return e>0?Math.ceil(Math.log2(e)):0}function readInt8(e,t){return e[t]<<24>>24}function readInt16(e,t){return(e[t]<<24|e[t+1]<<16)>>16}function readUint16(e,t){return e[t]<<8\ |e[t+1]}function readUint32(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function isWhiteSpace(e){return 32===e||9===e||13===e||10===e}function isNumberArray(e,t){return Array.isArray(e)?(null===t||e.length===t)&&e.every((e=>"number"==typeof e)):ArrayBuffer.isView(e)&&!(e instanceof BigInt64Array||e instanceof BigUint64Array)&&(null===t||e.length===t)}function lookupMatrix(e,t){return isNumberArray(e,6)?e:t}function lookupRect(e,t){return isNumberArray(e,4)?e:t}function lookupNormalRect\ (e,t){return isNumberArray(e,4)?Util.normalizeRect(e):t}function parseXFAPath(e){const t=/(.+)\\[(\\d+)\\]$/;return e.split(".").map((e=>{const a=e.match(t);return a?{name:a[1],pos:parseInt(a[2],10)}:{name:e,pos:0}}))}function escapePDFName(e){const t=[];let a=0;for(let r=0,i=e.length;r126||35===i||40===i||41===i||60===i||62===i||91===i||93===i||123===i||125===i||47===i||37===i){a"\\n"===e?"\\\\n":"\\r"===e?"\\\\r":`\\\\${e}`))}function _collectJS(e,t,a,r){if(!e)return;let i=null;if(e instanceof Ref){if(r.has(e))return;i=e;r.put(i);e=t.fetch(e)}if(Array.isArray(e))for(const i of e)_collectJS(i,t,a,r);else if(e instanceof Dict){if(isName(e.get("S"),"JavaScript")){const t=e.get("JS");let r;t instanceof BaseStream?r=t.getString():"string"==type\ of t&&(r=t);r&&=stringToPDFString(r,!0).replaceAll("\\0","");r&&a.push(r.trim())}_collectJS(e.getRaw("Next"),t,a,r)}i&&r.remove(i)}function collectActions(e,t,a){const r=Object.create(null),i=getInheritableProperty({dict:t,key:"AA",stopWhenFound:!1});if(i)for(let t=i.length-1;t>=0;t--){const n=i[t];if(n instanceof Dict)for(const t of n.getKeys()){const i=a[t];if(!i)continue;const s=[];_collectJS(n.getRaw(t),e,s,new RefSet);s.length>0&&(r[i]=s)}}if(t.has("A")){const a=[];_collectJS(t.get("A"),e,a,\ new RefSet);a.length>0&&(r.Action=a)}return objectSize(r)>0?r:null}const Ma={60:"<",62:">",38:"&",34:""",39:"'"};function*codePointIter(e){for(let t=0,a=e.length;t55295&&(a<57344||a>65533)&&t++;yield a}}function encodeToXmlString(e){const t=[];let a=0;for(let r=0,i=e.length;r55295&&(i<57344||i>65533)&&r++;a=r+1}}if(0===t.length)return e;a: ${e}.`);return!1}return!0}function validateCSSFont(e){const t=new Set(["100","200","300","400","500","600","700","800","900","1000","normal","bold","bolder","lighter"]),{fontFamily:a,fontWeight:r,italicAngle:i}=e;if(!validateFontName(a,!0))return!1;const n=r?r.toString():"";e.fontWeight=t.has(n)?n:"400";const s=parseFloat(i);e.italicAngle=isNaN(s)||s<-90||s>90?"14":i.toString();return!0}function recoverJsURL(e){const t=new RegExp("^\\\\s*("+["app.launchURL","window.open","xfa.host.gotoURL"].\ join("|").replaceAll(".","\\\\.")+")\\\\((?:\'|\\")([^\'\\"]*)(?:\'|\\")(?:,\\\\s*(\\\\w+)\\\\)|\\\\))","i").exec(e);return t?.[2]?{url:t[2],newWindow:"app.launchURL"===t[1]&&"true"===t[3]}:null}function numberToString(e){if(Number.isInteger(e))return e.toString();const t=Math.round(100*e);return t%100==0?(t/100).toString():t%10==0?e.toFixed(1):e.toFixed(2)}function getNewAnnotationsMap(e){if(!e)return null;const t=new Map;for(const[a,r]of e){if(!a.startsWith(f))continue;let e=t.get(r.pageIndex);if(!e){e=[];t.set\ (r.pageIndex,e)}e.push(r)}return t.size>0?t:null}function stringToAsciiOrUTF16BE(e){return null==e||function isAscii(e){if("string"!=typeof e)return!1;return!e||/^[\\x00-\\x7F]*$/.test(e)}(e)?e:stringToUTF16String(e,!0)}function stringToUTF16HexString(e){const t=[];for(let a=0,r=e.length;a>8&255],ga[255&r])}return t.join("")}function stringToUTF16String(e,t=!1){const a=[];t&&a.push("þÿ");for(let t=0,r=e.length;t>8&255),String.fromCharCode(255&r))}return a.join("")}function getRotationMatrix(e,t,a){switch(e){case 90:return[0,1,-1,0,t,0];case 180:return[-1,0,0,-1,t,a];case 270:return[0,-1,1,0,0,a];default:throw new Error("Invalid rotation")}}function getSizeInBytes(e){return Math.ceil(Math.ceil(Math.log2(1+e))/8)}class QCMS{static#a=null;static _memory=null;static _mustAddAlpha=!1;static _destBuffer=null;static _destOffset=0;static _destLength=0;static _cssColor="";static _makeHexColor=\ null;static get _memoryArray(){const e=this.#a;return e?.byteLength?e:this.#a=new Uint8Array(this._memory.buffer)}}let Da;const Ba="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&Ba.decode();let Ra=null;function getUint8ArrayMemory0(){null!==Ra&&0!==Ra.byteLength||(Ra=new Uint8Array(Da.memory.buffer));return Ra}let Na=0;function passArray8ToWasm0(e,t){const a=t(1*e.length,1)>\ >>0;getUint8ArrayMemory0().set(e,a/1);Na=e.length;return a}const Ea=Object.freeze({RGB8:0,0:"RGB8",RGBA8:1,1:"RGBA8",BGRA8:2,2:"BGRA8",Gray8:3,3:"Gray8",GrayA8:4,4:"GrayA8",CMYK:5,5:"CMYK"}),Pa=Object.freeze({Perceptual:0,0:"Perceptual",RelativeColorimetric:1,1:"RelativeColorimetric",Saturation:2,2:"Saturation",AbsoluteColorimetric:3,3:"AbsoluteColorimetric"});function __wbg_get_imports(){const e={wbg:{}};e.wbg.__wbg_copyresult_b08ee7d273f295dd=function(e,t){!function copy_result(e,t){const{_mus\ tAddAlpha:a,_destBuffer:r,_destOffset:i,_destLength:n,_memoryArray:s}=QCMS;if(t!==n)if(a)for(let a=e,n=e+t,o=i;a>>0,t>>>0)};e.wbg.__wbg_copyrgb_d60ce17bb05d9b67=function(e){!function copy_rgb(e){const{_destBuffer:t,_destOffset:a,_memoryArray:r}=QCMS;t[a]=r[e];t[a+1]=r[e+1];t[a+2]=r[e+2]}(e>>>0)};e.wbg.__wbg_makecssRGB_89\ 3bf0cd9fdb302d=function(e){!function make_cssRGB(e){const{_memoryArray:t}=QCMS;QCMS._cssColor=QCMS._makeHexColor(t[e],t[e+1],t[e+2])}(e>>>0)};e.wbg.__wbindgen_init_externref_table=function(){const e=Da.__wbindgen_export_0,t=e.grow(4);e.set(0,void 0);e.set(t+0,void 0);e.set(t+1,null);e.set(t+2,!0);e.set(t+3,!1)};e.wbg.__wbindgen_throw=function(e,t){throw new Error(function getStringFromWasm0(e,t){e>>>=0;return Ba.decode(getUint8ArrayMemory0().subarray(e,e+t))}(e,t))};return e}function __wbg_final\ ize_init(e,t){Da=e.exports;__wbg_init.__wbindgen_wasm_module=t;Ra=null;Da.__wbindgen_start();return Da}async function __wbg_init(e){if(void 0!==Da)return Da;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module_or_path:e}=e):console.warn("using deprecated parameters for the initialization function; pass a single object instead"));const t=__wbg_get_imports();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));c\ onst{instance:a,module:r}=await async function __wbg_load(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original err\ or:\\n",t)}const a=await e.arrayBuffer();return await WebAssembly.instantiate(a,t)}{const a=await WebAssembly.instantiate(e,t);return a instanceof WebAssembly.Instance?{instance:a,module:e}:a}}(await e,t);return __wbg_finalize_init(a,r)}class ColorSpace{static#r=new Uint8ClampedArray(3);constructor(e,t){this.name=e;this.numComps=t}getRgb(e,t,a=new Uint8ClampedArray(3)){this.getRgbItem(e,t,a,0);return a}getRgbHex(e,t){const a=this.getRgb(e,t,ColorSpace.#r);return Util.makeHexColor(a[0],a[1],a[2])}\ getRgbItem(e,t,a,r){unreachable("Should not call ColorSpace.getRgbItem")}getRgbBuffer(e,t,a,r,i,n,s){unreachable("Should not call ColorSpace.getRgbBuffer")}getOutputLength(e,t){unreachable("Should not call ColorSpace.getOutputLength")}isPassthrough(e){return!1}isDefaultDecode(e,t){return ColorSpace.isDefaultDecode(e,this.numComps)}fillRgb(e,t,a,r,i,n,s,o,c){const l=t*a;let h=null;const u=1<u&&"DeviceGray"!==this.name&&"D\ eviceRGB"!==this.name){const t=s<=8?new Uint8Array(u):new Uint16Array(u);for(let e=0;e=.99554525?1:MathClamp(1.055*e**(1/2.4)-.055,0,1)}#b(e){return e<0?-this.#b(-e):e>8?((e+16)/116)**3:e*CalRGBCS.#d}#y(e,t,a){if(0===e[0]&&0===e[1]&&0===e[2]){a[0]=t[0];a[1]=t[1];a[2]=t[2];return}const r=this.#b(0),i=(1-r)/(1-this.#b(e[0])),n=1-i,s=(1-r)/(1-\ this.#b(e[1])),o=1-s,c=(1-r)/(1-this.#b(e[2])),l=1-c;a[0]=t[0]*i+n;a[1]=t[1]*s+o;a[2]=t[2]*c+l}#w(e,t,a){if(1===e[0]&&1===e[2]){a[0]=t[0];a[1]=t[1];a[2]=t[2];return}const r=a;this.#f(CalRGBCS.#n,t,r);const i=CalRGBCS.#l;this.#g(e,r,i);this.#f(CalRGBCS.#s,i,a)}#x(e,t,a){const r=a;this.#f(CalRGBCS.#n,t,r);const i=CalRGBCS.#l;this.#p(e,r,i);this.#f(CalRGBCS.#s,i,a)}#i(e,t,a,r,i){const n=MathClamp(e[t]*i,0,1),s=MathClamp(e[t+1]*i,0,1),o=MathClamp(e[t+2]*i,0,1),c=1===n?1:n**this.GR,l=1===s?1:s**this.\ GG,h=1===o?1:o**this.GB,u=this.MXA*c+this.MXB*l+this.MXC*h,d=this.MYA*c+this.MYB*l+this.MYC*h,f=this.MZA*c+this.MZB*l+this.MZC*h,g=CalRGBCS.#h;g[0]=u;g[1]=d;g[2]=f;const p=CalRGBCS.#u;this.#w(this.whitePoint,g,p);const m=CalRGBCS.#h;this.#y(this.blackPoint,p,m);const b=CalRGBCS.#u;this.#x(CalRGBCS.#c,m,b);const y=CalRGBCS.#h;this.#f(CalRGBCS.#o,b,y);a[r]=255*this.#m(y[0]);a[r+1]=255*this.#m(y[1]);a[r+2]=255*this.#m(y[2])}getRgbItem(e,t,a,r){this.#i(e,t,a,r,1)}getRgbBuffer(e,t,a,r,i,n,s){const o=\ 1/((1<this.amax||this.bmin>this.bmax){info("Invalid Range, falling back to defaults");this.amin=-100;this.amax=100;this.bmin=-100;this.bmax=100}}#S(e){return e>=6/29?e**3:108/841*(e-4/29)}#A(e,t,a,r){return a+e*(r-a)/t}#i(e,t,a,r,i){let n=e[t],s=e[t+1],o=e[t+2];if(!1!==a){n=this.#A(n,a,0,100);s=this.#A(s,a,this.amin,this.amax);o=this.#A(o,a,this.bmin,this.bmax)}s>this.amax?s=thi\ s.amax:sthis.bmax?o=this.bmax:o{!function qcms_drop_transformer(\ e){Da.qcms_drop_transformer(e)}(e)}));constructor(e,t,a){if(!IccColorSpace.isUsable)throw new Error("No ICC color space support");super(t,a);let r;switch(a){case 1:r=Ea.Gray8;this.#C=(e,t,a)=>function qcms_convert_one(e,t,a){Da.qcms_convert_one(e,t,a)}(this.#k,255*e[t],a);break;case 3:r=Ea.RGB8;this.#C=(e,t,a)=>function qcms_convert_three(e,t,a,r,i){Da.qcms_convert_three(e,t,a,r,i)}(this.#k,255*e[t],255*e[t+1],255*e[t+2],a);break;case 4:r=Ea.CMYK;this.#C=(e,t,a)=>function qcms_convert_four(e,t,a\ ,r,i,n){Da.qcms_convert_four(e,t,a,r,i,n)}(this.#k,255*e[t],255*e[t+1],255*e[t+2],255*e[t+3],a);break;default:throw new Error(`Unsupported number of components: ${a}`)}this.#k=function qcms_transformer_from_memory(e,t,a){const r=passArray8ToWasm0(e,Da.__wbindgen_malloc),i=Na;return Da.qcms_transformer_from_memory(r,i,t,a)>>>0}(e,r,Pa.Perceptual);if(!this.#k)throw new Error("Failed to create ICC color space");IccColorSpace.#I.register(this,this.#k)}getRgbHex(e,t){this.#C(e,t,!0);return QCMS._cssC\ olor}getRgbItem(e,t,a,r){QCMS._destBuffer=a;QCMS._destOffset=r;QCMS._destLength=3;this.#C(e,t,!1);QCMS._destBuffer=null}getRgbBuffer(e,t,a,r,i,n,s){e=e.subarray(t,t+a*this.numComps);if(8!==n){const t=255/((1<=this.end?-1:this.bytes[this.pos++]}getBytes(e){const t=this.bytes,a=this.pos,r=this.end;if(!e)return t.subarray(a,r);let i=a+e;i>r&&(i=r);this.pos=i;return t.subarray(a,i)}getByteRange(e,t){e<0&&(e=0);t>this.end&&(t=this.end);return this.bytes.subarray(e,t)}reset(){this.pos=this.start}moveStart(){this.start=this.pos}makeSubStream(e,t,a=null){return new Stream(this.bytes.buffer,e,t,a)}}class StringStream extend\ s Stream{constructor(e){super(stringToBytes(e))}}class NullStream extends Stream{constructor(){super(new Uint8Array(0))}}class ChunkedStream extends Stream{constructor(e,t,a){super(new Uint8Array(e),0,e,null);this.chunkSize=t;this._loadedChunks=new Set;this.numChunks=Math.ceil(e/t);this.manager=a;this.progressiveDataLength=0;this.lastSuccessfulEnsureByteChunk=-1}getMissingChunks(){const e=[];for(let t=0,a=this.numChunks;t=this.end?this.numChunks:Math.floor(t/this.chunkSize);for(let e=a;ethis.numChunks)&&t!==this.lastSuccessfulEnsureByteChunk){if(!this._loadedChunks.has(t))throw new MissingDataException(e,e+1);this.lastSuccessfulEnsureByteChunk=t}}ensureRange(e,t){if(e>=t)return;if(t\ <=this.progressiveDataLength)return;const a=Math.floor(e/this.chunkSize);if(a>this.numChunks)return;const r=Math.min(Math.floor((t-1)/this.chunkSize)+1,this.numChunks);for(let i=a;i=this.end)return-1;e>=this.progressiveDa\ taLength&&this.ensureByte(e);return this.bytes[this.pos++]}getBytes(e){const t=this.bytes,a=this.pos,r=this.end;if(!e){r>this.progressiveDataLength&&this.ensureRange(a,r);return t.subarray(a,r)}let i=a+e;i>r&&(i=r);i>this.progressiveDataLength&&this.ensureRange(a,i);this.pos=i;return t.subarray(a,i)}getByteRange(e,t){e<0&&(e=0);t>this.end&&(t=this.end);t>this.progressiveDataLength&&this.ensureRange(e,t);return this.bytes.subarray(e,t)}makeSubStream(e,t,a=null){t?e+t>this.progressiveDataLength&&t\ his.ensureRange(e,e+t):e>=this.progressiveDataLength&&this.ensureByte(e);function ChunkedStreamSubstream(){}ChunkedStreamSubstream.prototype=Object.create(this);ChunkedStreamSubstream.prototype.getMissingChunks=function(){const e=this.chunkSize,t=Math.floor(this.start/e),a=Math.floor((this.end-1)/e)+1,r=[];for(let e=t;e{const readChunk=({value:n,done:s})=>{try{if(s){const t=arrayBuffersToBytes(r);r=null;e(t);return}i+=n.byteLength;a.isStreamingSupported&&this.onProgress({loaded:i});r.push(n);a.read()\ .then(readChunk,t)}catch(e){t(e)}};a.read().then(readChunk,t)})).then((t=>{this.aborted||this.onReceiveData({chunk:t,begin:e})}))}requestAllChunks(e=!1){if(!e){const e=this.stream.getMissingChunks();this._requestChunks(e)}return this._loadedStreamCapability.promise}_requestChunks(e){const t=this.currRequestId++,a=new Set;this._chunksNeededByRequest.set(t,a);for(const t of e)this.stream.hasChunk(t)||a.add(t);if(0===a.size)return Promise.resolve();const r=Promise.withResolvers();this._promisesByRe\ quest.set(t,r);const i=[];for(const e of a){let a=this._requestsByChunk.get(e);if(!a){a=[];this._requestsByChunk.set(e,a);i.push(e)}a.push(t)}if(i.length>0){const e=this.groupChunks(i);for(const t of e){const e=t.beginChunk*this.chunkSize,a=Math.min(t.endChunk*this.chunkSize,this.length);this.sendRequest(e,a).catch(r.reject)}}return r.promise.catch((e=>{if(!this.aborted)throw e}))}getStream(){return this.stream}requestRange(e,t){t=Math.min(t,this.length);const a=this.getBeginChunk(e),r=this.getE\ ndChunk(t),i=[];for(let e=a;ee-t));return this._requestChunks(t)}groupChunks(e){const t=[];let a=-1,r=-1;for(let i=0,n=e.length;i=0&&r+1!==n){t.push({beginChunk:a,endChunk:r+1});a=n}i+1===e.length&&t.push({beginChunk:a,endChunk:n+1});r=n}return \ t}onProgress(e){this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize+e.loaded,total:this.length})}onReceiveData(e){const t=e.chunk,a=void 0===e.begin,r=a?this.progressiveDataLength:e.begin,i=r+t.byteLength,n=Math.floor(r/this.chunkSize),s=i0||o.push(a)}}}if(!this.disableAutoFetch&&0===this._requestsByChunk.size){let e;if(1===this.stream.numChunksLoaded){const t=this.stream.numChunks-1;this.stream.hasChunk(t)||(e=t)}else e=this.stream.nextEmptyChunk(s);Number.isInteger(e)&&this._requestChunks([e])}for(const e\ of o){const t=this._promisesByRequest.get(e);this._promisesByRequest.delete(e);t.resolve()}this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize,total:this.length})}onError(e){this._loadedStreamCapability.reject(e)}getBeginChunk(e){return Math.floor(e/this.chunkSize)}getEndChunk(e){return Math.floor((e-1)/this.chunkSize)+1}abort(e){this.aborted=!0;this.pdfNetworkStream?.cancelAllRequests(e);for(const t of this._promisesByRequest.values())t.reject(e)}}function con\ vertToRGBA(e){switch(e.kind){case k:return convertBlackAndWhiteToRGBA(e);case C:return function convertRGBToRGBA({src:e,srcPos:t=0,dest:a,destPos:r=0,width:i,height:n}){let s=0;const o=i*n*3,c=o>>2,l=new Uint32Array(e.buffer,t,c);if(FeatureTest.isLittleEndian){for(;s>>24|t<<8|4278190080;a[r+2]=t>>>16|i<<16|4278190080;a[r+3]=i>>>8|4278190080}for(let i=4*s,n=t+o;i>>8|255;a[r+2]=t<<16|i>>>16|255;a[r+3]=i<<8|255}for(let i=4*s,n=t+o;i>3,u=7&r,d=e.length;a=new Uint32Array(a.buffer);let f=0;for(let\ r=0;ra||t>a)return!0;const r=e*t;if(this._hasMaxArea)return r>this.MAX_AREA;if(r(this.MAX_AREA=this.#O**2)}static getReducePowerForJPX(e,t,a){const r=e*t,i=2**30/(4*a);if(!this.needsToBeResized\ (e,t))return r>i?Math.ceil(Math.log2(r/i)):0;const{MAX_DIM:n,MAX_AREA:s}=this,o=Math.max(e/n,t/n,Math.sqrt(r/Math.min(i,s)));return Math.ceil(Math.log2(o))}static get MAX_DIM(){return shadow(this,"MAX_DIM",this._guessMax(2048,65537,0,1))}static get MAX_AREA(){this._hasMaxArea=!0;return shadow(this,"MAX_AREA",this._guessMax(this.#O,this.MAX_DIM,128,0)**2)}static set MAX_AREA(e){if(e>=0){this._hasMaxArea=!0;shadow(this,"MAX_AREA",e)}}static setOptions({canvasMaxAreaInBytes:e=-1,isImageDecoderSuppo\ rted:t=!1}){this._hasMaxArea||(this.MAX_AREA=e>>2);this.#M=t}static _areGoodDims(e,t){try{const a=new OffscreenCanvas(e,t),r=a.getContext("2d");r.fillRect(0,0,1,1);const i=r.getImageData(0,0,1,1).data[3];a.width=a.height=1;return 0!==i}catch{return!1}}static _guessMax(e,t,a,r){for(;e+a+1va){const e=this.#D();if(e)return e}const r=this._encodeBMP();let i,n;if(await ImageResizer.canUseImageDecoder){i=new ImageDecoder({data:r,type:"image/bmp",preferAnimation:!1,transfer:[r.buffer]});n=i.decode().catch((e=>{warn(`BMP image decoding failed: ${e}`);return createImageBitmap(new Blob([this._encodeBMP().buffer],{type:"image/bmp"}))})).finally((()=>{i.close()}))}else n=createImageBitmap(new Blob([r.buffer],{type:"image/bmp"}));const{MAX_AREA:s,MAX_DIM:o}=ImageResizer,c\ =Math.max(t/o,a/o,Math.sqrt(t*a/s)),l=Math.max(c,2),h=Math.round(10*(c+1.25))/10/l,u=Math.floor(Math.log2(h)),d=new Array(u+2).fill(2);d[0]=l;d.splice(-1,1,h/(1<>s,c=r>>s;let l,h=r;try{l=new Uint8Array(n)}catch{let e=Math.floor(Math.log2(n+1));for(;;)try{l=new Uint8Array(2**e-1);break}catch{e-=1}h=Math.floor((2**e-1)/(4*a));const t=a*h*4;t>s;e>3,s=a+3&-4;if(a!==s){const e=new Uint8Array(s*t);let r=0;for(let n=0,o=t*a;ni&&(r=i)}else{for(;!this.eof;)this.readBlock(t);r=this.bufferLength}this.pos=r;return this.buffer.subarray(a,r)}async getImageData(e,t){if(!this.canAsyncDecodeImageFromBuffer)return this.isAsyncDecoder?this.decode\ Image(null,t):this.getBytes(e,t);const a=await this.stream.asyncGetBytes();return this.decodeImage(a,t)}reset(){this.pos=0}makeSubStream(e,t,a=null){if(void 0===t)for(;!this.eof;)this.readBlock();else{const a=e+t;for(;this.bufferLength<=a&&!this.eof;)this.readBlock()}return new Stream(this.buffer,e,t,a)}getBaseStreams(){return this.str?this.str.getBaseStreams():null}}class StreamsSequenceStream extends DecodeStream{constructor(e,t=null){e=e.filter((e=>e instanceof BaseStream));let a=0;for(const \ t of e)a+=t instanceof DecodeStream?t._rawMinBufferLength:t.length;super(a);this.streams=e;this._onError=t}readBlock(){const e=this.streams;if(0===e.length){this.eof=!0;return}const t=e.shift();let a;try{a=t.getBytes()}catch(e){if(this._onError){this._onError(e,t.dict?.objId);return}throw e}const r=this.bufferLength,i=r+a.length;this.ensureBuffer(i).set(a,r);this.bufferLength=i}getBaseStreams(){const e=[];for(const t of this.streams){const a=t.getBaseStreams();a&&e.push(...a)}return e.length>0?e\ :null}}class ColorSpaceUtils{static parse({cs:e,xref:t,resources:a=null,pdfFunctionFactory:r,globalColorSpaceCache:i,localColorSpaceCache:n,asyncIfNotCached:s=!1}){const o={xref:t,resources:a,pdfFunctionFactory:r,globalColorSpaceCache:i,localColorSpaceCache:n};let c,l,h;if(e instanceof Ref){l=e;const a=i.getByRef(l)||n.getByRef(l);if(a)return a;e=t.fetch(e)}if(e instanceof Name){c=e.name;const t=n.getByName(c);if(t)return t}try{h=this.#B(e,o)}catch(e){if(s&&!(e instanceof MissingDataException))r\ eturn Promise.reject(e);throw e}if(c||l){n.set(c,l,h);l&&i.set(null,l,h)}return s?Promise.resolve(h):h}static#R(e,t){const{globalColorSpaceCache:a}=t;let r;if(e instanceof Ref){r=e;const t=a.getByRef(r);if(t)return t}const i=this.#B(e,t);r&&a.set(null,r,i);return i}static#B(e,t){const{xref:a,resources:r,pdfFunctionFactory:i,globalColorSpaceCache:n}=t;if((e=a.fetchIfRef(e))instanceof Name)switch(e.name){case"G":case"DeviceGray":return this.gray;case"RGB":case"DeviceRGB":return this.rgb;case"Devic\ eRGBA":return this.rgba;case"CMYK":case"DeviceCMYK":return this.cmyk;case"Pattern":return new PatternCS(null);default:if(r instanceof Dict){const a=r.get("ColorSpace");if(a instanceof Dict){const r=a.get(e.name);if(r){if(r instanceof Name)return this.#B(r,t);e=r;break}}}warn(`Unrecognized ColorSpace: ${e.name}`);return this.gray}if(Array.isArray(e)){const r=a.fetchIfRef(e[0]).name;let s,o,c,l,h,u;switch(r){case"G":case"DeviceGray":return this.gray;case"RGB":case"DeviceRGB":return this.rgb;case"C\ MYK":case"DeviceCMYK":return this.cmyk;case"CalGray":s=a.fetchIfRef(e[1]);l=s.getArray("WhitePoint");h=s.getArray("BlackPoint");u=s.get("Gamma");return new CalGrayCS(l,h,u);case"CalRGB":s=a.fetchIfRef(e[1]);l=s.getArray("WhitePoint");h=s.getArray("BlackPoint");u=s.getArray("Gamma");const d=s.getArray("Matrix");return new CalRGBCS(l,h,u,d);case"ICCBased":const f=e[1]instanceof Ref;if(f){const t=n.getByRef(e[1]);if(t)return t}const g=a.fetchIfRef(e[1]),p=g.dict;o=p.get("N");if(IccColorSpace.isUsab\ le)try{const t=new IccColorSpace(g.getBytes(),"ICCBased",o);f&&n.set(null,e[1],t);return t}catch(t){if(t instanceof MissingDataException)throw t;warn(`ICCBased color space (${e[1]}): "${t}".`)}const m=p.getRaw("Alternate");if(m){const e=this.#R(m,t);if(e.numComps===o)return e;warn("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(1===o)return this.gray;if(3===o)return this.rgb;if(4===o)return this.cmyk;break;case"Pattern":c=e[1]||null;c&&(c=this.#R(c,t));return new PatternCS(c);ca\ se"I":case"Indexed":c=this.#R(e[1],t);const b=MathClamp(a.fetchIfRef(e[2]),0,255),y=a.fetchIfRef(e[3]);return new IndexedCS(c,b,y);case"Separation":case"DeviceN":const w=a.fetchIfRef(e[1]);o=Array.isArray(w)?w.length:1;c=this.#R(e[2],t);const x=i.create(e[3]);return new AlternateCS(o,c,x);case"Lab":s=a.fetchIfRef(e[1]);l=s.getArray("WhitePoint");h=s.getArray("BlackPoint");const S=s.getArray("Range");return new LabCS(l,h,S);default:warn(`Unimplemented ColorSpace object: ${r}`);return this.gray}}w\ arn(`Unrecognized ColorSpace object: ${e}`);return this.gray}static get gray(){return shadow(this,"gray",new DeviceGrayCS)}static get rgb(){return shadow(this,"rgb",new DeviceRgbCS)}static get rgba(){return shadow(this,"rgba",new DeviceRgbaCS)}static get cmyk(){if(CmykICCBasedCS.isUsable)try{return shadow(this,"cmyk",new CmykICCBasedCS)}catch{warn("CMYK fallback: DeviceCMYK")}return shadow(this,"cmyk",new DeviceCmykCS)}}class JpegError extends fa{constructor(e){super(e,"JpegError")}}class DNLMar\ kerError extends fa{constructor(e,t){super(e,"DNLMarkerError");this.scanLines=t}}class EOIMarkerError extends fa{constructor(e){super(e,"EOIMarkerError")}}const ja=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),_a=4017,Ua=799,Xa=3406,qa=2276,Ha=1567,Wa=3784,za=5793,$a=2896;function buildHuffmanTable(e,t){let a,r,i=0,n=16;for(;n>0&&!e[n-1];)n--;c\ onst s=[{children:[],index:0}];let o,c=s[0];for(a=0;a0;)c=s.pop();c.index++;s.push(c);for(;s.length<=a;){s.push(o={children:[],index:0});c.children[c.index]=o.children;c=o}i++}if(a+10){g--;return f>>g&1}f=e[t++];if(255===f){const r=e[t++];if(r){if(220===r&&l){const r=readUint16(e,t+=2);t+=2;if(r>0&&r!==a.scanLines)throw new DNLMarkerError("Found DNL marker (0xFFDC) while parsing scan data",r)}else if(217===r){if(l){const e=y*(8===a.precision?8:0);if(e>0&&Math.round(a.scanLines/e)>=5)throw new DNLMarkerError("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",e)}throw new EOIMar\ kerError("Found EOI marker (0xFFD9) while parsing scan data")}throw new JpegError(`unexpected marker ${(f<<8|r).toString(16)}`)}}g=7;return f>>>7}function decodeHuffman(e){let t=e;for(;;){t=t[readBit()];switch(typeof t){case"number":return t;case"object":continue}throw new JpegError("invalid huffman sequence")}}function receive(e){let t=0;for(;e>0;){t=t<<1|readBit();e--}return t}function receiveAndExtend(e){if(1===e)return 1===readBit()?1:-1;const t=receive(e);return t>=1<0){p--;return}let a=n;const r=s;for(;a<=r;){const r=decodeHuffman(e.huffmanTableAC),i=15&r,n=r>>4;if(0===i){if(n<15){p=receive(n)+(1<>4;if(0===i)if(l<15){p=receive(l)+(1<>4;if(0===r){if(n<15)break;i+=16;continue}i+=n;const s=ja[i];e.blockData[t+s]=receiveAndExtend(r);i++}};let T,O=0;const M=1===w?r[0].blocksPerLine*r[0].blocksPerColumn:h*a.mcusPerColumn;let D,R;for(;O<=M;){const a=i?Math.min(M-O,i):M;if(a>0){for(S=0;S0?"unexpected":"excessive"} MCU data, current marker is: ${T.invalid}`);t=T.offset}if(!(T.marker>=65488&&T.marker<=65495))break;t+=2}return t-d}function quantizeAndInverse(e,t,a){const r=e.quantizationTable,i=e.blockData;let n,s,o,c,l,h,u,d,f,g,p,m,b,y,w,x,S;if(!r)throw new JpegError("missing required Quantization Table.");for(let e=0;e<64;e+=8){f=i[t+e];g=i[t+e+1];p=i[t+e+2];m=i[t+e+3];b=i[t+e+4];y=i[t+e+5];w=i\ [t+e+6];x=i[t+e+7];f*=r[e];if(g|p|m|b|y|w|x){g*=r[e+1];p*=r[e+2];m*=r[e+3];b*=r[e+4];y*=r[e+5];w*=r[e+6];x*=r[e+7];n=za*f+128>>8;s=za*b+128>>8;o=p;c=w;l=$a*(g-x)+128>>8;d=$a*(g+x)+128>>8;h=m<<4;u=y<<4;n=n+s+1>>1;s=n-s;S=o*Wa+c*Ha+128>>8;o=o*Ha-c*Wa+128>>8;c=S;l=l+u+1>>1;u=l-u;d=d+h+1>>1;h=d-h;n=n+c+1>>1;c=n-c;s=s+o+1>>1;o=s-o;S=l*qa+d*Xa+2048>>12;l=l*Xa-d*qa+2048>>12;d=S;S=h*Ua+u*_a+2048>>12;h=h*_a-u*Ua+2048>>12;u=S;a[e]=n+d;a[e+7]=n-d;a[e+1]=s+u;a[e+6]=s-u;a[e+2]=o+h;a[e+5]=o-h;a[e+3]=c+l;a[e+4\ ]=c-l}else{S=za*f+512>>10;a[e]=S;a[e+1]=S;a[e+2]=S;a[e+3]=S;a[e+4]=S;a[e+5]=S;a[e+6]=S;a[e+7]=S}}for(let e=0;e<8;++e){f=a[e];g=a[e+8];p=a[e+16];m=a[e+24];b=a[e+32];y=a[e+40];w=a[e+48];x=a[e+56];if(g|p|m|b|y|w|x){n=za*f+2048>>12;s=za*b+2048>>12;o=p;c=w;l=$a*(g-x)+2048>>12;d=$a*(g+x)+2048>>12;h=m;u=y;n=4112+(n+s+1>>1);s=n-s;S=o*Wa+c*Ha+2048>>12;o=o*Ha-c*Wa+2048>>12;c=S;l=l+u+1>>1;u=l-u;d=d+h+1>>1;h=d-h;n=n+c+1>>1;c=n-c;s=s+o+1>>1;o=s-o;S=l*qa+d*Xa+2048>>12;l=l*Xa-d*qa+2048>>12;d=S;S=h*Ua+u*_a+2048\ >>12;h=h*_a-u*Ua+2048>>12;u=S;f=n+d;x=n-d;g=s+u;w=s-u;p=o+h;y=o-h;m=c+l;b=c-l;f<16?f=0:f>=4080?f=255:f>>=4;g<16?g=0:g>=4080?g=255:g>>=4;p<16?p=0:p>=4080?p=255:p>>=4;m<16?m=0:m>=4080?m=255:m>>=4;b<16?b=0:b>=4080?b=255:b>>=4;y<16?y=0:y>=4080?y=255:y>>=4;w<16?w=0:w>=4080?w=255:w>>=4;x<16?x=0:x>=4080?x=255:x>>=4;i[t+e]=f;i[t+e+8]=g;i[t+e+16]=p;i[t+e+24]=m;i[t+e+32]=b;i[t+e+40]=y;i[t+e+48]=w;i[t+e+56]=x}else{S=za*f+8192>>14;S=S<-2040?0:S>=2024?255:S+2056>>4;i[t+e]=S;i[t+e+8]=S;i[t+e+16]=S;i[t+e+24]=S\ ;i[t+e+32]=S;i[t+e+40]=S;i[t+e+48]=S;i[t+e+56]=S}}}function buildComponentData(e,t){const a=t.blocksPerLine,r=t.blocksPerColumn,i=new Int16Array(64);for(let e=0;e=r)return null;const n=readUint16(e,t);if(n>=65472&&n<=65534)return{invalid:null,marker:n,offset:t};let s=readUint16(e,i);for(;!(s>=65472&&s<=65534);){if(++i>=r)ret\ urn null;s=readUint16(e,i)}return{invalid:n.toString(16),marker:s,offset:i}}function prepareComponents(e){const t=Math.ceil(e.samplesPerLine/8/e.maxH),a=Math.ceil(e.scanLines/8/e.maxV);for(const r of e.components){const i=Math.ceil(Math.ceil(e.samplesPerLine/8)*r.h/e.maxH),n=Math.ceil(Math.ceil(e.scanLines/8)*r.v/e.maxV),s=t*r.h,o=64*(a*r.v)*(s+1);r.blockData=new Int16Array(o);r.blocksPerLine=i;r.blocksPerColumn=n}e.mcusPerLine=t;e.mcusPerColumn=a}function readDataBlock(e,t){const a=readUint16(e\ ,t);let r=(t+=2)+a-2;const i=findNextFileMarker(e,r,t);if(i?.invalid){warn("readDataBlock - incorrect length, current marker is: "+i.invalid);r=i.offset}const n=e.subarray(t,r);return{appData:n,oldOffset:t,newOffset:t+n.length}}function skipData(e,t){const a=readUint16(e,t),r=(t+=2)+a-2,i=findNextFileMarker(e,r,t);return i?.invalid?i.offset:r}class JpegImage{constructor({decodeTransform:e=null,colorTransform:t=-1}={}){this._decodeTransform=e;this._colorTransform=t}static canUseImageDecoder(e,t=-\ 1){let a=null,r=0,i=null,n=readUint16(e,r);r+=2;if(65496!==n)throw new JpegError("SOI not found");n=readUint16(e,r);r+=2;e:for(;65497!==n;){switch(n){case 65505:const{appData:t,oldOffset:s,newOffset:o}=readDataBlock(e,r);r=o;if(69===t[0]&&120===t[1]&&105===t[2]&&102===t[3]&&0===t[4]&&0===t[5]){if(a)throw new JpegError("Duplicate EXIF-blocks found.");a={exifStart:s+6,exifEnd:o}}n=readUint16(e,r);r+=2;continue;case 65472:case 65473:case 65474:i=e[r+7];break e;case 65535:255!==e[r]&&r--}r=skipData(\ e,r);n=readUint16(e,r);r+=2}return 4===i||3===i&&0===t?null:a||{}}parse(e,{dnlScanLines:t=null}={}){let a,r,i=0,n=null,s=null,o=0;const c=[],l=[],h=[];let u=readUint16(e,i);i+=2;if(65496!==u)throw new JpegError("SOI not found");u=readUint16(e,i);i+=2;e:for(;65497!==u;){let d,f,g;switch(u){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:const{appData:p,newOffs\ et:m}=readDataBlock(e,i);i=m;65504===u&&74===p[0]&&70===p[1]&&73===p[2]&&70===p[3]&&0===p[4]&&(n={version:{major:p[5],minor:p[6]},densityUnits:p[7],xDensity:p[8]<<8|p[9],yDensity:p[10]<<8|p[11],thumbWidth:p[12],thumbHeight:p[13],thumbData:p.subarray(14,14+3*p[12]*p[13])});65518===u&&65===p[0]&&100===p[1]&&111===p[2]&&98===p[3]&&101===p[4]&&(s={version:p[5]<<8|p[6],flags0:p[7]<<8|p[8],flags1:p[9]<<8|p[10],transformCode:p[11]});break;case 65499:const b=readUint16(e,i);i+=2;const y=b+i-2;let w;for(\ ;i>4){if(t>>4!=1)throw new JpegError("DQT - invalid table spec");for(f=0;f<64;f++){w=ja[f];a[w]=readUint16(e,i);i+=2}}else for(f=0;f<64;f++){w=ja[f];a[w]=e[i++]}c[15&t]=a}break;case 65472:case 65473:case 65474:if(a)throw new JpegError("Only single frame JPEGs supported");i+=2;a={};a.extended=65473===u;a.progressive=65474===u;a.precision=e[i++];const x=readUint16(e,i);i+=2;a.scanLines=t||x;a.samplesPerLine=readUint16(e,i);i+=2;a.components=[];a.compo\ nentIds={};const S=e[i++];let k=0,C=0;for(d=0;d>4,n=15&e[i+1];k>4?l:h)[15&t]=buildHuffmanTab\ le(a,n)}break;case 65501:i+=2;r=readUint16(e,i);i+=2;break;case 65498:const F=1==++o&&!t;i+=2;const T=e[i++],O=[];for(d=0;d>4];n.huffmanTableAC=l[15&s];O.push(n)}const M=e[i++],D=e[i++],R=e[i++];try{i+=decodeScan(e,i,a,O,r,M,D,R>>4,15&R,F)}catch(t){if(t instanceof DNLMarkerError){warn(`${t.message} -- attempting to re-parse the JPEG image.`);return this.parse(e,{dnlScanLines:t.scanLines})}i\ f(t instanceof EOIMarkerError){warn(`${t.message} -- ignoring the rest of the image data.`);break e}throw t}break;case 65500:i+=4;break;case 65535:255!==e[i]&&i--;break;default:const N=findNextFileMarker(e,i-2,i-3);if(N?.invalid){warn("JpegImage.parse - unexpected data, current marker is: "+N.invalid);i=N.offset;break}if(!N||i>=e.length-1){warn("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break e}throw new JpegError("JpegImage.parse - unknown mar\ ker: "+u.toString(16))}u=readUint16(e,i);i+=2}if(!a)throw new JpegError("JpegImage.parse - no frame data found.");this.width=a.samplesPerLine;this.height=a.scanLines;this.jfif=n;this.adobe=s;this.components=[];for(const e of a.components){const t=c[e.quantizationId];t&&(e.quantizationTable=t);this.components.push({index:e.index,output:buildComponentData(0,e),scaleX:e.h/a.maxH,scaleY:e.v/a.maxV,blocksPerLine:e.blocksPerLine,blocksPerColumn:e.blocksPerColumn})}this.numComponents=this.components.le\ ngth}_getLinearizedBlockData(e,t,a=!1){const r=this.width/e,i=this.height/t;let n,s,o,c,l,h,u,d,f,g,p,m=0;const b=this.components.length,y=e*t*b,w=new Uint8ClampedArray(y),x=new Uint32Array(e),S=4294967288;let k;for(u=0;u>8)+C[f+1];return w}get _isColorConversionNeeded(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this._colorTransform&&(82!==this.components[0].index||71!==this.components[1].index||66!==this.components[2].index):1===this._colorTransform}_convertYccToRgb(e){let t,a,r;for(let i=0,n=e.length;i4)throw new JpegErr\ or("Unsupported color mode");const n=this._getLinearizedBlockData(e,t,i);if(1===this.numComponents&&(a||r)){const e=n.length*(a?4:3),t=new Uint8ClampedArray(e);let r=0;if(a)!function grayToRGBA(e,t){if(FeatureTest.isLittleEndian)for(let a=0,r=e.length;a0&&(e=e.subarray(t));break}return e\ }decodeImage(e){if(this.eof)return this.buffer;e=this.#N(e||this.bytes);const t=new JpegImage(this.jpegOptions);t.parse(e);const a=t.getData({width:this.drawWidth,height:this.drawHeight,forceRGBA:this.forceRGBA,forceRGB:this.forceRGB,isSourcePDF:!0});this.buffer=a;this.bufferLength=a.length;this.eof=!0;return this.buffer}get canAsyncDecodeImageFromBuffer(){return this.stream.isAsync}async getTransferableImage(){if(!await JpegStream.canUseImageDecoder)return null;const e=this.jpegOptions;if(e.dec\ odeTransform)return null;let t;try{const a=this.canAsyncDecodeImageFromBuffer&&await this.stream.asyncGetBytes()||this.bytes;if(!a)return null;let r=this.#N(a);const i=JpegImage.canUseImageDecoder(r,e.colorTransform);if(!i)return null;if(i.exifStart){r=r.slice();r.fill(0,i.exifStart,i.exifEnd)}t=new ImageDecoder({data:r,type:"image/jpeg",preferAnimation:!1});return(await t.decode()).image}catch(e){warn(`getTransferableImage - failed: "${e}".`);return null}finally{t?.close()}}}var OpenJPEG=async \ function(e={}){var t,a,r=e,i=new Promise(((e,r)=>{t=e;a=r})),n="./this.program",quit_=(e,t)=>{throw t},s=import.meta.url;try{new URL(".",s).href}catch{}var o,c,l,h,u,d,f=console.log.bind(console),g=console.error.bind(console),p=!1;function updateMemoryViews(){var e=o.buffer;l=new Int8Array(e);new Int16Array(e);h=new Uint8Array(e);new Uint16Array(e);u=new Int32Array(e);d=new Uint32Array(e);new Float32Array(e);new Float64Array(e);new BigInt64Array(e);new BigUint64Array(e)}var m=0,b=null;class Exit\ Status{name="ExitStatus";constructor(e){this.message=`Program terminated with exit(${e})`;this.status=e}}var callRuntimeCallbacks=e=>{for(;e.length>0;)e.shift()(r)},y=[],addOnPostRun=e=>y.push(e),w=[],addOnPreRun=e=>w.push(e),x=!0,S=0,k={},handleException=e=>{if(e instanceof ExitStatus||"unwind"==e)return c;quit_(0,e)},keepRuntimeAlive=()=>x||S>0,_proc_exit=e=>{c=e;if(!keepRuntimeAlive()){r.onExit?.(e);p=!0}quit_(0,new ExitStatus(e))},_exit=(e,t)=>{c=e;_proc_exit(e)},callUserCallback=e=>{if(!p)t\ ry{e();(()=>{if(!keepRuntimeAlive())try{_exit(c)}catch(e){handleException(e)}})()}catch(e){handleException(e)}},growMemory=e=>{var t=(e-o.buffer.byteLength+65535)/65536|0;try{o.grow(t);updateMemoryViews();return 1}catch(e){}},C={},getEnvStrings=()=>{if(!getEnvStrings.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:n||"./this.program"};for(var t\ in C)void 0===C[t]?delete e[t]:e[t]=C[t];var a=[];for(var t in e)a.push(`${t}=${e[t]}`);getEnvStrings.strings=a}return getEnvStrings.strings},lengthBytesUTF8=e=>{for(var t=0,a=0;a=55296&&r<=57343){t+=4;++a}else t+=3}return t},v=[null,[],[]],F="undefined"!=typeof TextDecoder?new TextDecoder:void 0,UTF8ArrayToString=(e,t=0,a=NaN)=>{for(var r=t+a,i=t;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&F)return F.decode(e.subarra\ y(t,i));for(var n="";t>10,56320|1023&l)}}else n+=String.fromCharCode((31&s)<<6|o)}else n+=String.fromCharCode(s)}return n},printChar=(e,t)=>{var a=v[e];if(0===t||10===t){(1===e?f:g)(UTF8ArrayToString(a));a.length=0}else a.push(t)},UTF8ToString=(e,t)=>e?UTF8ArrayToString(h\ ,e,t):"";r.noExitRuntime&&(x=r.noExitRuntime);r.print&&(f=r.print);r.printErr&&(g=r.printErr);r.wasmBinary&&r.wasmBinary;r.arguments&&r.arguments;r.thisProgram&&(n=r.thisProgram);r.writeArrayToMemory=(e,t)=>{l.set(e,t)};var T={l:()=>function abort(e){r.onAbort?.(e);g(e="Aborted("+e+")");p=!0;e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);a(t);throw t}(""),k:()=>{x=!1;S=0},m:(e,t)=>{if(k[e]){clearTimeout(k[e].id);delete k[e]}if(!t)return 0;var a=setTimeout((()\ =>{delete k[e];callUserCallback((()=>M(e,performance.now())))}),t);k[e]={id:a,timeout_ms:t};return 0},g:function _copy_pixels_1(e,t){e>>=2;const a=r.imageData=new Uint8ClampedArray(t),i=u.subarray(e,e+t);a.set(i)},f:function _copy_pixels_3(e,t,a,i){e>>=2;t>>=2;a>>=2;const n=r.imageData=new Uint8ClampedArray(3*i),s=u.subarray(e,e+i),o=u.subarray(t,t+i),c=u.subarray(a,a+i);for(let e=0;e>=2;t>>=2;a>>=2;i>>=2;co\ nst s=r.imageData=new Uint8ClampedArray(4*n),o=u.subarray(e,e+n),c=u.subarray(t,t+n),l=u.subarray(a,a+n),h=u.subarray(i,i+n);for(let e=0;e{var t,a,r=h.length,i=2147483648;if((e>>>=0)>i)return!1;for(var n=1;n<=4;n*=2){var s=r*(1+.2/n);s=Math.min(s,e+100663296);var o=Math.min(i,(t=Math.max(e,s),a=65536,Math.ceil(t/a)*a));if(growMemory(o))return!0}return!1},p:(e,t)=>{var a=0,r=0;for(var i of getEnvStrings()){var n=t+a;d[e+r>>2]=n;\ a+=((e,t,a,r)=>{if(!(r>0))return 0;for(var i=a,n=a+r-1,s=0;s=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s));if(o<=127){if(a>=n)break;t[a++]=o}else if(o<=2047){if(a+1>=n)break;t[a++]=192|o>>6;t[a++]=128|63&o}else if(o<=65535){if(a+2>=n)break;t[a++]=224|o>>12;t[a++]=128|o>>6&63;t[a++]=128|63&o}else{if(a+3>=n)break;t[a++]=240|o>>18;t[a++]=128|o>>12&63;t[a++]=128|o>>6&63;t[a++]=128|63&o}}t[a]=0;return a-i})(i,h,n,1/0)+1;r+=4}return 0},q:(e,t)=\ >{var a=getEnvStrings();d[e>>2]=a.length;var r=0;for(var i of a)r+=lengthBytesUTF8(i)+1;d[t>>2]=r;return 0},b:e=>52,o:function _fd_seek(e,t,a,r){t=(i=t)<-9007199254740992||i>9007199254740992?NaN:Number(i);var i;return 70},c:(e,t,a,r)=>{for(var i=0,n=0;n>2],o=d[t+4>>2];t+=8;for(var c=0;c>2]=i;return 0},r:function _gray_to_rgba(e,t){e>>=2;const a=r.imageData=new Uint8ClampedArray(4*t),i=u.subarray(e,e+t);for(let e=0;e>=2;t>>=2;const i=r.imageData=new Uint8ClampedArray(4*a),n=u.subarray(e,e+a),s=u.subarray(t,t+a);for(let e=0;e>=2;t>>=2;a>>=2;const n=r.imageData=new Uint8ClampedArray(4*i),s=u.subarray(e,e+i),o=u.subarray(t,t+i),c=u.subarray(a,a+i);for(let \ e=0;e{r.instantiateWasm(e,((e,a)=>{t(receiveInstance(e))}))}))}(),M=(O.t,r._malloc=O.u,r._free=O.v,r._jp2_decode=O.w,O.x);!function preInit(){if(r.preInit){"function"==typeof r.preInit&&(r.preInit=[r.preInit]);for(;r.preInit.length>0;)r.preInit.shift()()}}();!function run(){if(m>0)b=run;else{!function preRun(){if(r.preRun){"function"==typeof r.preRun&&(r.preRun=[r.preRun]);for(;r.preRun.length;)addOnPreRun(r.preRun.shift())}callRuntimeCallbacks(w)}();if(m>0)b=\ run;else if(r.setStatus){r.setStatus("Running...");setTimeout((()=>{setTimeout((()=>r.setStatus("")),1);doRun()}),1)}else doRun()}function doRun(){r.calledRun=!0;if(!p){!function initRuntime(){O.t()}();t(r);r.onRuntimeInitialized?.();!function postRun(){if(r.postRun){"function"==typeof r.postRun&&(r.postRun=[r.postRun]);for(;r.postRun.length;)addOnPostRun(r.postRun.shift())}callRuntimeCallbacks(y)}()}}}();return i};const Ga=OpenJPEG;class JpxError extends fa{constructor(e){super(e,"JpxError")}}c\ lass JpxImage{static#E=null;static#P=null;static#L=null;static#v=!0;static#j=!0;static#F=null;static setOptions({handler:e,useWasm:t,useWorkerFetch:a,wasmUrl:r}){this.#v=t;this.#j=a;this.#F=r;a||(this.#P=e)}static async#_(e){const t=`${this.#F}openjpeg_nowasm_fallback.js`;let a=null;try{a=(await import(\n/*webpackIgnore: true*/\n/*@vite-ignore*/\nt)).default()}catch(e){warn(`JpxImage#getJsModule: ${e}`)}e(a)}static async#U(e,t,a){const r="openjpeg.wasm";try{this.#E||(this.#j?this.#E=await fetchBina\ ryData(`${this.#F}${r}`):this.#E=await this.#P.sendWithPromise("FetchBinaryData",{type:"wasmFactory",filename:r}));return a((await WebAssembly.instantiate(this.#E,t)).instance)}catch(t){warn(`JpxImage#instantiateWasm: ${t}`);this.#_(e);return null}finally{this.#P=null}}static async decode(e,{numComponents:t=4,isIndexedColormap:a=!1,smaskInData:r=!1,reducePower:i=0}={}){if(!this.#L){const{promise:e,resolve:t}=Promise.withResolvers(),a=[e];this.#v?a.push(Ga({warn,instantiateWasm:this.#U.bind(this,\ t)})):this.#_(t);this.#L=Promise.race(a)}const n=await this.#L;if(!n)throw new JpxError("OpenJPEG failed to initialize");let s;try{const o=e.length;s=n._malloc(o);n.writeArrayToMemory(e,s);if(n._jp2_decode(s,o,t>0?t:0,!!a,!!r,i)){const{errorMessages:e}=n;if(e){delete n.errorMessages;throw new JpxError(e)}throw new JpxError("Unknown error")}const{imageData:c}=n;n.imageData=null;return c}finally{s&&n._free(s)}}static cleanup(){this.#L=null}static parseImageProperties(e){let t=e.getByte();for(;t>=0\ ;){const a=t;t=e.getByte();if(65361===(a<<8|t)){e.skip(4);const t=e.getInt32()>>>0,a=e.getInt32()>>>0,r=e.getInt32()>>>0,i=e.getInt32()>>>0;e.skip(16);return{width:t-r,height:a-i,bitsPerComponent:8,componentsCount:e.getUint16()}}}throw new JpxError("No size marker found in JPX stream")}}function addState(e,t,a,r,i){let n=e;for(let e=0,a=t.length-1;e1e3){l=Math.m\ ax(l,d);f+=u+2;d=0;u=0}h.push({transform:t,x:d,y:f,w:a.width,h:a.height});d+=a.width+2;u=Math.max(u,a.height)}const g=Math.max(l,d)+1,p=f+u+1,m=new Uint8Array(g*p*4),b=g<<2;for(let e=0;e=0;){t[n-4]=t[n];t[n-3]=t[n+1];t[n-2]=t[n+2];t[n-1]=t[n+3];t[n+a]=t[n+a-4];t[n+a+1]=t[n+a-3];t[n+a+2]=t[n+a-2\ ];t[n+a+3]=t[n+a-1];n-=b}}const y={width:g,height:p};if(e.isOffscreenCanvasSupported){const e=new OffscreenCanvas(g,p);e.getContext("2d").putImageData(new ImageData(new Uint8ClampedArray(m.buffer),g,p),0,0);y.bitmap=e.transferToImageBitmap();y.data=null}else{y.kind=v;y.data=m}a.splice(n,4*c,Zt);r.splice(n,4*c,[y,h]);return n+1}));addState(Va,[Be,Ne,Vt,Re],null,(function iterateImageMaskGroup(e,t){const a=e.fnArray,r=(t-(e.iCurr-3))%4;switch(r){case 0:return a[t]===Be;case 1:return a[t]===Ne;case\ 2:return a[t]===Vt;case 3:return a[t]===Re}throw new Error(`iterateImageMaskGroup - invalid pos: ${r}`)}),(function foundImageMaskGroup(e,t){const a=e.fnArray,r=e.argsArray,i=e.iCurr,n=i-3,s=i-2,o=i-1;let c=Math.floor((t-n)/4);if(c<10)return t-(t-n)%4;let l,h,u=!1;const d=r[o][0],f=r[s][0],g=r[s][1],p=r[s][2],m=r[s][3];if(g===p){u=!0;l=s+4;let e=o+4;for(let t=1;t=4&&a[n-4]===a[s]&&a[n-3]===a[o]&&a[n-2]===a[c]&&a[n-1]===a[l]&&r[n-4][0]===h&&r[n-4][1]===u){d++;f-=5}let g=f+4;for(let e=1;e{const t=e.argsArray,a=t[e.iCurr-1][0];if(a!==qe&&a!==He&&a!==$e&&a!==Ge&&a!==Ve&&a!==Ke)return!0;const r=t[e.iCurr-2];return 1===r[0]&&0===r[1]&&0===r[2]&&1===r[3]}),(()=>!1),((e,t)=>{const{fnArray:a,argsArray:r}=e,i=e.iCurr,n=i-3,s=i-2,o=r[i-1],c=r[s],[,[l],h]=o;if(h){Util.scaleMinMax(c,h);for(let e=0,t=l.length;e=a)break}r=(r||Va)[e[t]];if(r&&!Array.isArray(r)){n.iCurr=t;t++;if(!r.checkFn||(0,r.checkFn)(n)){i=r;r=null}else r=null}else t++}this.state=r;this.match=i;this.lastProcessed=t}flush(){for(;this.match;){const e=this.queue.fnArray.length;this.lastProcessed=(0,this.match.processFn)(this.context,e);thi\ s.match=null;this.state=null;this._optimize()}}reset(){this.state=null;this.match=null;this.lastProcessed=0}}class OperatorList{static CHUNK_SIZE=1e3;static CHUNK_SIZE_ABOUT=this.CHUNK_SIZE-5;static isOffscreenCanvasSupported=!1;constructor(e=0,t){this._streamSink=t;this.fnArray=[];this.argsArray=[];this.optimizer=!t||e&d?new NullOptimizer(this):new QueueOptimizer(this);this.dependencies=new Set;this._totalLength=0;this.weight=0;this._resolved=t?null:Promise.resolve()}static setOptions({isOffscr\ eenCanvasSupported:e}){this.isOffscreenCanvasSupported=e}get length(){return this.argsArray.length}get ready(){return this._resolved||this._streamSink.ready}get totalLength(){return this._totalLength+this.length}addOp(e,t){this.optimizer.push(e,t);this.weight++;this._streamSink&&(this.weight>=OperatorList.CHUNK_SIZE||this.weight>=OperatorList.CHUNK_SIZE_ABOUT&&(e===Re||e===et))&&this.flush()}addImageOps(e,t,a,r=!1){if(r){this.addOp(Be);this.addOp(De,[[["SMask",!1]]])}void 0!==a&&this.addOp(jt,["\ OC",a]);this.addOp(e,t);void 0!==a&&this.addOp(_t,[]);r&&this.addOp(Re)}addDependency(e){if(!this.dependencies.has(e)){this.dependencies.add(e);this.addOp(ke,[e])}}addDependencies(e){for(const t of e)this.addDependency(t)}addOpList(e){if(e instanceof OperatorList){for(const t of e.dependencies)this.dependencies.add(t);for(let t=0,a=e.length;t>>0}function hexToStr(e,t){return 1===t?String.fromCharCode(e[0],e[1]):3===t?String.fromCharCode(e[0],e[1],e[2],e[3]):String.fromCharCode(...e.subarray(0,t+1))}function addHex(e,t,a){let r=0;for(let i\ =a;i>=0;i--){r+=e[i]+t[i];e[i]=255&r;r>>=8}}function incHex(e,t){let a=1;for(let r=t;r>=0&&a>0;r--){a+=e[r];e[r]=255&a;a>>=8}}const Ka=16;class BinaryCMapStream{constructor(e){this.buffer=e;this.pos=0;this.end=e.length;this.tmpBuf=new Uint8Array(19)}readByte(){return this.pos>=this.end?-1:this.buffer[this.pos++]}readNumber(){let e,t=0;do{const a=this.readByte();if(a<0)throw new FormatError("unexpected EOF in bcmap");e=!(128&a);t=t<<7|127&a}while(!e);return t}readSigned(){const e=this.readNumber(\ );return 1&e?~(e>>>1):e>>>1}readHex(e,t){e.set(this.buffer.subarray(this.pos,this.pos+t+1));this.pos+=t+1}readHexNumber(e,t){let a;const r=this.tmpBuf;let i=0;do{const e=this.readByte();if(e<0)throw new FormatError("unexpected EOF in bcmap");a=!(128&e);r[i++]=127&e}while(!a);let n=t,s=0,o=0;for(;n>=0;){for(;o<8&&r.length>0;){s|=r[--i]<>=8;o-=8}}readHexSigned(e,t){this.readHexNumber(e,t);const a=1&e[t]?255:0;let r=0;for(let i=0;i<=t;i++){r=(1&r)<<8|e[i];e[i]=r>>1^a}}readS\ tring(){const e=this.readNumber(),t=new Array(e);for(let a=0;a=0;){const e=d>>5;if(7===e){switch(31&d){case 0:r.readString();break;case 1:n=r.readString()}continue}const a=!!\ (16&d),i=15&d;if(i+1>Ka)throw new Error("BinaryCMapReader.process: Invalid dataSize.");const f=1,g=r.readNumber();switch(e){case 0:r.readHex(s,i);r.readHexNumber(o,i);addHex(o,s,i);t.addCodespaceRange(i+1,hexToInt(s,i),hexToInt(o,i));for(let e=1;e=0;--i){r[a+i]=255&s;s>>=8}}}}class AsciiHexStream extends DecodeStream{constructor(e,t){t&&(t*=.5\ );super(t);this.str=e;this.dict=e.dict;this.firstDigit=-1}readBlock(){const e=this.str.getBytes(8e3);if(!e.length){this.eof=!0;return}const t=e.length+1>>1,a=this.ensureBuffer(this.bufferLength+t);let r=this.bufferLength,i=this.firstDigit;for(const t of e){let e;if(t>=48&&t<=57)e=15&t;else{if(!(t>=65&&t<=70||t>=97&&t<=102)){if(62===t){this.eof=!0;break}continue}e=9+(15&t)}if(i<0)i=e;else{a[r++]=i<<4|e;i=-1}}if(i>=0&&this.eof){a[r++]=i<<4;i=-1}this.firstDigit=i;this.bufferLength=r}}const Ja=-1,Ya\ =[[-1,-1],[-1,-1],[7,8],[7,7],[6,6],[6,6],[6,5],[6,5],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1\ ,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2]],Za=[[-1,-1],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11\ ,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],Qa=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6\ ,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,21],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11]\ ,[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,24],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664\ ],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3]\ ,[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,1\ 7],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[\ 6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,\ 7],[4,7]],er=[[-1,-1],[-1,-1],[12,-2],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],\ [11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[12,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53\ ],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],tr=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[1\ 1,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,\ 11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12\ ],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],ar=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]];class CCITTFaxDecoder{constructor(e,t={}){if("function"!=t\ ypeof e?.next)throw new Error(\'CCITTFaxDecoder - invalid "source" parameter.\');this.source=e;this.eof=!1;this.encoding=t.K||0;this.eoline=t.EndOfLine||!1;this.byteAlign=t.EncodedByteAlign||!1;this.columns=t.Columns||1728;this.rows=t.Rows||0;this.eoblock=t.EndOfBlock??!0;this.black=t.BlackIs1||!1;this.codingLine=new Uint32Array(this.columns+1);this.refLine=new Uint32Array(this.columns+2);this.codingLine[0]=this.columns;this.codingPos=0;this.row=0;this.nextLine2D=this.encoding<0;this.inputBits=0;t\ his.inputBuf=0;this.outputBits=0;this.rowsDone=!1;let a;for(;0===(a=this._lookBits(12));)this._eatBits(1);1===a&&this._eatBits(12);if(this.encoding>0){this.nextLine2D=!this._lookBits(1);this._eatBits(1)}}readNextChar(){if(this.eof)return-1;const e=this.refLine,t=this.codingLine,a=this.columns;let r,i,n,s,o;if(0===this.outputBits){this.rowsDone&&(this.eof=!0);if(this.eof)return-1;this.err=!1;let n,o,c;if(this.nextLine2D){for(s=0;t[s]=64);do{o+=c=this._getWhiteCode()}while(c>=64)}else{do{n+=c=this._getWhiteCode()}while(c>=64);do{o+=c=this._getBlackCode()}while(c>=64)}this._addPixels(t[this.codingPos]+n,i);t[this.codingPos]0?--r:++r;for(;\ e[r]<=t[this.codingPos]&&e[r]0?--r:++r;for(;e[r]<=t[this.codingPos]&&e[r]0?--r:++r;for(;e[r]<=t[this.codingPos]&&e[r]=64);else do{n+=c=this._getWhiteCode()}while(c>=64);this._addPixels(t[this.codingPos]+n,i);i^=1}}let l=!1;this.byteAlign&&(this.inputBits&=-8);if(this.eoblock||this.row!==this.rows-1){n=this._lookBits(12);if(this.eoline)for(;n!==Ja&&1!==n;){this._eatBits(1);n=this._lookBits(12)}else for(;0===n;){this._eatBits(1);n=this._lookBits(12)}if(1===n){this._eatBits(12);l=!0}else n===Ja&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone){this.nextLine2D=!this._l\ ookBits(1);this._eatBits(1)}if(this.eoblock&&l&&this.byteAlign){n=this._lookBits(12);if(1===n){this._eatBits(12);if(this.encoding>0){this._lookBits(1);this._eatBits(1)}if(this.encoding>=0)for(s=0;s<4;++s){n=this._lookBits(12);1!==n&&info("bad rtc code: "+n);this._eatBits(12);if(this.encoding>0){this._lookBits(1);this._eatBits(1)}}this.eof=!0}}else if(this.err&&this.eoline){for(;;){n=this._lookBits(13);if(n===Ja){this.eof=!0;return-1}if(n>>1==1)break;this._eatBits(1)}this._eatBits(12);if(this.enc\ oding>0){this._eatBits(1);this.nextLine2D=!(1&n)}}this.outputBits=t[0]>0?t[this.codingPos=0]:t[this.codingPos=1];this.row++}if(this.outputBits>=8){o=1&this.codingPos?0:255;this.outputBits-=8;if(0===this.outputBits&&t[this.codingPos]n){o<<=n;1&this.codingPos||(o|=255>\ >8-n);this.outputBits-=n;n=0}else{o<<=this.outputBits;1&this.codingPos||(o|=255>>8-this.outputBits);n-=this.outputBits;this.outputBits=0;if(t[this.codingPos]0){o<<=n;n=0}}}while(n)}this.black&&(o^=255);return o}_addPixels(e,t){const a=this.codingLine;let r=this.codingPos;if(e>a[r]){if(e>this.columns){info("row is wrong length");this.err=!0;e=this.columns}1&r^t&&++r;a[r]=e}this.codingPos=r}_addPixelsNeg(e,t){cons\ t a=this.codingLine;let r=this.codingPos;if(e>a[r]){if(e>this.columns){info("row is wrong length");this.err=!0;e=this.columns}1&r^t&&++r;a[r]=e}else if(e0&&e=i){const t=a[e-i];if(t[0]===r){this._eatBits(r);return[!0,t[1],!0]}}}return[!1,0,!1]}_getTwoDimCode(){let e,t=0;i\ f(this.eoblock){t=this._lookBits(7);e=Ya[t];if(e?.[0]>0){this._eatBits(e[0]);return e[1]}}else{const e=this._findTableCode(1,7,Ya);if(e[0]&&e[2])return e[1]}info("Bad two dim code");return Ja}_getWhiteCode(){let e,t=0;if(this.eoblock){t=this._lookBits(12);if(t===Ja)return 1;e=t>>5?Qa[t>>3]:Za[t];if(e[0]>0){this._eatBits(e[0]);return e[1]}}else{let e=this._findTableCode(1,9,Qa);if(e[0])return e[1];e=this._findTableCode(11,12,Za);if(e[0])return e[1]}info("bad white code");this._eatBits(1);return 1\ }_getBlackCode(){let e,t;if(this.eoblock){e=this._lookBits(13);if(e===Ja)return 1;t=e>>7?!(e>>9)&&e>>7?tr[(e>>1)-64]:ar[e>>7]:er[e];if(t[0]>0){this._eatBits(t[0]);return t[1]}}else{let e=this._findTableCode(2,6,ar);if(e[0])return e[1];e=this._findTableCode(7,12,tr,64);if(e[0])return e[1];e=this._findTableCode(10,13,er);if(e[0])return e[1]}info("bad black code");this._eatBits(1);return 1}_lookBits(e){let t;for(;this.inputBits>16-e;this.inputBuf=this.inputBuf<<8|t;this.inputBits+=8}return this.inputBuf>>this.inputBits-e&65535>>16-e}_eatBits(e){(this.inputBits-=e)<0&&(this.inputBits=0)}}class CCITTFaxStream extends DecodeStream{constructor(e,t,a){super(t);this.str=e;this.dict=e.dict;a instanceof Dict||(a=Dict.empty);const r={next:()=>e.getByte()};this.ccittFaxDecoder=new CCITTFaxDecoder(r,{K:a.get("K"),EndOfLine:a.get("EndOfLine"),EncodedByteAlign:a.get("EncodedByteAlign"),Columns:a.get(\ "Columns"),Rows:a.get("Rows"),EndOfBlock:a.get("EndOfBlock"),BlackIs1:a.get("BlackIs1")})}readBlock(){for(;!this.eof;){const e=this.ccittFaxDecoder.readNextChar();if(-1===e){this.eof=!0;return}this.ensureBuffer(this.bufferLength+1);this.buffer[this.bufferLength++]=e}}}const rr=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ir=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843\ ,327875,327907,258,258,258]),nr=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),sr=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308\ ,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,52\ 4326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,52438\ 1,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,5\ 24399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,4590\ 09,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,\ 459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590\ 055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],or=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,\ 327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];class FlateStream extends DecodeStream{constructor(e,t){super(t);this.str=e;this.dict=e.dict;const a=e.getByte(),r=e.getByte();if(-1===a||-1===r)throw new FormatError(`Invalid header in flate stream: ${a}, ${r}`);if(8!=(15&a))throw new FormatError(`Unknown compression method in flate stream: ${a}, ${r}`);if(((a<<8)+r)%31!=0)throw new FormatError(`Bad FCHECK in flate stream: ${a}, ${r}`);if(32&r)throw new FormatEr\ ror(`FDICT bit set in flate stream: ${a}, ${r}`);this.codeSize=0;this.codeBuf=0}async getImageData(e,t){const a=await this.asyncGetBytes();return a?a.length<=e?a:a.subarray(0,e):this.getBytes(e)}async asyncGetBytes(){this.str.reset();const e=this.str.getBytes();try{const{readable:t,writable:a}=new DecompressionStream("deflate"),r=a.getWriter();await r.ready;r.write(e).then((async()=>{await r.ready;await r.close()})).catch((()=>{}));const i=[];let n=0;for await(const e of t){i.push(e);n+=e.byteLe\ ngth}const s=new Uint8Array(n);let o=0;for(const e of i){s.set(e,o);o+=e.byteLength}return s}catch{this.str=new Stream(e,2,e.length,this.str.dict);this.reset();return null}}get isAsync(){return!0}getBits(e){const t=this.str;let a,r=this.codeSize,i=this.codeBuf;for(;r>e;this.codeSize=r-=e;return a}getCode(e){const t=this.str,a=e[0],r=e[1];let i,n=this.codeSize,s=this.codeBuf\ ;for(;n>16,l=65535&o;if(c<1||n>c;this.codeSize=n-c;return l}generateHuffmanTable(e){const t=e.length;let a,r=0;for(a=0;ar&&(r=e[a]);const i=1<>=1}for(a=e;a>=1;if(0===t){let t;if(-1===(t=r.getByte())){this.#X("Bad block header in flate stream");return}let a=t;if(-1===(t=r.getByte())){this.#X("Bad block header in flate stream");return}a|=t<<8;if(-1===(t=r.getByte())){this.#X("Bad block header in flate stream");return}let i=t;if(-1===(t=r.getByte())){this.#X("Bad block header in flate stream");return}i|=t<<8;if(i!==(65535&~a)&&(\ 0!==a||0!==i))throw new FormatError("Bad uncompressed block length in flate stream");this.codeBuf=0;this.codeSize=0;const n=this.bufferLength,s=n+a;e=this.ensureBuffer(s);this.bufferLength=s;if(0===a)-1===r.peekByte()&&(this.eof=!0);else{const t=r.getBytes(a);e.set(t,n);t.length0;)h[o++]=f}i=this.generateHuffmanTable(h.subarray(0,e));n=this.generateHuffmanTable(h.subarray(e,l))}}e=this.buffer;let s=e?e.length:0,o=this.bufferLength;for(;;){let t=this.getCode(i);if(t\ <256){if(o+1>=s){e=this.ensureBuffer(o+1);s=e.length}e[o++]=t;continue}if(256===t){this.bufferLength=o;return}t-=257;t=ir[t];let r=t>>16;r>0&&(r=this.getBits(r));a=(65535&t)+r;t=this.getCode(n);t=nr[t];r=t>>16;r>0&&(r=this.getBits(r));const c=(65535&t)+r;if(o+a>=s){e=this.ensureBuffer(o+a);s=e.length}for(let t=0;t>9&127;this.clow=this.clow<<7&65535;this.ct-=7;this.a=32768}byteIn(){const e=this.data;let t=this.bp;if(255===e[t])if(e[t+1]>143){this.clow+=65280;this.ct=8}else{t++;this\ .clow+=e[t]<<9;this.ct=7;this.bp=t}else{t++;this.clow+=t65535){this.chigh+=this.clow>>16;this.clow&=65535}}readBit(e,t){let a=e[t]>>1,r=1&e[t];const i=cr[a],n=i.qe;let s,o=this.a-n;if(this.chigh>15&1;this.clow=this.clow<<1&65535;this.ct--}while(!(32768&o));this.a=o;e[t]=a<<1|r;return s}}class Jbig2Error extends fa{constructor(e){super(e,"Jbig2Error")}}class ContextCache{getContexts(e){return e in this?this[e]:this[e]=new Int8Array(65536)}}class DecodingContext{constructor(e,t,a){this.data=e;this.start=t;this.end=a}get decoder(){return shadow(this,"decoder",new ArithmeticDecoder(this.data,this.start,this.end))}get contextCache(){return shadow(this,"contextCache",n\ ew ContextCache)}}function decodeInteger(e,t,a){const r=e.getContexts(t);let i=1;function readBits(e){let t=0;for(let n=0;n>>0}const n=readBits(1),s=readBits(1)?readBits(1)?readBits(1)?readBits(1)?readBits(1)?readBits(32)+4436:readBits(12)+340:readBits(8)+84:readBits(6)+20:readBits(4)+4:readBits(2);let o;0===n?o=s:s>0&&(o=-s);return o>=-2147483648&&o<=va?o:null}function decodeIAID(e,t,a){const r=e.getContexts("IAID"\ );let i=1;for(let e=0;ee.y-t.y||e.x-t.x));const h=l.length,u=new Int8Array(h),d=new Int8Array(h),f=[];let g,p,m=0,b=0,y=0,w=0;for(p=0;p=v&&E=F){q=q<<1&m;for(p=0;p=0&&j=0){_=D[L][j];_&&(q|=_<=e?l<<=1:l=l<<1|S[o][c]}for(f=0;f=w||c<0||c>=y?l<<=1:l=l<<1|r[o][c]}const g=k.readBit(C,l);t[s]=g}}return S}func\ tion decodeTextRegion(e,t,a,r,i,n,s,o,c,l,h,u,d,f,g,p,m,b,y){if(e&&t)throw new Jbig2Error("refinement with Huffman is not supported");const w=[];let x,S;for(x=0;x1&&(i=e?y.readBits(b):decodeInteger(C\ ,"IAIT",k));const n=s*v+i,F=e?f.symbolIDTable.decode(y):decodeIAID(C,k,c),T=t&&(e?y.readBit():decodeInteger(C,"IARI",k));let O=o[F],M=O[0].length,D=O.length;if(T){const e=decodeInteger(C,"IARDW",k),t=decodeInteger(C,"IARDH",k);M+=e;D+=t;O=decodeRefinement(M,D,g,O,(e>>1)+decodeInteger(C,"IARDX",k),(t>>1)+decodeInteger(C,"IARDY",k),!1,p,m)}let R=0;l?1&u?R=D-1:r+=D-1:u>1?r+=M-1:R=M-1;const N=n-(1&u?0:D-1),E=r-(2&u?M-1:0);let L,j,_;if(l)for(L=0;L>5&7;const c=[31&s];let l=t+6;if(7===s){o=536870911&readUint32(e,l-1);l+=3;let t=o+7>>3;c[0]=e[l++];for(;--t>0;)c.push(e[l++])}else if(5===s||6===s)throw new Jbig2Error("invalid referred-to flags");a.retainBits=c;let h=4;a.number<=256?h=1:a.number<=65536&&(h=2);const u=[];let d,f;for(d=0;d\ >>24&255;n[3]=t.height>>16&255;n[4]=t.height>>8&255;n[5]=255&t.height;for(d=l,f=e.lengt\ h;d>2&3;e.huffmanDWSelector=t>>4&3;e.bitmapSizeSelector=t>>6&1;e.aggregationInstancesSelector=t>>7&1;e.bitmapCodingContextUsed=!!(\ 256&t);e.bitmapCodingContextRetained=!!(512&t);e.template=t>>10&3;e.refinementTemplate=t>>12&1;l+=2;if(!e.huffman){c=0===e.template?4:1;s=[];for(o=0;o>2&3;h.stripSize=1<>4&3;h.transposed=!!(64&u);h.combinationOperator=u>>7&3;h.defaultPixelValue=u>>9&1;h.dsOffset=u<<17>>27;h.refinementTemplate=u>>15&1;if(h.huffman){const e=readUint16(r,l);l+=2;h.huffmanFS=3&e;h.huffmanDS=e>>2&3;h.huffmanDT=e>>4&3;h.huffmanRefinementDW=e>>6&3;h.huffmanRefinementDH=e>>8&3;h.huffmanRefinementDX=e>>10&3\ ;h.huffmanRefinementDY=e>>12&3;h.huffmanRefinementSizeSelector=!!(16384&e)}if(h.refinement&&!h.refinementTemplate){s=[];for(o=0;o<2;o++){s.push({x:readInt8(r,l),y:readInt8(r,l+1)});l+=2}h.refinementAt=s}h.numberOfSymbolInstances=readUint32(r,l);l+=4;n=[h,a.referredTo,r,l,i];break;case 16:const d={},f=r[l++];d.mmr=!!(1&f);d.template=f>>1&3;d.patternWidth=r[l++];d.patternHeight=r[l++];d.maxPatternIndex=readUint32(r,l);l+=4;n=[d,a.number,r,l,i];break;case 22:case 23:const g={};g.info=readRegionSegm\ entInformation(r,l);l+=gr;const p=r[l++];g.mmr=!!(1&p);g.template=p>>1&3;g.enableSkip=!!(8&p);g.combinationOperator=p>>4&7;g.defaultPixelValue=p>>7&1;g.gridWidth=readUint32(r,l);l+=4;g.gridHeight=readUint32(r,l);l+=4;g.gridOffsetX=4294967295&readUint32(r,l);l+=4;g.gridOffsetY=4294967295&readUint32(r,l);l+=4;g.gridVectorX=readUint16(r,l);l+=2;g.gridVectorY=readUint16(r,l);l+=2;n=[g,a.referredTo,r,l,i];break;case 38:case 39:const m={};m.info=readRegionSegmentInformation(r,l);l+=gr;const b=r[l++];m\ .mmr=!!(1&b);m.template=b>>1&3;m.prediction=!!(8&b);if(!m.mmr){c=0===m.template?4:1;s=[];for(o=0;o>2&1;y.combinationOperator=w>>3&3;y.requiresBuffer=!!(32&w\ );y.combinationOperatorOverride=!!(64&w);n=[y];break;case 49:case 50:case 51:case 62:break;case 53:n=[a.number,r,l,i];break;default:throw new Jbig2Error(`segment type ${a.typeName}(${a.type}) is not implemented`)}const h="on"+a.typeName;h in t&&t[h].apply(t,n)}function processSegments(e,t){for(let a=0,r=e.length;a>3,a=new Uint8ClampedArray(t*e.height);e.defaultPixelValue&&a.fill\ (255);this.buffer=a}drawBitmap(e,t){const a=this.currentPageInfo,r=e.width,i=e.height,n=a.width+7>>3,s=a.combinationOperatorOverride?e.combinationOperator:a.combinationOperator,o=this.buffer,c=128>>(7&e.x);let l,h,u,d,f=e.y*n+(e.x>>3);switch(s){case 0:for(l=0;l>=1;if(!u){u=128;d++}}f+=n}break;case 2:for(l=0;l>=1;if(!u){u=128;d++}}f+=n}break;default:throw new Jbig2Error(`operator ${s} is no\ t supported`)}}onImmediateGenericRegion(e,t,a,r){const i=e.info,n=new DecodingContext(t,a,r),s=decodeBitmap(e.mmr,i.width,i.height,e.template,e.prediction,null,e.at,n);this.drawBitmap(i,s)}onImmediateLosslessGenericRegion(){this.onImmediateGenericRegion(...arguments)}onSymbolDictionary(e,t,a,r,i,n){let s,o;if(e.huffman){s=function getSymbolDictionaryHuffmanTables(e,t,a){let r,i,n,s,o=0;switch(e.huffmanDHSelector){case 0:case 1:r=getStandardTable(e.huffmanDHSelector+4);break;case 3:r=getCustomHuf\ fmanTable(o,t,a);o++;break;default:throw new Jbig2Error("invalid Huffman DH selector")}switch(e.huffmanDWSelector){case 0:case 1:i=getStandardTable(e.huffmanDWSelector+2);break;case 3:i=getCustomHuffmanTable(o,t,a);o++;break;default:throw new Jbig2Error("invalid Huffman DW selector")}if(e.bitmapSizeSelector){n=getCustomHuffmanTable(o,t,a);o++}else n=getStandardTable(1);s=e.aggregationInstancesSelector?getCustomHuffmanTable(o,t,a):getStandardTable(1);return{tableDeltaHeight:r,tableDeltaWidth:i,ta\ bleBitmapSize:n,tableAggregateInstances:s}}(e,a,this.customTables);o=new Reader(r,i,n)}let c=this.symbols;c||(this.symbols=c={});const l=[];for(const e of a){const t=c[e];t&&l.push(...t)}const h=new DecodingContext(r,i,n);c[t]=function decodeSymbolDictionary(e,t,a,r,i,n,s,o,c,l,h,u){if(e&&t)throw new Jbig2Error("symbol refinement with Huffman is not supported");const d=[];let f=0,g=log2(a.length+r);const p=h.decoder,m=h.contextCache;let b,y;if(e){b=getStandardTable(1);y=[];g=Math.max(g,1)}for(;d\ .length1)w=decodeTextRegion(e,t,r,f,0,i,1,a.concat(d),g,0,0,1,0,n,c,l,h,0,u);else{const e=decodeIAID(m,p,g),t=decodeInteger(m,"IARDX",p),i=decodeInteger(m,"IARDY",p);w=decodeRefinement(r,f,c,e=32){let a,r,s;switch(t){case 32:if(0===e)throw new Jbig2Error("no previous value in symbol ID table");r=i.readBits(2)+3;a=n[e-1].prefixLength;break;case 33:r=i.readBits(3)+3;a=0;break;case 34:r=i.readBits(7)+11;a=0;break;default:throw new Jbig2Error("invalid code length in symbol ID table")}for(s=0;s<\ r;s++){n.push(new HuffmanLine([e,a,0,0]));e++}}else{n.push(new HuffmanLine([e,t,0,0]));e++}}i.byteAlign();const o=new HuffmanTable(n,!1);let c,l,h,u=0;switch(e.huffmanFS){case 0:case 1:c=getStandardTable(e.huffmanFS+6);break;case 3:c=getCustomHuffmanTable(u,t,a);u++;break;default:throw new Jbig2Error("invalid Huffman FS selector")}switch(e.huffmanDS){case 0:case 1:case 2:l=getStandardTable(e.huffmanDS+8);break;case 3:l=getCustomHuffmanTable(u,t,a);u++;break;default:throw new Jbig2Error("invalid \ Huffman DS selector")}switch(e.huffmanDT){case 0:case 1:case 2:h=getStandardTable(e.huffmanDT+11);break;case 3:h=getCustomHuffmanTable(u,t,a);u++;break;default:throw new Jbig2Error("invalid Huffman DT selector")}if(e.refinement)throw new Jbig2Error("refinement with Huffman is not supported");return{symbolIDTable:o,tableFirstS:c,tableDeltaS:l,tableDeltaT:h}}(e,t,this.customTables,l.length,o)}const u=new DecodingContext(a,r,i),d=decodeTextRegion(e.huffman,e.refinement,n.width,n.height,e.defaultPix\ elValue,e.numberOfSymbolInstances,e.stripSize,l,h,e.transposed,e.dsOffset,e.referenceCorner,e.combinationOperator,s,e.refinementTemplate,e.refinementAt,u,e.logStripSize,o);this.drawBitmap(n,d)}onImmediateLosslessTextRegion(){this.onImmediateTextRegion(...arguments)}onPatternDictionary(e,t,a,r,i){let n=this.patterns;n||(this.patterns=n={});const s=new DecodingContext(a,r,i);n[t]=function decodePatternDictionary(e,t,a,r,i,n){const s=[];if(!e){s.push({x:-t,y:0});0===i&&s.push({x:-3,y:-1},{x:2,y:-2}\ ,{x:-2,y:-2})}const o=decodeBitmap(e,(r+1)*t,a,i,!1,null,s,n),c=[];for(let e=0;e<=r;e++){const r=[],i=t*e,n=i+t;for(let e=0;e=0;m--){O=e?decodeMMRBitmap(T,c,l,!0):decodeBitmap(!1,c,l,a,!1,null,v,g);F[m]=O}for(M=0;M\ =0;b--){R^=F[b][M][D];N|=R<>8;j=u+M*d-D*f>>8;if(L>=0&&L+S<=r&&j>=0&&j+k<=i)for(m=0;m=i)){U=p[t];_=E[m];for(b=0;b=0&&e>1&7),c=1+(r>>4&7),l=[];let h,u,d=i;do{h=s.readBits(o);u=s.readBits(c);l.push(new HuffmanLine([d,h,u,0]));d+=1<>t&1;if(t<=0)this.children[a]=new HuffmanTreeNode(e);else{let r=this.children[a];r||(this.children[a]=r=new HuffmanTreeNode(null));r.buildTree(e,t-1)}}decodeNode(e){if(this.isLeaf){if(this.isOOB)return null;const t=e.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-t:t)}const t=this.children[e.readBit()];if(!t)throw new Jbig2\ Error("invalid Huffman data");return t.decodeNode(e)}}class HuffmanTable{constructor(e,t){t||this.assignPrefixCodes(e);this.rootNode=new HuffmanTreeNode(null);for(let t=0,a=e.length;t0&&this.rootNode.buildTree(a,a.prefixLength-1)}}decode(e){return this.rootNode.decodeNode(e)}assignPrefixCodes(e){const t=e.length;let a=0;for(let r=0;r=this.end)throw new Jbig2Error("end of data while reading bit");this.currentByte=this.data[this.position++];this.shift=7}const e=this.currentByte>>this.shift&1;this.shift--;return e}readBits(e){let t,a=0;for(t=e-1;t>=0;t--)a|=this.readBit()<=this.end?-1:this.data[this.position++]}}function getCustomHuffmanTable(e,t,a){let r=0;for(let i=0,n=t.le\ ngth;i>a&1;a--}}if(r&&!o){const e=5;for(let t=0;t>>t&(1<0;if(e<256){d[0]=e;f=1}else{if(!(e>=258)){if(256===e){h=9;s=258;f=0;continue}this.eof=!0;delete this.lzwState;break}if(e=0;t--){d[t]=o[a];a=l[a]}}else d[f++]=d[0]}if(i){l[s]=u;c[s]=c[u]+1;o[s]=d[0];s++;h=s+n&s+n-1?h:0|Math.m\ in(Math.log(s+n)/.6931471805599453+1,12)}u=e;g+=f;if(r15))throw new FormatError(`Unsupported predictor: ${r}`);this.readBlock=2===r?t\ his.readBlockTiff:this.readBlockPng;this.str=e;this.dict=e.dict;const i=this.colors=a.get("Colors")||1,n=this.bits=a.get("BPC","BitsPerComponent")||8,s=this.columns=a.get("Columns")||1;this.pixBytes=i*n+7>>3;this.rowBytes=s*i*n+7>>3;return this}readBlockTiff(){const e=this.rowBytes,t=this.bufferLength,a=this.ensureBuffer(t+e),r=this.bits,i=this.colors,n=this.str.getBytes(e);this.eof=!n.length;if(this.eof)return;let s,o=0,c=0,l=0,h=0,u=t;if(1===r&&1===i)for(s=0;s>1;e^=e>\ >2;e^=e>>4;o=(1&e)<<7;a[u++]=e}else if(8===r){for(s=0;s>8&255;a[u++]=255&e}}else{const e=new Uint8Array(i+1),u=(1<>l-r)&u;l-=r;c=c<=8){a[f++]=c>>h-8&255;h-=8\ }}h>0&&(a[f++]=(c<<8-h)+(o&(1<<8-h)-1))}this.bufferLength+=e}readBlockPng(){const e=this.rowBytes,t=this.pixBytes,a=this.str.getByte(),r=this.str.getBytes(e);this.eof=!r.length;if(this.eof)return;const i=this.bufferLength,n=this.ensureBuffer(i+e);let s=n.subarray(i-e,i);0===s.length&&(s=new Uint8Array(e));let o,c,l,h=i;switch(a){case 0:for(o=0;o>1)+r[o];for(;o>1)+r[o]&255;h++}break;case 4:for(o=0;o0){const e=this.str.getBytes(r);t.set(e,a);a+=r}}else{r=257-r;t=this.ensureBuffer(a+r+1);t.fill(e[1],a,a+r);a+=r}this.bufferLength=a}}class Parser{constructor({lexer:e,xref:t,allowStreams:a=!1,recoveryMode:r=!1}){this.lexer=e;this.xref=t;this.allowStreams=a;this.recoveryMode=r;this.imageCache=Object.create(null);this._imag\ eId=0;this.refill()}refill(){this.buf1=this.lexer.getObj();this.buf2=this.lexer.getObj()}shift(){if(this.buf2 instanceof Cmd&&"ID"===this.buf2.cmd){this.buf1=this.buf2;this.buf2=null}else{this.buf1=this.buf2;this.buf2=this.lexer.getObj()}}tryShift(){try{this.shift();return!0}catch(e){if(e instanceof MissingDataException)throw e;return!1}}getObj(e=null){const t=this.buf1;this.shift();if(t instanceof Cmd)switch(t.cmd){case"BI":return this.makeInlineImage(e);case"[":const a=[];for(;!isCmd(this.buf1\ ,"]")&&this.buf1!==wa;)a.push(this.getObj(e));if(this.buf1===wa){if(this.recoveryMode)return a;throw new ParserEOFException("End of file inside array.")}this.shift();return a;case"<<":const r=new Dict(this.xref);for(;!isCmd(this.buf1,">>")&&this.buf1!==wa;){if(!(this.buf1 instanceof Name)){info("Malformed dictionary: key must be a name object");this.shift();continue}const t=this.buf1.name;this.shift();if(this.buf1===wa)break;r.set(t,this.getObj(e))}if(this.buf1===wa){if(this.recoveryMode)return \ r;throw new ParserEOFException("End of file inside dictionary.")}if(isCmd(this.buf2,"stream"))return this.allowStreams?this.makeStream(r,e):r;this.shift();return r;default:return t}if(Number.isInteger(t)){if(Number.isInteger(this.buf1)&&isCmd(this.buf2,"R")){const e=Ref.get(t,this.buf1);this.shift();this.shift();return e}return t}return"string"==typeof t&&e?e.decryptString(t):t}findDefaultInlineStreamEnd(e){const{knownCommands:t}=this.lexer,a=e.pos;let r,i,n=0;for(;-1!==(r=e.getByte());)if(0===n\ )n=69===r?1:0;else if(1===n)n=73===r?2:0;else if(32===r||10===r||13===r){i=e.pos;const a=e.peekBytes(15),s=a.length;if(0===s)break;for(let e=0;e127))){n=0;break}}if(2!==n)continue;if(!t){warn("findDefaultInlineStreamEnd - `lexer.knownCommands` is undefined.");continue}const o=new Lexer(new Stream(e.peekBytes(75)),t);o._hexStringWarn=()=>{};let c=0;for(;;){const e=o.getObj();if(e===wa){n=0;break}if(e instanceof Cmd){const a=t[e.cmd]\ ;if(!a){n=0;break}if(a.variableArgs?c<=a.numArgs:c===a.numArgs)break;c=0}else c++}if(2===n)break}else n=0;if(-1===r){warn("findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker");if(i){warn(\'... trying to recover by using the last "EI" occurrence.\');e.skip(-(e.pos-i))}}let s=4;e.skip(-s);r=e.peekByte();e.skip(s);isWhiteSpace(r)||s--;return e.pos-s-a}findDCTDecodeInlineStreamEnd(e){const t=e.pos;let a,r,i=!1;for(;-1!==(a=e.getByte());)if(255===a){switch(e.get\ Byte()){case 0:break;case 255:e.skip(-1);break;case 217:i=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:r=e.getUint16();r>2?e.skip(r-2):e.skip(-2)}if(i)break}const n=e.pos-t;if(-1===a){warn("Inli\ ne DCTDecode image stream: EOI marker not found, searching for /EI/ instead.");e.skip(-n);return this.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);return n}findASCII85DecodeInlineStreamEnd(e){const t=e.pos;let a;for(;-1!==(a=e.getByte());)if(126===a){const t=e.pos;a=e.peekByte();for(;isWhiteSpace(a);){e.skip();a=e.peekByte()}if(62===a){e.skip();break}if(e.pos>t){const t=e.peekBytes(2);if(69===t[0]&&73===t[1])break}}const r=e.pos-t;if(-1===a){warn("Inline ASCII85Decode image stream: E\ OD marker not found, searching for /EI/ instead.");e.skip(-r);return this.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);return r}findASCIIHexDecodeInlineStreamEnd(e){const t=e.pos;let a;for(;-1!==(a=e.getByte())&&62!==a;);const r=e.pos-t;if(-1===a){warn("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead.");e.skip(-r);return this.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);return r}inlineStreamSkipEI(e){let t,a=0;for(;-1!==(t=e.getByte())\ ;)if(0===a)a=69===t?1:0;else if(1===a)a=73===t?2:0;else if(2===a)break}makeInlineImage(e){const t=this.lexer,a=t.stream,r=Object.create(null);let i;for(;!isCmd(this.buf1,"ID")&&this.buf1!==wa;){if(!(this.buf1 instanceof Name))throw new FormatError("Dictionary key must be a name object");const t=this.buf1.name;this.shift();if(this.buf1===wa)break;r[t]=this.getObj(e)}-1!==t.beginInlineImagePos&&(i=a.pos-t.beginInlineImagePos);const n=this.xref.fetchIfRef(r.F||r.Filter);let s;if(n instanceof Name)s\ =n.name;else if(Array.isArray(n)){const e=this.xref.fetchIfRef(n[0]);e instanceof Name&&(s=e.name)}const o=a.pos;let c,l;switch(s){case"DCT":case"DCTDecode":c=this.findDCTDecodeInlineStreamEnd(a);break;case"A85":case"ASCII85Decode":c=this.findASCII85DecodeInlineStreamEnd(a);break;case"AHx":case"ASCIIHexDecode":c=this.findASCIIHexDecodeInlineStreamEnd(a);break;default:c=this.findDefaultInlineStreamEnd(a)}if(c<1e3&&i>0){const e=a.pos;a.pos=t.beginInlineImagePos;l=function getInlineImageCacheKey(e)\ {const t=[],a=e.length;let r=0;for(;r=r){let r=!1;for(const e of i){const t=e.length;let i=0;for(;i=n){r=!0;break}if(i>=t){if(isWhit\ eSpace(s[c+o+i])){info(`Found "${bytesToString([...a,...e])}" when searching for endstream command.`);r=!0}break}}if(r){t.pos+=c;return t.pos-e}}c++}t.pos+=o}return-1}makeStream(e,t){const a=this.lexer;let r=a.stream;a.skipToNextLine();const i=r.pos-1;let n=e.get("Length");if(!Number.isInteger(n)){info(`Bad length "${n&&n.toString()}" in stream.`);n=0}r.pos=i+n;a.nextChar();if(this.tryShift()&&isCmd(this.buf2,"endstream"))this.shift();else{n=this.#q(i);if(n<0)throw new FormatError("Missing endst\ ream command.");a.nextChar();this.shift();this.shift()}this.shift();r=r.makeSubStream(i,n,e);t&&(r=t.createStream(r,n));r=this.filter(r,e,n);r.dict=e;return r}filter(e,t,a){let r=t.get("F","Filter"),i=t.get("DP","DecodeParms");if(r instanceof Name){Array.isArray(i)&&warn("/DecodeParms should not be an Array, when /Filter is a Name.");return this.makeFilter(e,r.name,a,i)}let n=a;if(Array.isArray(r)){const t=r,a=i;for(let s=0,o=t.length;s=48&&e<=57?15&e:e>=65&&e<=70||e>=97&&e<=102?9+(15&e):-1}class Lexer{constructor(e,t=null){this.stream=e;this.nextChar();this.strBuf=[];this.knownCommands=t;this._hexStringNumWarn=0;this.beginInlineImagePos=-1}nextChar(){return this.currentChar=this.stream.getByte()}peekChar(){return this.stream.peekByte()}getNumber(){let e=this.currentChar,t=!1,a=0,r=\ 1;if(45===e){r=-1;e=this.nextChar();45===e&&(e=this.nextChar())}else 43===e&&(e=this.nextChar());if(10===e||13===e)do{e=this.nextChar()}while(10===e||13===e);if(46===e){a=10;e=this.nextChar()}if(e<48||e>57){const t=`Invalid number: ${String.fromCharCode(e)} (charCode ${e})`;if(isWhiteSpace(e)||40===e||60===e||-1===e){info(`Lexer.getNumber - "${t}".`);return 0}throw new FormatError(t)}let i=e-48,n=0,s=1;for(;(e=this.nextChar())>=0;)if(e>=48&&e<=57){const r=e-48;if(t)n=10*n+r;else{0!==a&&(a*=10);i\ =10*i+r}}else if(46===e){if(0!==a)break;a=1}else if(45===e)warn("Badly formatted number: minus sign in the middle");else{if(69!==e&&101!==e)break;e=this.peekChar();if(43===e||45===e){s=45===e?-1:1;this.nextChar()}else if(e<48||e>57)break;t=!0}0!==a&&(i/=a);t&&(i*=10**(s*n));return r*i}getString(){let e=1,t=!1;const a=this.strBuf;a.length=0;let r=this.nextChar();for(;;){let i=!1;switch(0|r){case-1:warn("Unterminated string");t=!0;break;case 40:++e;a.push("(");break;case 41:if(0==--e){this.nextCha\ r();t=!0}else a.push(")");break;case 92:r=this.nextChar();switch(r){case-1:warn("Unterminated string");t=!0;break;case 110:a.push("\\n");break;case 114:a.push("\\r");break;case 116:a.push("\\t");break;case 98:a.push("\\b");break;case 102:a.push("\\f");break;case 92:case 40:case 41:a.push(String.fromCharCode(r));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:let e=15&r;r=this.nextChar();i=!0;if(r>=48&&r<=55){e=(e<<3)+(15&r);r=this.nextChar();if(r>=48&&r<=55){i=!1;e=(e<<3)+(15&r)\ }}a.push(String.fromCharCode(e));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:a.push(String.fromCharCode(r))}break;default:a.push(String.fromCharCode(r))}if(t)break;i||(r=this.nextChar())}return a.join("")}getName(){let e,t;const a=this.strBuf;a.length=0;for(;(e=this.nextChar())>=0&&!mr[e];)if(35===e){e=this.nextChar();if(mr[e]){warn("Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number.");a.push("#");break}const r=toHexDigit(e);if(-1!==r){\ t=e;e=this.nextChar();const i=toHexDigit(e);if(-1===i){warn(`Lexer_getName: Illegal digit (${String.fromCharCode(e)}) in hexadecimal number.`);a.push("#",String.fromCharCode(t));if(mr[e])break;a.push(String.fromCharCode(e));continue}a.push(String.fromCharCode(r<<4|i))}else a.push("#",String.fromCharCode(e))}else a.push(String.fromCharCode(e));a.length>127&&warn(`Name token is longer than allowed by the spec: ${a.length}`);return Name.get(a.join(""))}_hexStringWarn(e){5!=this._hexStringNumWarn++?\ this._hexStringNumWarn>5||warn(`getHexString - ignoring invalid character: ${e}`):warn("getHexString - ignoring additional invalid characters.")}getHexString(){const e=this.strBuf;e.length=0;let t=this.currentChar,a=-1,r=-1;this._hexStringNumWarn=0;for(;;){if(t<0){warn("Unterminated hex string");break}if(62===t){this.nextChar();break}if(1!==mr[t]){r=toHexDigit(t);if(-1===r)this._hexStringWarn(t);else if(-1===a)a=r;else{e.push(String.fromCharCode(a<<4|r));a=-1}t=this.nextChar()}else t=this.nextCh\ ar()}-1!==a&&e.push(String.fromCharCode(a<<4));return e.join("")}getObj(){let e=!1,t=this.currentChar;for(;;){if(t<0)return wa;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(1!==mr[t])break;t=this.nextChar()}switch(0|t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:this.nextChar();return Cmd.get("[");case 93:this.nextChar();return Cmd.ge\ t("]");case 60:t=this.nextChar();if(60===t){this.nextChar();return Cmd.get("<<")}return this.getHexString();case 62:t=this.nextChar();if(62===t){this.nextChar();return Cmd.get(">>")}return Cmd.get(">");case 123:this.nextChar();return Cmd.get("{");case 125:this.nextChar();return Cmd.get("}");case 41:this.nextChar();throw new FormatError(`Illegal character: ${t}`)}let a=String.fromCharCode(t);if(t<32||t>127){const e=this.peekChar();if(e>=32&&e<=127){this.nextChar();return Cmd.get(a)}}const r=this.\ knownCommands;let i=void 0!==r?.[a];for(;(t=this.nextChar())>=0&&!mr[t];){const e=a+String.fromCharCode(t);if(i&&void 0===r[e])break;if(128===a.length)throw new FormatError(`Command token too long: ${a.length}`);a=e;i=void 0!==r?.[a]}if("true"===a)return!0;if("false"===a)return!1;if("null"===a)return null;"BI"===a&&(this.beginInlineImagePos=this.stream.pos);return Cmd.get(a)}skipToNextLine(){let e=this.currentChar;for(;e>=0;){if(13===e){e=this.nextChar();10===e&&this.nextChar();break}if(10===e){\ this.nextChar();break}e=this.nextChar()}}}class Linearization{static create(e){function getInt(e,t,a=!1){const r=e.get(t);if(Number.isInteger(r)&&(a?r>=0:r>0))return r;throw new Error(`The "${t}" parameter in the linearization dictionary is invalid.`)}const t=new Parser({lexer:new Lexer(e),xref:null}),a=t.getObj(),r=t.getObj(),i=t.getObj(),n=t.getObj();let s,o;if(!(Number.isInteger(a)&&Number.isInteger(r)&&isCmd(i,"obj")&&n instanceof Dict&&"number"==typeof(s=n.get("Linearized"))&&s>0))return nu\ ll;if((o=getInt(n,"L"))!==e.length)throw new Error(\'The "L" parameter in the linearization dictionary does not equal the stream length.\');return{length:o,hints:function getHints(e){const t=e.get("H");let a;if(Array.isArray(t)&&(2===(a=t.length)||4===a)){for(let e=0;e0))throw new Error(`Hint (${e}) in the linearization dictionary is invalid.`)}return t}throw new Error("Hint array in the linearization dictionary is invalid.")}(n),objectNumberFirst:g\ etInt(n,"O"),endFirst:getInt(n,"E"),numPages:getInt(n,"N"),mainXRefEntriesOffset:getInt(n,"T"),pageFirst:n.has("P")?getInt(n,"P",!0):0}}}const br=["Adobe-GB1-UCS2","Adobe-CNS1-UCS2","Adobe-Japan1-UCS2","Adobe-Korea1-UCS2","78-EUC-H","78-EUC-V","78-H","78-RKSJ-H","78-RKSJ-V","78-V","78ms-RKSJ-H","78ms-RKSJ-V","83pv-RKSJ-H","90ms-RKSJ-H","90ms-RKSJ-V","90msp-RKSJ-H","90msp-RKSJ-V","90pv-RKSJ-H","90pv-RKSJ-V","Add-H","Add-RKSJ-H","Add-RKSJ-V","Add-V","Adobe-CNS1-0","Adobe-CNS1-1","Adobe-CNS1-2","Ad\ obe-CNS1-3","Adobe-CNS1-4","Adobe-CNS1-5","Adobe-CNS1-6","Adobe-GB1-0","Adobe-GB1-1","Adobe-GB1-2","Adobe-GB1-3","Adobe-GB1-4","Adobe-GB1-5","Adobe-Japan1-0","Adobe-Japan1-1","Adobe-Japan1-2","Adobe-Japan1-3","Adobe-Japan1-4","Adobe-Japan1-5","Adobe-Japan1-6","Adobe-Korea1-0","Adobe-Korea1-1","Adobe-Korea1-2","B5-H","B5-V","B5pc-H","B5pc-V","CNS-EUC-H","CNS-EUC-V","CNS1-H","CNS1-V","CNS2-H","CNS2-V","ETHK-B5-H","ETHK-B5-V","ETen-B5-H","ETen-B5-V","ETenms-B5-H","ETenms-B5-V","EUC-H","EUC-V","Ext-\ H","Ext-RKSJ-H","Ext-RKSJ-V","Ext-V","GB-EUC-H","GB-EUC-V","GB-H","GB-V","GBK-EUC-H","GBK-EUC-V","GBK2K-H","GBK2K-V","GBKp-EUC-H","GBKp-EUC-V","GBT-EUC-H","GBT-EUC-V","GBT-H","GBT-V","GBTpc-EUC-H","GBTpc-EUC-V","GBpc-EUC-H","GBpc-EUC-V","H","HKdla-B5-H","HKdla-B5-V","HKdlb-B5-H","HKdlb-B5-V","HKgccs-B5-H","HKgccs-B5-V","HKm314-B5-H","HKm314-B5-V","HKm471-B5-H","HKm471-B5-V","HKscs-B5-H","HKscs-B5-V","Hankaku","Hiragana","KSC-EUC-H","KSC-EUC-V","KSC-H","KSC-Johab-H","KSC-Johab-V","KSC-V","KSCms-U\ HC-H","KSCms-UHC-HW-H","KSCms-UHC-HW-V","KSCms-UHC-V","KSCpc-EUC-H","KSCpc-EUC-V","Katakana","NWP-H","NWP-V","RKSJ-H","RKSJ-V","Roman","UniCNS-UCS2-H","UniCNS-UCS2-V","UniCNS-UTF16-H","UniCNS-UTF16-V","UniCNS-UTF32-H","UniCNS-UTF32-V","UniCNS-UTF8-H","UniCNS-UTF8-V","UniGB-UCS2-H","UniGB-UCS2-V","UniGB-UTF16-H","UniGB-UTF16-V","UniGB-UTF32-H","UniGB-UTF32-V","UniGB-UTF8-H","UniGB-UTF8-V","UniJIS-UCS2-H","UniJIS-UCS2-HW-H","UniJIS-UCS2-HW-V","UniJIS-UCS2-V","UniJIS-UTF16-H","UniJIS-UTF16-V","UniJ\ IS-UTF32-H","UniJIS-UTF32-V","UniJIS-UTF8-H","UniJIS-UTF8-V","UniJIS2004-UTF16-H","UniJIS2004-UTF16-V","UniJIS2004-UTF32-H","UniJIS2004-UTF32-V","UniJIS2004-UTF8-H","UniJIS2004-UTF8-V","UniJISPro-UCS2-HW-V","UniJISPro-UCS2-V","UniJISPro-UTF8-V","UniJISX0213-UTF32-H","UniJISX0213-UTF32-V","UniJISX02132004-UTF32-H","UniJISX02132004-UTF32-V","UniKS-UCS2-H","UniKS-UCS2-V","UniKS-UTF16-H","UniKS-UTF16-V","UniKS-UTF32-H","UniKS-UTF32-V","UniKS-UTF8-H","UniKS-UTF8-V","V","WP-Symbol"],yr=2**24-1;class C\ Map{constructor(e=!1){this.codespaceRanges=[[],[],[],[]];this.numCodespaceRanges=0;this._map=[];this.name="";this.vertical=!1;this.useCMap=null;this.builtInCMap=e}addCodespaceRange(e,t,a){this.codespaceRanges[e-1].push(t,a);this.numCodespaceRanges++}mapCidRange(e,t,a){if(t-e>yr)throw new Error("mapCidRange - ignoring data above MAX_MAP_RANGE.");for(;e<=t;)this._map[e++]=a++}mapBfRange(e,t,a){if(t-e>yr)throw new Error("mapBfRange - ignoring data above MAX_MAP_RANGE.");const r=a.length-1;for(;e<=t\ ;){this._map[e++]=a;const t=a.charCodeAt(r)+1;t>255?a=a.substring(0,r-1)+String.fromCharCode(a.charCodeAt(r-1)+1)+"\\0":a=a.substring(0,r)+String.fromCharCode(t)}}mapBfRangeToArray(e,t,a){if(t-e>yr)throw new Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.");const r=a.length;let i=0;for(;e<=t&&i>>0;const s=i[n];for(let e=0,t=s.length;e=t&&r<=i){a.charcode=r;a.length=n+1;return}}}a.charcode=0;a.length=1}getCharCodeLength(e){const t=\ this.codespaceRanges;for(let a=0,r=t.length;a=i&&e<=n)return a+1}}return 1}get length(){return this._map.length}get isIdentityCMap(){if("Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(let e=0;e<65536;e++)if(this._map[e]!==e)return!1;return!0}}class IdentityCMap extends CMap{constructor(e,t){super();this.vertical=e;this.addCodespaceRange(t,0,65535)}mapCidRange(e,t,a)\ {unreachable("should not call mapCidRange")}mapBfRange(e,t,a){unreachable("should not call mapBfRange")}mapBfRangeToArray(e,t,a){unreachable("should not call mapBfRangeToArray")}mapOne(e,t){unreachable("should not call mapCidOne")}lookup(e){return Number.isInteger(e)&&e<=65535?e:void 0}contains(e){return Number.isInteger(e)&&e<=65535}forEach(e){for(let t=0;t<=65535;t++)e(t,t)}charCodeOf(e){return Number.isInteger(e)&&e<=65535?e:-1}getMap(){const e=new Array(65536);for(let t=0;t<=65535;t++)e[t]=t\ ;return e}get length(){return 65536}get isIdentityCMap(){unreachable("should not access .isIdentityCMap")}}function strToInt(e){let t=0;for(let a=0;a>>0}function expectString(e){if("string"!=typeof e)throw new FormatError("Malformed CMap: expected string.")}function expectInt(e){if(!Number.isInteger(e))throw new FormatError("Malformed CMap: expected int.")}function parseBfChar(e,t){for(;;){let a=t.getObj();if(a===wa)break;if(isCmd(a,"endbfchar"))retu\ rn;expectString(a);const r=strToInt(a);a=t.getObj();expectString(a);const i=a;e.mapOne(r,i)}}function parseBfRange(e,t){for(;;){let a=t.getObj();if(a===wa)break;if(isCmd(a,"endbfrange"))return;expectString(a);const r=strToInt(a);a=t.getObj();expectString(a);const i=strToInt(a);a=t.getObj();if(Number.isInteger(a)||"string"==typeof a){const t=Number.isInteger(a)?String.fromCharCode(a):a;e.mapBfRange(r,i,t)}else{if(!isCmd(a,"["))break;{a=t.getObj();const n=[];for(;!isCmd(a,"]")&&a!==wa;){n.push(a);\ a=t.getObj()}e.mapBfRangeToArray(r,i,n)}}}throw new FormatError("Invalid bf range.")}function parseCidChar(e,t){for(;;){let a=t.getObj();if(a===wa)break;if(isCmd(a,"endcidchar"))return;expectString(a);const r=strToInt(a);a=t.getObj();expectInt(a);const i=a;e.mapOne(r,i)}}function parseCidRange(e,t){for(;;){let a=t.getObj();if(a===wa)break;if(isCmd(a,"endcidrange"))return;expectString(a);const r=strToInt(a);a=t.getObj();expectString(a);const i=strToInt(a);a=t.getObj();expectInt(a);const n=a;e.map\ CidRange(r,i,n)}}function parseCodespaceRange(e,t){for(;;){let a=t.getObj();if(a===wa)break;if(isCmd(a,"endcodespacerange"))return;if("string"!=typeof a)break;const r=strToInt(a);a=t.getObj();if("string"!=typeof a)break;const i=strToInt(a);e.addCodespaceRange(a.length,r,i)}throw new FormatError("Invalid codespace range.")}function parseWMode(e,t){const a=t.getObj();Number.isInteger(a)&&(e.vertical=!!a)}function parseCMapName(e,t){const a=t.getObj();a instanceof Name&&(e.name=a.name)}async functi\ on parseCMap(e,t,a,r){let i,n;e:for(;;)try{const a=t.getObj();if(a===wa)break;if(a instanceof Name){"WMode"===a.name?parseWMode(e,t):"CMapName"===a.name&&parseCMapName(e,t);i=a}else if(a instanceof Cmd)switch(a.cmd){case"endcmap":break e;case"usecmap":i instanceof Name&&(n=i.name);break;case"begincodespacerange":parseCodespaceRange(e,t);break;case"beginbfchar":parseBfChar(e,t);break;case"begincidchar":parseCidChar(e,t);break;case"beginbfrange":parseBfRange(e,t);break;case"begincidrange":parseCid\ Range(e,t)}}catch(e){if(e instanceof MissingDataException)throw e;warn("Invalid cMap data: "+e);continue}!r&&n&&(r=n);return r?extendCMap(e,a,r):e}async function extendCMap(e,t,a){e.useCMap=await createBuiltInCMap(a,t);if(0===e.numCodespaceRanges){const t=e.useCMap.codespaceRanges;for(let a=0;aextendCMap(i,t,e)));const n=new Lexer(new Stream(a));return parseCMap(i,n,t,null)}class CMapFactory{static async create({encoding:e,fetchBuiltInCMap:t,useCMap\ :a}){if(e instanceof Name)return createBuiltInCMap(e.name,t);if(e instanceof BaseStream){const r=await parseCMap(new CMap,new Lexer(e),t,a);return r.isIdentityCMap?createBuiltInCMap(r.name,t):r}throw new Error("Encoding required.")}}const wr=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenle\ ader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl\ ","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamd\ ownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","seven\ superior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall"\ ,"Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],xr=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","centoldstyle","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","\ twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","","threequartersemdash","","questionsmall","","","","","Ethsmall","","","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","","","","","ff","fi","fl","ffi","ffl","parenleftinferior","","\ parenrightinferior","Circumflexsmall","hypheninferior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","asuperior","centsuperior","","","","","Aacutesmall","Agravesmall","Acircumflexsmall","Adieresissmall","Atildesmall","Aringsmall","Ccedillasma\ ll","Eacutesmall","Egravesmall","Ecircumflexsmall","Edieresissmall","Iacutesmall","Igravesmall","Icircumflexsmall","Idieresissmall","Ntildesmall","Oacutesmall","Ogravesmall","Ocircumflexsmall","Odieresissmall","Otildesmall","Uacutesmall","Ugravesmall","Ucircumflexsmall","Udieresissmall","","eightsuperior","fourinferior","threeinferior","sixinferior","eightinferior","seveninferior","Scaronsmall","","centinferior","twoinferior","","Dieresissmall","","Caronsmall","osuperior","fiveinferior","","comm\ ainferior","periodinferior","Yacutesmall","","dollarinferior","","","Thornsmall","","nineinferior","zeroinferior","Zcaronsmall","AEsmall","Oslashsmall","questiondownsmall","oneinferior","Lslashsmall","","","","","","","Cedillasmall","","","","","","OEsmall","figuredash","hyphensuperior","","","","","exclamdownsmall","","Ydieresissmall","","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","ninesuperior","zerosuperior","","esuperior","rsuperior\ ","tsuperior","","","isuperior","ssuperior","dsuperior","","","","","","lsuperior","Ogoneksmall","Brevesmall","Macronsmall","bsuperior","nsuperior","msuperior","commasuperior","periodsuperior","Dotaccentsmall","Ringsmall","","","",""],Sr=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","z\ ero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","Adieresis","Aring","Ccedilla","Eacute",\ "Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","grea\ terequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","space","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcent\ ered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron"],Ar=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","am\ persand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v\ ","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","qu\ estiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls","","","",""],kr=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","\ numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n"\ ,"o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","bullet","Euro","bullet","quotesinglbase","florin","quotedblbase","ellipsis","dagger","daggerdbl","circumflex","perthousand","Scaron","guilsinglleft","OE","bullet","Zcaron","bullet","bullet","quoteleft","quoteright","quotedblleft","quotedblright","bullet","endash","emdash","tilde","trademark","scaron","guilsinglright","oe","bullet","zcaron","Ydieresis","space","exclamdown","cent","sterling","currency","y\ en","brokenbar","section","dieresis","copyright","ordfeminine","guillemotleft","logicalnot","hyphen","registered","macron","degree","plusminus","twosuperior","threesuperior","acute","mu","paragraph","periodcentered","cedilla","onesuperior","ordmasculine","guillemotright","onequarter","onehalf","threequarters","questiondown","Agrave","Aacute","Acircumflex","Atilde","Adieresis","Aring","AE","Ccedilla","Egrave","Eacute","Ecircumflex","Edieresis","Igrave","Iacute","Icircumflex","Idieresis","Eth","Nt\ ilde","Ograve","Oacute","Ocircumflex","Otilde","Odieresis","multiply","Oslash","Ugrave","Uacute","Ucircumflex","Udieresis","Yacute","Thorn","germandbls","agrave","aacute","acircumflex","atilde","adieresis","aring","ae","ccedilla","egrave","eacute","ecircumflex","edieresis","igrave","iacute","icircumflex","idieresis","eth","ntilde","ograve","oacute","ocircumflex","otilde","odieresis","divide","oslash","ugrave","uacute","ucircumflex","udieresis","yacute","thorn","ydieresis"],Cr=["","","","","","",\ "","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","universal","numbersign","existential","percent","ampersand","suchthat","parenleft","parenright","asteriskmath","plus","comma","minus","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","congruent","Alpha","Beta","Chi","Delta","Epsilon","Phi","Gamma","Eta","Iota","theta1","Kappa","Lambda","Mu","Nu","Omicron","Pi\ ","Theta","Rho","Sigma","Tau","Upsilon","sigma1","Omega","Xi","Psi","Zeta","bracketleft","therefore","bracketright","perpendicular","underscore","radicalex","alpha","beta","chi","delta","epsilon","phi","gamma","eta","iota","phi1","kappa","lambda","mu","nu","omicron","pi","theta","rho","sigma","tau","upsilon","omega1","omega","xi","psi","zeta","braceleft","bar","braceright","similar","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Euro","Upsilon\ 1","minute","lessequal","fraction","infinity","florin","club","diamond","heart","spade","arrowboth","arrowleft","arrowup","arrowright","arrowdown","degree","plusminus","second","greaterequal","multiply","proportional","partialdiff","bullet","divide","notequal","equivalence","approxequal","ellipsis","arrowvertex","arrowhorizex","carriagereturn","aleph","Ifraktur","Rfraktur","weierstrass","circlemultiply","circleplus","emptyset","intersection","union","propersuperset","reflexsuperset","notsubset",\ "propersubset","reflexsubset","element","notelement","angle","gradient","registerserif","copyrightserif","trademarkserif","product","radical","dotmath","logicalnot","logicaland","logicalor","arrowdblboth","arrowdblleft","arrowdblup","arrowdblright","arrowdbldown","lozenge","angleleft","registersans","copyrightsans","trademarksans","summation","parenlefttp","parenleftex","parenleftbt","bracketlefttp","bracketleftex","bracketleftbt","bracelefttp","braceleftmid","braceleftbt","braceex","","anglerig\ ht","integral","integraltp","integralex","integralbt","parenrighttp","parenrightex","parenrightbt","bracketrighttp","bracketrightex","bracketrightbt","bracerighttp","bracerightmid","bracerightbt",""],vr=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","a1","a2","a202","a3","a4","a5","a119","a118","a117","a11","a12","a13","a14","a15","a16","a105","a17","a18","a19","a20","a21","a22","a23","a24","a25","a26","a27","a28","a6","a7","a8","a9","a10\ ","a29","a30","a31","a32","a33","a34","a35","a36","a37","a38","a39","a40","a41","a42","a43","a44","a45","a46","a47","a48","a49","a50","a51","a52","a53","a54","a55","a56","a57","a58","a59","a60","a61","a62","a63","a64","a65","a66","a67","a68","a69","a70","a71","a72","a73","a74","a203","a75","a204","a76","a77","a78","a79","a81","a82","a83","a84","a97","a98","a99","a100","","a89","a90","a93","a94","a91","a92","a205","a85","a206","a86","a87","a88","a95","a96","","","","","","","","","","","","","","\ ","","","","","","a101","a102","a103","a104","a106","a107","a108","a112","a111","a110","a109","a120","a121","a122","a123","a124","a125","a126","a127","a128","a129","a130","a131","a132","a133","a134","a135","a136","a137","a138","a139","a140","a141","a142","a143","a144","a145","a146","a147","a148","a149","a150","a151","a152","a153","a154","a155","a156","a157","a158","a159","a160","a161","a163","a164","a196","a165","a192","a166","a167","a168","a169","a170","a171","a172","a173","a162","a174","a175",\ "a176","a177","a178","a179","a193","a180","a199","a181","a200","a182","","a201","a183","a184","a197","a185","a194","a198","a186","a195","a187","a188","a189","a190","a191",""];function getEncoding(e){switch(e){case"WinAnsiEncoding":return kr;case"StandardEncoding":return Ar;case"MacRomanEncoding":return Sr;case"SymbolSetEncoding":return Cr;case"ZapfDingbatsEncoding":return vr;case"ExpertEncoding":return wr;case"MacExpertEncoding":return xr;default:return null}}const Fr=getLookupTableFactory((func\ tion(e){e.A=65;e.AE=198;e.AEacute=508;e.AEmacron=482;e.AEsmall=63462;e.Aacute=193;e.Aacutesmall=63457;e.Abreve=258;e.Abreveacute=7854;e.Abrevecyrillic=1232;e.Abrevedotbelow=7862;e.Abrevegrave=7856;e.Abrevehookabove=7858;e.Abrevetilde=7860;e.Acaron=461;e.Acircle=9398;e.Acircumflex=194;e.Acircumflexacute=7844;e.Acircumflexdotbelow=7852;e.Acircumflexgrave=7846;e.Acircumflexhookabove=7848;e.Acircumflexsmall=63458;e.Acircumflextilde=7850;e.Acute=63177;e.Acutesmall=63412;e.Acyrillic=1040;e.Adblgrave=5\ 12;e.Adieresis=196;e.Adieresiscyrillic=1234;e.Adieresismacron=478;e.Adieresissmall=63460;e.Adotbelow=7840;e.Adotmacron=480;e.Agrave=192;e.Agravesmall=63456;e.Ahookabove=7842;e.Aiecyrillic=1236;e.Ainvertedbreve=514;e.Alpha=913;e.Alphatonos=902;e.Amacron=256;e.Amonospace=65313;e.Aogonek=260;e.Aring=197;e.Aringacute=506;e.Aringbelow=7680;e.Aringsmall=63461;e.Asmall=63329;e.Atilde=195;e.Atildesmall=63459;e.Aybarmenian=1329;e.B=66;e.Bcircle=9399;e.Bdotaccent=7682;e.Bdotbelow=7684;e.Becyrillic=1041;e.\ Benarmenian=1330;e.Beta=914;e.Bhook=385;e.Blinebelow=7686;e.Bmonospace=65314;e.Brevesmall=63220;e.Bsmall=63330;e.Btopbar=386;e.C=67;e.Caarmenian=1342;e.Cacute=262;e.Caron=63178;e.Caronsmall=63221;e.Ccaron=268;e.Ccedilla=199;e.Ccedillaacute=7688;e.Ccedillasmall=63463;e.Ccircle=9400;e.Ccircumflex=264;e.Cdot=266;e.Cdotaccent=266;e.Cedillasmall=63416;e.Chaarmenian=1353;e.Cheabkhasiancyrillic=1212;e.Checyrillic=1063;e.Chedescenderabkhasiancyrillic=1214;e.Chedescendercyrillic=1206;e.Chedieresiscyrilli\ c=1268;e.Cheharmenian=1347;e.Chekhakassiancyrillic=1227;e.Cheverticalstrokecyrillic=1208;e.Chi=935;e.Chook=391;e.Circumflexsmall=63222;e.Cmonospace=65315;e.Coarmenian=1361;e.Csmall=63331;e.D=68;e.DZ=497;e.DZcaron=452;e.Daarmenian=1332;e.Dafrican=393;e.Dcaron=270;e.Dcedilla=7696;e.Dcircle=9401;e.Dcircumflexbelow=7698;e.Dcroat=272;e.Ddotaccent=7690;e.Ddotbelow=7692;e.Decyrillic=1044;e.Deicoptic=1006;e.Delta=8710;e.Deltagreek=916;e.Dhook=394;e.Dieresis=63179;e.DieresisAcute=63180;e.DieresisGrave=63\ 181;e.Dieresissmall=63400;e.Digammagreek=988;e.Djecyrillic=1026;e.Dlinebelow=7694;e.Dmonospace=65316;e.Dotaccentsmall=63223;e.Dslash=272;e.Dsmall=63332;e.Dtopbar=395;e.Dz=498;e.Dzcaron=453;e.Dzeabkhasiancyrillic=1248;e.Dzecyrillic=1029;e.Dzhecyrillic=1039;e.E=69;e.Eacute=201;e.Eacutesmall=63465;e.Ebreve=276;e.Ecaron=282;e.Ecedillabreve=7708;e.Echarmenian=1333;e.Ecircle=9402;e.Ecircumflex=202;e.Ecircumflexacute=7870;e.Ecircumflexbelow=7704;e.Ecircumflexdotbelow=7878;e.Ecircumflexgrave=7872;e.Ecir\ cumflexhookabove=7874;e.Ecircumflexsmall=63466;e.Ecircumflextilde=7876;e.Ecyrillic=1028;e.Edblgrave=516;e.Edieresis=203;e.Edieresissmall=63467;e.Edot=278;e.Edotaccent=278;e.Edotbelow=7864;e.Efcyrillic=1060;e.Egrave=200;e.Egravesmall=63464;e.Eharmenian=1335;e.Ehookabove=7866;e.Eightroman=8551;e.Einvertedbreve=518;e.Eiotifiedcyrillic=1124;e.Elcyrillic=1051;e.Elevenroman=8554;e.Emacron=274;e.Emacronacute=7702;e.Emacrongrave=7700;e.Emcyrillic=1052;e.Emonospace=65317;e.Encyrillic=1053;e.Endescendercy\ rillic=1186;e.Eng=330;e.Enghecyrillic=1188;e.Enhookcyrillic=1223;e.Eogonek=280;e.Eopen=400;e.Epsilon=917;e.Epsilontonos=904;e.Ercyrillic=1056;e.Ereversed=398;e.Ereversedcyrillic=1069;e.Escyrillic=1057;e.Esdescendercyrillic=1194;e.Esh=425;e.Esmall=63333;e.Eta=919;e.Etarmenian=1336;e.Etatonos=905;e.Eth=208;e.Ethsmall=63472;e.Etilde=7868;e.Etildebelow=7706;e.Euro=8364;e.Ezh=439;e.Ezhcaron=494;e.Ezhreversed=440;e.F=70;e.Fcircle=9403;e.Fdotaccent=7710;e.Feharmenian=1366;e.Feicoptic=996;e.Fhook=401;e.\ Fitacyrillic=1138;e.Fiveroman=8548;e.Fmonospace=65318;e.Fourroman=8547;e.Fsmall=63334;e.G=71;e.GBsquare=13191;e.Gacute=500;e.Gamma=915;e.Gammaafrican=404;e.Gangiacoptic=1002;e.Gbreve=286;e.Gcaron=486;e.Gcedilla=290;e.Gcircle=9404;e.Gcircumflex=284;e.Gcommaaccent=290;e.Gdot=288;e.Gdotaccent=288;e.Gecyrillic=1043;e.Ghadarmenian=1346;e.Ghemiddlehookcyrillic=1172;e.Ghestrokecyrillic=1170;e.Gheupturncyrillic=1168;e.Ghook=403;e.Gimarmenian=1331;e.Gjecyrillic=1027;e.Gmacron=7712;e.Gmonospace=65319;e.Gr\ ave=63182;e.Gravesmall=63328;e.Gsmall=63335;e.Gsmallhook=667;e.Gstroke=484;e.H=72;e.H18533=9679;e.H18543=9642;e.H18551=9643;e.H22073=9633;e.HPsquare=13259;e.Haabkhasiancyrillic=1192;e.Hadescendercyrillic=1202;e.Hardsigncyrillic=1066;e.Hbar=294;e.Hbrevebelow=7722;e.Hcedilla=7720;e.Hcircle=9405;e.Hcircumflex=292;e.Hdieresis=7718;e.Hdotaccent=7714;e.Hdotbelow=7716;e.Hmonospace=65320;e.Hoarmenian=1344;e.Horicoptic=1e3;e.Hsmall=63336;e.Hungarumlaut=63183;e.Hungarumlautsmall=63224;e.Hzsquare=13200;e.I\ =73;e.IAcyrillic=1071;e.IJ=306;e.IUcyrillic=1070;e.Iacute=205;e.Iacutesmall=63469;e.Ibreve=300;e.Icaron=463;e.Icircle=9406;e.Icircumflex=206;e.Icircumflexsmall=63470;e.Icyrillic=1030;e.Idblgrave=520;e.Idieresis=207;e.Idieresisacute=7726;e.Idieresiscyrillic=1252;e.Idieresissmall=63471;e.Idot=304;e.Idotaccent=304;e.Idotbelow=7882;e.Iebrevecyrillic=1238;e.Iecyrillic=1045;e.Ifraktur=8465;e.Igrave=204;e.Igravesmall=63468;e.Ihookabove=7880;e.Iicyrillic=1048;e.Iinvertedbreve=522;e.Iishortcyrillic=1049;\ e.Imacron=298;e.Imacroncyrillic=1250;e.Imonospace=65321;e.Iniarmenian=1339;e.Iocyrillic=1025;e.Iogonek=302;e.Iota=921;e.Iotaafrican=406;e.Iotadieresis=938;e.Iotatonos=906;e.Ismall=63337;e.Istroke=407;e.Itilde=296;e.Itildebelow=7724;e.Izhitsacyrillic=1140;e.Izhitsadblgravecyrillic=1142;e.J=74;e.Jaarmenian=1345;e.Jcircle=9407;e.Jcircumflex=308;e.Jecyrillic=1032;e.Jheharmenian=1355;e.Jmonospace=65322;e.Jsmall=63338;e.K=75;e.KBsquare=13189;e.KKsquare=13261;e.Kabashkircyrillic=1184;e.Kacute=7728;e.Ka\ cyrillic=1050;e.Kadescendercyrillic=1178;e.Kahookcyrillic=1219;e.Kappa=922;e.Kastrokecyrillic=1182;e.Kaverticalstrokecyrillic=1180;e.Kcaron=488;e.Kcedilla=310;e.Kcircle=9408;e.Kcommaaccent=310;e.Kdotbelow=7730;e.Keharmenian=1364;e.Kenarmenian=1343;e.Khacyrillic=1061;e.Kheicoptic=998;e.Khook=408;e.Kjecyrillic=1036;e.Klinebelow=7732;e.Kmonospace=65323;e.Koppacyrillic=1152;e.Koppagreek=990;e.Ksicyrillic=1134;e.Ksmall=63339;e.L=76;e.LJ=455;e.LL=63167;e.Lacute=313;e.Lambda=923;e.Lcaron=317;e.Lcedilla\ =315;e.Lcircle=9409;e.Lcircumflexbelow=7740;e.Lcommaaccent=315;e.Ldot=319;e.Ldotaccent=319;e.Ldotbelow=7734;e.Ldotbelowmacron=7736;e.Liwnarmenian=1340;e.Lj=456;e.Ljecyrillic=1033;e.Llinebelow=7738;e.Lmonospace=65324;e.Lslash=321;e.Lslashsmall=63225;e.Lsmall=63340;e.M=77;e.MBsquare=13190;e.Macron=63184;e.Macronsmall=63407;e.Macute=7742;e.Mcircle=9410;e.Mdotaccent=7744;e.Mdotbelow=7746;e.Menarmenian=1348;e.Mmonospace=65325;e.Msmall=63341;e.Mturned=412;e.Mu=924;e.N=78;e.NJ=458;e.Nacute=323;e.Ncaron\ =327;e.Ncedilla=325;e.Ncircle=9411;e.Ncircumflexbelow=7754;e.Ncommaaccent=325;e.Ndotaccent=7748;e.Ndotbelow=7750;e.Nhookleft=413;e.Nineroman=8552;e.Nj=459;e.Njecyrillic=1034;e.Nlinebelow=7752;e.Nmonospace=65326;e.Nowarmenian=1350;e.Nsmall=63342;e.Ntilde=209;e.Ntildesmall=63473;e.Nu=925;e.O=79;e.OE=338;e.OEsmall=63226;e.Oacute=211;e.Oacutesmall=63475;e.Obarredcyrillic=1256;e.Obarreddieresiscyrillic=1258;e.Obreve=334;e.Ocaron=465;e.Ocenteredtilde=415;e.Ocircle=9412;e.Ocircumflex=212;e.Ocircumflexa\ cute=7888;e.Ocircumflexdotbelow=7896;e.Ocircumflexgrave=7890;e.Ocircumflexhookabove=7892;e.Ocircumflexsmall=63476;e.Ocircumflextilde=7894;e.Ocyrillic=1054;e.Odblacute=336;e.Odblgrave=524;e.Odieresis=214;e.Odieresiscyrillic=1254;e.Odieresissmall=63478;e.Odotbelow=7884;e.Ogoneksmall=63227;e.Ograve=210;e.Ogravesmall=63474;e.Oharmenian=1365;e.Ohm=8486;e.Ohookabove=7886;e.Ohorn=416;e.Ohornacute=7898;e.Ohorndotbelow=7906;e.Ohorngrave=7900;e.Ohornhookabove=7902;e.Ohorntilde=7904;e.Ohungarumlaut=336;e.O\ i=418;e.Oinvertedbreve=526;e.Omacron=332;e.Omacronacute=7762;e.Omacrongrave=7760;e.Omega=8486;e.Omegacyrillic=1120;e.Omegagreek=937;e.Omegaroundcyrillic=1146;e.Omegatitlocyrillic=1148;e.Omegatonos=911;e.Omicron=927;e.Omicrontonos=908;e.Omonospace=65327;e.Oneroman=8544;e.Oogonek=490;e.Oogonekmacron=492;e.Oopen=390;e.Oslash=216;e.Oslashacute=510;e.Oslashsmall=63480;e.Osmall=63343;e.Ostrokeacute=510;e.Otcyrillic=1150;e.Otilde=213;e.Otildeacute=7756;e.Otildedieresis=7758;e.Otildesmall=63477;e.P=80;e\ .Pacute=7764;e.Pcircle=9413;e.Pdotaccent=7766;e.Pecyrillic=1055;e.Peharmenian=1354;e.Pemiddlehookcyrillic=1190;e.Phi=934;e.Phook=420;e.Pi=928;e.Piwrarmenian=1363;e.Pmonospace=65328;e.Psi=936;e.Psicyrillic=1136;e.Psmall=63344;e.Q=81;e.Qcircle=9414;e.Qmonospace=65329;e.Qsmall=63345;e.R=82;e.Raarmenian=1356;e.Racute=340;e.Rcaron=344;e.Rcedilla=342;e.Rcircle=9415;e.Rcommaaccent=342;e.Rdblgrave=528;e.Rdotaccent=7768;e.Rdotbelow=7770;e.Rdotbelowmacron=7772;e.Reharmenian=1360;e.Rfraktur=8476;e.Rho=929;\ e.Ringsmall=63228;e.Rinvertedbreve=530;e.Rlinebelow=7774;e.Rmonospace=65330;e.Rsmall=63346;e.Rsmallinverted=641;e.Rsmallinvertedsuperior=694;e.S=83;e.SF010000=9484;e.SF020000=9492;e.SF030000=9488;e.SF040000=9496;e.SF050000=9532;e.SF060000=9516;e.SF070000=9524;e.SF080000=9500;e.SF090000=9508;e.SF100000=9472;e.SF110000=9474;e.SF190000=9569;e.SF200000=9570;e.SF210000=9558;e.SF220000=9557;e.SF230000=9571;e.SF240000=9553;e.SF250000=9559;e.SF260000=9565;e.SF270000=9564;e.SF280000=9563;e.SF360000=9566;\ e.SF370000=9567;e.SF380000=9562;e.SF390000=9556;e.SF400000=9577;e.SF410000=9574;e.SF420000=9568;e.SF430000=9552;e.SF440000=9580;e.SF450000=9575;e.SF460000=9576;e.SF470000=9572;e.SF480000=9573;e.SF490000=9561;e.SF500000=9560;e.SF510000=9554;e.SF520000=9555;e.SF530000=9579;e.SF540000=9578;e.Sacute=346;e.Sacutedotaccent=7780;e.Sampigreek=992;e.Scaron=352;e.Scarondotaccent=7782;e.Scaronsmall=63229;e.Scedilla=350;e.Schwa=399;e.Schwacyrillic=1240;e.Schwadieresiscyrillic=1242;e.Scircle=9416;e.Scircumfl\ ex=348;e.Scommaaccent=536;e.Sdotaccent=7776;e.Sdotbelow=7778;e.Sdotbelowdotaccent=7784;e.Seharmenian=1357;e.Sevenroman=8550;e.Shaarmenian=1351;e.Shacyrillic=1064;e.Shchacyrillic=1065;e.Sheicoptic=994;e.Shhacyrillic=1210;e.Shimacoptic=1004;e.Sigma=931;e.Sixroman=8549;e.Smonospace=65331;e.Softsigncyrillic=1068;e.Ssmall=63347;e.Stigmagreek=986;e.T=84;e.Tau=932;e.Tbar=358;e.Tcaron=356;e.Tcedilla=354;e.Tcircle=9417;e.Tcircumflexbelow=7792;e.Tcommaaccent=354;e.Tdotaccent=7786;e.Tdotbelow=7788;e.Tecyri\ llic=1058;e.Tedescendercyrillic=1196;e.Tenroman=8553;e.Tetsecyrillic=1204;e.Theta=920;e.Thook=428;e.Thorn=222;e.Thornsmall=63486;e.Threeroman=8546;e.Tildesmall=63230;e.Tiwnarmenian=1359;e.Tlinebelow=7790;e.Tmonospace=65332;e.Toarmenian=1337;e.Tonefive=444;e.Tonesix=388;e.Tonetwo=423;e.Tretroflexhook=430;e.Tsecyrillic=1062;e.Tshecyrillic=1035;e.Tsmall=63348;e.Twelveroman=8555;e.Tworoman=8545;e.U=85;e.Uacute=218;e.Uacutesmall=63482;e.Ubreve=364;e.Ucaron=467;e.Ucircle=9418;e.Ucircumflex=219;e.Ucirc\ umflexbelow=7798;e.Ucircumflexsmall=63483;e.Ucyrillic=1059;e.Udblacute=368;e.Udblgrave=532;e.Udieresis=220;e.Udieresisacute=471;e.Udieresisbelow=7794;e.Udieresiscaron=473;e.Udieresiscyrillic=1264;e.Udieresisgrave=475;e.Udieresismacron=469;e.Udieresissmall=63484;e.Udotbelow=7908;e.Ugrave=217;e.Ugravesmall=63481;e.Uhookabove=7910;e.Uhorn=431;e.Uhornacute=7912;e.Uhorndotbelow=7920;e.Uhorngrave=7914;e.Uhornhookabove=7916;e.Uhorntilde=7918;e.Uhungarumlaut=368;e.Uhungarumlautcyrillic=1266;e.Uinvertedb\ reve=534;e.Ukcyrillic=1144;e.Umacron=362;e.Umacroncyrillic=1262;e.Umacrondieresis=7802;e.Umonospace=65333;e.Uogonek=370;e.Upsilon=933;e.Upsilon1=978;e.Upsilonacutehooksymbolgreek=979;e.Upsilonafrican=433;e.Upsilondieresis=939;e.Upsilondieresishooksymbolgreek=980;e.Upsilonhooksymbol=978;e.Upsilontonos=910;e.Uring=366;e.Ushortcyrillic=1038;e.Usmall=63349;e.Ustraightcyrillic=1198;e.Ustraightstrokecyrillic=1200;e.Utilde=360;e.Utildeacute=7800;e.Utildebelow=7796;e.V=86;e.Vcircle=9419;e.Vdotbelow=7806\ ;e.Vecyrillic=1042;e.Vewarmenian=1358;e.Vhook=434;e.Vmonospace=65334;e.Voarmenian=1352;e.Vsmall=63350;e.Vtilde=7804;e.W=87;e.Wacute=7810;e.Wcircle=9420;e.Wcircumflex=372;e.Wdieresis=7812;e.Wdotaccent=7814;e.Wdotbelow=7816;e.Wgrave=7808;e.Wmonospace=65335;e.Wsmall=63351;e.X=88;e.Xcircle=9421;e.Xdieresis=7820;e.Xdotaccent=7818;e.Xeharmenian=1341;e.Xi=926;e.Xmonospace=65336;e.Xsmall=63352;e.Y=89;e.Yacute=221;e.Yacutesmall=63485;e.Yatcyrillic=1122;e.Ycircle=9422;e.Ycircumflex=374;e.Ydieresis=376;e.Y\ dieresissmall=63487;e.Ydotaccent=7822;e.Ydotbelow=7924;e.Yericyrillic=1067;e.Yerudieresiscyrillic=1272;e.Ygrave=7922;e.Yhook=435;e.Yhookabove=7926;e.Yiarmenian=1349;e.Yicyrillic=1031;e.Yiwnarmenian=1362;e.Ymonospace=65337;e.Ysmall=63353;e.Ytilde=7928;e.Yusbigcyrillic=1130;e.Yusbigiotifiedcyrillic=1132;e.Yuslittlecyrillic=1126;e.Yuslittleiotifiedcyrillic=1128;e.Z=90;e.Zaarmenian=1334;e.Zacute=377;e.Zcaron=381;e.Zcaronsmall=63231;e.Zcircle=9423;e.Zcircumflex=7824;e.Zdot=379;e.Zdotaccent=379;e.Zdot\ below=7826;e.Zecyrillic=1047;e.Zedescendercyrillic=1176;e.Zedieresiscyrillic=1246;e.Zeta=918;e.Zhearmenian=1338;e.Zhebrevecyrillic=1217;e.Zhecyrillic=1046;e.Zhedescendercyrillic=1174;e.Zhedieresiscyrillic=1244;e.Zlinebelow=7828;e.Zmonospace=65338;e.Zsmall=63354;e.Zstroke=437;e.a=97;e.aabengali=2438;e.aacute=225;e.aadeva=2310;e.aagujarati=2694;e.aagurmukhi=2566;e.aamatragurmukhi=2622;e.aarusquare=13059;e.aavowelsignbengali=2494;e.aavowelsigndeva=2366;e.aavowelsigngujarati=2750;e.abbreviationmarka\ rmenian=1375;e.abbreviationsigndeva=2416;e.abengali=2437;e.abopomofo=12570;e.abreve=259;e.abreveacute=7855;e.abrevecyrillic=1233;e.abrevedotbelow=7863;e.abrevegrave=7857;e.abrevehookabove=7859;e.abrevetilde=7861;e.acaron=462;e.acircle=9424;e.acircumflex=226;e.acircumflexacute=7845;e.acircumflexdotbelow=7853;e.acircumflexgrave=7847;e.acircumflexhookabove=7849;e.acircumflextilde=7851;e.acute=180;e.acutebelowcmb=791;e.acutecmb=769;e.acutecomb=769;e.acutedeva=2388;e.acutelowmod=719;e.acutetonecmb=83\ 3;e.acyrillic=1072;e.adblgrave=513;e.addakgurmukhi=2673;e.adeva=2309;e.adieresis=228;e.adieresiscyrillic=1235;e.adieresismacron=479;e.adotbelow=7841;e.adotmacron=481;e.ae=230;e.aeacute=509;e.aekorean=12624;e.aemacron=483;e.afii00208=8213;e.afii08941=8356;e.afii10017=1040;e.afii10018=1041;e.afii10019=1042;e.afii10020=1043;e.afii10021=1044;e.afii10022=1045;e.afii10023=1025;e.afii10024=1046;e.afii10025=1047;e.afii10026=1048;e.afii10027=1049;e.afii10028=1050;e.afii10029=1051;e.afii10030=1052;e.afii1\ 0031=1053;e.afii10032=1054;e.afii10033=1055;e.afii10034=1056;e.afii10035=1057;e.afii10036=1058;e.afii10037=1059;e.afii10038=1060;e.afii10039=1061;e.afii10040=1062;e.afii10041=1063;e.afii10042=1064;e.afii10043=1065;e.afii10044=1066;e.afii10045=1067;e.afii10046=1068;e.afii10047=1069;e.afii10048=1070;e.afii10049=1071;e.afii10050=1168;e.afii10051=1026;e.afii10052=1027;e.afii10053=1028;e.afii10054=1029;e.afii10055=1030;e.afii10056=1031;e.afii10057=1032;e.afii10058=1033;e.afii10059=1034;e.afii10060=10\ 35;e.afii10061=1036;e.afii10062=1038;e.afii10063=63172;e.afii10064=63173;e.afii10065=1072;e.afii10066=1073;e.afii10067=1074;e.afii10068=1075;e.afii10069=1076;e.afii10070=1077;e.afii10071=1105;e.afii10072=1078;e.afii10073=1079;e.afii10074=1080;e.afii10075=1081;e.afii10076=1082;e.afii10077=1083;e.afii10078=1084;e.afii10079=1085;e.afii10080=1086;e.afii10081=1087;e.afii10082=1088;e.afii10083=1089;e.afii10084=1090;e.afii10085=1091;e.afii10086=1092;e.afii10087=1093;e.afii10088=1094;e.afii10089=1095;e.\ afii10090=1096;e.afii10091=1097;e.afii10092=1098;e.afii10093=1099;e.afii10094=1100;e.afii10095=1101;e.afii10096=1102;e.afii10097=1103;e.afii10098=1169;e.afii10099=1106;e.afii10100=1107;e.afii10101=1108;e.afii10102=1109;e.afii10103=1110;e.afii10104=1111;e.afii10105=1112;e.afii10106=1113;e.afii10107=1114;e.afii10108=1115;e.afii10109=1116;e.afii10110=1118;e.afii10145=1039;e.afii10146=1122;e.afii10147=1138;e.afii10148=1140;e.afii10192=63174;e.afii10193=1119;e.afii10194=1123;e.afii10195=1139;e.afii10\ 196=1141;e.afii10831=63175;e.afii10832=63176;e.afii10846=1241;e.afii299=8206;e.afii300=8207;e.afii301=8205;e.afii57381=1642;e.afii57388=1548;e.afii57392=1632;e.afii57393=1633;e.afii57394=1634;e.afii57395=1635;e.afii57396=1636;e.afii57397=1637;e.afii57398=1638;e.afii57399=1639;e.afii57400=1640;e.afii57401=1641;e.afii57403=1563;e.afii57407=1567;e.afii57409=1569;e.afii57410=1570;e.afii57411=1571;e.afii57412=1572;e.afii57413=1573;e.afii57414=1574;e.afii57415=1575;e.afii57416=1576;e.afii57417=1577;e.\ afii57418=1578;e.afii57419=1579;e.afii57420=1580;e.afii57421=1581;e.afii57422=1582;e.afii57423=1583;e.afii57424=1584;e.afii57425=1585;e.afii57426=1586;e.afii57427=1587;e.afii57428=1588;e.afii57429=1589;e.afii57430=1590;e.afii57431=1591;e.afii57432=1592;e.afii57433=1593;e.afii57434=1594;e.afii57440=1600;e.afii57441=1601;e.afii57442=1602;e.afii57443=1603;e.afii57444=1604;e.afii57445=1605;e.afii57446=1606;e.afii57448=1608;e.afii57449=1609;e.afii57450=1610;e.afii57451=1611;e.afii57452=1612;e.afii574\ 53=1613;e.afii57454=1614;e.afii57455=1615;e.afii57456=1616;e.afii57457=1617;e.afii57458=1618;e.afii57470=1607;e.afii57505=1700;e.afii57506=1662;e.afii57507=1670;e.afii57508=1688;e.afii57509=1711;e.afii57511=1657;e.afii57512=1672;e.afii57513=1681;e.afii57514=1722;e.afii57519=1746;e.afii57534=1749;e.afii57636=8362;e.afii57645=1470;e.afii57658=1475;e.afii57664=1488;e.afii57665=1489;e.afii57666=1490;e.afii57667=1491;e.afii57668=1492;e.afii57669=1493;e.afii57670=1494;e.afii57671=1495;e.afii57672=1496\ ;e.afii57673=1497;e.afii57674=1498;e.afii57675=1499;e.afii57676=1500;e.afii57677=1501;e.afii57678=1502;e.afii57679=1503;e.afii57680=1504;e.afii57681=1505;e.afii57682=1506;e.afii57683=1507;e.afii57684=1508;e.afii57685=1509;e.afii57686=1510;e.afii57687=1511;e.afii57688=1512;e.afii57689=1513;e.afii57690=1514;e.afii57694=64298;e.afii57695=64299;e.afii57700=64331;e.afii57705=64287;e.afii57716=1520;e.afii57717=1521;e.afii57718=1522;e.afii57723=64309;e.afii57793=1460;e.afii57794=1461;e.afii57795=1462;e\ .afii57796=1467;e.afii57797=1464;e.afii57798=1463;e.afii57799=1456;e.afii57800=1458;e.afii57801=1457;e.afii57802=1459;e.afii57803=1474;e.afii57804=1473;e.afii57806=1465;e.afii57807=1468;e.afii57839=1469;e.afii57841=1471;e.afii57842=1472;e.afii57929=700;e.afii61248=8453;e.afii61289=8467;e.afii61352=8470;e.afii61573=8236;e.afii61574=8237;e.afii61575=8238;e.afii61664=8204;e.afii63167=1645;e.afii64937=701;e.agrave=224;e.agujarati=2693;e.agurmukhi=2565;e.ahiragana=12354;e.ahookabove=7843;e.aibengali=\ 2448;e.aibopomofo=12574;e.aideva=2320;e.aiecyrillic=1237;e.aigujarati=2704;e.aigurmukhi=2576;e.aimatragurmukhi=2632;e.ainarabic=1593;e.ainfinalarabic=65226;e.aininitialarabic=65227;e.ainmedialarabic=65228;e.ainvertedbreve=515;e.aivowelsignbengali=2504;e.aivowelsigndeva=2376;e.aivowelsigngujarati=2760;e.akatakana=12450;e.akatakanahalfwidth=65393;e.akorean=12623;e.alef=1488;e.alefarabic=1575;e.alefdageshhebrew=64304;e.aleffinalarabic=65166;e.alefhamzaabovearabic=1571;e.alefhamzaabovefinalarabic=65\ 156;e.alefhamzabelowarabic=1573;e.alefhamzabelowfinalarabic=65160;e.alefhebrew=1488;e.aleflamedhebrew=64335;e.alefmaddaabovearabic=1570;e.alefmaddaabovefinalarabic=65154;e.alefmaksuraarabic=1609;e.alefmaksurafinalarabic=65264;e.alefmaksurainitialarabic=65267;e.alefmaksuramedialarabic=65268;e.alefpatahhebrew=64302;e.alefqamatshebrew=64303;e.aleph=8501;e.allequal=8780;e.alpha=945;e.alphatonos=940;e.amacron=257;e.amonospace=65345;e.ampersand=38;e.ampersandmonospace=65286;e.ampersandsmall=63270;e.am\ square=13250;e.anbopomofo=12578;e.angbopomofo=12580;e.angbracketleft=12296;e.angbracketright=12297;e.angkhankhuthai=3674;e.angle=8736;e.anglebracketleft=12296;e.anglebracketleftvertical=65087;e.anglebracketright=12297;e.anglebracketrightvertical=65088;e.angleleft=9001;e.angleright=9002;e.angstrom=8491;e.anoteleia=903;e.anudattadeva=2386;e.anusvarabengali=2434;e.anusvaradeva=2306;e.anusvaragujarati=2690;e.aogonek=261;e.apaatosquare=13056;e.aparen=9372;e.apostrophearmenian=1370;e.apostrophemod=700\ ;e.apple=63743;e.approaches=8784;e.approxequal=8776;e.approxequalorimage=8786;e.approximatelyequal=8773;e.araeaekorean=12686;e.araeakorean=12685;e.arc=8978;e.arighthalfring=7834;e.aring=229;e.aringacute=507;e.aringbelow=7681;e.arrowboth=8596;e.arrowdashdown=8675;e.arrowdashleft=8672;e.arrowdashright=8674;e.arrowdashup=8673;e.arrowdblboth=8660;e.arrowdbldown=8659;e.arrowdblleft=8656;e.arrowdblright=8658;e.arrowdblup=8657;e.arrowdown=8595;e.arrowdownleft=8601;e.arrowdownright=8600;e.arrowdownwhite\ =8681;e.arrowheaddownmod=709;e.arrowheadleftmod=706;e.arrowheadrightmod=707;e.arrowheadupmod=708;e.arrowhorizex=63719;e.arrowleft=8592;e.arrowleftdbl=8656;e.arrowleftdblstroke=8653;e.arrowleftoverright=8646;e.arrowleftwhite=8678;e.arrowright=8594;e.arrowrightdblstroke=8655;e.arrowrightheavy=10142;e.arrowrightoverleft=8644;e.arrowrightwhite=8680;e.arrowtableft=8676;e.arrowtabright=8677;e.arrowup=8593;e.arrowupdn=8597;e.arrowupdnbse=8616;e.arrowupdownbase=8616;e.arrowupleft=8598;e.arrowupleftofdow\ n=8645;e.arrowupright=8599;e.arrowupwhite=8679;e.arrowvertex=63718;e.asciicircum=94;e.asciicircummonospace=65342;e.asciitilde=126;e.asciitildemonospace=65374;e.ascript=593;e.ascriptturned=594;e.asmallhiragana=12353;e.asmallkatakana=12449;e.asmallkatakanahalfwidth=65383;e.asterisk=42;e.asteriskaltonearabic=1645;e.asteriskarabic=1645;e.asteriskmath=8727;e.asteriskmonospace=65290;e.asterisksmall=65121;e.asterism=8258;e.asuperior=63209;e.asymptoticallyequal=8771;e.at=64;e.atilde=227;e.atmonospace=65\ 312;e.atsmall=65131;e.aturned=592;e.aubengali=2452;e.aubopomofo=12576;e.audeva=2324;e.augujarati=2708;e.augurmukhi=2580;e.aulengthmarkbengali=2519;e.aumatragurmukhi=2636;e.auvowelsignbengali=2508;e.auvowelsigndeva=2380;e.auvowelsigngujarati=2764;e.avagrahadeva=2365;e.aybarmenian=1377;e.ayin=1506;e.ayinaltonehebrew=64288;e.ayinhebrew=1506;e.b=98;e.babengali=2476;e.backslash=92;e.backslashmonospace=65340;e.badeva=2348;e.bagujarati=2732;e.bagurmukhi=2604;e.bahiragana=12400;e.bahtthai=3647;e.bakatak\ ana=12496;e.bar=124;e.barmonospace=65372;e.bbopomofo=12549;e.bcircle=9425;e.bdotaccent=7683;e.bdotbelow=7685;e.beamedsixteenthnotes=9836;e.because=8757;e.becyrillic=1073;e.beharabic=1576;e.behfinalarabic=65168;e.behinitialarabic=65169;e.behiragana=12409;e.behmedialarabic=65170;e.behmeeminitialarabic=64671;e.behmeemisolatedarabic=64520;e.behnoonfinalarabic=64621;e.bekatakana=12505;e.benarmenian=1378;e.bet=1489;e.beta=946;e.betasymbolgreek=976;e.betdagesh=64305;e.betdageshhebrew=64305;e.bethebrew=\ 1489;e.betrafehebrew=64332;e.bhabengali=2477;e.bhadeva=2349;e.bhagujarati=2733;e.bhagurmukhi=2605;e.bhook=595;e.bihiragana=12403;e.bikatakana=12499;e.bilabialclick=664;e.bindigurmukhi=2562;e.birusquare=13105;e.blackcircle=9679;e.blackdiamond=9670;e.blackdownpointingtriangle=9660;e.blackleftpointingpointer=9668;e.blackleftpointingtriangle=9664;e.blacklenticularbracketleft=12304;e.blacklenticularbracketleftvertical=65083;e.blacklenticularbracketright=12305;e.blacklenticularbracketrightvertical=650\ 84;e.blacklowerlefttriangle=9699;e.blacklowerrighttriangle=9698;e.blackrectangle=9644;e.blackrightpointingpointer=9658;e.blackrightpointingtriangle=9654;e.blacksmallsquare=9642;e.blacksmilingface=9787;e.blacksquare=9632;e.blackstar=9733;e.blackupperlefttriangle=9700;e.blackupperrighttriangle=9701;e.blackuppointingsmalltriangle=9652;e.blackuppointingtriangle=9650;e.blank=9251;e.blinebelow=7687;e.block=9608;e.bmonospace=65346;e.bobaimaithai=3610;e.bohiragana=12412;e.bokatakana=12508;e.bparen=9373;\ e.bqsquare=13251;e.braceex=63732;e.braceleft=123;e.braceleftbt=63731;e.braceleftmid=63730;e.braceleftmonospace=65371;e.braceleftsmall=65115;e.bracelefttp=63729;e.braceleftvertical=65079;e.braceright=125;e.bracerightbt=63742;e.bracerightmid=63741;e.bracerightmonospace=65373;e.bracerightsmall=65116;e.bracerighttp=63740;e.bracerightvertical=65080;e.bracketleft=91;e.bracketleftbt=63728;e.bracketleftex=63727;e.bracketleftmonospace=65339;e.bracketlefttp=63726;e.bracketright=93;e.bracketrightbt=63739;e\ .bracketrightex=63738;e.bracketrightmonospace=65341;e.bracketrighttp=63737;e.breve=728;e.brevebelowcmb=814;e.brevecmb=774;e.breveinvertedbelowcmb=815;e.breveinvertedcmb=785;e.breveinverteddoublecmb=865;e.bridgebelowcmb=810;e.bridgeinvertedbelowcmb=826;e.brokenbar=166;e.bstroke=384;e.bsuperior=63210;e.btopbar=387;e.buhiragana=12406;e.bukatakana=12502;e.bullet=8226;e.bulletinverse=9688;e.bulletoperator=8729;e.bullseye=9678;e.c=99;e.caarmenian=1390;e.cabengali=2458;e.cacute=263;e.cadeva=2330;e.cagu\ jarati=2714;e.cagurmukhi=2586;e.calsquare=13192;e.candrabindubengali=2433;e.candrabinducmb=784;e.candrabindudeva=2305;e.candrabindugujarati=2689;e.capslock=8682;e.careof=8453;e.caron=711;e.caronbelowcmb=812;e.caroncmb=780;e.carriagereturn=8629;e.cbopomofo=12568;e.ccaron=269;e.ccedilla=231;e.ccedillaacute=7689;e.ccircle=9426;e.ccircumflex=265;e.ccurl=597;e.cdot=267;e.cdotaccent=267;e.cdsquare=13253;e.cedilla=184;e.cedillacmb=807;e.cent=162;e.centigrade=8451;e.centinferior=63199;e.centmonospace=65\ 504;e.centoldstyle=63394;e.centsuperior=63200;e.chaarmenian=1401;e.chabengali=2459;e.chadeva=2331;e.chagujarati=2715;e.chagurmukhi=2587;e.chbopomofo=12564;e.cheabkhasiancyrillic=1213;e.checkmark=10003;e.checyrillic=1095;e.chedescenderabkhasiancyrillic=1215;e.chedescendercyrillic=1207;e.chedieresiscyrillic=1269;e.cheharmenian=1395;e.chekhakassiancyrillic=1228;e.cheverticalstrokecyrillic=1209;e.chi=967;e.chieuchacirclekorean=12919;e.chieuchaparenkorean=12823;e.chieuchcirclekorean=12905;e.chieuchko\ rean=12618;e.chieuchparenkorean=12809;e.chochangthai=3594;e.chochanthai=3592;e.chochingthai=3593;e.chochoethai=3596;e.chook=392;e.cieucacirclekorean=12918;e.cieucaparenkorean=12822;e.cieuccirclekorean=12904;e.cieuckorean=12616;e.cieucparenkorean=12808;e.cieucuparenkorean=12828;e.circle=9675;e.circlecopyrt=169;e.circlemultiply=8855;e.circleot=8857;e.circleplus=8853;e.circlepostalmark=12342;e.circlewithlefthalfblack=9680;e.circlewithrighthalfblack=9681;e.circumflex=710;e.circumflexbelowcmb=813;e.c\ ircumflexcmb=770;e.clear=8999;e.clickalveolar=450;e.clickdental=448;e.clicklateral=449;e.clickretroflex=451;e.club=9827;e.clubsuitblack=9827;e.clubsuitwhite=9831;e.cmcubedsquare=13220;e.cmonospace=65347;e.cmsquaredsquare=13216;e.coarmenian=1409;e.colon=58;e.colonmonetary=8353;e.colonmonospace=65306;e.colonsign=8353;e.colonsmall=65109;e.colontriangularhalfmod=721;e.colontriangularmod=720;e.comma=44;e.commaabovecmb=787;e.commaaboverightcmb=789;e.commaaccent=63171;e.commaarabic=1548;e.commaarmenian\ =1373;e.commainferior=63201;e.commamonospace=65292;e.commareversedabovecmb=788;e.commareversedmod=701;e.commasmall=65104;e.commasuperior=63202;e.commaturnedabovecmb=786;e.commaturnedmod=699;e.compass=9788;e.congruent=8773;e.contourintegral=8750;e.control=8963;e.controlACK=6;e.controlBEL=7;e.controlBS=8;e.controlCAN=24;e.controlCR=13;e.controlDC1=17;e.controlDC2=18;e.controlDC3=19;e.controlDC4=20;e.controlDEL=127;e.controlDLE=16;e.controlEM=25;e.controlENQ=5;e.controlEOT=4;e.controlESC=27;e.contr\ olETB=23;e.controlETX=3;e.controlFF=12;e.controlFS=28;e.controlGS=29;e.controlHT=9;e.controlLF=10;e.controlNAK=21;e.controlNULL=0;e.controlRS=30;e.controlSI=15;e.controlSO=14;e.controlSOT=2;e.controlSTX=1;e.controlSUB=26;e.controlSYN=22;e.controlUS=31;e.controlVT=11;e.copyright=169;e.copyrightsans=63721;e.copyrightserif=63193;e.cornerbracketleft=12300;e.cornerbracketlefthalfwidth=65378;e.cornerbracketleftvertical=65089;e.cornerbracketright=12301;e.cornerbracketrighthalfwidth=65379;e.cornerbracke\ trightvertical=65090;e.corporationsquare=13183;e.cosquare=13255;e.coverkgsquare=13254;e.cparen=9374;e.cruzeiro=8354;e.cstretched=663;e.curlyand=8911;e.curlyor=8910;e.currency=164;e.cyrBreve=63185;e.cyrFlex=63186;e.cyrbreve=63188;e.cyrflex=63189;e.d=100;e.daarmenian=1380;e.dabengali=2470;e.dadarabic=1590;e.dadeva=2342;e.dadfinalarabic=65214;e.dadinitialarabic=65215;e.dadmedialarabic=65216;e.dagesh=1468;e.dageshhebrew=1468;e.dagger=8224;e.daggerdbl=8225;e.dagujarati=2726;e.dagurmukhi=2598;e.dahira\ gana=12384;e.dakatakana=12480;e.dalarabic=1583;e.dalet=1491;e.daletdagesh=64307;e.daletdageshhebrew=64307;e.dalethebrew=1491;e.dalfinalarabic=65194;e.dammaarabic=1615;e.dammalowarabic=1615;e.dammatanaltonearabic=1612;e.dammatanarabic=1612;e.danda=2404;e.dargahebrew=1447;e.dargalefthebrew=1447;e.dasiapneumatacyrilliccmb=1157;e.dblGrave=63187;e.dblanglebracketleft=12298;e.dblanglebracketleftvertical=65085;e.dblanglebracketright=12299;e.dblanglebracketrightvertical=65086;e.dblarchinvertedbelowcmb=8\ 11;e.dblarrowleft=8660;e.dblarrowright=8658;e.dbldanda=2405;e.dblgrave=63190;e.dblgravecmb=783;e.dblintegral=8748;e.dbllowline=8215;e.dbllowlinecmb=819;e.dbloverlinecmb=831;e.dblprimemod=698;e.dblverticalbar=8214;e.dblverticallineabovecmb=782;e.dbopomofo=12553;e.dbsquare=13256;e.dcaron=271;e.dcedilla=7697;e.dcircle=9427;e.dcircumflexbelow=7699;e.dcroat=273;e.ddabengali=2465;e.ddadeva=2337;e.ddagujarati=2721;e.ddagurmukhi=2593;e.ddalarabic=1672;e.ddalfinalarabic=64393;e.dddhadeva=2396;e.ddhabenga\ li=2466;e.ddhadeva=2338;e.ddhagujarati=2722;e.ddhagurmukhi=2594;e.ddotaccent=7691;e.ddotbelow=7693;e.decimalseparatorarabic=1643;e.decimalseparatorpersian=1643;e.decyrillic=1076;e.degree=176;e.dehihebrew=1453;e.dehiragana=12391;e.deicoptic=1007;e.dekatakana=12487;e.deleteleft=9003;e.deleteright=8998;e.delta=948;e.deltaturned=397;e.denominatorminusonenumeratorbengali=2552;e.dezh=676;e.dhabengali=2471;e.dhadeva=2343;e.dhagujarati=2727;e.dhagurmukhi=2599;e.dhook=599;e.dialytikatonos=901;e.dialytika\ tonoscmb=836;e.diamond=9830;e.diamondsuitwhite=9826;e.dieresis=168;e.dieresisacute=63191;e.dieresisbelowcmb=804;e.dieresiscmb=776;e.dieresisgrave=63192;e.dieresistonos=901;e.dihiragana=12386;e.dikatakana=12482;e.dittomark=12291;e.divide=247;e.divides=8739;e.divisionslash=8725;e.djecyrillic=1106;e.dkshade=9619;e.dlinebelow=7695;e.dlsquare=13207;e.dmacron=273;e.dmonospace=65348;e.dnblock=9604;e.dochadathai=3598;e.dodekthai=3604;e.dohiragana=12393;e.dokatakana=12489;e.dollar=36;e.dollarinferior=632\ 03;e.dollarmonospace=65284;e.dollaroldstyle=63268;e.dollarsmall=65129;e.dollarsuperior=63204;e.dong=8363;e.dorusquare=13094;e.dotaccent=729;e.dotaccentcmb=775;e.dotbelowcmb=803;e.dotbelowcomb=803;e.dotkatakana=12539;e.dotlessi=305;e.dotlessj=63166;e.dotlessjstrokehook=644;e.dotmath=8901;e.dottedcircle=9676;e.doubleyodpatah=64287;e.doubleyodpatahhebrew=64287;e.downtackbelowcmb=798;e.downtackmod=725;e.dparen=9375;e.dsuperior=63211;e.dtail=598;e.dtopbar=396;e.duhiragana=12389;e.dukatakana=12485;e.d\ z=499;e.dzaltone=675;e.dzcaron=454;e.dzcurl=677;e.dzeabkhasiancyrillic=1249;e.dzecyrillic=1109;e.dzhecyrillic=1119;e.e=101;e.eacute=233;e.earth=9793;e.ebengali=2447;e.ebopomofo=12572;e.ebreve=277;e.ecandradeva=2317;e.ecandragujarati=2701;e.ecandravowelsigndeva=2373;e.ecandravowelsigngujarati=2757;e.ecaron=283;e.ecedillabreve=7709;e.echarmenian=1381;e.echyiwnarmenian=1415;e.ecircle=9428;e.ecircumflex=234;e.ecircumflexacute=7871;e.ecircumflexbelow=7705;e.ecircumflexdotbelow=7879;e.ecircumflexgrave\ =7873;e.ecircumflexhookabove=7875;e.ecircumflextilde=7877;e.ecyrillic=1108;e.edblgrave=517;e.edeva=2319;e.edieresis=235;e.edot=279;e.edotaccent=279;e.edotbelow=7865;e.eegurmukhi=2575;e.eematragurmukhi=2631;e.efcyrillic=1092;e.egrave=232;e.egujarati=2703;e.eharmenian=1383;e.ehbopomofo=12573;e.ehiragana=12360;e.ehookabove=7867;e.eibopomofo=12575;e.eight=56;e.eightarabic=1640;e.eightbengali=2542;e.eightcircle=9319;e.eightcircleinversesansserif=10129;e.eightdeva=2414;e.eighteencircle=9329;e.eighteen\ paren=9349;e.eighteenperiod=9369;e.eightgujarati=2798;e.eightgurmukhi=2670;e.eighthackarabic=1640;e.eighthangzhou=12328;e.eighthnotebeamed=9835;e.eightideographicparen=12839;e.eightinferior=8328;e.eightmonospace=65304;e.eightoldstyle=63288;e.eightparen=9339;e.eightperiod=9359;e.eightpersian=1784;e.eightroman=8567;e.eightsuperior=8312;e.eightthai=3672;e.einvertedbreve=519;e.eiotifiedcyrillic=1125;e.ekatakana=12456;e.ekatakanahalfwidth=65396;e.ekonkargurmukhi=2676;e.ekorean=12628;e.elcyrillic=1083\ ;e.element=8712;e.elevencircle=9322;e.elevenparen=9342;e.elevenperiod=9362;e.elevenroman=8570;e.ellipsis=8230;e.ellipsisvertical=8942;e.emacron=275;e.emacronacute=7703;e.emacrongrave=7701;e.emcyrillic=1084;e.emdash=8212;e.emdashvertical=65073;e.emonospace=65349;e.emphasismarkarmenian=1371;e.emptyset=8709;e.enbopomofo=12579;e.encyrillic=1085;e.endash=8211;e.endashvertical=65074;e.endescendercyrillic=1187;e.eng=331;e.engbopomofo=12581;e.enghecyrillic=1189;e.enhookcyrillic=1224;e.enspace=8194;e.eog\ onek=281;e.eokorean=12627;e.eopen=603;e.eopenclosed=666;e.eopenreversed=604;e.eopenreversedclosed=606;e.eopenreversedhook=605;e.eparen=9376;e.epsilon=949;e.epsilontonos=941;e.equal=61;e.equalmonospace=65309;e.equalsmall=65126;e.equalsuperior=8316;e.equivalence=8801;e.erbopomofo=12582;e.ercyrillic=1088;e.ereversed=600;e.ereversedcyrillic=1101;e.escyrillic=1089;e.esdescendercyrillic=1195;e.esh=643;e.eshcurl=646;e.eshortdeva=2318;e.eshortvowelsigndeva=2374;e.eshreversedloop=426;e.eshsquatreversed=6\ 45;e.esmallhiragana=12359;e.esmallkatakana=12455;e.esmallkatakanahalfwidth=65386;e.estimated=8494;e.esuperior=63212;e.eta=951;e.etarmenian=1384;e.etatonos=942;e.eth=240;e.etilde=7869;e.etildebelow=7707;e.etnahtafoukhhebrew=1425;e.etnahtafoukhlefthebrew=1425;e.etnahtahebrew=1425;e.etnahtalefthebrew=1425;e.eturned=477;e.eukorean=12641;e.euro=8364;e.evowelsignbengali=2503;e.evowelsigndeva=2375;e.evowelsigngujarati=2759;e.exclam=33;e.exclamarmenian=1372;e.exclamdbl=8252;e.exclamdown=161;e.exclamdown\ small=63393;e.exclammonospace=65281;e.exclamsmall=63265;e.existential=8707;e.ezh=658;e.ezhcaron=495;e.ezhcurl=659;e.ezhreversed=441;e.ezhtail=442;e.f=102;e.fadeva=2398;e.fagurmukhi=2654;e.fahrenheit=8457;e.fathaarabic=1614;e.fathalowarabic=1614;e.fathatanarabic=1611;e.fbopomofo=12552;e.fcircle=9429;e.fdotaccent=7711;e.feharabic=1601;e.feharmenian=1414;e.fehfinalarabic=65234;e.fehinitialarabic=65235;e.fehmedialarabic=65236;e.feicoptic=997;e.female=9792;e.ff=64256;e.f_f=64256;e.ffi=64259;e.f_f_i=6\ 4259;e.ffl=64260;e.f_f_l=64260;e.fi=64257;e.f_i=64257;e.fifteencircle=9326;e.fifteenparen=9346;e.fifteenperiod=9366;e.figuredash=8210;e.filledbox=9632;e.filledrect=9644;e.finalkaf=1498;e.finalkafdagesh=64314;e.finalkafdageshhebrew=64314;e.finalkafhebrew=1498;e.finalmem=1501;e.finalmemhebrew=1501;e.finalnun=1503;e.finalnunhebrew=1503;e.finalpe=1507;e.finalpehebrew=1507;e.finaltsadi=1509;e.finaltsadihebrew=1509;e.firsttonechinese=713;e.fisheye=9673;e.fitacyrillic=1139;e.five=53;e.fivearabic=1637;e\ .fivebengali=2539;e.fivecircle=9316;e.fivecircleinversesansserif=10126;e.fivedeva=2411;e.fiveeighths=8541;e.fivegujarati=2795;e.fivegurmukhi=2667;e.fivehackarabic=1637;e.fivehangzhou=12325;e.fiveideographicparen=12836;e.fiveinferior=8325;e.fivemonospace=65301;e.fiveoldstyle=63285;e.fiveparen=9336;e.fiveperiod=9356;e.fivepersian=1781;e.fiveroman=8564;e.fivesuperior=8309;e.fivethai=3669;e.fl=64258;e.f_l=64258;e.florin=402;e.fmonospace=65350;e.fmsquare=13209;e.fofanthai=3615;e.fofathai=3613;e.fongm\ anthai=3663;e.forall=8704;e.four=52;e.fourarabic=1636;e.fourbengali=2538;e.fourcircle=9315;e.fourcircleinversesansserif=10125;e.fourdeva=2410;e.fourgujarati=2794;e.fourgurmukhi=2666;e.fourhackarabic=1636;e.fourhangzhou=12324;e.fourideographicparen=12835;e.fourinferior=8324;e.fourmonospace=65300;e.fournumeratorbengali=2551;e.fouroldstyle=63284;e.fourparen=9335;e.fourperiod=9355;e.fourpersian=1780;e.fourroman=8563;e.foursuperior=8308;e.fourteencircle=9325;e.fourteenparen=9345;e.fourteenperiod=9365\ ;e.fourthai=3668;e.fourthtonechinese=715;e.fparen=9377;e.fraction=8260;e.franc=8355;e.g=103;e.gabengali=2455;e.gacute=501;e.gadeva=2327;e.gafarabic=1711;e.gaffinalarabic=64403;e.gafinitialarabic=64404;e.gafmedialarabic=64405;e.gagujarati=2711;e.gagurmukhi=2583;e.gahiragana=12364;e.gakatakana=12460;e.gamma=947;e.gammalatinsmall=611;e.gammasuperior=736;e.gangiacoptic=1003;e.gbopomofo=12557;e.gbreve=287;e.gcaron=487;e.gcedilla=291;e.gcircle=9430;e.gcircumflex=285;e.gcommaaccent=291;e.gdot=289;e.gdo\ taccent=289;e.gecyrillic=1075;e.gehiragana=12370;e.gekatakana=12466;e.geometricallyequal=8785;e.gereshaccenthebrew=1436;e.gereshhebrew=1523;e.gereshmuqdamhebrew=1437;e.germandbls=223;e.gershayimaccenthebrew=1438;e.gershayimhebrew=1524;e.getamark=12307;e.ghabengali=2456;e.ghadarmenian=1394;e.ghadeva=2328;e.ghagujarati=2712;e.ghagurmukhi=2584;e.ghainarabic=1594;e.ghainfinalarabic=65230;e.ghaininitialarabic=65231;e.ghainmedialarabic=65232;e.ghemiddlehookcyrillic=1173;e.ghestrokecyrillic=1171;e.gheu\ pturncyrillic=1169;e.ghhadeva=2394;e.ghhagurmukhi=2650;e.ghook=608;e.ghzsquare=13203;e.gihiragana=12366;e.gikatakana=12462;e.gimarmenian=1379;e.gimel=1490;e.gimeldagesh=64306;e.gimeldageshhebrew=64306;e.gimelhebrew=1490;e.gjecyrillic=1107;e.glottalinvertedstroke=446;e.glottalstop=660;e.glottalstopinverted=662;e.glottalstopmod=704;e.glottalstopreversed=661;e.glottalstopreversedmod=705;e.glottalstopreversedsuperior=740;e.glottalstopstroke=673;e.glottalstopstrokereversed=674;e.gmacron=7713;e.gmonos\ pace=65351;e.gohiragana=12372;e.gokatakana=12468;e.gparen=9378;e.gpasquare=13228;e.gradient=8711;e.grave=96;e.gravebelowcmb=790;e.gravecmb=768;e.gravecomb=768;e.gravedeva=2387;e.gravelowmod=718;e.gravemonospace=65344;e.gravetonecmb=832;e.greater=62;e.greaterequal=8805;e.greaterequalorless=8923;e.greatermonospace=65310;e.greaterorequivalent=8819;e.greaterorless=8823;e.greateroverequal=8807;e.greatersmall=65125;e.gscript=609;e.gstroke=485;e.guhiragana=12368;e.guillemotleft=171;e.guillemotright=187\ ;e.guilsinglleft=8249;e.guilsinglright=8250;e.gukatakana=12464;e.guramusquare=13080;e.gysquare=13257;e.h=104;e.haabkhasiancyrillic=1193;e.haaltonearabic=1729;e.habengali=2489;e.hadescendercyrillic=1203;e.hadeva=2361;e.hagujarati=2745;e.hagurmukhi=2617;e.haharabic=1581;e.hahfinalarabic=65186;e.hahinitialarabic=65187;e.hahiragana=12399;e.hahmedialarabic=65188;e.haitusquare=13098;e.hakatakana=12495;e.hakatakanahalfwidth=65418;e.halantgurmukhi=2637;e.hamzaarabic=1569;e.hamzalowarabic=1569;e.hangulfi\ ller=12644;e.hardsigncyrillic=1098;e.harpoonleftbarbup=8636;e.harpoonrightbarbup=8640;e.hasquare=13258;e.hatafpatah=1458;e.hatafpatah16=1458;e.hatafpatah23=1458;e.hatafpatah2f=1458;e.hatafpatahhebrew=1458;e.hatafpatahnarrowhebrew=1458;e.hatafpatahquarterhebrew=1458;e.hatafpatahwidehebrew=1458;e.hatafqamats=1459;e.hatafqamats1b=1459;e.hatafqamats28=1459;e.hatafqamats34=1459;e.hatafqamatshebrew=1459;e.hatafqamatsnarrowhebrew=1459;e.hatafqamatsquarterhebrew=1459;e.hatafqamatswidehebrew=1459;e.hataf\ segol=1457;e.hatafsegol17=1457;e.hatafsegol24=1457;e.hatafsegol30=1457;e.hatafsegolhebrew=1457;e.hatafsegolnarrowhebrew=1457;e.hatafsegolquarterhebrew=1457;e.hatafsegolwidehebrew=1457;e.hbar=295;e.hbopomofo=12559;e.hbrevebelow=7723;e.hcedilla=7721;e.hcircle=9431;e.hcircumflex=293;e.hdieresis=7719;e.hdotaccent=7715;e.hdotbelow=7717;e.he=1492;e.heart=9829;e.heartsuitblack=9829;e.heartsuitwhite=9825;e.hedagesh=64308;e.hedageshhebrew=64308;e.hehaltonearabic=1729;e.heharabic=1607;e.hehebrew=1492;e.he\ hfinalaltonearabic=64423;e.hehfinalalttwoarabic=65258;e.hehfinalarabic=65258;e.hehhamzaabovefinalarabic=64421;e.hehhamzaaboveisolatedarabic=64420;e.hehinitialaltonearabic=64424;e.hehinitialarabic=65259;e.hehiragana=12408;e.hehmedialaltonearabic=64425;e.hehmedialarabic=65260;e.heiseierasquare=13179;e.hekatakana=12504;e.hekatakanahalfwidth=65421;e.hekutaarusquare=13110;e.henghook=615;e.herutusquare=13113;e.het=1495;e.hethebrew=1495;e.hhook=614;e.hhooksuperior=689;e.hieuhacirclekorean=12923;e.hieuh\ aparenkorean=12827;e.hieuhcirclekorean=12909;e.hieuhkorean=12622;e.hieuhparenkorean=12813;e.hihiragana=12402;e.hikatakana=12498;e.hikatakanahalfwidth=65419;e.hiriq=1460;e.hiriq14=1460;e.hiriq21=1460;e.hiriq2d=1460;e.hiriqhebrew=1460;e.hiriqnarrowhebrew=1460;e.hiriqquarterhebrew=1460;e.hiriqwidehebrew=1460;e.hlinebelow=7830;e.hmonospace=65352;e.hoarmenian=1392;e.hohipthai=3627;e.hohiragana=12411;e.hokatakana=12507;e.hokatakanahalfwidth=65422;e.holam=1465;e.holam19=1465;e.holam26=1465;e.holam32=14\ 65;e.holamhebrew=1465;e.holamnarrowhebrew=1465;e.holamquarterhebrew=1465;e.holamwidehebrew=1465;e.honokhukthai=3630;e.hookabovecomb=777;e.hookcmb=777;e.hookpalatalizedbelowcmb=801;e.hookretroflexbelowcmb=802;e.hoonsquare=13122;e.horicoptic=1001;e.horizontalbar=8213;e.horncmb=795;e.hotsprings=9832;e.house=8962;e.hparen=9379;e.hsuperior=688;e.hturned=613;e.huhiragana=12405;e.huiitosquare=13107;e.hukatakana=12501;e.hukatakanahalfwidth=65420;e.hungarumlaut=733;e.hungarumlautcmb=779;e.hv=405;e.hyphen\ =45;e.hypheninferior=63205;e.hyphenmonospace=65293;e.hyphensmall=65123;e.hyphensuperior=63206;e.hyphentwo=8208;e.i=105;e.iacute=237;e.iacyrillic=1103;e.ibengali=2439;e.ibopomofo=12583;e.ibreve=301;e.icaron=464;e.icircle=9432;e.icircumflex=238;e.icyrillic=1110;e.idblgrave=521;e.ideographearthcircle=12943;e.ideographfirecircle=12939;e.ideographicallianceparen=12863;e.ideographiccallparen=12858;e.ideographiccentrecircle=12965;e.ideographicclose=12294;e.ideographiccomma=12289;e.ideographiccommaleft=\ 65380;e.ideographiccongratulationparen=12855;e.ideographiccorrectcircle=12963;e.ideographicearthparen=12847;e.ideographicenterpriseparen=12861;e.ideographicexcellentcircle=12957;e.ideographicfestivalparen=12864;e.ideographicfinancialcircle=12950;e.ideographicfinancialparen=12854;e.ideographicfireparen=12843;e.ideographichaveparen=12850;e.ideographichighcircle=12964;e.ideographiciterationmark=12293;e.ideographiclaborcircle=12952;e.ideographiclaborparen=12856;e.ideographicleftcircle=12967;e.ideogr\ aphiclowcircle=12966;e.ideographicmedicinecircle=12969;e.ideographicmetalparen=12846;e.ideographicmoonparen=12842;e.ideographicnameparen=12852;e.ideographicperiod=12290;e.ideographicprintcircle=12958;e.ideographicreachparen=12867;e.ideographicrepresentparen=12857;e.ideographicresourceparen=12862;e.ideographicrightcircle=12968;e.ideographicsecretcircle=12953;e.ideographicselfparen=12866;e.ideographicsocietyparen=12851;e.ideographicspace=12288;e.ideographicspecialparen=12853;e.ideographicstockpare\ n=12849;e.ideographicstudyparen=12859;e.ideographicsunparen=12848;e.ideographicsuperviseparen=12860;e.ideographicwaterparen=12844;e.ideographicwoodparen=12845;e.ideographiczero=12295;e.ideographmetalcircle=12942;e.ideographmooncircle=12938;e.ideographnamecircle=12948;e.ideographsuncircle=12944;e.ideographwatercircle=12940;e.ideographwoodcircle=12941;e.ideva=2311;e.idieresis=239;e.idieresisacute=7727;e.idieresiscyrillic=1253;e.idotbelow=7883;e.iebrevecyrillic=1239;e.iecyrillic=1077;e.ieungacircle\ korean=12917;e.ieungaparenkorean=12821;e.ieungcirclekorean=12903;e.ieungkorean=12615;e.ieungparenkorean=12807;e.igrave=236;e.igujarati=2695;e.igurmukhi=2567;e.ihiragana=12356;e.ihookabove=7881;e.iibengali=2440;e.iicyrillic=1080;e.iideva=2312;e.iigujarati=2696;e.iigurmukhi=2568;e.iimatragurmukhi=2624;e.iinvertedbreve=523;e.iishortcyrillic=1081;e.iivowelsignbengali=2496;e.iivowelsigndeva=2368;e.iivowelsigngujarati=2752;e.ij=307;e.ikatakana=12452;e.ikatakanahalfwidth=65394;e.ikorean=12643;e.ilde=73\ 2;e.iluyhebrew=1452;e.imacron=299;e.imacroncyrillic=1251;e.imageorapproximatelyequal=8787;e.imatragurmukhi=2623;e.imonospace=65353;e.increment=8710;e.infinity=8734;e.iniarmenian=1387;e.integral=8747;e.integralbottom=8993;e.integralbt=8993;e.integralex=63733;e.integraltop=8992;e.integraltp=8992;e.intersection=8745;e.intisquare=13061;e.invbullet=9688;e.invcircle=9689;e.invsmileface=9787;e.iocyrillic=1105;e.iogonek=303;e.iota=953;e.iotadieresis=970;e.iotadieresistonos=912;e.iotalatin=617;e.iotatono\ s=943;e.iparen=9380;e.irigurmukhi=2674;e.ismallhiragana=12355;e.ismallkatakana=12451;e.ismallkatakanahalfwidth=65384;e.issharbengali=2554;e.istroke=616;e.isuperior=63213;e.iterationhiragana=12445;e.iterationkatakana=12541;e.itilde=297;e.itildebelow=7725;e.iubopomofo=12585;e.iucyrillic=1102;e.ivowelsignbengali=2495;e.ivowelsigndeva=2367;e.ivowelsigngujarati=2751;e.izhitsacyrillic=1141;e.izhitsadblgravecyrillic=1143;e.j=106;e.jaarmenian=1393;e.jabengali=2460;e.jadeva=2332;e.jagujarati=2716;e.jagur\ mukhi=2588;e.jbopomofo=12560;e.jcaron=496;e.jcircle=9433;e.jcircumflex=309;e.jcrossedtail=669;e.jdotlessstroke=607;e.jecyrillic=1112;e.jeemarabic=1580;e.jeemfinalarabic=65182;e.jeeminitialarabic=65183;e.jeemmedialarabic=65184;e.jeharabic=1688;e.jehfinalarabic=64395;e.jhabengali=2461;e.jhadeva=2333;e.jhagujarati=2717;e.jhagurmukhi=2589;e.jheharmenian=1403;e.jis=12292;e.jmonospace=65354;e.jparen=9381;e.jsuperior=690;e.k=107;e.kabashkircyrillic=1185;e.kabengali=2453;e.kacute=7729;e.kacyrillic=1082;\ e.kadescendercyrillic=1179;e.kadeva=2325;e.kaf=1499;e.kafarabic=1603;e.kafdagesh=64315;e.kafdageshhebrew=64315;e.kaffinalarabic=65242;e.kafhebrew=1499;e.kafinitialarabic=65243;e.kafmedialarabic=65244;e.kafrafehebrew=64333;e.kagujarati=2709;e.kagurmukhi=2581;e.kahiragana=12363;e.kahookcyrillic=1220;e.kakatakana=12459;e.kakatakanahalfwidth=65398;e.kappa=954;e.kappasymbolgreek=1008;e.kapyeounmieumkorean=12657;e.kapyeounphieuphkorean=12676;e.kapyeounpieupkorean=12664;e.kapyeounssangpieupkorean=12665\ ;e.karoriisquare=13069;e.kashidaautoarabic=1600;e.kashidaautonosidebearingarabic=1600;e.kasmallkatakana=12533;e.kasquare=13188;e.kasraarabic=1616;e.kasratanarabic=1613;e.kastrokecyrillic=1183;e.katahiraprolongmarkhalfwidth=65392;e.kaverticalstrokecyrillic=1181;e.kbopomofo=12558;e.kcalsquare=13193;e.kcaron=489;e.kcedilla=311;e.kcircle=9434;e.kcommaaccent=311;e.kdotbelow=7731;e.keharmenian=1412;e.kehiragana=12369;e.kekatakana=12465;e.kekatakanahalfwidth=65401;e.kenarmenian=1391;e.kesmallkatakana=1\ 2534;e.kgreenlandic=312;e.khabengali=2454;e.khacyrillic=1093;e.khadeva=2326;e.khagujarati=2710;e.khagurmukhi=2582;e.khaharabic=1582;e.khahfinalarabic=65190;e.khahinitialarabic=65191;e.khahmedialarabic=65192;e.kheicoptic=999;e.khhadeva=2393;e.khhagurmukhi=2649;e.khieukhacirclekorean=12920;e.khieukhaparenkorean=12824;e.khieukhcirclekorean=12906;e.khieukhkorean=12619;e.khieukhparenkorean=12810;e.khokhaithai=3586;e.khokhonthai=3589;e.khokhuatthai=3587;e.khokhwaithai=3588;e.khomutthai=3675;e.khook=40\ 9;e.khorakhangthai=3590;e.khzsquare=13201;e.kihiragana=12365;e.kikatakana=12461;e.kikatakanahalfwidth=65399;e.kiroguramusquare=13077;e.kiromeetorusquare=13078;e.kirosquare=13076;e.kiyeokacirclekorean=12910;e.kiyeokaparenkorean=12814;e.kiyeokcirclekorean=12896;e.kiyeokkorean=12593;e.kiyeokparenkorean=12800;e.kiyeoksioskorean=12595;e.kjecyrillic=1116;e.klinebelow=7733;e.klsquare=13208;e.kmcubedsquare=13222;e.kmonospace=65355;e.kmsquaredsquare=13218;e.kohiragana=12371;e.kohmsquare=13248;e.kokaithai\ =3585;e.kokatakana=12467;e.kokatakanahalfwidth=65402;e.kooposquare=13086;e.koppacyrillic=1153;e.koreanstandardsymbol=12927;e.koroniscmb=835;e.kparen=9382;e.kpasquare=13226;e.ksicyrillic=1135;e.ktsquare=13263;e.kturned=670;e.kuhiragana=12367;e.kukatakana=12463;e.kukatakanahalfwidth=65400;e.kvsquare=13240;e.kwsquare=13246;e.l=108;e.labengali=2482;e.lacute=314;e.ladeva=2354;e.lagujarati=2738;e.lagurmukhi=2610;e.lakkhangyaothai=3653;e.lamaleffinalarabic=65276;e.lamalefhamzaabovefinalarabic=65272;e.l\ amalefhamzaaboveisolatedarabic=65271;e.lamalefhamzabelowfinalarabic=65274;e.lamalefhamzabelowisolatedarabic=65273;e.lamalefisolatedarabic=65275;e.lamalefmaddaabovefinalarabic=65270;e.lamalefmaddaaboveisolatedarabic=65269;e.lamarabic=1604;e.lambda=955;e.lambdastroke=411;e.lamed=1500;e.lameddagesh=64316;e.lameddageshhebrew=64316;e.lamedhebrew=1500;e.lamfinalarabic=65246;e.lamhahinitialarabic=64714;e.laminitialarabic=65247;e.lamjeeminitialarabic=64713;e.lamkhahinitialarabic=64715;e.lamlamhehisolate\ darabic=65010;e.lammedialarabic=65248;e.lammeemhahinitialarabic=64904;e.lammeeminitialarabic=64716;e.largecircle=9711;e.lbar=410;e.lbelt=620;e.lbopomofo=12556;e.lcaron=318;e.lcedilla=316;e.lcircle=9435;e.lcircumflexbelow=7741;e.lcommaaccent=316;e.ldot=320;e.ldotaccent=320;e.ldotbelow=7735;e.ldotbelowmacron=7737;e.leftangleabovecmb=794;e.lefttackbelowcmb=792;e.less=60;e.lessequal=8804;e.lessequalorgreater=8922;e.lessmonospace=65308;e.lessorequivalent=8818;e.lessorgreater=8822;e.lessoverequal=8806\ ;e.lesssmall=65124;e.lezh=622;e.lfblock=9612;e.lhookretroflex=621;e.lira=8356;e.liwnarmenian=1388;e.lj=457;e.ljecyrillic=1113;e.ll=63168;e.lladeva=2355;e.llagujarati=2739;e.llinebelow=7739;e.llladeva=2356;e.llvocalicbengali=2529;e.llvocalicdeva=2401;e.llvocalicvowelsignbengali=2531;e.llvocalicvowelsigndeva=2403;e.lmiddletilde=619;e.lmonospace=65356;e.lmsquare=13264;e.lochulathai=3628;e.logicaland=8743;e.logicalnot=172;e.logicalnotreversed=8976;e.logicalor=8744;e.lolingthai=3621;e.longs=383;e.low\ linecenterline=65102;e.lowlinecmb=818;e.lowlinedashed=65101;e.lozenge=9674;e.lparen=9383;e.lslash=322;e.lsquare=8467;e.lsuperior=63214;e.ltshade=9617;e.luthai=3622;e.lvocalicbengali=2444;e.lvocalicdeva=2316;e.lvocalicvowelsignbengali=2530;e.lvocalicvowelsigndeva=2402;e.lxsquare=13267;e.m=109;e.mabengali=2478;e.macron=175;e.macronbelowcmb=817;e.macroncmb=772;e.macronlowmod=717;e.macronmonospace=65507;e.macute=7743;e.madeva=2350;e.magujarati=2734;e.magurmukhi=2606;e.mahapakhhebrew=1444;e.mahapakhl\ efthebrew=1444;e.mahiragana=12414;e.maichattawalowleftthai=63637;e.maichattawalowrightthai=63636;e.maichattawathai=3659;e.maichattawaupperleftthai=63635;e.maieklowleftthai=63628;e.maieklowrightthai=63627;e.maiekthai=3656;e.maiekupperleftthai=63626;e.maihanakatleftthai=63620;e.maihanakatthai=3633;e.maitaikhuleftthai=63625;e.maitaikhuthai=3655;e.maitholowleftthai=63631;e.maitholowrightthai=63630;e.maithothai=3657;e.maithoupperleftthai=63629;e.maitrilowleftthai=63634;e.maitrilowrightthai=63633;e.ma\ itrithai=3658;e.maitriupperleftthai=63632;e.maiyamokthai=3654;e.makatakana=12510;e.makatakanahalfwidth=65423;e.male=9794;e.mansyonsquare=13127;e.maqafhebrew=1470;e.mars=9794;e.masoracirclehebrew=1455;e.masquare=13187;e.mbopomofo=12551;e.mbsquare=13268;e.mcircle=9436;e.mcubedsquare=13221;e.mdotaccent=7745;e.mdotbelow=7747;e.meemarabic=1605;e.meemfinalarabic=65250;e.meeminitialarabic=65251;e.meemmedialarabic=65252;e.meemmeeminitialarabic=64721;e.meemmeemisolatedarabic=64584;e.meetorusquare=13133;e\ .mehiragana=12417;e.meizierasquare=13182;e.mekatakana=12513;e.mekatakanahalfwidth=65426;e.mem=1502;e.memdagesh=64318;e.memdageshhebrew=64318;e.memhebrew=1502;e.menarmenian=1396;e.merkhahebrew=1445;e.merkhakefulahebrew=1446;e.merkhakefulalefthebrew=1446;e.merkhalefthebrew=1445;e.mhook=625;e.mhzsquare=13202;e.middledotkatakanahalfwidth=65381;e.middot=183;e.mieumacirclekorean=12914;e.mieumaparenkorean=12818;e.mieumcirclekorean=12900;e.mieumkorean=12609;e.mieumpansioskorean=12656;e.mieumparenkorean=\ 12804;e.mieumpieupkorean=12654;e.mieumsioskorean=12655;e.mihiragana=12415;e.mikatakana=12511;e.mikatakanahalfwidth=65424;e.minus=8722;e.minusbelowcmb=800;e.minuscircle=8854;e.minusmod=727;e.minusplus=8723;e.minute=8242;e.miribaarusquare=13130;e.mirisquare=13129;e.mlonglegturned=624;e.mlsquare=13206;e.mmcubedsquare=13219;e.mmonospace=65357;e.mmsquaredsquare=13215;e.mohiragana=12418;e.mohmsquare=13249;e.mokatakana=12514;e.mokatakanahalfwidth=65427;e.molsquare=13270;e.momathai=3617;e.moverssquare=1\ 3223;e.moverssquaredsquare=13224;e.mparen=9384;e.mpasquare=13227;e.mssquare=13235;e.msuperior=63215;e.mturned=623;e.mu=181;e.mu1=181;e.muasquare=13186;e.muchgreater=8811;e.muchless=8810;e.mufsquare=13196;e.mugreek=956;e.mugsquare=13197;e.muhiragana=12416;e.mukatakana=12512;e.mukatakanahalfwidth=65425;e.mulsquare=13205;e.multiply=215;e.mumsquare=13211;e.munahhebrew=1443;e.munahlefthebrew=1443;e.musicalnote=9834;e.musicalnotedbl=9835;e.musicflatsign=9837;e.musicsharpsign=9839;e.mussquare=13234;e.m\ uvsquare=13238;e.muwsquare=13244;e.mvmegasquare=13241;e.mvsquare=13239;e.mwmegasquare=13247;e.mwsquare=13245;e.n=110;e.nabengali=2472;e.nabla=8711;e.nacute=324;e.nadeva=2344;e.nagujarati=2728;e.nagurmukhi=2600;e.nahiragana=12394;e.nakatakana=12490;e.nakatakanahalfwidth=65413;e.napostrophe=329;e.nasquare=13185;e.nbopomofo=12555;e.nbspace=160;e.ncaron=328;e.ncedilla=326;e.ncircle=9437;e.ncircumflexbelow=7755;e.ncommaaccent=326;e.ndotaccent=7749;e.ndotbelow=7751;e.nehiragana=12397;e.nekatakana=1249\ 3;e.nekatakanahalfwidth=65416;e.newsheqelsign=8362;e.nfsquare=13195;e.ngabengali=2457;e.ngadeva=2329;e.ngagujarati=2713;e.ngagurmukhi=2585;e.ngonguthai=3591;e.nhiragana=12435;e.nhookleft=626;e.nhookretroflex=627;e.nieunacirclekorean=12911;e.nieunaparenkorean=12815;e.nieuncieuckorean=12597;e.nieuncirclekorean=12897;e.nieunhieuhkorean=12598;e.nieunkorean=12596;e.nieunpansioskorean=12648;e.nieunparenkorean=12801;e.nieunsioskorean=12647;e.nieuntikeutkorean=12646;e.nihiragana=12395;e.nikatakana=12491\ ;e.nikatakanahalfwidth=65414;e.nikhahitleftthai=63641;e.nikhahitthai=3661;e.nine=57;e.ninearabic=1641;e.ninebengali=2543;e.ninecircle=9320;e.ninecircleinversesansserif=10130;e.ninedeva=2415;e.ninegujarati=2799;e.ninegurmukhi=2671;e.ninehackarabic=1641;e.ninehangzhou=12329;e.nineideographicparen=12840;e.nineinferior=8329;e.ninemonospace=65305;e.nineoldstyle=63289;e.nineparen=9340;e.nineperiod=9360;e.ninepersian=1785;e.nineroman=8568;e.ninesuperior=8313;e.nineteencircle=9330;e.nineteenparen=9350;e\ .nineteenperiod=9370;e.ninethai=3673;e.nj=460;e.njecyrillic=1114;e.nkatakana=12531;e.nkatakanahalfwidth=65437;e.nlegrightlong=414;e.nlinebelow=7753;e.nmonospace=65358;e.nmsquare=13210;e.nnabengali=2467;e.nnadeva=2339;e.nnagujarati=2723;e.nnagurmukhi=2595;e.nnnadeva=2345;e.nohiragana=12398;e.nokatakana=12494;e.nokatakanahalfwidth=65417;e.nonbreakingspace=160;e.nonenthai=3603;e.nonuthai=3609;e.noonarabic=1606;e.noonfinalarabic=65254;e.noonghunnaarabic=1722;e.noonghunnafinalarabic=64415;e.nooniniti\ alarabic=65255;e.noonjeeminitialarabic=64722;e.noonjeemisolatedarabic=64587;e.noonmedialarabic=65256;e.noonmeeminitialarabic=64725;e.noonmeemisolatedarabic=64590;e.noonnoonfinalarabic=64653;e.notcontains=8716;e.notelement=8713;e.notelementof=8713;e.notequal=8800;e.notgreater=8815;e.notgreaternorequal=8817;e.notgreaternorless=8825;e.notidentical=8802;e.notless=8814;e.notlessnorequal=8816;e.notparallel=8742;e.notprecedes=8832;e.notsubset=8836;e.notsucceeds=8833;e.notsuperset=8837;e.nowarmenian=139\ 8;e.nparen=9385;e.nssquare=13233;e.nsuperior=8319;e.ntilde=241;e.nu=957;e.nuhiragana=12396;e.nukatakana=12492;e.nukatakanahalfwidth=65415;e.nuktabengali=2492;e.nuktadeva=2364;e.nuktagujarati=2748;e.nuktagurmukhi=2620;e.numbersign=35;e.numbersignmonospace=65283;e.numbersignsmall=65119;e.numeralsigngreek=884;e.numeralsignlowergreek=885;e.numero=8470;e.nun=1504;e.nundagesh=64320;e.nundageshhebrew=64320;e.nunhebrew=1504;e.nvsquare=13237;e.nwsquare=13243;e.nyabengali=2462;e.nyadeva=2334;e.nyagujarati\ =2718;e.nyagurmukhi=2590;e.o=111;e.oacute=243;e.oangthai=3629;e.obarred=629;e.obarredcyrillic=1257;e.obarreddieresiscyrillic=1259;e.obengali=2451;e.obopomofo=12571;e.obreve=335;e.ocandradeva=2321;e.ocandragujarati=2705;e.ocandravowelsigndeva=2377;e.ocandravowelsigngujarati=2761;e.ocaron=466;e.ocircle=9438;e.ocircumflex=244;e.ocircumflexacute=7889;e.ocircumflexdotbelow=7897;e.ocircumflexgrave=7891;e.ocircumflexhookabove=7893;e.ocircumflextilde=7895;e.ocyrillic=1086;e.odblacute=337;e.odblgrave=525\ ;e.odeva=2323;e.odieresis=246;e.odieresiscyrillic=1255;e.odotbelow=7885;e.oe=339;e.oekorean=12634;e.ogonek=731;e.ogonekcmb=808;e.ograve=242;e.ogujarati=2707;e.oharmenian=1413;e.ohiragana=12362;e.ohookabove=7887;e.ohorn=417;e.ohornacute=7899;e.ohorndotbelow=7907;e.ohorngrave=7901;e.ohornhookabove=7903;e.ohorntilde=7905;e.ohungarumlaut=337;e.oi=419;e.oinvertedbreve=527;e.okatakana=12458;e.okatakanahalfwidth=65397;e.okorean=12631;e.olehebrew=1451;e.omacron=333;e.omacronacute=7763;e.omacrongrave=776\ 1;e.omdeva=2384;e.omega=969;e.omega1=982;e.omegacyrillic=1121;e.omegalatinclosed=631;e.omegaroundcyrillic=1147;e.omegatitlocyrillic=1149;e.omegatonos=974;e.omgujarati=2768;e.omicron=959;e.omicrontonos=972;e.omonospace=65359;e.one=49;e.onearabic=1633;e.onebengali=2535;e.onecircle=9312;e.onecircleinversesansserif=10122;e.onedeva=2407;e.onedotenleader=8228;e.oneeighth=8539;e.onefitted=63196;e.onegujarati=2791;e.onegurmukhi=2663;e.onehackarabic=1633;e.onehalf=189;e.onehangzhou=12321;e.oneideographic\ paren=12832;e.oneinferior=8321;e.onemonospace=65297;e.onenumeratorbengali=2548;e.oneoldstyle=63281;e.oneparen=9332;e.oneperiod=9352;e.onepersian=1777;e.onequarter=188;e.oneroman=8560;e.onesuperior=185;e.onethai=3665;e.onethird=8531;e.oogonek=491;e.oogonekmacron=493;e.oogurmukhi=2579;e.oomatragurmukhi=2635;e.oopen=596;e.oparen=9386;e.openbullet=9702;e.option=8997;e.ordfeminine=170;e.ordmasculine=186;e.orthogonal=8735;e.oshortdeva=2322;e.oshortvowelsigndeva=2378;e.oslash=248;e.oslashacute=511;e.os\ mallhiragana=12361;e.osmallkatakana=12457;e.osmallkatakanahalfwidth=65387;e.ostrokeacute=511;e.osuperior=63216;e.otcyrillic=1151;e.otilde=245;e.otildeacute=7757;e.otildedieresis=7759;e.oubopomofo=12577;e.overline=8254;e.overlinecenterline=65098;e.overlinecmb=773;e.overlinedashed=65097;e.overlinedblwavy=65100;e.overlinewavy=65099;e.overscore=175;e.ovowelsignbengali=2507;e.ovowelsigndeva=2379;e.ovowelsigngujarati=2763;e.p=112;e.paampssquare=13184;e.paasentosquare=13099;e.pabengali=2474;e.pacute=77\ 65;e.padeva=2346;e.pagedown=8671;e.pageup=8670;e.pagujarati=2730;e.pagurmukhi=2602;e.pahiragana=12401;e.paiyannoithai=3631;e.pakatakana=12497;e.palatalizationcyrilliccmb=1156;e.palochkacyrillic=1216;e.pansioskorean=12671;e.paragraph=182;e.parallel=8741;e.parenleft=40;e.parenleftaltonearabic=64830;e.parenleftbt=63725;e.parenleftex=63724;e.parenleftinferior=8333;e.parenleftmonospace=65288;e.parenleftsmall=65113;e.parenleftsuperior=8317;e.parenlefttp=63723;e.parenleftvertical=65077;e.parenright=41;\ e.parenrightaltonearabic=64831;e.parenrightbt=63736;e.parenrightex=63735;e.parenrightinferior=8334;e.parenrightmonospace=65289;e.parenrightsmall=65114;e.parenrightsuperior=8318;e.parenrighttp=63734;e.parenrightvertical=65078;e.partialdiff=8706;e.paseqhebrew=1472;e.pashtahebrew=1433;e.pasquare=13225;e.patah=1463;e.patah11=1463;e.patah1d=1463;e.patah2a=1463;e.patahhebrew=1463;e.patahnarrowhebrew=1463;e.patahquarterhebrew=1463;e.patahwidehebrew=1463;e.pazerhebrew=1441;e.pbopomofo=12550;e.pcircle=94\ 39;e.pdotaccent=7767;e.pe=1508;e.pecyrillic=1087;e.pedagesh=64324;e.pedageshhebrew=64324;e.peezisquare=13115;e.pefinaldageshhebrew=64323;e.peharabic=1662;e.peharmenian=1402;e.pehebrew=1508;e.pehfinalarabic=64343;e.pehinitialarabic=64344;e.pehiragana=12410;e.pehmedialarabic=64345;e.pekatakana=12506;e.pemiddlehookcyrillic=1191;e.perafehebrew=64334;e.percent=37;e.percentarabic=1642;e.percentmonospace=65285;e.percentsmall=65130;e.period=46;e.periodarmenian=1417;e.periodcentered=183;e.periodhalfwidth\ =65377;e.periodinferior=63207;e.periodmonospace=65294;e.periodsmall=65106;e.periodsuperior=63208;e.perispomenigreekcmb=834;e.perpendicular=8869;e.perthousand=8240;e.peseta=8359;e.pfsquare=13194;e.phabengali=2475;e.phadeva=2347;e.phagujarati=2731;e.phagurmukhi=2603;e.phi=966;e.phi1=981;e.phieuphacirclekorean=12922;e.phieuphaparenkorean=12826;e.phieuphcirclekorean=12908;e.phieuphkorean=12621;e.phieuphparenkorean=12812;e.philatin=632;e.phinthuthai=3642;e.phisymbolgreek=981;e.phook=421;e.phophanthai\ =3614;e.phophungthai=3612;e.phosamphaothai=3616;e.pi=960;e.pieupacirclekorean=12915;e.pieupaparenkorean=12819;e.pieupcieuckorean=12662;e.pieupcirclekorean=12901;e.pieupkiyeokkorean=12658;e.pieupkorean=12610;e.pieupparenkorean=12805;e.pieupsioskiyeokkorean=12660;e.pieupsioskorean=12612;e.pieupsiostikeutkorean=12661;e.pieupthieuthkorean=12663;e.pieuptikeutkorean=12659;e.pihiragana=12404;e.pikatakana=12500;e.pisymbolgreek=982;e.piwrarmenian=1411;e.planckover2pi=8463;e.planckover2pi1=8463;e.plus=43;\ e.plusbelowcmb=799;e.pluscircle=8853;e.plusminus=177;e.plusmod=726;e.plusmonospace=65291;e.plussmall=65122;e.plussuperior=8314;e.pmonospace=65360;e.pmsquare=13272;e.pohiragana=12413;e.pointingindexdownwhite=9759;e.pointingindexleftwhite=9756;e.pointingindexrightwhite=9758;e.pointingindexupwhite=9757;e.pokatakana=12509;e.poplathai=3611;e.postalmark=12306;e.postalmarkface=12320;e.pparen=9387;e.precedes=8826;e.prescription=8478;e.primemod=697;e.primereversed=8245;e.product=8719;e.projective=8965;e.\ prolongedkana=12540;e.propellor=8984;e.propersubset=8834;e.propersuperset=8835;e.proportion=8759;e.proportional=8733;e.psi=968;e.psicyrillic=1137;e.psilipneumatacyrilliccmb=1158;e.pssquare=13232;e.puhiragana=12407;e.pukatakana=12503;e.pvsquare=13236;e.pwsquare=13242;e.q=113;e.qadeva=2392;e.qadmahebrew=1448;e.qafarabic=1602;e.qaffinalarabic=65238;e.qafinitialarabic=65239;e.qafmedialarabic=65240;e.qamats=1464;e.qamats10=1464;e.qamats1a=1464;e.qamats1c=1464;e.qamats27=1464;e.qamats29=1464;e.qamats3\ 3=1464;e.qamatsde=1464;e.qamatshebrew=1464;e.qamatsnarrowhebrew=1464;e.qamatsqatanhebrew=1464;e.qamatsqatannarrowhebrew=1464;e.qamatsqatanquarterhebrew=1464;e.qamatsqatanwidehebrew=1464;e.qamatsquarterhebrew=1464;e.qamatswidehebrew=1464;e.qarneyparahebrew=1439;e.qbopomofo=12561;e.qcircle=9440;e.qhook=672;e.qmonospace=65361;e.qof=1511;e.qofdagesh=64327;e.qofdageshhebrew=64327;e.qofhebrew=1511;e.qparen=9388;e.quarternote=9833;e.qubuts=1467;e.qubuts18=1467;e.qubuts25=1467;e.qubuts31=1467;e.qubutshe\ brew=1467;e.qubutsnarrowhebrew=1467;e.qubutsquarterhebrew=1467;e.qubutswidehebrew=1467;e.question=63;e.questionarabic=1567;e.questionarmenian=1374;e.questiondown=191;e.questiondownsmall=63423;e.questiongreek=894;e.questionmonospace=65311;e.questionsmall=63295;e.quotedbl=34;e.quotedblbase=8222;e.quotedblleft=8220;e.quotedblmonospace=65282;e.quotedblprime=12318;e.quotedblprimereversed=12317;e.quotedblright=8221;e.quoteleft=8216;e.quoteleftreversed=8219;e.quotereversed=8219;e.quoteright=8217;e.quot\ erightn=329;e.quotesinglbase=8218;e.quotesingle=39;e.quotesinglemonospace=65287;e.r=114;e.raarmenian=1404;e.rabengali=2480;e.racute=341;e.radeva=2352;e.radical=8730;e.radicalex=63717;e.radoverssquare=13230;e.radoverssquaredsquare=13231;e.radsquare=13229;e.rafe=1471;e.rafehebrew=1471;e.ragujarati=2736;e.ragurmukhi=2608;e.rahiragana=12425;e.rakatakana=12521;e.rakatakanahalfwidth=65431;e.ralowerdiagonalbengali=2545;e.ramiddlediagonalbengali=2544;e.ramshorn=612;e.ratio=8758;e.rbopomofo=12566;e.rcaro\ n=345;e.rcedilla=343;e.rcircle=9441;e.rcommaaccent=343;e.rdblgrave=529;e.rdotaccent=7769;e.rdotbelow=7771;e.rdotbelowmacron=7773;e.referencemark=8251;e.reflexsubset=8838;e.reflexsuperset=8839;e.registered=174;e.registersans=63720;e.registerserif=63194;e.reharabic=1585;e.reharmenian=1408;e.rehfinalarabic=65198;e.rehiragana=12428;e.rekatakana=12524;e.rekatakanahalfwidth=65434;e.resh=1512;e.reshdageshhebrew=64328;e.reshhebrew=1512;e.reversedtilde=8765;e.reviahebrew=1431;e.reviamugrashhebrew=1431;e.\ revlogicalnot=8976;e.rfishhook=638;e.rfishhookreversed=639;e.rhabengali=2525;e.rhadeva=2397;e.rho=961;e.rhook=637;e.rhookturned=635;e.rhookturnedsuperior=693;e.rhosymbolgreek=1009;e.rhotichookmod=734;e.rieulacirclekorean=12913;e.rieulaparenkorean=12817;e.rieulcirclekorean=12899;e.rieulhieuhkorean=12608;e.rieulkiyeokkorean=12602;e.rieulkiyeoksioskorean=12649;e.rieulkorean=12601;e.rieulmieumkorean=12603;e.rieulpansioskorean=12652;e.rieulparenkorean=12803;e.rieulphieuphkorean=12607;e.rieulpieupkore\ an=12604;e.rieulpieupsioskorean=12651;e.rieulsioskorean=12605;e.rieulthieuthkorean=12606;e.rieultikeutkorean=12650;e.rieulyeorinhieuhkorean=12653;e.rightangle=8735;e.righttackbelowcmb=793;e.righttriangle=8895;e.rihiragana=12426;e.rikatakana=12522;e.rikatakanahalfwidth=65432;e.ring=730;e.ringbelowcmb=805;e.ringcmb=778;e.ringhalfleft=703;e.ringhalfleftarmenian=1369;e.ringhalfleftbelowcmb=796;e.ringhalfleftcentered=723;e.ringhalfright=702;e.ringhalfrightbelowcmb=825;e.ringhalfrightcentered=722;e.ri\ nvertedbreve=531;e.rittorusquare=13137;e.rlinebelow=7775;e.rlongleg=636;e.rlonglegturned=634;e.rmonospace=65362;e.rohiragana=12429;e.rokatakana=12525;e.rokatakanahalfwidth=65435;e.roruathai=3619;e.rparen=9389;e.rrabengali=2524;e.rradeva=2353;e.rragurmukhi=2652;e.rreharabic=1681;e.rrehfinalarabic=64397;e.rrvocalicbengali=2528;e.rrvocalicdeva=2400;e.rrvocalicgujarati=2784;e.rrvocalicvowelsignbengali=2500;e.rrvocalicvowelsigndeva=2372;e.rrvocalicvowelsigngujarati=2756;e.rsuperior=63217;e.rtblock=96\ 16;e.rturned=633;e.rturnedsuperior=692;e.ruhiragana=12427;e.rukatakana=12523;e.rukatakanahalfwidth=65433;e.rupeemarkbengali=2546;e.rupeesignbengali=2547;e.rupiah=63197;e.ruthai=3620;e.rvocalicbengali=2443;e.rvocalicdeva=2315;e.rvocalicgujarati=2699;e.rvocalicvowelsignbengali=2499;e.rvocalicvowelsigndeva=2371;e.rvocalicvowelsigngujarati=2755;e.s=115;e.sabengali=2488;e.sacute=347;e.sacutedotaccent=7781;e.sadarabic=1589;e.sadeva=2360;e.sadfinalarabic=65210;e.sadinitialarabic=65211;e.sadmedialarabic\ =65212;e.sagujarati=2744;e.sagurmukhi=2616;e.sahiragana=12373;e.sakatakana=12469;e.sakatakanahalfwidth=65403;e.sallallahoualayhewasallamarabic=65018;e.samekh=1505;e.samekhdagesh=64321;e.samekhdageshhebrew=64321;e.samekhhebrew=1505;e.saraaathai=3634;e.saraaethai=3649;e.saraaimaimalaithai=3652;e.saraaimaimuanthai=3651;e.saraamthai=3635;e.saraathai=3632;e.saraethai=3648;e.saraiileftthai=63622;e.saraiithai=3637;e.saraileftthai=63621;e.saraithai=3636;e.saraothai=3650;e.saraueeleftthai=63624;e.sarauee\ thai=3639;e.saraueleftthai=63623;e.sarauethai=3638;e.sarauthai=3640;e.sarauuthai=3641;e.sbopomofo=12569;e.scaron=353;e.scarondotaccent=7783;e.scedilla=351;e.schwa=601;e.schwacyrillic=1241;e.schwadieresiscyrillic=1243;e.schwahook=602;e.scircle=9442;e.scircumflex=349;e.scommaaccent=537;e.sdotaccent=7777;e.sdotbelow=7779;e.sdotbelowdotaccent=7785;e.seagullbelowcmb=828;e.second=8243;e.secondtonechinese=714;e.section=167;e.seenarabic=1587;e.seenfinalarabic=65202;e.seeninitialarabic=65203;e.seenmedial\ arabic=65204;e.segol=1462;e.segol13=1462;e.segol1f=1462;e.segol2c=1462;e.segolhebrew=1462;e.segolnarrowhebrew=1462;e.segolquarterhebrew=1462;e.segoltahebrew=1426;e.segolwidehebrew=1462;e.seharmenian=1405;e.sehiragana=12379;e.sekatakana=12475;e.sekatakanahalfwidth=65406;e.semicolon=59;e.semicolonarabic=1563;e.semicolonmonospace=65307;e.semicolonsmall=65108;e.semivoicedmarkkana=12444;e.semivoicedmarkkanahalfwidth=65439;e.sentisquare=13090;e.sentosquare=13091;e.seven=55;e.sevenarabic=1639;e.sevenbe\ ngali=2541;e.sevencircle=9318;e.sevencircleinversesansserif=10128;e.sevendeva=2413;e.seveneighths=8542;e.sevengujarati=2797;e.sevengurmukhi=2669;e.sevenhackarabic=1639;e.sevenhangzhou=12327;e.sevenideographicparen=12838;e.seveninferior=8327;e.sevenmonospace=65303;e.sevenoldstyle=63287;e.sevenparen=9338;e.sevenperiod=9358;e.sevenpersian=1783;e.sevenroman=8566;e.sevensuperior=8311;e.seventeencircle=9328;e.seventeenparen=9348;e.seventeenperiod=9368;e.seventhai=3671;e.sfthyphen=173;e.shaarmenian=139\ 9;e.shabengali=2486;e.shacyrillic=1096;e.shaddaarabic=1617;e.shaddadammaarabic=64609;e.shaddadammatanarabic=64606;e.shaddafathaarabic=64608;e.shaddakasraarabic=64610;e.shaddakasratanarabic=64607;e.shade=9618;e.shadedark=9619;e.shadelight=9617;e.shademedium=9618;e.shadeva=2358;e.shagujarati=2742;e.shagurmukhi=2614;e.shalshelethebrew=1427;e.shbopomofo=12565;e.shchacyrillic=1097;e.sheenarabic=1588;e.sheenfinalarabic=65206;e.sheeninitialarabic=65207;e.sheenmedialarabic=65208;e.sheicoptic=995;e.sheqe\ l=8362;e.sheqelhebrew=8362;e.sheva=1456;e.sheva115=1456;e.sheva15=1456;e.sheva22=1456;e.sheva2e=1456;e.shevahebrew=1456;e.shevanarrowhebrew=1456;e.shevaquarterhebrew=1456;e.shevawidehebrew=1456;e.shhacyrillic=1211;e.shimacoptic=1005;e.shin=1513;e.shindagesh=64329;e.shindageshhebrew=64329;e.shindageshshindot=64300;e.shindageshshindothebrew=64300;e.shindageshsindot=64301;e.shindageshsindothebrew=64301;e.shindothebrew=1473;e.shinhebrew=1513;e.shinshindot=64298;e.shinshindothebrew=64298;e.shinsindot\ =64299;e.shinsindothebrew=64299;e.shook=642;e.sigma=963;e.sigma1=962;e.sigmafinal=962;e.sigmalunatesymbolgreek=1010;e.sihiragana=12375;e.sikatakana=12471;e.sikatakanahalfwidth=65404;e.siluqhebrew=1469;e.siluqlefthebrew=1469;e.similar=8764;e.sindothebrew=1474;e.siosacirclekorean=12916;e.siosaparenkorean=12820;e.sioscieuckorean=12670;e.sioscirclekorean=12902;e.sioskiyeokkorean=12666;e.sioskorean=12613;e.siosnieunkorean=12667;e.siosparenkorean=12806;e.siospieupkorean=12669;e.siostikeutkorean=12668;\ e.six=54;e.sixarabic=1638;e.sixbengali=2540;e.sixcircle=9317;e.sixcircleinversesansserif=10127;e.sixdeva=2412;e.sixgujarati=2796;e.sixgurmukhi=2668;e.sixhackarabic=1638;e.sixhangzhou=12326;e.sixideographicparen=12837;e.sixinferior=8326;e.sixmonospace=65302;e.sixoldstyle=63286;e.sixparen=9337;e.sixperiod=9357;e.sixpersian=1782;e.sixroman=8565;e.sixsuperior=8310;e.sixteencircle=9327;e.sixteencurrencydenominatorbengali=2553;e.sixteenparen=9347;e.sixteenperiod=9367;e.sixthai=3670;e.slash=47;e.slashm\ onospace=65295;e.slong=383;e.slongdotaccent=7835;e.smileface=9786;e.smonospace=65363;e.sofpasuqhebrew=1475;e.softhyphen=173;e.softsigncyrillic=1100;e.sohiragana=12381;e.sokatakana=12477;e.sokatakanahalfwidth=65407;e.soliduslongoverlaycmb=824;e.solidusshortoverlaycmb=823;e.sorusithai=3625;e.sosalathai=3624;e.sosothai=3595;e.sosuathai=3626;e.space=32;e.spacehackarabic=32;e.spade=9824;e.spadesuitblack=9824;e.spadesuitwhite=9828;e.sparen=9390;e.squarebelowcmb=827;e.squarecc=13252;e.squarecm=13213;e.\ squarediagonalcrosshatchfill=9641;e.squarehorizontalfill=9636;e.squarekg=13199;e.squarekm=13214;e.squarekmcapital=13262;e.squareln=13265;e.squarelog=13266;e.squaremg=13198;e.squaremil=13269;e.squaremm=13212;e.squaremsquared=13217;e.squareorthogonalcrosshatchfill=9638;e.squareupperlefttolowerrightfill=9639;e.squareupperrighttolowerleftfill=9640;e.squareverticalfill=9637;e.squarewhitewithsmallblack=9635;e.srsquare=13275;e.ssabengali=2487;e.ssadeva=2359;e.ssagujarati=2743;e.ssangcieuckorean=12617;e\ .ssanghieuhkorean=12677;e.ssangieungkorean=12672;e.ssangkiyeokkorean=12594;e.ssangnieunkorean=12645;e.ssangpieupkorean=12611;e.ssangsioskorean=12614;e.ssangtikeutkorean=12600;e.ssuperior=63218;e.sterling=163;e.sterlingmonospace=65505;e.strokelongoverlaycmb=822;e.strokeshortoverlaycmb=821;e.subset=8834;e.subsetnotequal=8842;e.subsetorequal=8838;e.succeeds=8827;e.suchthat=8715;e.suhiragana=12377;e.sukatakana=12473;e.sukatakanahalfwidth=65405;e.sukunarabic=1618;e.summation=8721;e.sun=9788;e.superse\ t=8835;e.supersetnotequal=8843;e.supersetorequal=8839;e.svsquare=13276;e.syouwaerasquare=13180;e.t=116;e.tabengali=2468;e.tackdown=8868;e.tackleft=8867;e.tadeva=2340;e.tagujarati=2724;e.tagurmukhi=2596;e.taharabic=1591;e.tahfinalarabic=65218;e.tahinitialarabic=65219;e.tahiragana=12383;e.tahmedialarabic=65220;e.taisyouerasquare=13181;e.takatakana=12479;e.takatakanahalfwidth=65408;e.tatweelarabic=1600;e.tau=964;e.tav=1514;e.tavdages=64330;e.tavdagesh=64330;e.tavdageshhebrew=64330;e.tavhebrew=1514;\ e.tbar=359;e.tbopomofo=12554;e.tcaron=357;e.tccurl=680;e.tcedilla=355;e.tcheharabic=1670;e.tchehfinalarabic=64379;e.tchehinitialarabic=64380;e.tchehmedialarabic=64381;e.tcircle=9443;e.tcircumflexbelow=7793;e.tcommaaccent=355;e.tdieresis=7831;e.tdotaccent=7787;e.tdotbelow=7789;e.tecyrillic=1090;e.tedescendercyrillic=1197;e.teharabic=1578;e.tehfinalarabic=65174;e.tehhahinitialarabic=64674;e.tehhahisolatedarabic=64524;e.tehinitialarabic=65175;e.tehiragana=12390;e.tehjeeminitialarabic=64673;e.tehjee\ misolatedarabic=64523;e.tehmarbutaarabic=1577;e.tehmarbutafinalarabic=65172;e.tehmedialarabic=65176;e.tehmeeminitialarabic=64676;e.tehmeemisolatedarabic=64526;e.tehnoonfinalarabic=64627;e.tekatakana=12486;e.tekatakanahalfwidth=65411;e.telephone=8481;e.telephoneblack=9742;e.telishagedolahebrew=1440;e.telishaqetanahebrew=1449;e.tencircle=9321;e.tenideographicparen=12841;e.tenparen=9341;e.tenperiod=9361;e.tenroman=8569;e.tesh=679;e.tet=1496;e.tetdagesh=64312;e.tetdageshhebrew=64312;e.tethebrew=1496\ ;e.tetsecyrillic=1205;e.tevirhebrew=1435;e.tevirlefthebrew=1435;e.thabengali=2469;e.thadeva=2341;e.thagujarati=2725;e.thagurmukhi=2597;e.thalarabic=1584;e.thalfinalarabic=65196;e.thanthakhatlowleftthai=63640;e.thanthakhatlowrightthai=63639;e.thanthakhatthai=3660;e.thanthakhatupperleftthai=63638;e.theharabic=1579;e.thehfinalarabic=65178;e.thehinitialarabic=65179;e.thehmedialarabic=65180;e.thereexists=8707;e.therefore=8756;e.theta=952;e.theta1=977;e.thetasymbolgreek=977;e.thieuthacirclekorean=1292\ 1;e.thieuthaparenkorean=12825;e.thieuthcirclekorean=12907;e.thieuthkorean=12620;e.thieuthparenkorean=12811;e.thirteencircle=9324;e.thirteenparen=9344;e.thirteenperiod=9364;e.thonangmonthothai=3601;e.thook=429;e.thophuthaothai=3602;e.thorn=254;e.thothahanthai=3607;e.thothanthai=3600;e.thothongthai=3608;e.thothungthai=3606;e.thousandcyrillic=1154;e.thousandsseparatorarabic=1644;e.thousandsseparatorpersian=1644;e.three=51;e.threearabic=1635;e.threebengali=2537;e.threecircle=9314;e.threecircleinvers\ esansserif=10124;e.threedeva=2409;e.threeeighths=8540;e.threegujarati=2793;e.threegurmukhi=2665;e.threehackarabic=1635;e.threehangzhou=12323;e.threeideographicparen=12834;e.threeinferior=8323;e.threemonospace=65299;e.threenumeratorbengali=2550;e.threeoldstyle=63283;e.threeparen=9334;e.threeperiod=9354;e.threepersian=1779;e.threequarters=190;e.threequartersemdash=63198;e.threeroman=8562;e.threesuperior=179;e.threethai=3667;e.thzsquare=13204;e.tihiragana=12385;e.tikatakana=12481;e.tikatakanahalfwi\ dth=65409;e.tikeutacirclekorean=12912;e.tikeutaparenkorean=12816;e.tikeutcirclekorean=12898;e.tikeutkorean=12599;e.tikeutparenkorean=12802;e.tilde=732;e.tildebelowcmb=816;e.tildecmb=771;e.tildecomb=771;e.tildedoublecmb=864;e.tildeoperator=8764;e.tildeoverlaycmb=820;e.tildeverticalcmb=830;e.timescircle=8855;e.tipehahebrew=1430;e.tipehalefthebrew=1430;e.tippigurmukhi=2672;e.titlocyrilliccmb=1155;e.tiwnarmenian=1407;e.tlinebelow=7791;e.tmonospace=65364;e.toarmenian=1385;e.tohiragana=12392;e.tokatak\ ana=12488;e.tokatakanahalfwidth=65412;e.tonebarextrahighmod=741;e.tonebarextralowmod=745;e.tonebarhighmod=742;e.tonebarlowmod=744;e.tonebarmidmod=743;e.tonefive=445;e.tonesix=389;e.tonetwo=424;e.tonos=900;e.tonsquare=13095;e.topatakthai=3599;e.tortoiseshellbracketleft=12308;e.tortoiseshellbracketleftsmall=65117;e.tortoiseshellbracketleftvertical=65081;e.tortoiseshellbracketright=12309;e.tortoiseshellbracketrightsmall=65118;e.tortoiseshellbracketrightvertical=65082;e.totaothai=3605;e.tpalatalhook\ =427;e.tparen=9391;e.trademark=8482;e.trademarksans=63722;e.trademarkserif=63195;e.tretroflexhook=648;e.triagdn=9660;e.triaglf=9668;e.triagrt=9658;e.triagup=9650;e.ts=678;e.tsadi=1510;e.tsadidagesh=64326;e.tsadidageshhebrew=64326;e.tsadihebrew=1510;e.tsecyrillic=1094;e.tsere=1461;e.tsere12=1461;e.tsere1e=1461;e.tsere2b=1461;e.tserehebrew=1461;e.tserenarrowhebrew=1461;e.tserequarterhebrew=1461;e.tserewidehebrew=1461;e.tshecyrillic=1115;e.tsuperior=63219;e.ttabengali=2463;e.ttadeva=2335;e.ttagujar\ ati=2719;e.ttagurmukhi=2591;e.tteharabic=1657;e.ttehfinalarabic=64359;e.ttehinitialarabic=64360;e.ttehmedialarabic=64361;e.tthabengali=2464;e.tthadeva=2336;e.tthagujarati=2720;e.tthagurmukhi=2592;e.tturned=647;e.tuhiragana=12388;e.tukatakana=12484;e.tukatakanahalfwidth=65410;e.tusmallhiragana=12387;e.tusmallkatakana=12483;e.tusmallkatakanahalfwidth=65391;e.twelvecircle=9323;e.twelveparen=9343;e.twelveperiod=9363;e.twelveroman=8571;e.twentycircle=9331;e.twentyhangzhou=21316;e.twentyparen=9351;e.t\ wentyperiod=9371;e.two=50;e.twoarabic=1634;e.twobengali=2536;e.twocircle=9313;e.twocircleinversesansserif=10123;e.twodeva=2408;e.twodotenleader=8229;e.twodotleader=8229;e.twodotleadervertical=65072;e.twogujarati=2792;e.twogurmukhi=2664;e.twohackarabic=1634;e.twohangzhou=12322;e.twoideographicparen=12833;e.twoinferior=8322;e.twomonospace=65298;e.twonumeratorbengali=2549;e.twooldstyle=63282;e.twoparen=9333;e.twoperiod=9353;e.twopersian=1778;e.tworoman=8561;e.twostroke=443;e.twosuperior=178;e.twoth\ ai=3666;e.twothirds=8532;e.u=117;e.uacute=250;e.ubar=649;e.ubengali=2441;e.ubopomofo=12584;e.ubreve=365;e.ucaron=468;e.ucircle=9444;e.ucircumflex=251;e.ucircumflexbelow=7799;e.ucyrillic=1091;e.udattadeva=2385;e.udblacute=369;e.udblgrave=533;e.udeva=2313;e.udieresis=252;e.udieresisacute=472;e.udieresisbelow=7795;e.udieresiscaron=474;e.udieresiscyrillic=1265;e.udieresisgrave=476;e.udieresismacron=470;e.udotbelow=7909;e.ugrave=249;e.ugujarati=2697;e.ugurmukhi=2569;e.uhiragana=12358;e.uhookabove=791\ 1;e.uhorn=432;e.uhornacute=7913;e.uhorndotbelow=7921;e.uhorngrave=7915;e.uhornhookabove=7917;e.uhorntilde=7919;e.uhungarumlaut=369;e.uhungarumlautcyrillic=1267;e.uinvertedbreve=535;e.ukatakana=12454;e.ukatakanahalfwidth=65395;e.ukcyrillic=1145;e.ukorean=12636;e.umacron=363;e.umacroncyrillic=1263;e.umacrondieresis=7803;e.umatragurmukhi=2625;e.umonospace=65365;e.underscore=95;e.underscoredbl=8215;e.underscoremonospace=65343;e.underscorevertical=65075;e.underscorewavy=65103;e.union=8746;e.universal\ =8704;e.uogonek=371;e.uparen=9392;e.upblock=9600;e.upperdothebrew=1476;e.upsilon=965;e.upsilondieresis=971;e.upsilondieresistonos=944;e.upsilonlatin=650;e.upsilontonos=973;e.uptackbelowcmb=797;e.uptackmod=724;e.uragurmukhi=2675;e.uring=367;e.ushortcyrillic=1118;e.usmallhiragana=12357;e.usmallkatakana=12453;e.usmallkatakanahalfwidth=65385;e.ustraightcyrillic=1199;e.ustraightstrokecyrillic=1201;e.utilde=361;e.utildeacute=7801;e.utildebelow=7797;e.uubengali=2442;e.uudeva=2314;e.uugujarati=2698;e.uu\ gurmukhi=2570;e.uumatragurmukhi=2626;e.uuvowelsignbengali=2498;e.uuvowelsigndeva=2370;e.uuvowelsigngujarati=2754;e.uvowelsignbengali=2497;e.uvowelsigndeva=2369;e.uvowelsigngujarati=2753;e.v=118;e.vadeva=2357;e.vagujarati=2741;e.vagurmukhi=2613;e.vakatakana=12535;e.vav=1493;e.vavdagesh=64309;e.vavdagesh65=64309;e.vavdageshhebrew=64309;e.vavhebrew=1493;e.vavholam=64331;e.vavholamhebrew=64331;e.vavvavhebrew=1520;e.vavyodhebrew=1521;e.vcircle=9445;e.vdotbelow=7807;e.vecyrillic=1074;e.veharabic=1700;\ e.vehfinalarabic=64363;e.vehinitialarabic=64364;e.vehmedialarabic=64365;e.vekatakana=12537;e.venus=9792;e.verticalbar=124;e.verticallineabovecmb=781;e.verticallinebelowcmb=809;e.verticallinelowmod=716;e.verticallinemod=712;e.vewarmenian=1406;e.vhook=651;e.vikatakana=12536;e.viramabengali=2509;e.viramadeva=2381;e.viramagujarati=2765;e.visargabengali=2435;e.visargadeva=2307;e.visargagujarati=2691;e.vmonospace=65366;e.voarmenian=1400;e.voicediterationhiragana=12446;e.voicediterationkatakana=12542;e\ .voicedmarkkana=12443;e.voicedmarkkanahalfwidth=65438;e.vokatakana=12538;e.vparen=9393;e.vtilde=7805;e.vturned=652;e.vuhiragana=12436;e.vukatakana=12532;e.w=119;e.wacute=7811;e.waekorean=12633;e.wahiragana=12431;e.wakatakana=12527;e.wakatakanahalfwidth=65436;e.wakorean=12632;e.wasmallhiragana=12430;e.wasmallkatakana=12526;e.wattosquare=13143;e.wavedash=12316;e.wavyunderscorevertical=65076;e.wawarabic=1608;e.wawfinalarabic=65262;e.wawhamzaabovearabic=1572;e.wawhamzaabovefinalarabic=65158;e.wbsqua\ re=13277;e.wcircle=9446;e.wcircumflex=373;e.wdieresis=7813;e.wdotaccent=7815;e.wdotbelow=7817;e.wehiragana=12433;e.weierstrass=8472;e.wekatakana=12529;e.wekorean=12638;e.weokorean=12637;e.wgrave=7809;e.whitebullet=9702;e.whitecircle=9675;e.whitecircleinverse=9689;e.whitecornerbracketleft=12302;e.whitecornerbracketleftvertical=65091;e.whitecornerbracketright=12303;e.whitecornerbracketrightvertical=65092;e.whitediamond=9671;e.whitediamondcontainingblacksmalldiamond=9672;e.whitedownpointingsmalltri\ angle=9663;e.whitedownpointingtriangle=9661;e.whiteleftpointingsmalltriangle=9667;e.whiteleftpointingtriangle=9665;e.whitelenticularbracketleft=12310;e.whitelenticularbracketright=12311;e.whiterightpointingsmalltriangle=9657;e.whiterightpointingtriangle=9655;e.whitesmallsquare=9643;e.whitesmilingface=9786;e.whitesquare=9633;e.whitestar=9734;e.whitetelephone=9743;e.whitetortoiseshellbracketleft=12312;e.whitetortoiseshellbracketright=12313;e.whiteuppointingsmalltriangle=9653;e.whiteuppointingtrian\ gle=9651;e.wihiragana=12432;e.wikatakana=12528;e.wikorean=12639;e.wmonospace=65367;e.wohiragana=12434;e.wokatakana=12530;e.wokatakanahalfwidth=65382;e.won=8361;e.wonmonospace=65510;e.wowaenthai=3623;e.wparen=9394;e.wring=7832;e.wsuperior=695;e.wturned=653;e.wynn=447;e.x=120;e.xabovecmb=829;e.xbopomofo=12562;e.xcircle=9447;e.xdieresis=7821;e.xdotaccent=7819;e.xeharmenian=1389;e.xi=958;e.xmonospace=65368;e.xparen=9395;e.xsuperior=739;e.y=121;e.yaadosquare=13134;e.yabengali=2479;e.yacute=253;e.yade\ va=2351;e.yaekorean=12626;e.yagujarati=2735;e.yagurmukhi=2607;e.yahiragana=12420;e.yakatakana=12516;e.yakatakanahalfwidth=65428;e.yakorean=12625;e.yamakkanthai=3662;e.yasmallhiragana=12419;e.yasmallkatakana=12515;e.yasmallkatakanahalfwidth=65388;e.yatcyrillic=1123;e.ycircle=9448;e.ycircumflex=375;e.ydieresis=255;e.ydotaccent=7823;e.ydotbelow=7925;e.yeharabic=1610;e.yehbarreearabic=1746;e.yehbarreefinalarabic=64431;e.yehfinalarabic=65266;e.yehhamzaabovearabic=1574;e.yehhamzaabovefinalarabic=65162\ ;e.yehhamzaaboveinitialarabic=65163;e.yehhamzaabovemedialarabic=65164;e.yehinitialarabic=65267;e.yehmedialarabic=65268;e.yehmeeminitialarabic=64733;e.yehmeemisolatedarabic=64600;e.yehnoonfinalarabic=64660;e.yehthreedotsbelowarabic=1745;e.yekorean=12630;e.yen=165;e.yenmonospace=65509;e.yeokorean=12629;e.yeorinhieuhkorean=12678;e.yerahbenyomohebrew=1450;e.yerahbenyomolefthebrew=1450;e.yericyrillic=1099;e.yerudieresiscyrillic=1273;e.yesieungkorean=12673;e.yesieungpansioskorean=12675;e.yesieungsiosk\ orean=12674;e.yetivhebrew=1434;e.ygrave=7923;e.yhook=436;e.yhookabove=7927;e.yiarmenian=1397;e.yicyrillic=1111;e.yikorean=12642;e.yinyang=9775;e.yiwnarmenian=1410;e.ymonospace=65369;e.yod=1497;e.yoddagesh=64313;e.yoddageshhebrew=64313;e.yodhebrew=1497;e.yodyodhebrew=1522;e.yodyodpatahhebrew=64287;e.yohiragana=12424;e.yoikorean=12681;e.yokatakana=12520;e.yokatakanahalfwidth=65430;e.yokorean=12635;e.yosmallhiragana=12423;e.yosmallkatakana=12519;e.yosmallkatakanahalfwidth=65390;e.yotgreek=1011;e.yo\ yaekorean=12680;e.yoyakorean=12679;e.yoyakthai=3618;e.yoyingthai=3597;e.yparen=9396;e.ypogegrammeni=890;e.ypogegrammenigreekcmb=837;e.yr=422;e.yring=7833;e.ysuperior=696;e.ytilde=7929;e.yturned=654;e.yuhiragana=12422;e.yuikorean=12684;e.yukatakana=12518;e.yukatakanahalfwidth=65429;e.yukorean=12640;e.yusbigcyrillic=1131;e.yusbigiotifiedcyrillic=1133;e.yuslittlecyrillic=1127;e.yuslittleiotifiedcyrillic=1129;e.yusmallhiragana=12421;e.yusmallkatakana=12517;e.yusmallkatakanahalfwidth=65389;e.yuyekore\ an=12683;e.yuyeokorean=12682;e.yyabengali=2527;e.yyadeva=2399;e.z=122;e.zaarmenian=1382;e.zacute=378;e.zadeva=2395;e.zagurmukhi=2651;e.zaharabic=1592;e.zahfinalarabic=65222;e.zahinitialarabic=65223;e.zahiragana=12374;e.zahmedialarabic=65224;e.zainarabic=1586;e.zainfinalarabic=65200;e.zakatakana=12470;e.zaqefgadolhebrew=1429;e.zaqefqatanhebrew=1428;e.zarqahebrew=1432;e.zayin=1494;e.zayindagesh=64310;e.zayindageshhebrew=64310;e.zayinhebrew=1494;e.zbopomofo=12567;e.zcaron=382;e.zcircle=9449;e.zcirc\ umflex=7825;e.zcurl=657;e.zdot=380;e.zdotaccent=380;e.zdotbelow=7827;e.zecyrillic=1079;e.zedescendercyrillic=1177;e.zedieresiscyrillic=1247;e.zehiragana=12380;e.zekatakana=12476;e.zero=48;e.zeroarabic=1632;e.zerobengali=2534;e.zerodeva=2406;e.zerogujarati=2790;e.zerogurmukhi=2662;e.zerohackarabic=1632;e.zeroinferior=8320;e.zeromonospace=65296;e.zerooldstyle=63280;e.zeropersian=1776;e.zerosuperior=8304;e.zerothai=3664;e.zerowidthjoiner=65279;e.zerowidthnonjoiner=8204;e.zerowidthspace=8203;e.zeta=\ 950;e.zhbopomofo=12563;e.zhearmenian=1386;e.zhebrevecyrillic=1218;e.zhecyrillic=1078;e.zhedescendercyrillic=1175;e.zhedieresiscyrillic=1245;e.zihiragana=12376;e.zikatakana=12472;e.zinorhebrew=1454;e.zlinebelow=7829;e.zmonospace=65370;e.zohiragana=12382;e.zokatakana=12478;e.zparen=9397;e.zretroflexhook=656;e.zstroke=438;e.zuhiragana=12378;e.zukatakana=12474;e[".notdef"]=0;e.angbracketleftbig=9001;e.angbracketleftBig=9001;e.angbracketleftbigg=9001;e.angbracketleftBigg=9001;e.angbracketrightBig=900\ 2;e.angbracketrightbig=9002;e.angbracketrightBigg=9002;e.angbracketrightbigg=9002;e.arrowhookleft=8618;e.arrowhookright=8617;e.arrowlefttophalf=8636;e.arrowleftbothalf=8637;e.arrownortheast=8599;e.arrownorthwest=8598;e.arrowrighttophalf=8640;e.arrowrightbothalf=8641;e.arrowsoutheast=8600;e.arrowsouthwest=8601;e.backslashbig=8726;e.backslashBig=8726;e.backslashBigg=8726;e.backslashbigg=8726;e.bardbl=8214;e.bracehtipdownleft=65079;e.bracehtipdownright=65079;e.bracehtipupleft=65080;e.bracehtipuprig\ ht=65080;e.braceleftBig=123;e.braceleftbig=123;e.braceleftbigg=123;e.braceleftBigg=123;e.bracerightBig=125;e.bracerightbig=125;e.bracerightbigg=125;e.bracerightBigg=125;e.bracketleftbig=91;e.bracketleftBig=91;e.bracketleftbigg=91;e.bracketleftBigg=91;e.bracketrightBig=93;e.bracketrightbig=93;e.bracketrightbigg=93;e.bracketrightBigg=93;e.ceilingleftbig=8968;e.ceilingleftBig=8968;e.ceilingleftBigg=8968;e.ceilingleftbigg=8968;e.ceilingrightbig=8969;e.ceilingrightBig=8969;e.ceilingrightbigg=8969;e.c\ eilingrightBigg=8969;e.circledotdisplay=8857;e.circledottext=8857;e.circlemultiplydisplay=8855;e.circlemultiplytext=8855;e.circleplusdisplay=8853;e.circleplustext=8853;e.contintegraldisplay=8750;e.contintegraltext=8750;e.coproductdisplay=8720;e.coproducttext=8720;e.floorleftBig=8970;e.floorleftbig=8970;e.floorleftbigg=8970;e.floorleftBigg=8970;e.floorrightbig=8971;e.floorrightBig=8971;e.floorrightBigg=8971;e.floorrightbigg=8971;e.hatwide=770;e.hatwider=770;e.hatwidest=770;e.intercal=7488;e.integ\ raldisplay=8747;e.integraltext=8747;e.intersectiondisplay=8898;e.intersectiontext=8898;e.logicalanddisplay=8743;e.logicalandtext=8743;e.logicalordisplay=8744;e.logicalortext=8744;e.parenleftBig=40;e.parenleftbig=40;e.parenleftBigg=40;e.parenleftbigg=40;e.parenrightBig=41;e.parenrightbig=41;e.parenrightBigg=41;e.parenrightbigg=41;e.prime=8242;e.productdisplay=8719;e.producttext=8719;e.radicalbig=8730;e.radicalBig=8730;e.radicalBigg=8730;e.radicalbigg=8730;e.radicalbt=8730;e.radicaltp=8730;e.radic\ alvertex=8730;e.slashbig=47;e.slashBig=47;e.slashBigg=47;e.slashbigg=47;e.summationdisplay=8721;e.summationtext=8721;e.tildewide=732;e.tildewider=732;e.tildewidest=732;e.uniondisplay=8899;e.unionmultidisplay=8846;e.unionmultitext=8846;e.unionsqdisplay=8852;e.unionsqtext=8852;e.uniontext=8899;e.vextenddouble=8741;e.vextendsingle=8739})),Ir=getLookupTableFactory((function(e){e.space=32;e.a1=9985;e.a2=9986;e.a202=9987;e.a3=9988;e.a4=9742;e.a5=9990;e.a119=9991;e.a118=9992;e.a117=9993;e.a11=9755;e.a1\ 2=9758;e.a13=9996;e.a14=9997;e.a15=9998;e.a16=9999;e.a105=1e4;e.a17=10001;e.a18=10002;e.a19=10003;e.a20=10004;e.a21=10005;e.a22=10006;e.a23=10007;e.a24=10008;e.a25=10009;e.a26=10010;e.a27=10011;e.a28=10012;e.a6=10013;e.a7=10014;e.a8=10015;e.a9=10016;e.a10=10017;e.a29=10018;e.a30=10019;e.a31=10020;e.a32=10021;e.a33=10022;e.a34=10023;e.a35=9733;e.a36=10025;e.a37=10026;e.a38=10027;e.a39=10028;e.a40=10029;e.a41=10030;e.a42=10031;e.a43=10032;e.a44=10033;e.a45=10034;e.a46=10035;e.a47=10036;e.a48=10037\ ;e.a49=10038;e.a50=10039;e.a51=10040;e.a52=10041;e.a53=10042;e.a54=10043;e.a55=10044;e.a56=10045;e.a57=10046;e.a58=10047;e.a59=10048;e.a60=10049;e.a61=10050;e.a62=10051;e.a63=10052;e.a64=10053;e.a65=10054;e.a66=10055;e.a67=10056;e.a68=10057;e.a69=10058;e.a70=10059;e.a71=9679;e.a72=10061;e.a73=9632;e.a74=10063;e.a203=10064;e.a75=10065;e.a204=10066;e.a76=9650;e.a77=9660;e.a78=9670;e.a79=10070;e.a81=9687;e.a82=10072;e.a83=10073;e.a84=10074;e.a97=10075;e.a98=10076;e.a99=10077;e.a100=10078;e.a101=100\ 81;e.a102=10082;e.a103=10083;e.a104=10084;e.a106=10085;e.a107=10086;e.a108=10087;e.a112=9827;e.a111=9830;e.a110=9829;e.a109=9824;e.a120=9312;e.a121=9313;e.a122=9314;e.a123=9315;e.a124=9316;e.a125=9317;e.a126=9318;e.a127=9319;e.a128=9320;e.a129=9321;e.a130=10102;e.a131=10103;e.a132=10104;e.a133=10105;e.a134=10106;e.a135=10107;e.a136=10108;e.a137=10109;e.a138=10110;e.a139=10111;e.a140=10112;e.a141=10113;e.a142=10114;e.a143=10115;e.a144=10116;e.a145=10117;e.a146=10118;e.a147=10119;e.a148=10120;e.a1\ 49=10121;e.a150=10122;e.a151=10123;e.a152=10124;e.a153=10125;e.a154=10126;e.a155=10127;e.a156=10128;e.a157=10129;e.a158=10130;e.a159=10131;e.a160=10132;e.a161=8594;e.a163=8596;e.a164=8597;e.a196=10136;e.a165=10137;e.a192=10138;e.a166=10139;e.a167=10140;e.a168=10141;e.a169=10142;e.a170=10143;e.a171=10144;e.a172=10145;e.a173=10146;e.a162=10147;e.a174=10148;e.a175=10149;e.a176=10150;e.a177=10151;e.a178=10152;e.a179=10153;e.a193=10154;e.a180=10155;e.a199=10156;e.a181=10157;e.a200=10158;e.a182=10159;\ e.a201=10161;e.a183=10162;e.a184=10163;e.a197=10164;e.a185=10165;e.a194=10166;e.a198=10167;e.a186=10168;e.a195=10169;e.a187=10170;e.a188=10171;e.a189=10172;e.a190=10173;e.a191=10174;e.a89=10088;e.a90=10089;e.a93=10090;e.a94=10091;e.a91=10092;e.a92=10093;e.a205=10094;e.a85=10095;e.a206=10096;e.a86=10097;e.a87=10098;e.a88=10099;e.a95=10100;e.a96=10101;e[".notdef"]=0})),Tr=getLookupTableFactory((function(e){e[63721]=169;e[63193]=169;e[63720]=174;e[63194]=174;e[63722]=8482;e[63195]=8482;e[63729]=912\ 7;e[63730]=9128;e[63731]=9129;e[63740]=9131;e[63741]=9132;e[63742]=9133;e[63726]=9121;e[63727]=9122;e[63728]=9123;e[63737]=9124;e[63738]=9125;e[63739]=9126;e[63723]=9115;e[63724]=9116;e[63725]=9117;e[63734]=9118;e[63735]=9119;e[63736]=9120}));function getUnicodeForGlyph(e,t){let a=t[e];if(void 0!==a)return a;if(!e)return-1;if("u"===e[0]){const t=e.length;let r;if(7===t&&"n"===e[1]&&"i"===e[2])r=e.substring(3);else{if(!(t>=5&&t<=7))return-1;r=e.substring(1)}if(r===r.toUpperCase()){a=parseInt(r,16\ );if(a>=0)return a}}return-1}const Or=[[0,127],[128,255],[256,383],[384,591],[592,687,7424,7551,7552,7615],[688,767,42752,42783],[768,879,7616,7679],[880,1023],[11392,11519],[1024,1279,1280,1327,11744,11775,42560,42655],[1328,1423],[1424,1535],[42240,42559],[1536,1791,1872,1919],[1984,2047],[2304,2431],[2432,2559],[2560,2687],[2688,2815],[2816,2943],[2944,3071],[3072,3199],[3200,3327],[3328,3455],[3584,3711],[3712,3839],[4256,4351,11520,11567],[6912,7039],[4352,4607],[7680,7935,11360,11391,42784\ ,43007],[7936,8191],[8192,8303,11776,11903],[8304,8351],[8352,8399],[8400,8447],[8448,8527],[8528,8591],[8592,8703,10224,10239,10496,10623,11008,11263],[8704,8959,10752,11007,10176,10223,10624,10751],[8960,9215],[9216,9279],[9280,9311],[9312,9471],[9472,9599],[9600,9631],[9632,9727],[9728,9983],[9984,10175],[12288,12351],[12352,12447],[12448,12543,12784,12799],[12544,12591,12704,12735],[12592,12687],[43072,43135],[12800,13055],[13056,13311],[44032,55215],[55296,57343],[67840,67871],[19968,40959,\ 11904,12031,12032,12255,12272,12287,13312,19903,131072,173791,12688,12703],[57344,63743],[12736,12783,63744,64255,194560,195103],[64256,64335],[64336,65023],[65056,65071],[65040,65055],[65104,65135],[65136,65279],[65280,65519],[65520,65535],[3840,4095],[1792,1871],[1920,1983],[3456,3583],[4096,4255],[4608,4991,4992,5023,11648,11743],[5024,5119],[5120,5759],[5760,5791],[5792,5887],[6016,6143],[6144,6319],[10240,10495],[40960,42127],[5888,5919,5920,5951,5952,5983,5984,6015],[66304,66351],[66352,66\ 383],[66560,66639],[118784,119039,119040,119295,119296,119375],[119808,120831],[1044480,1048573],[65024,65039,917760,917999],[917504,917631],[6400,6479],[6480,6527],[6528,6623],[6656,6687],[11264,11359],[11568,11647],[19904,19967],[43008,43055],[65536,65663,65664,65791,65792,65855],[65856,65935],[66432,66463],[66464,66527],[66640,66687],[66688,66735],[67584,67647],[68096,68191],[119552,119647],[73728,74751,74752,74879],[119648,119679],[7040,7103],[7168,7247],[7248,7295],[43136,43231],[43264,4331\ 1],[43312,43359],[43520,43615],[65936,65999],[66e3,66047],[66208,66271,66176,66207,67872,67903],[127024,127135,126976,127023]];function getUnicodeRangeFor(e,t=-1){if(-1!==t){const a=Or[t];for(let r=0,i=a.length;r=a[r]&&e<=a[r+1])return t}for(let t=0,a=Or.length;t=a[r]&&e<=a[r+1])return t}return-1}const Mr=new RegExp("^(\\\\s)|(\\\\p{Mn})|(\\\\p{Cf})$","u"),Dr=new Map;const Rr=!0,Nr=1,Er=2,Pr=4,Lr=32,jr=[".notdef",".null","nonmarki\ ngreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d",\ "e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","ste\ rling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quo\ tedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut\ ","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function recoverGlyphName(e,t){if(void 0!==t[e])return e;const a=getUnicodeForGlyph(e,t);if(-1!==a)for(const e in t)if(t[e]===a)return e;info("Unable to recover\ a standard glyph name for: "+e);return e}function type1FontGlyphMapping(e,t,a){const r=Object.create(null);let i,n,s;const o=!!(e.flags&Pr);if(e.isInternalFont){s=t;for(n=0;n=0?i:0}}else if(e.baseEncodingName){s=getEncoding(e.baseEncodingName);for(n=0;n=0?i:0}}else if(o)for(n in t)r[n]=t[n];else{s=Ar;for(n=0;n=0?i:0}}const c=e.differences;let l;if(c)for(n in c){const e=c[n];i=\ a.indexOf(e);if(-1===i){l||(l=Fr());const t=recoverGlyphName(e,l);t!==e&&(i=a.indexOf(t))}r[n]=i>=0?i:0}return r}function normalizeFontName(e){return e.replaceAll(/[,_]/g,"-").replaceAll(/\\s/g,"")}const _r=getLookupTableFactory((e=>{e[8211]=65074;e[8212]=65073;e[8229]=65072;e[8230]=65049;e[12289]=65041;e[12290]=65042;e[12296]=65087;e[12297]=65088;e[12298]=65085;e[12299]=65086;e[12300]=65089;e[12301]=65090;e[12302]=65091;e[12303]=65092;e[12304]=65083;e[12305]=65084;e[12308]=65081;e[12309]=65082;e\ [12310]=65047;e[12311]=65048;e[65103]=65076;e[65281]=65045;e[65288]=65077;e[65289]=65078;e[65292]=65040;e[65306]=65043;e[65307]=65044;e[65311]=65046;e[65339]=65095;e[65341]=65096;e[65343]=65075;e[65371]=65079;e[65373]=65080}));const Ur=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","\ less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guil\ singlleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","\ Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","aci\ rcumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"],Xr=[".notdef","space","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyp\ hen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","Circum\ flexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferio\ r","Ogoneksmall","Ringsmall","Cedillasmall","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","do\ llarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Th\ ornsmall","Ydieresissmall"],qr=[".notdef","space","dollaroldstyle","dollarsuperior","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsu\ perior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","hyphensuperior","colonmonetary","onefitted","rupiah","centoldstyle","figuredash","hypheninferior","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior",\ "ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior"],Hr=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","le\ ss","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsi\ nglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Et\ h","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acirc\ umflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","zerooldstyle","oneoldstyle","twoolds\ tyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmal\ l","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","\ fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmal\ l","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],Wr=391,zr=[null,{id:"hstem",min:2,stack\ Clearing:!0,stem:!0},null,{id:"vstem",min:2,stackClearing:!0,stem:!0},{id:"vmoveto",min:1,stackClearing:!0},{id:"rlineto",min:2,resetStack:!0},{id:"hlineto",min:1,resetStack:!0},{id:"vlineto",min:1,resetStack:!0},{id:"rrcurveto",min:6,resetStack:!0},null,{id:"callsubr",min:1,undefStack:!0},{id:"return",min:0,undefStack:!0},null,null,{id:"endchar",min:0,stackClearing:!0},null,null,null,{id:"hstemhm",min:2,stackClearing:!0,stem:!0},{id:"hintmask",min:0,stackClearing:!0},{id:"cntrmask",min:0,stackC\ learing:!0},{id:"rmoveto",min:2,stackClearing:!0},{id:"hmoveto",min:1,stackClearing:!0},{id:"vstemhm",min:2,stackClearing:!0,stem:!0},{id:"rcurveline",min:8,resetStack:!0},{id:"rlinecurve",min:8,resetStack:!0},{id:"vvcurveto",min:4,resetStack:!0},{id:"hhcurveto",min:4,resetStack:!0},null,{id:"callgsubr",min:1,undefStack:!0},{id:"vhcurveto",min:4,resetStack:!0},{id:"hvcurveto",min:4,resetStack:!0}],$r=[null,null,null,{id:"and",min:2,stackDelta:-1},{id:"or",min:2,stackDelta:-1},{id:"not",min:1,sta\ ckDelta:0},null,null,null,{id:"abs",min:1,stackDelta:0},{id:"add",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]+e[t-1]}},{id:"sub",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]-e[t-1]}},{id:"div",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]/e[t-1]}},null,{id:"neg",min:1,stackDelta:0,stackFn(e,t){e[t-1]=-e[t-1]}},{id:"eq",min:2,stackDelta:-1},null,null,{id:"drop",min:1,stackDelta:-1},null,{id:"put",min:2,stackDelta:-2},{id:"get",min:1,stackDelta:0},{id:"ifelse",min:4,stackDelta:-3},{id:"rando\ m",min:0,stackDelta:1},{id:"mul",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]*e[t-1]}},null,{id:"sqrt",min:1,stackDelta:0},{id:"dup",min:1,stackDelta:1},{id:"exch",min:2,stackDelta:0},{id:"index",min:2,stackDelta:0},{id:"roll",min:3,stackDelta:-2},null,null,null,{id:"hflex",min:7,resetStack:!0},{id:"flex",min:13,resetStack:!0},{id:"hflex1",min:9,resetStack:!0},{id:"flex1",min:11,resetStack:!0}];class CFFParser{constructor(e,t,a){this.bytes=e.getBytes();this.properties=t;this.seacAnalysisEnable\ d=!!a}parse(){const e=this.properties,t=new CFF;this.cff=t;const a=this.parseHeader(),r=this.parseIndex(a.endPos),i=this.parseIndex(r.endPos),n=this.parseIndex(i.endPos),s=this.parseIndex(n.endPos),o=this.parseDict(i.obj.get(0)),c=this.createDict(CFFTopDict,o,t.strings);t.header=a.obj;t.names=this.parseNameIndex(r.obj);t.strings=this.parseStringIndex(n.obj);t.topDict=c;t.globalSubrIndex=s.obj;this.parsePrivateDict(t.topDict);t.isCIDFont=c.hasName("ROS");const l=c.getByName("CharStrings"),h=this.\ parseIndex(l).obj,u=c.getByName("FontMatrix");u&&(e.fontMatrix=u);const d=c.getByName("FontBBox");if(d){e.ascent=Math.max(d[3],d[1]);e.descent=Math.min(d[1],d[3]);e.ascentScaled=!0}let f,g;if(t.isCIDFont){const e=this.parseIndex(c.getByName("FDArray")).obj;for(let a=0,r=e.count;a=t)throw new FormatError("Invalid CFF header");if(0!==a){info("cff data is shifted");e=e.subarray(a);this.bytes=e}const r=e[0],i=e[1],n=e[2],s=e[3];return{obj:new CFFHeader(r,i,n,s),endPos:n}}parseDict(e){let t=0;function parseOperand(){let a=e[t++];if(30===a)return function parseFloatOperand(){let a="";const r=15,i=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],n=e.length;for(;t>4,o=15&n;if(s===r)break;a+=i[s];if(o===r)\ break;a+=i[o]}return parseFloat(a)}();if(28===a){a=readInt16(e,t);t+=2;return a}if(29===a){a=e[t++];a=a<<8|e[t++];a=a<<8|e[t++];a=a<<8|e[t++];return a}if(a>=32&&a<=246)return a-139;if(a>=247&&a<=250)return 256*(a-247)+e[t++]+108;if(a>=251&&a<=254)return-256*(a-251)-e[t++]-108;warn(\'CFFParser_parseDict: "\'+a+\'" is a reserved command.\');return NaN}let a=[];const r=[];t=0;const i=e.length;for(;t10)return!1;let i=e.stackSize;const n=e.stack;let s=t.length;for(let o=0;o=4){i-=4;if(this.seacAnalysisEnabled){e.seac=n.slice(i,i+4);return!1}}l=zr[c]}else i\ f(c>=32&&c<=246){n[i]=c-139;i++}else if(c>=247&&c<=254){n[i]=c<251?(c-247<<8)+t[o]+108:-(c-251<<8)-t[o]-108;o++;i++}else if(255===c){n[i]=(t[o]<<24|t[o+1]<<16|t[o+2]<<8|t[o+3])/65536;o+=4;i++}else if(19===c||20===c){e.hints+=i>>1;if(0===e.hints){t.copyWithin(o-1,o,-1);o-=1;s-=1;continue}o+=e.hints+7>>3;i%=2;l=zr[c]}else{if(10===c||29===c){const t=10===c?a:r;if(!t){l=zr[c];warn("Missing subrsIndex for "+l.id);return!1}let s=32768;t.count<1240?s=107:t.count<33900&&(s=1131);const o=n[--i]+s;if(o<0|\ |o>=t.count||isNaN(o)){l=zr[c];warn("Out of bounds subrIndex for "+l.id);return!1}e.stackSize=i;e.callDepth++;if(!this.parseCharString(e,t.get(o),a,r))return!1;e.callDepth--;i=e.stackSize;continue}if(11===c){e.stackSize=i;return!0}if(0===c&&o===t.length){t[o-1]=14;l=zr[14]}else{if(9===c){t.copyWithin(o-1,o,-1);o-=1;s-=1;continue}l=zr[c]}}if(l){if(l.stem){e.hints+=i>>1;if(3===c||23===c)e.hasVStems=!0;else if(e.hasVStems&&(1===c||18===c)){warn("CFF stem hints are in wrong order");t[o-1]=1===c?3:23\ }}if("min"in l&&!e.undefStack&&i=2&&l.stem?i%=2:i>1&&warn("Found too many parameters for stack-clearing command");i>0&&(e.width=n[i-1])}if("stackDelta"in l){"stackFn"in l&&l.stackFn(n,i);i+=l.stackDelta}else if(l.stackClearing)i=0;else if(l.resetStack){i=0;e.undefStack=!1}else if(l.undefStack){i=0;e.\ undefStack=!0;e.firstStackClearing=!1}}}s=i.leng\ th){warn("Invalid fd index for glyph index.");u=!1}if(u){f=i[e].privateDict;d=f.subrsIndex}}else t&&(d=t);u&&(u=this.parseCharString(h,c,d,a));if(null!==h.width){const e=f.getByName("nominalWidthX");o[l]=e+h.width}else{const e=f.getByName("defaultWidthX");o[l]=e}null!==h.seac&&(s[l]=h.seac);u||e.set(l,new Uint8Array([14]))}return{charStrings:e,seacs:s,widths:o}}emptyPrivateDictionary(e){const t=this.createDict(CFFPrivateDict,[],e.strings);e.setByKey(18,[0,0]);e.privateDict=t}parsePrivateDict(e){\ if(!e.hasName("Private")){this.emptyPrivateDictionary(e);return}const t=e.getByName("Private");if(!Array.isArray(t)||2!==t.length){e.removeByName("Private");return}const a=t[0],r=t[1];if(0===a||r>=this.bytes.length){this.emptyPrivateDictionary(e);return}const i=r+a,n=this.bytes.subarray(r,i),s=this.parseDict(n),o=this.createDict(CFFPrivateDict,s,e.strings);e.privateDict=o;0===o.getByName("ExpansionFactor")&&o.setByName("ExpansionFactor",.06);if(!o.getByName("Subrs"))return;const c=o.getByName("S\ ubrs"),l=r+c;if(0===c||l>=this.bytes.length){this.emptyPrivateDictionary(e);return}const h=this.parseIndex(l);o.subrsIndex=h.obj}parseCharsets(e,t,a,r){if(0===e)return new CFFCharset(!0,Kr.ISO_ADOBE,Ur);if(1===e)return new CFFCharset(!0,Kr.EXPERT,Xr);if(2===e)return new CFFCharset(!0,Kr.EXPERT_SUBSET,qr);const i=this.bytes,n=e,s=i[e++],o=[r?0:".notdef"];let c,l,h;t-=1;switch(s){case 0:for(h=0;h=65535){warn("Not enough space in charstrings to duplicate first glyph.");return}const e=this.charStrings.get(0);this.charStrings.add(e);this.isCIDFont&&this.fdSelect.fdSelect.push(this.fdSel\ ect.fdSelect[0])}hasGlyphId(e){if(e<0||e>=this.charStrings.count)return!1;return this.charStrings.get(e).length>0}}class CFFHeader{constructor(e,t,a,r){this.major=e;this.minor=t;this.hdrSize=a;this.offSize=r}}class CFFStrings{constructor(){this.strings=[]}get(e){return e>=0&&e<=390?Hr[e]:e-Wr<=this.strings.length?this.strings[e-Wr]:Hr[0]}getSID(e){let t=Hr.indexOf(e);if(-1!==t)return t;t=this.strings.indexOf(e);return-1!==t?t+Wr:-1}add(e){this.strings.push(e)}get count(){return this.strings.leng\ th}}class CFFIndex{constructor(){this.objects=[];this.length=0}add(e){this.length+=e.length;this.objects.push(e)}set(e,t){this.length+=t.length-this.objects[e].length;this.objects[e]=t}get(e){return this.objects[e]}get count(){return this.objects.length}}class CFFDict{constructor(e,t){this.keyToNameMap=e.keyToNameMap;this.nameToKeyMap=e.nameToKeyMap;this.defaults=e.defaults;this.types=e.types;this.opcodes=e.opcodes;this.order=e.order;this.strings=t;this.values=Object.create(null)}setByKey(e,t){i\ f(!(e in this.keyToNameMap))return!1;if(0===t.length)return!0;for(const a of t)if(isNaN(a)){warn(`Invalid CFFDict value: "${t}" for key "${e}".`);return!0}const a=this.types[e];"num"!==a&&"sid"!==a&&"offset"!==a||(t=t[0]);this.values[e]=t;return!0}setByName(e,t){if(!(e in this.nameToKeyMap))throw new FormatError(`Invalid dictionary name "${e}"`);this.values[this.nameToKeyMap[e]]=t}hasName(e){return this.nameToKeyMap[e]in this.values}getByName(e){if(!(e in this.nameToKeyMap))throw new FormatError\ (`Invalid dictionary name ${e}"`);const t=this.nameToKeyMap[e];return t in this.values?this.values[t]:this.defaults[t]}removeByName(e){delete this.values[this.nameToKeyMap[e]]}static createTables(e){const t={keyToNameMap:{},nameToKeyMap:{},defaults:{},types:{},opcodes:{},order:[]};for(const a of e){const e=Array.isArray(a[0])?(a[0][0]<<8)+a[0][1]:a[0];t.keyToNameMap[e]=a[1];t.nameToKeyMap[a[1]]=e;t.types[e]=a[2];t.defaults[e]=a[3];t.opcodes[e]=Array.isArray(a[0])?a[0]:[a[0]];t.order.push(e)}retu\ rn t}}const Gr=[[[12,30],"ROS",["sid","sid","num"],null],[[12,20],"SyntheticBase","num",null],[0,"version","sid",null],[1,"Notice","sid",null],[[12,0],"Copyright","sid",null],[2,"FullName","sid",null],[3,"FamilyName","sid",null],[4,"Weight","sid",null],[[12,1],"isFixedPitch","num",0],[[12,2],"ItalicAngle","num",0],[[12,3],"UnderlinePosition","num",-100],[[12,4],"UnderlineThickness","num",50],[[12,5],"PaintType","num",0],[[12,6],"CharstringType","num",2],[[12,7],"FontMatrix",["num","num","num","n\ um","num","num"],[.001,0,0,.001,0,0]],[13,"UniqueID","num",null],[5,"FontBBox",["num","num","num","num"],[0,0,0,0]],[[12,8],"StrokeWidth","num",0],[14,"XUID","array",null],[15,"charset","offset",0],[16,"Encoding","offset",0],[17,"CharStrings","offset",0],[18,"Private",["offset","offset"],null],[[12,21],"PostScript","sid",null],[[12,22],"BaseFontName","sid",null],[[12,23],"BaseFontBlend","delta",null],[[12,31],"CIDFontVersion","num",0],[[12,32],"CIDFontRevision","num",0],[[12,33],"CIDFontType","n\ um",0],[[12,34],"CIDCount","num",8720],[[12,35],"UIDBase","num",null],[[12,37],"FDSelect","offset",null],[[12,36],"FDArray","offset",null],[[12,38],"FontName","sid",null]];class CFFTopDict extends CFFDict{static get tables(){return shadow(this,"tables",this.createTables(Gr))}constructor(e){super(CFFTopDict.tables,e);this.privateDict=null}}const Vr=[[6,"BlueValues","delta",null],[7,"OtherBlues","delta",null],[8,"FamilyBlues","delta",null],[9,"FamilyOtherBlues","delta",null],[[12,9],"BlueScale","n\ um",.039625],[[12,10],"BlueShift","num",7],[[12,11],"BlueFuzz","num",1],[10,"StdHW","num",null],[11,"StdVW","num",null],[[12,12],"StemSnapH","delta",null],[[12,13],"StemSnapV","delta",null],[[12,14],"ForceBold","num",0],[[12,17],"LanguageGroup","num",0],[[12,18],"ExpansionFactor","num",.06],[[12,19],"initialRandomSeed","num",0],[20,"defaultWidthX","num",0],[21,"nominalWidthX","num",0],[19,"Subrs","offset",null]];class CFFPrivateDict extends CFFDict{static get tables(){return shadow(this,"tables"\ ,this.createTables(Vr))}constructor(e){super(CFFPrivateDict.tables,e);this.subrsIndex=null}}const Kr={ISO_ADOBE:0,EXPERT:1,EXPERT_SUBSET:2};class CFFCharset{constructor(e,t,a,r){this.predefined=e;this.format=t;this.charset=a;this.raw=r}}class CFFEncoding{constructor(e,t,a,r){this.predefined=e;this.format=t;this.encoding=a;this.raw=r}}class CFFFDSelect{constructor(e,t){this.format=e;this.fdSelect=t}getFDIndex(e){return e<0||e>=this.fdSelect.length?-1:this.fdSelect[e]}}class CFFOffsetTracker{const\ ructor(){this.offsets=Object.create(null)}isTracking(e){return e in this.offsets}track(e,t){if(e in this.offsets)throw new FormatError(`Already tracking location of ${e}`);this.offsets[e]=t}offset(e){for(const t in this.offsets)this.offsets[t]+=e}setEntryLocation(e,t,a){if(!(e in this.offsets))throw new FormatError(`Not tracking location of ${e}`);const r=a.data,i=this.offsets[e];for(let e=0,a=t.length;e>24&255;r[s]=l>>16&255;r[o]=l>>8&255;r[c]=255&l}}}class CFFCompiler{constructor(e){this.cff=e}compile(){const e=this.cff,t={data:[],length:0,add(e){try{this.data.push(...e)}catch{this.data=this.data.concat(e)}this.length=this.data.length}},a=this.compileHeader(e.header);t.add(a);const r=this.compileNameIndex(e.names);t.add(r);if(e.isCIDFont&&e.topDict.hasName("FontMatrix")){const t=e.topDict.getByNa\ me("FontMatrix");e.topDict.removeByName("FontMatrix");for(const a of e.fdArray){let e=t.slice(0);a.hasName("FontMatrix")&&(e=Util.transform(e,a.getByName("FontMatrix")));a.setByName("FontMatrix",e)}}const i=e.topDict.getByName("XUID");i?.length>16&&e.topDict.removeByName("XUID");e.topDict.setByName("charset",0);let n=this.compileTopDicts([e.topDict],t.length,e.isCIDFont);t.add(n.output);const s=n.trackers[0],o=this.compileStringIndex(e.strings.strings);t.add(o);const c=this.compileIndex(e.global\ SubrIndex);t.add(c);if(e.encoding&&e.topDict.hasName("Encoding"))if(e.encoding.predefined)s.setEntryLocation("Encoding",[e.encoding.format],t);else{const a=this.compileEncoding(e.encoding);s.setEntryLocation("Encoding",[t.length],t);t.add(a)}const l=this.compileCharset(e.charset,e.charStrings.count,e.strings,e.isCIDFont);s.setEntryLocation("charset",[t.length],t);t.add(l);const h=this.compileCharStrings(e.charStrings);s.setEntryLocation("CharStrings",[t.length],t);t.add(h);if(e.isCIDFont){s.setE\ ntryLocation("FDSelect",[t.length],t);const a=this.compileFDSelect(e.fdSelect);t.add(a);n=this.compileTopDicts(e.fdArray,t.length,!0);s.setEntryLocation("FDArray",[t.length],t);t.add(n.output);const r=n.trackers;this.compilePrivateDicts(e.fdArray,r,t)}this.compilePrivateDicts([e.topDict],[s],t);t.add([0]);return t.data}encodeNumber(e){return Number.isInteger(e)?this.encodeInteger(e):this.encodeFloat(e)}static get EncodeFloatRegExp(){return shadow(this,"EncodeFloatRegExp",/\\.(\\d*?)(?:9{5,20}|0{5,\ 20})\\d{0,2}(?:e(.+)|$)/)}encodeFloat(e){let t=e.toString();const a=CFFCompiler.EncodeFloatRegExp.exec(t);if(a){const r=parseFloat("1e"+((a[2]?+a[2]:0)+a[1].length));t=(Math.round(e*r)/r).toString()}let r,i,n="";for(r=0,i=t.length;r=-107&&e<=107?[e+139]:e>=108&&e<=1131?[247+((e-=10\ 8)>>8),255&e]:e>=-1131&&e<=-108?[251+((e=-e-108)>>8),255&e]:e>=-32768&&e<=32767?[28,e>>8&255,255&e]:[29,e>>24&255,e>>16&255,e>>8&255,255&e];return t}compileHeader(e){return[e.major,e.minor,4,e.offSize]}compileNameIndex(e){const t=new CFFIndex;for(const a of e){const e=Math.min(a.length,127);let r=new Array(e);for(let t=0;t"~"||"["===e||"]"===e||"("===e||")"===e||"{"===e||"}"===e||"<"===e||">"===e||"/"===e||"%"===e)&&(e="_");r[t]=e}r=r.join("");""===r&&(r="Bad_Font_Na\ me");t.add(stringToBytes(r))}return this.compileIndex(t)}compileTopDicts(e,t,a){const r=[];let i=new CFFIndex;for(const n of e){if(a){n.removeByName("CIDFontVersion");n.removeByName("CIDFontRevision");n.removeByName("CIDFontType");n.removeByName("CIDCount");n.removeByName("UIDBase")}const e=new CFFOffsetTracker,s=this.compileDict(n,e);r.push(e);i.add(s);e.offset(t)}i=this.compileIndex(i,r);return{trackers:r,output:i}}compilePrivateDicts(e,t,a){for(let r=0,i=e.length;r>8&255,255&e])}else{i=new Uint8Array(1+2*n);i[0]=0;let t=0;const r=e.charset.length;let s=!1;for(let n=1;n>8&255;i[n+1]=255&o}}return this.compileTypedArray(i)}compileEncoding(e){return this.compileTypedArray(e.raw)}compileFDSelect(e){const t=e.format;let a,r;switch(t){case 0:a=new Uint8Array(1+e.fdSelect.length);a[0]=t;for(r=0;r>8&255,255&i,n];for(r=1;r>8&255,255&r,t);n=t}}const o=(s.length-3)/3;s[1]=o>>8&255;s[2]=255&o;s.push(r>>8&255,255&r);a=new Uint8Array(s)}return this.compileTypedArray(a)}compileTypedArray(e){return Array.from(e)}compileIndex(e,t=[]){const a=e.objects,r=a.length;if(0===r)return[0,0];const i=[r>>8&255,255&r];let n,s,o=1;for(n=0;n>8&255,255&c):3===s?i.p\ ush(c>>16&255,c>>8&255,255&c):i.push(c>>>24&255,c>>16&255,c>>8&255,255&c);a[n]&&(c+=a[n].length)}for(n=0;n=this.firstChar&&e<=this.lastChar?e:-1}amend(e){unreachable("Should not call amend()")}}class CFFFont{constructor(e,t){this.properties=t;const a=new CFFParser(e,t,Rr);this.cff=a.parse();this.cff.duplicateFirstGlyph();const r=new CFFCompiler(\ this.cff);this.seacs=this.cff.seacs;try{this.data=r.compile()}catch{warn("Failed to compile font "+t.loadedName);this.data=e}this._createBuiltInEncoding()}get numGlyphs(){return this.cff.charStrings.count}getCharset(){return this.cff.charset.charset}getGlyphMapping(){const e=this.cff,t=this.properties,{cidToGidMap:a,cMap:r}=t,i=e.charset.charset;let n,s;if(t.composite){let t,o;if(a?.length>0){t=Object.create(null);for(let e=0,r=a.length;e=0){const r=a[t];r&&(i[e]=r)}}i.length>0&&(this.properties.builtInEncoding=i)}}function getFloat214(e,t){return readInt16(e,t)/16384}function getSubroutineBias(e){const t=e.length;let a=32768;t<1240?a=107:t<33900&&(a=1131);return a}function parseCmap(e,t,a){const r=1===readUint16(e,t+2)?readUint32(e,t+8):readUint32(e,t+16),i=readUint16(e,t+r);let n,s,o;if(4===i){readUint16(e,t+r+2);const a=readUint16(e,t+r+6)>>1;s=t+r+14;n=[];for(o=0;o>1;a0;)h.push({flags:n})}for(\ a=0;a>1;y=!0;break;case 4:s+=i.pop();moveTo(n,s);y=!0;break;case 5:for(;i.length>0;){n+=i.shift();s+=i.shift();lineTo(n,s)}break;case 6:for(;i.length>0;){n+=i.shift();lineTo(n,s);if(0===i.length)break;s+=i.shift();lineTo(n,s)}break;case 7:for(;i.length>0;){s+=i.shift();lineTo(n,s);if(0===i.length)break;n+=i.shift();lineTo(n,s)}break;case 8:for(;i.length>0;){l=n+i.shift();u=s+i.shift();h=l+i.shift();d=u+i.shift();n=h+i.\ shift();s=d+i.shift();bezierCurveTo(l,u,h,d,n,s)}break;case 10:m=i.pop();b=null;if(a.isCFFCIDFont){const e=a.fdSelect.getFDIndex(r);if(e>=0&&eMath.abs(s-t)?n+=i.shift():s+=i.shift();bezierCurveTo(l,u,h,d,n,s);break;default:throw new FormatError(`unknown operator: 12 ${w}`)}break;case 14:if(i.length>=4){const e=i.pop(),r=i.pop();s=i.pop();n=i.pop();t.save();t.translate(n,s);let o=lookupCmap(a.cmap,\ String.fromCharCode(a.glyphNameMap[Ar[e]]));compileCharString(a.glyphs[o.glyphId],t,a,o.glyphId);t.restore();o=lookupCmap(a.cmap,String.fromCharCode(a.glyphNameMap[Ar[r]]));compileCharString(a.glyphs[o.glyphId],t,a,o.glyphId)}return;case 19:case 20:o+=i.length>>1;c+=o+7>>3;y=!0;break;case 21:s+=i.pop();n+=i.pop();moveTo(n,s);y=!0;break;case 22:n+=i.pop();moveTo(n,s);y=!0;break;case 24:for(;i.length>2;){l=n+i.shift();u=s+i.shift();h=l+i.shift();d=u+i.shift();n=h+i.shift();s=d+i.shift();bezierCurv\ eTo(l,u,h,d,n,s)}n+=i.shift();s+=i.shift();lineTo(n,s);break;case 25:for(;i.length>6;){n+=i.shift();s+=i.shift();lineTo(n,s)}l=n+i.shift();u=s+i.shift();h=l+i.shift();d=u+i.shift();n=h+i.shift();s=d+i.shift();bezierCurveTo(l,u,h,d,n,s);break;case 26:i.length%2&&(n+=i.shift());for(;i.length>0;){l=n;u=s+i.shift();h=l+i.shift();d=u+i.shift();n=h;s=d+i.shift();bezierCurveTo(l,u,h,d,n,s)}break;case 27:i.length%2&&(s+=i.shift());for(;i.length>0;){l=n+i.shift();u=s;h=l+i.shift();d=u+i.shift();n=h+i.shi\ ft();s=d;bezierCurveTo(l,u,h,d,n,s)}break;case 28:i.push(readInt16(e,c));c+=2;break;case 29:m=i.pop()+a.gsubrsBias;b=a.gsubrs[m];b&&parse(b);break;case 30:for(;i.length>0;){l=n;u=s+i.shift();h=l+i.shift();d=u+i.shift();n=h+i.shift();s=d+(1===i.length?i.shift():0);bezierCurveTo(l,u,h,d,n,s);if(0===i.length)break;l=n+i.shift();u=s;h=l+i.shift();d=u+i.shift();s=d+i.shift();n=h+(1===i.length?i.shift():0);bezierCurveTo(l,u,h,d,n,s)}break;case 31:for(;i.length>0;){l=n+i.shift();u=s;h=l+i.shift();d=u+i\ .shift();s=d+i.shift();n=h+(1===i.length?i.shift():0);bezierCurveTo(l,u,h,d,n,s);if(0===i.length)break;l=n;u=s+i.shift();h=l+i.shift();d=u+i.shift();n=h+i.shift();s=d+(1===i.length?i.shift():0);bezierCurveTo(l,u,h,d,n,s)}break;default:if(w<32)throw new FormatError(`unknown operator: ${w}`);if(w<247)i.push(w-139);else if(w<251)i.push(256*(w-247)+e[c++]+108);else if(w<255)i.push(256*-(w-251)-e[c++]-108);else{i.push((e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3])/65536);c+=4}}y&&(i.length=0)}}(e)}class Comm\ ands{cmds=[];transformStack=[];currentTransform=[1,0,0,1,0,0];add(e,t){if(t){const{currentTransform:a}=this;for(let e=0,r=t.length;e=0&&e2*readUint16(e,t)}const n=[];let s=i(t,0);for(let a=r;ae.getSize()+3&-4)))}write(){const e=this.getSize(),t=new DataView(new ArrayBuffer(e)),a=e>131070,r=a?4:2,i=new DataView(new ArrayBuffer((this.glyphs.length+1)*r));a?i.setUint32(0,0):i.setUint16(0,0);let n=0,s=0;for(const e of this.glyphs){n+=e.write(n,t);n=n+3&-4;s+=r;a?i.setUint32(s,n):i.setUint16(s,n>>1)}return{isLoca\ tionLong:a,loca:new Uint8Array(i.buffer),glyf:new Uint8Array(t.buffer)}}scale(e){for(let t=0,a=this.glyphs.length;te.getSize())));return this.header.getSize()+e}write(e,t){if(!this.header)return 0;const a=e;e+=this.header.write(e,t);if(this.simple)e+=this.simple.write(e,t);else for(const a of this.composites)e+=a.write(e,t);return e-a}scale(e){if(!this.header)return;const t=(this.header.xMin+this.header.xMax)/2;this.hea\ der.scale(t,e);if(this.simple)this.simple.scale(t,e);else for(const a of this.composites)a.scale(t,e)}}class GlyphHeader{constructor({numberOfContours:e,xMin:t,yMin:a,xMax:r,yMax:i}){this.numberOfContours=e;this.xMin=t;this.yMin=a;this.xMax=r;this.yMax=i}static parse(e,t){return[10,new GlyphHeader({numberOfContours:t.getInt16(e),xMin:t.getInt16(e+2),yMin:t.getInt16(e+4),xMax:t.getInt16(e+6),yMax:t.getInt16(e+8)})]}getSize(){return 10}write(e,t){t.setInt16(e,this.numberOfContours);t.setInt16(e+2,\ this.xMin);t.setInt16(e+4,this.yMin);t.setInt16(e+6,this.xMax);t.setInt16(e+8,this.yMax);return 10}scale(e,t){this.xMin=Math.round(e+(this.xMin-e)*t);this.xMax=Math.round(e+(this.xMax-e)*t)}}class Contour{constructor({flags:e,xCoordinates:t,yCoordinates:a}){this.xCoordinates=t;this.yCoordinates=a;this.flags=e}}class SimpleGlyph{constructor({contours:e,instructions:t}){this.contours=e;this.instructions=t}static parse(e,t,a){const r=[];for(let i=0;i255?e+=2:o>0&&(e+=1);t=n;o=Math.abs(s-a);o>255?e+=2:o>0&&(e+=1);a=s}}return e}write(e,t){const a=e,r=[],i=[],n=[];let s=0,o=0;for(const a of this.contours){for(let e=0,t=a.xCoordinates.length;e=0?18:2;r.push(e)}else r.push(l)}s=c;const h=a.yCoordinates[e];l=h-o;if(0===l){t|=32;i.push(0)}else{const e=Math.abs(l);if(e<=255){t|=l>=0?36:4;i.push(e)}else i.push(l)\ }o=h;n.push(t)}t.setUint16(e,r.length-1);e+=2}t.setUint16(e,this.instructions.length);e+=2;if(this.instructions.length){new Uint8Array(t.buffer,0,t.buffer.byteLength).set(this.instructions,e);e+=this.instructions.length}for(const a of n)t.setUint8(e++,a);for(let a=0,i=r.length;a=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(e+=2):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(e+=2);return e}write(e,t){const a=e;2&this.flags?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(this.flags|=1):this.argument1>=0&&this.argument1<=25\ 5&&this.argument2>=0&&this.argument2<=255||(this.flags|=1);t.setUint16(e,this.flags);t.setUint16(e+2,this.glyphIndex);e+=4;if(1&this.flags){if(2&this.flags){t.setInt16(e,this.argument1);t.setInt16(e+2,this.argument2)}else{t.setUint16(e,this.argument1);t.setUint16(e+2,this.argument2)}e+=4}else{t.setUint8(e,this.argument1);t.setUint8(e+1,this.argument2);e+=2}if(256&this.flags){t.setUint16(e,this.instructions.length);e+=2;if(this.instructions.length){new Uint8Array(t.buffer,0,t.buffer.byteLength).s\ et(this.instructions,e);e+=this.instructions.length}}return e-a}scale(e,t){}}function writeInt16(e,t,a){e[t]=a>>8&255;e[t+1]=255&a}function writeInt32(e,t,a){e[t]=a>>24&255;e[t+1]=a>>16&255;e[t+2]=a>>8&255;e[t+3]=255&a}function writeData(e,t,a){if(a instanceof Uint8Array)e.set(a,t);else if("string"==typeof a)for(let r=0,i=a.length;ra;){a<<=1;r++}const i=a*t;return{range:i,entry:r,rangeShift:t*e-i}}toArray(){let e=this.sfnt;const t=this.tables,a=Object.keys(t);a.sort();const r=a.length;let i,n,s,o,c,l=12+16*r;const h=[l];for(i=0;i>>0;h.push(l)}const u=new Uint8Array(l);for(i=0;i>>0}writeInt32(u,l+4,e);writeInt32(u,l+8,h[i]);writeInt32(u,l+12,t[c].length);l+=16}return u}addTable(e,t){if(e in this.tables)throw new Error("Table "+e+" already e\ xists");this.tables[e]=t}}const si=[4],oi=[5],ci=[6],li=[7],hi=[8],ui=[12,35],di=[14],fi=[21],gi=[22],pi=[30],mi=[31];class Type1CharString{constructor(){this.width=0;this.lsb=0;this.flexing=!1;this.output=[];this.stack=[]}convert(e,t,a){const r=e.length;let i,n,s,o=!1;for(let c=0;cr)return!0;const i=r-e;for(let e=i;e>8&255,255&t);else{t=65536*t|0;this.output.push(255,t>>24&255,t>>16&255,t>>8&255,255&t)}}this.output.push(...t);a?this.stack.splice(i,e):this.stack.length=0;return!1}}function isHexDigit(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function decrypt(e,t,a){if(a>=e.length)return new Uint8Array(0);let r,i,n=0|t;for(r=0;r>8;n=52845*(t+n)+22719&65535}return o}function isSpecial(e){return 47===e||91===e||93===e||123===e||125===e||40===e||41===e}class Type1Parser{constructor(e,t,a){if(t){const t=e.getBytes(),a=!((isHexDigit(t[0])||isWhiteSpace(t[0]))&&isHexDigit(t[1])&&isHexDigit(t[2])&&isHexDigit(t[3])&&isHexDigit(t[4])&&isHexDigit(t[5])&&isHexDigit(t[6])&&isHexDigit(t[7]));e=new Stream(a?decrypt(t,55665,4):function decryptAscii(e,t,a){let r=0|t;const i=e.length,n=new Uint8Array(i>>>1);let s,o;for(s\ =0,o=0;s>8;r=52845*(e+r)+22719&65535}}return n.slice(a,o)}(t,55665,4))}this.seacAnalysisEnabled=!!a;this.stream=e;this.nextChar()}readNumberArray(){this.getToken();const e=[];for(;;){const t=this.getToken();if(null===t||"]"===t||"}"===t)break;e.push(parseFloat(t||0))}return e}readNumber(){const e=this.getToken();return parseFloat(e||0)}read\ Int(){const e=this.getToken();return 0|parseInt(e||0,10)}readBoolean(){return"true"===this.getToken()?1:0}nextChar(){return this.currentChar=this.stream.getByte()}prevChar(){this.stream.skip(-2);return this.currentChar=this.stream.getByte()}getToken(){let e=!1,t=this.currentChar;for(;;){if(-1===t)return null;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!isWhiteSpace(t))break;t=this.nextChar()}if(isSpecial(t)){this.nextChar();return String.fromCharCode(t)}let a="";do{a+=String.fromChar\ Code(t);t=this.nextChar()}while(t>=0&&!isWhiteSpace(t)&&!isSpecial(t));return a}readCharStrings(e,t){return-1===t?e:decrypt(e,4330,t)}extractFontProgram(e){const t=this.stream,a=[],r=[],i=Object.create(null);i.lenIV=4;const n={subrs:[],charstrings:[],properties:{privateData:i}};let s,o,c,l;for(;null!==(s=this.getToken());)if("/"===s){s=this.getToken();switch(s){case"CharStrings":this.getToken();this.getToken();this.getToken();this.getToken();for(;;){s=this.getToken();if(null===s||"end"===s)break\ ;if("/"!==s)continue;const e=this.getToken();o=this.readInt();this.getToken();c=o>0?t.getBytes(o):new Uint8Array(0);l=n.properties.privateData.lenIV;const a=this.readCharStrings(c,l);this.nextChar();s=this.getToken();"noaccess"===s?this.getToken():"/"===s&&this.prevChar();r.push({glyph:e,encoded:a})}break;case"Subrs":this.readInt();this.getToken();for(;"dup"===this.getToken();){const e=this.readInt();o=this.readInt();this.getToken();c=o>0?t.getBytes(o):new Uint8Array(0);l=n.properties.privateDat\ a.lenIV;const r=this.readCharStrings(c,l);this.nextChar();s=this.getToken();"noaccess"===s&&this.getToken();a[e]=r}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":const e=this.readNumberArray();e.length>0&&e.length,0;break;case"StemSnapH":case"StemSnapV":n.properties.privateData[s]=this.readNumberArray();break;case"StdHW":case"StdVW":n.properties.privateData[s]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"Languag\ eGroup":n.properties.privateData[s]=this.readNumber();break;case"ExpansionFactor":n.properties.privateData[s]=this.readNumber()||.06;break;case"ForceBold":n.properties.privateData[s]=this.readBoolean()}}for(const{encoded:t,glyph:i}of r){const r=new Type1CharString,s=r.convert(t,a,this.seacAnalysisEnabled);let o=r.output;s&&(o=[14]);const c={glyphName:i,charstring:o,width:r.width,lsb:r.lsb,seac:r.seac};".notdef"===i?n.charstrings.unshift(c):n.charstrings.push(c);if(e.builtInEncoding){const t=e.bu\ iltInEncoding.indexOf(i);t>-1&&void 0===e.widths[t]&&t>=e.firstChar&&t<=e.lastChar&&(e.widths[t]=r.width)}}return n}extractFontHeader(e){let t;for(;null!==(t=this.getToken());)if("/"===t){t=this.getToken();switch(t){case"FontMatrix":const a=this.readNumberArray();e.fontMatrix=a;break;case"Encoding":const r=this.getToken();let i;if(/^\\d+$/.test(r)){i=[];const e=0|parseInt(r,10);this.getToken();for(let a=0;a=i){s+=a;for(;s=0&&(r[e]=i)}}return type1FontGlyphMapping(e,r,a)}hasGlyphId(e){if(e<0||e>=this.numGlyphs)return!1;if(0===e)return!0;return this.charstrings[e-1].charstring.length>0}getSeacs(e){const t=[];fo\ r(let a=0,r=e.length;a0;e--)t[e]-=t[e-1];f.setByName(e,t)}n.topDict.privateDict=f;const p=new CFFIndex;for(h=0,u=r.length;h0&&e.toUnicode.amend(t)}class fonts_Glyph{constructor(e,t,a,r,i,n,s,o,c){this.originalCharCode=e;this.fontChar=t;this.unicode=a;this.accent=r;this.width=i;this.vmetric=n;this.operatorListId=s;this.isSpace=o;this.isInFont=c}get category(){return shadow(this,"category",function getCharUnicodeCategory(e){const t=Dr.get(e);if(t)return t;const a=e.match(Mr),r={isWhitespace:!!a?.\ [1],isZeroWidthDiacritic:!!a?.[2],isInvisibleFormatMark:!!a?.[3]};Dr.set(e,r);return r}(this.unicode),!0)}}function int16(e,t){return(e<<8)+t}function writeSignedInt16(e,t,a){e[t+1]=a;e[t]=a>>>8}function signedInt16(e,t){const a=(e<<8)+t;return 32768&a?a-65536:a}function string16(e){return String.fromCharCode(e>>8&255,255&e)}function safeString16(e){e>32767?e=32767:e<-32768&&(e=-32768);return String.fromCharCode(e>>8&255,255&e)}function isTrueTypeCollectionFile(e){return"ttcf"===bytesToString(e.\ peekBytes(4))}function getFontFileType(e,{type:t,subtype:a,composite:r}){let i,n;if(function isTrueTypeFile(e){const t=e.peekBytes(4);return 65536===readUint32(t,0)||"true"===bytesToString(t)}(e)||isTrueTypeCollectionFile(e))i=r?"CIDFontType2":"TrueType";else if(function isOpenTypeFile(e){return"OTTO"===bytesToString(e.peekBytes(4))}(e))i=r?"CIDFontType2":"OpenType";else if(function isType1File(e){const t=e.peekBytes(2);return 37===t[0]&&33===t[1]||128===t[0]&&1===t[1]}(e))i=r?"CIDFontType0":"MM\ Type1"===t?"MMType1":"Type1";else if(function isCFFFile(e){const t=e.peekBytes(4);return t[0]>=1&&t[3]>=1&&t[3]<=4}(e))if(r){i="CIDFontType0";n="CIDFontType0C"}else{i="MMType1"===t?"MMType1":"Type1";n="Type1C"}else{warn("getFontFileType: Unable to detect correct font file Type/Subtype.");i=t;n=a}return[i,n]}function applyStandardFontGlyphMap(e,t){for(const a in t)e[+a]=t[a]}function buildToFontChar(e,t,a){const r=[];let i;for(let a=0,n=e.length;ah){c++;if(c>=bi.length){warn("Ran out of space in font private use area.");break}l=bi[c][0];h=bi[c][1]}const p=l++;0===g&&(g=a);let m=r.get(f);if("string"==typeof m)if(1===m.length)m=m.codePointAt(0);else{if(!u){u=new Map;for(let e=64256;e<=64335;e++){const t=String.fromCharCode(e).normalize("NFKD");t.length>1&&u.set(t,e)}}m=u.get(m)|\ |m.codePointAt(0)}if(m&&!(d=m,bi[0][0]<=d&&d<=bi[0][1]||bi[1][0]<=d&&d<=bi[1][1])&&!o.has(g)){n.set(m,g);o.add(g)}i[p]=g;s[f]=p}var d;return{toFontChar:s,charCodeToGlyphId:i,toUnicodeExtraMap:n,nextAvailableFontCharCode:l}}function createCmapTable(e,t,a){const r=function getRanges(e,t,a){const r=[];for(const t in e)e[t]>=a||r.push({fontCharCode:0|t,glyphId:e[t]});if(t)for(const[e,i]of t)i>=a||r.push({fontCharCode:e,glyphId:i});0===r.length&&r.push({fontCharCode:0,glyphId:0});r.sort(((e,t)=>e.fon\ tCharCode-t.fontCharCode));const i=[],n=r.length;for(let e=0;e65535?2:1;let n,s,o,c,l="\\0\\0"+string16(i)+"\\0\\0"+string32(4+8*i);for(n=r.length-1;n>=0&&!(r[n][0]<=65535);--n);const h=n+1;r[n][0]<65535&&65535===r[n][1]&&(r[n][1]=65534);const u=r[n][1]<65535?1:0,d=h+u,f=OpenTypeFileBuilder.getSearchParams(d,2\ );let g,p,m,b,y="",w="",x="",S="",k="",C=0;for(n=0,s=h;n0){w+="ÿÿ";y+="ÿÿ";x+="\\0";S+="\\0\\0"}const v="\\0\\0"+string16(2*d)+string16(f.range)+string16(f.entry)+string16(f.rangeShift)+w+"\\0\\0"+y+x+S+k;let F=\ "",T="";if(i>1){l+="\\0\\0\\n"+string32(4+8*i+4+v.length);F="";for(n=0,s=r.length;ne||!o)&&(o=e);c 123 are reserved for internal usage");s|=1<65535&&(c=65535)}else{o=0;c=255}const h=e.bbox||[0,0,0,0],u=a.unitsPerEm||(e.fontMatrix?1/Math.max(...e.fontMatrix.slice(0,4).map(Math.abs)):1e3),d=e.ascentScaled?1:u/yi,f=a.ascent||Math.round(d*(e.ascent||h[3]));let g=a.descent||Math.roun\ d(d*(e.descent||h[1]));g>0&&e.descent>0&&h[1]<0&&(g=-g);const p=a.yMax||f,m=-a.yMin||-g;return"\\0$ô\\0\\0\\0Š»\\0\\0\\0ŒŠ»\\0\\0ß\\x001\\0\\0\\0\\0"+String.fromCharCode(e.fixedPitch?9:0)+"\\0\\0\\0\\0\\0\\0"+string32(r)+string32(i)+string32(n)+string32(s)+"*21*"+string16(e.italicAngle?1:0)+string16(o||e.firstChar)+string16(c||e.lastChar)+string16(f)+string16(g)+"\\0d"+string16(p)+string16(m)+"\\0\\0\\0\\0\\0\\0\\0\\0"+string16(e.xHeight)+string16(e.capHeight)+string16(0)+string16(o||e.firstChar)+"\\0"}function \ createPostTable(e){return"\\0\\0\\0"+string32(Math.floor(65536*e.italicAngle))+"\\0\\0\\0\\0"+string32(e.fixedPitch?1:0)+"\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0"}function createPostscriptName(e){return e.replaceAll(/[^\\x21-\\x7E]|[[\\](){}<>/%]/g,"").slice(0,63)}function createNameTable(e,t){t||(t=[[],[]]);const a=[t[0][0]||"Original licence",t[0][1]||e,t[0][2]||"Unknown",t[0][3]||"uniqueID",t[0][4]||e,t[0][5]||"Version 0.11",t[0][6]||createPostscriptName(e),t[0][7]||"Unknown",t[0][8]||"Unknown",t[0][9]||"Unk\ nown"],r=[];let i,n,s,o,c;for(i=0,n=a.length;i0;if((s||o)&&"CIDFontType2"===a&&this.cidEncoding.startsWith("Identity\ -")){const a=e.cidToGidMap,r=[];applyStandardFontGlyphMap(r,ti());/Arial-?Black/i.test(t)?applyStandardFontGlyphMap(r,ai()):/Calibri/i.test(t)&&applyStandardFontGlyphMap(r,ri());if(a){for(const e in r){const t=r[e];void 0!==a[t]&&(r[+e]=a[t])}a.length!==this.toUnicode.length&&e.hasIncludedToUnicodeMap&&this.toUnicode instanceof IdentityToUnicodeMap&&this.toUnicode.forEach((function(e,t){const i=r[e];void 0===a[i]&&(r[+e]=t)}))}this.toUnicode instanceof IdentityToUnicodeMap||this.toUnicode.forEac\ h((function(e,t){r[+e]=t}));this.toFontChar=r;this.toUnicode=new ToUnicodeMap(r)}else if(/Symbol/i.test(r))this.toFontChar=buildToFontChar(Cr,Fr(),this.differences);else if(/Dingbats/i.test(r))this.toFontChar=buildToFontChar(vr,Ir(),this.differences);else if(s||o){const e=buildToFontChar(this.defaultEncoding,Fr(),this.differences);"CIDFontType2"!==a||this.cidEncoding.startsWith("Identity-")||this.toUnicode instanceof IdentityToUnicodeMap||this.toUnicode.forEach((function(t,a){e[+t]=a}));this.toF\ ontChar=e}else{const e=Fr(),a=[];this.toUnicode.forEach(((t,r)=>{if(!this.composite){const a=getUnicodeForGlyph(this.differences[t]||this.defaultEncoding[t],e);-1!==a&&(r=a)}a[+t]=r}));this.composite&&this.toUnicode instanceof IdentityToUnicodeMap&&/Tahoma|Verdana/i.test(t)&&applyStandardFontGlyphMap(a,ti());this.toFontChar=a}amendFallbackToUnicode(e);this.loadedName=r.split("-",1)[0]}checkAndRepair(e,t,a){const r=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","pre\ p","cvt ","CFF "];function readTables(e,t){const a=Object.create(null);a["OS/2"]=null;a.cmap=null;a.head=null;a.hhea=null;a.hmtx=null;a.maxp=null;a.name=null;a.post=null;for(let i=0;i>>0,r=e.getInt32()>>>0,i=e.getInt32()>>>0,n=e.pos;e.pos=e.start||0;e.skip(r);const s=e.getBytes(i);e.pos=n;if("head"===t){s[8]=s[9]=s[10]=s[11]=0;s[17]|=32}retur\ n{tag:t,checksum:a,length:i,offset:r,data:s}}function readOpenTypeHeader(e){return{version:e.getString(4),numTables:e.getUint16(),searchRange:e.getUint16(),entrySelector:e.getUint16(),rangeShift:e.getUint16()}}function sanitizeGlyph(e,t,a,r,i,n){const s={length:0,sizeOfInstructions:0};if(t<0||t>=e.length||a>e.length||a-t<=12)return s;const o=e.subarray(t,a),c=signedInt16(o[2],o[3]),l=signedInt16(o[4],o[5]),h=signedInt16(o[6],o[7]),u=signedInt16(o[8],o[9]);if(c>h){writeSignedInt16(o,2,h);writeSig\ nedInt16(o,6,c)}if(l>u){writeSignedInt16(o,4,u);writeSignedInt16(o,8,l)}const d=signedInt16(o[0],o[1]);if(d<0){if(d<-1)return s;r.set(o,i);s.length=o.length;return s}let f,g=10,p=0;for(f=0;fo.length)return s;if(!n&&b>0){r.set(o.subarray(0,m),i);r.set([0,0],i+m);r.set(o.subarray(y,x),i+m+2);x-=b;o.length-x>3&&(x=x+3&-4);s.length=x;return s}if(o.length-x>3){x=x+3&-4;r.set(o.subarray(0,x),i);s.length=x;return s}r.set(o,i);s.length=o.length;return s}function readNameTable(e){const a=(t.start||0)+e.offset;t.pos=a;const r=[[],[]],i=[],n=e.length,s=a+n;if(0!==t.getUint16()||n<6)return[r,i];const o=t.getUint16(),c=t.getUint16();let l,h;for(l=0;ls)continue;t.pos=n;const o=e.name;if(e.encoding){let a="";for(let r=0,i=e.length;r0&&(l+=e-1)}}else{if(m||y){warn("TT: nested FDEFs not allowed");p=!0}m=!0;u=l;s=d.pop();t.functionsDefined[s]={data:c,i:l}}else if(!m&&!y){s=d.at(-1);if(isNaN(s))info("TT: CALL empty stack (or invalid entry)."\ );else{t.functionsUsed[s]=!0;if(s in t.functionsStackDeltas){const e=d.length+t.functionsStackDeltas[s];if(e<0){warn("TT: CALL invalid functions stack delta.");t.hintsValid=!1;return}d.length=e}else if(s in t.functionsDefined&&!g.includes(s)){f.push({data:c,i:l,stackTop:d.length-1});g.push(s);o=t.functionsDefined[s];if(!o){warn("TT: CALL non-existent function");t.hintsValid=!1;return}c=o.data;l=o.i}}}if(!m&&!y){let t=0;e<=142?t=i[e]:e>=192&&e<=223?t=-1:e>=224&&(t=-2);if(e>=113&&e<=117){r=d.pop()\ ;isNaN(r)||(t=2*-r)}for(;t<0&&d.length>0;){d.pop();t++}for(;t>0;){d.push(NaN);t--}}}t.tooComplexToFollowFunctions=p;const w=[c];l>c.length&&w.push(new Uint8Array(l-c.length));if(u>h){warn("TT: complementing a missing function tail");w.push(new Uint8Array([34,45]))}!function foldTTTable(e,t){if(t.length>1){let a,r,i=0;for(a=0,r=t.length;a>>0,n=[];for(let t=0;t>>0);const s={ttcTag:t,majorVersion:a,minorVersion:r,numFonts:i,offsetTable:n};switch(a){case 1:return s;case 2:s.dsigTag=e\ .getInt32()>>>0;s.dsigLength=e.getInt32()>>>0;s.dsigOffset=e.getInt32()>>>0;return s}throw new FormatError(`Invalid TrueType Collection majorVersion: ${a}.`)}(e),i=t.split("+");let n;for(let s=0;s0||!(a.cMap instanceof IdentityCMap));if("OTTO"===n.version&&!t||!s.head||!s.hhea||!s.maxp||!s.post){c=new Stream(s["CFF "].data);o=new CFFFont(c,a);return this.convert(e,o,a)}delete s.glyf;delete s.loca;delete s.fpgm;delete s.prep;delete s["cvt "];this.isOpenType=!0}if(!s.ma\ xp)throw new FormatError(\'Required "maxp" table is not found\');t.pos=(t.start||0)+s.maxp.offset;let h=t.getInt32();const u=t.getUint16();if(65536!==h&&20480!==h){if(6===s.maxp.length)h=20480;else{if(!(s.maxp.length>=32))throw new FormatError(\'"maxp" table has a wrong version number\');h=65536}!function writeUint32(e,t,a){e[t+3]=255&a;e[t+2]=a>>>8;e[t+1]=a>>>16;e[t]=a>>>24}(s.maxp.data,0,h)}if(a.scaleFactors?.length===u&&l){const{scaleFactors:e}=a,t=int16(s.head.data[50],s.head.data[51]),r=new Gly\ fTable({glyfTable:s.glyf.data,isGlyphLocationsLong:t,locaTable:s.loca.data,numGlyphs:u});r.scale(e);const{glyf:i,loca:n,isLocationLong:o}=r.write();s.glyf.data=i;s.loca.data=n;if(o!==!!t){s.head.data[50]=0;s.head.data[51]=o?1:0}const c=s.hmtx.data;for(let t=0;t>8&255;c[a+1]=255&r;writeSignedInt16(c,a+2,Math.round(e[t]*signedInt16(c[a+2],c[a+3])))}}let d=u+1,f=!0;if(d>65535){f=!1;d=u;warn("Not enough space in glyfs to duplicate firs\ t glyph.")}let g=0,p=0;if(h>=65536&&s.maxp.length>=32){t.pos+=8;if(t.getUint16()>2){s.maxp.data[14]=0;s.maxp.data[15]=2}t.pos+=4;g=t.getUint16();t.pos+=4;p=t.getUint16()}s.maxp.data[4]=d>>8;s.maxp.data[5]=255&d;const m=function sanitizeTTPrograms(e,t,a,r){const i={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};e&&sanitizeTTProgram(e,i);t&&sanitizeTTProgram(t,i);e&&function checkInvalidFunctions(e,t){if(!e.tooComplexToFollowFunctions)if(\ e.functionsDefined.length>t){warn("TT: more functions defined than expected");e.hintsValid=!1}else for(let a=0,r=e.functionsUsed.length;at){warn("TT: invalid function id: "+a);e.hintsValid=!1;return}if(e.functionsUsed[a]&&!e.functionsDefined[a]){warn("TT: undefined function: "+a);e.hintsValid=!1;return}}}(i,r);if(a&&1&a.length){const e=new Uint8Array(a.length+1);e.set(a.data);a.data=e}return i.hintsValid}(s.fpgm,s.prep,s["cvt "],g);if(!m){delete s.fpgm;delete s.prep;delete s["cvt "]\ }!function sanitizeMetrics(e,t,a,r,i,n){if(!t){a&&(a.data=null);return}e.pos=(e.start||0)+t.offset;e.pos+=4;e.pos+=2;e.pos+=2;e.pos+=2;e.pos+=2;e.pos+=2;e.pos+=2;e.pos+=2;e.pos+=2;e.pos+=2;const s=e.getUint16();e.pos+=8;e.pos+=2;let o=e.getUint16();if(0!==s){if(!(2&int16(r.data[44],r.data[45]))){t.data[22]=0;t.data[23]=0}}if(o>i){info(`The numOfMetrics (${o}) should not be greater than the numGlyphs (${i}).`);o=i;t.data[34]=(65280&o)>>8;t.data[35]=255&o}const c=i-o-(a.length-4*o>>1);if(c>0){cons\ t e=new Uint8Array(a.length+2*c);e.set(a.data);if(n){e[a.length]=a.data[2];e[a.length+1]=a.data[3]}a.data=e}}(t,s.hhea,s.hmtx,s.head,d,f);if(!s.head)throw new FormatError(\'Required "head" table is not found\');!function sanitizeHead(e,t,a){const r=e.data,i=function int32(e,t,a,r){return(e<<24)+(t<<16)+(a<<8)+r}(r[0],r[1],r[2],r[3]);if(i>>16!=1){info("Attempting to fix invalid version in head table: "+i);r[0]=0;r[1]=1;r[2]=0;r[3]=0}const n=int16(r[50],r[51]);if(n<0||n>1){info("Attempting to fix in\ valid indexToLocFormat in head table: "+n);const e=t+1;if(a===e<<1){r[50]=0;r[51]=0}else{if(a!==e<<2)throw new FormatError("Could not fix indexToLocFormat: "+n);r[50]=0;r[51]=1}}}(s.head,u,l?s.loca.length:0);let b=Object.create(null);if(l){const e=int16(s.head.data[50],s.head.data[51]),t=function sanitizeGlyphLocations(e,t,a,r,i,n,s){let o,c,l;if(r){o=4;c=function fontItemDecodeLong(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]};l=function fontItemEncodeLong(e,t,a){e[t]=a>>>24&255;e[t+1]=a>>1\ 6&255;e[t+2]=a>>8&255;e[t+3]=255&a}}else{o=2;c=function fontItemDecode(e,t){return e[t]<<9|e[t+1]<<1};l=function fontItemEncode(e,t,a){e[t]=a>>9&255;e[t+1]=a>>1&255}}const h=n?a+1:a,u=o*(1+h),d=new Uint8Array(u);d.set(e.data.subarray(0,u));e.data=d;const f=t.data,g=f.length,p=new Uint8Array(g);let m,b;const y=[];for(m=0,b=0;mg&&(e=g);y.push({index:m,offset:e,endOffset:0})}y.sort(((e,t)=>e.offset-t.offset));for(m=0;m\ e.index-t.index));for(m=0;ms&&(s=e.sizeOfInstructions);S+=t;l(d,b,S)}if(0===S){const e=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);f\ or(m=0,b=o;ma+S)t.data=p.subarray(0,a+S);else{t.data=new Uint8Array(a+S);t.data.set(p.subarray(0,S))}t.data.set(p.subarray(0,a),S);l(e.data,d.length-o,S+a)}else t.data=p.subarray(0,S);return{missingGlyphs:x,maxSizeOfInstructions:s}}(s.loca,s.glyf,u,e,m,f,p);b=t.missingGlyphs;if(h>=65536&&s.maxp.length>=32){s.maxp.data[26]=t.maxSizeOfInstructions>>8;s.maxp.data[27]=255&t.maxSizeOfInstructions}}if(!s.hhea)throw new FormatEr\ ror(\'Required "hhea" table is not found\');if(0===s.hhea.data[10]&&0===s.hhea.data[11]){s.hhea.data[10]=255;s.hhea.data[11]=255}const y={unitsPerEm:int16(s.head.data[18],s.head.data[19]),yMax:signedInt16(s.head.data[42],s.head.data[43]),yMin:signedInt16(s.head.data[38],s.head.data[39]),ascent:signedInt16(s.hhea.data[4],s.hhea.data[5]),descent:signedInt16(s.hhea.data[6],s.hhea.data[7]),lineGap:signedInt16(s.hhea.data[8],s.hhea.data[9])};this.ascent=y.ascent/y.unitsPerEm;this.descent=y.descent/y.un\ itsPerEm;this.lineGap=y.lineGap/y.unitsPerEm;if(this.cssFontInfo?.lineHeight){this.lineHeight=this.cssFontInfo.metrics.lineHeight;this.lineGap=this.cssFontInfo.metrics.lineGap}else this.lineHeight=this.ascent-this.descent+this.lineGap;s.post&&function readPostScriptTable(e,a,r){const i=(t.start||0)+e.offset;t.pos=i;const n=i+e.length,s=t.getInt32();t.skip(28);let o,c,l=!0;switch(s){case 65536:o=jr;break;case 131072:const e=t.getUint16();if(e!==r){l=!1;break}const i=[];for(c=0;c=32768){l=!1;break}i.push(e)}if(!l)break;const h=[],u=[];for(;t.pos65535)throw new FormatError("Max size of CID is 65,535");let i=-1;t?i=r:void 0!==e[r]&&(i=e[r]);i>=0&&i>>0;let h=!1;if(o?.platformId!==i||o?.encodingId!==n){if(0!==i||0!==n&&1!==n&&3!==n)if(1===i&&0===n)h=!0;else if(3!==i||1!==n||!r&&o){if(a&&3===i&&0===n){h=!0;let a=!0;if(e>3;e.push(r);a=Math.max(r,a)}const r=[];for(let e=0;e<=a;e++)r.push({firstCode:t.getUint16(),entryCount:t.getUint16(),idDelta:signedInt16(t.getByte(),t.getByte()),idRa\ ngePos:t.pos+t.getUint16()});for(let a=0;a<256;a++)if(0===e[a]){t.pos=r[0].idRangePos+2*a;f=t.getUint16();u.push({charCode:a,glyphId:f})}else{const i=r[e[a]];for(d=0;d>1;t.skip(6);const a=[];let r;for(r=0;r>1)-(e-r);i.offsetIndex=s;o=Math.max(o,s+i.end-i.start+1)}else i.offsetIndex=-1}const c=[];for(d=0;d>>0;for(d=0;d>>0,a=t.getInt32()>>>0;let r=t.getInt32()>>>0;for(let t=e;t<=a;t++)u.push({charCode:t,glyphId:r++})}}}u.sort(((e,t)=>e.charCode-t.charCode));const g=[],p=new Set;for(const e of u){const{charCode:t}=e;if(!p.has(t)){p.add(t);g.push(e)}}return{platformId:o.platformId,\ encodingId:o.encodingId,mappings:g,hasShortCmap:h}}(s.cmap,t,this.isSymbolicFont,a.hasEncoding),r=e.platformId,i=e.encodingId,n=e.mappings;let o=[],c=!1;!a.hasEncoding||"MacRomanEncoding"!==a.baseEncodingName&&"WinAnsiEncoding"!==a.baseEncodingName||(o=getEncoding(a.baseEncodingName));if(a.hasEncoding&&!this.isSymbolicFont&&(3===r&&1===i||1===r&&0===i)){const e=Fr();for(let t=0;t<256;t++){let s;s=void 0!==this.differences[t]?this.differences[t]:o.length&&""!==o[t]?o[t]:Ar[t];if(!s)continue;const\ c=recoverGlyphName(s,e);let l;3===r&&1===i?l=e[c]:1===r&&0===i&&(l=Sr.indexOf(c));if(void 0===l){if(!a.glyphNames&&a.hasIncludedToUnicodeMap&&!(this.toUnicode instanceof IdentityToUnicodeMap)){const e=this.toUnicode.get(t);e&&(l=e.codePointAt(0))}if(void 0===l)continue}for(const e of n)if(e.charCode===l){w[t]=e.glyphId;break}}}else if(0===r){for(const e of n)w[e.charCode]=e.glyphId;c=!0}else if(3===r&&0===i)for(const e of n){let t=e.charCode;t>=61440&&t<=61695&&(t&=255);w[t]=e.glyphId}else for(\ const e of n)w[e.charCode]=e.glyphId;if(a.glyphNames&&(o.length||this.differences.length))for(let e=0;e<256;++e){if(!c&&void 0!==w[e])continue;const t=this.differences[e]||o[e];if(!t)continue;const r=a.glyphNames.indexOf(t);r>0&&hasGlyph(r)&&(w[e]=r)}}0===w.length&&(w[0]=0);let x=d-1;f||(x=0);if(!a.cssFontInfo){const e=adjustMapping(w,hasGlyph,x,this.toUnicode);this.toFontChar=e.toFontChar;s.cmap={tag:"cmap",data:createCmapTable(e.charCodeToGlyphId,e.toUnicodeExtraMap,d)};s["OS/2"]&&function val\ idateOS2Table(e,t){t.pos=(t.start||0)+e.offset;const a=t.getUint16();t.skip(60);const r=t.getUint16();if(a<4&&768&r)return!1;if(t.getUint16()>t.getUint16())return!1;t.skip(6);if(0===t.getUint16())return!1;e.data[8]=e.data[9]=0;return!0}(s["OS/2"],t)||(s["OS/2"]={tag:"OS/2",data:createOS2Table(a,e.charCodeToGlyphId,y)})}if(!l)try{c=new Stream(s["CFF "].data);o=new CFFParser(c,a,Rr).parse();o.duplicateFirstGlyph();const e=new CFFCompiler(o);s["CFF "].data=e.compile()}catch{warn("Failed to compile \ font "+a.loadedName)}if(s.name){const[t,r]=readNameTable(s.name);s.name.data=createNameTable(e,t);this.psName=t[0][6]||null;a.composite||function adjustTrueTypeToUnicode(e,t,a){if(e.isInternalFont)return;if(e.hasIncludedToUnicodeMap)return;if(e.hasEncoding)return;if(e.toUnicode instanceof IdentityToUnicodeMap)return;if(!t)return;if(0===a.length)return;if(e.defaultEncoding===kr)return;for(const e of a)if(!isWinNameRecord(e))return;const r=kr,i=[],n=Fr();for(const e in r){const t=r[e];if(""===t)co\ ntinue;const a=n[t];void 0!==a&&(i[e]=String.fromCharCode(a))}i.length>0&&e.toUnicode.amend(i)}(a,this.isSymbolicFont,r)}else s.name={tag:"name",data:createNameTable(this.name)};const S=new OpenTypeFileBuilder(n.version);for(const e in s)S.addTable(e,s[e].data);return S.toArray()}convert(e,a,r){r.fixedPitch=!1;r.builtInEncoding&&function adjustType1ToUnicode(e,t){if(e.isInternalFont)return;if(e.hasIncludedToUnicodeMap)return;if(t===e.defaultEncoding)return;if(e.toUnicode instanceof IdentityToUni\ codeMap)return;const a=[],r=Fr();for(const i in t){if(e.hasEncoding&&(e.baseEncodingName||void 0!==e.differences[i]))continue;const n=getUnicodeForGlyph(t[i],r);-1!==n&&(a[i]=String.fromCharCode(n))}a.length>0&&e.toUnicode.amend(a)}(r,r.builtInEncoding);let i=1;a instanceof CFFFont&&(i=a.numGlyphs-1);const n=a.getGlyphMapping(r);let s=null,o=n,c=null;if(!r.cssFontInfo){s=adjustMapping(n,a.hasGlyphId.bind(a),i,this.toUnicode);this.toFontChar=s.toFontChar;o=s.charCodeToGlyphId;c=s.toUnicodeExtraMa\ p}const l=a.numGlyphs;function getCharCodes(e,t){let a=null;for(const r in e)t===e[r]&&(a||=[]).push(0|r);return a}function createCharCode(e,t){for(const a in e)if(t===e[a])return 0|a;s.charCodeToGlyphId[s.nextAvailableFontCharCode]=t;return s.nextAvailableFontCharCode++}const h=a.seacs;if(s&&h?.length){const e=r.fontMatrix||t,i=a.getCharset(),o=Object.create(null);for(let t in h){t|=0;const a=h[t],r=Ar[a[2]],c=Ar[a[3]],l=i.indexOf(r),u=i.indexOf(c);if(l<0||u<0)continue;const d={x:a[0]*e[0]+a[1]\ *e[2]+e[4],y:a[0]*e[1]+a[1]*e[3]+e[5]},f=getCharCodes(n,t);if(f)for(const e of f){const t=s.charCodeToGlyphId,a=createCharCode(t,l),r=createCharCode(t,u);o[e]={baseFontCharCode:a,accentFontCharCode:r,accentOffset:d}}}r.seacMap=o}const u=r.fontMatrix?1/Math.max(...r.fontMatrix.slice(0,4).map(Math.abs)):1e3,d=new OpenTypeFileBuilder("OTTO");d.addTable("CFF ",a.data);d.addTable("OS/2",createOS2Table(r,o));d.addTable("cmap",createCmapTable(o,c,l));d.addTable("head","\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0_<õ\\0\\0"+s\ afeString16(u)+"\\0\\0\\0\\0ž\\v~\'\\0\\0\\0\\0ž\\v~\'\\0\\0"+safeString16(r.descent)+"ÿ"+safeString16(r.ascent)+string16(r.italicAngle?2:0)+"\\0\\0\\0\\0\\0\\0\\0");d.addTable("hhea","\\0\\0\\0"+safeString16(r.ascent)+safeString16(r.descent)+"\\0\\0ÿÿ\\0\\0\\0\\0\\0\\0"+safeString16(r.capHeight)+safeString16(Math.tan(r.italicAngle)*r.xHeight)+"\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0"+string16(l));d.addTable("hmtx",function fontFieldsHmtx(){const e=a.charstrings,t=a.cff?a.cff.widths:null;let r="\\0\\0\\0\\0";for(let a=1,i=l;a=65520&&e<=65535?0:e>=62976&&e<=63743?Tr()[e]||e:173===e?45:e}(a)}this.isType3Font&&(i=a);let h=null;if(this.seacMap?.[e]){l=!0;const t=this.seacMap[e];a=t.baseFontCharCode;h={fontChar:String.fromCodePoi\ nt(t.accentFontCharCode),offset:t.accentOffset}}let u="";"number"==typeof a&&(a<=1114111?u=String.fromCodePoint(a):warn(`charToGlyph - invalid fontCharCode: ${a}`));if(this.missingFile&&this.vertical&&1===u.length){const e=_r()[u.charCodeAt(0)];e&&(u=c=String.fromCharCode(e))}n=new fonts_Glyph(e,u,c,h,r,o,i,t,l);return this._glyphCache[e]=n}charsToGlyphs(e){let t=this._charsCache[e];if(t)return t;t=[];if(this.cMap){const a=Object.create(null),r=e.length;let i=0;for(;it.length%2==1,r=this.toUnicode instanceof IdentityToUnicodeMap?e=>this.toUnicode.charCodeOf(e):e=>this.toUnicode.charCodeOf(String.fromCodePoint(e));for(let i=0,n=e.length;i55295&&(n<57344||n>65533)&&i++;if(this.toUnicode){const e=r(n);if(-1!==e){if(hasCurrentBufErrors()){t.push(a.join(""));a.length=0}for(let t=(this.cMap?this.cMap.getCharCodeLength(e):1)-1;t>=0;t--)a.push(S\ tring.fromCharCode(e>>8*t&255));continue}}if(!hasCurrentBufErrors()){t.push(a.join(""));a.length=0}a.push(String.fromCodePoint(n))}t.push(a.join(""));return t}}class ErrorFont{constructor(e){this.error=e;this.loadedName="g_font_error";this.missingFile=!0}charsToGlyphs(){return[]}encodeString(e){return[e]}exportData(){return{error:this.error}}}const Si=2,Ai=3,ki=4,Ci=5,vi=6,Fi=7;class Pattern{constructor(){unreachable("Cannot initialize Pattern.")}static parseShading(e,t,a,r,i,n){const s=e instan\ ceof BaseStream?e.dict:e,o=s.get("ShadingType");try{switch(o){case Si:case Ai:return new RadialAxialShading(s,t,a,r,i,n);case ki:case Ci:case vi:case Fi:return new MeshShading(e,t,a,r,i,n);default:throw new FormatError("Unsupported ShadingType: "+o)}}catch(e){if(e instanceof MissingDataException)throw e;warn(e);return new DummyShading}}}class BaseShading{static SMALL_NUMBER=1e-6;getIR(){unreachable("Abstract method `getIR` called.")}}class RadialAxialShading extends BaseShading{constructor(e,t,a\ ,r,i,n){super();this.shadingType=e.get("ShadingType");let s=0;this.shadingType===Si?s=4:this.shadingType===Ai&&(s=6);this.coordsArr=e.getArray("Coords");if(!isNumberArray(this.coordsArr,s))throw new FormatError("RadialAxialShading: Invalid /Coords array.");const o=ColorSpaceUtils.parse({cs:e.getRaw("CS")||e.getRaw("ColorSpace"),xref:t,resources:a,pdfFunctionFactory:r,globalColorSpaceCache:i,localColorSpaceCache:n});this.bbox=lookupNormalRect(e.getArray("BBox"),null);let c=0,l=1;const h=e.getArra\ y("Domain");isNumberArray(h,2)&&([c,l]=h);let u=!1,d=!1;const f=e.getArray("Extend");(function isBooleanArray(e,t){return Array.isArray(e)&&(null===t||e.length===t)&&e.every((e=>"boolean"==typeof e))})(f,2)&&([u,d]=f);if(!(this.shadingType!==Ai||u&&d)){const[e,t,a,r,i,n]=this.coordsArr,s=Math.hypot(e-r,t-i);a<=n+s&&n<=a+s&&warn("Unsupported radial gradient.")}this.extendStart=u;this.extendEnd=d;const g=e.getRaw("Function"),p=r.create(g,!0),m=(l-c)/840,b=this.colorStops=[];if(c>=l||m<=0){info("Ba\ d shading domain.");return}const y=new Float32Array(o.numComps),w=new Float32Array(1);let x=0;w[0]=c;p(w,0,y,0);const S=new Uint8ClampedArray(3);o.getRgb(y,0,S);let[k,C,v]=S;b.push([0,Util.makeHexColor(k,C,v)]);let F=1;w[0]=c+m;p(w,0,y,0);o.getRgb(y,0,S);let[T,O,M]=S,D=T-k+1,R=O-C+1,N=M-v+1,E=T-k-1,L=O-C-1,j=M-v-1;for(let e=2;e<840;e++){w[0]=c+e*m;p(w,0,y,0);o.getRgb(y,0,S);const[t,a,r]=S,i=e-x;D=Math.min(D,(t-k+1)/i);R=Math.min(R,(a-C+1)/i);N=Math.min(N,(r-v+1)/i);E=Math.max(E,(t-k-1)/i);L=Math\ .max(L,(a-C-1)/i);j=Math.max(j,(r-v-1)/i);if(!(E<=D&&L<=R&&j<=N)){const e=Util.makeHexColor(T,O,M);b.push([F/840,e]);D=t-T+1;R=a-O+1;N=r-M+1;E=t-T-1;L=a-O-1;j=r-M-1;x=F;k=T;C=O;v=M}F=e;T=t;O=a;M=r}b.push([1,Util.makeHexColor(T,O,M)]);let _="transparent";e.has("Background")&&(_=o.getRgbHex(e.get("Background"),0));if(!u){b.unshift([0,_]);b[1][0]+=BaseShading.SMALL_NUMBER}if(!d){b.at(-1)[0]-=BaseShading.SMALL_NUMBER;b.push([1,_])}this.colorStops=b}getIR(){const{coordsArr:e,shadingType:t}=this;let a\ ,r,i,n,s;if(t===Si){r=[e[0],e[1]];i=[e[2],e[3]];n=null;s=null;a="axial"}else if(t===Ai){r=[e[0],e[1]];i=[e[3],e[4]];n=e[2];s=e[5];a="radial"}else unreachable(`getPattern type unknown: ${t}`);return["RadialAxial",a,this.bbox,this.colorStops,r,i,n,s]}}class MeshStreamReader{constructor(e,t){this.stream=e;this.context=t;this.buffer=0;this.bufferLength=0;const a=t.numComps;this.tmpCompsBuf=new Float32Array(a);const r=t.colorSpace.numComps;this.tmpCsCompsBuf=t.colorFn?new Float32Array(r):this.tmpComp\ sBuf}get hasData(){if(this.stream.end)return this.stream.pos0)return!0;const e=this.stream.getByte();if(e<0)return!1;this.buffer=e;this.bufferLength=8;return!0}readBits(e){const{stream:t}=this;let{buffer:a,bufferLength:r}=this;if(32===e){if(0===r)return t.getInt32()>>>0;a=a<<24|t.getByte()<<16|t.getByte()<<8|t.getByte();const e=t.getByte();this.buffer=e&(1<>r)>>>0}if(8===e&&0===r)return t.getByte();for(;r>r}align(){this.buffer=0;this.bufferLength=0}readFlag(){return this.readBits(this.context.bitsPerFlag)}readCoordinate(){const{bitsPerCoordinate:e,decode:t}=this.context,a=this.readBits(e),r=this.readBits(e),i=e<32?1/((1<n?n:e;t=t>s?s:t;a=ae*i[t])):a;let s,o=-2;const c=[];for(const[e,t]of r.map(((e,t)=>[e,t])).sort((([e],[t])=>e-t)))if(-1!==e)if(e===o+1){s.push(n[t]);o+=1}else{o=e;s=[n[t]];c.push(e,s)}return c}(e),a=new Dict(null);a.set("BaseFont",Name.get(e));a.set("Type",Name.get("Font"));a.set("Subtype",Name.get("CIDFontType2"));a.set("Encoding",Name.get("Identity-H"));a.set("CIDToGIDMap",Name.get("Identity"));a.set("W",t);a.set("FirstChar",t[0]);a.set("LastChar",t.at(-2)+t.at(-1).length-1);const r=new Dict(null);a\ .set("FontDescriptor",r);const i=new Dict(null);i.set("Ordering","Identity");i.set("Registry","Adobe");i.set("Supplement",0);a.set("CIDSystemInfo",i);return a}class PostScriptParser{constructor(e){this.lexer=e;this.operators=[];this.token=null;this.prev=null}nextToken(){this.prev=this.token;this.token=this.lexer.getToken()}accept(e){if(this.token.type===e){this.nextToken();return!0}return!1}expect(e){if(this.accept(e))return!0;throw new FormatError(`Unexpected symbol: found ${this.token.type} ex\ pected ${e}.`)}parse(){this.nextToken();this.expect(yn.LBRACE);this.parseBlock();this.expect(yn.RBRACE);return this.operators}parseBlock(){for(;;)if(this.accept(yn.NUMBER))this.operators.push(this.prev.value);else if(this.accept(yn.OPERATOR))this.operators.push(this.prev.value);else{if(!this.accept(yn.LBRACE))return;this.parseCondition()}}parseCondition(){const e=this.operators.length;this.operators.push(null,null);this.parseBlock();this.expect(yn.RBRACE);if(this.accept(yn.IF)){this.operators[e]\ =this.operators.length;this.operators[e+1]="jz"}else{if(!this.accept(yn.LBRACE))throw new FormatError("PS Function: error parsing conditional.");{const t=this.operators.length;this.operators.push(null,null);const a=this.operators.length;this.parseBlock();this.expect(yn.RBRACE);this.expect(yn.IFELSE);this.operators[t]=this.operators.length;this.operators[t+1]="j";this.operators[e]=a;this.operators[e+1]="jz"}}}}const yn={LBRACE:0,RBRACE:1,NUMBER:2,OPERATOR:3,IF:4,IFELSE:5};class PostScriptToken{st\ atic get opCache(){return shadow(this,"opCache",Object.create(null))}constructor(e,t){this.type=e;this.value=t}static getOperator(e){return PostScriptToken.opCache[e]||=new PostScriptToken(yn.OPERATOR,e)}static get LBRACE(){return shadow(this,"LBRACE",new PostScriptToken(yn.LBRACE,"{"))}static get RBRACE(){return shadow(this,"RBRACE",new PostScriptToken(yn.RBRACE,"}"))}static get IF(){return shadow(this,"IF",new PostScriptToken(yn.IF,"IF"))}static get IFELSE(){return shadow(this,"IFELSE",new Pos\ tScriptToken(yn.IFELSE,"IFELSE"))}}class PostScriptLexer{constructor(e){this.stream=e;this.nextChar();this.strBuf=[]}nextChar(){return this.currentChar=this.stream.getByte()}getToken(){let e=!1,t=this.currentChar;for(;;){if(t<0)return wa;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!isWhiteSpace(t))break;t=this.nextChar()}switch(0|t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return new PostScriptToken(yn.NUMBER,this.getNumb\ er());case 123:this.nextChar();return PostScriptToken.LBRACE;case 125:this.nextChar();return PostScriptToken.RBRACE}const a=this.strBuf;a.length=0;a[0]=String.fromCharCode(t);for(;(t=this.nextChar())>=0&&(t>=65&&t<=90||t>=97&&t<=122);)a.push(String.fromCharCode(t));const r=a.join("");switch(r.toLowerCase()){case"if":return PostScriptToken.IF;case"ifelse":return PostScriptToken.IFELSE;default:return PostScriptToken.getOperator(r)}}getNumber(){let e=this.currentChar;const t=this.strBuf;t.length=0;\ t[0]=String.fromCharCode(e);for(;(e=this.nextChar())>=0&&(e>=48&&e<=57||45===e||46===e);)t.push(String.fromCharCode(e));const a=parseFloat(t.join(""));if(isNaN(a))throw new FormatError(`Invalid floating point number: ${a}`);return a}}class BaseLocalCache{constructor(e){this._onlyRefs=!0===e?.onlyRefs;if(!this._onlyRefs){this._nameRefMap=new Map;this._imageMap=new Map}this._imageCache=new RefSetCache}getByName(e){this._onlyRefs&&unreachable("Should not call `getByName` method.");const t=this._nam\ eRefMap.get(e);return t?this.getByRef(t):this._imageMap.get(e)||null}getByRef(e){return this._imageCache.get(e)||null}set(e,t,a){unreachable("Abstract method `set` called.")}}class LocalImageCache extends BaseLocalCache{set(e,t=null,a){if("string"!=typeof e)throw new Error(\'LocalImageCache.set - expected "name" argument.\');if(t){if(this._imageCache.has(t))return;this._nameRefMap.set(e,t);this._imageCache.put(t,a)}else this._imageMap.has(e)||this._imageMap.set(e,a)}}class LocalColorSpaceCache ext\ ends BaseLocalCache{set(e=null,t=null,a){if("string"!=typeof e&&!t)throw new Error(\'LocalColorSpaceCache.set - expected "name" and/or "ref" argument.\');if(t){if(this._imageCache.has(t))return;null!==e&&this._nameRefMap.set(e,t);this._imageCache.put(t,a)}else this._imageMap.has(e)||this._imageMap.set(e,a)}}class LocalFunctionCache extends BaseLocalCache{constructor(e){super({onlyRefs:!0})}set(e=null,t,a){if(!t)throw new Error(\'LocalFunctionCache.set - expected "ref" argument.\');this._imageCache.h\ as(t)||this._imageCache.put(t,a)}}class LocalGStateCache extends BaseLocalCache{set(e,t=null,a){if("string"!=typeof e)throw new Error(\'LocalGStateCache.set - expected "name" argument.\');if(t){if(this._imageCache.has(t))return;this._nameRefMap.set(e,t);this._imageCache.put(t,a)}else this._imageMap.has(e)||this._imageMap.set(e,a)}}class LocalTilingPatternCache extends BaseLocalCache{constructor(e){super({onlyRefs:!0})}set(e=null,t,a){if(!t)throw new Error(\'LocalTilingPatternCache.set - expected "r\ ef" argument.\');this._imageCache.has(t)||this._imageCache.put(t,a)}}class RegionalImageCache extends BaseLocalCache{constructor(e){super({onlyRefs:!0})}set(e=null,t,a){if(!t)throw new Error(\'RegionalImageCache.set - expected "ref" argument.\');this._imageCache.has(t)||this._imageCache.put(t,a)}}class GlobalColorSpaceCache extends BaseLocalCache{constructor(e){super({onlyRefs:!0})}set(e=null,t,a){if(!t)throw new Error(\'GlobalColorSpaceCache.set - expected "ref" argument.\');this._imageCache.has(t)|\ |this._imageCache.put(t,a)}clear(){this._imageCache.clear()}}class GlobalImageCache{static NUM_PAGES_THRESHOLD=2;static MIN_IMAGES_TO_CACHE=10;static MAX_BYTE_SIZE=5e7;#H=new RefSet;constructor(){this._refCache=new RefSetCache;this._imageCache=new RefSetCache}get#W(){let e=0;for(const t of this._imageCache)e+=t.byteSize;return e}get#z(){return!(this._imageCache.size+e)):null}class PDFFunction{static getSampleArray(e,t,a,r){let i,n,s=1;for(i=0,n=e.length;i>c)*h;l&=(1<0&&(d=n[u-1]);let f=a[1];u>1,c=r.length>>1,l=new PostScriptEvaluator(s),h=Object.create(null);let u=8192;const d=new Float32Array(c);return function constructPostScriptFn(e,t,a,r){let n,s,f="";const g=d;for(n=0;ne&&(s=e)}m[n]=s}if(u>0){u--;h[f]=m}a.set(m,r)}}}function isPDFFunction(e){let t;if(e instanc\ eof Dict)t=e;else{if(!(e instanceof BaseStream))return!1;t=e.dict}return t.has("FunctionType")}class PostScriptStack{static MAX_STACK_SIZE=100;constructor(e){this.stack=e?Array.from(e):[]}push(e){if(this.stack.length>=PostScriptStack.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");this.stack.push(e)}pop(){if(this.stack.length<=0)throw new Error("PostScript function stack underflow.");return this.stack.pop()}copy(e){if(this.stack.length+e>=PostScriptStack.MAX_STACK_SIZE)thro\ w new Error("PostScript function stack overflow.");const t=this.stack;for(let a=t.length-e,r=e-1;r>=0;r--,a++)t.push(t[a])}index(e){this.push(this.stack[this.stack.length-e-1])}roll(e,t){const a=this.stack,r=a.length-e,i=a.length-1,n=r+(t-Math.floor(t/e)*e);for(let e=r,t=i;e0?t.push(s<>o);break;case"ceiling":s=t.pop();t.push(Math.ceil(s));break;case"copy":s=t.pop();t.copy(s);break;case"cos":s=t.pop();t.push(Math.cos(s%360/180*Math.PI));break;case"cvi":s=0|t.pop();t.push(s);break;case"cvr":break;case"div":o=t.pop();s=t.pop();t.push(s/o);break;case"dup":t.copy(1);break;case"eq":o=t.pop();s=t.pop();t.push(s===o);break;case"exch":t.roll(2,1);break;case"exp":o=t.pop();s=t.pop();t.push(s**o);break;case"false":t.push(!1)\ ;break;case"floor":s=t.pop();t.push(Math.floor(s));break;case"ge":o=t.pop();s=t.pop();t.push(s>=o);break;case"gt":o=t.pop();s=t.pop();t.push(s>o);break;case"idiv":o=t.pop();s=t.pop();t.push(s/o|0);break;case"index":s=t.pop();t.index(s);break;case"le":o=t.pop();s=t.pop();t.push(s<=o);break;case"ln":s=t.pop();t.push(Math.log(s));break;case"log":s=t.pop();t.push(Math.log10(s));break;case"lt":o=t.pop();s=t.pop();t.push(s=t?new AstLiteral(t)\ :e.max<=t?e:new AstMin(e,t)}class PostScriptCompiler{compile(e,t,a){const r=[],i=[],n=t.length>>1,s=a.length>>1;let o,c,l,h,u,d,f,g,p=0;for(let e=0;et.min){o.unshift("Math.max(",n,", ");o.push(")")}if(s4){r=!0;t=0}else{r=!1;t=1}const c=[];for(n=0;n=0&&"ET"===An[e];--e)An[e]="EN";for(let e=n+1;e0&&(t=An[n-1]);let a=u;e+1g&&isOdd(g)&&(m=g)}for(g=p;g>=m;--g){let e=-1;for(n=0,s=c.length;n=0){reverseValues(Sn,e,n);e=-1}}else e<0&&(e=n);e>=0&&reverseValues(Sn,e,c.length)}for(n=0,s=Sn.length;n"!==e||(Sn[n]="")}return createBidiText(Sn.jo\ in(""),r)}const kn={style:"normal",weight:"normal"},Cn={style:"normal",weight:"bold"},vn={style:"italic",weight:"normal"},Fn={style:"italic",weight:"bold"},In=new Map([["Times-Roman",{local:["Times New Roman","Times-Roman","Times","Liberation Serif","Nimbus Roman","Nimbus Roman L","Tinos","Thorndale","TeX Gyre Termes","FreeSerif","Linux Libertine O","Libertinus Serif","DejaVu Serif","Bitstream Vera Serif","Ubuntu"],style:kn,ultimate:"serif"}],["Times-Bold",{alias:"Times-Roman",style:Cn,ultimate:\ "serif"}],["Times-Italic",{alias:"Times-Roman",style:vn,ultimate:"serif"}],["Times-BoldItalic",{alias:"Times-Roman",style:Fn,ultimate:"serif"}],["Helvetica",{local:["Helvetica","Helvetica Neue","Arial","Arial Nova","Liberation Sans","Arimo","Nimbus Sans","Nimbus Sans L","A030","TeX Gyre Heros","FreeSans","DejaVu Sans","Albany","Bitstream Vera Sans","Arial Unicode MS","Microsoft Sans Serif","Apple Symbols","Cantarell"],path:"LiberationSans-Regular.ttf",style:kn,ultimate:"sans-serif"}],["Helvetica\ -Bold",{alias:"Helvetica",path:"LiberationSans-Bold.ttf",style:Cn,ultimate:"sans-serif"}],["Helvetica-Oblique",{alias:"Helvetica",path:"LiberationSans-Italic.ttf",style:vn,ultimate:"sans-serif"}],["Helvetica-BoldOblique",{alias:"Helvetica",path:"LiberationSans-BoldItalic.ttf",style:Fn,ultimate:"sans-serif"}],["Courier",{local:["Courier","Courier New","Liberation Mono","Nimbus Mono","Nimbus Mono L","Cousine","Cumberland","TeX Gyre Cursor","FreeMono","Linux Libertine Mono O","Libertinus Mono"],sty\ le:kn,ultimate:"monospace"}],["Courier-Bold",{alias:"Courier",style:Cn,ultimate:"monospace"}],["Courier-Oblique",{alias:"Courier",style:vn,ultimate:"monospace"}],["Courier-BoldOblique",{alias:"Courier",style:Fn,ultimate:"monospace"}],["ArialBlack",{local:["Arial Black"],style:{style:"normal",weight:"900"},fallback:"Helvetica-Bold"}],["ArialBlack-Bold",{alias:"ArialBlack"}],["ArialBlack-Italic",{alias:"ArialBlack",style:{style:"italic",weight:"900"},fallback:"Helvetica-BoldOblique"}],["ArialBlack\ -BoldItalic",{alias:"ArialBlack-Italic"}],["ArialNarrow",{local:["Arial Narrow","Liberation Sans Narrow","Helvetica Condensed","Nimbus Sans Narrow","TeX Gyre Heros Cn"],style:kn,fallback:"Helvetica"}],["ArialNarrow-Bold",{alias:"ArialNarrow",style:Cn,fallback:"Helvetica-Bold"}],["ArialNarrow-Italic",{alias:"ArialNarrow",style:vn,fallback:"Helvetica-Oblique"}],["ArialNarrow-BoldItalic",{alias:"ArialNarrow",style:Fn,fallback:"Helvetica-BoldOblique"}],["Calibri",{local:["Calibri","Carlito"],style:k\ n,fallback:"Helvetica"}],["Calibri-Bold",{alias:"Calibri",style:Cn,fallback:"Helvetica-Bold"}],["Calibri-Italic",{alias:"Calibri",style:vn,fallback:"Helvetica-Oblique"}],["Calibri-BoldItalic",{alias:"Calibri",style:Fn,fallback:"Helvetica-BoldOblique"}],["Wingdings",{local:["Wingdings","URW Dingbats"],style:kn}],["Wingdings-Regular",{alias:"Wingdings"}],["Wingdings-Bold",{alias:"Wingdings"}]]),Tn=new Map([["Arial-Black","ArialBlack"]]);function getFamilyName(e){const t=new Set(["thin","extralight\ ","ultralight","demilight","semilight","light","book","regular","normal","medium","demibold","semibold","bold","extrabold","ultrabold","black","heavy","extrablack","ultrablack","roman","italic","oblique","ultracondensed","extracondensed","condensed","semicondensed","normal","semiexpanded","expanded","extraexpanded","ultraexpanded","bolditalic"]);return e.split(/[- ,+]+/g).filter((e=>!t.has(e.toLowerCase()))).join(" ")}function generateFont({alias:e,local:t,path:a,fallback:r,style:i,ultimate:n},s\ ,o,c=!0,l=!0,h=""){const u={style:null,ultimate:null};if(t){const e=h?` ${h}`:"";for(const a of t)s.push(`local(${a}${e})`)}if(e){const t=In.get(e),n=h||function getStyleToAppend(e){switch(e){case Cn:return"Bold";case vn:return"Italic";case Fn:return"Bold Italic";default:if("bold"===e?.weight)return"Bold";if("italic"===e?.style)return"Italic"}return""}(i);Object.assign(u,generateFont(t,s,o,c&&!r,l&&!a,n))}i&&(u.style=i);n&&(u.ultimate=n);if(c&&r){const e=In.get(r),{ultimate:t}=generateFont(e,s,o\ ,c,l&&!a,h);u.ultimate||=t}l&&a&&o&&s.push(`url(${o}${a})`);return u}function getFontSubstitution(e,t,a,r,i,n){if(r.startsWith("InvalidPDFjsFont_"))return null;"TrueType"!==n&&"Type1"!==n||!/^[A-Z]{6}\\+/.test(r)||(r=r.slice(7));const s=r=normalizeFontName(r);let o=e.get(s);if(o)return o;let c=In.get(r);if(!c)for(const[e,t]of Tn)if(r.startsWith(e)){r=`${t}${r.substring(e.length)}`;c=In.get(r);break}let l=!1;if(!c){c=In.get(i);l=!0}const h=`${t.getDocId()}_s${t.createFontId()}`;if(!c){if(!validate\ FontName(r)){warn(`Cannot substitute the font because of its name: ${r}`);e.set(s,null);return null}const t=/bold/gi.test(r),a=/oblique|italic/gi.test(r),i=t&&a&&Fn||t&&Cn||a&&vn||kn;o={css:`"${getFamilyName(r)}",${h}`,guessFallback:!0,loadedName:h,baseFontName:r,src:`local(${r})`,style:i};e.set(s,o);return o}const u=[];l&&validateFontName(r)&&u.push(`local(${r})`);const{style:d,ultimate:f}=generateFont(c,u,a),g=null===f,p=g?"":`,${f}`;o={css:`"${getFamilyName(r)}",${h}${p}`,guessFallback:g,load\ edName:h,baseFontName:r,src:u.join(","),style:d};e.set(s,o);return o}const On=3285377520,Mn=4294901760,Dn=65535;class MurmurHash3_64{constructor(e){this.h1=e?4294967295&e:On;this.h2=e?4294967295&e:On}update(e){let t,a;if("string"==typeof e){t=new Uint8Array(2*e.length);a=0;for(let r=0,i=e.length;r>>8;t[a++]=255&i}}}else{if(!ArrayBuffer.isView(e))throw new Error("Invalid data format, must be a string or TypedArray.");t=e.slice();a=t\ .byteLength}const r=a>>2,i=a-4*r,n=new Uint32Array(t.buffer,0,r);let s=0,o=0,c=this.h1,l=this.h2;const h=3432918353,u=461845907,d=11601,f=13715;for(let e=0;e>>17;s=s*u&Mn|s*f&Dn;c^=s;c=c<<13|c>>>19;c=5*c+3864292196}else{o=n[e];o=o*h&Mn|o*d&Dn;o=o<<15|o>>>17;o=o*u&Mn|o*f&Dn;l^=o;l=l<<13|l>>>19;l=5*l+3864292196}s=0;switch(i){case 3:s^=t[4*r+2]<<16;case 2:s^=t[4*r+1]<<8;case 1:s^=t[4*r];s=s*h&Mn|s*d&Dn;s=s<<15|s>>>17;s=s*u&Mn|s*f&Dn;1&r?c^=s:l^=s}this\ .h1=c;this.h2=l}hexdigest(){let e=this.h1,t=this.h2;e^=t>>>1;e=3981806797*e&Mn|36045*e&Dn;t=4283543511*t&Mn|(2950163797*(t<<16|e>>>16)&Mn)>>>16;e^=t>>>1;e=444984403*e&Mn|60499*e&Dn;t=3301882366*t&Mn|(3120437893*(t<<16|e>>>16)&Mn)>>>16;e^=t>>>1;return(e>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}function resizeImageMask(e,t,a,r,i,n){const s=i*n;let o;o=t<=8?new Uint8Array(s):t<=16?new Uint16Array(s):new Uint32Array(s);const c=a/i,l=r/n;let h,u,d,f,g=0;const p=new Uint\ 16Array(i),m=a;for(h=0;h0&&Number.isInteger(a.height)&&a.height>0&&(a.width!==f||a.height!==g)){warn("PDFImage - using the Width/Height of the image data, rather than the image dictionary.");f=a.width;g=a.height}else{const e="number"==typeof f&&f>0,t="number"==typeof g&&g>0;if(!e||!t){if(!a.fallbackDims)throw new FormatError(`Invalid image width: ${f} or height: ${g}`);warn("PDFImage - using the Width/Height of the parent image, for SMask/Mask data.");e||(f=a.fa\ llbackDims.width);t||(g=a.fallbackDims.height)}}this.width=f;this.height=g;this.interpolate=h.get("I","Interpolate");this.imageMask=h.get("IM","ImageMask")||!1;this.matte=h.get("Matte")||!1;let p=a.bitsPerComponent;if(!p){p=h.get("BPC","BitsPerComponent");if(!p){if(!this.imageMask)throw new FormatError(`Bits per component missing in image: ${this.imageMask}`);p=1}}this.bpc=p;if(!this.imageMask){let i=h.getRaw("CS")||h.getRaw("ColorSpace");const n=!!i;if(n)this.jpxDecoderOptions?.smaskInData&&(i=\ Name.get("DeviceRGBA"));else if(this.jpxDecoderOptions)i=Name.get("DeviceRGBA");else switch(a.numComps){case 1:i=Name.get("DeviceGray");break;case 3:i=Name.get("DeviceRGB");break;case 4:i=Name.get("DeviceCMYK");break;default:throw new Error(`Images with ${a.numComps} color components not supported.`)}this.colorSpace=ColorSpaceUtils.parse({cs:i,xref:e,resources:r?t:null,pdfFunctionFactory:o,globalColorSpaceCache:c,localColorSpaceCache:l});this.numComps=this.colorSpace.numComps;if(this.jpxDecoderO\ ptions){this.jpxDecoderOptions.numComponents=n?this.numComps:0;this.jpxDecoderOptions.isIndexedColormap="Indexed"===this.colorSpace.name}}this.decode=h.getArray("D","Decode");this.needsDecode=!1;if(this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode,p)||s&&!ColorSpace.isDefaultDecode(this.decode,1))){this.needsDecode=!0;const e=(1<0,c=(r+7>>3)*i,l=e.getBytes(c),h=1===r&&1===i&&o===(0===l.length||!!(128&l[0]));if(h)return{isSingleOpaquePixel:h};if(t){if(ImageResizer.needsToBeResized(r,i)){const e=new Uint8ClampedArray(r*i*4);convertBlackAndWhi\ teToRGBA({src:l,dest:e,width:r,height:i,nonBlackColor:0,inverseDecode:o});return ImageResizer.createImage({kind:v,data:e,width:r,height:i,interpolate:n})}const e=new OffscreenCanvas(r,i),t=e.getContext("2d"),a=t.createImageData(r,i);convertBlackAndWhiteToRGBA({src:l,dest:a.data,width:r,height:i,nonBlackColor:0,inverseDecode:o});t.putImageData(a,0,0);return{data:null,width:r,height:i,interpolate:n,bitmap:e.transferToImageBitmap()}}const u=l.byteLength;let d;if(e instanceof DecodeStream&&(!o||c===\ u))d=l;else if(o){d=new Uint8Array(c);d.set(l);d.fill(255,u)}else d=new Uint8Array(l);if(o)for(let e=0;e>7&1;s[d+1]=u>>6&1;s[d+2]=u>>5&1;s[d+3]=u>>4&1;s[d+4]=u>>3&1;s[d+5]=u>\ >2&1;s[d+6]=u>>1&1;s[d+7]=1&u;d+=8}if(d>=1}}}}else{let a=0;u=0;for(d=0,h=n;d>r;i<0?i=0:i>l&&(i=l);s[d]=i;u&=(1<s[r+1]){t=255;break}}o[h]=t}}}if(o)for(h=0,d=3,u=t*r;h>3,h=t&&ImageResizer.needsToBeResized(a,r);if(!this.smask&&!this.mask&&"DeviceRGBA"===this.colorSpace.name){i.kind=v;const e=i.data=await this.getImageBytes(o*s*4,{});return t?h?ImageResizer.createImage(i,!1):this.createBitmap(v,a,r,e):i}if(!e){let e;"DeviceGray"===this.colorSpace.name&&1===c?e=k:"DeviceRGB"!==this.colorSpace.name||8!==c||this.needsDecode||(e=C);if(e&&!this.smask&&!this.mask&&a===s&&r===o){const n=await this.#$(s,o);if(n)return n;const c=await this.getImageBytes(o*l,{})\ ;if(t)return h?ImageResizer.createImage({data:c,kind:e,width:a,height:r,interpolate:this.interpolate},this.needsDecode):this.createBitmap(e,s,o,c);i.kind=e;i.data=c;if(this.needsDecode){assert(e===k,"PDFImage.createImageData: The image must be grayscale.");const t=i.data;for(let e=0,a=t.length;e>3,s=await this.getImageBytes(r*n,{internal:!0}),o=this.getComponents(s);let c,l;if(1===i){l=a*r;if(this.needsDecode)for(c=0;c0&&r[0].count++}class Time\ SlotManager{static TIME_SLOT_DURATION_MS=20;static CHECK_TIME_EVERY=100;constructor(){this.reset()}check(){if(++this.checkedo){const e="Image exceeded maximum allowed size and was removed.";if(!c)throw new Error(e);warn(e);return}let g;h.has("OC")&&(g=await this.parseMarkedContentProps(h.get("OC"),e));let p,m,b;if(h.get("IM","ImageMask")||!1){p=await PDFImage.createMask({image:t,isOffscreenCanvasSupported:l&&!this.parsingType3Font});if(p.isSingleOpaquePixel){m=ta;b=[];r.addImageOps(m,b,g);if(i){const e={fn:m,ar\ gs:b,optionalContent:g};n.set(i,u,e);u&&this._regionalImageCache.set(null,u,e)}return}if(this.parsingType3Font){b=function compileType3Glyph({data:e,width:t,height:a}){if(t>1e3||a>1e3)return null;const r=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),i=t+1,n=new Uint8Array(i*(a+1));let s,o,c;const l=t+7&-8,h=new Uint8Array(l*a);let u=0;for(const t of e){let e=128;for(;e>0;){h[u++]=t&e?0:255;e>>=1}}let d=0;u=0;if(0!==h[u]){n[0]=1;++d}for(o=1;o>2)+(h[u+1]?4:0)+(h[u-l+1]?8:0);if(r[e]){n[c+o]=r[e];++d}u++}if(h[u-l]!==h[u]){n[c+o]=h[u]?2:4;++d}if(d>1e3)return null}u=l*(a-1);c=s*i;if(0!==h[u]){n[c]=8;++d}for(o=1;o1e3)return null;const f=new Int32Array([0,i,-1,0,-i,0,0,0,1]),g=[],{a:p,b:m,c:b,d:y,e:w,f:x}=(new DOMMatrix).sc\ aleSelf(1/t,-1/a).translateSelf(0,-a);for(s=0;d&&s<=a;s++){let e=s*i;const a=e+t;for(;e>4;n[e]&=l>>2|l<<2}r=e%i;o=e/i|0;g.push(oa,p*r+b*o+w,m*r+y*o+x);n[e]||--d}while(c!==e);--s}return[na,[new Float32Array(g)],new Float32Array([0,0,t,a])]}(p);if(b){r.addImageOps(aa,b,g);return}warn("Cannot compile Type3 gly\ ph.");r.addImageOps(Vt,[p],g);return}const e=`mask_${this.idFactory.createObjId()}`;r.addDependency(e);p.dataLen=p.bitmap?p.width*p.height*4:p.data.length;this._sendImgData(e,p);m=Vt;b=[{data:e,width:p.width,height:p.height,interpolate:p.interpolate,count:1}];r.addImageOps(m,b,g);if(i){const t={objId:e,fn:m,args:b,optionalContent:g};n.set(i,u,t);u&&this._regionalImageCache.set(null,u,t)}return}const y=h.has("SMask")||h.has("Mask");if(a&&d+f<200&&!y){try{const i=new PDFImage({xref:this.xref,res:e\ ,image:t,isInline:a,pdfFunctionFactory:this._pdfFunctionFactory,globalColorSpaceCache:this.globalColorSpaceCache,localColorSpaceCache:s});p=await i.createImageData(!0,!1);r.addImageOps(Yt,[p],g)}catch(e){const t=`Unable to decode inline image: "${e}".`;if(!c)throw new Error(t);warn(t)}return}let w=`img_${this.idFactory.createObjId()}`,x=!1,S=null;if(this.parsingType3Font)w=`${this.idFactory.getDocId()}_type3_${w}`;else if(i&&u){x=this.globalImageCache.shouldCache(u,this.pageIndex);if(x){assert(!\ a,"Cannot cache an inline image globally.");w=`${this.idFactory.getDocId()}_${w}`}}r.addDependency(w);m=Jt;b=[w,d,f];r.addImageOps(m,b,g,y);if(x){S={objId:w,fn:m,args:b,optionalContent:g,hasMask:y,byteSize:0};if(this.globalImageCache.hasDecodeFailed(u)){this.globalImageCache.setData(u,S);this._sendImgData(w,null,x);return}if(d*f>25e4||y){const e=await this.handler.sendWithPromise("commonobj",[w,"CopyLocalImage",{imageRef:u}]);if(e){this.globalImageCache.setData(u,S);this.globalImageCache.addByte\ Size(u,e);return}}}PDFImage.buildImage({xref:this.xref,res:e,image:t,isInline:a,pdfFunctionFactory:this._pdfFunctionFactory,globalColorSpaceCache:this.globalColorSpaceCache,localColorSpaceCache:s}).then((async e=>{p=await e.createImageData(!1,l);p.dataLen=p.bitmap?p.width*p.height*4:p.data.length;p.ref=u;x&&this.globalImageCache.addByteSize(u,p.dataLen);return this._sendImgData(w,p,x)})).catch((e=>{warn(`Unable to decode image "${w}": "${e}".`);u&&this.globalImageCache.addDecodeFailed(u);return \ this._sendImgData(w,null,x)}));if(i){const e={objId:w,fn:m,args:b,optionalContent:g,hasMask:y};n.set(i,u,e);if(u){this._regionalImageCache.set(null,u,e);if(x){assert(S,"The global cache-data must be available.");this.globalImageCache.setData(u,S)}}}}handleSMask(e,t,a,r,i,n,s){const o=e.get("G"),c={subtype:e.get("S").name,backdrop:e.get("BC")},l=e.get("TR");if(isPDFFunction(l)){const e=this._pdfFunctionFactory.create(l),t=new Uint8Array(256),a=new Float32Array(1);for(let r=0;r<256;r++){a[0]=r/255\ ;e(a,0,a,0);t[r]=255*a[0]|0}c.transferMap=t}return this.buildFormXObject(t,o,c,a,r,i.state.clone({newPath:!0}),n,s)}handleTransferFunction(e){let t;if(Array.isArray(e))t=e;else{if(!isPDFFunction(e))return null;t=[e]}const a=[];let r=0,i=0;for(const e of t){const t=this.xref.fetchIfRef(e);r++;if(isName(t,"Identity")){a.push(null);continue}if(!isPDFFunction(t))return null;const n=this._pdfFunctionFactory.create(t),s=new Uint8Array(256),o=new Float32Array(1);for(let e=0;e<256;e++){o[0]=e/255;n(o,0,\ o,0);s[e]=255*o[0]|0}a.push(s);i++}return 1!==r&&4!==r||0===i?null:a}handleTilingType(e,t,a,r,i,n,s,o){const c=new OperatorList,l=Dict.merge({xref:this.xref,dictArray:[i.get("Resources"),a]});return this.getOperatorList({stream:r,task:s,resources:l,operatorList:c}).then((function(){const a=c.getIR(),r=getTilingPatternIR(a,i,t);n.addDependencies(c.dependencies);n.addOp(e,r);i.objId&&o.set(null,i.objId,{operatorListIR:a,dict:i})})).catch((e=>{if(!(e instanceof AbortException)){if(!this.options.ign\ oreErrors)throw e;warn(`handleTilingType - ignoring pattern: "${e}".`)}}))}async handleSetFont(e,t,a,r,i,n,s=null,o=null){const c=t?.[0]instanceof Name?t[0].name:null,l=await this.loadFont(c,a,e,i,s,o);l.font.isType3Font&&r.addDependencies(l.type3Dependencies);n.font=l.font;l.send(this.handler);return l.loadedName}handleText(e,t){const a=t.font,r=a.charsToGlyphs(e);if(a.data){(!!(t.textRenderingMode&S)||"Pattern"===t.fillColorSpace.name||a.disableFontFace)&&PartialEvaluator.buildFontPaths(a,r,th\ is.handler,this.options)}return r}ensureStateFont(e){if(e.font)return;const t=new FormatError("Missing setFont (Tf) operator before text rendering operator.");if(!this.options.ignoreErrors)throw t;warn(`ensureStateFont: "${t}".`)}async setGState({resources:e,gState:t,operatorList:a,cacheKey:r,task:i,stateManager:n,localGStateCache:s,localColorSpaceCache:o,seenRefs:c}){const l=t.objId;let h=!0;const u=[];let d=Promise.resolve();for(const[r,s]of t)switch(r){case"Type":break;case"LW":if("number"!=t\ ypeof s){warn(`Invalid LW (line width): ${s}`);break}u.push([r,Math.abs(s)]);break;case"LC":case"LJ":case"ML":case"D":case"RI":case"FL":case"CA":case"ca":u.push([r,s]);break;case"Font":h=!1;d=d.then((()=>this.handleSetFont(e,null,s[0],a,i,n.state).then((function(e){a.addDependency(e);u.push([r,[e,s[1]]])}))));break;case"BM":u.push([r,normalizeBlendMode(s)]);break;case"SMask":if(isName(s,"None")){u.push([r,!1]);break}if(s instanceof Dict){h=!1;d=d.then((()=>this.handleSMask(s,e,a,i,n,o,c)));u.pus\ h([r,!0])}else warn("Unsupported SMask type");break;case"TR":const t=this.handleTransferFunction(s);u.push([r,t]);break;case"OP":case"op":case"OPM":case"BG":case"BG2":case"UCR":case"UCR2":case"TR2":case"HT":case"SM":case"SA":case"AIS":case"TK":info("graphic state operator "+r);break;default:info("Unknown graphic state operator "+r)}await d;u.length>0&&a.addOp(De,[u]);h&&s.set(r,l,u)}loadFont(e,t,a,r,i=null,n=null){const errorFont=async()=>new TranslatedFont({loadedName:"g_font_error",font:new Er\ rorFont(`Font "${e}" is not available.`),dict:t});let s;if(t)t instanceof Ref&&(s=t);else{const t=a.get("Font");t&&(s=t.getRaw(e))}if(s){if(this.type3FontRefs?.has(s))return errorFont();if(this.fontCache.has(s))return this.fontCache.get(s);try{t=this.xref.fetchIfRef(s)}catch(e){warn(`loadFont - lookup failed: "${e}".`)}}if(!(t instanceof Dict)){if(!this.options.ignoreErrors&&!this.parsingType3Font){warn(`Font "${e}" is not available.`);return errorFont()}warn(`Font "${e}" is not available -- att\ empting to fallback to a default font.`);t=i||PartialEvaluator.fallbackFontDict}if(t.cacheKey&&this.fontCache.has(t.cacheKey))return this.fontCache.get(t.cacheKey);const{promise:o,resolve:c}=Promise.withResolvers();let l;try{l=this.preEvaluateFont(t);l.cssFontInfo=n}catch(e){warn(`loadFont - preEvaluateFont failed: "${e}".`);return errorFont()}const{descriptor:h,hash:u}=l,d=s instanceof Ref;let f;if(u&&h instanceof Dict){const e=h.fontAliases||=Object.create(null);if(e[u]){const t=e[u].aliasRef;\ if(d&&t&&this.fontCache.has(t)){this.fontCache.putAlias(s,t);return this.fontCache.get(s)}}else e[u]={fontID:this.idFactory.createFontId()};d&&(e[u].aliasRef=s);f=e[u].fontID}else f=this.idFactory.createFontId();assert(f?.startsWith("f"),\'The "fontID" must be (correctly) defined.\');if(d)this.fontCache.put(s,o);else{t.cacheKey=`cacheKey_${f}`;this.fontCache.put(t.cacheKey,o)}t.loadedName=`${this.idFactory.getDocId()}_${f}`;this.translateFont(l).then((async e=>{const i=new TranslatedFont({loadedNa\ me:t.loadedName,font:e,dict:t});if(e.isType3Font)try{await i.loadType3Data(this,a,r)}catch(e){throw new Error(`Type3 font load error: ${e}`)}c(i)})).catch((e=>{warn(`loadFont - translateFont failed: "${e}".`);c(new TranslatedFont({loadedName:t.loadedName,font:new ErrorFont(e?.message),dict:t}))}));return o}buildPath(e,t,a){const{pathMinMax:r,pathBuffer:i}=a;switch(0|e){case Xe:{const e=a.currentPointX=t[0],n=a.currentPointY=t[1],s=t[2],o=t[3],c=e+s,l=n+o;0===s||0===o?i.push(sa,e,n,oa,c,l,la):i.p\ ush(sa,e,n,oa,c,n,oa,c,l,oa,e,l,la);Util.rectBoundingBox(e,n,c,l,r);break}case Ee:{const e=a.currentPointX=t[0],n=a.currentPointY=t[1];i.push(sa,e,n);Util.pointBoundingBox(e,n,r);break}case Pe:{const e=a.currentPointX=t[0],n=a.currentPointY=t[1];i.push(oa,e,n);Util.pointBoundingBox(e,n,r);break}case Le:{const e=a.currentPointX,n=a.currentPointY,[s,o,c,l,h,u]=t;a.currentPointX=h;a.currentPointY=u;i.push(ca,s,o,c,l,h,u);Util.bezierBoundingBox(e,n,s,o,c,l,h,u,r);break}case je:{const e=a.currentPoin\ tX,n=a.currentPointY,[s,o,c,l]=t;a.currentPointX=c;a.currentPointY=l;i.push(ca,e,n,s,o,c,l);Util.bezierBoundingBox(e,n,e,n,s,o,c,l,r);break}case _e:{const e=a.currentPointX,n=a.currentPointY,[s,o,c,l]=t;a.currentPointX=c;a.currentPointY=l;i.push(ca,s,o,c,l,c,l);Util.bezierBoundingBox(e,n,s,o,c,l,c,l,r);break}case Ue:i.push(la)}}_getColorSpace(e,t,a){return ColorSpaceUtils.parse({cs:e,xref:this.xref,resources:t,pdfFunctionFactory:this._pdfFunctionFactory,globalColorSpaceCache:this.globalColorSpac\ eCache,localColorSpaceCache:a,asyncIfNotCached:!0})}async _handleColorSpace(e){try{return await e}catch(e){if(e instanceof AbortException)return null;if(this.options.ignoreErrors){warn(`_handleColorSpace - ignoring ColorSpace: "${e}".`);return null}throw e}}parseShading({shading:e,resources:t,localColorSpaceCache:a,localShadingPatternCache:r}){let i,n=r.get(e);if(n)return n;try{i=Pattern.parseShading(e,this.xref,t,this._pdfFunctionFactory,this.globalColorSpaceCache,a).getIR()}catch(t){if(t insta\ nceof AbortException)return null;if(this.options.ignoreErrors){warn(`parseShading - ignoring shading: "${t}".`);r.set(e,null);return null}throw t}n=`pattern_${this.idFactory.createObjId()}`;this.parsingType3Font&&(n=`${this.idFactory.getDocId()}_type3_${n}`);r.set(e,n);this.parsingType3Font?this.handler.send("commonobj",[n,"Pattern",i]):this.handler.send("obj",[n,this.pageIndex,"Pattern",i]);return n}handleColorN(e,t,a,r,i,n,s,o,c,l){const h=a.pop();if(h instanceof Name){const u=i.getRaw(h.name)\ ,d=u instanceof Ref&&c.getByRef(u);if(d)try{const i=r.base?r.base.getRgbHex(a,0):null,n=getTilingPatternIR(d.operatorListIR,d.dict,i);e.addOp(t,n);return}catch{}const f=this.xref.fetchIfRef(u);if(f){const i=f instanceof BaseStream?f.dict:f,h=i.get("PatternType");if(h===Rn){const o=r.base?r.base.getRgbHex(a,0):null;return this.handleTilingType(t,o,n,f,i,e,s,c)}if(h===Nn){const a=i.get("Shading"),r=this.parseShading({shading:a,resources:n,localColorSpaceCache:o,localShadingPatternCache:l});if(r){c\ onst a=lookupMatrix(i.getArray("Matrix"),null);e.addOp(t,["Shading",r,a])}return}throw new FormatError(`Unknown PatternType: ${h}`)}}throw new FormatError(`Unknown PatternName: ${h}`)}_parseVisibilityExpression(e,t,a){if(++t>10){warn("Visibility expression is too deeply nested");return}const r=e.length,i=this.xref.fetchIfRef(e[0]);if(!(r<2)&&i instanceof Name){switch(i.name){case"And":case"Or":case"Not":a.push(i.name);break;default:warn(`Invalid operator ${i.name} in visibility expression`);retu\ rn}for(let i=1;i0)return{type:"OCMD",expression:t}}const t=a.get("OCGs");if(Array.isArray(t)||t instanceof Dict){const e=[];if(Array.isArray(t))for(const a of t)e.push(a.toString());else e.push(t.objId);return{type:r,ids:e,policy:a.get("P")instanceof Name?a.get("P").name:null,expression:null}}if(t instanceof Ref)return{type:r,id:t.toString()}}return null}getOperatorList({stream:e,task:t,resources:a,ope\ ratorList:r,initialState:i=null,fallbackFontDict:n=null,prevRefs:s=null}){const o=e.dict?.objId,c=new RefSet(s);if(o){if(s?.has(o))throw new Error(`getOperatorList - ignoring circular reference: ${o}`);c.put(o)}a||=Dict.empty;i||=new EvalState;if(!r)throw new Error(\'getOperatorList: missing "operatorList" parameter\');const l=this,h=this.xref,u=new LocalImageCache,d=new LocalColorSpaceCache,f=new LocalGStateCache,g=new LocalTilingPatternCache,p=new Map,m=a.get("XObject")||Dict.empty,b=a.get("Patt\ ern")||Dict.empty,y=new StateManager(i),w=new EvaluatorPreprocessor(e,h,y),x=new TimeSlotManager;function closePendingRestoreOPS(e){for(let e=0,t=w.savedStatesDepth;e{y.state.fillColorSpace=e||ColorSpaceUtils.gray})));return}case yt:{const t=l._getColorSpace(e[0],a,d);if(t instanceof ColorSpace){y.state.strokeColorSpace=t;continue}next(l._handleColorSpace(t).th\ en((e=>{y.state.strokeColorSpace=e||ColorSpaceUtils.gray})));return}case At:C=y.state.fillColorSpace;e=[C.getRgbHex(e,0)];i=It;break;case xt:C=y.state.strokeColorSpace;e=[C.getRgbHex(e,0)];i=Ft;break;case vt:y.state.fillColorSpace=ColorSpaceUtils.gray;e=[ColorSpaceUtils.gray.getRgbHex(e,0)];i=It;break;case Ct:y.state.strokeColorSpace=ColorSpaceUtils.gray;e=[ColorSpaceUtils.gray.getRgbHex(e,0)];i=Ft;break;case Ot:y.state.fillColorSpace=ColorSpaceUtils.cmyk;e=[ColorSpaceUtils.cmyk.getRgbHex(e,0)];\ i=It;break;case Tt:y.state.strokeColorSpace=ColorSpaceUtils.cmyk;e=[ColorSpaceUtils.cmyk.getRgbHex(e,0)];i=Ft;break;case It:y.state.fillColorSpace=ColorSpaceUtils.rgb;e=[ColorSpaceUtils.rgb.getRgbHex(e,0)];break;case Ft:y.state.strokeColorSpace=ColorSpaceUtils.rgb;e=[ColorSpaceUtils.rgb.getRgbHex(e,0)];break;case kt:C=y.state.patternFillColorSpace;if(!C){if(isNumberArray(e,null)){e=[ColorSpaceUtils.gray.getRgbHex(e,0)];i=It;break}e=[];i=ia;break}if("Pattern"===C.name){next(l.handleColorN(r,kt,e,\ C,b,a,t,d,g,p));return}e=[C.getRgbHex(e,0)];i=It;break;case St:C=y.state.patternStrokeColorSpace;if(!C){if(isNumberArray(e,null)){e=[ColorSpaceUtils.gray.getRgbHex(e,0)];i=Ft;break}e=[];i=ra;break}if("Pattern"===C.name){next(l.handleColorN(r,St,e,C,b,a,t,d,g,p));return}e=[C.getRgbHex(e,0)];i=Ft;break;case Mt:let T;try{const t=a.get("Shading");if(!t)throw new FormatError("No shading resource found");T=t.get(e[0].name);if(!T)throw new FormatError("No shading object found")}catch(e){if(e instanceof\ AbortException)continue;if(l.options.ignoreErrors){warn(`getOperatorList - ignoring Shading: "${e}".`);continue}throw e}const O=l.parseShading({shading:T,resources:a,localColorSpaceCache:d,localShadingPatternCache:p});if(!O)continue;e=[O];i=Mt;break;case De:F=e[0]instanceof Name;v=e[0].name;if(F){const t=f.getByName(v);if(t){t.length>0&&r.addOp(De,[t]);e=null;continue}}next(new Promise((function(e,i){if(!F)throw new FormatError("GState must be referred to by name.");const n=a.get("ExtGState");i\ f(!(n instanceof Dict))throw new FormatError("ExtGState should be a dictionary.");const s=n.get(v);if(!(s instanceof Dict))throw new FormatError("GState should be a dictionary.");l.setGState({resources:a,gState:s,operatorList:r,cacheKey:v,task:t,stateManager:y,localGStateCache:f,localColorSpaceCache:d,seenRefs:c}).then(e,i)})).catch((function(e){if(!(e instanceof AbortException)){if(!l.options.ignoreErrors)throw e;warn(`getOperatorList - ignoring ExtGState: "${e}".`)}})));return;case Ce:{const[t\ ]=e;if("number"!=typeof t){warn(`Invalid setLineWidth: ${t}`);continue}e[0]=Math.abs(t);break}case Ee:case Pe:case Le:case je:case _e:case Ue:case Xe:l.buildPath(i,e,y.state);continue;case qe:case He:case We:case ze:case $e:case Ge:case Ve:case Ke:case Je:{const{state:{pathBuffer:e,pathMinMax:t}}=y;i!==He&&i!==Ve&&i!==Ke||e.push(la);if(0===e.length)r.addOp(aa,[i,[null],null]);else{r.addOp(aa,[i,[new Float32Array(e)],t.slice()]);e.length=0;t.set([1/0,1/0,-1/0,-1/0],0)}continue}case ht:r.addOp(i,[\ new Float32Array(e)]);continue;case Et:case Pt:case Ut:case Xt:continue;case jt:if(!(e[0]instanceof Name)){warn(`Expected name for beginMarkedContentProps arg0=${e[0]}`);r.addOp(jt,["OC",null]);continue}if("OC"===e[0].name){next(l.parseMarkedContentProps(e[1],a).then((e=>{r.addOp(jt,["OC",e])})).catch((e=>{if(!(e instanceof AbortException)){if(!l.options.ignoreErrors)throw e;warn(`getOperatorList - ignoring beginMarkedContentProps: "${e}".`);r.addOp(jt,["OC",null])}})));return}e=[e[0].name,e[1]i\ nstanceof Dict?e[1].get("MCID"):null];break;default:if(null!==e){for(S=0,k=e.length;S{if(!(e instanceof AbortException)){if(!this.options.ignoreErrors)throw e;warn(`getOperatorList - ignoring errors during "${t.name}" task: "${e}".`);closePendingRestoreOPS()}}))}getTextContent({stream:e,task:a,resources:r,stateManager:i=null\ ,includeMarkedContent:n=!1,sink:s,seenStyles:o=new Set,viewBox:c,lang:l=null,markedContentData:h=null,disableNormalization:u=!1,keepWhiteSpace:d=!1,prevRefs:f=null,intersector:g=null}){const p=e.dict?.objId,m=new RefSet(f);if(p){if(f?.has(p))throw new Error(`getTextContent - ignoring circular reference: ${p}`);m.put(p)}r||=Dict.empty;i||=new StateManager(new TextState);n&&(h||={level:0});const b={items:[],styles:Object.create(null),lang:l},y={initialized:!1,str:[],totalWidth:0,totalHeight:0,widt\ h:0,height:0,vertical:!1,prevTransform:null,textAdvanceScale:0,spaceInFlowMin:0,spaceInFlowMax:0,trackingSpaceMin:1/0,negativeSpaceMax:-1/0,notASpace:-1/0,transform:null,fontName:null,hasEOL:!1},w=[" "," "];let x=0;function saveLastChar(e){const t=(x+1)%2,a=" "!==w[x]&&" "===w[t];w[x]=e;x=t;return!d&&a}function shouldAddWhitepsace(){return!d&&" "!==w[x]&&" "===w[(x+1)%2]}function resetLastChars(){w[0]=w[1]=" ";x=0}const S=this,k=this.xref,C=[];let v=null;const F=new LocalImageCache,T=new LocalGS\ tateCache,O=new EvaluatorPreprocessor(e,k,i);let M;function pushWhitespace({width:e=0,height:t=0,transform:a=y.prevTransform,fontName:r=y.fontName}){g?.addExtraChar(" ");b.items.push({str:" ",dir:"ltr",width:e,height:t,transform:a,fontName:r,hasEOL:!1})}function getCurrentTextTransform(){const e=M.font,a=[M.fontSize*M.textHScale,0,0,M.fontSize,0,M.textRise];if(e.isType3Font&&(M.fontSize<=1||e.isCharBBox)&&!isArrayEqual(M.fontMatrix,t)){const t=e.bbox[3]-e.bbox[1];t>0&&(a[3]*=t*M.fontMatrix[3])}r\ eturn Util.transform(M.ctm,Util.transform(M.textMatrix,a))}function ensureTextContentItem(){if(y.initialized)return y;const{font:e,loadedName:t}=M;if(!o.has(t)){o.add(t);b.styles[t]={fontFamily:e.fallbackName,ascent:e.ascent,descent:e.descent,vertical:e.vertical};if(S.options.fontExtraProperties&&e.systemFontInfo){const a=b.styles[t];a.fontSubstitution=e.systemFontInfo.css;a.fontSubstitutionLoadedName=e.systemFontInfo.loadedName}}y.fontName=t;const a=y.transform=getCurrentTextTransform();if(e.ve\ rtical){y.width=y.totalWidth=Math.hypot(a[0],a[1]);y.height=y.totalHeight=0;y.vertical=!0}else{y.width=y.totalWidth=0;y.height=y.totalHeight=Math.hypot(a[2],a[3]);y.vertical=!1}const r=Math.hypot(M.textLineMatrix[0],M.textLineMatrix[1]),i=Math.hypot(M.ctm[0],M.ctm[1]);y.textAdvanceScale=i*r;const{fontSize:n}=M;y.trackingSpaceMin=.102*n;y.notASpace=.03*n;y.negativeSpaceMax=-.2*n;y.spaceInFlowMin=.102*n;y.spaceInFlowMax=.6*n;y.hasEOL=!1;y.initialized=!0;return y}function updateAdvanceScale(){if(!y\ .initialized)return;const e=Math.hypot(M.textLineMatrix[0],M.textLineMatrix[1]),t=Math.hypot(M.ctm[0],M.ctm[1])*e;if(t!==y.textAdvanceScale){if(y.vertical){y.totalHeight+=y.height*y.textAdvanceScale;y.height=0}else{y.totalWidth+=y.width*y.textAdvanceScale;y.width=0}y.textAdvanceScale=t}}function runBidiTransform(e){let t=e.str.join("");u||(t=function normalizeUnicode(e){if(!ma){ma=/([\\u00a0\\u00b5\\u037e\\u0eb3\\u2000-\\u200a\\u202f\\u2126\\ufb00-\\ufb04\\ufb06\\ufb20-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40-\\ufb41\ \\ufb43-\\ufb44\\ufb46-\\ufba1\\ufba4-\\ufba9\\ufbae-\\ufbb1\\ufbd3-\\ufbdc\\ufbde-\\ufbe7\\ufbea-\\ufbf8\\ufbfc-\\ufbfd\\ufc00-\\ufc5d\\ufc64-\\ufcf1\\ufcf5-\\ufd3d\\ufd88\\ufdf4\\ufdfa-\\ufdfb\\ufe71\\ufe77\\ufe79\\ufe7b\\ufe7d]+)|(\\ufb05+)/gu;ba=new Map([["ſt","ſt"]])}return e.replaceAll(ma,((e,t,a)=>t?t.normalize("NFKC"):ba.get(a)))}(t));const a=bidi(t,-1,e.vertical);return{str:a.str,dir:a.dir,width:Math.abs(e.totalWidth),height:Math.abs(e.totalHeight),transform:e.transform,fontName:e.fontName,hasEOL:e.hasEOL}}async functi\ on handleSetFont(e,i){const n=await S.loadFont(e,i,r,a);M.loadedName=n.loadedName;M.font=n.font;M.fontMatrix=n.font.fontMatrix||t}function applyInverseRotation(e,t,a){const r=Math.hypot(a[0],a[1]);return[(a[0]*e+a[1]*t)/r,(a[2]*e+a[3]*t)/r]}function compareWithLastPosition(e){const t=getCurrentTextTransform();let a=t[4],r=t[5];if(M.font?.vertical){if(ac[2]||r+ec[3])return!1}else if(a+ec[2]||rc[3])return!1;if(!M.font||!y.prevTransform)return!0;let i=y.prevTrans\ form[4],n=y.prevTransform[5];if(i===a&&n===r)return!0;let s=-1;t[0]&&0===t[1]&&0===t[2]?s=t[0]>0?0:180:t[1]&&0===t[0]&&0===t[3]&&(s=t[1]>0?90:270);switch(s){case 0:break;case 90:[a,r]=[r,a];[i,n]=[n,i];break;case 180:[a,r,i,n]=[-a,-r,-i,-n];break;case 270:[a,r]=[-r,-a];[i,n]=[-n,-i];break;default:[a,r]=applyInverseRotation(a,r,t);[i,n]=applyInverseRotation(i,n,y.prevTransform)}if(M.font.vertical){const e=(n-r)/y.textAdvanceScale,t=a-i,s=Math.sign(y.height);if(e.5*y.width){appendEOL();return!0}resetLastChars();flushTextContentItem();return!0}if(Math.abs(t)>y.width){appendEOL();return!0}e<=s*y.notASpace&&resetLastChars();if(e<=s*y.trackingSpaceMin)if(shouldAddWhitepsace()){resetLastChars();flushTextContentItem();pushWhitespace({height:Math.abs(e)})}else y.height+=e;else if(!addFakeSpaces(e,y.prevTransform,s))if(0===y.str.length){resetLastChars();pushWhitespace({height:Math.abs(e)})}else y.height+=e;Math.abs(t)>.25*y.width&&flushTextContentItem();retu\ rn!0}const o=(a-i)/y.textAdvanceScale,l=r-n,h=Math.sign(y.width);if(o.5*y.height){appendEOL();return!0}resetLastChars();flushTextContentItem();return!0}if(Math.abs(l)>y.height){appendEOL();return!0}o<=h*y.notASpace&&resetLastChars();if(o<=h*y.trackingSpaceMin)if(shouldAddWhitepsace()){resetLastChars();flushTextContentItem();pushWhitespace({width:Math.abs(o)})}else y.width+=o;else if(!addFakeSpaces(o,y.prevTransform,h))if(0===y.str.length){resetLastChars();pu\ shWhitespace({width:Math.abs(o)})}else y.width+=o;Math.abs(l)>.25*y.height&&flushTextContentItem();return!0}function buildTextContentItem({chars:e,extraSpacing:t}){const a=M.font;if(!e){const e=M.charSpacing+t;e&&(a.vertical?M.translateTextMatrix(0,-e):M.translateTextMatrix(e*M.textHScale,0));d&&compareWithLastPosition(0);return}const r=a.charsToGlyphs(e),i=M.fontMatrix[0]*M.fontSize;for(let e=0,n=r.length;e0){const e=C.join("");C.length=0;buildTextContentItem({chars:e,extraSpacing:0})}break;case dt:if(!i.state.font){S.ensureStateFont(i.state);continue}buildTextContentItem({chars:w[0],extra\ Spacing:0});break;case gt:if(!i.state.font){S.ensureStateFont(i.state);continue}M.carriageReturn();buildTextContentItem({chars:w[0],extraSpacing:0});break;case pt:if(!i.state.font){S.ensureStateFont(i.state);continue}M.wordSpacing=w[0];M.charSpacing=w[1];M.carriageReturn();buildTextContentItem({chars:w[2],extraSpacing:0});break;case Nt:flushTextContentItem();v??=r.get("XObject")||Dict.empty;y=w[0]instanceof Name;p=w[0].name;if(y&&F.getByName(p))break;next(new Promise((function(e,t){if(!y)throw n\ ew FormatError("XObject must be referred to by name.");let f=v.getRaw(p);if(f instanceof Ref){if(F.getByRef(f)){e();return}if(S.globalImageCache.getData(f,S.pageIndex)){e();return}f=k.fetch(f)}if(!(f instanceof BaseStream))throw new FormatError("XObject should be a stream");const{dict:g}=f,b=g.get("Subtype");if(!(b instanceof Name))throw new FormatError("XObject should have a Name subtype");if("Form"!==b.name){F.set(p,g.objId,!0);e();return}const w=i.state.clone(),x=new StateManager(w),C=lookupM\ atrix(g.getArray("Matrix"),null);C&&x.transform(C);const T=g.get("Resources");enqueueChunk();const O={enqueueInvoked:!1,enqueue(e,t){this.enqueueInvoked=!0;s.enqueue(e,t)},get desiredSize(){return s.desiredSize??0},get ready(){return s.ready}};S.getTextContent({stream:f,task:a,resources:T instanceof Dict?T:r,stateManager:x,includeMarkedContent:n,sink:s&&O,seenStyles:o,viewBox:c,lang:l,markedContentData:h,disableNormalization:u,keepWhiteSpace:d,prevRefs:m}).then((function(){O.enqueueInvoked||F.se\ t(p,g.objId,!0);e()}),t)})).catch((function(e){if(!(e instanceof AbortException)){if(!S.options.ignoreErrors)throw e;warn(`getTextContent - ignoring XObject: "${e}".`)}})));return;case De:y=w[0]instanceof Name;p=w[0].name;if(y&&T.getByName(p))break;next(new Promise((function(e,t){if(!y)throw new FormatError("GState must be referred to by name.");const a=r.get("ExtGState");if(!(a instanceof Dict))throw new FormatError("ExtGState should be a dictionary.");const i=a.get(p);if(!(i instanceof Dict))t\ hrow new FormatError("GState should be a dictionary.");const n=i.get("Font");if(n){flushTextContentItem();M.fontName=null;M.fontSize=n[1];handleSetFont(null,n[0]).then(e,t)}else{T.set(p,i.objId,!0);e()}})).catch((function(e){if(!(e instanceof AbortException)){if(!S.options.ignoreErrors)throw e;warn(`getTextContent - ignoring ExtGState: "${e}".`)}})));return;case Lt:flushTextContentItem();if(n){h.level++;b.items.push({type:"beginMarkedContent",tag:w[0]instanceof Name?w[0].name:null})}break;case j\ t:flushTextContentItem();if(n){h.level++;let e=null;w[1]instanceof Dict&&(e=w[1].get("MCID"));b.items.push({type:"beginMarkedContentProps",id:Number.isInteger(e)?`${S.idFactory.getPageObjId()}_mc${e}`:null,tag:w[0]instanceof Name?w[0].name:null})}break;case _t:flushTextContentItem();if(n){if(0===h.level)break;h.level--;b.items.push({type:"endMarkedContent"})}break;case Re:!e||e.font===M.font&&e.fontSize===M.fontSize&&e.fontName===M.fontName||flushTextContentItem()}if(b.items.length>=(s?.desiredS\ ize??1)){g=!0;break}}if(g)next(En);else{flushTextContentItem();enqueueChunk();e()}})).catch((e=>{if(!(e instanceof AbortException)){if(!this.options.ignoreErrors)throw e;warn(`getTextContent - ignoring errors during "${a.name}" task: "${e}".`);flushTextContentItem();enqueueChunk()}}))}async extractDataStructures(e,t){const a=this.xref;let r;const i=this.readToUnicode(t.toUnicode);if(t.composite){const a=e.get("CIDSystemInfo");a instanceof Dict&&(t.cidSystemInfo={registry:stringToPDFString(a.get(\ "Registry")),ordering:stringToPDFString(a.get("Ordering")),supplement:a.get("Supplement")});try{const t=e.get("CIDToGIDMap");t instanceof BaseStream&&(r=t.getBytes())}catch(e){if(!this.options.ignoreErrors)throw e;warn(`extractDataStructures - ignoring CIDToGIDMap data: "${e}".`)}}const n=[];let s,o=null;if(e.has("Encoding")){s=e.get("Encoding");if(s instanceof Dict){o=s.get("BaseEncoding");o=o instanceof Name?o.name:null;if(s.has("Differences")){const e=s.get("Differences");let t=0;for(const r \ of e){const e=a.fetchIfRef(r);if("number"==typeof e)t=e;else{if(!(e instanceof Name))throw new FormatError(`Invalid entry in \'Differences\' array: ${e}`);n[t++]=e.name}}}}else if(s instanceof Name)o=s.name;else{const e="Encoding is not a Name nor a Dict";if(!this.options.ignoreErrors)throw new FormatError(e);warn(e)}"MacRomanEncoding"!==o&&"MacExpertEncoding"!==o&&"WinAnsiEncoding"!==o&&(o=null)}const c=!t.file||t.isInternalFont,l=ei()[t.name];o&&c&&l&&(o=null);if(o)t.defaultEncoding=getEncoding(\ o);else{const e=!!(t.flags&Pr),a=!!(t.flags&Lr);s=Ar;"TrueType"!==t.type||a||(s=kr);if(e||l){s=Sr;c&&(/Symbol/i.test(t.name)?s=Cr:/Dingbats/i.test(t.name)?s=vr:/Wingdings/i.test(t.name)&&(s=kr))}t.defaultEncoding=s}t.differences=n;t.baseEncodingName=o;t.hasEncoding=!!o||n.length>0;t.dict=e;t.toUnicode=await i;const h=await this.buildToUnicode(t);t.toUnicode=h;r&&(t.cidToGidMap=this.readCidToGidMap(r,h));return t}_simpleFontToUnicode(e,t=!1){assert(!e.composite,"Must be a simple font.");const a=[\ ],r=e.defaultEncoding.slice(),i=e.baseEncodingName,n=e.differences;for(const e in n){const t=n[e];".notdef"!==t&&(r[e]=t)}const s=Fr();for(const n in r){let o=r[n];if(""===o)continue;let c=s[o];if(void 0!==c){a[n]=String.fromCharCode(c);continue}let l=0;switch(o[0]){case"G":3===o.length&&(l=parseInt(o.substring(1),16));break;case"g":5===o.length&&(l=parseInt(o.substring(1),16));break;case"C":case"c":if(o.length>=3&&o.length<=4){const a=o.substring(1);if(t){l=parseInt(a,16);break}l=+a;if(Number.i\ sNaN(l)&&Number.isInteger(parseInt(a,16)))return this._simpleFontToUnicode(e,!0)}break;case"u":c=getUnicodeForGlyph(o,s);-1!==c&&(l=c);break;default:switch(o){case"f_h":case"f_t":case"T_h":a[n]=o.replaceAll("_","");continue}}if(l>0&&l<=1114111&&Number.isInteger(l)){if(i&&l===+n){const e=getEncoding(i);if(e&&(o=e[n])){a[n]=String.fromCharCode(s[o]);continue}}a[n]=String.fromCodePoint(l)}}return a}async buildToUnicode(e){e.hasIncludedToUnicodeMap=e.toUnicode?.length>0;if(e.hasIncludedToUnicodeMap)\ {!e.composite&&e.hasEncoding&&(e.fallbackToUnicode=this._simpleFontToUnicode(e));return e.toUnicode}if(!e.composite)return new ToUnicodeMap(this._simpleFontToUnicode(e));if(e.composite&&(e.cMap.builtInCMap&&!(e.cMap instanceof IdentityCMap)||"Adobe"===e.cidSystemInfo?.registry&&("GB1"===e.cidSystemInfo.ordering||"CNS1"===e.cidSystemInfo.ordering||"Japan1"===e.cidSystemInfo.ordering||"Korea1"===e.cidSystemInfo.ordering))){const{registry:t,ordering:a}=e.cidSystemInfo,r=Name.get(`${t}-${a}-UCS2`),i\ =await CMapFactory.create({encoding:r,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}),n=[],s=[];e.cMap.forEach((function(e,t){if(t>65535)throw new FormatError("Max size of CID is 65,535");const a=i.lookup(t);if(a){s.length=0;for(let e=0,t=a.length;e>1;(0!==i||t.has(n))&&(a[n]=i)}return a}extractWidths(e,t,a){const r=this.xref;let i=[],n=0;const s=[];let o;if(a.composite){const t=e.get("DW");n="number"==typeof t?Math.ceil(t):1e3;const c=e.get("W");if(Array.isArray(c))for(let e=0,t=c.length;e{const t=c.get(e),r=new OperatorList;return n.getOperatorList({stream:t,task:a,resources:l,operatorList:r}).then((()=>{switch(r.fnArray[0]){case bt:this.#K(r,b);break;case mt:b||this.#J(r)}h[e]=r.getIR();for(const e of r.dependencies)i.add(e)})).catch((function(t){warn(`Type3 font resource "${e}" is not available.`);const a=new OperatorList;h[e]=a.getIR()}))}));this.#V=o\ .then((()=>{r.charProcOperatorList=h;if(this._bbox){r.isCharBBox=!0;r.bbox=this._bbox}}));return this.#V}#K(e,t=NaN){const a=Util.normalizeRect(e.argsArray[0].slice(2)),r=a[2]-a[0],i=a[3]-a[1],n=Math.hypot(r,i);if(0===r||0===i){e.fnArray.splice(0,1);e.argsArray.splice(0,1)}else if(0===t||Math.round(n/t)>=10){this._bbox??=[1/0,1/0,-1/0,-1/0];Util.rectBoundingBox(...a,this._bbox)}let s=0,o=e.length;for(;s=Ee&&n<=Je;if(i.variableArgs)o>s&&info(`Command ${r}: expected [0,\ ${s}] args, but received ${o} args.`);else{if(o!==s){const e=this.nonProcessedArgs;for(;o>s;){e.push(t.shift());o--}for(;oEvaluatorPreprocessor.MAX_INVALID_PATH_OPS)throw new FormatError(`Invalid ${e}`);warn(`Skipping ${e}`);null!==t&&(t.length=0);continue}}this.preprocessCommand(n,t);e.fn=n;e.args=t;return!0}if(a===\ wa)return!1;if(null!==a){null===t&&(t=[]);t.push(a);if(t.length>33)throw new FormatError("Too many arguments")}}}preprocessCommand(e,t){switch(0|e){case Be:this.stateManager.save();break;case Re:this.stateManager.restore();break;case Ne:this.stateManager.transform(t)}}}class DefaultAppearanceEvaluator extends EvaluatorPreprocessor{constructor(e){super(new StringStream(e))}parse(){const e={fn:0,args:[]},t={fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3)};try{for(;;){e.args.length=0;if(!\ this.read(e))break;if(0!==this.savedStatesDepth)continue;const{fn:a,args:r}=e;switch(0|a){case nt:const[e,a]=r;e instanceof Name&&(t.fontName=e.name);"number"==typeof a&&a>0&&(t.fontSize=a);break;case It:ColorSpaceUtils.rgb.getRgbItem(r,0,t.fontColor,0);break;case vt:ColorSpaceUtils.gray.getRgbItem(r,0,t.fontColor,0);break;case Ot:ColorSpaceUtils.cmyk.getRgbItem(r,0,t.fontColor,0)}}}catch(e){warn(`parseDefaultAppearance - ignoring errors: "${e}".`)}return t}}function parseDefaultAppearance(e){re\ turn new DefaultAppearanceEvaluator(e).parse()}class AppearanceStreamEvaluator extends EvaluatorPreprocessor{constructor(e,t,a,r){super(e);this.stream=e;this.evaluatorOptions=t;this.xref=a;this.globalColorSpaceCache=r;this.resources=e.dict?.get("Resources")}parse(){const e={fn:0,args:[]};let t={scaleFactor:1,fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3),fillColorSpace:ColorSpaceUtils.gray},a=!1;const r=[];try{for(;;){e.args.length=0;if(a||!this.read(e))break;const{fn:i,args:n}=e;swit\ ch(0|i){case Be:r.push({scaleFactor:t.scaleFactor,fontSize:t.fontSize,fontName:t.fontName,fontColor:t.fontColor.slice(),fillColorSpace:t.fillColorSpace});break;case Re:t=r.pop()||t;break;case ht:t.scaleFactor*=Math.hypot(n[0],n[1]);break;case nt:const[e,i]=n;e instanceof Name&&(t.fontName=e.name);"number"==typeof i&&i>0&&(t.fontSize=i*t.scaleFactor);break;case wt:t.fillColorSpace=ColorSpaceUtils.parse({cs:n[0],xref:this.xref,resources:this.resources,pdfFunctionFactory:this._pdfFunctionFactory,gl\ obalColorSpaceCache:this.globalColorSpaceCache,localColorSpaceCache:this._localColorSpaceCache});break;case At:t.fillColorSpace.getRgbItem(n,0,t.fontColor,0);break;case It:ColorSpaceUtils.rgb.getRgbItem(n,0,t.fontColor,0);break;case vt:ColorSpaceUtils.gray.getRgbItem(n,0,t.fontColor,0);break;case Ot:ColorSpaceUtils.cmyk.getRgbItem(n,0,t.fontColor,0);break;case dt:case ft:case gt:case pt:a=!0}}}catch(e){warn(`parseAppearanceStream - ignoring errors: "${e}".`)}this.stream.reset();delete t.scaleFac\ tor;delete t.fillColorSpace;return t}get _localColorSpaceCache(){return shadow(this,"_localColorSpaceCache",new LocalColorSpaceCache)}get _pdfFunctionFactory(){return shadow(this,"_pdfFunctionFactory",new PDFFunctionFactory({xref:this.xref,isEvalSupported:this.evaluatorOptions.isEvalSupported}))}}function getPdfColor(e,t){if(e[0]===e[1]&&e[1]===e[2]){return`${numberToString(e[0]/255)} ${t?"g":"G"}`}return Array.from(e,(e=>numberToString(e/255))).join(" ")+" "+(t?"rg":"RG")}class FakeUnicodeFont{\ constructor(e,t){this.xref=e;this.widths=null;this.firstChar=1/0;this.lastChar=-1/0;this.fontFamily=t;const a=new OffscreenCanvas(1,1);this.ctxMeasure=a.getContext("2d",{willReadFrequently:!0});FakeUnicodeFont._fontNameId||(FakeUnicodeFont._fontNameId=1);this.fontName=Name.get(`InvalidPDFjsFont_${t}_${FakeUnicodeFont._fontNameId++}`)}get fontDescriptorRef(){if(!FakeUnicodeFont._fontDescriptorRef){const e=new Dict(this.xref);e.setIfName("Type","FontDescriptor");e.set("FontName",this.fontName);e.s\ et("FontFamily","MyriadPro Regular");e.set("FontBBox",[0,0,0,0]);e.setIfName("FontStretch","Normal");e.set("FontWeight",400);e.set("ItalicAngle",0);FakeUnicodeFont._fontDescriptorRef=this.xref.getNewPersistentRef(e)}return FakeUnicodeFont._fontDescriptorRef}get descendantFontRef(){const e=new Dict(this.xref);e.set("BaseFont",this.fontName);e.setIfName("Type","Font");e.setIfName("Subtype","CIDFontType0");e.setIfName("CIDToGIDMap","Identity");e.set("FirstChar",this.firstChar);e.set("LastChar",this\ .lastChar);e.set("FontDescriptor",this.fontDescriptorRef);e.set("DW",1e3);const t=[],a=[...this.widths.entries()].sort();let r=null,i=null;for(const[e,n]of a)if(r)if(e===r+i.length)i.push(n);else{t.push(r,i);r=e;i=[n]}else{r=e;i=[n]}r&&t.push(r,i);e.set("W",t);const n=new Dict(this.xref);n.set("Ordering","Identity");n.set("Registry","Adobe");n.set("Supplement",0);e.set("CIDSystemInfo",n);return this.xref.getNewPersistentRef(e)}get baseFontRef(){const e=new Dict(this.xref);e.set("BaseFont",this.f\ ontName);e.setIfName("Type","Font");e.setIfName("Subtype","Type0");e.setIfName("Encoding","Identity-H");e.set("DescendantFonts",[this.descendantFontRef]);e.setIfName("ToUnicode","Identity-H");return this.xref.getNewPersistentRef(e)}get resources(){const e=new Dict(this.xref),t=new Dict(this.xref);t.set(this.fontName.name,this.baseFontRef);e.set("Font",t);return e}_createContext(){this.widths=new Map;this.ctxMeasure.font=`1000px ${this.fontFamily}`;return this.ctxMeasure}createFontResources(e){co\ nst t=this._createContext();for(const a of e.split(/\\r\\n?|\\n/))for(const e of a.split("")){const a=e.charCodeAt(0);if(this.widths.has(a))continue;const r=t.measureText(e),i=Math.ceil(r.width);this.widths.set(a,i);this.firstChar=Math.min(a,this.firstChar);this.lastChar=Math.max(a,this.lastChar)}return this.resources}static getFirstPositionInfo(e,t,i){const[n,s,o,c]=e;let l=o-n,h=c-s;t%180!=0&&([l,h]=[h,l]);const u=a*i;return{coords:[0,h+r*i-u],bbox:[0,0,l,h],matrix:0!==t?getRotationMatrix(t,h,u):\ void 0}}createAppearance(e,t,i,n,s,o){const c=this._createContext(),l=[];let h=-1/0;for(const t of e.split(/\\r\\n?|\\n/)){l.push(t);const e=c.measureText(t).width;h=Math.max(h,e);for(const e of codePointIter(t)){const t=String.fromCodePoint(e);let a=this.widths.get(e);if(void 0===a){const r=c.measureText(t);a=Math.ceil(r.width);this.widths.set(e,a);this.firstChar=Math.min(e,this.firstChar);this.lastChar=Math.max(e,this.lastChar)}}}h*=n/1e3;const[u,d,f,g]=t;let p=f-u,m=g-d;i%180!=0&&([p,m]=[m,p]);l\ et b=1;h>p&&(b=p/h);let y=1;const w=a*n,x=r*n,S=w*l.length;S>m&&(y=m/S);const k=n*Math.min(b,y),C=["q",`0 0 ${numberToString(p)} ${numberToString(m)} re W n`,"BT",`1 0 0 1 0 ${numberToString(m+x)} Tm 0 Tc ${getPdfColor(s,!0)}`,`/${this.fontName.name} ${numberToString(k)} Tf`],{resources:v}=this;if(1!==(o="number"==typeof o&&o>=0&&o<=1?o:1)){C.push("/R0 gs");const e=new Dict(this.xref),t=new Dict(this.xref);t.set("ca",o);t.set("CA",o);t.setIfName("Type","ExtGState");e.set("R0",t);v.set("ExtGState\ ",e)}const F=numberToString(w);for(const e of l)C.push(`0 -${F} Td <${stringToUTF16HexString(e)}> Tj`);C.push("ET","Q");const T=C.join("\\n"),O=new Dict(this.xref);O.setIfName("Subtype","Form");O.setIfName("Type","XObject");O.set("BBox",[0,0,p,m]);O.set("Length",T.length);O.set("Resources",v);if(i){const e=getRotationMatrix(i,p,m);O.set("Matrix",e)}const M=new StringStream(T);M.dict=O;return M}}const Pn=["m/d","m/d/yy","mm/dd/yy","mm/yy","d-mmm","d-mmm-yy","dd-mmm-yy","yy-mm-dd","mmm-yy","mmmm-yy\ ","mmm d, yyyy","mmmm d, yyyy","m/d/yy h:MM tt","m/d/yy HH:MM"],Ln=["HH:MM","h:MM tt","HH:MM:ss","h:MM:ss tt"];class NameOrNumberTree{constructor(e,t,a){this.root=e;this.xref=t;this._type=a}getAll(){const e=new Map;if(!this.root)return e;const t=this.xref,a=new RefSet;a.put(this.root);const r=[this.root];for(;r.length>0;){const i=t.fetchIfRef(r.shift());if(!(i instanceof Dict))continue;if(i.has("Kids")){const e=i.get("Kids");if(!Array.isArray(e))continue;for(const t of e){if(a.has(t))throw new F\ ormatError(`Duplicate entry in "${this._type}" tree.`);r.push(t);a.put(t)}continue}const n=i.get(this._type);if(Array.isArray(n))for(let a=0,r=n.length;a10){warn(`Search depth limit reached for "${this._type}" tree.`);return null}const i=a.get("Kids");if(!Array.isArray(i))return null;let n=0,s=i.length-1;for(;n<=s;){co\ nst r=n+s>>1,o=t.fetchIfRef(i[r]),c=o.get("Limits");if(et.fetchIfRef(c[1]))){a=o;break}n=r+1}}if(n>s)return null}const i=a.get(this._type);if(Array.isArray(i)){let a=0,r=i.length-2;for(;a<=r;){const n=a+r>>1,s=n+(1&n),o=t.fetchIfRef(i[s]);if(eo))return i[s+1];a=s+2}}}return null}get(e){return this.xref.fetchIfRef(this.getRaw(e))}}class NameTree extends NameOrNumberTree{constructor(e,t){super(e,t,"Names")}}class NumberTree extends NameOrN\ umberTree{constructor(e,t){super(e,t,"Nums")}}function clearGlobalCaches(){!function clearPatternCaches(){Ii=Object.create(null)}();!function clearPrimitiveCaches(){xa=Object.create(null);Sa=Object.create(null);Aa=Object.create(null)}();!function clearUnicodeCaches(){Dr.clear()}();JpxImage.cleanup()}function pickPlatformItem(e){return e instanceof Dict?e.has("UF")?e.get("UF"):e.has("F")?e.get("F"):e.has("Unix")?e.get("Unix"):e.has("Mac")?e.get("Mac"):e.has("DOS")?e.get("DOS"):null:null}class Fil\ eSpec{#Y=!1;constructor(e,t,a=!1){if(e instanceof Dict){this.xref=t;this.root=e;e.has("FS")&&(this.fs=e.get("FS"));e.has("RF")&&warn("Related file specifications are not supported");a||(e.has("EF")?this.#Y=!0:warn("Non-embedded file specifications are not supported"))}}get filename(){let e="";const t=pickPlatformItem(this.root);t&&"string"==typeof t&&(e=stringToPDFString(t,!0).replaceAll("\\\\\\\\","\\\\").replaceAll("\\\\/","/").replaceAll("\\\\","/"));return shadow(this,"filename",e||"unnamed")}get cont\ ent(){if(!this.#Y)return null;this._contentRef||=pickPlatformItem(this.root?.get("EF"));let e=null;if(this._contentRef){const t=this.xref.fetchIfRef(this._contentRef);t instanceof BaseStream?e=t.getBytes():warn("Embedded file specification points to non-existing/invalid content")}else warn("Embedded file specification does not have any content");return e}get description(){let e="";const t=this.root?.get("Desc");t&&"string"==typeof t&&(e=stringToPDFString(t));return shadow(this,"description",e)}g\ et serializable(){return{rawFilename:this.filename,filename:(e=this.filename,e.substring(e.lastIndexOf("/")+1)),content:this.content,description:this.description};var e}}const jn=0,_n=-2,Un=-3,Xn=-4,qn=-5,Hn=-6,Wn=-9;function isWhitespace(e,t){const a=e[t];return" "===a||"\\n"===a||"\\r"===a||"\\t"===a}class XMLParserBase{_resolveEntities(e){return e.replaceAll(/&([^;]+);/g,((e,t)=>{if("#x"===t.substring(0,2))return String.fromCodePoint(parseInt(t.substring(2),16));if("#"===t.substring(0,1))return \ String.fromCodePoint(parseInt(t.substring(1),10));switch(t){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return\'"\';case"apos":return"\'"}return this.onResolveEntity(t)}))}_parseContent(e,t){const a=[];let r=t;function skipWs(){for(;r"!==e[r]&&"/"!==e[r];)++r;const i=e.substring(t,r);skipWs();for(;r"!==e[r]&&"/"!==e[r]&&"?"!==e[r];){skipWs();let t="",i="";for(;r"!==e[a]&&"?"!==e[a]&&"/"!==e[a];)++a;const r=e.substring(t,a);!function skipWs(){for(;a"!==e[a+1]);)++a;return{name:r,value:e.substring(i,a),parsed:a-t}}parseXml(e){let t=0;for(;t",a);if(t<0){this.onError(Wn);return}this.onEndElement(e.substring(a,t));a=t+1;break;case"?":++a;const r=this._parseProcessingInstruction(e,a);if("?>"!==e.substring(a+r.parsed,a+r.parsed+2)){this.onError(Un);return}this.onPi(r.name,r.value);a+=r.parsed+2;break;case"!":if("--"===e.substring(\ a+1,a+3)){t=e.indexOf("--\\x3e",a+3);if(t<0){this.onError(qn);return}this.onComment(e.substring(a+3,t));a=t+3}else if("[CDATA["===e.substring(a+1,a+8)){t=e.indexOf("]]>",a+8);if(t<0){this.onError(_n);return}this.onCdata(e.substring(a+8,t));a=t+3}else{if("DOCTYPE"!==e.substring(a+1,a+8)){this.onError(Hn);return}{const r=e.indexOf("[",a+8);let i=!1;t=e.indexOf(">",a+8);if(t<0){this.onError(Xn);return}if(r>0&&t>r){t=e.indexOf("]>",a+8);if(t<0){this.onError(Xn);return}i=!0}const n=e.substring(a+8,t+(\ i?1:0));this.onDoctype(n);a=t+(i?2:1)}}break;default:const i=this._parseContent(e,a);if(null===i){this.onError(Hn);return}let n=!1;if("/>"===e.substring(a+i.parsed,a+i.parsed+2))n=!0;else if(">"!==e.substring(a+i.parsed,a+i.parsed+1)){this.onError(Wn);return}this.onBeginElement(i.name,i.attributes,n);a+=i.parsed+(n?2:1)}}else{for(;ae.textContent)).join(""):this.nodeValue||""}get children(){\ return this.childNodes||[]}hasChildNodes(){return this.childNodes?.length>0}searchNode(e,t){if(t>=e.length)return this;const a=e[t];if(a.name.startsWith("#")&&t0){r.push([i,0]);i=i.childNodes[0]}else{if(0===r.length)return null;for(;0!==r.length;){const[e,t]=r.pop(),a=t+1;if(a");for(const t of this.childNodes)t.dump(e);e.push(``)}else this.nodeValue?e.push(`>${encodeToXmlString(this.nodeValue)}`):e.push("/>")}else e.push(encodeToXmlString(this.nodeValue))}}class SimpleXMLParser extends XMLParserBase{constructor({hasAttributes:e=!1,lowerCaseName:t=!1}){super();this._currentFragment=null;this._stack=null;this._errorCode=jn;this._hasAttributes=e;this._lowerCaseName=t}parseFromString(e){this._currentFragment=[];this._stack=[];this._errorCode=jn;this.parseXml(e);if(this._errorCode!==jn)return;const[t]\ =this._currentFragment;return t?{documentElement:t}:void 0}onText(e){if(function isWhitespaceString(e){for(let t=0,a=e.length;t\\\\376\\\\377([^<]+)/g,(function(e,t){const a=t.replaceAll(/\\\\([0-3])([0-7])([0-7])/g,(function(e,t,a,r){return String.fromCharCode(64*t+8*a+1*r)})).replaceAll(/&(amp|apos|gt|lt|quot);/g,(function(e,t){switch(t){case"amp":return"&";case"apos":return"\'";case"gt":return">";case"lt":return"<";case"quot":return\'"\'}throw new Error(`_repair: ${t} isn\'t defined.`)})),r=[">"];for(let e=0,t=a.length;e=32&&t<127&&60!==t&&62!==t&&38!==\ t?r.push(String.fromCharCode(t)):r.push("&#x"+(65536+t).toString(16).substring(1)+";")}return r.join("")}))}_getSequence(e){const t=e.nodeName;return"rdf:bag"!==t&&"rdf:seq"!==t&&"rdf:alt"!==t?null:e.childNodes.filter((e=>"rdf:li"===e.nodeName))}_parseArray(e){if(!e.hasChildNodes())return;const[t]=e.childNodes,a=this._getSequence(t)||[];this._metadataMap.set(e.nodeName,a.map((e=>e.textContent.trim())))}_parse(e){let t=e.documentElement;if("rdf:rdf"!==t.nodeName){t=t.firstChild;for(;t&&"rdf:rdf"!\ ==t.nodeName;)t=t.nextSibling}if(t&&"rdf:rdf"===t.nodeName&&t.hasChildNodes())for(const e of t.childNodes)if("rdf:description"===e.nodeName)for(const t of e.childNodes){const e=t.nodeName;switch(e){case"#text":continue;case"dc:creator":case"dc:subject":this._parseArray(t);continue}this._metadataMap.set(e,t.textContent.trim())}}get serializable(){return{parsedData:this._metadataMap,rawData:this._data}}}const zn=1,$n=2,Gn=3,Vn=4,Kn=5;class StructTreeRoot{constructor(e,t,a){this.xref=e;this.dict=t;\ this.ref=a instanceof Ref?a:null;this.roleMap=new Map;this.structParentIds=null}init(){this.readRoleMap()}#Z(e,t,a){if(!(e instanceof Ref)||t<0)return;this.structParentIds||=new RefSetCache;let r=this.structParentIds.get(e);if(!r){r=[];this.structParentIds.put(e,r)}r.push([t,a])}addAnnotationIdToPage(e,t){this.#Z(e,t,Vn)}readRoleMap(){const e=this.dict.get("RoleMap");if(e instanceof Dict)for(const[t,a]of e)a instanceof Name&&this.roleMap.set(t,a.name)}static async canCreateStructureTree({catalog\ Ref:e,pdfManager:t,newAnnotationsByPage:a}){if(!(e instanceof Ref)){warn("Cannot save the struct tree: no catalog reference.");return!1}let r=0,i=!0;for(const[e,n]of a){const{ref:a}=await t.getPage(e);if(!(a instanceof Ref)){warn(`Cannot save the struct tree: page ${e} has no ref.`);i=!0;break}for(const e of n)if(e.accessibilityData?.type){e.parentTreeId=r++;i=!1}}if(i){for(const e of a.values())for(const t of e)delete t.parentTreeId;return!1}return!0}static async createStructureTree({newAnnotat\ ionsByPage:e,xref:t,catalogRef:a,pdfManager:r,changes:i}){const n=await r.ensureCatalog("cloneDict"),s=new RefSetCache;s.put(a,n);const o=t.getNewTemporaryRef();n.set("StructTreeRoot",o);const c=new Dict(t);c.set("Type",Name.get("StructTreeRoot"));const l=t.getNewTemporaryRef();c.set("ParentTree",l);const h=[];c.set("K",h);s.put(o,c);const u=new Dict(t),d=[];u.set("Nums",d);const f=await this.#Q({newAnnotationsByPage:e,structTreeRootRef:o,structTreeRoot:null,kids:h,nums:d,xref:t,pdfManager:r,cha\ nges:i,cache:s});c.set("ParentTreeNextKey",f);s.put(l,u);for(const[e,t]of s.items())i.put(e,{data:t})}async canUpdateStructTree({pdfManager:e,newAnnotationsByPage:t}){if(!this.ref){warn("Cannot update the struct tree: no root reference.");return!1}let a=this.dict.get("ParentTreeNextKey");if(!Number.isInteger(a)||a<0){warn("Cannot update the struct tree: invalid next key.");return!1}const r=this.dict.get("ParentTree");if(!(r instanceof Dict)){warn("Cannot update the struct tree: ParentTree isn\'t \ a dict.");return!1}const i=r.get("Nums");if(!Array.isArray(i)){warn("Cannot update the struct tree: nums isn\'t an array.");return!1}const n=new NumberTree(r,this.xref);for(const a of t.keys()){const{pageDict:t}=await e.getPage(a);if(!t.has("StructParents"))continue;const r=t.get("StructParents");if(!Number.isInteger(r)||!Array.isArray(n.get(r))){warn(`Cannot save the struct tree: page ${a} has a wrong id.`);return!1}}let s=!0;for(const[r,i]of t){const{pageDict:t}=await e.getPage(r);StructTreeRoo\ t.#ee({elements:i,xref:this.xref,pageDict:t,numberTree:n});for(const e of i)if(e.accessibilityData?.type){e.accessibilityData.structParent>=0||(e.parentTreeId=a++);s=!1}}if(s){for(const e of t.values())for(const t of e){delete t.parentTreeId;delete t.structTreeParent}return!1}return!0}async updateStructureTree({newAnnotationsByPage:e,pdfManager:t,changes:a}){const{ref:r,xref:i}=this,n=this.dict.clone(),s=new RefSetCache;s.put(r,n);let o,c=n.getRaw("ParentTree");if(c instanceof Ref)o=i.fetch(c);e\ lse{o=c;c=i.getNewTemporaryRef();n.set("ParentTree",c)}o=o.clone();s.put(c,o);let l=o.getRaw("Nums"),h=null;if(l instanceof Ref){h=l;l=i.fetch(h)}l=l.slice();h||o.set("Nums",l);const u=await StructTreeRoot.#Q({newAnnotationsByPage:e,structTreeRootRef:r,structTreeRoot:this,kids:null,nums:l,xref:i,pdfManager:t,changes:a,cache:s});if(-1!==u){n.set("ParentTreeNextKey",u);h&&s.put(h,l);for(const[e,t]of s.items())a.put(e,{data:t})}}static async#Q({newAnnotationsByPage:e,structTreeRootRef:t,structTreeR\ oot:a,kids:r,nums:i,xref:n,pdfManager:s,changes:o,cache:c}){const l=Name.get("OBJR");let h,u=-1;for(const[d,f]of e){const e=await s.getPage(d),{ref:g}=e,p=g instanceof Ref;for(const{accessibilityData:s,ref:m,parentTreeId:b,structTreeParent:y}of f){if(!s?.type)continue;const{structParent:f}=s;if(a&&Number.isInteger(f)&&f>=0){let t=(h||=new Map).get(d);if(void 0===t){t=new StructTreePage(a,e.pageDict).collectObjects(g);h.set(d,t)}const r=t?.get(f);if(r){const e=n.fetch(r).clone();StructTreeRoot.#t\ e(e,s);o.put(r,{data:e});continue}}u=Math.max(u,b);const w=n.getNewTemporaryRef(),x=new Dict(n);StructTreeRoot.#te(x,s);await this.#ae({structTreeParent:y,tagDict:x,newTagRef:w,structTreeRootRef:t,fallbackKids:r,xref:n,cache:c});const S=new Dict(n);x.set("K",S);S.set("Type",l);p&&S.set("Pg",g);S.set("Obj",m);c.put(w,x);i.push(b,w)}}return u+1}static#te(e,{type:t,title:a,lang:r,alt:i,expanded:n,actualText:s}){e.set("S",Name.get(t));a&&e.set("T",stringToAsciiOrUTF16BE(a));r&&e.set("Lang",stringToA\ sciiOrUTF16BE(r));i&&e.set("Alt",stringToAsciiOrUTF16BE(i));n&&e.set("E",stringToAsciiOrUTF16BE(n));s&&e.set("ActualText",stringToAsciiOrUTF16BE(s))}static#ee({elements:e,xref:t,pageDict:a,numberTree:r}){const i=new Map;for(const t of e)if(t.structTreeParentId){const e=parseInt(t.structTreeParentId.split("_mc")[1],10);let a=i.get(e);if(!a){a=[];i.set(e,a)}a.push(t)}const n=a.get("StructParents");if(!Number.isInteger(n))return;const s=r.get(n),updateElement=(e,a,r)=>{const n=i.get(e);if(n){const \ e=a.getRaw("P"),i=t.fetchIfRef(e);if(e instanceof Ref&&i instanceof Dict){const e={ref:r,dict:a};for(const t of n)t.structTreeParent=e}return!0}return!1};for(const e of s){if(!(e instanceof Ref))continue;const a=t.fetch(e),r=a.get("K");if(Number.isInteger(r))updateElement(r,a,e);else if(Array.isArray(r))for(let i of r){i=t.fetchIfRef(i);if(Number.isInteger(i)&&updateElement(i,a,e))break;if(!(i instanceof Dict))continue;if(!isName(i.get("Type"),"MCR"))break;const r=i.get("MCID");if(Number.isInteg\ er(r)&&updateElement(r,a,e))break}}}static async#ae({structTreeParent:e,tagDict:t,newTagRef:a,structTreeRootRef:r,fallbackKids:i,xref:n,cache:s}){let o,c=null;if(e){({ref:c}=e);o=e.dict.getRaw("P")||r}else o=r;t.set("P",o);const l=n.fetchIfRef(o);if(!l){i.push(a);return}let h=s.get(o);if(!h){h=l.clone();s.put(o,h)}const u=h.getRaw("K");let d=u instanceof Ref?s.get(u):null;if(!d){d=n.fetchIfRef(u);d=Array.isArray(d)?d.slice():[u];const e=n.getNewTemporaryRef();h.set("K",e);s.put(e,d)}const f=d.in\ dexOf(c);d.splice(f>=0?f+1:d.length,0,a)}}class StructElementNode{constructor(e,t){this.tree=e;this.xref=e.xref;this.dict=t;this.kids=[];this.parseKids()}get role(){const e=this.dict.get("S"),t=e instanceof Name?e.name:"",{root:a}=this.tree;return a.roleMap.get(t)??t}parseKids(){let e=null;const t=this.dict.getRaw("Pg");t instanceof Ref&&(e=t.toString());const a=this.dict.get("K");if(Array.isArray(a))for(const t of a){const a=this.parseKid(e,this.xref.fetchIfRef(t));a&&this.kids.push(a)}else{con\ st t=this.parseKid(e,a);t&&this.kids.push(t)}}parseKid(e,t){if(Number.isInteger(t))return this.tree.pageDict.objId!==e?null:new StructElement({type:zn,mcid:t,pageObjId:e});if(!(t instanceof Dict))return null;const a=t.getRaw("Pg");a instanceof Ref&&(e=a.toString());const r=t.get("Type")instanceof Name?t.get("Type").name:null;if("MCR"===r){if(this.tree.pageDict.objId!==e)return null;const a=t.getRaw("Stm");return new StructElement({type:$n,refObjId:a instanceof Ref?a.toString():null,pageObjId:e,m\ cid:t.get("MCID")})}if("OBJR"===r){if(this.tree.pageDict.objId!==e)return null;const a=t.getRaw("Obj");return new StructElement({type:Gn,refObjId:a instanceof Ref?a.toString():null,pageObjId:e})}return new StructElement({type:Kn,dict:t})}}class StructElement{constructor({type:e,dict:t=null,mcid:a=null,pageObjId:r=null,refObjId:i=null}){this.type=e;this.dict=t;this.mcid=a;this.pageObjId=r;this.refObjId=i;this.parentNode=null}}class StructTreePage{constructor(e,t){this.root=e;this.xref=e?.xref??nu\ ll;this.rootDict=e?.dict??null;this.pageDict=t;this.nodes=[]}collectObjects(e){if(!(this.root&&this.rootDict&&e instanceof Ref))return null;const t=this.rootDict.get("ParentTree");if(!t)return null;const a=this.root.structParentIds?.get(e);if(!a)return null;const r=new Map,i=new NumberTree(t,this.xref);for(const[e]of a){const t=i.getRaw(e);t instanceof Ref&&r.set(e,t)}return r}parse(e){if(!(this.root&&this.rootDict&&e instanceof Ref))return;const t=this.rootDict.get("ParentTree");if(!t)return;co\ nst a=this.pageDict.get("StructParents"),r=this.root.structParentIds?.get(e);if(!Number.isInteger(a)&&!r)return;const i=new Map,n=new NumberTree(t,this.xref);if(Number.isInteger(a)){const e=n.get(a);if(Array.isArray(e))for(const t of e)t instanceof Ref&&this.addNode(this.xref.fetch(t),i)}if(r)for(const[e,t]of r){const a=n.get(e);if(a){const e=this.addNode(this.xref.fetchIfRef(a),i);1===e?.kids?.length&&e.kids[0].type===Gn&&(e.kids[0].type=t)}}}addNode(e,t,a=0){if(a>40){warn("StructTree MAX_DEPTH\ reached.");return null}if(!(e instanceof Dict))return null;if(t.has(e))return t.get(e);const r=new StructElementNode(this,e);t.set(e,r);const i=e.get("P");if(!(i instanceof Dict)||isName(i.get("Type"),"StructTreeRoot")){this.addTopLevelNode(e,r)||t.delete(e);return r}const n=this.addNode(i,t,a+1);if(!n)return r;let s=!1;for(const t of n.kids)if(t.type===Kn&&t.dict===e){t.parentNode=r;s=!0}s||t.delete(e);return r}addTopLevelNode(e,t){const a=this.rootDict.get("K");if(!a)return!1;if(a instanceof \ Dict){if(a.objId!==e.objId)return!1;this.nodes[0]=t;return!0}if(!Array.isArray(a))return!0;let r=!1;for(let i=0;i40){warn("StructTree too deep to be fully serialized.");return}const r=Object.create(null);r.role=e.role;r.children=[];t.children.push(r);let i=e.dict.get("Alt");"string"!=typeof i&&(i=e.dict.get("ActualText"));"string"==typeof i&&(r.alt=s\ tringToPDFString(i));const n=e.dict.get("A");if(n instanceof Dict){const e=lookupNormalRect(n.getArray("BBox"),null);if(e)r.bbox=e;else{const e=n.get("Width"),t=n.get("Height");"number"==typeof e&&e>0&&"number"==typeof t&&t>0&&(r.bbox=[0,0,e,t])}}const s=e.dict.get("Lang");"string"==typeof s&&(r.lang=stringToPDFString(s));for(const t of e.kids){const e=t.type===Kn?t.parentNode:null;e?nodeToSerializable(e,r,a+1):t.type===zn||t.type===$n?r.children.push({type:"content",id:`p${t.pageObjId}_mc${t.mc\ id}`}):t.type===Gn?r.children.push({type:"object",id:t.refObjId}):t.type===Vn&&r.children.push({type:"annotation",id:`pdfjs_internal_id_${t.refObjId}`})}}const e=Object.create(null);e.children=[];e.role="Root";for(const t of this.nodes)t&&nodeToSerializable(t,e);return e}}const Jn=function _isValidExplicitDest(e,t,a){if(!Array.isArray(a)||a.length<2)return!1;const[r,i,...n]=a;if(!e(r)&&!Number.isInteger(r))return!1;if(!t(i))return!1;const s=n.length;let o=!0;switch(i.name){case"XYZ":if(s<2||s>3)\ return!1;break;case"Fit":case"FitB":return 0===s;case"FitH":case"FitBH":case"FitV":case"FitBV":if(s>1)return!1;break;case"FitR":if(4!==s)return!1;o=!1;break;default:return!1}for(const e of n)if(!("number"==typeof e||o&&null===e))return!1;return!0}.bind(null,(e=>e instanceof Ref),isName);function fetchDest(e){e instanceof Dict&&(e=e.get("D"));return Jn(e)?e:null}function fetchRemoteDest(e){let t=e.get("D");if(t){t instanceof Name&&(t=t.name);if("string"==typeof t)return stringToPDFString(t,!0);if\ (Jn(t))return JSON.stringify(t)}return null}class Catalog{#re=null;#ie=null;builtInCMapCache=new Map;fontCache=new RefSetCache;globalColorSpaceCache=new GlobalColorSpaceCache;globalImageCache=new GlobalImageCache;nonBlendModesSet=new RefSet;pageDictCache=new RefSetCache;pageIndexCache=new RefSetCache;pageKidsCountCache=new RefSetCache;standardFontDataCache=new Map;systemFontCache=new Map;constructor(e,t){this.pdfManager=e;this.xref=t;this.#ie=t.getCatalogObj();if(!(this.#ie instanceof Dict))thro\ w new FormatError("Catalog object is not a dictionary.");this.toplevelPagesDict}cloneDict(){return this.#ie.clone()}get version(){const e=this.#ie.get("Version");if(e instanceof Name){if(Ca.test(e.name))return shadow(this,"version",e.name);warn(`Invalid PDF catalog version: ${e.name}`)}return shadow(this,"version",null)}get lang(){const e=this.#ie.get("Lang");return shadow(this,"lang",e&&"string"==typeof e?stringToPDFString(e):null)}get needsRendering(){const e=this.#ie.get("NeedsRendering");ret\ urn shadow(this,"needsRendering","boolean"==typeof e&&e)}get collection(){let e=null;try{const t=this.#ie.get("Collection");t instanceof Dict&&t.size>0&&(e=t)}catch(e){if(e instanceof MissingDataException)throw e;info("Cannot fetch Collection entry; assuming no collection is present.")}return shadow(this,"collection",e)}get acroForm(){let e=null;try{const t=this.#ie.get("AcroForm");t instanceof Dict&&t.size>0&&(e=t)}catch(e){if(e instanceof MissingDataException)throw e;info("Cannot fetch AcroFor\ m entry; assuming no forms are present.")}return shadow(this,"acroForm",e)}get acroFormRef(){const e=this.#ie.getRaw("AcroForm");return shadow(this,"acroFormRef",e instanceof Ref?e:null)}get metadata(){const e=this.#ie.getRaw("Metadata");if(!(e instanceof Ref))return shadow(this,"metadata",null);let t=null;try{const a=this.xref.fetch(e,!this.xref.encrypt?.encryptMetadata);if(a instanceof BaseStream&&a.dict instanceof Dict){const e=a.dict.get("Type"),r=a.dict.get("Subtype");if(isName(e,"Metadata"\ )&&isName(r,"XML")){const e=stringToUTF8String(a.getString());e&&(t=new MetadataParser(e).serializable)}}}catch(e){if(e instanceof MissingDataException)throw e;info(`Skipping invalid Metadata: "${e}".`)}return shadow(this,"metadata",t)}get markInfo(){let e=null;try{e=this.#ne()}catch(e){if(e instanceof MissingDataException)throw e;warn("Unable to read mark info.")}return shadow(this,"markInfo",e)}#ne(){const e=this.#ie.get("MarkInfo");if(!(e instanceof Dict))return null;const t={Marked:!1,UserPr\ operties:!1,Suspects:!1};for(const a in t){const r=e.get(a);"boolean"==typeof r&&(t[a]=r)}return t}get structTreeRoot(){let e=null;try{e=this.#se()}catch(e){if(e instanceof MissingDataException)throw e;warn("Unable read to structTreeRoot info.")}return shadow(this,"structTreeRoot",e)}#se(){const e=this.#ie.getRaw("StructTreeRoot"),t=this.xref.fetchIfRef(e);if(!(t instanceof Dict))return null;const a=new StructTreeRoot(this.xref,t,e);a.init();return a}get toplevelPagesDict(){const e=this.#ie.get(\ "Pages");if(!(e instanceof Dict))throw new FormatError("Invalid top-level pages dictionary.");return shadow(this,"toplevelPagesDict",e)}get documentOutline(){let e=null;try{e=this.#oe()}catch(e){if(e instanceof MissingDataException)throw e;warn("Unable to read document outline.")}return shadow(this,"documentOutline",e)}#oe(){let e=this.#ie.get("Outlines");if(!(e instanceof Dict))return null;e=e.getRaw("First");if(!(e instanceof Ref))return null;const t={items:[]},a=[{obj:e,parent:t}],r=new RefSe\ t;r.put(e);const i=this.xref,n=new Uint8ClampedArray(3);for(;a.length>0;){const t=a.shift(),s=i.fetchIfRef(t.obj);if(null===s)continue;s.has("Title")||warn("Invalid outline item encountered.");const o={url:null,dest:null,action:null};Catalog.parseDestDictionary({destDict:s,resultObj:o,docBaseUrl:this.baseUrl,docAttachments:this.attachments});const c=s.get("Title"),l=s.get("F")||0,h=s.getArray("C"),u=s.get("Count");let d=n;!isNumberArray(h,3)||0===h[0]&&0===h[1]&&0===h[2]||(d=ColorSpaceUtils.rgb.\ getRgb(h,0));const f={action:o.action,attachment:o.attachment,dest:o.dest,url:o.url,unsafeUrl:o.unsafeUrl,newWindow:o.newWindow,setOCGState:o.setOCGState,title:"string"==typeof c?stringToPDFString(c):"",color:d,count:Number.isInteger(u)?u:void 0,bold:!!(2&l),italic:!!(1&l),items:[]};t.parent.items.push(f);e=s.getRaw("First");if(e instanceof Ref&&!r.has(e)){a.push({obj:e,parent:f});r.put(e)}e=s.getRaw("Next");if(e instanceof Ref&&!r.has(e)){a.push({obj:e,parent:t.parent});r.put(e)}}return t.items\ .length>0?t.items:null}get permissions(){let e=null;try{e=this.#ce()}catch(e){if(e instanceof MissingDataException)throw e;warn("Unable to read permissions.")}return shadow(this,"permissions",e)}#ce(){const e=this.xref.trailer.get("Encrypt");if(!(e instanceof Dict))return null;let t=e.get("P");if("number"!=typeof t)return null;t+=2**32;const a=[];for(const e in w){const r=w[e];t&r&&a.push(r)}return a}get optionalContentConfig(){let e=null;try{const t=this.#ie.get("OCProperties");if(!t)return sha\ dow(this,"optionalContentConfig",null);const a=t.get("D");if(!a)return shadow(this,"optionalContentConfig",null);const r=t.get("OCGs");if(!Array.isArray(r))return shadow(this,"optionalContentConfig",null);const i=new RefSetCache;for(const e of r)e instanceof Ref&&!i.has(e)&&i.put(e,this.#le(e));e=this.#he(a,i)}catch(e){if(e instanceof MissingDataException)throw e;warn(`Unable to read optional content config: ${e}`)}return shadow(this,"optionalContentConfig",e)}#le(e){const t=this.xref.fetch(e),a\ ={id:e.toString(),name:null,intent:null,usage:{print:null,view:null},rbGroups:[]},r=t.get("Name");"string"==typeof r&&(a.name=stringToPDFString(r));let i=t.getArray("Intent");Array.isArray(i)||(i=[i]);i.every((e=>e instanceof Name))&&(a.intent=i.map((e=>e.name)));const n=t.get("Usage");if(!(n instanceof Dict))return a;const s=a.usage,o=n.get("Print");if(o instanceof Dict){const e=o.get("PrintState");if(e instanceof Name)switch(e.name){case"ON":case"OFF":s.print={printState:e.name}}}const c=n.get\ ("View");if(c instanceof Dict){const e=c.get("ViewState");if(e instanceof Name)switch(e.name){case"ON":case"OFF":s.view={viewState:e.name}}}return a}#he(e,t){function parseOnOff(e){const a=[];if(Array.isArray(e))for(const r of e)r instanceof Ref&&t.has(r)&&a.push(r.toString());return a}function parseOrder(e,a=0){if(!Array.isArray(e))return null;const i=[];for(const n of e){if(n instanceof Ref&&t.has(n)){r.put(n);i.push(n.toString());continue}const e=parseNestedOrder(n,a);e&&i.push(e)}if(a>0)retu\ rn i;const n=[];for(const[e]of t.items())r.has(e)||n.push(e.toString());n.length&&i.push({name:null,order:n});return i}function parseNestedOrder(e,t){if(++t>i){warn("parseNestedOrder - reached MAX_NESTED_LEVELS.");return null}const r=a.fetchIfRef(e);if(!Array.isArray(r))return null;const n=a.fetchIfRef(r[0]);if("string"!=typeof n)return null;const s=parseOrder(r.slice(1),t);return s?.length?{name:stringToPDFString(n),order:s}:null}const a=this.xref,r=new RefSet,i=10;!function parseRBGroups(e){if\ (Array.isArray(e))for(const r of e){const e=a.fetchIfRef(r);if(!Array.isArray(e)||!e.length)continue;const i=new Set;for(const a of e)if(a instanceof Ref&&t.has(a)&&!i.has(a.toString())){i.add(a.toString());t.get(a).rbGroups.push(i)}}}(e.get("RBGroups"));return{name:"string"==typeof e.get("Name")?stringToPDFString(e.get("Name")):null,creator:"string"==typeof e.get("Creator")?stringToPDFString(e.get("Creator")):null,baseState:e.get("BaseState")instanceof Name?e.get("BaseState").name:null,on:parse\ OnOff(e.get("ON")),off:parseOnOff(e.get("OFF")),order:parseOrder(e.get("Order")),groups:[...t]}}setActualNumPages(e=null){this.#re=e}get hasActualNumPages(){return null!==this.#re}get _pagesCount(){const e=this.toplevelPagesDict.get("Count");if(!Number.isInteger(e))throw new FormatError("Page count in top-level pages dictionary is not an integer.");return shadow(this,"_pagesCount",e)}get numPages(){return this.#re??this._pagesCount}get destinations(){const e=this.#ue(),t=Object.create(null);for(\ const a of e)if(a instanceof NameTree)for(const[e,r]of a.getAll()){const a=fetchDest(r);a&&(t[stringToPDFString(e,!0)]=a)}else if(a instanceof Dict)for(const[e,r]of a){const a=fetchDest(r);a&&(t[stringToPDFString(e,!0)]||=a)}return shadow(this,"destinations",t)}getDestination(e){if(this.hasOwnProperty("destinations"))return this.destinations[e]??null;const t=this.#ue();for(const a of t)if(a instanceof NameTree||a instanceof Dict){const t=fetchDest(a.get(e));if(t)return t}if(t.length){const t=thi\ s.destinations[e];if(t)return t}return null}#ue(){const e=this.#ie.get("Names"),t=[];e?.has("Dests")&&t.push(new NameTree(e.getRaw("Dests"),this.xref));this.#ie.has("Dests")&&t.push(this.#ie.get("Dests"));return t}get pageLabels(){let e=null;try{e=this.#de()}catch(e){if(e instanceof MissingDataException)throw e;warn("Unable to read page labels.")}return shadow(this,"pageLabels",e)}#de(){const e=this.#ie.getRaw("PageLabels");if(!e)return null;const t=new Array(this.numPages);let a=null,r="";const\ i=new NumberTree(e,this.xref).getAll();let n="",s=1;for(let e=0,o=this.numPages;e=1))throw new FormatError("Invalid start in PageLabel dictionary.");s=e}else s=1}switch(a){case"D":n=s;break;case"R":case"r":n=toRomanNumerals(s,"r"===a);break;case"A":case"a":const e=26,t="a"===a?97:65,r=s-1;n=String.fromCharCode(t+r%e).repeat(Math.floor(r/e)+1);break;default:if(a)throw new FormatError(`Invalid style "\ ${a}" in PageLabel dictionary.`);n=""}t[e]=r+n;s++}return t}get pageLayout(){const e=this.#ie.get("PageLayout");let t="";if(e instanceof Name)switch(e.name){case"SinglePage":case"OneColumn":case"TwoColumnLeft":case"TwoColumnRight":case"TwoPageLeft":case"TwoPageRight":t=e.name}return shadow(this,"pageLayout",t)}get pageMode(){const e=this.#ie.get("PageMode");let t="UseNone";if(e instanceof Name)switch(e.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"FullScreen":case"UseOC":case"UseAtt\ achments":t=e.name}return shadow(this,"pageMode",t)}get viewerPreferences(){const e=this.#ie.get("ViewerPreferences");if(!(e instanceof Dict))return shadow(this,"viewerPreferences",null);let t=null;for(const[a,r]of e){let e;switch(a){case"HideToolbar":case"HideMenubar":case"HideWindowUI":case"FitWindow":case"CenterWindow":case"DisplayDocTitle":case"PickTrayByPDFSize":"boolean"==typeof r&&(e=r);break;case"NonFullScreenPageMode":if(r instanceof Name)switch(r.name){case"UseNone":case"UseOutlines":c\ ase"UseThumbs":case"UseOC":e=r.name;break;default:e="UseNone"}break;case"Direction":if(r instanceof Name)switch(r.name){case"L2R":case"R2L":e=r.name;break;default:e="L2R"}break;case"ViewArea":case"ViewClip":case"PrintArea":case"PrintClip":if(r instanceof Name)switch(r.name){case"MediaBox":case"CropBox":case"BleedBox":case"TrimBox":case"ArtBox":e=r.name;break;default:e="CropBox"}break;case"PrintScaling":if(r instanceof Name)switch(r.name){case"None":case"AppDefault":e=r.name;break;default:e="AppD\ efault"}break;case"Duplex":if(r instanceof Name)switch(r.name){case"Simplex":case"DuplexFlipShortEdge":case"DuplexFlipLongEdge":e=r.name;break;default:e="None"}break;case"PrintPageRange":if(Array.isArray(r)&&r.length%2==0){r.every(((e,t,a)=>Number.isInteger(e)&&e>0&&(0===t||e>=a[t-1])&&e<=this.numPages))&&(e=r)}break;case"NumCopies":Number.isInteger(r)&&r>0&&(e=r);break;default:warn(`Ignoring non-standard key in ViewerPreferences: ${a}.`);continue}if(void 0!==e){t??=Object.create(null);t[a]=e}el\ se warn(`Bad value, for key "${a}", in ViewerPreferences: ${r}.`)}return shadow(this,"viewerPreferences",t)}get openAction(){const e=this.#ie.get("OpenAction"),t=Object.create(null);if(e instanceof Dict){const a=new Dict(this.xref);a.set("A",e);const r={url:null,dest:null,action:null};Catalog.parseDestDictionary({destDict:a,resultObj:r});Array.isArray(r.dest)?t.dest=r.dest:r.action&&(t.action=r.action)}else Jn(e)&&(t.dest=e);return shadow(this,"openAction",objectSize(t)>0?t:null)}get attachments\ (){const e=this.#ie.get("Names");let t=null;if(e instanceof Dict&&e.has("EmbeddedFiles")){const a=new NameTree(e.getRaw("EmbeddedFiles"),this.xref);for(const[e,r]of a.getAll()){const a=new FileSpec(r,this.xref);t??=Object.create(null);t[stringToPDFString(e,!0)]=a.serializable}}return shadow(this,"attachments",t)}get xfaImages(){const e=this.#ie.get("Names");let t=null;if(e instanceof Dict&&e.has("XFAImages")){const a=new NameTree(e.getRaw("XFAImages"),this.xref);for(const[e,r]of a.getAll())if(r \ instanceof BaseStream){t??=new Map;t.set(stringToPDFString(e,!0),r.getBytes())}}return shadow(this,"xfaImages",t)}#fe(){const e=this.#ie.get("Names");let t=null;function appendIfJavaScriptDict(e,a){if(!(a instanceof Dict))return;if(!isName(a.get("S"),"JavaScript"))return;let r=a.get("JS");if(r instanceof BaseStream)r=r.getString();else if("string"!=typeof r)return;r=stringToPDFString(r,!0).replaceAll("\\0","");r&&(t||=new Map).set(e,r)}if(e instanceof Dict&&e.has("JavaScript")){const t=new NameTr\ ee(e.getRaw("JavaScript"),this.xref);for(const[e,a]of t.getAll())appendIfJavaScriptDict(stringToPDFString(e,!0),a)}const a=this.#ie.get("OpenAction");a&&appendIfJavaScriptDict("OpenAction",a);return t}get jsActions(){const e=this.#fe();let t=collectActions(this.xref,this.#ie,we);if(e){t||=Object.create(null);for(const[a,r]of e)a in t?t[a].push(r):t[a]=[r]}return shadow(this,"jsActions",t)}async cleanup(e=!1){clearGlobalCaches();this.globalColorSpaceCache.clear();this.globalImageCache.clear(e);th\ is.pageKidsCountCache.clear();this.pageIndexCache.clear();this.pageDictCache.clear();this.nonBlendModesSet.clear();for(const{dict:e}of await Promise.all(this.fontCache))delete e.cacheKey;this.fontCache.clear();this.builtInCMapCache.clear();this.standardFontDataCache.clear();this.systemFontCache.clear()}async getPageDict(e){const t=[this.toplevelPagesDict],a=new RefSet,r=this.#ie.getRaw("Pages");r instanceof Ref&&a.put(r);const i=this.xref,n=this.pageKidsCountCache,s=this.pageIndexCache,o=this.pa\ geDictCache;let c=0;for(;t.length;){const r=t.pop();if(r instanceof Ref){const l=n.get(r);if(l>=0&&c+l<=e){c+=l;continue}if(a.has(r))throw new FormatError("Pages tree contains circular reference.");a.put(r);const h=await(o.get(r)||i.fetchAsync(r));if(h instanceof Dict){let t=h.getRaw("Type");t instanceof Ref&&(t=await i.fetchAsync(t));if(isName(t,"Page")||!h.has("Kids")){n.has(r)||n.put(r,1);s.has(r)||s.put(r,c);if(c===e)return[h,r];c++;continue}}t.push(h);continue}if(!(r instanceof Dict))throw \ new FormatError("Page dictionary kid reference points to wrong type of object.");const{objId:l}=r;let h=r.getRaw("Count");h instanceof Ref&&(h=await i.fetchAsync(h));if(Number.isInteger(h)&&h>=0){l&&!n.has(l)&&n.put(l,h);if(c+h<=e){c+=h;continue}}let u=r.getRaw("Kids");u instanceof Ref&&(u=await i.fetchAsync(u));if(!Array.isArray(u)){let t=r.getRaw("Type");t instanceof Ref&&(t=await i.fetchAsync(t));if(isName(t,"Page")||!r.has("Kids")){if(c===e)return[r,null];c++;continue}throw new FormatError("\ Page dictionary kids object is not an array.")}for(let e=u.length-1;e>=0;e--){const a=u[e];t.push(a);r===this.toplevelPagesDict&&a instanceof Ref&&!o.has(a)&&o.put(a,i.fetchAsync(a))}}throw new Error(`Page index ${e} not found.`)}async getAllPageDicts(e=!1){const{ignoreErrors:t}=this.pdfManager.evaluatorOptions,a=[{currentNode:this.toplevelPagesDict,posInKids:0}],r=new RefSet,i=this.#ie.getRaw("Pages");i instanceof Ref&&r.put(i);const n=new Map,s=this.xref,o=this.pageIndexCache;let c=0;function \ addPageDict(e,t){t&&!o.has(t)&&o.put(t,c);n.set(c++,[e,t])}function addPageError(a){if(a instanceof XRefEntryException&&!e)throw a;if(e&&t&&0===c){warn(`getAllPageDicts - Skipping invalid first page: "${a}".`);a=Dict.empty}n.set(c++,[a,null])}for(;a.length>0;){const e=a.at(-1),{currentNode:t,posInKids:i}=e;let n=t.getRaw("Kids");if(n instanceof Ref)try{n=await s.fetchAsync(n)}catch(e){addPageError(e);break}if(!Array.isArray(n)){addPageError(new FormatError("Page dictionary kids object is not an \ array."));break}if(i>=n.length){a.pop();continue}const o=n[i];let c;if(o instanceof Ref){if(r.has(o)){addPageError(new FormatError("Pages tree contains circular reference."));break}r.put(o);try{c=await s.fetchAsync(o)}catch(e){addPageError(e);break}}else c=o;if(!(c instanceof Dict)){addPageError(new FormatError("Page dictionary kid reference points to wrong type of object."));break}let l=c.getRaw("Type");if(l instanceof Ref)try{l=await s.fetchAsync(l)}catch(e){addPageError(e);break}isName(l,"Pag\ e")||!c.has("Kids")?addPageDict(c,o instanceof Ref?o:null):a.push({currentNode:c,posInKids:0});e.posInKids++}return n}getPageIndex(e){const t=this.pageIndexCache.get(e);if(void 0!==t)return Promise.resolve(t);const a=this.xref;let r=0;const next=t=>function pagesBeforeRef(t){let r,i=0;return a.fetchAsync(t).then((function(a){if(isRefsEqual(t,e)&&!isDict(a,"Page")&&!(a instanceof Dict&&!a.has("Type")&&a.has("Contents")))throw new FormatError("The reference does not point to a /Page dictionary.");\ if(!a)return null;if(!(a instanceof Dict))throw new FormatError("Node must be a dictionary.");r=a.getRaw("Parent");return a.getAsync("Parent")})).then((function(e){if(!e)return null;if(!(e instanceof Dict))throw new FormatError("Parent must be a dictionary.");return e.getAsync("Kids")})).then((function(e){if(!e)return null;const n=[];let s=!1;for(const r of e){if(!(r instanceof Ref))throw new FormatError("Kid must be a reference.");if(isRefsEqual(r,t)){s=!0;break}n.push(a.fetchAsync(r).then((fun\ ction(e){if(!(e instanceof Dict))throw new FormatError("Kid node must be a dictionary.");e.has("Count")?i+=e.get("Count"):i++})))}if(!s)throw new FormatError("Kid reference not found in parent\'s kids.");return Promise.all(n).then((()=>[i,r]))}))}(t).then((t=>{if(!t){this.pageIndexCache.put(e,r);return r}const[a,i]=t;r+=a;return next(i)}));return next(e)}get baseUrl(){const e=this.#ie.get("URI");if(e instanceof Dict){const t=e.get("Base");if("string"==typeof t){const e=createValidAbsoluteUrl(t,nu\ ll,{tryConvertEncoding:!0});if(e)return shadow(this,"baseUrl",e.href)}}return shadow(this,"baseUrl",this.pdfManager.docBaseUrl)}static parseDestDictionary({destDict:e,resultObj:t,docBaseUrl:a=null,docAttachments:r=null}){if(!(e instanceof Dict)){warn("parseDestDictionary: `destDict` must be a dictionary.");return}let i,n,s=e.get("A");if(!(s instanceof Dict))if(e.has("Dest"))s=e.get("Dest");else{s=e.get("AA");s instanceof Dict&&(s.has("D")?s=s.get("D"):s.has("U")&&(s=s.get("U")))}if(s instanceof \ Dict){const e=s.get("S");if(!(e instanceof Name)){warn("parseDestDictionary: Invalid type in Action dictionary.");return}const a=e.name;switch(a){case"ResetForm":const e=s.get("Flags"),o=!(1&("number"==typeof e?e:0)),c=[],l=[];for(const e of s.get("Fields")||[])e instanceof Ref?l.push(e.toString()):"string"==typeof e&&c.push(stringToPDFString(e));t.resetForm={fields:c,refs:l,include:o};break;case"URI":i=s.get("URI");i instanceof Name&&(i="/"+i.name);break;case"GoTo":n=s.get("D");break;case"Launc\ h":case"GoToR":const h=s.get("F");if(h instanceof Dict){const e=new FileSpec(h,null,!0),{rawFilename:t}=e.serializable;i=t}else"string"==typeof h&&(i=h);const u=fetchRemoteDest(s);u&&"string"==typeof i&&(i=i.split("#",1)[0]+"#"+u);const d=s.get("NewWindow");"boolean"==typeof d&&(t.newWindow=d);break;case"GoToE":const f=s.get("T");let g;if(r&&f instanceof Dict){const e=f.get("R"),t=f.get("N");isName(e,"C")&&"string"==typeof t&&(g=r[stringToPDFString(t,!0)])}if(g){t.attachment=g;const e=fetchRemot\ eDest(s);e&&(t.attachmentDest=e)}else warn(\'parseDestDictionary - unimplemented "GoToE" action.\');break;case"Named":const p=s.get("N");p instanceof Name&&(t.action=p.name);break;case"SetOCGState":const m=s.get("State"),b=s.get("PreserveRB");if(!Array.isArray(m)||0===m.length)break;const y=[];for(const e of m)if(e instanceof Name)switch(e.name){case"ON":case"OFF":case"Toggle":y.push(e.name)}else e instanceof Ref&&y.push(e.toString());if(y.length!==m.length)break;t.setOCGState={state:y,preserveRB:\ "boolean"!=typeof b||b};break;case"JavaScript":const w=s.get("JS");let x;w instanceof BaseStream?x=w.getString():"string"==typeof w&&(x=w);const S=x&&recoverJsURL(stringToPDFString(x,!0));if(S){i=S.url;t.newWindow=S.newWindow;break}default:if("JavaScript"===a||"SubmitForm"===a)break;warn(`parseDestDictionary - unsupported action: "${a}".`)}}else e.has("Dest")&&(n=e.get("Dest"));if("string"==typeof i){const e=createValidAbsoluteUrl(i,a,{addDefaultProtocol:!0,tryConvertEncoding:!0});e&&(t.url=e.hr\ ef);t.unsafeUrl=i}if(n){n instanceof Name&&(n=n.name);"string"==typeof n?t.dest=stringToPDFString(n,!0):Jn(n)&&(t.dest=n)}}}function addChildren(e,t){if(e instanceof Dict)e=e.getRawValues();else if(e instanceof BaseStream)e=e.dict.getRawValues();else if(!Array.isArray(e))return;for(const r of e)((a=r)instanceof Ref||a instanceof Dict||a instanceof BaseStream||Array.isArray(a))&&t.push(r);var a}class ObjectLoader{refSet=new RefSet;constructor(e,t,a){this.dict=e;this.keys=t;this.xref=a}async load(\ ){const{keys:e,dict:t}=this,a=[];for(const r of e){const e=t.getRaw(r);void 0!==e&&a.push(e)}await this.#ge(a);this.refSet=null}async#ge(e){const t=[],a=[];for(;e.length;){let r=e.pop();if(r instanceof Ref){if(this.refSet.has(r))continue;try{this.refSet.put(r);r=this.xref.fetch(r)}catch(e){if(!(e instanceof MissingDataException)){warn(`ObjectLoader.#walk - requesting all data: "${e}".`);await this.xref.stream.manager.requestAllChunks();return}t.push(r);a.push({begin:e.begin,end:e.end})}}if(r ins\ tanceof BaseStream){const e=r.getBaseStreams();if(e){let i=!1;for(const t of e)if(!t.isDataLoaded){i=!0;a.push({begin:t.start,end:t.end})}i&&t.push(r)}}addChildren(r,e)}if(a.length){await this.xref.stream.manager.requestRanges(a);for(const e of t)e instanceof Ref&&this.refSet.remove(e);await this.#ge(t)}}static async load(e,t,a){if(a.stream.isDataLoaded)return;const r=new ObjectLoader(e,t,a);await r.load()}}const Yn=Symbol(),Zn=Symbol(),Qn=Symbol(),es=Symbol(),ts=Symbol(),as=Symbol(),rs=Symbol()\ ,is=Symbol(),ns=Symbol(),ss=Symbol("content"),os=Symbol("data"),cs=Symbol(),ls=Symbol("extra"),hs=Symbol(),us=Symbol(),ds=Symbol(),fs=Symbol(),gs=Symbol(),ps=Symbol(),ms=Symbol(),bs=Symbol(),ys=Symbol(),ws=Symbol(),xs=Symbol(),Ss=Symbol(),As=Symbol(),ks=Symbol(),Cs=Symbol(),vs=Symbol(),Fs=Symbol(),Is=Symbol(),Ts=Symbol(),Os=Symbol(),Ms=Symbol(),Ds=Symbol(),Bs=Symbol(),Rs=Symbol(),Ns=Symbol(),Es=Symbol(),Ls=Symbol(),js=Symbol(),_s=Symbol(),Us=Symbol(),Xs=Symbol(),qs=Symbol(),Hs=Symbol("namespaceI\ d"),Ws=Symbol("nodeName"),zs=Symbol(),$s=Symbol(),Gs=Symbol(),Vs=Symbol(),Ks=Symbol(),Js=Symbol(),Ys=Symbol(),Zs=Symbol(),Qs=Symbol("root"),eo=Symbol(),to=Symbol(),ao=Symbol(),ro=Symbol(),io=Symbol(),no=Symbol(),so=Symbol(),oo=Symbol(),co=Symbol(),lo=Symbol(),ho=Symbol(),uo=Symbol("uid"),fo=Symbol(),go={config:{id:0,check:e=>e.startsWith("http://www.xfa.org/schema/xci/")},connectionSet:{id:1,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-connection-set/")},datasets:{id:2,check:e=>e.startsW\ ith("http://www.xfa.org/schema/xfa-data/")},form:{id:3,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-form/")},localeSet:{id:4,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-locale-set/")},pdf:{id:5,check:e=>"http://ns.adobe.com/xdp/pdf/"===e},signature:{id:6,check:e=>"http://www.w3.org/2000/09/xmldsig#"===e},sourceSet:{id:7,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-source-set/")},stylesheet:{id:8,check:e=>"http://www.w3.org/1999/XSL/Transform"===e},template:{id:9,check:e=\ >e.startsWith("http://www.xfa.org/schema/xfa-template/")},xdc:{id:10,check:e=>e.startsWith("http://www.xfa.org/schema/xdc/")},xdp:{id:11,check:e=>"http://ns.adobe.com/xdp/"===e},xfdf:{id:12,check:e=>"http://ns.adobe.com/xfdf/"===e},xhtml:{id:13,check:e=>"http://www.w3.org/1999/xhtml"===e},xmpmeta:{id:14,check:e=>"http://ns.adobe.com/xmpmeta/"===e}},po={pt:e=>e,cm:e=>e/2.54*72,mm:e=>e/25.4*72,in:e=>72*e,px:e=>e},mo=/([+-]?\\d+\\.?\\d*)(.*)/;function stripQuotes(e){return e.startsWith("\'")||e.startsW\ ith(\'"\')?e.slice(1,-1):e}function getInteger({data:e,defaultValue:t,validate:a}){if(!e)return t;e=e.trim();const r=parseInt(e,10);return!isNaN(r)&&a(r)?r:t}function getFloat({data:e,defaultValue:t,validate:a}){if(!e)return t;e=e.trim();const r=parseFloat(e);return!isNaN(r)&&a(r)?r:t}function getKeyword({data:e,defaultValue:t,validate:a}){return e&&a(e=e.trim())?e:t}function getStringOption(e,t){return getKeyword({data:e,defaultValue:t[0],validate:e=>t.includes(e)})}function getMeasurement(e,t="0\ "){t||="0";if(!e)return getMeasurement(t);const a=e.trim().match(mo);if(!a)return getMeasurement(t);const[,r,i]=a,n=parseFloat(r);if(isNaN(n))return getMeasurement(t);if(0===n)return 0;const s=po[i];return s?s(n):n}function getRatio(e){if(!e)return{num:1,den:1};const t=e.split(":",2).map((e=>parseFloat(e.trim()))).filter((e=>!isNaN(e)));1===t.length&&t.push(1);if(0===t.length)return{num:1,den:1};const[a,r]=t;return{num:a,den:r}}function getRelevant(e){return e?e.trim().split(/\\s+/).map((e=>({exc\ luded:"-"===e[0],viewname:e.substring(1)}))):[]}class HTMLResult{static get FAILURE(){return shadow(this,"FAILURE",new HTMLResult(!1,null,null,null))}static get EMPTY(){return shadow(this,"EMPTY",new HTMLResult(!0,null,null,null))}constructor(e,t,a,r){this.success=e;this.html=t;this.bbox=a;this.breakNode=r}isBreak(){return!!this.breakNode}static breakNode(e){return new HTMLResult(!1,null,null,e)}static success(e,t=null){return new HTMLResult(!0,e,t,null)}}class FontFinder{constructor(e){this.fon\ ts=new Map;this.cache=new Map;this.warned=new Set;this.defaultFont=null;this.add(e)}add(e,t=null){for(const t of e)this.addPdfFont(t);for(const e of this.fonts.values())e.regular||(e.regular=e.italic||e.bold||e.bolditalic);if(!t||0===t.size)return;const a=this.fonts.get("PdfJS-Fallback-PdfJS-XFA");for(const e of t)this.fonts.set(e,a)}addPdfFont(e){const t=e.cssFontInfo,a=t.fontFamily;let r=this.fonts.get(a);if(!r){r=Object.create(null);this.fonts.set(a,r);this.defaultFont||(this.defaultFont=r)}l\ et i="";const n=parseFloat(t.fontWeight);0!==parseFloat(t.italicAngle)?i=n>=700?"bolditalic":"italic":n>=700&&(i="bold");if(!i){(e.name.includes("Bold")||e.psName?.includes("Bold"))&&(i="bold");(e.name.includes("Italic")||e.name.endsWith("It")||e.psName?.includes("Italic")||e.psName?.endsWith("It"))&&(i+="italic")}i||(i="regular");r[i]=e}getDefault(){return this.defaultFont}find(e,t=!0){let a=this.fonts.get(e)||this.cache.get(e);if(a)return a;const r=/,|-|_| |bolditalic|bold|italic|regular|it/gi\ ;let i=e.replaceAll(r,"");a=this.fonts.get(i);if(a){this.cache.set(e,a);return a}i=i.toLowerCase();const n=[];for(const[e,t]of this.fonts.entries())e.replaceAll(r,"").toLowerCase().startsWith(i)&&n.push(t);if(0===n.length)for(const[,e]of this.fonts.entries())e.regular.name?.replaceAll(r,"").toLowerCase().startsWith(i)&&n.push(e);if(0===n.length){i=i.replaceAll(/psmt|mt/gi,"");for(const[e,t]of this.fonts.entries())e.replaceAll(r,"").toLowerCase().startsWith(i)&&n.push(t)}if(0===n.length)for(const\ e of this.fonts.values())e.regular.name?.replaceAll(r,"").toLowerCase().startsWith(i)&&n.push(e);if(n.length>=1){1!==n.length&&t&&warn(`XFA - Too many choices to guess the correct font: ${e}`);this.cache.set(e,n[0]);return n[0]}if(t&&!this.warned.has(e)){this.warned.add(e);warn(`XFA - Cannot find the font: ${e}`)}return null}}function selectFont(e,t){return"italic"===e.posture?"bold"===e.weight?t.bolditalic:t.italic:"bold"===e.weight?t.bold:t.regular}class FontInfo{constructor(e,t,a,r){this.lin\ eHeight=a;this.paraMargin=t||{top:0,bottom:0,left:0,right:0};if(!e){[this.pdfFont,this.xfaFont]=this.defaultFont(r);return}this.xfaFont={typeface:e.typeface,posture:e.posture,weight:e.weight,size:e.size,letterSpacing:e.letterSpacing};const i=r.find(e.typeface);if(i){this.pdfFont=selectFont(e,i);this.pdfFont||([this.pdfFont,this.xfaFont]=this.defaultFont(r))}else[this.pdfFont,this.xfaFont]=this.defaultFont(r)}defaultFont(e){const t=e.find("Helvetica",!1)||e.find("Myriad Pro",!1)||e.find("Arial",!\ 1)||e.getDefault();if(t?.regular){const e=t.regular;return[e,{typeface:e.cssFontInfo.fontFamily,posture:"normal",weight:"normal",size:10,letterSpacing:0}]}return[null,{typeface:"Courier",posture:"normal",weight:"normal",size:10,letterSpacing:0}]}}class FontSelector{constructor(e,t,a,r){this.fontFinder=r;this.stack=[new FontInfo(e,t,a,r)]}pushData(e,t,a){const r=this.stack.at(-1);for(const t of["typeface","posture","weight","size","letterSpacing"])e[t]||(e[t]=r.xfaFont[t]);for(const e of["top","b\ ottom","left","right"])isNaN(t[e])&&(t[e]=r.paraMargin[e]);const i=new FontInfo(e,t,a||r.lineHeight,this.fontFinder);i.pdfFont||(i.pdfFont=r.pdfFont);this.stack.push(i)}popFont(){this.stack.pop()}topFont(){return this.stack.at(-1)}}class TextMeasure{constructor(e,t,a,r){this.glyphs=[];this.fontSelector=new FontSelector(e,t,a,r);this.extraHeight=0}pushData(e,t,a){this.fontSelector.pushData(e,t,a)}popFont(e){return this.fontSelector.popFont()}addPara(){const e=this.fontSelector.topFont();this.extr\ aHeight+=e.paraMargin.top+e.paraMargin.bottom}addString(e){if(!e)return;const t=this.fontSelector.topFont(),a=t.xfaFont.size;if(t.pdfFont){const r=t.xfaFont.letterSpacing,i=t.pdfFont,n=i.lineHeight||1.2,s=t.lineHeight||Math.max(1.2,n)*a,o=n-(void 0===i.lineGap?.2:i.lineGap),c=Math.max(1,o)*a,l=a/1e3,h=i.defaultWidth||i.charsToGlyphs(" ")[0].width;for(const t of e.split(/[\\u2029\\n]/)){const e=i.encodeString(t).join(""),a=i.charsToGlyphs(e);for(const e of a){const t=e.width||h;this.glyphs.push([t*\ l+r,s,c,e.unicode,!1])}this.glyphs.push([0,0,0,"\\n",!0])}this.glyphs.pop()}else{for(const t of e.split(/[\\u2029\\n]/)){for(const e of t.split(""))this.glyphs.push([a,1.2*a,a,e,!1]);this.glyphs.push([0,0,0,"\\n",!0])}this.glyphs.pop()}}compute(e){let t=-1,a=0,r=0,i=0,n=0,s=0,o=!1,c=!0;for(let l=0,h=this.glyphs.length;le){r=Math.max(r,n);n=0;i+=s;s=m;t=-1;a=0;o=!0;c=!1}else{s=M\ ath.max(m,s);a=n;n+=h;t=l}else if(n+h>e){i+=s;s=m;if(-1!==t){l=t;r=Math.max(r,a);n=0;t=-1;a=0}else{r=Math.max(r,n);n=h}o=!0;c=!1}else{n+=h;s=Math.max(m,s)}}r=Math.max(r,n);i+=s+this.extraHeight;return{width:1.02*r,height:i,isBroken:o}}}const bo=/^[^.[]+/,yo=/^[^\\]]+/,wo=0,xo=1,So=2,Ao=3,ko=4,Co=new Map([["$data",(e,t)=>e.datasets?e.datasets.data:e],["$record",(e,t)=>(e.datasets?e.datasets.data:e)[Ss]()[0]],["$template",(e,t)=>e.template],["$connectionSet",(e,t)=>e.connectionSet],["$form",(e,t)=>\ e.form],["$layout",(e,t)=>e.layout],["$host",(e,t)=>e.host],["$dataWindow",(e,t)=>e.dataWindow],["$event",(e,t)=>e.event],["!",(e,t)=>e.datasets],["$xfa",(e,t)=>e],["xfa",(e,t)=>e],["$",(e,t)=>t]]),vo=new WeakMap;function parseExpression(e,t,a=!0){let r=e.match(bo);if(!r)return null;let[i]=r;const n=[{name:i,cacheName:"."+i,index:0,js:null,formCalc:null,operator:wo}];let s=i.length;for(;s0&&h.push(e)}if(0!==h.length||o||0!==c)e=isFinite(l)?h.filter((e=>le[l])):h.flat();else{const a=t[vs]();if(!(t=a))return null;c=-1;e=[t]}}return 0===e.length?null:e}function createDataNode(e,t,a){const r=parseExpression(a);if(!r)return null;if(r.some((e=>e.operator===xo)))return null;const i=Co.get(r[0].name);let n=0;if(i){e=i(e,t\ );n=1}else e=t||e;for(let t=r.length;ne[so]())).join("")}get[Oo](){const e=Object.getPrototypeOf(this);if(!e._attributes){const t=e._attributes=new Set;for(const e of Object.getOwnPropertyNames(this)){if(null===this[e]||this\ [e]instanceof XFAObject||this[e]instanceof XFAObjectArray)break;t.add(e)}}return shadow(this,Oo,e._attributes)}[Es](e){let t=this;for(;t;){if(t===e)return!0;t=t[vs]()}return!1}[vs](){return this[Uo]}[Cs](){return this[vs]()}[Ss](e=null){return e?this[e]:this[Mo]}[cs](){const e=Object.create(null);this[ss]&&(e.$content=this[ss]);for(const t of Object.getOwnPropertyNames(this)){const a=this[t];null!==a&&(a instanceof XFAObject?e[t]=a[cs]():a instanceof XFAObjectArray?a.isEmpty()||(e[t]=a.dump()):e\ [t]=a)}return e}[ho](){return null}[co](){return HTMLResult.EMPTY}*[As](){for(const e of this[Ss]())yield e}*[No](e,t){for(const a of this[As]())if(!e||t===e.has(a[Ws])){const e=this[gs](),t=a[co](e);t.success||(this[ls].failingNode=a);yield t}}[us](){return null}[Zn](e,t){this[ls].children.push(e)}[gs](){}[es]({filter:e=null,include:t=!0}){if(this[ls].generator){const e=this[gs](),t=this[ls].failingNode[co](e);if(!t.success)return t;t.html&&this[Zn](t.html,t.bbox);delete this[ls].failingNode}el\ se this[ls].generator=this[No](e,t);for(;;){const e=this[ls].generator.next();if(e.done)break;const t=e.value;if(!t.success)return t;t.html&&this[Zn](t.html,t.bbox)}this[ls].generator=null;return HTMLResult.EMPTY}[ro](e){this[qo]=new Set(Object.keys(e))}[Po](e){const t=this[Oo],a=this[qo];return[...e].filter((e=>t.has(e)&&!a.has(e)))}[eo](e,t=new Set){for(const a of this[Mo])a[Xo](e,t)}[Xo](e,t){const a=this[Eo](e,t);a?this[Fo](a,e,t):this[eo](e,t)}[Eo](e,t){const{use:a,usehref:r}=this;if(!a&&!r\ )return null;let i=null,n=null,s=null,o=a;if(r){o=r;r.startsWith("#som(")&&r.endsWith(")")?n=r.slice(5,-1):r.startsWith(".#som(")&&r.endsWith(")")?n=r.slice(6,-1):r.startsWith("#")?s=r.slice(1):r.startsWith(".#")&&(s=r.slice(2))}else a.startsWith("#")?s=a.slice(1):n=a;this.use=this.usehref="";if(s)i=e.get(s);else{i=searchNode(e.get(Qs),this,n,!0,!1);i&&(i=i[0])}if(!i){warn(`XFA - Invalid prototype reference: ${o}.`);return null}if(i[Ws]!==this[Ws]){warn(`XFA - Incompatible prototype: ${i[Ws]} !=\ = ${this[Ws]}.`);return null}if(t.has(i)){warn("XFA - Cycle detected in prototypes use.");return null}t.add(i);const c=i[Eo](e,t);c&&i[Fo](c,e,t);i[eo](e,t);t.delete(i);return i}[Fo](e,t,a){if(a.has(e)){warn("XFA - Cycle detected in prototypes use.");return}!this[ss]&&e[ss]&&(this[ss]=e[ss]);new Set(a).add(e);for(const t of this[Po](e[qo])){this[t]=e[t];this[qo]&&this[qo].add(t)}for(const r of Object.getOwnPropertyNames(this)){if(this[Oo].has(r))continue;const i=this[r],n=e[r];if(i instanceof XF\ AObjectArray){for(const e of i[Mo])e[Xo](t,a);for(let r=i[Mo].length,s=n[Mo].length;rXFAObject[Do](e))):"object"==typeof e&&null!==e?Object.assign({},e):e}[is](){const e=Object.create(Object.getPrototypeOf(this));for(const t of Ob\ ject.getOwnPropertySymbols(this))try{e[t]=this[t]}catch{shadow(e,t,this[t])}e[uo]=`${e[Ws]}${Wo++}`;e[Mo]=[];for(const t of Object.getOwnPropertyNames(this)){if(this[Oo].has(t)){e[t]=XFAObject[Do](this[t]);continue}const a=this[t];e[t]=a instanceof XFAObjectArray?new XFAObjectArray(a[jo]):null}for(const t of this[Mo]){const a=t[Ws],r=t[is]();e[Mo].push(r);r[Uo]=e;null===e[a]?e[a]=r:e[a][Mo].push(r)}return e}[Ss](e=null){return e?this[Mo].filter((t=>t[Ws]===e)):this[Mo]}[ps](e){return this[e]}[ms\ ](e,t,a=!0){return Array.from(this[bs](e,t,a))}*[bs](e,t,a=!0){if("parent"!==e){for(const a of this[Mo]){a[Ws]===e&&(yield a);a.name===e&&(yield a);(t||a[Us]())&&(yield*a[bs](e,t,!1))}a&&this[Oo].has(e)&&(yield new XFAAttribute(this,e,this[e]))}else yield this[Uo]}}class XFAObjectArray{constructor(e=1/0){this[jo]=e;this[Mo]=[]}get isXFAObject(){return!1}get isXFAObjectArray(){return!0}push(e){if(this[Mo].length<=this[jo]){this[Mo].push(e);return!0}warn(`XFA - node "${e[Ws]}" accepts no more than\ ${this[jo]} children`);return!1}isEmpty(){return 0===this[Mo].length}dump(){return 1===this[Mo].length?this[Mo][0][cs]():this[Mo].map((e=>e[cs]()))}[is](){const e=new XFAObjectArray(this[jo]);e[Mo]=this[Mo].map((e=>e[is]()));return e}get children(){return this[Mo]}clear(){this[Mo].length=0}}class XFAAttribute{constructor(e,t,a){this[Uo]=e;this[Ws]=t;this[ss]=a;this[ns]=!1;this[uo]="attribute"+Wo++}[vs](){return this[Uo]}[Ns](){return!0}[ys](){return this[ss].trim()}[io](e){e=e.value||"";this[ss\ ]=e.toString()}[so](){return this[ss]}[Es](e){return this[Uo]===e||this[Uo][Es](e)}}class XmlObject extends XFAObject{constructor(e,t,a={}){super(e,t);this[ss]="";this[Bo]=null;if("#text"!==t){const e=new Map;this[Io]=e;for(const[t,r]of Object.entries(a))e.set(t,new XFAAttribute(this,t,r));if(a.hasOwnProperty(zs)){const e=a[zs].xfa.dataNode;void 0!==e&&("dataGroup"===e?this[Bo]=!1:"dataValue"===e&&(this[Bo]=!0))}}this[ns]=!1}[lo](e){const t=this[Ws];if("#text"===t){e.push(encodeToXmlString(this[\ ss]));return}const a=utf8StringToString(t),r=this[Hs]===zo?"xfa:":"";e.push(`<${r}${a}`);for(const[t,a]of this[Io].entries()){const r=utf8StringToString(t);e.push(` ${r}="${encodeToXmlString(a[ss])}"`)}null!==this[Bo]&&(this[Bo]?e.push(\' xfa:dataNode="dataValue"\'):e.push(\' xfa:dataNode="dataGroup"\'));if(this[ss]||0!==this[Mo].length){e.push(">");if(this[ss])"string"==typeof this[ss]?e.push(encodeToXmlString(this[ss])):this[ss][lo](e);else for(const t of this[Mo])t[lo](e);e.push(``)}el\ se e.push("/>")}[$s](e){if(this[ss]){const e=new XmlObject(this[Hs],"#text");this[Qn](e);e[ss]=this[ss];this[ss]=""}this[Qn](e);return!0}[Vs](e){this[ss]+=e}[hs](){if(this[ss]&&this[Mo].length>0){const e=new XmlObject(this[Hs],"#text");this[Qn](e);e[ss]=this[ss];delete this[ss]}}[co](){return"#text"===this[Ws]?HTMLResult.success({name:"#text",value:this[ss]}):HTMLResult.EMPTY}[Ss](e=null){return e?this[Mo].filter((t=>t[Ws]===e)):this[Mo]}[fs](){return this[Io]}[ps](e){const t=this[Io].get(e);ret\ urn void 0!==t?t:this[Ss](e)}*[bs](e,t){const a=this[Io].get(e);a&&(yield a);for(const a of this[Mo]){a[Ws]===e&&(yield a);t&&(yield*a[bs](e,t))}}*[ds](e,t){const a=this[Io].get(e);!a||t&&a[ns]||(yield a);for(const a of this[Mo])yield*a[ds](e,t)}*[xs](e,t,a){for(const r of this[Mo]){r[Ws]!==e||a&&r[ns]||(yield r);t&&(yield*r[xs](e,t,a))}}[Ns](){return null===this[Bo]?0===this[Mo].length||this[Mo][0][Hs]===go.xhtml.id:this[Bo]}[ys](){return null===this[Bo]?0===this[Mo].length?this[ss].trim():this\ [Mo][0][Hs]===go.xhtml.id?this[Mo][0][so]().trim():null:this[ss].trim()}[io](e){e=e.value||"";this[ss]=e.toString()}[cs](e=!1){const t=Object.create(null);e&&(t.$ns=this[Hs]);this[ss]&&(t.$content=this[ss]);t.$name=this[Ws];t.children=[];for(const a of this[Mo])t.children.push(a[cs](e));t.attributes=Object.create(null);for(const[e,a]of this[Io])t.attributes[e]=a[ss];return t}}class ContentObject extends XFAObject{constructor(e,t){super(e,t);this[ss]=""}[Vs](e){this[ss]+=e}[hs](){}}class OptionOb\ ject extends ContentObject{constructor(e,t,a){super(e,t);this[_o]=a}[hs](){this[ss]=getKeyword({data:this[ss],defaultValue:this[_o][0],validate:e=>this[_o].includes(e)})}[ts](e){super[ts](e);delete this[_o]}}class StringObject extends ContentObject{[hs](){this[ss]=this[ss].trim()}}class IntegerObject extends ContentObject{constructor(e,t,a,r){super(e,t);this[Ro]=a;this[Ho]=r}[hs](){this[ss]=getInteger({data:this[ss],defaultValue:this[Ro],validate:this[Ho]})}[ts](e){super[ts](e);delete this[Ro];d\ elete this[Ho]}}class Option01 extends IntegerObject{constructor(e,t){super(e,t,0,(e=>1===e))}}class Option10 extends IntegerObject{constructor(e,t){super(e,t,1,(e=>0===e))}}function measureToString(e){return"string"==typeof e?"0px":Number.isInteger(e)?`${e}px`:`${e.toFixed(2)}px`}const $o={anchorType(e,t){const a=e[Cs]();if(a&&(!a.layout||"position"===a.layout)){"transform"in t||(t.transform="");switch(e.anchorType){case"bottomCenter":t.transform+="translate(-50%, -100%)";break;case"bottomLeft"\ :t.transform+="translate(0,-100%)";break;case"bottomRight":t.transform+="translate(-100%,-100%)";break;case"middleCenter":t.transform+="translate(-50%,-50%)";break;case"middleLeft":t.transform+="translate(0,-50%)";break;case"middleRight":t.transform+="translate(-100%,-50%)";break;case"topCenter":t.transform+="translate(-50%,0)";break;case"topRight":t.transform+="translate(-100%,0)"}}},dimensions(e,t){const a=e[Cs]();let r=e.w;const i=e.h;if(a.layout?.includes("row")){const t=a[ls],i=e.colSpan;le\ t n;if(-1===i){n=Math.sumPrecise(t.columnWidths.slice(t.currentColumn));t.currentColumn=0}else{n=Math.sumPrecise(t.columnWidths.slice(t.currentColumn,t.currentColumn+i));t.currentColumn=(t.currentColumn+e.colSpan)%t.columnWidths.length}isNaN(n)||(r=e.w=n)}t.width=""!==r?measureToString(r):"auto";t.height=""!==i?measureToString(i):"auto"},position(e,t){const a=e[Cs]();if(!a?.layout||"position"===a.layout){t.position="absolute";t.left=measureToString(e.x);t.top=measureToString(e.y)}},rotate(e,t){i\ f(e.rotate){"transform"in t||(t.transform="");t.transform+=`rotate(-${e.rotate}deg)`;t.transformOrigin="top left"}},presence(e,t){switch(e.presence){case"invisible":t.visibility="hidden";break;case"hidden":case"inactive":t.display="none"}},hAlign(e,t){if("para"===e[Ws])switch(e.hAlign){case"justifyAll":t.textAlign="justify-all";break;case"radix":t.textAlign="left";break;default:t.textAlign=e.hAlign}else switch(e.hAlign){case"left":t.alignSelf="start";break;case"center":t.alignSelf="center";break\ ;case"right":t.alignSelf="end"}},margin(e,t){e.margin&&(t.margin=e.margin[ho]().margin)}};function setMinMaxDimensions(e,t){if("position"===e[Cs]().layout){e.minW>0&&(t.minWidth=measureToString(e.minW));e.maxW>0&&(t.maxWidth=measureToString(e.maxW));e.minH>0&&(t.minHeight=measureToString(e.minH));e.maxH>0&&(t.maxHeight=measureToString(e.maxH))}}function layoutText(e,t,a,r,i,n){const s=new TextMeasure(t,a,r,i);"string"==typeof e?s.addString(e):e[Ks](s);return s.compute(n)}function layoutNode(e,t)\ {let a=null,r=null,i=!1;if((!e.w||!e.h)&&e.value){let n=0,s=0;if(e.margin){n=e.margin.leftInset+e.margin.rightInset;s=e.margin.topInset+e.margin.bottomInset}let o=null,c=null;if(e.para){c=Object.create(null);o=""===e.para.lineHeight?null:e.para.lineHeight;c.top=""===e.para.spaceAbove?0:e.para.spaceAbove;c.bottom=""===e.para.spaceBelow?0:e.para.spaceBelow;c.left=""===e.para.marginLeft?0:e.para.marginLeft;c.right=""===e.para.marginRight?0:e.para.marginRight}let l=e.font;if(!l){const t=e[Fs]();let \ a=e[vs]();for(;a&&a!==t;){if(a.font){l=a.font;break}a=a[vs]()}}const h=(e.w||t.width)-n,u=e[Is].fontFinder;if(e.value.exData&&e.value.exData[ss]&&"text/html"===e.value.exData.contentType){const t=layoutText(e.value.exData[ss],l,c,o,u,h);r=t.width;a=t.height;i=t.isBroken}else{const t=e.value[so]();if(t){const e=layoutText(t,l,c,o,u,h);r=e.width;a=e.height;i=e.isBroken}}null===r||e.w||(r+=n);null===a||e.h||(a+=s)}return{w:r,h:a,isBroken:i}}function computeBbox(e,t,a){let r;if(""!==e.w&&""!==e.h)r=\ [e.x,e.y,e.w,e.h];else{if(!a)return null;let i=e.w;if(""===i){if(0===e.maxW){const t=e[Cs]();i="position"===t.layout&&""!==t.w?0:e.minW}else i=Math.min(e.maxW,a.width);t.attributes.style.width=measureToString(i)}let n=e.h;if(""===n){if(0===e.maxH){const t=e[Cs]();n="position"===t.layout&&""!==t.h?0:e.minH}else n=Math.min(e.maxH,a.height);t.attributes.style.height=measureToString(n)}r=[e.x,e.y,i,n]}return r}function fixDimensions(e){const t=e[Cs]();if(t.layout?.includes("row")){const a=t[ls],r=e.\ colSpan;let i;i=-1===r?Math.sumPrecise(a.columnWidths.slice(a.currentColumn)):Math.sumPrecise(a.columnWidths.slice(a.currentColumn,a.currentColumn+r));isNaN(i)||(e.w=i)}t.layout&&"position"!==t.layout&&(e.x=e.y=0);"table"===e.layout&&""===e.w&&Array.isArray(e.columnWidths)&&(e.w=Math.sumPrecise(e.columnWidths))}function layoutClass(e){switch(e.layout){case"position":default:return"xfaPosition";case"lr-tb":return"xfaLrTb";case"rl-row":return"xfaRlRow";case"rl-tb":return"xfaRlTb";case"row":return"\ xfaRow";case"table":return"xfaTable";case"tb":return"xfaTb"}}function toStyle(e,...t){const a=Object.create(null);for(const r of t){const t=e[r];if(null!==t)if($o.hasOwnProperty(r))$o[r](e,a);else if(t instanceof XFAObject){const e=t[ho]();e?Object.assign(a,e):warn(`(DEBUG) - XFA - style for ${r} not implemented yet`)}}return a}function createWrapper(e,t){const{attributes:a}=t,{style:r}=a,i={name:"div",attributes:{class:["xfaWrapper"],style:Object.create(null)},children:[]};a.class.push("xfaWrap\ ped");if(e.border){const{widths:a,insets:n}=e.border[ls];let s,o,c=n[0],l=n[3];const h=n[0]+n[2],u=n[1]+n[3];switch(e.border.hand){case"even":c-=a[0]/2;l-=a[3]/2;s=`calc(100% + ${(a[1]+a[3])/2-u}px)`;o=`calc(100% + ${(a[0]+a[2])/2-h}px)`;break;case"left":c-=a[0];l-=a[3];s=`calc(100% + ${a[1]+a[3]-u}px)`;o=`calc(100% + ${a[0]+a[2]-h}px)`;break;case"right":s=u?`calc(100% - ${u}px)`:"100%";o=h?`calc(100% - ${h}px)`:"100%"}const d=["xfaBorder"];isPrintOnly(e.border)&&d.push("xfaPrintOnly");const f={\ name:"div",attributes:{class:d,style:{top:`${c}px`,left:`${l}px`,width:s,height:o}},children:[]};for(const e of["border","borderWidth","borderColor","borderRadius","borderStyle"])if(void 0!==r[e]){f.attributes.style[e]=r[e];delete r[e]}i.children.push(f,t)}else i.children.push(t);for(const e of["background","backgroundClip","top","left","width","height","minWidth","minHeight","maxWidth","maxHeight","transform","transformOrigin","visibility"])if(void 0!==r[e]){i.attributes.style[e]=r[e];delete r[\ e]}i.attributes.style.position="absolute"===r.position?"absolute":"relative";delete r.position;if(r.alignSelf){i.attributes.style.alignSelf=r.alignSelf;delete r.alignSelf}return i}function fixTextIndent(e){const t=getMeasurement(e.textIndent,"0px");if(t>=0)return;const a="padding"+("left"===("right"===e.textAlign?"right":"left")?"Left":"Right"),r=getMeasurement(e[a],"0px");e[a]=r-t+"px"}function setAccess(e,t){switch(e.access){case"nonInteractive":t.push("xfaNonInteractive");break;case"readOnly"\ :t.push("xfaReadOnly");break;case"protected":t.push("xfaDisabled")}}function isPrintOnly(e){return e.relevant.length>0&&!e.relevant[0].excluded&&"print"===e.relevant[0].viewname}function getCurrentPara(e){const t=e[Fs]()[ls].paraStack;return t.length?t.at(-1):null}function setPara(e,t,a){if(a.attributes.class?.includes("xfaRich")){if(t){""===e.h&&(t.height="auto");""===e.w&&(t.width="auto")}const r=getCurrentPara(e);if(r){const e=a.attributes.style;e.display="flex";e.flexDirection="column";switc\ h(r.vAlign){case"top":e.justifyContent="start";break;case"bottom":e.justifyContent="end";break;case"middle":e.justifyContent="center"}const t=r[ho]();for(const[a,r]of Object.entries(t))a in e||(e[a]=r)}}}function setFontFamily(e,t,a,r){if(!a){delete r.fontFamily;return}const i=stripQuotes(e.typeface);r.fontFamily=`"${i}"`;const n=a.find(i);if(n){const{fontFamily:a}=n.regular.cssFontInfo;a!==i&&(r.fontFamily=`"${a}"`);const s=getCurrentPara(t);if(s&&""!==s.lineHeight)return;if(r.lineHeight)return\ ;const o=selectFont(e,n);o&&(r.lineHeight=Math.max(1.2,o.lineHeight))}}function fixURL(e){const t=createValidAbsoluteUrl(e,null,{addDefaultProtocol:!0,tryConvertEncoding:!0});return t?t.href:null}function createLine(e,t){return{name:"div",attributes:{class:["lr-tb"===e.layout?"xfaLr":"xfaRl"]},children:t}}function flushHTML(e){if(!e[ls])return null;const t={name:"div",attributes:e[ls].attributes,children:e[ls].children};if(e[ls].failingNode){const a=e[ls].failingNode[us]();a&&(e.layout.endsWith(\ "-tb")?t.children.push(createLine(e,[a])):t.children.push(a))}return 0===t.children.length?null:t}function addHTML(e,t,a){const r=e[ls],i=r.availableSpace,[n,s,o,c]=a;switch(e.layout){case"position":r.width=Math.max(r.width,n+o);r.height=Math.max(r.height,s+c);r.children.push(t);break;case"lr-tb":case"rl-tb":if(!r.line||1===r.attempt){r.line=createLine(e,[]);r.children.push(r.line);r.numberInLine=0}r.numberInLine+=1;r.line.children.push(t);if(0===r.attempt){r.currentWidth+=o;r.height=Math.max(r.\ height,r.prevHeight+c)}else{r.currentWidth=o;r.prevHeight=r.height;r.height+=c;r.attempt=0}r.width=Math.max(r.width,r.currentWidth);break;case"rl-row":case"row":{r.children.push(t);r.width+=o;r.height=Math.max(r.height,c);const e=measureToString(r.height);for(const t of r.children)t.attributes.style.height=e;break}case"table":case"tb":r.width=MathClamp(o,r.width,i.width);r.height+=c;r.children.push(t)}}function getAvailableSpace(e){const t=e[ls].availableSpace,a=e.margin?e.margin.topInset+e.marg\ in.bottomInset:0,r=e.margin?e.margin.leftInset+e.margin.rightInset:0;switch(e.layout){case"lr-tb":case"rl-tb":return 0===e[ls].attempt?{width:t.width-r-e[ls].currentWidth,height:t.height-a-e[ls].prevHeight}:{width:t.width-r,height:t.height-a-e[ls].height};case"rl-row":case"row":return{width:Math.sumPrecise(e[ls].columnWidths.slice(e[ls].currentColumn)),height:t.height-r};case"table":case"tb":return{width:t.width-r,height:t.height-a-e[ls].height};default:return t}}function checkDimensions(e,t){if\ (null===e[Fs]()[ls].firstUnsplittable)return!0;if(0===e.w||0===e.h)return!0;const a=e[Cs](),r=a[ls]?.attempt||0,[,i,n,s]=function getTransformedBBox(e){let t,a,r=""===e.w?NaN:e.w,i=""===e.h?NaN:e.h,[n,s]=[0,0];switch(e.anchorType||""){case"bottomCenter":[n,s]=[r/2,i];break;case"bottomLeft":[n,s]=[0,i];break;case"bottomRight":[n,s]=[r,i];break;case"middleCenter":[n,s]=[r/2,i/2];break;case"middleLeft":[n,s]=[0,i/2];break;case"middleRight":[n,s]=[r,i/2];break;case"topCenter":[n,s]=[r/2,0];break;cas\ e"topRight":[n,s]=[r,0]}switch(e.rotate||0){case 0:[t,a]=[-n,-s];break;case 90:[t,a]=[-s,n];[r,i]=[i,-r];break;case 180:[t,a]=[n,s];[r,i]=[-r,-i];break;case 270:[t,a]=[s,-n];[r,i]=[-i,r]}return[e.x+t+Math.min(0,r),e.y+a+Math.min(0,i),Math.abs(r),Math.abs(i)]}(e);switch(a.layout){case"lr-tb":case"rl-tb":return 0===r?e[Fs]()[ls].noLayoutFailure?""!==e.w?Math.round(n-t.width)<=2:t.width>2:!(""!==e.h&&Math.round(s-t.height)>2)&&(""!==e.w?Math.round(n-t.width)<=2||0===a[ls].numberInLine&&t.height>2:t\ .width>2):!!e[Fs]()[ls].noLayoutFailure||!(""!==e.h&&Math.round(s-t.height)>2)&&((""===e.w||Math.round(n-t.width)<=2||!a[_s]())&&t.height>2);case"table":case"tb":return!!e[Fs]()[ls].noLayoutFailure||(""===e.h||e[js]()?(""===e.w||Math.round(n-t.width)<=2||!a[_s]())&&t.height>2:Math.round(s-t.height)<=2);case"position":if(e[Fs]()[ls].noLayoutFailure)return!0;if(""===e.h||Math.round(s+i-t.height)<=2)return!0;return s+i>e[Fs]()[ls].currentContentArea.h;case"rl-row":case"row":return!!e[Fs]()[ls].noLa\ youtFailure||(""===e.h||Math.round(s-t.height)<=2);default:return!0}}const Go=go.template.id,Vo="http://www.w3.org/2000/svg",Ko=/^H(\\d+)$/,Jo=new Set(["image/gif","image/jpeg","image/jpg","image/pjpeg","image/png","image/apng","image/x-png","image/bmp","image/x-ms-bmp","image/tiff","image/tif","application/octet-stream"]),Yo=[[[66,77],"image/bmp"],[[255,216,255],"image/jpeg"],[[73,73,42,0],"image/tiff"],[[77,77,0,42],"image/tiff"],[[71,73,70,56,57,97],"image/gif"],[[137,80,78,71,13,10,26,10],"im\ age/png"]];function getBorderDims(e){if(!e||!e.border)return{w:0,h:0};const t=e.border[ws]();return t?{w:t.widths[0]+t.widths[2]+t.insets[0]+t.insets[2],h:t.widths[1]+t.widths[3]+t.insets[1]+t.insets[3]}:{w:0,h:0}}function hasMargin(e){return e.margin&&(e.margin.topInset||e.margin.rightInset||e.margin.bottomInset||e.margin.leftInset)}function _setValue(e,t){if(!e.value){const t=new Value({});e[Qn](t);e.value=t}e.value[io](t)}function*getContainedChildren(e){for(const t of e[Ss]())t instanceof Su\ bformSet?yield*t[As]():yield t}function isRequired(e){return"error"===e.validate?.nullTest}function setTabIndex(e){for(;e;){if(!e.traversal){e[no]=e[vs]()[no];return}if(e[no])return;let t=null;for(const a of e.traversal[Ss]())if("next"===a.operation){t=a;break}if(!t||!t.ref){e[no]=e[vs]()[no];return}const a=e[Fs]();e[no]=++a[no];const r=a[to](t.ref,e);if(!r)return;e=r[0]}}function applyAssist(e,t){const a=e.assist;if(a){const e=a[co]();e&&(t.title=e);const r=a.role.match(Ko);if(r){const e="headi\ ng",a=r[1];t.role=e;t["aria-level"]=a}}if("table"===e.layout)t.role="table";else if("row"===e.layout)t.role="row";else{const a=e[vs]();"row"===a.layout&&(t.role="TH"===a.assist?.role?"columnheader":"cell")}}function ariaLabel(e){if(!e.assist)return null;const t=e.assist;return t.speak&&""!==t.speak[ss]?t.speak[ss]:t.toolTip?t.toolTip[ss]:null}function valueToHtml(e){return HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:Object.create(null)},children:[{name:"span",attributes:{s\ tyle:Object.create(null)},value:e}]})}function setFirstUnsplittable(e){const t=e[Fs]();if(null===t[ls].firstUnsplittable){t[ls].firstUnsplittable=e;t[ls].noLayoutFailure=!0}}function unsetFirstUnsplittable(e){const t=e[Fs]();t[ls].firstUnsplittable===e&&(t[ls].noLayoutFailure=!1)}function handleBreak(e){if(e[ls])return!1;e[ls]=Object.create(null);if("auto"===e.targetType)return!1;const t=e[Fs]();let a=null;if(e.target){a=t[to](e.target,e[vs]());if(!a)return!1;a=a[0]}const{currentPageArea:r,curre\ ntContentArea:i}=t[ls];if("pageArea"===e.targetType){a instanceof PageArea||(a=null);if(e.startNew){e[ls].target=a||r;return!0}if(a&&a!==r){e[ls].target=a;return!0}return!1}a instanceof ContentArea||(a=null);const n=a&&a[vs]();let s,o=n;if(e.startNew)if(a){const e=n.contentArea.children,t=e.indexOf(i),r=e.indexOf(a);-1!==t&&te;r[ls].noLayoutFailure=!0;const s=t[co](a);e[Zn](s.html,s.bbox);r[ls].noLayoutFailure=i;t[Cs]=n}class AppearanceFilter extends StringObject{constructor(e){super(Go,"appearanceFilter");this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Arc extends XFAObject{constructor(e){super(Go,"arc",!0);this.circular=getInteger({data:e.circ\ ular,defaultValue:0,validate:e=>1===e});this.hand=getStringOption(e.hand,["even","left","right"]);this.id=e.id||"";this.startAngle=getFloat({data:e.startAngle,defaultValue:0,validate:e=>!0});this.sweepAngle=getFloat({data:e.sweepAngle,defaultValue:360,validate:e=>!0});this.use=e.use||"";this.usehref=e.usehref||"";this.edge=null;this.fill=null}[co](){const e=this.edge||new Edge({}),t=e[ho](),a=Object.create(null);"visible"===this.fill?.presence?Object.assign(a,this.fill[ho]()):a.fill="transparent\ ";a.strokeWidth=measureToString("visible"===e.presence?e.thickness:0);a.stroke=t.color;let r;const i={xmlns:Vo,style:{width:"100%",height:"100%",overflow:"visible"}};if(360===this.sweepAngle)r={name:"ellipse",attributes:{xmlns:Vo,cx:"50%",cy:"50%",rx:"50%",ry:"50%",style:a}};else{const e=this.startAngle*Math.PI/180,t=this.sweepAngle*Math.PI/180,n=this.sweepAngle>180?1:0,[s,o,c,l]=[50*(1+Math.cos(e)),50*(1-Math.sin(e)),50*(1+Math.cos(e+t)),50*(1-Math.sin(e+t))];r={name:"path",attributes:{xmlns:Vo\ ,d:`M ${s} ${o} A 50 50 0 ${n} 0 ${c} ${l}`,vectorEffect:"non-scaling-stroke",style:a}};Object.assign(i,{viewBox:"0 0 100 100",preserveAspectRatio:"none"})}const n={name:"svg",children:[r],attributes:i};if(hasMargin(this[vs]()[vs]()))return HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[n]});n.attributes.style.position="absolute";return HTMLResult.success(n)}}class Area extends XFAObject{constructor(e){super(Go,"area",!0);this.colSpan=ge\ tInteger({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e});this.id=e.id||"";this.name=e.name||"";this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.x=getMeasurement(e.x,"0pt");this.y=getMeasurement(e.y,"0pt");this.desc=null;this.extras=null;this.area=new XFAObjectArray;this.draw=new XFAObjectArray;this.exObject=new XFAObjectArray;this.exclGroup=new XFAObjectArray;this.field=new XFAObjectArray;this.subform=new XFAObjectArray;this.subformSet=new XFAObj\ ectArray}*[As](){yield*getContainedChildren(this)}[Us](){return!0}[Rs](){return!0}[Zn](e,t){const[a,r,i,n]=t;this[ls].width=Math.max(this[ls].width,a+i);this[ls].height=Math.max(this[ls].height,r+n);this[ls].children.push(e)}[gs](){return this[ls].availableSpace}[co](e){const t=toStyle(this,"position"),a={style:t,id:this[uo],class:["xfaArea"]};isPrintOnly(this)&&a.class.push("xfaPrintOnly");this.name&&(a.xfaName=this.name);const r=[];this[ls]={children:r,width:0,height:0,availableSpace:e};const \ i=this[es]({filter:new Set(["area","draw","field","exclGroup","subform","subformSet"]),include:!0});if(!i.success){if(i.isBreak())return i;delete this[ls];return HTMLResult.FAILURE}t.width=measureToString(this[ls].width);t.height=measureToString(this[ls].height);const n={name:"div",attributes:a,children:r},s=[this.x,this.y,this[ls].width,this[ls].height];delete this[ls];return HTMLResult.success(n,s)}}class Assist extends XFAObject{constructor(e){super(Go,"assist",!0);this.id=e.id||"";this.role=\ e.role||"";this.use=e.use||"";this.usehref=e.usehref||"";this.speak=null;this.toolTip=null}[co](){return this.toolTip?.[ss]||null}}class Barcode extends XFAObject{constructor(e){super(Go,"barcode",!0);this.charEncoding=getKeyword({data:e.charEncoding?e.charEncoding.toLowerCase():"",defaultValue:"",validate:e=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(e)||e.match(/iso-8859-\\d{2}/)});this.checksum=getStringOption(e.checks\ um,["none","1mod10","1mod10_1mod11","2mod10","auto"]);this.dataColumnCount=getInteger({data:e.dataColumnCount,defaultValue:-1,validate:e=>e>=0});this.dataLength=getInteger({data:e.dataLength,defaultValue:-1,validate:e=>e>=0});this.dataPrep=getStringOption(e.dataPrep,["none","flateCompress"]);this.dataRowCount=getInteger({data:e.dataRowCount,defaultValue:-1,validate:e=>e>=0});this.endChar=e.endChar||"";this.errorCorrectionLevel=getInteger({data:e.errorCorrectionLevel,defaultValue:-1,validate:e=>e\ >=0&&e<=8});this.id=e.id||"";this.moduleHeight=getMeasurement(e.moduleHeight,"5mm");this.moduleWidth=getMeasurement(e.moduleWidth,"0.25mm");this.printCheckDigit=getInteger({data:e.printCheckDigit,defaultValue:0,validate:e=>1===e});this.rowColumnRatio=getRatio(e.rowColumnRatio);this.startChar=e.startChar||"";this.textLocation=getStringOption(e.textLocation,["below","above","aboveEmbedded","belowEmbedded","none"]);this.truncate=getInteger({data:e.truncate,defaultValue:0,validate:e=>1===e});this.ty\ pe=getStringOption(e.type?e.type.toLowerCase():"",["aztec","codabar","code2of5industrial","code2of5interleaved","code2of5matrix","code2of5standard","code3of9","code3of9extended","code11","code49","code93","code128","code128a","code128b","code128c","code128sscc","datamatrix","ean8","ean8add2","ean8add5","ean13","ean13add2","ean13add5","ean13pwcd","fim","logmars","maxicode","msi","pdf417","pdf417macro","plessey","postauscust2","postauscust3","postausreplypaid","postausstandard","postukrm4scc","pos\ tusdpbc","postusimb","postusstandard","postus5zip","qrcode","rfid","rss14","rss14expanded","rss14limited","rss14stacked","rss14stackedomni","rss14truncated","telepen","ucc128","ucc128random","ucc128sscc","upca","upcaadd2","upcaadd5","upcapwcd","upce","upceadd2","upceadd5","upcean2","upcean5","upsmaxicode"]);this.upsMode=getStringOption(e.upsMode,["usCarrier","internationalCarrier","secureSymbol","standardSymbol"]);this.use=e.use||"";this.usehref=e.usehref||"";this.wideNarrowRatio=getRatio(e.wide\ NarrowRatio);this.encrypt=null;this.extras=null}}class Bind extends XFAObject{constructor(e){super(Go,"bind",!0);this.match=getStringOption(e.match,["once","dataRef","global","none"]);this.ref=e.ref||"";this.picture=null}}class BindItems extends XFAObject{constructor(e){super(Go,"bindItems");this.connection=e.connection||"";this.labelRef=e.labelRef||"";this.ref=e.ref||"";this.valueRef=e.valueRef||""}}class Bookend extends XFAObject{constructor(e){super(Go,"bookend");this.id=e.id||"";this.leader=\ e.leader||"";this.trailer=e.trailer||"";this.use=e.use||"";this.usehref=e.usehref||""}}class BooleanElement extends Option01{constructor(e){super(Go,"boolean");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[co](e){return valueToHtml(1===this[ss]?"1":"0")}}class Border extends XFAObject{constructor(e){super(Go,"border",!0);this.break=getStringOption(e.break,["close","open"]);this.hand=getStringOption(e.hand,["even","left","right"]);this.id=e.id||"";this.prese\ nce=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.corner=new XFAObjectArray(4);this.edge=new XFAObjectArray(4);this.extras=null;this.fill=null;this.margin=null}[ws](){if(!this[ls]){const e=this.edge.children.slice();if(e.length<4){const t=e.at(-1)||new Edge({});for(let a=e.length;a<4;a++)e.push(t)}const t=e.map((e=>e.thickness)),a=[0,0,0,0];if(this.margin){a[0]=this.margin.topInset;\ a[1]=this.margin.rightInset;a[2]=this.margin.bottomInset;a[3]=this.margin.leftInset}this[ls]={widths:t,insets:a,edges:e}}return this[ls]}[ho](){const{edges:e}=this[ws](),t=e.map((e=>{const t=e[ho]();t.color||="#000000";return t})),a=Object.create(null);this.margin&&Object.assign(a,this.margin[ho]());"visible"===this.fill?.presence&&Object.assign(a,this.fill[ho]());if(this.corner.children.some((e=>0!==e.radius))){const e=this.corner.children.map((e=>e[ho]()));if(2===e.length||3===e.length){const \ t=e.at(-1);for(let a=e.length;a<4;a++)e.push(t)}a.borderRadius=e.map((e=>e.radius)).join(" ")}switch(this.presence){case"invisible":case"hidden":a.borderStyle="";break;case"inactive":a.borderStyle="none";break;default:a.borderStyle=t.map((e=>e.style)).join(" ")}a.borderWidth=t.map((e=>e.width)).join(" ");a.borderColor=t.map((e=>e.color)).join(" ");return a}}class Break extends XFAObject{constructor(e){super(Go,"break",!0);this.after=getStringOption(e.after,["auto","contentArea","pageArea","pageE\ ven","pageOdd"]);this.afterTarget=e.afterTarget||"";this.before=getStringOption(e.before,["auto","contentArea","pageArea","pageEven","pageOdd"]);this.beforeTarget=e.beforeTarget||"";this.bookendLeader=e.bookendLeader||"";this.bookendTrailer=e.bookendTrailer||"";this.id=e.id||"";this.overflowLeader=e.overflowLeader||"";this.overflowTarget=e.overflowTarget||"";this.overflowTrailer=e.overflowTrailer||"";this.startNew=getInteger({data:e.startNew,defaultValue:0,validate:e=>1===e});this.use=e.use||"";\ this.usehref=e.usehref||"";this.extras=null}}class BreakAfter extends XFAObject{constructor(e){super(Go,"breakAfter",!0);this.id=e.id||"";this.leader=e.leader||"";this.startNew=getInteger({data:e.startNew,defaultValue:0,validate:e=>1===e});this.target=e.target||"";this.targetType=getStringOption(e.targetType,["auto","contentArea","pageArea"]);this.trailer=e.trailer||"";this.use=e.use||"";this.usehref=e.usehref||"";this.script=null}}class BreakBefore extends XFAObject{constructor(e){super(Go,"bre\ akBefore",!0);this.id=e.id||"";this.leader=e.leader||"";this.startNew=getInteger({data:e.startNew,defaultValue:0,validate:e=>1===e});this.target=e.target||"";this.targetType=getStringOption(e.targetType,["auto","contentArea","pageArea"]);this.trailer=e.trailer||"";this.use=e.use||"";this.usehref=e.usehref||"";this.script=null}[co](e){this[ls]={};return HTMLResult.FAILURE}}class Button extends XFAObject{constructor(e){super(Go,"button",!0);this.highlight=getStringOption(e.highlight,["inverted","n\ one","outline","push"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}[co](e){const t=this[vs]()[vs](),a={name:"button",attributes:{id:this[uo],class:["xfaButton"],style:{}},children:[]};for(const e of t.event.children){if("click"!==e.activity||!e.script)continue;const t=recoverJsURL(e.script[ss]);if(!t)continue;const r=fixURL(t.url);r&&a.children.push({name:"a",attributes:{id:"link"+this[uo],href:r,newWindow:t.newWindow,class:["xfaLink"],style:{}},children:[]})\ }return HTMLResult.success(a)}}class Calculate extends XFAObject{constructor(e){super(Go,"calculate",!0);this.id=e.id||"";this.override=getStringOption(e.override,["disabled","error","ignore","warning"]);this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.message=null;this.script=null}}class Caption extends XFAObject{constructor(e){super(Go,"caption",!0);this.id=e.id||"";this.placement=getStringOption(e.placement,["left","bottom","inline","right","top"]);this.presence=getStringOp\ tion(e.presence,["visible","hidden","inactive","invisible"]);this.reserve=Math.ceil(getMeasurement(e.reserve));this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.font=null;this.margin=null;this.para=null;this.value=null}[io](e){_setValue(this,e)}[ws](e){if(!this[ls]){let{width:t,height:a}=e;switch(this.placement){case"left":case"right":case"inline":t=this.reserve<=0?t:this.reserve;break;case"top":case"bottom":a=this.reserve<=0?a:this.reserve}this[ls]=layoutNode(this,{width:t,hei\ ght:a})}return this[ls]}[co](e){if(!this.value)return HTMLResult.EMPTY;this[Ys]();const t=this.value[co](e).html;if(!t){this[Js]();return HTMLResult.EMPTY}const a=this.reserve;if(this.reserve<=0){const{w:t,h:a}=this[ws](e);switch(this.placement){case"left":case"right":case"inline":this.reserve=t;break;case"top":case"bottom":this.reserve=a}}const r=[];"string"==typeof t?r.push({name:"#text",value:t}):r.push(t);const i=toStyle(this,"font","margin","visibility");switch(this.placement){case"left":ca\ se"right":this.reserve>0&&(i.width=measureToString(this.reserve));break;case"top":case"bottom":this.reserve>0&&(i.height=measureToString(this.reserve))}setPara(this,null,t);this[Js]();this.reserve=a;return HTMLResult.success({name:"div",attributes:{style:i,class:["xfaCaption"]},children:r})}}class Certificate extends StringObject{constructor(e){super(Go,"certificate");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Certificates extends XFAObject{constru\ ctor(e){super(Go,"certificates",!0);this.credentialServerPolicy=getStringOption(e.credentialServerPolicy,["optional","required"]);this.id=e.id||"";this.url=e.url||"";this.urlPolicy=e.urlPolicy||"";this.use=e.use||"";this.usehref=e.usehref||"";this.encryption=null;this.issuers=null;this.keyUsage=null;this.oids=null;this.signing=null;this.subjectDNs=null}}class CheckButton extends XFAObject{constructor(e){super(Go,"checkButton",!0);this.id=e.id||"";this.mark=getStringOption(e.mark,["default","chec\ k","circle","cross","diamond","square","star"]);this.shape=getStringOption(e.shape,["square","round"]);this.size=getMeasurement(e.size,"10pt");this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.extras=null;this.margin=null}[co](e){const t=toStyle(this,"margin"),a=measureToString(this.size);t.width=t.height=a;let r,i,n;const s=this[vs]()[vs](),o=s.items.children.length&&s.items.children[0][co]().html||[],c={on:(void 0!==o[0]?o[0]:"on").toString(),off:(void 0!==o[1]?o[1]:"off").to\ String()},l=(s.value?.[so]()||"off")===c.on||void 0,h=s[Cs](),u=s[uo];let d;if(h instanceof ExclGroup){n=h[uo];r="radio";i="xfaRadio";d=h[os]?.[uo]||h[uo]}else{r="checkbox";i="xfaCheckbox";d=s[os]?.[uo]||s[uo]}const f={name:"input",attributes:{class:[i],style:t,fieldId:u,dataId:d,type:r,checked:l,xfaOn:c.on,xfaOff:c.off,"aria-label":ariaLabel(s),"aria-required":!1}};n&&(f.attributes.name=n);if(isRequired(s)){f.attributes["aria-required"]=!0;f.attributes.required=!0}return HTMLResult.success({nam\ e:"label",attributes:{class:["xfaLabel"]},children:[f]})}}class ChoiceList extends XFAObject{constructor(e){super(Go,"choiceList",!0);this.commitOn=getStringOption(e.commitOn,["select","exit"]);this.id=e.id||"";this.open=getStringOption(e.open,["userControl","always","multiSelect","onEntry"]);this.textEntry=getInteger({data:e.textEntry,defaultValue:0,validate:e=>1===e});this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.extras=null;this.margin=null}[co](e){const t=toStyle(this,"\ border","margin"),a=this[vs]()[vs](),r={fontSize:`calc(${a.font?.size||10}px * var(--total-scale-factor))`},i=[];if(a.items.children.length>0){const e=a.items;let t=0,n=0;if(2===e.children.length){t=e.children[0].save;n=1-t}const s=e.children[t][co]().html,o=e.children[n][co]().html;let c=!1;const l=a.value?.[so]()||"";for(let e=0,t=s.length;eMathClamp(parseInt(e.trim(),10),0,255))).map((e=>isNaN(e)?0:e));if(n.length<3)return{r:a,g:r,b:i};[a,r,i]=n;return{r:a,g:r,b:i}}(e.value):"";this.extras=null}[Ts](){return!1}[ho](){return this.value?Util.makeHexColor(this.value.r,this.value.g,this.value.b):null}}class Comb extends XFAObject{constructor(e\ ){super(Go,"comb");this.id=e.id||"";this.numberOfCells=getInteger({data:e.numberOfCells,defaultValue:0,validate:e=>e>=0});this.use=e.use||"";this.usehref=e.usehref||""}}class Connect extends XFAObject{constructor(e){super(Go,"connect",!0);this.connection=e.connection||"";this.id=e.id||"";this.ref=e.ref||"";this.usage=getStringOption(e.usage,["exportAndImport","exportOnly","importOnly"]);this.use=e.use||"";this.usehref=e.usehref||"";this.picture=null}}class ContentArea extends XFAObject{construct\ or(e){super(Go,"contentArea",!0);this.h=getMeasurement(e.h);this.id=e.id||"";this.name=e.name||"";this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.w=getMeasurement(e.w);this.x=getMeasurement(e.x,"0pt");this.y=getMeasurement(e.y,"0pt");this.desc=null;this.extras=null}[co](e){const t={left:measureToString(this.x),top:measureToString(this.y),width:measureToString(this.w),height:measureToString(this.h)},a=["xfaContentarea"];isPrintOnly(this)&&a.push("xfaPrintO\ nly");return HTMLResult.success({name:"div",children:[],attributes:{style:t,class:a,id:this[uo]}})}}class Corner extends XFAObject{constructor(e){super(Go,"corner",!0);this.id=e.id||"";this.inverted=getInteger({data:e.inverted,defaultValue:0,validate:e=>1===e});this.join=getStringOption(e.join,["square","round"]);this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.radius=getMeasurement(e.radius);this.stroke=getStringOption(e.stroke,["solid","dashDot","dashD\ otDot","dashed","dotted","embossed","etched","lowered","raised"]);this.thickness=getMeasurement(e.thickness,"0.5pt");this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[ho](){const e=toStyle(this,"visibility");e.radius=measureToString("square"===this.join?0:this.radius);return e}}class DateElement extends ContentObject{constructor(e){super(Go,"date");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[hs](){const e=this[ss].trim();this\ [ss]=e?new Date(e):null}[co](e){return valueToHtml(this[ss]?this[ss].toString():"")}}class DateTime extends ContentObject{constructor(e){super(Go,"dateTime");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[hs](){const e=this[ss].trim();this[ss]=e?new Date(e):null}[co](e){return valueToHtml(this[ss]?this[ss].toString():"")}}class DateTimeEdit extends XFAObject{constructor(e){super(Go,"dateTimeEdit",!0);this.hScrollPolicy=getStringOption(e.hScrollPolicy,["auto"\ ,"off","on"]);this.id=e.id||"";this.picker=getStringOption(e.picker,["host","none"]);this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.comb=null;this.extras=null;this.margin=null}[co](e){const t=toStyle(this,"border","font","margin"),a=this[vs]()[vs](),r={name:"input",attributes:{type:"text",fieldId:a[uo],dataId:a[os]?.[uo]||a[uo],class:["xfaTextfield"],style:t,"aria-label":ariaLabel(a),"aria-required":!1}};if(isRequired(a)){r.attributes["aria-required"]=!0;r.attributes.require\ d=!0}return HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[r]})}}class Decimal extends ContentObject{constructor(e){super(Go,"decimal");this.fracDigits=getInteger({data:e.fracDigits,defaultValue:2,validate:e=>!0});this.id=e.id||"";this.leadDigits=getInteger({data:e.leadDigits,defaultValue:-1,validate:e=>!0});this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[hs](){const e=parseFloat(this[ss].trim());this[ss]=isNaN(e)?null:e}[co](e){return valueToHtml(\ null!==this[ss]?this[ss].toString():"")}}class DefaultUi extends XFAObject{constructor(e){super(Go,"defaultUi",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}}class Desc extends XFAObject{constructor(e){super(Go,"desc",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.boolean=new XFAObjectArray;this.date=new XFAObjectArray;this.dateTime=new XFAObjectArray;this.decimal=new XFAObjectArray;this.exData=new XFAObjectArray;this.float=new XFAOb\ jectArray;this.image=new XFAObjectArray;this.integer=new XFAObjectArray;this.text=new XFAObjectArray;this.time=new XFAObjectArray}}class DigestMethod extends OptionObject{constructor(e){super(Go,"digestMethod",["","SHA1","SHA256","SHA512","RIPEMD160"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||""}}class DigestMethods extends XFAObject{constructor(e){super(Go,"digestMethods",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.us\ ehref=e.usehref||"";this.digestMethod=new XFAObjectArray}}class Draw extends XFAObject{constructor(e){super(Go,"draw",!0);this.anchorType=getStringOption(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]);this.colSpan=getInteger({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e});this.h=e.h?getMeasurement(e.h):"";this.hAlign=getStringOption(e.hAlign,["left","center","justify","justifyAll","radix","right"]);th\ is.id=e.id||"";this.locale=e.locale||"";this.maxH=getMeasurement(e.maxH,"0pt");this.maxW=getMeasurement(e.maxW,"0pt");this.minH=getMeasurement(e.minH,"0pt");this.minW=getMeasurement(e.minW,"0pt");this.name=e.name||"";this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.relevant=getRelevant(e.relevant);this.rotate=getInteger({data:e.rotate,defaultValue:0,validate:e=>e%90==0});this.use=e.use||"";this.usehref=e.usehref||"";this.w=e.w?getMeasurement(e.w):"";this\ .x=getMeasurement(e.x,"0pt");this.y=getMeasurement(e.y,"0pt");this.assist=null;this.border=null;this.caption=null;this.desc=null;this.extras=null;this.font=null;this.keep=null;this.margin=null;this.para=null;this.traversal=null;this.ui=null;this.value=null;this.setProperty=new XFAObjectArray}[io](e){_setValue(this,e)}[co](e){setTabIndex(this);if("hidden"===this.presence||"inactive"===this.presence)return HTMLResult.EMPTY;fixDimensions(this);this[Ys]();const t=this.w,a=this.h,{w:r,h:i,isBroken:n}\ =layoutNode(this,e);if(r&&""===this.w){if(n&&this[Cs]()[_s]()){this[Js]();return HTMLResult.FAILURE}this.w=r}i&&""===this.h&&(this.h=i);setFirstUnsplittable(this);if(!checkDimensions(this,e)){this.w=t;this.h=a;this[Js]();return HTMLResult.FAILURE}unsetFirstUnsplittable(this);const s=toStyle(this,"font","hAlign","dimensions","position","presence","rotate","anchorType","border","margin");setMinMaxDimensions(this,s);if(s.margin){s.padding=s.margin;delete s.margin}const o=["xfaDraw"];this.font&&o.pu\ sh("xfaFont");isPrintOnly(this)&&o.push("xfaPrintOnly");const c={style:s,id:this[uo],class:o};this.name&&(c.xfaName=this.name);const l={name:"div",attributes:c,children:[]};applyAssist(this,c);const h=computeBbox(this,l,e),u=this.value?this.value[co](e).html:null;if(null===u){this.w=t;this.h=a;this[Js]();return HTMLResult.success(createWrapper(this,l),h)}l.children.push(u);setPara(this,s,u);this.w=t;this.h=a;this[Js]();return HTMLResult.success(createWrapper(this,l),h)}}class Edge extends XFAObj\ ect{constructor(e){super(Go,"edge",!0);this.cap=getStringOption(e.cap,["square","butt","round"]);this.id=e.id||"";this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.stroke=getStringOption(e.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]);this.thickness=getMeasurement(e.thickness,"0.5pt");this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[ho](){const e=toStyle(this,"visibility");\ Object.assign(e,{linecap:this.cap,width:measureToString(this.thickness),color:this.color?this.color[ho]():"#000000",style:""});if("visible"!==this.presence)e.style="none";else switch(this.stroke){case"solid":e.style="solid";break;case"dashDot":case"dashDotDot":case"dashed":e.style="dashed";break;case"dotted":e.style="dotted";break;case"embossed":e.style="ridge";break;case"etched":e.style="groove";break;case"lowered":e.style="inset";break;case"raised":e.style="outset"}return e}}class Encoding ext\ ends OptionObject{constructor(e){super(Go,"encoding",["adbe.x509.rsa_sha1","adbe.pkcs7.detached","adbe.pkcs7.sha1"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Encodings extends XFAObject{constructor(e){super(Go,"encodings",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.encoding=new XFAObjectArray}}class Encrypt extends XFAObject{constructor(e){super(Go,"encrypt",!0);this.id=e.id||"";thi\ s.use=e.use||"";this.usehref=e.usehref||"";this.certificate=null}}class EncryptData extends XFAObject{constructor(e){super(Go,"encryptData",!0);this.id=e.id||"";this.operation=getStringOption(e.operation,["encrypt","decrypt"]);this.target=e.target||"";this.use=e.use||"";this.usehref=e.usehref||"";this.filter=null;this.manifest=null}}class Encryption extends XFAObject{constructor(e){super(Go,"encryption",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use\ ||"";this.usehref=e.usehref||"";this.certificate=new XFAObjectArray}}class EncryptionMethod extends OptionObject{constructor(e){super(Go,"encryptionMethod",["","AES256-CBC","TRIPLEDES-CBC","AES128-CBC","AES192-CBC"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||""}}class EncryptionMethods extends XFAObject{constructor(e){super(Go,"encryptionMethods",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.enc\ ryptionMethod=new XFAObjectArray}}class Event extends XFAObject{constructor(e){super(Go,"event",!0);this.activity=getStringOption(e.activity,["click","change","docClose","docReady","enter","exit","full","indexChange","initialize","mouseDown","mouseEnter","mouseExit","mouseUp","postExecute","postOpen","postPrint","postSave","postSign","postSubmit","preExecute","preOpen","prePrint","preSave","preSign","preSubmit","ready","validationState"]);this.id=e.id||"";this.listen=getStringOption(e.listen,["r\ efOnly","refAndDescendents"]);this.name=e.name||"";this.ref=e.ref||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.encryptData=null;this.execute=null;this.script=null;this.signData=null;this.submit=null}}class ExData extends ContentObject{constructor(e){super(Go,"exData");this.contentType=e.contentType||"";this.href=e.href||"";this.id=e.id||"";this.maxLength=getInteger({data:e.maxLength,defaultValue:-1,validate:e=>e>=-1});this.name=e.name||"";this.rid=e.rid||"";this.transf\ erEncoding=getStringOption(e.transferEncoding,["none","base64","package"]);this.use=e.use||"";this.usehref=e.usehref||""}[Bs](){return"text/html"===this.contentType}[$s](e){if("text/html"===this.contentType&&e[Hs]===go.xhtml.id){this[ss]=e;return!0}if("text/xml"===this.contentType){this[ss]=e;return!0}return!1}[co](e){return"text/html"===this.contentType&&this[ss]?this[ss][co](e):HTMLResult.EMPTY}}class ExObject extends XFAObject{constructor(e){super(Go,"exObject",!0);this.archive=e.archive||"";\ this.classId=e.classId||"";this.codeBase=e.codeBase||"";this.codeType=e.codeType||"";this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.boolean=new XFAObjectArray;this.date=new XFAObjectArray;this.dateTime=new XFAObjectArray;this.decimal=new XFAObjectArray;this.exData=new XFAObjectArray;this.exObject=new XFAObjectArray;this.float=new XFAObjectArray;this.image=new XFAObjectArray;this.integer=new XFAObjectArray;this.text=new XFAObjectArray;thi\ s.time=new XFAObjectArray}}class ExclGroup extends XFAObject{constructor(e){super(Go,"exclGroup",!0);this.access=getStringOption(e.access,["open","nonInteractive","protected","readOnly"]);this.accessKey=e.accessKey||"";this.anchorType=getStringOption(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]);this.colSpan=getInteger({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e});this.h=e.h?getMeasurement(e.h):"";\ this.hAlign=getStringOption(e.hAlign,["left","center","justify","justifyAll","radix","right"]);this.id=e.id||"";this.layout=getStringOption(e.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]);this.maxH=getMeasurement(e.maxH,"0pt");this.maxW=getMeasurement(e.maxW,"0pt");this.minH=getMeasurement(e.minH,"0pt");this.minW=getMeasurement(e.minW,"0pt");this.name=e.name||"";this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.relevant=getRelevant(e.re\ levant);this.use=e.use||"";this.usehref=e.usehref||"";this.w=e.w?getMeasurement(e.w):"";this.x=getMeasurement(e.x,"0pt");this.y=getMeasurement(e.y,"0pt");this.assist=null;this.bind=null;this.border=null;this.calculate=null;this.caption=null;this.desc=null;this.extras=null;this.margin=null;this.para=null;this.traversal=null;this.validate=null;this.connect=new XFAObjectArray;this.event=new XFAObjectArray;this.field=new XFAObjectArray;this.setProperty=new XFAObjectArray}[Rs](){return!0}[Ts](){retur\ n!0}[io](e){for(const t of this.field.children){if(!t.value){const e=new Value({});t[Qn](e);t.value=e}t.value[io](e)}}[_s](){return this.layout.endsWith("-tb")&&0===this[ls].attempt&&this[ls].numberInLine>0||this[vs]()[_s]()}[js](){const e=this[Cs]();if(!e[js]())return!1;if(void 0!==this[ls]._isSplittable)return this[ls]._isSplittable;if("position"===this.layout||this.layout.includes("row")){this[ls]._isSplittable=!1;return!1}if(e.layout?.endsWith("-tb")&&0!==e[ls].numberInLine)return!1;this[ls]\ ._isSplittable=!0;return!0}[us](){return flushHTML(this)}[Zn](e,t){addHTML(this,e,t)}[gs](){return getAvailableSpace(this)}[co](e){setTabIndex(this);if("hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return HTMLResult.EMPTY;fixDimensions(this);const t=[],a={id:this[uo],class:[]};setAccess(this,a.class);this[ls]||=Object.create(null);Object.assign(this[ls],{children:t,attributes:a,attempt:0,line:null,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,e.width),h\ eight:Math.min(this.h||1/0,e.height)},width:0,height:0,prevHeight:0,currentWidth:0});const r=this[js]();r||setFirstUnsplittable(this);if(!checkDimensions(this,e))return HTMLResult.FAILURE;const i=new Set(["field"]);if(this.layout.includes("row")){const e=this[Cs]().columnWidths;if(Array.isArray(e)&&e.length>0){this[ls].columnWidths=e;this[ls].currentColumn=0}}const n=toStyle(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),s=["xfaExclgroup"],o=layoutClass(this);o&\ &s.push(o);isPrintOnly(this)&&s.push("xfaPrintOnly");a.style=n;a.class=s;this.name&&(a.xfaName=this.name);this[Ys]();const c="lr-tb"===this.layout||"rl-tb"===this.layout,l=c?2:1;for(;this[ls].attempte>=1||-1===e});this.h=e.h?getMeasurement(e.h):"";this.hAlign=getStringOption(e.hAlign,["left","center","justify","justifyAll","radix","right"]);this.id=e.id||"";this.locale=e.locale||"";this.maxH=getMeasurement(e.maxH,"0pt");this.maxW=getMeasurement(e.max\ W,"0pt");this.minH=getMeasurement(e.minH,"0pt");this.minW=getMeasurement(e.minW,"0pt");this.name=e.name||"";this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.relevant=getRelevant(e.relevant);this.rotate=getInteger({data:e.rotate,defaultValue:0,validate:e=>e%90==0});this.use=e.use||"";this.usehref=e.usehref||"";this.w=e.w?getMeasurement(e.w):"";this.x=getMeasurement(e.x,"0pt");this.y=getMeasurement(e.y,"0pt");this.assist=null;this.bind=null;this.border=nul\ l;this.calculate=null;this.caption=null;this.desc=null;this.extras=null;this.font=null;this.format=null;this.items=new XFAObjectArray(2);this.keep=null;this.margin=null;this.para=null;this.traversal=null;this.ui=null;this.validate=null;this.value=null;this.bindItems=new XFAObjectArray;this.connect=new XFAObjectArray;this.event=new XFAObjectArray;this.setProperty=new XFAObjectArray}[Rs](){return!0}[io](e){_setValue(this,e)}[co](e){setTabIndex(this);if(!this.ui){this.ui=new Ui({});this.ui[Is]=this\ [Is];this[Qn](this.ui);let e;switch(this.items.children.length){case 0:e=new TextEdit({});this.ui.textEdit=e;break;case 1:e=new CheckButton({});this.ui.checkButton=e;break;case 2:e=new ChoiceList({});this.ui.choiceList=e}this.ui[Qn](e)}if(!this.ui||"hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return HTMLResult.EMPTY;this.caption&&delete this.caption[ls];this[Ys]();const t=this.caption?this.caption[co](e).html:null,a=this.w,r=this.h;let i=0,n=0;if(this.margin){i=th\ is.margin.leftInset+this.margin.rightInset;n=this.margin.topInset+this.margin.bottomInset}let s=null;if(""===this.w||""===this.h){let t=null,a=null,r=0,o=0;if(this.ui.checkButton)r=o=this.ui.checkButton.size;else{const{w:t,h:a}=layoutNode(this,e);if(null!==t){r=t;o=a}else o=function fonts_getMetrics(e,t=!1){let a=null;if(e){const t=stripQuotes(e.typeface),r=e[Is].fontFinder.find(t);a=selectFont(e,r)}if(!a)return{lineHeight:12,lineGap:2,lineNoGap:10};const r=e.size||10,i=a.lineHeight?Math.max(t?0\ :1.2,a.lineHeight):1.2,n=void 0===a.lineGap?.2:a.lineGap;return{lineHeight:i*r,lineGap:n*r,lineNoGap:Math.max(1,i-n)*r}}(this.font,!0).lineNoGap}s=getBorderDims(this.ui[ws]());r+=s.w;o+=s.h;if(this.caption){const{w:i,h:n,isBroken:s}=this.caption[ws](e);if(s&&this[Cs]()[_s]()){this[Js]();return HTMLResult.FAILURE}t=i;a=n;switch(this.caption.placement){case"left":case"right":case"inline":t+=r;break;case"top":case"bottom":a+=o}}else{t=r;a=o}if(t&&""===this.w){t+=i;this.w=Math.min(this.maxW<=0?1/0:t\ his.maxW,this.minW+1e>=1&&e<=5});this.appearanceFilter=null;this.certificates=null;this.digestMethods=null;this.encodings=null;this.encryptionMethods=null;this.handler=null;this.lockDocument=null;this.mdp=null;this.reasons=null;this.timeStamp=null}}class Float extends ContentObject{constructor(e){super(Go,"float");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[hs](){const e=parseFloat(this[ss].trim());this[ss]=isNaN(e)?null:e}[co](e){return valueToHtml(null!==this\ [ss]?this[ss].toString():"")}}class template_Font extends XFAObject{constructor(e){super(Go,"font",!0);this.baselineShift=getMeasurement(e.baselineShift);this.fontHorizontalScale=getFloat({data:e.fontHorizontalScale,defaultValue:100,validate:e=>e>=0});this.fontVerticalScale=getFloat({data:e.fontVerticalScale,defaultValue:100,validate:e=>e>=0});this.id=e.id||"";this.kerningMode=getStringOption(e.kerningMode,["none","pair"]);this.letterSpacing=getMeasurement(e.letterSpacing,"0");this.lineThrough=g\ etInteger({data:e.lineThrough,defaultValue:0,validate:e=>1===e||2===e});this.lineThroughPeriod=getStringOption(e.lineThroughPeriod,["all","word"]);this.overline=getInteger({data:e.overline,defaultValue:0,validate:e=>1===e||2===e});this.overlinePeriod=getStringOption(e.overlinePeriod,["all","word"]);this.posture=getStringOption(e.posture,["normal","italic"]);this.size=getMeasurement(e.size,"10pt");this.typeface=e.typeface||"Courier";this.underline=getInteger({data:e.underline,defaultValue:0,valid\ ate:e=>1===e||2===e});this.underlinePeriod=getStringOption(e.underlinePeriod,["all","word"]);this.use=e.use||"";this.usehref=e.usehref||"";this.weight=getStringOption(e.weight,["normal","bold"]);this.extras=null;this.fill=null}[ts](e){super[ts](e);this[Is].usedTypefaces.add(this.typeface)}[ho](){const e=toStyle(this,"fill"),t=e.color;if(t)if("#000000"===t)delete e.color;else if(!t.startsWith("#")){e.background=t;e.backgroundClip="text";e.color="transparent"}this.baselineShift&&(e.verticalAlign=m\ easureToString(this.baselineShift));e.fontKerning="none"===this.kerningMode?"none":"normal";e.letterSpacing=measureToString(this.letterSpacing);if(0!==this.lineThrough){e.textDecoration="line-through";2===this.lineThrough&&(e.textDecorationStyle="double")}if(0!==this.overline){e.textDecoration="overline";2===this.overline&&(e.textDecorationStyle="double")}e.fontStyle=this.posture;e.fontSize=measureToString(.99*this.size);setFontFamily(this,this,this[Is].fontFinder,e);if(0!==this.underline){e.tex\ tDecoration="underline";2===this.underline&&(e.textDecorationStyle="double")}e.fontWeight=this.weight;return e}}class Format extends XFAObject{constructor(e){super(Go,"format",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.picture=null}}class Handler extends StringObject{constructor(e){super(Go,"handler");this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Hyphenation extends XFA\ Object{constructor(e){super(Go,"hyphenation");this.excludeAllCaps=getInteger({data:e.excludeAllCaps,defaultValue:0,validate:e=>1===e});this.excludeInitialCap=getInteger({data:e.excludeInitialCap,defaultValue:0,validate:e=>1===e});this.hyphenate=getInteger({data:e.hyphenate,defaultValue:0,validate:e=>1===e});this.id=e.id||"";this.pushCharacterCount=getInteger({data:e.pushCharacterCount,defaultValue:3,validate:e=>e>=0});this.remainCharacterCount=getInteger({data:e.remainCharacterCount,defaultValue\ :3,validate:e=>e>=0});this.use=e.use||"";this.usehref=e.usehref||"";this.wordCharacterCount=getInteger({data:e.wordCharacterCount,defaultValue:7,validate:e=>e>=0})}}class Image extends StringObject{constructor(e){super(Go,"image");this.aspect=getStringOption(e.aspect,["fit","actual","height","none","width"]);this.contentType=e.contentType||"";this.href=e.href||"";this.id=e.id||"";this.name=e.name||"";this.transferEncoding=getStringOption(e.transferEncoding,["base64","none","package"]);this.use=e\ .use||"";this.usehref=e.usehref||""}[co](){if(this.contentType&&!Jo.has(this.contentType.toLowerCase()))return HTMLResult.EMPTY;let e=this[Is].images?.get(this.href);if(!e&&(this.href||!this[ss]))return HTMLResult.EMPTY;e||"base64"!==this.transferEncoding||(e=function fromBase64Util(e){return Uint8Array.fromBase64?Uint8Array.fromBase64(e):stringToBytes(atob(e))}(this[ss]));if(!e)return HTMLResult.EMPTY;if(!this.contentType){for(const[t,a]of Yo)if(e.length>t.length&&t.every(((t,a)=>t===e[a]))){th\ is.contentType=a;break}if(!this.contentType)return HTMLResult.EMPTY}const t=new Blob([e],{type:this.contentType});let a;switch(this.aspect){case"fit":case"actual":break;case"height":a={height:"100%",objectFit:"fill"};break;case"none":a={width:"100%",height:"100%",objectFit:"fill"};break;case"width":a={width:"100%",objectFit:"fill"}}const r=this[vs]();return HTMLResult.success({name:"img",attributes:{class:["xfaImage"],style:a,src:URL.createObjectURL(t),alt:r?ariaLabel(r[vs]()):null}})}}class Ima\ geEdit extends XFAObject{constructor(e){super(Go,"imageEdit",!0);this.data=getStringOption(e.data,["link","embed"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.extras=null;this.margin=null}[co](e){return"embed"===this.data?HTMLResult.success({name:"div",children:[],attributes:{}}):HTMLResult.EMPTY}}class Integer extends ContentObject{constructor(e){super(Go,"integer");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[hs]\ (){const e=parseInt(this[ss].trim(),10);this[ss]=isNaN(e)?null:e}[co](e){return valueToHtml(null!==this[ss]?this[ss].toString():"")}}class Issuers extends XFAObject{constructor(e){super(Go,"issuers",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.certificate=new XFAObjectArray}}class Items extends XFAObject{constructor(e){super(Go,"items",!0);this.id=e.id||"";this.name=e.name||"";this.presence=getStringOption(e.pre\ sence,["visible","hidden","inactive","invisible"]);this.ref=e.ref||"";this.save=getInteger({data:e.save,defaultValue:0,validate:e=>1===e});this.use=e.use||"";this.usehref=e.usehref||"";this.boolean=new XFAObjectArray;this.date=new XFAObjectArray;this.dateTime=new XFAObjectArray;this.decimal=new XFAObjectArray;this.exData=new XFAObjectArray;this.float=new XFAObjectArray;this.image=new XFAObjectArray;this.integer=new XFAObjectArray;this.text=new XFAObjectArray;this.time=new XFAObjectArray}[co](){c\ onst e=[];for(const t of this[Ss]())e.push(t[so]());return HTMLResult.success(e)}}class Keep extends XFAObject{constructor(e){super(Go,"keep",!0);this.id=e.id||"";const t=["none","contentArea","pageArea"];this.intact=getStringOption(e.intact,t);this.next=getStringOption(e.next,t);this.previous=getStringOption(e.previous,t);this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}}class KeyUsage extends XFAObject{constructor(e){super(Go,"keyUsage");const t=["","yes","no"];this.crlSign=getSt\ ringOption(e.crlSign,t);this.dataEncipherment=getStringOption(e.dataEncipherment,t);this.decipherOnly=getStringOption(e.decipherOnly,t);this.digitalSignature=getStringOption(e.digitalSignature,t);this.encipherOnly=getStringOption(e.encipherOnly,t);this.id=e.id||"";this.keyAgreement=getStringOption(e.keyAgreement,t);this.keyCertSign=getStringOption(e.keyCertSign,t);this.keyEncipherment=getStringOption(e.keyEncipherment,t);this.nonRepudiation=getStringOption(e.nonRepudiation,t);this.type=getString\ Option(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Line extends XFAObject{constructor(e){super(Go,"line",!0);this.hand=getStringOption(e.hand,["even","left","right"]);this.id=e.id||"";this.slope=getStringOption(e.slope,["\\\\","/"]);this.use=e.use||"";this.usehref=e.usehref||"";this.edge=null}[co](){const e=this[vs]()[vs](),t=this.edge||new Edge({}),a=t[ho](),r=Object.create(null),i="visible"===t.presence?t.thickness:0;r.strokeWidth=measureToString(i);r.str\ oke=a.color;let n,s,o,c,l="100%",h="100%";if(e.w<=i){[n,s,o,c]=["50%",0,"50%","100%"];l=r.strokeWidth}else if(e.h<=i){[n,s,o,c]=[0,"50%","100%","50%"];h=r.strokeWidth}else"\\\\"===this.slope?[n,s,o,c]=[0,0,"100%","100%"]:[n,s,o,c]=[0,"100%","100%",0];const u={name:"svg",children:[{name:"line",attributes:{xmlns:Vo,x1:n,y1:s,x2:o,y2:c,style:r}}],attributes:{xmlns:Vo,width:l,height:h,style:{overflow:"visible"}}};if(hasMargin(e))return HTMLResult.success({name:"div",attributes:{style:{display:"inline"\ ,width:"100%",height:"100%"}},children:[u]});u.attributes.style.position="absolute";return HTMLResult.success(u)}}class Linear extends XFAObject{constructor(e){super(Go,"linear",!0);this.id=e.id||"";this.type=getStringOption(e.type,["toRight","toBottom","toLeft","toTop"]);this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[ho](e){e=e?e[ho]():"#FFFFFF";return`linear-gradient(${this.type.replace(/([RBLT])/," $1").toLowerCase()}, ${e}, ${this.color?this.color[ho]():"#000\ 000"})`}}class LockDocument extends ContentObject{constructor(e){super(Go,"lockDocument");this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||""}[hs](){this[ss]=getStringOption(this[ss],["auto","0","1"])}}class Manifest extends XFAObject{constructor(e){super(Go,"manifest",!0);this.action=getStringOption(e.action,["include","all","exclude"]);this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||"";this.ex\ tras=null;this.ref=new XFAObjectArray}}class Margin extends XFAObject{constructor(e){super(Go,"margin",!0);this.bottomInset=getMeasurement(e.bottomInset,"0");this.id=e.id||"";this.leftInset=getMeasurement(e.leftInset,"0");this.rightInset=getMeasurement(e.rightInset,"0");this.topInset=getMeasurement(e.topInset,"0");this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}[ho](){return{margin:measureToString(this.topInset)+" "+measureToString(this.rightInset)+" "+measureToString(this.bottomI\ nset)+" "+measureToString(this.leftInset)}}}class Mdp extends XFAObject{constructor(e){super(Go,"mdp");this.id=e.id||"";this.permissions=getInteger({data:e.permissions,defaultValue:2,validate:e=>1===e||3===e});this.signatureType=getStringOption(e.signatureType,["filler","author"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Medium extends XFAObject{constructor(e){super(Go,"medium");this.id=e.id||"";this.imagingBBox=function getBBox(e){const t=-1;if(!e)return{x:t,y:t,width:t,height:t};co\ nst a=e.split(",",4).map((e=>getMeasurement(e.trim(),"-1")));if(a.length<4||a[2]<0||a[3]<0)return{x:t,y:t,width:t,height:t};const[r,i,n,s]=a;return{x:r,y:i,width:n,height:s}}(e.imagingBBox);this.long=getMeasurement(e.long);this.orientation=getStringOption(e.orientation,["portrait","landscape"]);this.short=getMeasurement(e.short);this.stock=e.stock||"";this.trayIn=getStringOption(e.trayIn,["auto","delegate","pageFront"]);this.trayOut=getStringOption(e.trayOut,["auto","delegate"]);this.use=e.use||\ "";this.usehref=e.usehref||""}}class Message extends XFAObject{constructor(e){super(Go,"message",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.text=new XFAObjectArray}}class NumericEdit extends XFAObject{constructor(e){super(Go,"numericEdit",!0);this.hScrollPolicy=getStringOption(e.hScrollPolicy,["auto","off","on"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.comb=null;this.extras=null;this.margin=null}[co](e){const t=toStyle(thi\ s,"border","font","margin"),a=this[vs]()[vs](),r={name:"input",attributes:{type:"text",fieldId:a[uo],dataId:a[os]?.[uo]||a[uo],class:["xfaTextfield"],style:t,"aria-label":ariaLabel(a),"aria-required":!1}};if(isRequired(a)){r.attributes["aria-required"]=!0;r.attributes.required=!0}return HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[r]})}}class Occur extends XFAObject{constructor(e){super(Go,"occur",!0);this.id=e.id||"";this.initial=""!==e.initial?getInteger({data:e.i\ nitial,defaultValue:"",validate:e=>!0}):"";this.max=""!==e.max?getInteger({data:e.max,defaultValue:1,validate:e=>!0}):"";this.min=""!==e.min?getInteger({data:e.min,defaultValue:1,validate:e=>!0}):"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}[ts](){const e=this[vs](),t=this.min;""===this.min&&(this.min=e instanceof PageArea||e instanceof PageSet?0:1);""===this.max&&(this.max=""===t?e instanceof PageArea||e instanceof PageSet?-1:1:this.min);-1!==this.max&&this.max!0});this.name=e.name||"";this.numbered=getInteger({data:e.numbered,defaultValue:1,validate:e=>!0});this.oddOrEven=getStringOption(e.oddOrEven,["any","even","odd"]);this.pagePosition=getStringOption(e.pagePosition,["any","first","last","only","rest"]);this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.desc=null;thi\ s.extras=null;this.medium=null;this.occur=null;this.area=new XFAObjectArray;this.contentArea=new XFAObjectArray;this.draw=new XFAObjectArray;this.exclGroup=new XFAObjectArray;this.field=new XFAObjectArray;this.subform=new XFAObjectArray}[Xs](){if(!this[ls]){this[ls]={numberOfUse:0};return!0}return!this.occur||-1===this.occur.max||this[ls].numberOfUsee.oddOrEven===t&&e.pagePosition===a));if(r)return r;r=this.pageArea.children.find((e=>"any"===e.oddOrEven&&e.pagePosition===a));if(r)return r;r=this.pageArea.children.find((e=>"any"===e.oddOrEven&&"any"===e.pagePosition));return r||this.pageArea.children[0]}}class Para extends XFAObject{constructor\ (e){super(Go,"para",!0);this.hAlign=getStringOption(e.hAlign,["left","center","justify","justifyAll","radix","right"]);this.id=e.id||"";this.lineHeight=e.lineHeight?getMeasurement(e.lineHeight,"0pt"):"";this.marginLeft=e.marginLeft?getMeasurement(e.marginLeft,"0pt"):"";this.marginRight=e.marginRight?getMeasurement(e.marginRight,"0pt"):"";this.orphans=getInteger({data:e.orphans,defaultValue:0,validate:e=>e>=0});this.preserve=e.preserve||"";this.radixOffset=e.radixOffset?getMeasurement(e.radixOffs\ et,"0pt"):"";this.spaceAbove=e.spaceAbove?getMeasurement(e.spaceAbove,"0pt"):"";this.spaceBelow=e.spaceBelow?getMeasurement(e.spaceBelow,"0pt"):"";this.tabDefault=e.tabDefault?getMeasurement(this.tabDefault):"";this.tabStops=(e.tabStops||"").trim().split(/\\s+/).map(((e,t)=>t%2==1?getMeasurement(e):e));this.textIndent=e.textIndent?getMeasurement(e.textIndent,"0pt"):"";this.use=e.use||"";this.usehref=e.usehref||"";this.vAlign=getStringOption(e.vAlign,["top","bottom","middle"]);this.widows=getInteg\ er({data:e.widows,defaultValue:0,validate:e=>e>=0});this.hyphenation=null}[ho](){const e=toStyle(this,"hAlign");""!==this.marginLeft&&(e.paddingLeft=measureToString(this.marginLeft));""!==this.marginRight&&(e.paddingRight=measureToString(this.marginRight));""!==this.spaceAbove&&(e.paddingTop=measureToString(this.spaceAbove));""!==this.spaceBelow&&(e.paddingBottom=measureToString(this.spaceBelow));if(""!==this.textIndent){e.textIndent=measureToString(this.textIndent);fixTextIndent(e)}this.lineHei\ ght>0&&(e.lineHeight=measureToString(this.lineHeight));""!==this.tabDefault&&(e.tabSize=measureToString(this.tabDefault));this.tabStops.length;this.hyphenatation&&Object.assign(e,this.hyphenatation[ho]());return e}}class PasswordEdit extends XFAObject{constructor(e){super(Go,"passwordEdit",!0);this.hScrollPolicy=getStringOption(e.hScrollPolicy,["auto","off","on"]);this.id=e.id||"";this.passwordChar=e.passwordChar||"*";this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.extras=nul\ l;this.margin=null}}class template_Pattern extends XFAObject{constructor(e){super(Go,"pattern",!0);this.id=e.id||"";this.type=getStringOption(e.type,["crossHatch","crossDiagonal","diagonalLeft","diagonalRight","horizontal","vertical"]);this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[ho](e){e=e?e[ho]():"#FFFFFF";const t=this.color?this.color[ho]():"#000000",a="repeating-linear-gradient",r=`${e},${e} 5px,${t} 5px,${t} 10px`;switch(this.type){case"crossHatch":return`\ ${a}(to top,${r}) ${a}(to right,${r})`;case"crossDiagonal":return`${a}(45deg,${r}) ${a}(-45deg,${r})`;case"diagonalLeft":return`${a}(45deg,${r})`;case"diagonalRight":return`${a}(-45deg,${r})`;case"horizontal":return`${a}(to top,${r})`;case"vertical":return`${a}(to right,${r})`}return""}}class Picture extends StringObject{constructor(e){super(Go,"picture");this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Proto extends XFAObject{constructor(e){super(Go,"proto",!0);this.appeara\ nceFilter=new XFAObjectArray;this.arc=new XFAObjectArray;this.area=new XFAObjectArray;this.assist=new XFAObjectArray;this.barcode=new XFAObjectArray;this.bindItems=new XFAObjectArray;this.bookend=new XFAObjectArray;this.boolean=new XFAObjectArray;this.border=new XFAObjectArray;this.break=new XFAObjectArray;this.breakAfter=new XFAObjectArray;this.breakBefore=new XFAObjectArray;this.button=new XFAObjectArray;this.calculate=new XFAObjectArray;this.caption=new XFAObjectArray;this.certificate=new XFA\ ObjectArray;this.certificates=new XFAObjectArray;this.checkButton=new XFAObjectArray;this.choiceList=new XFAObjectArray;this.color=new XFAObjectArray;this.comb=new XFAObjectArray;this.connect=new XFAObjectArray;this.contentArea=new XFAObjectArray;this.corner=new XFAObjectArray;this.date=new XFAObjectArray;this.dateTime=new XFAObjectArray;this.dateTimeEdit=new XFAObjectArray;this.decimal=new XFAObjectArray;this.defaultUi=new XFAObjectArray;this.desc=new XFAObjectArray;this.digestMethod=new XFAObj\ ectArray;this.digestMethods=new XFAObjectArray;this.draw=new XFAObjectArray;this.edge=new XFAObjectArray;this.encoding=new XFAObjectArray;this.encodings=new XFAObjectArray;this.encrypt=new XFAObjectArray;this.encryptData=new XFAObjectArray;this.encryption=new XFAObjectArray;this.encryptionMethod=new XFAObjectArray;this.encryptionMethods=new XFAObjectArray;this.event=new XFAObjectArray;this.exData=new XFAObjectArray;this.exObject=new XFAObjectArray;this.exclGroup=new XFAObjectArray;this.execute=n\ ew XFAObjectArray;this.extras=new XFAObjectArray;this.field=new XFAObjectArray;this.fill=new XFAObjectArray;this.filter=new XFAObjectArray;this.float=new XFAObjectArray;this.font=new XFAObjectArray;this.format=new XFAObjectArray;this.handler=new XFAObjectArray;this.hyphenation=new XFAObjectArray;this.image=new XFAObjectArray;this.imageEdit=new XFAObjectArray;this.integer=new XFAObjectArray;this.issuers=new XFAObjectArray;this.items=new XFAObjectArray;this.keep=new XFAObjectArray;this.keyUsage=ne\ w XFAObjectArray;this.line=new XFAObjectArray;this.linear=new XFAObjectArray;this.lockDocument=new XFAObjectArray;this.manifest=new XFAObjectArray;this.margin=new XFAObjectArray;this.mdp=new XFAObjectArray;this.medium=new XFAObjectArray;this.message=new XFAObjectArray;this.numericEdit=new XFAObjectArray;this.occur=new XFAObjectArray;this.oid=new XFAObjectArray;this.oids=new XFAObjectArray;this.overflow=new XFAObjectArray;this.pageArea=new XFAObjectArray;this.pageSet=new XFAObjectArray;this.para=\ new XFAObjectArray;this.passwordEdit=new XFAObjectArray;this.pattern=new XFAObjectArray;this.picture=new XFAObjectArray;this.radial=new XFAObjectArray;this.reason=new XFAObjectArray;this.reasons=new XFAObjectArray;this.rectangle=new XFAObjectArray;this.ref=new XFAObjectArray;this.script=new XFAObjectArray;this.setProperty=new XFAObjectArray;this.signData=new XFAObjectArray;this.signature=new XFAObjectArray;this.signing=new XFAObjectArray;this.solid=new XFAObjectArray;this.speak=new XFAObjectArra\ y;this.stipple=new XFAObjectArray;this.subform=new XFAObjectArray;this.subformSet=new XFAObjectArray;this.subjectDN=new XFAObjectArray;this.subjectDNs=new XFAObjectArray;this.submit=new XFAObjectArray;this.text=new XFAObjectArray;this.textEdit=new XFAObjectArray;this.time=new XFAObjectArray;this.timeStamp=new XFAObjectArray;this.toolTip=new XFAObjectArray;this.traversal=new XFAObjectArray;this.traverse=new XFAObjectArray;this.ui=new XFAObjectArray;this.validate=new XFAObjectArray;this.value=new \ XFAObjectArray;this.variables=new XFAObjectArray}}class Radial extends XFAObject{constructor(e){super(Go,"radial",!0);this.id=e.id||"";this.type=getStringOption(e.type,["toEdge","toCenter"]);this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[ho](e){e=e?e[ho]():"#FFFFFF";const t=this.color?this.color[ho]():"#000000";return`radial-gradient(circle at center, ${"toEdge"===this.type?`${e},${t}`:`${t},${e}`})`}}class Reason extends StringObject{constructor(e){super(Go,"rea\ son");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Reasons extends XFAObject{constructor(e){super(Go,"reasons",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.reason=new XFAObjectArray}}class Rectangle extends XFAObject{constructor(e){super(Go,"rectangle",!0);this.hand=getStringOption(e.hand,["even","left","right"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.use\ href||"";this.corner=new XFAObjectArray(4);this.edge=new XFAObjectArray(4);this.fill=null}[co](){const e=this.edge.children.length?this.edge.children[0]:new Edge({}),t=e[ho](),a=Object.create(null);"visible"===this.fill?.presence?Object.assign(a,this.fill[ho]()):a.fill="transparent";a.strokeWidth=measureToString("visible"===e.presence?e.thickness:0);a.stroke=t.color;const r=(this.corner.children.length?this.corner.children[0]:new Corner({}))[ho](),i={name:"svg",children:[{name:"rect",attributes:\ {xmlns:Vo,width:"100%",height:"100%",x:0,y:0,rx:r.radius,ry:r.radius,style:a}}],attributes:{xmlns:Vo,style:{overflow:"visible"},width:"100%",height:"100%"}};if(hasMargin(this[vs]()[vs]()))return HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[i]});i.attributes.style.position="absolute";return HTMLResult.success(i)}}class RefElement extends StringObject{constructor(e){super(Go,"ref");this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehr\ ef||""}}class Script extends StringObject{constructor(e){super(Go,"script");this.binding=e.binding||"";this.contentType=e.contentType||"";this.id=e.id||"";this.name=e.name||"";this.runAt=getStringOption(e.runAt,["client","both","server"]);this.use=e.use||"";this.usehref=e.usehref||""}}class SetProperty extends XFAObject{constructor(e){super(Go,"setProperty");this.connection=e.connection||"";this.ref=e.ref||"";this.target=e.target||""}}class SignData extends XFAObject{constructor(e){super(Go,"sig\ nData",!0);this.id=e.id||"";this.operation=getStringOption(e.operation,["sign","clear","verify"]);this.ref=e.ref||"";this.target=e.target||"";this.use=e.use||"";this.usehref=e.usehref||"";this.filter=null;this.manifest=null}}class Signature extends XFAObject{constructor(e){super(Go,"signature",!0);this.id=e.id||"";this.type=getStringOption(e.type,["PDF1.3","PDF1.6"]);this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.extras=null;this.filter=null;this.manifest=null;this.margin=nu\ ll}}class Signing extends XFAObject{constructor(e){super(Go,"signing",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.certificate=new XFAObjectArray}}class Solid extends XFAObject{constructor(e){super(Go,"solid",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}[ho](e){return e?e[ho]():"#FFFFFF"}}class Speak extends StringObject{constructor(e){super(Go,"speak");this.disable=getInte\ ger({data:e.disable,defaultValue:0,validate:e=>1===e});this.id=e.id||"";this.priority=getStringOption(e.priority,["custom","caption","name","toolTip"]);this.rid=e.rid||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Stipple extends XFAObject{constructor(e){super(Go,"stipple",!0);this.id=e.id||"";this.rate=getInteger({data:e.rate,defaultValue:50,validate:e=>e>=0&&e<=100});this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[ho](e){const t=this.rate/100;return Ut\ il.makeHexColor(Math.round(e.value.r*(1-t)+this.value.r*t),Math.round(e.value.g*(1-t)+this.value.g*t),Math.round(e.value.b*(1-t)+this.value.b*t))}}class Subform extends XFAObject{constructor(e){super(Go,"subform",!0);this.access=getStringOption(e.access,["open","nonInteractive","protected","readOnly"]);this.allowMacro=getInteger({data:e.allowMacro,defaultValue:0,validate:e=>1===e});this.anchorType=getStringOption(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","m\ iddleLeft","middleRight","topCenter","topRight"]);this.colSpan=getInteger({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e});this.columnWidths=(e.columnWidths||"").trim().split(/\\s+/).map((e=>"-1"===e?-1:getMeasurement(e)));this.h=e.h?getMeasurement(e.h):"";this.hAlign=getStringOption(e.hAlign,["left","center","justify","justifyAll","radix","right"]);this.id=e.id||"";this.layout=getStringOption(e.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]);this.locale=e.locale||"";thi\ s.maxH=getMeasurement(e.maxH,"0pt");this.maxW=getMeasurement(e.maxW,"0pt");this.mergeMode=getStringOption(e.mergeMode,["consumeData","matchTemplate"]);this.minH=getMeasurement(e.minH,"0pt");this.minW=getMeasurement(e.minW,"0pt");this.name=e.name||"";this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.relevant=getRelevant(e.relevant);this.restoreState=getStringOption(e.restoreState,["manual","auto"]);this.scope=getStringOption(e.scope,["name","none"]);this.u\ se=e.use||"";this.usehref=e.usehref||"";this.w=e.w?getMeasurement(e.w):"";this.x=getMeasurement(e.x,"0pt");this.y=getMeasurement(e.y,"0pt");this.assist=null;this.bind=null;this.bookend=null;this.border=null;this.break=null;this.calculate=null;this.desc=null;this.extras=null;this.keep=null;this.margin=null;this.occur=null;this.overflow=null;this.pageSet=null;this.para=null;this.traversal=null;this.validate=null;this.variables=null;this.area=new XFAObjectArray;this.breakAfter=new XFAObjectArray;th\ is.breakBefore=new XFAObjectArray;this.connect=new XFAObjectArray;this.draw=new XFAObjectArray;this.event=new XFAObjectArray;this.exObject=new XFAObjectArray;this.exclGroup=new XFAObjectArray;this.field=new XFAObjectArray;this.proto=new XFAObjectArray;this.setProperty=new XFAObjectArray;this.subform=new XFAObjectArray;this.subformSet=new XFAObjectArray}[Cs](){const e=this[vs]();return e instanceof SubformSet?e[Cs]():e}[Rs](){return!0}[_s](){return this.layout.endsWith("-tb")&&0===this[ls].attemp\ t&&this[ls].numberInLine>0||this[vs]()[_s]()}*[As](){yield*getContainedChildren(this)}[us](){return flushHTML(this)}[Zn](e,t){addHTML(this,e,t)}[gs](){return getAvailableSpace(this)}[js](){const e=this[Cs]();if(!e[js]())return!1;if(void 0!==this[ls]._isSplittable)return this[ls]._isSplittable;if("position"===this.layout||this.layout.includes("row")){this[ls]._isSplittable=!1;return!1}if(this.keep&&"none"!==this.keep.intact){this[ls]._isSplittable=!1;return!1}if(e.layout?.endsWith("-tb")&&0!==e[l\ s].numberInLine)return!1;this[ls]._isSplittable=!0;return!0}[co](e){setTabIndex(this);if(this.break){if("auto"!==this.break.after||""!==this.break.afterTarget){const e=new BreakAfter({targetType:this.break.after,target:this.break.afterTarget,startNew:this.break.startNew.toString()});e[Is]=this[Is];this[Qn](e);this.breakAfter.push(e)}if("auto"!==this.break.before||""!==this.break.beforeTarget){const e=new BreakBefore({targetType:this.break.before,target:this.break.beforeTarget,startNew:this.break\ .startNew.toString()});e[Is]=this[Is];this[Qn](e);this.breakBefore.push(e)}if(""!==this.break.overflowTarget){const e=new Overflow({target:this.break.overflowTarget,leader:this.break.overflowLeader,trailer:this.break.overflowTrailer});e[Is]=this[Is];this[Qn](e);this.overflow.push(e)}this[Zs](this.break);this.break=null}if("hidden"===this.presence||"inactive"===this.presence)return HTMLResult.EMPTY;(this.breakBefore.children.length>1||this.breakAfter.children.length>1)&&warn("XFA - Several breakB\ efore or breakAfter in subforms: please file a bug.");if(this.breakBefore.children.length>=1){const e=this.breakBefore.children[0];if(handleBreak(e))return HTMLResult.breakNode(e)}if(this[ls]?.afterBreakAfter)return HTMLResult.EMPTY;fixDimensions(this);const t=[],a={id:this[uo],class:[]};setAccess(this,a.class);this[ls]||=Object.create(null);Object.assign(this[ls],{children:t,line:null,attributes:a,attempt:0,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,e.width),height:Math.min(this.\ h||1/0,e.height)},width:0,height:0,prevHeight:0,currentWidth:0});const r=this[Fs](),i=r[ls].noLayoutFailure,n=this[js]();n||setFirstUnsplittable(this);if(!checkDimensions(this,e))return HTMLResult.FAILURE;const s=new Set(["area","draw","exclGroup","field","subform","subformSet"]);if(this.layout.includes("row")){const e=this[Cs]().columnWidths;if(Array.isArray(e)&&e.length>0){this[ls].columnWidths=e;this[ls].currentColumn=0}}const o=toStyle(this,"anchorType","dimensions","position","presence","bo\ rder","margin","hAlign"),c=["xfaSubform"],l=layoutClass(this);l&&c.push(l);a.style=o;a.class=c;this.name&&(a.xfaName=this.name);if(this.overflow){const t=this.overflow[ws]();if(t.addLeader){t.addLeader=!1;handleOverflow(this,t.leader,e)}}this[Ys]();const h="lr-tb"===this.layout||"rl-tb"===this.layout,u=h?2:1;for(;this[ls].attempt=1){const e=this.breakAfter.children[0];if(\ handleBreak(e)){this[ls].afterBreakAfter=y;return HTMLResult.breakNode(e)}}delete this[ls];return y}}class SubformSet extends XFAObject{constructor(e){super(Go,"subformSet",!0);this.id=e.id||"";this.name=e.name||"";this.relation=getStringOption(e.relation,["ordered","choice","unordered"]);this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.bookend=null;this.break=null;this.desc=null;this.extras=null;this.occur=null;this.overflow=null;this.breakAfter=new XFAOb\ jectArray;this.breakBefore=new XFAObjectArray;this.subform=new XFAObjectArray;this.subformSet=new XFAObjectArray}*[As](){yield*getContainedChildren(this)}[Cs](){let e=this[vs]();for(;!(e instanceof Subform);)e=e[vs]();return e}[Rs](){return!0}}class SubjectDN extends ContentObject{constructor(e){super(Go,"subjectDN");this.delimiter=e.delimiter||",";this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[hs](){this[ss]=new Map(this[ss].split(this.delimiter).map((e=>{(\ e=e.split("=",2))[0]=e[0].trim();return e})))}}class SubjectDNs extends XFAObject{constructor(e){super(Go,"subjectDNs",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.subjectDN=new XFAObjectArray}}class Submit extends XFAObject{constructor(e){super(Go,"submit",!0);this.embedPDF=getInteger({data:e.embedPDF,defaultValue:0,validate:e=>1===e});this.format=getStringOption(e.format,["xdp","formdata","pdf","urlencoded","x\ fd","xml"]);this.id=e.id||"";this.target=e.target||"";this.textEncoding=getKeyword({data:e.textEncoding?e.textEncoding.toLowerCase():"",defaultValue:"",validate:e=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(e)||e.match(/iso-8859-\\d{2}/)});this.use=e.use||"";this.usehref=e.usehref||"";this.xdpContent=e.xdpContent||"";this.encrypt=null;this.encryptData=new XFAObjectArray;this.signData=new XFAObjectArray}}class Template ext\ ends XFAObject{constructor(e){super(Go,"template",!0);this.baseProfile=getStringOption(e.baseProfile,["full","interactiveForms"]);this.extras=null;this.subform=new XFAObjectArray}[hs](){0===this.subform.children.length&&warn("XFA - No subforms in template node.");this.subform.children.length>=2&&warn("XFA - Several subforms in template node: please file a bug.");this[no]=5e3}[js](){return!0}[to](e,t){return e.startsWith("#")?[this[Os].get(e.slice(1))]:searchNode(this,t,e,!0,!0)}*[oo](){if(!this.\ subform.children.length)return HTMLResult.success({name:"div",children:[]});this[ls]={overflowNode:null,firstUnsplittable:null,currentContentArea:null,currentPageArea:null,noLayoutFailure:!1,pageNumber:1,pagePosition:"first",oddOrEven:"odd",blankOrNotBlank:"nonBlank",paraStack:[]};const e=this.subform.children[0];e.pageSet[as]();const t=e.pageSet.pageArea.children,a={name:"div",children:[]};let r=null,i=null,n=null;if(e.breakBefore.children.length>=1){i=e.breakBefore.children[0];n=i.target}else \ if(e.subform.children.length>=1&&e.subform.children[0].breakBefore.children.length>=1){i=e.subform.children[0].breakBefore.children[0];n=i.target}else if(e.break?.beforeTarget){i=e.break;n=i.beforeTarget}else if(e.subform.children.length>=1&&e.subform.children[0].break?.beforeTarget){i=e.subform.children[0].break;n=i.beforeTarget}if(i){const e=this[to](n,i[vs]());if(e instanceof PageArea){r=e;i[ls]={}}}r||=t[0];r[ls]={numberOfUse:1};const s=r[vs]();s[ls]={numberOfUse:1,pageIndex:s.pageArea.child\ ren.indexOf(r),pageSetIndex:0};let o,c=null,l=null,h=!0,u=0,d=0;for(;;){if(h)u=0;else{a.children.pop();if(3==++u){warn("XFA - Something goes wrong: please file a bug.");return a}}o=null;this[ls].currentPageArea=r;const t=r[co]().html;a.children.push(t);if(c){this[ls].noLayoutFailure=!0;t.children.push(c[co](r[ls].space).html);c=null}if(l){this[ls].noLayoutFailure=!0;t.children.push(l[co](r[ls].space).html);l=null}const i=r.contentArea.children,n=t.children.filter((e=>e.attributes.class.includes(\ "xfaContentarea")));h=!1;this[ls].firstUnsplittable=null;this[ls].noLayoutFailure=!1;const flush=t=>{const a=e[us]();if(a){h||=a.children?.length>0;n[t].children.push(a)}};for(let t=d,r=i.length;t0;n[t].children.push(u.html)}else!h&&a.children.length>1&&a.ch\ ildren.pop();return a}if(u.isBreak()){const e=u.breakNode;flush(t);if("auto"===e.targetType)continue;if(e.leader){c=this[to](e.leader,e[vs]());c=c?c[0]:null}if(e.trailer){l=this[to](e.trailer,e[vs]());l=l?l[0]:null}if("pageArea"===e.targetType){o=e[ls].target;t=1/0}else if(e[ls].target){o=e[ls].target;d=e[ls].index+1;t=1/0}else t=e[ls].index}else if(this[ls].overflowNode){const e=this[ls].overflowNode;this[ls].overflowNode=null;const a=e[ws](),r=a.target;a.addLeader=null!==a.leader;a.addTrailer=\ null!==a.trailer;flush(t);const n=t;t=1/0;if(r instanceof PageArea)o=r;else if(r instanceof ContentArea){const e=i.indexOf(r);if(-1!==e)e>n?t=e-1:d=e;else{o=r[vs]();d=o.contentArea.children.indexOf(r)}}}else flush(t)}this[ls].pageNumber+=1;o&&(o[Xs]()?o[ls].numberOfUse+=1:o=null);r=o||r[ks]();yield null}}}class Text extends ContentObject{constructor(e){super(Go,"text");this.id=e.id||"";this.maxChars=getInteger({data:e.maxChars,defaultValue:0,validate:e=>e>=0});this.name=e.name||"";this.rid=e.rid\ ||"";this.use=e.use||"";this.usehref=e.usehref||""}[Yn](){return!0}[$s](e){if(e[Hs]===go.xhtml.id){this[ss]=e;return!0}warn(`XFA - Invalid content in Text: ${e[Ws]}.`);return!1}[Vs](e){this[ss]instanceof XFAObject||super[Vs](e)}[hs](){"string"==typeof this[ss]&&(this[ss]=this[ss].replaceAll("\\r\\n","\\n"))}[ws](){return"string"==typeof this[ss]?this[ss].split(/[\\u2029\\u2028\\n]/).filter((e=>!!e)).join("\\n"):this[ss][so]()}[co](e){if("string"==typeof this[ss]){const e=valueToHtml(this[ss]).html;if(t\ his[ss].includes("\\u2029")){e.name="div";e.children=[];this[ss].split("\\u2029").map((e=>e.split(/[\\u2028\\n]/).flatMap((e=>[{name:"span",value:e},{name:"br"}])))).forEach((t=>{e.children.push({name:"p",children:t})}))}else if(/[\\u2028\\n]/.test(this[ss])){e.name="div";e.children=[];this[ss].split(/[\\u2028\\n]/).forEach((t=>{e.children.push({name:"span",value:t},{name:"br"})}))}return HTMLResult.success(e)}return this[ss][co](e)}}class TextEdit extends XFAObject{constructor(e){super(Go,"textEdit",!0\ );this.allowRichText=getInteger({data:e.allowRichText,defaultValue:0,validate:e=>1===e});this.hScrollPolicy=getStringOption(e.hScrollPolicy,["auto","off","on"]);this.id=e.id||"";this.multiLine=getInteger({data:e.multiLine,defaultValue:"",validate:e=>0===e||1===e});this.use=e.use||"";this.usehref=e.usehref||"";this.vScrollPolicy=getStringOption(e.vScrollPolicy,["auto","off","on"]);this.border=null;this.comb=null;this.extras=null;this.margin=null}[co](e){const t=toStyle(this,"border","font","margi\ n");let a;const r=this[vs]()[vs]();""===this.multiLine&&(this.multiLine=r instanceof Draw?1:0);a=1===this.multiLine?{name:"textarea",attributes:{dataId:r[os]?.[uo]||r[uo],fieldId:r[uo],class:["xfaTextfield"],style:t,"aria-label":ariaLabel(r),"aria-required":!1}}:{name:"input",attributes:{type:"text",dataId:r[os]?.[uo]||r[uo],fieldId:r[uo],class:["xfaTextfield"],style:t,"aria-label":ariaLabel(r),"aria-required":!1}};if(isRequired(r)){a.attributes["aria-required"]=!0;a.attributes.required=!0}retur\ n HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[a]})}}class Time extends StringObject{constructor(e){super(Go,"time");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[hs](){const e=this[ss].trim();this[ss]=e?new Date(e):null}[co](e){return valueToHtml(this[ss]?this[ss].toString():"")}}class TimeStamp extends XFAObject{constructor(e){super(Go,"timeStamp");this.id=e.id||"";this.server=e.server||"";this.type=getStringOption(e.type,["o\ ptional","required"]);this.use=e.use||"";this.usehref=e.usehref||""}}class ToolTip extends StringObject{constructor(e){super(Go,"toolTip");this.id=e.id||"";this.rid=e.rid||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Traversal extends XFAObject{constructor(e){super(Go,"traversal",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.traverse=new XFAObjectArray}}class Traverse extends XFAObject{constructor(e){super(Go,"traverse",!0);this.id=e.id||"";t\ his.operation=getStringOption(e.operation,["next","back","down","first","left","right","up"]);this.ref=e.ref||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.script=null}get name(){return this.operation}[Us](){return!1}}class Ui extends XFAObject{constructor(e){super(Go,"ui",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.picture=null;this.barcode=null;this.button=null;this.checkButton=null;this.choiceList=null;this.dateTimeEdit=nul\ l;this.defaultUi=null;this.imageEdit=null;this.numericEdit=null;this.passwordEdit=null;this.signature=null;this.textEdit=null}[ws](){if(void 0===this[ls]){for(const e of Object.getOwnPropertyNames(this)){if("extras"===e||"picture"===e)continue;const t=this[e];if(t instanceof XFAObject){this[ls]=t;return t}}this[ls]=null}return this[ls]}[co](e){const t=this[ws]();return t?t[co](e):HTMLResult.EMPTY}}class Validate extends XFAObject{constructor(e){super(Go,"validate",!0);this.formatTest=getStringOp\ tion(e.formatTest,["warning","disabled","error"]);this.id=e.id||"";this.nullTest=getStringOption(e.nullTest,["disabled","error","warning"]);this.scriptTest=getStringOption(e.scriptTest,["error","disabled","warning"]);this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.message=null;this.picture=null;this.script=null}}class Value extends XFAObject{constructor(e){super(Go,"value",!0);this.id=e.id||"";this.override=getInteger({data:e.override,defaultValue:0,validate:e=>1===e});this.r\ elevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.arc=null;this.boolean=null;this.date=null;this.dateTime=null;this.decimal=null;this.exData=null;this.float=null;this.image=null;this.integer=null;this.line=null;this.rectangle=null;this.text=null;this.time=null}[io](e){const t=this[vs]();if(t instanceof Field&&t.ui?.imageEdit){if(!this.image){this.image=new Image({});this[Qn](this.image)}this.image[ss]=e[ss];return}const a=e[Ws];if(null===this[a]){for(const e of O\ bject.getOwnPropertyNames(this)){const t=this[e];if(t instanceof XFAObject){this[e]=null;this[Zs](t)}}this[e[Ws]]=e;this[Qn](e)}else this[a][ss]=e[ss]}[so](){if(this.exData)return"string"==typeof this.exData[ss]?this.exData[ss].trim():this.exData[ss][so]().trim();for(const e of Object.getOwnPropertyNames(this)){if("image"===e)continue;const t=this[e];if(t instanceof XFAObject)return(t[ss]||"").toString().trim()}return null}[co](e){for(const t of Object.getOwnPropertyNames(this)){const a=this[t];\ if(a instanceof XFAObject)return a[co](e)}return HTMLResult.EMPTY}}class Variables extends XFAObject{constructor(e){super(Go,"variables",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.boolean=new XFAObjectArray;this.date=new XFAObjectArray;this.dateTime=new XFAObjectArray;this.decimal=new XFAObjectArray;this.exData=new XFAObjectArray;this.float=new XFAObjectArray;this.image=new XFAObjectArray;this.integer=new XFAObjectArray;this.manifest=new XFAObjectArray;this.script=ne\ w XFAObjectArray;this.text=new XFAObjectArray;this.time=new XFAObjectArray}[Us](){return!0}}class TemplateNamespace{static[fo](e,t){if(TemplateNamespace.hasOwnProperty(e)){const a=TemplateNamespace[e](t);a[ro](t);return a}}static appearanceFilter(e){return new AppearanceFilter(e)}static arc(e){return new Arc(e)}static area(e){return new Area(e)}static assist(e){return new Assist(e)}static barcode(e){return new Barcode(e)}static bind(e){return new Bind(e)}static bindItems(e){return new BindItems(\ e)}static bookend(e){return new Bookend(e)}static boolean(e){return new BooleanElement(e)}static border(e){return new Border(e)}static break(e){return new Break(e)}static breakAfter(e){return new BreakAfter(e)}static breakBefore(e){return new BreakBefore(e)}static button(e){return new Button(e)}static calculate(e){return new Calculate(e)}static caption(e){return new Caption(e)}static certificate(e){return new Certificate(e)}static certificates(e){return new Certificates(e)}static checkButton(e){\ return new CheckButton(e)}static choiceList(e){return new ChoiceList(e)}static color(e){return new Color(e)}static comb(e){return new Comb(e)}static connect(e){return new Connect(e)}static contentArea(e){return new ContentArea(e)}static corner(e){return new Corner(e)}static date(e){return new DateElement(e)}static dateTime(e){return new DateTime(e)}static dateTimeEdit(e){return new DateTimeEdit(e)}static decimal(e){return new Decimal(e)}static defaultUi(e){return new DefaultUi(e)}static desc(e){\ return new Desc(e)}static digestMethod(e){return new DigestMethod(e)}static digestMethods(e){return new DigestMethods(e)}static draw(e){return new Draw(e)}static edge(e){return new Edge(e)}static encoding(e){return new Encoding(e)}static encodings(e){return new Encodings(e)}static encrypt(e){return new Encrypt(e)}static encryptData(e){return new EncryptData(e)}static encryption(e){return new Encryption(e)}static encryptionMethod(e){return new EncryptionMethod(e)}static encryptionMethods(e){retur\ n new EncryptionMethods(e)}static event(e){return new Event(e)}static exData(e){return new ExData(e)}static exObject(e){return new ExObject(e)}static exclGroup(e){return new ExclGroup(e)}static execute(e){return new Execute(e)}static extras(e){return new Extras(e)}static field(e){return new Field(e)}static fill(e){return new Fill(e)}static filter(e){return new Filter(e)}static float(e){return new Float(e)}static font(e){return new template_Font(e)}static format(e){return new Format(e)}static han\ dler(e){return new Handler(e)}static hyphenation(e){return new Hyphenation(e)}static image(e){return new Image(e)}static imageEdit(e){return new ImageEdit(e)}static integer(e){return new Integer(e)}static issuers(e){return new Issuers(e)}static items(e){return new Items(e)}static keep(e){return new Keep(e)}static keyUsage(e){return new KeyUsage(e)}static line(e){return new Line(e)}static linear(e){return new Linear(e)}static lockDocument(e){return new LockDocument(e)}static manifest(e){return ne\ w Manifest(e)}static margin(e){return new Margin(e)}static mdp(e){return new Mdp(e)}static medium(e){return new Medium(e)}static message(e){return new Message(e)}static numericEdit(e){return new NumericEdit(e)}static occur(e){return new Occur(e)}static oid(e){return new Oid(e)}static oids(e){return new Oids(e)}static overflow(e){return new Overflow(e)}static pageArea(e){return new PageArea(e)}static pageSet(e){return new PageSet(e)}static para(e){return new Para(e)}static passwordEdit(e){return \ new PasswordEdit(e)}static pattern(e){return new template_Pattern(e)}static picture(e){return new Picture(e)}static proto(e){return new Proto(e)}static radial(e){return new Radial(e)}static reason(e){return new Reason(e)}static reasons(e){return new Reasons(e)}static rectangle(e){return new Rectangle(e)}static ref(e){return new RefElement(e)}static script(e){return new Script(e)}static setProperty(e){return new SetProperty(e)}static signData(e){return new SignData(e)}static signature(e){return n\ ew Signature(e)}static signing(e){return new Signing(e)}static solid(e){return new Solid(e)}static speak(e){return new Speak(e)}static stipple(e){return new Stipple(e)}static subform(e){return new Subform(e)}static subformSet(e){return new SubformSet(e)}static subjectDN(e){return new SubjectDN(e)}static subjectDNs(e){return new SubjectDNs(e)}static submit(e){return new Submit(e)}static template(e){return new Template(e)}static text(e){return new Text(e)}static textEdit(e){return new TextEdit(e)}\ static time(e){return new Time(e)}static timeStamp(e){return new TimeStamp(e)}static toolTip(e){return new ToolTip(e)}static traversal(e){return new Traversal(e)}static traverse(e){return new Traverse(e)}static ui(e){return new Ui(e)}static validate(e){return new Validate(e)}static value(e){return new Value(e)}static variables(e){return new Variables(e)}}const Zo=go.datasets.id;function createText(e){const t=new Text({});t[ss]=e;return t}class Binder{constructor(e){this.root=e;this.datasets=e.da\ tasets;this.data=e.datasets?.data||new XmlObject(go.datasets.id,"data");this.emptyMerge=0===this.data[Ss]().length;this.root.form=this.form=e.template[is]()}_isConsumeData(){return!this.emptyMerge&&this._mergeMode}_isMatchTemplate(){return!this._isConsumeData()}bind(){this._bindElement(this.form,this.data);return this.form}getData(){return this.data}_bindValue(e,t,a){e[os]=t;if(e[Ts]())if(t[Ns]()){const a=t[ys]();e[io](createText(a))}else if(e instanceof Field&&"multiSelect"===e.ui?.choiceList?.\ open){const a=t[Ss]().map((e=>e[ss].trim())).join("\\n");e[io](createText(a))}else this._isConsumeData()&&warn("XFA - Nodes haven\'t the same type.");else!t[Ns]()||this._isMatchTemplate()?this._bindElement(e,t):warn("XFA - Nodes haven\'t the same type.")}_findDataByNameToConsume(e,t,a,r){if(!e)return null;let i,n;for(let r=0;r<3;r++){i=a[xs](e,!1,!0);for(;;){n=i.next().value;if(!n)break;if(t===n[Ns]())return n}if(a[Hs]===go.datasets.id&&"data"===a[Ws])break;a=a[vs]()}if(!r)return null;i=this.data[x\ s](e,!0,!1);n=i.next().value;if(n)return n;i=this.data[ds](e,!0);n=i.next().value;return n?.[Ns]()?n:null}_setProperties(e,t){if(e.hasOwnProperty("setProperty"))for(const{ref:a,target:r,connection:i}of e.setProperty.children){if(i)continue;if(!a)continue;const n=searchNode(this.root,t,a,!1,!1);if(!n){warn(`XFA - Invalid reference: ${a}.`);continue}const[s]=n;if(!s[Es](this.data)){warn("XFA - Invalid node: must be a data node.");continue}const o=searchNode(this.root,e,r,!1,!1);if(!o){warn(`XFA - \ Invalid target: ${r}.`);continue}const[c]=o;if(!c[Es](e)){warn("XFA - Invalid target: must be a property or subproperty.");continue}const l=c[vs]();if(c instanceof SetProperty||l instanceof SetProperty){warn("XFA - Invalid target: cannot be a setProperty or one of its properties.");continue}if(c instanceof BindItems||l instanceof BindItems){warn("XFA - Invalid target: cannot be a bindItems or one of its properties.");continue}const h=s[so](),u=c[Ws];if(c instanceof XFAAttribute){const e=Object.c\ reate(null);e[u]=h;const t=Reflect.construct(Object.getPrototypeOf(l).constructor,[e]);l[u]=t[u]}else if(c.hasOwnProperty(ss)){c[os]=s;c[ss]=h;c[hs]()}else warn("XFA - Invalid node to use in setProperty")}}_bindItems(e,t){if(!e.hasOwnProperty("items")||!e.hasOwnProperty("bindItems")||e.bindItems.isEmpty())return;for(const t of e.items.children)e[Zs](t);e.items.clear();const a=new Items({}),r=new Items({});e[Qn](a);e.items.push(a);e[Qn](r);e.items.push(r);for(const{ref:i,labelRef:n,valueRef:s,con\ nection:o}of e.bindItems.children){if(o)continue;if(!i)continue;const e=searchNode(this.root,t,i,!1,!1);if(e)for(const t of e){if(!t[Es](this.datasets)){warn(`XFA - Invalid ref (${i}): must be a datasets child.`);continue}const e=searchNode(this.root,t,n,!0,!1);if(!e){warn(`XFA - Invalid label: ${n}.`);continue}const[o]=e;if(!o[Es](this.datasets)){warn("XFA - Invalid label: must be a datasets child.");continue}const c=searchNode(this.root,t,s,!0,!1);if(!c){warn(`XFA - Invalid value: ${s}.`);cont\ inue}const[l]=c;if(!l[Es](this.datasets)){warn("XFA - Invalid value: must be a datasets child.");continue}const h=createText(o[so]()),u=createText(l[so]());a[Qn](h);a.text.push(h);r[Qn](u);r.text.push(u)}else warn(`XFA - Invalid reference: ${i}.`)}}_bindOccurrences(e,t,a){let r;if(t.length>1){r=e[is]();r[Zs](r.occur);r.occur=null}this._bindValue(e,t[0],a);this._setProperties(e,t[0]);this._bindItems(e,t[0]);if(1===t.length)return;const i=e[vs](),n=e[Ws],s=i[Ms](e);for(let e=1,o=t.length;et.name===e.name)).length:a[r].children.length;const n=a[Ms](e)+1,s=t.initial-i;if(s){const t=e[is]();t[Zs](t.occur);t.occur=null;a[r].push(t);a[Ds](n,t);for(let e=1;e0)this._bindOccurrences(r,[e[0]],null);else if(this\ .emptyMerge){const e=t[Hs]===Zo?-1:t[Hs],a=r[os]=new XmlObject(e,r.name||"root");t[Qn](a);this._bindElement(r,a)}continue}if(!r[Rs]())continue;let e=!1,i=null,n=null,s=null;if(r.bind){switch(r.bind.match){case"none":this._setAndBind(r,t);continue;case"global":e=!0;break;case"dataRef":if(!r.bind.ref){warn(`XFA - ref is empty in node ${r[Ws]}.`);this._setAndBind(r,t);continue}n=r.bind.ref}r.bind.picture&&(i=r.bind.picture[ss])}const[o,c]=this._getOccurInfo(r);if(n){s=searchNode(this.root,t,n,!0,!1\ );if(null===s){s=createDataNode(this.data,t,n);if(!s)continue;this._isConsumeData()&&(s[ns]=!0);this._setAndBind(r,s);continue}this._isConsumeData()&&(s=s.filter((e=>!e[ns])));s.length>c?s=s.slice(0,c):0===s.length&&(s=null);s&&this._isConsumeData()&&s.forEach((e=>{e[ns]=!0}))}else{if(!r.name){this._setAndBind(r,t);continue}if(this._isConsumeData()){const a=[];for(;a.length0?a:null}else{s=t[x\ s](r.name,!1,this.emptyMerge).next().value;if(!s){if(0===o){a.push(r);continue}const e=t[Hs]===Zo?-1:t[Hs];s=r[os]=new XmlObject(e,r.name);this.emptyMerge&&(s[ns]=!0);t[Qn](s);this._setAndBind(r,s);continue}this.emptyMerge&&(s[ns]=!0);s=[s]}}s?this._bindOccurrences(r,s,i):o>0?this._setAndBind(r,t):a.push(r)}a.forEach((e=>e[vs]()[Zs](e)))}}class DataHandler{constructor(e,t){this.data=t;this.dataset=e.datasets||null}serialize(e){const t=[[-1,this.data[Ss]()]];for(;t.length>0;){const a=t.at(-1),[r,\ i]=a;if(r+1===i.length){t.pop();continue}const n=i[++a[0]],s=e.get(n[uo]);if(s)n[io](s);else{const t=n[fs]();for(const a of t.values()){const t=e.get(a[uo]);if(t){a[io](t);break}}}const o=n[Ss]();o.length>0&&t.push([-1,o])}const a=[\'\'];if(this.dataset)for(const e of this.dataset[Ss]())"data"!==e[Ws]&&e[lo](a);this.data[lo](a);a.push("");return a.join("")}}const Qo=go.config.id;class Acrobat extends XFAObject{constru\ ctor(e){super(Qo,"acrobat",!0);this.acrobat7=null;this.autoSave=null;this.common=null;this.validate=null;this.validateApprovalSignatures=null;this.submitUrl=new XFAObjectArray}}class Acrobat7 extends XFAObject{constructor(e){super(Qo,"acrobat7",!0);this.dynamicRender=null}}class ADBE_JSConsole extends OptionObject{constructor(e){super(Qo,"ADBE_JSConsole",["delegate","Enable","Disable"])}}class ADBE_JSDebugger extends OptionObject{constructor(e){super(Qo,"ADBE_JSDebugger",["delegate","Enable","Di\ sable"])}}class AddSilentPrint extends Option01{constructor(e){super(Qo,"addSilentPrint")}}class AddViewerPreferences extends Option01{constructor(e){super(Qo,"addViewerPreferences")}}class AdjustData extends Option10{constructor(e){super(Qo,"adjustData")}}class AdobeExtensionLevel extends IntegerObject{constructor(e){super(Qo,"adobeExtensionLevel",0,(e=>e>=1&&e<=8))}}class Agent extends XFAObject{constructor(e){super(Qo,"agent",!0);this.name=e.name?e.name.trim():"";this.common=new XFAObjectArra\ y}}class AlwaysEmbed extends ContentObject{constructor(e){super(Qo,"alwaysEmbed")}}class Amd extends StringObject{constructor(e){super(Qo,"amd")}}class config_Area extends XFAObject{constructor(e){super(Qo,"area");this.level=getInteger({data:e.level,defaultValue:0,validate:e=>e>=1&&e<=3});this.name=getStringOption(e.name,["","barcode","coreinit","deviceDriver","font","general","layout","merge","script","signature","sourceSet","templateCache"])}}class Attributes extends OptionObject{constructor(e\ ){super(Qo,"attributes",["preserve","delegate","ignore"])}}class AutoSave extends OptionObject{constructor(e){super(Qo,"autoSave",["disabled","enabled"])}}class Base extends StringObject{constructor(e){super(Qo,"base")}}class BatchOutput extends XFAObject{constructor(e){super(Qo,"batchOutput");this.format=getStringOption(e.format,["none","concat","zip","zipCompress"])}}class BehaviorOverride extends ContentObject{constructor(e){super(Qo,"behaviorOverride")}[hs](){this[ss]=new Map(this[ss].trim()\ .split(/\\s+/).filter((e=>e.includes(":"))).map((e=>e.split(":",2))))}}class Cache extends XFAObject{constructor(e){super(Qo,"cache",!0);this.templateCache=null}}class Change extends Option01{constructor(e){super(Qo,"change")}}class Common extends XFAObject{constructor(e){super(Qo,"common",!0);this.data=null;this.locale=null;this.localeSet=null;this.messaging=null;this.suppressBanner=null;this.template=null;this.validationMessaging=null;this.versionControl=null;this.log=new XFAObjectArray}}class \ Compress extends XFAObject{constructor(e){super(Qo,"compress");this.scope=getStringOption(e.scope,["imageOnly","document"])}}class CompressLogicalStructure extends Option01{constructor(e){super(Qo,"compressLogicalStructure")}}class CompressObjectStream extends Option10{constructor(e){super(Qo,"compressObjectStream")}}class Compression extends XFAObject{constructor(e){super(Qo,"compression",!0);this.compressLogicalStructure=null;this.compressObjectStream=null;this.level=null;this.type=null}}class\ Config extends XFAObject{constructor(e){super(Qo,"config",!0);this.acrobat=null;this.present=null;this.trace=null;this.agent=new XFAObjectArray}}class Conformance extends OptionObject{constructor(e){super(Qo,"conformance",["A","B"])}}class ContentCopy extends Option01{constructor(e){super(Qo,"contentCopy")}}class Copies extends IntegerObject{constructor(e){super(Qo,"copies",1,(e=>e>=1))}}class Creator extends StringObject{constructor(e){super(Qo,"creator")}}class CurrentPage extends IntegerObje\ ct{constructor(e){super(Qo,"currentPage",0,(e=>e>=0))}}class Data extends XFAObject{constructor(e){super(Qo,"data",!0);this.adjustData=null;this.attributes=null;this.incrementalLoad=null;this.outputXSL=null;this.range=null;this.record=null;this.startNode=null;this.uri=null;this.window=null;this.xsl=null;this.excludeNS=new XFAObjectArray;this.transform=new XFAObjectArray}}class Debug extends XFAObject{constructor(e){super(Qo,"debug",!0);this.uri=null}}class DefaultTypeface extends ContentObject{c\ onstructor(e){super(Qo,"defaultTypeface");this.writingScript=getStringOption(e.writingScript,["*","Arabic","Cyrillic","EastEuropeanRoman","Greek","Hebrew","Japanese","Korean","Roman","SimplifiedChinese","Thai","TraditionalChinese","Vietnamese"])}}class Destination extends OptionObject{constructor(e){super(Qo,"destination",["pdf","pcl","ps","webClient","zpl"])}}class DocumentAssembly extends Option01{constructor(e){super(Qo,"documentAssembly")}}class Driver extends XFAObject{constructor(e){super(\ Qo,"driver",!0);this.name=e.name?e.name.trim():"";this.fontInfo=null;this.xdc=null}}class DuplexOption extends OptionObject{constructor(e){super(Qo,"duplexOption",["simplex","duplexFlipLongEdge","duplexFlipShortEdge"])}}class DynamicRender extends OptionObject{constructor(e){super(Qo,"dynamicRender",["forbidden","required"])}}class Embed extends Option01{constructor(e){super(Qo,"embed")}}class config_Encrypt extends Option01{constructor(e){super(Qo,"encrypt")}}class config_Encryption extends XFA\ Object{constructor(e){super(Qo,"encryption",!0);this.encrypt=null;this.encryptionLevel=null;this.permissions=null}}class EncryptionLevel extends OptionObject{constructor(e){super(Qo,"encryptionLevel",["40bit","128bit"])}}class Enforce extends StringObject{constructor(e){super(Qo,"enforce")}}class Equate extends XFAObject{constructor(e){super(Qo,"equate");this.force=getInteger({data:e.force,defaultValue:1,validate:e=>0===e});this.from=e.from||"";this.to=e.to||""}}class EquateRange extends XFAObje\ ct{constructor(e){super(Qo,"equateRange");this.from=e.from||"";this.to=e.to||"";this._unicodeRange=e.unicodeRange||""}get unicodeRange(){const e=[],t=/U\\+([0-9a-fA-F]+)/,a=this._unicodeRange;for(let r of a.split(",").map((e=>e.trim())).filter((e=>!!e))){r=r.split("-",2).map((e=>{const a=e.match(t);return a?parseInt(a[1],16):0}));1===r.length&&r.push(r[0]);e.push(r)}return shadow(this,"unicodeRange",e)}}class Exclude extends ContentObject{constructor(e){super(Qo,"exclude")}[hs](){this[ss]=this[ss\ ].trim().split(/\\s+/).filter((e=>e&&["calculate","close","enter","exit","initialize","ready","validate"].includes(e)))}}class ExcludeNS extends StringObject{constructor(e){super(Qo,"excludeNS")}}class FlipLabel extends OptionObject{constructor(e){super(Qo,"flipLabel",["usePrinterSetting","on","off"])}}class config_FontInfo extends XFAObject{constructor(e){super(Qo,"fontInfo",!0);this.embed=null;this.map=null;this.subsetBelow=null;this.alwaysEmbed=new XFAObjectArray;this.defaultTypeface=new XFAOb\ jectArray;this.neverEmbed=new XFAObjectArray}}class FormFieldFilling extends Option01{constructor(e){super(Qo,"formFieldFilling")}}class GroupParent extends StringObject{constructor(e){super(Qo,"groupParent")}}class IfEmpty extends OptionObject{constructor(e){super(Qo,"ifEmpty",["dataValue","dataGroup","ignore","remove"])}}class IncludeXDPContent extends StringObject{constructor(e){super(Qo,"includeXDPContent")}}class IncrementalLoad extends OptionObject{constructor(e){super(Qo,"incrementalLoad"\ ,["none","forwardOnly"])}}class IncrementalMerge extends Option01{constructor(e){super(Qo,"incrementalMerge")}}class Interactive extends Option01{constructor(e){super(Qo,"interactive")}}class Jog extends OptionObject{constructor(e){super(Qo,"jog",["usePrinterSetting","none","pageSet"])}}class LabelPrinter extends XFAObject{constructor(e){super(Qo,"labelPrinter",!0);this.name=getStringOption(e.name,["zpl","dpl","ipl","tcpl"]);this.batchOutput=null;this.flipLabel=null;this.fontInfo=null;this.xdc=n\ ull}}class Layout extends OptionObject{constructor(e){super(Qo,"layout",["paginate","panel"])}}class Level extends IntegerObject{constructor(e){super(Qo,"level",0,(e=>e>0))}}class Linearized extends Option01{constructor(e){super(Qo,"linearized")}}class Locale extends StringObject{constructor(e){super(Qo,"locale")}}class LocaleSet extends StringObject{constructor(e){super(Qo,"localeSet")}}class Log extends XFAObject{constructor(e){super(Qo,"log",!0);this.mode=null;this.threshold=null;this.to=null\ ;this.uri=null}}class MapElement extends XFAObject{constructor(e){super(Qo,"map",!0);this.equate=new XFAObjectArray;this.equateRange=new XFAObjectArray}}class MediumInfo extends XFAObject{constructor(e){super(Qo,"mediumInfo",!0);this.map=null}}class config_Message extends XFAObject{constructor(e){super(Qo,"message",!0);this.msgId=null;this.severity=null}}class Messaging extends XFAObject{constructor(e){super(Qo,"messaging",!0);this.message=new XFAObjectArray}}class Mode extends OptionObject{cons\ tructor(e){super(Qo,"mode",["append","overwrite"])}}class ModifyAnnots extends Option01{constructor(e){super(Qo,"modifyAnnots")}}class MsgId extends IntegerObject{constructor(e){super(Qo,"msgId",1,(e=>e>=1))}}class NameAttr extends StringObject{constructor(e){super(Qo,"nameAttr")}}class NeverEmbed extends ContentObject{constructor(e){super(Qo,"neverEmbed")}}class NumberOfCopies extends IntegerObject{constructor(e){super(Qo,"numberOfCopies",null,(e=>e>=2&&e<=5))}}class OpenAction extends XFAObjec\ t{constructor(e){super(Qo,"openAction",!0);this.destination=null}}class Output extends XFAObject{constructor(e){super(Qo,"output",!0);this.to=null;this.type=null;this.uri=null}}class OutputBin extends StringObject{constructor(e){super(Qo,"outputBin")}}class OutputXSL extends XFAObject{constructor(e){super(Qo,"outputXSL",!0);this.uri=null}}class Overprint extends OptionObject{constructor(e){super(Qo,"overprint",["none","both","draw","field"])}}class Packets extends StringObject{constructor(e){sup\ er(Qo,"packets")}[hs](){"*"!==this[ss]&&(this[ss]=this[ss].trim().split(/\\s+/).filter((e=>["config","datasets","template","xfdf","xslt"].includes(e))))}}class PageOffset extends XFAObject{constructor(e){super(Qo,"pageOffset");this.x=getInteger({data:e.x,defaultValue:"useXDCSetting",validate:e=>!0});this.y=getInteger({data:e.y,defaultValue:"useXDCSetting",validate:e=>!0})}}class PageRange extends StringObject{constructor(e){super(Qo,"pageRange")}[hs](){const e=this[ss].trim().split(/\\s+/).map((e=\ >parseInt(e,10))),t=[];for(let a=0,r=e.length;a!1))}}class Pcl extends XFAObject{constr\ uctor(e){super(Qo,"pcl",!0);this.name=e.name||"";this.batchOutput=null;this.fontInfo=null;this.jog=null;this.mediumInfo=null;this.outputBin=null;this.pageOffset=null;this.staple=null;this.xdc=null}}class Pdf extends XFAObject{constructor(e){super(Qo,"pdf",!0);this.name=e.name||"";this.adobeExtensionLevel=null;this.batchOutput=null;this.compression=null;this.creator=null;this.encryption=null;this.fontInfo=null;this.interactive=null;this.linearized=null;this.openAction=null;this.pdfa=null;this.pro\ ducer=null;this.renderPolicy=null;this.scriptModel=null;this.silentPrint=null;this.submitFormat=null;this.tagged=null;this.version=null;this.viewerPreferences=null;this.xdc=null}}class Pdfa extends XFAObject{constructor(e){super(Qo,"pdfa",!0);this.amd=null;this.conformance=null;this.includeXDPContent=null;this.part=null}}class Permissions extends XFAObject{constructor(e){super(Qo,"permissions",!0);this.accessibleContent=null;this.change=null;this.contentCopy=null;this.documentAssembly=null;this.\ formFieldFilling=null;this.modifyAnnots=null;this.plaintextMetadata=null;this.print=null;this.printHighQuality=null}}class PickTrayByPDFSize extends Option01{constructor(e){super(Qo,"pickTrayByPDFSize")}}class config_Picture extends StringObject{constructor(e){super(Qo,"picture")}}class PlaintextMetadata extends Option01{constructor(e){super(Qo,"plaintextMetadata")}}class Presence extends OptionObject{constructor(e){super(Qo,"presence",["preserve","dissolve","dissolveStructure","ignore","remove"\ ])}}class Present extends XFAObject{constructor(e){super(Qo,"present",!0);this.behaviorOverride=null;this.cache=null;this.common=null;this.copies=null;this.destination=null;this.incrementalMerge=null;this.layout=null;this.output=null;this.overprint=null;this.pagination=null;this.paginationOverride=null;this.script=null;this.validate=null;this.xdp=null;this.driver=new XFAObjectArray;this.labelPrinter=new XFAObjectArray;this.pcl=new XFAObjectArray;this.pdf=new XFAObjectArray;this.ps=new XFAObjectA\ rray;this.submitUrl=new XFAObjectArray;this.webClient=new XFAObjectArray;this.zpl=new XFAObjectArray}}class Print extends Option01{constructor(e){super(Qo,"print")}}class PrintHighQuality extends Option01{constructor(e){super(Qo,"printHighQuality")}}class PrintScaling extends OptionObject{constructor(e){super(Qo,"printScaling",["appdefault","noScaling"])}}class PrinterName extends StringObject{constructor(e){super(Qo,"printerName")}}class Producer extends StringObject{constructor(e){super(Qo,"pr\ oducer")}}class Ps extends XFAObject{constructor(e){super(Qo,"ps",!0);this.name=e.name||"";this.batchOutput=null;this.fontInfo=null;this.jog=null;this.mediumInfo=null;this.outputBin=null;this.staple=null;this.xdc=null}}class Range extends ContentObject{constructor(e){super(Qo,"range")}[hs](){this[ss]=this[ss].split(",",2).map((e=>e.split("-").map((e=>parseInt(e.trim(),10))))).filter((e=>e.every((e=>!isNaN(e))))).map((e=>{1===e.length&&e.push(e[0]);return e}))}}class Record extends ContentObject{\ constructor(e){super(Qo,"record")}[hs](){this[ss]=this[ss].trim();const e=parseInt(this[ss],10);!isNaN(e)&&e>=0&&(this[ss]=e)}}class Relevant extends ContentObject{constructor(e){super(Qo,"relevant")}[hs](){this[ss]=this[ss].trim().split(/\\s+/)}}class Rename extends ContentObject{constructor(e){super(Qo,"rename")}[hs](){this[ss]=this[ss].trim();(this[ss].toLowerCase().startsWith("xml")||new RegExp("[\\\\p{L}_][\\\\p{L}\\\\d._\\\\p{M}-]*","u").test(this[ss]))&&warn("XFA - Rename: invalid XFA name")}}clas\ s RenderPolicy extends OptionObject{constructor(e){super(Qo,"renderPolicy",["server","client"])}}class RunScripts extends OptionObject{constructor(e){super(Qo,"runScripts",["both","client","none","server"])}}class config_Script extends XFAObject{constructor(e){super(Qo,"script",!0);this.currentPage=null;this.exclude=null;this.runScripts=null}}class ScriptModel extends OptionObject{constructor(e){super(Qo,"scriptModel",["XFA","none"])}}class Severity extends OptionObject{constructor(e){super(Qo,"\ severity",["ignore","error","information","trace","warning"])}}class SilentPrint extends XFAObject{constructor(e){super(Qo,"silentPrint",!0);this.addSilentPrint=null;this.printerName=null}}class Staple extends XFAObject{constructor(e){super(Qo,"staple");this.mode=getStringOption(e.mode,["usePrinterSetting","on","off"])}}class StartNode extends StringObject{constructor(e){super(Qo,"startNode")}}class StartPage extends IntegerObject{constructor(e){super(Qo,"startPage",0,(e=>!0))}}class SubmitForma\ t extends OptionObject{constructor(e){super(Qo,"submitFormat",["html","delegate","fdf","xml","pdf"])}}class SubmitUrl extends StringObject{constructor(e){super(Qo,"submitUrl")}}class SubsetBelow extends IntegerObject{constructor(e){super(Qo,"subsetBelow",100,(e=>e>=0&&e<=100))}}class SuppressBanner extends Option01{constructor(e){super(Qo,"suppressBanner")}}class Tagged extends Option01{constructor(e){super(Qo,"tagged")}}class config_Template extends XFAObject{constructor(e){super(Qo,"template",\ !0);this.base=null;this.relevant=null;this.startPage=null;this.uri=null;this.xsl=null}}class Threshold extends OptionObject{constructor(e){super(Qo,"threshold",["trace","error","information","warning"])}}class To extends OptionObject{constructor(e){super(Qo,"to",["null","memory","stderr","stdout","system","uri"])}}class TemplateCache extends XFAObject{constructor(e){super(Qo,"templateCache");this.maxEntries=getInteger({data:e.maxEntries,defaultValue:5,validate:e=>e>=0})}}class Trace extends XFAO\ bject{constructor(e){super(Qo,"trace",!0);this.area=new XFAObjectArray}}class Transform extends XFAObject{constructor(e){super(Qo,"transform",!0);this.groupParent=null;this.ifEmpty=null;this.nameAttr=null;this.picture=null;this.presence=null;this.rename=null;this.whitespace=null}}class Type extends OptionObject{constructor(e){super(Qo,"type",["none","ascii85","asciiHex","ccittfax","flate","lzw","runLength","native","xdp","mergedXDP"])}}class Uri extends StringObject{constructor(e){super(Qo,"uri"\ )}}class config_Validate extends OptionObject{constructor(e){super(Qo,"validate",["preSubmit","prePrint","preExecute","preSave"])}}class ValidateApprovalSignatures extends ContentObject{constructor(e){super(Qo,"validateApprovalSignatures")}[hs](){this[ss]=this[ss].trim().split(/\\s+/).filter((e=>["docReady","postSign"].includes(e)))}}class ValidationMessaging extends OptionObject{constructor(e){super(Qo,"validationMessaging",["allMessagesIndividually","allMessagesTogether","firstMessageOnly","noM\ essages"])}}class Version extends OptionObject{constructor(e){super(Qo,"version",["1.7","1.6","1.5","1.4","1.3","1.2"])}}class VersionControl extends XFAObject{constructor(e){super(Qo,"VersionControl");this.outputBelow=getStringOption(e.outputBelow,["warn","error","update"]);this.sourceAbove=getStringOption(e.sourceAbove,["warn","error"]);this.sourceBelow=getStringOption(e.sourceBelow,["update","maintain"])}}class ViewerPreferences extends XFAObject{constructor(e){super(Qo,"viewerPreferences",!0\ );this.ADBE_JSConsole=null;this.ADBE_JSDebugger=null;this.addViewerPreferences=null;this.duplexOption=null;this.enforce=null;this.numberOfCopies=null;this.pageRange=null;this.pickTrayByPDFSize=null;this.printScaling=null}}class WebClient extends XFAObject{constructor(e){super(Qo,"webClient",!0);this.name=e.name?e.name.trim():"";this.fontInfo=null;this.xdc=null}}class Whitespace extends OptionObject{constructor(e){super(Qo,"whitespace",["preserve","ltrim","normalize","rtrim","trim"])}}class Windo\ w extends ContentObject{constructor(e){super(Qo,"window")}[hs](){const e=this[ss].split(",",2).map((e=>parseInt(e.trim(),10)));if(e.some((e=>isNaN(e))))this[ss]=[0,0];else{1===e.length&&e.push(e[0]);this[ss]=e}}}class Xdc extends XFAObject{constructor(e){super(Qo,"xdc",!0);this.uri=new XFAObjectArray;this.xsl=new XFAObjectArray}}class Xdp extends XFAObject{constructor(e){super(Qo,"xdp",!0);this.packets=null}}class Xsl extends XFAObject{constructor(e){super(Qo,"xsl",!0);this.debug=null;this.uri=n\ ull}}class Zpl extends XFAObject{constructor(e){super(Qo,"zpl",!0);this.name=e.name?e.name.trim():"";this.batchOutput=null;this.flipLabel=null;this.fontInfo=null;this.xdc=null}}class ConfigNamespace{static[fo](e,t){if(ConfigNamespace.hasOwnProperty(e))return ConfigNamespace[e](t)}static acrobat(e){return new Acrobat(e)}static acrobat7(e){return new Acrobat7(e)}static ADBE_JSConsole(e){return new ADBE_JSConsole(e)}static ADBE_JSDebugger(e){return new ADBE_JSDebugger(e)}static addSilentPrint(e){re\ turn new AddSilentPrint(e)}static addViewerPreferences(e){return new AddViewerPreferences(e)}static adjustData(e){return new AdjustData(e)}static adobeExtensionLevel(e){return new AdobeExtensionLevel(e)}static agent(e){return new Agent(e)}static alwaysEmbed(e){return new AlwaysEmbed(e)}static amd(e){return new Amd(e)}static area(e){return new config_Area(e)}static attributes(e){return new Attributes(e)}static autoSave(e){return new AutoSave(e)}static base(e){return new Base(e)}static batchOutput\ (e){return new BatchOutput(e)}static behaviorOverride(e){return new BehaviorOverride(e)}static cache(e){return new Cache(e)}static change(e){return new Change(e)}static common(e){return new Common(e)}static compress(e){return new Compress(e)}static compressLogicalStructure(e){return new CompressLogicalStructure(e)}static compressObjectStream(e){return new CompressObjectStream(e)}static compression(e){return new Compression(e)}static config(e){return new Config(e)}static conformance(e){return new\ Conformance(e)}static contentCopy(e){return new ContentCopy(e)}static copies(e){return new Copies(e)}static creator(e){return new Creator(e)}static currentPage(e){return new CurrentPage(e)}static data(e){return new Data(e)}static debug(e){return new Debug(e)}static defaultTypeface(e){return new DefaultTypeface(e)}static destination(e){return new Destination(e)}static documentAssembly(e){return new DocumentAssembly(e)}static driver(e){return new Driver(e)}static duplexOption(e){return new Duplex\ Option(e)}static dynamicRender(e){return new DynamicRender(e)}static embed(e){return new Embed(e)}static encrypt(e){return new config_Encrypt(e)}static encryption(e){return new config_Encryption(e)}static encryptionLevel(e){return new EncryptionLevel(e)}static enforce(e){return new Enforce(e)}static equate(e){return new Equate(e)}static equateRange(e){return new EquateRange(e)}static exclude(e){return new Exclude(e)}static excludeNS(e){return new ExcludeNS(e)}static flipLabel(e){return new FlipL\ abel(e)}static fontInfo(e){return new config_FontInfo(e)}static formFieldFilling(e){return new FormFieldFilling(e)}static groupParent(e){return new GroupParent(e)}static ifEmpty(e){return new IfEmpty(e)}static includeXDPContent(e){return new IncludeXDPContent(e)}static incrementalLoad(e){return new IncrementalLoad(e)}static incrementalMerge(e){return new IncrementalMerge(e)}static interactive(e){return new Interactive(e)}static jog(e){return new Jog(e)}static labelPrinter(e){return new LabelPrin\ ter(e)}static layout(e){return new Layout(e)}static level(e){return new Level(e)}static linearized(e){return new Linearized(e)}static locale(e){return new Locale(e)}static localeSet(e){return new LocaleSet(e)}static log(e){return new Log(e)}static map(e){return new MapElement(e)}static mediumInfo(e){return new MediumInfo(e)}static message(e){return new config_Message(e)}static messaging(e){return new Messaging(e)}static mode(e){return new Mode(e)}static modifyAnnots(e){return new ModifyAnnots(e)\ }static msgId(e){return new MsgId(e)}static nameAttr(e){return new NameAttr(e)}static neverEmbed(e){return new NeverEmbed(e)}static numberOfCopies(e){return new NumberOfCopies(e)}static openAction(e){return new OpenAction(e)}static output(e){return new Output(e)}static outputBin(e){return new OutputBin(e)}static outputXSL(e){return new OutputXSL(e)}static overprint(e){return new Overprint(e)}static packets(e){return new Packets(e)}static pageOffset(e){return new PageOffset(e)}static pageRange(e)\ {return new PageRange(e)}static pagination(e){return new Pagination(e)}static paginationOverride(e){return new PaginationOverride(e)}static part(e){return new Part(e)}static pcl(e){return new Pcl(e)}static pdf(e){return new Pdf(e)}static pdfa(e){return new Pdfa(e)}static permissions(e){return new Permissions(e)}static pickTrayByPDFSize(e){return new PickTrayByPDFSize(e)}static picture(e){return new config_Picture(e)}static plaintextMetadata(e){return new PlaintextMetadata(e)}static presence(e){r\ eturn new Presence(e)}static present(e){return new Present(e)}static print(e){return new Print(e)}static printHighQuality(e){return new PrintHighQuality(e)}static printScaling(e){return new PrintScaling(e)}static printerName(e){return new PrinterName(e)}static producer(e){return new Producer(e)}static ps(e){return new Ps(e)}static range(e){return new Range(e)}static record(e){return new Record(e)}static relevant(e){return new Relevant(e)}static rename(e){return new Rename(e)}static renderPolicy(\ e){return new RenderPolicy(e)}static runScripts(e){return new RunScripts(e)}static script(e){return new config_Script(e)}static scriptModel(e){return new ScriptModel(e)}static severity(e){return new Severity(e)}static silentPrint(e){return new SilentPrint(e)}static staple(e){return new Staple(e)}static startNode(e){return new StartNode(e)}static startPage(e){return new StartPage(e)}static submitFormat(e){return new SubmitFormat(e)}static submitUrl(e){return new SubmitUrl(e)}static subsetBelow(e)\ {return new SubsetBelow(e)}static suppressBanner(e){return new SuppressBanner(e)}static tagged(e){return new Tagged(e)}static template(e){return new config_Template(e)}static templateCache(e){return new TemplateCache(e)}static threshold(e){return new Threshold(e)}static to(e){return new To(e)}static trace(e){return new Trace(e)}static transform(e){return new Transform(e)}static type(e){return new Type(e)}static uri(e){return new Uri(e)}static validate(e){return new config_Validate(e)}static vali\ dateApprovalSignatures(e){return new ValidateApprovalSignatures(e)}static validationMessaging(e){return new ValidationMessaging(e)}static version(e){return new Version(e)}static versionControl(e){return new VersionControl(e)}static viewerPreferences(e){return new ViewerPreferences(e)}static webClient(e){return new WebClient(e)}static whitespace(e){return new Whitespace(e)}static window(e){return new Window(e)}static xdc(e){return new Xdc(e)}static xdp(e){return new Xdp(e)}static xsl(e){return ne\ w Xsl(e)}static zpl(e){return new Zpl(e)}}const ec=go.connectionSet.id;class ConnectionSet extends XFAObject{constructor(e){super(ec,"connectionSet",!0);this.wsdlConnection=new XFAObjectArray;this.xmlConnection=new XFAObjectArray;this.xsdConnection=new XFAObjectArray}}class EffectiveInputPolicy extends XFAObject{constructor(e){super(ec,"effectiveInputPolicy");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class EffectiveOutputPolicy extends XFAObject{constru\ ctor(e){super(ec,"effectiveOutputPolicy");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Operation extends StringObject{constructor(e){super(ec,"operation");this.id=e.id||"";this.input=e.input||"";this.name=e.name||"";this.output=e.output||"";this.use=e.use||"";this.usehref=e.usehref||""}}class RootElement extends StringObject{constructor(e){super(ec,"rootElement");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}cla\ ss SoapAction extends StringObject{constructor(e){super(ec,"soapAction");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class SoapAddress extends StringObject{constructor(e){super(ec,"soapAddress");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class connection_set_Uri extends StringObject{constructor(e){super(ec,"uri");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class WsdlAddress\ extends StringObject{constructor(e){super(ec,"wsdlAddress");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class WsdlConnection extends XFAObject{constructor(e){super(ec,"wsdlConnection",!0);this.dataDescription=e.dataDescription||"";this.name=e.name||"";this.effectiveInputPolicy=null;this.effectiveOutputPolicy=null;this.operation=null;this.soapAction=null;this.soapAddress=null;this.wsdlAddress=null}}class XmlConnection extends XFAObject{constructor(e){supe\ r(ec,"xmlConnection",!0);this.dataDescription=e.dataDescription||"";this.name=e.name||"";this.uri=null}}class XsdConnection extends XFAObject{constructor(e){super(ec,"xsdConnection",!0);this.dataDescription=e.dataDescription||"";this.name=e.name||"";this.rootElement=null;this.uri=null}}class ConnectionSetNamespace{static[fo](e,t){if(ConnectionSetNamespace.hasOwnProperty(e))return ConnectionSetNamespace[e](t)}static connectionSet(e){return new ConnectionSet(e)}static effectiveInputPolicy(e){retur\ n new EffectiveInputPolicy(e)}static effectiveOutputPolicy(e){return new EffectiveOutputPolicy(e)}static operation(e){return new Operation(e)}static rootElement(e){return new RootElement(e)}static soapAction(e){return new SoapAction(e)}static soapAddress(e){return new SoapAddress(e)}static uri(e){return new connection_set_Uri(e)}static wsdlAddress(e){return new WsdlAddress(e)}static wsdlConnection(e){return new WsdlConnection(e)}static xmlConnection(e){return new XmlConnection(e)}static xsdConne\ ction(e){return new XsdConnection(e)}}const tc=go.datasets.id;class datasets_Data extends XmlObject{constructor(e){super(tc,"data",e)}[Ls](){return!0}}class Datasets extends XFAObject{constructor(e){super(tc,"datasets",!0);this.data=null;this.Signature=null}[$s](e){const t=e[Ws];("data"===t&&e[Hs]===tc||"Signature"===t&&e[Hs]===go.signature.id)&&(this[t]=e);this[Qn](e)}}class DatasetsNamespace{static[fo](e,t){if(DatasetsNamespace.hasOwnProperty(e))return DatasetsNamespace[e](t)}static datasets(e\ ){return new Datasets(e)}static data(e){return new datasets_Data(e)}}const ac=go.localeSet.id;class CalendarSymbols extends XFAObject{constructor(e){super(ac,"calendarSymbols",!0);this.name="gregorian";this.dayNames=new XFAObjectArray(2);this.eraNames=null;this.meridiemNames=null;this.monthNames=new XFAObjectArray(2)}}class CurrencySymbol extends StringObject{constructor(e){super(ac,"currencySymbol");this.name=getStringOption(e.name,["symbol","isoname","decimal"])}}class CurrencySymbols extends \ XFAObject{constructor(e){super(ac,"currencySymbols",!0);this.currencySymbol=new XFAObjectArray(3)}}class DatePattern extends StringObject{constructor(e){super(ac,"datePattern");this.name=getStringOption(e.name,["full","long","med","short"])}}class DatePatterns extends XFAObject{constructor(e){super(ac,"datePatterns",!0);this.datePattern=new XFAObjectArray(4)}}class DateTimeSymbols extends ContentObject{constructor(e){super(ac,"dateTimeSymbols")}}class Day extends StringObject{constructor(e){supe\ r(ac,"day")}}class DayNames extends XFAObject{constructor(e){super(ac,"dayNames",!0);this.abbr=getInteger({data:e.abbr,defaultValue:0,validate:e=>1===e});this.day=new XFAObjectArray(7)}}class Era extends StringObject{constructor(e){super(ac,"era")}}class EraNames extends XFAObject{constructor(e){super(ac,"eraNames",!0);this.era=new XFAObjectArray(2)}}class locale_set_Locale extends XFAObject{constructor(e){super(ac,"locale",!0);this.desc=e.desc||"";this.name="isoname";this.calendarSymbols=null;t\ his.currencySymbols=null;this.datePatterns=null;this.dateTimeSymbols=null;this.numberPatterns=null;this.numberSymbols=null;this.timePatterns=null;this.typeFaces=null}}class locale_set_LocaleSet extends XFAObject{constructor(e){super(ac,"localeSet",!0);this.locale=new XFAObjectArray}}class Meridiem extends StringObject{constructor(e){super(ac,"meridiem")}}class MeridiemNames extends XFAObject{constructor(e){super(ac,"meridiemNames",!0);this.meridiem=new XFAObjectArray(2)}}class Month extends Stri\ ngObject{constructor(e){super(ac,"month")}}class MonthNames extends XFAObject{constructor(e){super(ac,"monthNames",!0);this.abbr=getInteger({data:e.abbr,defaultValue:0,validate:e=>1===e});this.month=new XFAObjectArray(12)}}class NumberPattern extends StringObject{constructor(e){super(ac,"numberPattern");this.name=getStringOption(e.name,["full","long","med","short"])}}class NumberPatterns extends XFAObject{constructor(e){super(ac,"numberPatterns",!0);this.numberPattern=new XFAObjectArray(4)}}clas\ s NumberSymbol extends StringObject{constructor(e){super(ac,"numberSymbol");this.name=getStringOption(e.name,["decimal","grouping","percent","minus","zero"])}}class NumberSymbols extends XFAObject{constructor(e){super(ac,"numberSymbols",!0);this.numberSymbol=new XFAObjectArray(5)}}class TimePattern extends StringObject{constructor(e){super(ac,"timePattern");this.name=getStringOption(e.name,["full","long","med","short"])}}class TimePatterns extends XFAObject{constructor(e){super(ac,"timePatterns"\ ,!0);this.timePattern=new XFAObjectArray(4)}}class TypeFace extends XFAObject{constructor(e){super(ac,"typeFace",!0);this.name=""|e.name}}class TypeFaces extends XFAObject{constructor(e){super(ac,"typeFaces",!0);this.typeFace=new XFAObjectArray}}class LocaleSetNamespace{static[fo](e,t){if(LocaleSetNamespace.hasOwnProperty(e))return LocaleSetNamespace[e](t)}static calendarSymbols(e){return new CalendarSymbols(e)}static currencySymbol(e){return new CurrencySymbol(e)}static currencySymbols(e){retur\ n new CurrencySymbols(e)}static datePattern(e){return new DatePattern(e)}static datePatterns(e){return new DatePatterns(e)}static dateTimeSymbols(e){return new DateTimeSymbols(e)}static day(e){return new Day(e)}static dayNames(e){return new DayNames(e)}static era(e){return new Era(e)}static eraNames(e){return new EraNames(e)}static locale(e){return new locale_set_Locale(e)}static localeSet(e){return new locale_set_LocaleSet(e)}static meridiem(e){return new Meridiem(e)}static meridiemNames(e){ret\ urn new MeridiemNames(e)}static month(e){return new Month(e)}static monthNames(e){return new MonthNames(e)}static numberPattern(e){return new NumberPattern(e)}static numberPatterns(e){return new NumberPatterns(e)}static numberSymbol(e){return new NumberSymbol(e)}static numberSymbols(e){return new NumberSymbols(e)}static timePattern(e){return new TimePattern(e)}static timePatterns(e){return new TimePatterns(e)}static typeFace(e){return new TypeFace(e)}static typeFaces(e){return new TypeFaces(e)}}\ const rc=go.signature.id;class signature_Signature extends XFAObject{constructor(e){super(rc,"signature",!0)}}class SignatureNamespace{static[fo](e,t){if(SignatureNamespace.hasOwnProperty(e))return SignatureNamespace[e](t)}static signature(e){return new signature_Signature(e)}}const ic=go.stylesheet.id;class Stylesheet extends XFAObject{constructor(e){super(ic,"stylesheet",!0)}}class StylesheetNamespace{static[fo](e,t){if(StylesheetNamespace.hasOwnProperty(e))return StylesheetNamespace[e](t)}sta\ tic stylesheet(e){return new Stylesheet(e)}}const nc=go.xdp.id;class xdp_Xdp extends XFAObject{constructor(e){super(nc,"xdp",!0);this.uuid=e.uuid||"";this.timeStamp=e.timeStamp||"";this.config=null;this.connectionSet=null;this.datasets=null;this.localeSet=null;this.stylesheet=new XFAObjectArray;this.template=null}[Gs](e){const t=go[e[Ws]];return t&&e[Hs]===t.id}}class XdpNamespace{static[fo](e,t){if(XdpNamespace.hasOwnProperty(e))return XdpNamespace[e](t)}static xdp(e){return new xdp_Xdp(e)}}con\ st sc=go.xhtml.id,oc=Symbol(),cc=new Set(["color","font","font-family","font-size","font-stretch","font-style","font-weight","margin","margin-bottom","margin-left","margin-right","margin-top","letter-spacing","line-height","orphans","page-break-after","page-break-before","page-break-inside","tab-interval","tab-stop","text-align","text-decoration","text-indent","vertical-align","widows","kerning-mode","xfa-font-horizontal-scale","xfa-font-vertical-scale","xfa-spacerun","xfa-tab-stops"]),lc=new Ma\ p([["page-break-after","breakAfter"],["page-break-before","breakBefore"],["page-break-inside","breakInside"],["kerning-mode",e=>"none"===e?"none":"normal"],["xfa-font-horizontal-scale",e=>`scaleX(${Math.max(0,parseInt(e)/100).toFixed(2)})`],["xfa-font-vertical-scale",e=>`scaleY(${Math.max(0,parseInt(e)/100).toFixed(2)})`],["xfa-spacerun",""],["xfa-tab-stops",""],["font-size",(e,t)=>measureToString(.99*(e=t.fontSize=Math.abs(getMeasurement(e))))],["letter-spacing",e=>measureToString(getMeasuremen\ t(e))],["line-height",e=>measureToString(getMeasurement(e))],["margin",e=>measureToString(getMeasurement(e))],["margin-bottom",e=>measureToString(getMeasurement(e))],["margin-left",e=>measureToString(getMeasurement(e))],["margin-right",e=>measureToString(getMeasurement(e))],["margin-top",e=>measureToString(getMeasurement(e))],["text-indent",e=>measureToString(getMeasurement(e))],["font-family",e=>e],["vertical-align",e=>measureToString(getMeasurement(e))]]),hc=/\\s+/g,uc=/[\\r\\n]+/g,dc=/\\r\\n?/g;fu\ nction mapStyle(e,t,a){const r=Object.create(null);if(!e)return r;const i=Object.create(null);for(const[t,a]of e.split(";").map((e=>e.split(":",2)))){const e=lc.get(t);if(""===e)continue;let n=a;e&&(n="string"==typeof e?e:e(a,i));t.endsWith("scale")?r.transform=r.transform?`${r[t]} ${n}`:n:r[t.replaceAll(/-([a-zA-Z])/g,((e,t)=>t.toUpperCase()))]=n}r.fontFamily&&setFontFamily({typeface:r.fontFamily,weight:r.fontWeight||"normal",posture:r.fontStyle||"normal",size:i.fontSize||0},t,t[Is].fontFinder,\ r);if(a&&r.verticalAlign&&"0px"!==r.verticalAlign&&r.fontSize){const e=.583,t=.333,a=getMeasurement(r.fontSize);r.fontSize=measureToString(a*e);r.verticalAlign=measureToString(Math.sign(getMeasurement(r.verticalAlign))*a*t)}a&&r.fontSize&&(r.fontSize=`calc(${r.fontSize} * var(--total-scale-factor))`);fixTextIndent(r);return r}const fc=new Set(["body","html"]);class XhtmlObject extends XmlObject{constructor(e,t){super(sc,t);this[oc]=!1;this.style=e.style||""}[ts](e){super[ts](e);this.style=functi\ on checkStyle(e){return e.style?e.style.split(";").filter((e=>!!e.trim())).map((e=>e.split(":",2).map((e=>e.trim())))).filter((([t,a])=>{"font-family"===t&&e[Is].usedTypefaces.add(a);return cc.has(t)})).map((e=>e.join(":"))).join(";"):""}(this)}[Yn](){return!fc.has(this[Ws])}[Vs](e,t=!1){if(t)this[oc]=!0;else{e=e.replaceAll(uc,"");this.style.includes("xfa-spacerun:yes")||(e=e.replaceAll(hc," "))}e&&(this[ss]+=e)}[Ks](e,t=!0){const a=Object.create(null),r={top:NaN,bottom:NaN,left:NaN,right:NaN};l\ et i=null;for(const[e,t]of this.style.split(";").map((e=>e.split(":",2))))switch(e){case"font-family":a.typeface=stripQuotes(t);break;case"font-size":a.size=getMeasurement(t);break;case"font-weight":a.weight=t;break;case"font-style":a.posture=t;break;case"letter-spacing":a.letterSpacing=getMeasurement(t);break;case"margin":const e=t.split(/ \\t/).map((e=>getMeasurement(e)));switch(e.length){case 1:r.top=r.bottom=r.left=r.right=e[0];break;case 2:r.top=r.bottom=e[0];r.left=r.right=e[1];break;case 3\ :r.top=e[0];r.bottom=e[2];r.left=r.right=e[1];break;case 4:r.top=e[0];r.left=e[1];r.bottom=e[2];r.right=e[3]}break;case"margin-top":r.top=getMeasurement(t);break;case"margin-bottom":r.bottom=getMeasurement(t);break;case"margin-left":r.left=getMeasurement(t);break;case"margin-right":r.right=getMeasurement(t);break;case"line-height":i=getMeasurement(t)}e.pushData(a,r,i);if(this[ss])e.addString(this[ss]);else for(const t of this[Ss]())"#text"!==t[Ws]?t[Ks](e):e.addString(t[ss]);t&&e.popFont()}[co](\ e){const t=[];this[ls]={children:t};this[es]({});if(0===t.length&&!this[ss])return HTMLResult.EMPTY;let a;a=this[oc]?this[ss]?this[ss].replaceAll(dc,"\\n"):void 0:this[ss]||void 0;return HTMLResult.success({name:this[Ws],attributes:{href:this.href,style:mapStyle(this.style,this,this[oc])},children:t,value:a})}}class A extends XhtmlObject{constructor(e){super(e,"a");this.href=fixURL(e.href)||""}}class B extends XhtmlObject{constructor(e){super(e,"b")}[Ks](e){e.pushFont({weight:"bold"});super[Ks](e\ );e.popFont()}}class Body extends XhtmlObject{constructor(e){super(e,"body")}[co](e){const t=super[co](e),{html:a}=t;if(!a)return HTMLResult.EMPTY;a.name="div";a.attributes.class=["xfaRich"];return t}}class Br extends XhtmlObject{constructor(e){super(e,"br")}[so](){return"\\n"}[Ks](e){e.addString("\\n")}[co](e){return HTMLResult.success({name:"br"})}}class Html extends XhtmlObject{constructor(e){super(e,"html")}[co](e){const t=[];this[ls]={children:t};this[es]({});if(0===t.length)return HTMLResult\ .success({name:"div",attributes:{class:["xfaRich"],style:{}},value:this[ss]||""});if(1===t.length){const e=t[0];if(e.attributes?.class.includes("xfaRich"))return HTMLResult.success(e)}return HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:{}},children:t})}}class I extends XhtmlObject{constructor(e){super(e,"i")}[Ks](e){e.pushFont({posture:"italic"});super[Ks](e);e.popFont()}}class Li extends XhtmlObject{constructor(e){super(e,"li")}}class Ol extends XhtmlObject{constructor(e){\ super(e,"ol")}}class P extends XhtmlObject{constructor(e){super(e,"p")}[Ks](e){super[Ks](e,!1);e.addString("\\n");e.addPara();e.popFont()}[so](){return this[vs]()[Ss]().at(-1)===this?super[so]():super[so]()+"\\n"}}class Span extends XhtmlObject{constructor(e){super(e,"span")}}class Sub extends XhtmlObject{constructor(e){super(e,"sub")}}class Sup extends XhtmlObject{constructor(e){super(e,"sup")}}class Ul extends XhtmlObject{constructor(e){super(e,"ul")}}class XhtmlNamespace{static[fo](e,t){if(Xhtm\ lNamespace.hasOwnProperty(e))return XhtmlNamespace[e](t)}static a(e){return new A(e)}static b(e){return new B(e)}static body(e){return new Body(e)}static br(e){return new Br(e)}static html(e){return new Html(e)}static i(e){return new I(e)}static li(e){return new Li(e)}static ol(e){return new Ol(e)}static p(e){return new P(e)}static span(e){return new Span(e)}static sub(e){return new Sub(e)}static sup(e){return new Sup(e)}static ul(e){return new Ul(e)}}const gc={config:ConfigNamespace,connection:\ ConnectionSetNamespace,datasets:DatasetsNamespace,localeSet:LocaleSetNamespace,signature:SignatureNamespace,stylesheet:StylesheetNamespace,template:TemplateNamespace,xdp:XdpNamespace,xhtml:XhtmlNamespace};class UnknownNamespace{constructor(e){this.namespaceId=e}[fo](e,t){return new XmlObject(this.namespaceId,e,t)}}class Root extends XFAObject{constructor(e){super(-1,"root",Object.create(null));this.element=null;this[Os]=e}[$s](e){this.element=e;return!0}[hs](){super[hs]();if(this.element.templat\ e instanceof Template){this[Os].set(Qs,this.element);this.element.template[eo](this[Os]);this.element.template[Os]=this[Os]}}}class Empty extends XFAObject{constructor(){super(-1,"",Object.create(null))}[$s](e){return!1}}class Builder{constructor(e=null){this._namespaceStack=[];this._nsAgnosticLevel=0;this._namespacePrefixes=new Map;this._namespaces=new Map;this._nextNsId=Math.max(...Object.values(go).map((({id:e})=>e)));this._currentNamespace=e||new UnknownNamespace(++this._nextNsId)}buildRoot(\ e){return new Root(e)}build({nsPrefix:e,name:t,attributes:a,namespace:r,prefixes:i}){const n=null!==r;if(n){this._namespaceStack.push(this._currentNamespace);this._currentNamespace=this._searchNamespace(r)}i&&this._addNamespacePrefix(i);if(a.hasOwnProperty(zs)){const e=gc.datasets,t=a[zs];let r=null;for(const[a,i]of Object.entries(t)){if(this._getNamespaceToUse(a)===e){r={xfa:i};break}}r?a[zs]=r:delete a[zs]}const s=this._getNamespaceToUse(e),o=s?.[fo](t,a)||new Empty;o[Ls]()&&this._nsAgnosticLe\ vel++;(n||i||o[Ls]())&&(o[rs]={hasNamespace:n,prefixes:i,nsAgnostic:o[Ls]()});return o}isNsAgnostic(){return this._nsAgnosticLevel>0}_searchNamespace(e){let t=this._namespaces.get(e);if(t)return t;for(const[a,{check:r}]of Object.entries(go))if(r(e)){t=gc[a];if(t){this._namespaces.set(e,t);return t}break}t=new UnknownNamespace(++this._nextNsId);this._namespaces.set(e,t);return t}_addNamespacePrefix(e){for(const{prefix:t,value:a}of e){const e=this._searchNamespace(a);let r=this._namespacePrefixes.\ get(t);if(!r){r=[];this._namespacePrefixes.set(t,r)}r.push(e)}}_getNamespaceToUse(e){if(!e)return this._currentNamespace;const t=this._namespacePrefixes.get(e);if(t?.length>0)return t.at(-1);warn(`Unknown namespace prefix: ${e}.`);return null}clean(e){const{hasNamespace:t,prefixes:a,nsAgnostic:r}=e;t&&(this._currentNamespace=this._namespaceStack.pop());a&&a.forEach((({prefix:e})=>{this._namespacePrefixes.get(e).pop()}));r&&this._nsAgnosticLevel--}}class XFAParser extends XMLParserBase{constructo\ r(e=null,t=!1){super();this._builder=new Builder(e);this._stack=[];this._globalData={usedTypefaces:new Set};this._ids=new Map;this._current=this._builder.buildRoot(this._ids);this._errorCode=jn;this._whiteRegex=/^\\s+$/;this._nbsps=/\\xa0+/g;this._richText=t}parse(e){this.parseXml(e);if(this._errorCode===jn){this._current[hs]();return this._current.element}}onText(e){e=e.replace(this._nbsps,(e=>e.slice(1)+" "));this._richText||this._current[Yn]()?this._current[Vs](e,this._richText):this._whiteRege\ x.test(e)||this._current[Vs](e.trim())}onCdata(e){this._current[Vs](e)}_mkAttributes(e,t){let a=null,r=null;const i=Object.create({});for(const{name:n,value:s}of e)if("xmlns"===n)a?warn(`XFA - multiple namespace definition in <${t}>`):a=s;else if(n.startsWith("xmlns:")){const e=n.substring(6);r??=[];r.push({prefix:e,value:s})}else{const e=n.indexOf(":");if(-1===e)i[n]=s;else{const t=i[zs]??=Object.create(null),[a,r]=[n.slice(0,e),n.slice(e+1)];(t[a]||=Object.create(null))[r]=s}}return[a,r,i]}_ge\ tNameAndPrefix(e,t){const a=e.indexOf(":");return-1===a?[e,null]:[e.substring(a+1),t?"":e.substring(0,a)]}onBeginElement(e,t,a){const[r,i,n]=this._mkAttributes(t,e),[s,o]=this._getNameAndPrefix(e,this._builder.isNsAgnostic()),c=this._builder.build({nsPrefix:o,name:s,attributes:n,namespace:r,prefixes:i});c[Is]=this._globalData;if(a){c[hs]();this._current[$s](c)&&c[ao](this._ids);c[ts](this._builder)}else{this._stack.push(this._current);this._current=c}}onEndElement(e){const t=this._current;if(t[B\ s]()&&"string"==typeof t[ss]){const e=new XFAParser;e._globalData=this._globalData;const a=e.parse(t[ss]);t[ss]=null;t[$s](a)}t[hs]();this._current=this._stack.pop();this._current[$s](t)&&t[ao](this._ids);t[ts](this._builder)}onError(e){this._errorCode=e}}class XFAFactory{constructor(e){try{this.root=(new XFAParser).parse(XFAFactory._createDocument(e));const t=new Binder(this.root);this.form=t.bind();this.dataHandler=new DataHandler(this.root,t.getData());this.form[Is].template=this.form}catch(e\ ){warn(`XFA - an error occurred during parsing and binding: ${e}`)}}isValid(){return!(!this.root||!this.form)}_createPagesHelper(){const e=this.form[oo]();return new Promise(((t,a)=>{const nextIteration=()=>{try{const a=e.next();a.done?t(a.value):setTimeout(nextIteration,0)}catch(e){a(e)}};setTimeout(nextIteration,0)}))}async _createPages(){try{this.pages=await this._createPagesHelper();this.dims=this.pages.children.map((e=>{const{width:t,height:a}=e.attributes.style;return[0,0,parseInt(t),parse\ Int(a)]}))}catch(e){warn(`XFA - an error occurred during layout: ${e}`)}}getBoundingBox(e){return this.dims[e]}async getNumPages(){this.pages||await this._createPages();return this.dims.length}setImages(e){this.form[Is].images=e}setFonts(e){this.form[Is].fontFinder=new FontFinder(e);const t=[];for(let e of this.form[Is].usedTypefaces){e=stripQuotes(e);this.form[Is].fontFinder.find(e)||t.push(e)}return t.length>0?t:null}appendFonts(e,t){this.form[Is].fontFinder.add(e,t)}async getPages(){this.page\ s||await this._createPages();const e=this.pages;this.pages=null;return e}serializeData(e){return this.dataHandler.serialize(e)}static _createDocument(e){return e["/xdp:xdp"]?Object.values(e).join(""):e["xdp:xdp"]}static getRichTextAsHtml(e){if(!e||"string"!=typeof e)return null;try{let t=new XFAParser(XhtmlNamespace,!0).parse(e);if(!["body","xhtml"].includes(t[Ws])){const e=XhtmlNamespace.body({});e[Qn](t);t=e}const a=t[co]();if(!a.success)return null;const{html:r}=a,{attributes:i}=r;if(i){i.cla\ ss&&(i.class=i.class.filter((e=>!e.startsWith("xfa"))));i.dir="auto"}return{html:r,str:t[so]()}}catch(e){warn(`XFA - an error occurred during parsing of rich text: ${e}`)}return null}}class AnnotationFactory{static createGlobals(e){return Promise.all([e.ensureCatalog("acroForm"),e.ensureDoc("xfaDatasets"),e.ensureCatalog("structTreeRoot"),e.ensureCatalog("baseUrl"),e.ensureCatalog("attachments"),e.ensureCatalog("globalColorSpaceCache")]).then((([t,a,r,i,n,s])=>({pdfManager:e,acroForm:t instanceo\ f Dict?t:Dict.empty,xfaDatasets:a,structTreeRoot:r,baseUrl:i,attachments:n,globalColorSpaceCache:s})),(e=>{warn(`createGlobals: "${e}".`);return null}))}static async create(e,t,a,r,i,n,s){const o=i?await this._getPageIndex(e,t,a.pdfManager):null;return a.pdfManager.ensure(this,"_create",[e,t,a,r,i,n,o,s])}static _create(e,t,a,r,i=!1,n=null,s=null,o=null){const c=e.fetchIfRef(t);if(!(c instanceof Dict))return;const{acroForm:l,pdfManager:h}=a,u=t instanceof Ref?t.toString():`annot_${r.createObjId(\ )}`;let d=c.get("Subtype");d=d instanceof Name?d.name:null;const f={xref:e,ref:t,dict:c,subtype:d,id:u,annotationGlobals:a,collectFields:i,orphanFields:n,needAppearances:!i&&!0===l.get("NeedAppearances"),pageIndex:s,evaluatorOptions:h.evaluatorOptions,pageRef:o};switch(d){case"Link":return new LinkAnnotation(f);case"Text":return new TextAnnotation(f);case"Widget":let e=getInheritableProperty({dict:c,key:"FT"});e=e instanceof Name?e.name:null;switch(e){case"Tx":return new TextWidgetAnnotation(f);\ case"Btn":return new ButtonWidgetAnnotation(f);case"Ch":return new ChoiceWidgetAnnotation(f);case"Sig":return new SignatureWidgetAnnotation(f)}warn(`Unimplemented widget field type "${e}", falling back to base field type.`);return new WidgetAnnotation(f);case"Popup":return new PopupAnnotation(f);case"FreeText":return new FreeTextAnnotation(f);case"Line":return new LineAnnotation(f);case"Square":return new SquareAnnotation(f);case"Circle":return new CircleAnnotation(f);case"PolyLine":return new P\ olylineAnnotation(f);case"Polygon":return new PolygonAnnotation(f);case"Caret":return new CaretAnnotation(f);case"Ink":return new InkAnnotation(f);case"Highlight":return new HighlightAnnotation(f);case"Underline":return new UnderlineAnnotation(f);case"Squiggly":return new SquigglyAnnotation(f);case"StrikeOut":return new StrikeOutAnnotation(f);case"Stamp":return new StampAnnotation(f);case"FileAttachment":return new FileAttachmentAnnotation(f);default:i||warn(d?`Unimplemented annotation type "${d\ }", falling back to base annotation.`:"Annotation is missing the required /Subtype.");return new Annotation(f)}}static async _getPageIndex(e,t,a){try{const r=await e.fetchIfRefAsync(t);if(!(r instanceof Dict))return-1;const i=r.getRaw("P");if(i instanceof Ref)try{return await a.ensureCatalog("getPageIndex",[i])}catch(e){info(`_getPageIndex -- not a valid page reference: "${e}".`)}if(r.has("Kids"))return-1;const n=await a.ensureDoc("numPages");for(let e=0;ee/255))||t}function getQuadPoints(e,t){const a=e.getArray("QuadPoints");if(!isNumberArray(a,null)||0===a.l\ ength||a.length%8>0)return null;const r=new Float32Array(a.length);for(let e=0,i=a.length;et[2]||gt[3]))return null;r.set([d,p,f,p,d,g,f,g],e)}return r}function getTransformMatrix(e,t,a){const r=new Float32Array([1/0,1/0,-1/0,-1/0]);Util.axialAlignedBoundingBox(t,a,r);const[i,n,s,o]=r;if(i===s||n===o)return[1,0,0,1,e[0],e[1]];const c=(e[2\ ]-e[0])/(s-i),l=(e[3]-e[1])/(o-n);return[c,0,0,l,e[0]-i*c,e[1]-n*l]}class Annotation{constructor(e){const{dict:t,xref:a,annotationGlobals:r,ref:i,orphanFields:n}=e,s=n?.get(i);s&&t.set("Parent",s);this.setTitle(t.get("T"));this.setContents(t.get("Contents"));this.setModificationDate(t.get("M"));this.setFlags(t.get("F"));this.setRectangle(t.getArray("Rect"));this.setColor(t.getArray("C"));this.setBorderStyle(t);this.setAppearance(t);this.setOptionalContent(t);const o=t.get("MK");this.setBorderAnd\ BackgroundColors(o);this.setRotation(o,t);this.ref=e.ref instanceof Ref?e.ref:null;this._streams=[];this.appearance&&this._streams.push(this.appearance);const c=!!(this.flags&ee),l=!!(this.flags&te);this.data={annotationFlags:this.flags,borderStyle:this.borderStyle,color:this.color,backgroundColor:this.backgroundColor,borderColor:this.borderColor,rotation:this.rotation,contentsObj:this._contents,hasAppearance:!!this.appearance,id:e.id,modificationDate:this.modificationDate,rect:this.rectangle,su\ btype:e.subtype,hasOwnCanvas:!1,noRotate:!!(this.flags&Z),noHTML:c&&l,isEditable:!1,structParent:-1};if(r.structTreeRoot){let a=t.get("StructParent");this.data.structParent=a=Number.isInteger(a)&&a>=0?a:-1;r.structTreeRoot.addAnnotationIdToPage(e.pageRef,a)}if(e.collectFields){const r=t.get("Kids");if(Array.isArray(r)){const e=[];for(const t of r)t instanceof Ref&&e.push(t.toString());0!==e.length&&(this.data.kidIds=e)}this.data.actions=collectActions(a,t,ye);this.data.fieldName=this._constructF\ ieldName(t);this.data.pageIndex=e.pageIndex}const h=t.get("IT");h instanceof Name&&(this.data.it=h.name);this._isOffscreenCanvasSupported=e.evaluatorOptions.isOffscreenCanvasSupported;this._fallbackFontDict=null;this._needAppearances=!1}_hasFlag(e,t){return!!(e&t)}_buildFlags(e,t){let{flags:a}=this;if(void 0===e){if(void 0===t)return;return t?a&~Y:a&~J|Y}if(e){a|=Y;return t?a&~Q|J:a&~J|Q}a&=~(J|Q);return t?a&~Y:a|Y}_isViewable(e){return!this._hasFlag(e,K)&&!this._hasFlag(e,Q)}_isPrintable(e){ret\ urn this._hasFlag(e,Y)&&!this._hasFlag(e,J)&&!this._hasFlag(e,K)}mustBeViewed(e,t){const a=e?.get(this.data.id)?.noView;return void 0!==a?!a:this.viewable&&!this._hasFlag(this.flags,J)}mustBePrinted(e){const t=e?.get(this.data.id)?.noPrint;return void 0!==t?!t:this.printable}mustBeViewedWhenEditing(e,t=null){return e?!this.data.isEditable:!t?.has(this.data.id)}get viewable(){return null!==this.data.quadPoints&&(0===this.flags||this._isViewable(this.flags))}get printable(){return null!==this.data\ .quadPoints&&(0!==this.flags&&this._isPrintable(this.flags))}_parseStringHelper(e){const t="string"==typeof e?stringToPDFString(e):"";return{str:t,dir:t&&"rtl"===bidi(t).dir?"rtl":"ltr"}}setDefaultAppearance(e){const{dict:t,annotationGlobals:a}=e,r=getInheritableProperty({dict:t,key:"DA"})||a.acroForm.get("DA");this._defaultAppearance="string"==typeof r?r:"";this.data.defaultAppearanceData=parseDefaultAppearance(this._defaultAppearance)}setTitle(e){this._title=this._parseStringHelper(e)}setConte\ nts(e){this._contents=this._parseStringHelper(e)}setModificationDate(e){this.modificationDate="string"==typeof e?e:null}setFlags(e){this.flags=Number.isInteger(e)&&e>0?e:0;this.flags&K&&"Annotation"!==this.constructor.name&&(this.flags^=K)}hasFlag(e){return this._hasFlag(this.flags,e)}setRectangle(e){this.rectangle=lookupNormalRect(e,[0,0,0,0])}setColor(e){this.color=getRgbColor(e)}setLineEndings(e){this.lineEndings=["None","None"];if(Array.isArray(e)&&2===e.length)for(let t=0;t<2;t++){const a=e\ [t];if(a instanceof Name)switch(a.name){case"None":continue;case"Square":case"Circle":case"Diamond":case"OpenArrow":case"ClosedArrow":case"Butt":case"ROpenArrow":case"RClosedArrow":case"Slash":this.lineEndings[t]=a.name;continue}warn(`Ignoring invalid lineEnding: ${a}`)}}setRotation(e,t){this.rotation=0;let a=e instanceof Dict?e.get("R")||0:t.get("Rotate")||0;if(Number.isInteger(a)&&0!==a){a%=360;a<0&&(a+=360);a%90==0&&(this.rotation=a)}}setBorderAndBackgroundColors(e){if(e instanceof Dict){this\ .borderColor=getRgbColor(e.getArray("BC"),null);this.backgroundColor=getRgbColor(e.getArray("BG"),null)}else this.borderColor=this.backgroundColor=null}setBorderStyle(e){this.borderStyle=new AnnotationBorderStyle;if(e instanceof Dict)if(e.has("BS")){const t=e.get("BS");if(t instanceof Dict){const e=t.get("Type");if(!e||isName(e,"Border")){this.borderStyle.setWidth(t.get("W"),this.rectangle);this.borderStyle.setStyle(t.get("S"));this.borderStyle.setDashArray(t.getArray("D"))}}}else if(e.has("Bord\ er")){const t=e.getArray("Border");if(Array.isArray(t)&&t.length>=3){this.borderStyle.setHorizontalCornerRadius(t[0]);this.borderStyle.setVerticalCornerRadius(t[1]);this.borderStyle.setWidth(t[2],this.rectangle);4===t.length&&this.borderStyle.setDashArray(t[3],!0)}}else this.borderStyle.setWidth(0)}setAppearance(e){this.appearance=null;const t=e.get("AP");if(!(t instanceof Dict))return;const a=t.get("N");if(a instanceof BaseStream){this.appearance=a;return}if(!(a instanceof Dict))return;const r=\ e.get("AS");if(!(r instanceof Name&&a.has(r.name)))return;const i=a.get(r.name);i instanceof BaseStream&&(this.appearance=i)}setOptionalContent(e){this.oc=null;const t=e.get("OC");t instanceof Name?warn("setOptionalContent: Support for /Name-entry is not implemented."):t instanceof Dict&&(this.oc=t)}async loadResources(e,t){const a=await t.dict.getAsync("Resources");a&&await ObjectLoader.load(a,e,a.xref);return a}async getOperatorList(e,t,a,r){const{hasOwnCanvas:i,id:n,rect:o}=this.data;let c=th\ is.appearance;const l=!!(i&&a&s);if(l&&(0===this.width||0===this.height)){this.data.hasOwnCanvas=!1;return{opList:new OperatorList,separateForm:!1,separateCanvas:!1}}if(!c){if(!l)return{opList:new OperatorList,separateForm:!1,separateCanvas:!1};c=new StringStream("");c.dict=new Dict}const h=c.dict,u=await this.loadResources(Ia,c),d=lookupRect(h.getArray("BBox"),[0,0,1,1]),f=lookupMatrix(h.getArray("Matrix"),Fa),g=getTransformMatrix(o,d,f),p=new OperatorList;let m;this.oc&&(m=await e.parseMarkedC\ ontentProps(this.oc,null));void 0!==m&&p.addOp(jt,["OC",m]);p.addOp($t,[n,o,g,f,l]);await e.getOperatorList({stream:c,task:t,resources:u,operatorList:p,fallbackFontDict:this._fallbackFontDict});p.addOp(Gt,[]);void 0!==m&&p.addOp(_t,[]);this.reset();return{opList:p,separateForm:!1,separateCanvas:l}}async save(e,t,a,r){return null}get overlaysTextContent(){return!1}get hasTextContent(){return!1}async extractTextContent(e,t,a){if(!this.appearance)return;const r=await this.loadResources(Ta,this.appe\ arance),i=[],n=[];let s=null;const o={desiredSize:Math.Infinity,ready:!0,enqueue(e,t){for(const t of e.items)if(void 0!==t.str){s||=t.transform.slice(-2);n.push(t.str);if(t.hasEOL){i.push(n.join("").trimEnd());n.length=0}}}};await e.getTextContent({stream:this.appearance,task:t,resources:r,includeMarkedContent:!0,keepWhiteSpace:!0,sink:o,viewBox:a});this.reset();n.length&&i.push(n.join("").trimEnd());if(i.length>1||i[0]){const e=this.appearance.dict,t=lookupRect(e.getArray("BBox"),null),a=lookup\ Matrix(e.getArray("Matrix"),null);this.data.textPosition=this._transformPoint(s,t,a);this.data.textContent=i}}_transformPoint(e,t,a){const{rect:r}=this.data;t||=[0,0,1,1];a||=[1,0,0,1,0,0];const i=getTransformMatrix(r,t,a);i[4]-=r[0];i[5]-=r[1];const n=e.slice();Util.applyTransform(n,i);Util.applyTransform(n,a);return n}getFieldObject(){return this.data.kidIds?{id:this.data.id,actions:this.data.actions,name:this.data.fieldName,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor\ ,type:"",kidIds:this.data.kidIds,page:this.data.pageIndex,rotation:this.rotation}:null}reset(){for(const e of this._streams)e.reset()}_constructFieldName(e){if(!e.has("T")&&!e.has("Parent")){warn("Unknown field name, falling back to empty field name.");return""}if(!e.has("Parent"))return stringToPDFString(e.get("T"));const t=[];e.has("T")&&t.unshift(stringToPDFString(e.get("T")));let a=e;const r=new RefSet;e.objId&&r.put(e.objId);for(;a.has("Parent");){a=a.get("Parent");if(!(a instanceof Dict)||\ a.objId&&r.has(a.objId))break;a.objId&&r.put(a.objId);a.has("T")&&t.unshift(stringToPDFString(a.get("T")))}return t.join(".")}get width(){return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}}class AnnotationBorderStyle{constructor(){this.width=1;this.rawWidth=1;this.style=fe;this.dashArray=[3];this.horizontalCornerRadius=0;this.verticalCornerRadius=0}setWidth(e,t=[0,0,0,0]){if(e instanceof Name)this.width=0;else if("number"==typeof e){if(e>0){this.r\ awWidth=e;const a=(t[2]-t[0])/2,r=(t[3]-t[1])/2;if(a>0&&r>0&&(e>a||e>r)){warn(`AnnotationBorderStyle.setWidth - ignoring width: ${e}`);e=1}}this.width=e}}setStyle(e){if(e instanceof Name)switch(e.name){case"S":this.style=fe;break;case"D":this.style=ge;break;case"B":this.style=pe;break;case"I":this.style=me;break;case"U":this.style=be}}setDashArray(e,t=!1){if(Array.isArray(e)){let a=!0,r=!0;for(const t of e){if(!(+t>=0)){a=!1;break}t>0&&(r=!1)}if(0===e.length||a&&!r){this.dashArray=e;t&&this.setS\ tyle(Name.get("D"))}else this.width=0}else e&&(this.width=0)}setHorizontalCornerRadius(e){Number.isInteger(e)&&(this.horizontalCornerRadius=e)}setVerticalCornerRadius(e){Number.isInteger(e)&&(this.verticalCornerRadius=e)}}class MarkupAnnotation extends Annotation{constructor(e){super(e);const{dict:t}=e;if(t.has("IRT")){const e=t.getRaw("IRT");this.data.inReplyTo=e instanceof Ref?e.toString():null;const a=t.get("RT");this.data.replyType=a instanceof Name?a.name:V}let a=null;if(this.data.replyType\ ===G){const e=t.get("IRT");this.setTitle(e.get("T"));this.data.titleObj=this._title;this.setContents(e.get("Contents"));this.data.contentsObj=this._contents;if(e.has("CreationDate")){this.setCreationDate(e.get("CreationDate"));this.data.creationDate=this.creationDate}else this.data.creationDate=null;if(e.has("M")){this.setModificationDate(e.get("M"));this.data.modificationDate=this.modificationDate}else this.data.modificationDate=null;a=e.getRaw("Popup");if(e.has("C")){this.setColor(e.getArray("\ C"));this.data.color=this.color}else this.data.color=null}else{this.data.titleObj=this._title;this.setCreationDate(t.get("CreationDate"));this.data.creationDate=this.creationDate;a=t.getRaw("Popup");t.has("C")||(this.data.color=null)}this.data.popupRef=a instanceof Ref?a.toString():null;t.has("RC")&&(this.data.richText=XFAFactory.getRichTextAsHtml(t.get("RC")))}setCreationDate(e){this.creationDate="string"==typeof e?e:null}_setDefaultAppearance({xref:e,extra:t,strokeColor:a,fillColor:r,blendMode\ :i,strokeAlpha:n,fillAlpha:s,pointsCallback:o}){const c=this.data.rect=[1/0,1/0,-1/0,-1/0],l=["q"];t&&l.push(t);a&&l.push(`${a[0]} ${a[1]} ${a[2]} RG`);r&&l.push(`${r[0]} ${r[1]} ${r[2]} rg`);const h=this.data.quadPoints||Float32Array.from([this.rectangle[0],this.rectangle[3],this.rectangle[2],this.rectangle[3],this.rectangle[0],this.rectangle[1],this.rectangle[2],this.rectangle[1]]);for(let e=0,t=h.length;e"string"==typeof e)).map((e=>stringToPDFString(e))):e instanceof Name?stringToPDFString(e.name):"string"==typeof e?stringToPDFString(e):null}hasFieldFlag(e){return!!(this.data.fieldFlags&e)}_isViewable(e){return!0}mustBeViewed(e,t){return t?this.viewable:super.mustBeViewed(e,t)&&!this._hasFlag(this.flags,Q)}getRotationMatrix(e){let t=e?.get(this.data.id)?.rotation;void 0===t&&(t=this.rotation);return 0===t?Fa:getRotationMatrix(t,this.width,this.height)}getBorder\ AndBackgroundAppearances(e){let t=e?.get(this.data.id)?.rotation;void 0===t&&(t=this.rotation);if(!this.backgroundColor&&!this.borderColor)return"";const a=0===t||180===t?`0 0 ${this.width} ${this.height} re`:`0 0 ${this.height} ${this.width} re`;let r="";this.backgroundColor&&(r=`${getPdfColor(this.backgroundColor,!0)} ${a} f `);if(this.borderColor){r+=`${this.borderStyle.width||1} w ${getPdfColor(this.borderColor,!1)} ${a} S `}return r}async getOperatorList(e,t,a,r){if(a&l&&!(this instanceof S\ ignatureWidgetAnnotation)&&!this.data.noHTML&&!this.data.hasOwnCanvas)return{opList:new OperatorList,separateForm:!0,separateCanvas:!1};if(!this._hasText)return super.getOperatorList(e,t,a,r);const i=await this._getAppearance(e,t,a,r);if(this.appearance&&null===i)return super.getOperatorList(e,t,a,r);const n=new OperatorList;if(!this._defaultAppearance||null===i)return{opList:n,separateForm:!1,separateCanvas:!1};const o=!!(this.data.hasOwnCanvas&&a&s),c=[0,0,this.width,this.height],h=getTransfor\ mMatrix(this.data.rect,c,[1,0,0,1,0,0]);let u;this.oc&&(u=await e.parseMarkedContentProps(this.oc,null));void 0!==u&&n.addOp(jt,["OC",u]);n.addOp($t,[this.data.id,this.data.rect,h,this.getRotationMatrix(r),o]);const d=new StringStream(i);await e.getOperatorList({stream:d,task:t,resources:this._fieldResources.mergedResources,operatorList:n});n.addOp(Gt,[]);void 0!==u&&n.addOp(_t,[]);return{opList:n,separateForm:!1,separateCanvas:o}}_getMKDict(e){const t=new Dict(null);e&&t.set("R",e);t.setIfArray\ ("BC",getPdfColorArray(this.borderColor));t.setIfArray("BG",getPdfColorArray(this.backgroundColor));return t.size>0?t:null}amendSavedDict(e,t){}setValue(e,t,a,r){const{dict:i,ref:n}=function getParentToUpdate(e,t,a){const r=new RefSet,i=e,n={dict:null,ref:null};for(;e instanceof Dict&&!r.has(t);){r.put(t);if(e.has("T"))break;if(!((t=e.getRaw("Parent"))instanceof Ref))return n;e=a.fetch(t)}if(e instanceof Dict&&e!==i){n.dict=e;n.ref=t}return n}(e,this.ref,a);if(i){if(!r.has(n)){const e=i.clone();\ e.set("V",t);r.put(n,{data:e});return e}}else e.set("V",t);return null}async save(e,t,a,r){const i=a?.get(this.data.id),n=this._buildFlags(i?.noView,i?.noPrint);let s=i?.value,o=i?.rotation;if(s===this.data.fieldValue||void 0===s){if(!this._hasValueFromXFA&&void 0===o&&void 0===n)return;s||=this.data.fieldValue}if(void 0===o&&!this._hasValueFromXFA&&Array.isArray(s)&&Array.isArray(this.data.fieldValue)&&isArrayEqual(s,this.data.fieldValue)&&void 0===n)return;void 0===o&&(o=this.rotation);let l=n\ ull;if(!this._needAppearances){l=await this._getAppearance(e,t,c,a);if(null===l&&void 0===n)return}let h=!1;if(l?.needAppearances){h=!0;l=null}const{xref:u}=e,d=u.fetchIfRef(this.ref);if(!(d instanceof Dict))return;const f=new Dict(u);for(const e of d.getKeys())"AP"!==e&&f.set(e,d.getRaw(e));if(void 0!==n){f.set("F",n);if(null===l&&!h){const e=d.getRaw("AP");e&&f.set("AP",e)}}const g={path:this.data.fieldName,value:s},p=this.setValue(f,Array.isArray(s)?s.map(stringToAsciiOrUTF16BE):stringToAscii\ OrUTF16BE(s),u,r);this.amendSavedDict(a,p||f);const m=this._getMKDict(o);m&&f.set("MK",m);r.put(this.ref,{data:f,xfa:g,needAppearances:h});if(null!==l){const e=u.getNewTemporaryRef(),t=new Dict(u);f.set("AP",t);t.set("N",e);const i=this._getSaveFieldResources(u),n=new StringStream(l),s=n.dict=new Dict(u);s.setIfName("Subtype","Form");s.set("Resources",i);const c=o%180==0?[0,0,this.width,this.height]:[0,0,this.height,this.width];s.set("BBox",c);const h=this.getRotationMatrix(a);h!==Fa&&s.set("Mat\ rix",h);r.put(e,{data:n,xfa:null,needAppearances:!1})}f.set("M",`D:${getModificationDate()}`)}async _getAppearance(e,t,a,r){if(this.data.password)return null;const n=r?.get(this.data.id);let s,o;if(n){s=n.formattedValue||n.value;o=n.rotation}if(void 0===o&&void 0===s&&!this._needAppearances&&(!this._hasValueFromXFA||this.appearance))return null;const l=this.getBorderAndBackgroundAppearances(r);if(void 0===s){s=this.data.fieldValue;if(!s)return`/Tx BMC q ${l}Q EMC`}Array.isArray(s)&&1===s.length&\ &(s=s[0]);assert("string"==typeof s,"Expected `value` to be a string.");s=s.trimEnd();if(this.data.combo){const e=this.data.options.find((({exportValue:e})=>s===e));s=e?.displayValue||s}if(""===s)return`/Tx BMC q ${l}Q EMC`;void 0===o&&(o=this.rotation);let h,u=-1;if(this.data.multiLine){h=s.split(/\\r\\n?|\\n/).map((e=>e.normalize("NFC")));u=h.length}else h=[s.replace(/\\r\\n?|\\n/,"").normalize("NFC")];let{width:d,height:f}=this;90!==o&&270!==o||([d,f]=[f,d]);this._defaultAppearance||(this.data.defa\ ultAppearanceData=parseDefaultAppearance(this._defaultAppearance="/Helvetica 0 Tf 0 g"));let g,p,m,b=await WidgetAnnotation._getFontData(e,t,this.data.defaultAppearanceData,this._fieldResources.mergedResources);const y=[];let w=!1;for(const e of h){const t=b.encodeString(e);t.length>1&&(w=!0);y.push(t.join(""))}if(w&&a&c)return{needAppearances:!0};if(w&&this._isOffscreenCanvasSupported){const a=this.data.comb?"monospace":"sans-serif",r=new FakeUnicodeFont(e.xref,a),i=r.createFontResources(h.join\ ("")),n=i.getRaw("Font");if(this._fieldResources.mergedResources.has("Font")){const e=this._fieldResources.mergedResources.get("Font");for(const t of n.getKeys())e.set(t,n.getRaw(t))}else this._fieldResources.mergedResources.set("Font",n);const o=r.fontName.name;b=await WidgetAnnotation._getFontData(e,t,{fontName:o,fontSize:0},i);for(let e=0,t=y.length;e2)return`/Tx BMC q ${l}BT `+g+` 1 0 0 1 ${numberToString(2)} ${numberToString(C)} Tm (${escapeString(y[0])}) Tj ET Q EMC`;return`/Tx BMC q ${l}BT `+g+` 1 0 0 1 0 0 Tm ${this._renderText(y[0],b,p,d,k,{shift:0},2,C)} ET Q EMC`}static async _getFontData(e,t,a,r){const i=new OperatorList,n={font:null,clone(){return this}},{fontName:s,fontSize:o}=a;await e.handleSetFont(r,[s&&Name.\ get(s),o],null,i,t,n,null);return n.font}_getTextWidth(e,t){return Math.sumPrecise(t.charsToGlyphs(e).map((e=>e.width)))/1e3}_computeFontSize(e,t,r,i,n){let{fontSize:s}=this.data.defaultAppearanceData,o=(s||12)*a,c=Math.round(e/o);if(!s){const roundWithTwoDigits=e=>Math.floor(100*e)/100;if(-1===n){const n=this._getTextWidth(r,i);s=roundWithTwoDigits(Math.min(e/a,t/n));c=1}else{const l=r.split(/\\r\\n?|\\n/),h=[];for(const e of l){const t=i.encodeString(e).join(""),a=i.charsToGlyphs(t),r=i.getCharPo\ sitions(t);h.push({line:t,glyphs:a,positions:r})}const isTooBig=a=>{let r=0;for(const n of h){r+=this._splitLine(null,i,a,t,n).length*a;if(r>e)return!0}return!1};c=Math.max(c,n);for(;;){o=e/c;s=roundWithTwoDigits(o/a);if(!isTooBig(s))break;c++}}const{fontName:l,fontColor:h}=this.data.defaultAppearanceData;this._defaultAppearance=function createDefaultAppearance({fontSize:e,fontName:t,fontColor:a}){return`/${escapePDFName(t)} ${e} Tf ${getPdfColor(a,!0)}`}({fontSize:s,fontName:l,fontColor:h})}ret\ urn[this._defaultAppearance,s,e/c]}_renderText(e,t,a,r,i,n,s,o){let c;if(1===i){c=(r-this._getTextWidth(e,t)*a)/2}else if(2===i){c=r-this._getTextWidth(e,t)*a-s}else c=s;const l=numberToString(c-n.shift);n.shift=c;return`${l} ${o=numberToString(o)} Td (${escapeString(e)}) Tj`}_getSaveFieldResources(e){const{localResources:t,appearanceResources:a,acroFormResources:r}=this._fieldResources,i=this.data.defaultAppearanceData?.fontName;if(!i)return t||Dict.empty;for(const e of[t,a])if(e instanceof Dic\ t){const t=e.get("Font");if(t instanceof Dict&&t.has(i))return e}if(r instanceof Dict){const a=r.get("Font");if(a instanceof Dict&&a.has(i)){const r=new Dict(e);r.set(i,a.getRaw(i));const n=new Dict(e);n.set("Font",r);return Dict.merge({xref:e,dictArray:[n,t],mergeSubDicts:!0})}}return t||Dict.empty}getFieldObject(){return null}}class TextWidgetAnnotation extends WidgetAnnotation{constructor(e){super(e);const{dict:t}=e;if(t.has("PMD")){this.flags|=J;this.data.hidden=!0;warn("Barcodes are not sup\ ported")}this.data.hasOwnCanvas=this.data.readOnly&&!this.data.noHTML;this._hasText=!0;"string"!=typeof this.data.fieldValue&&(this.data.fieldValue="");let a=getInheritableProperty({dict:t,key:"Q"});(!Number.isInteger(a)||a<0||a>2)&&(a=null);this.data.textAlignment=a;let r=getInheritableProperty({dict:t,key:"MaxLen"});(!Number.isInteger(r)||r<0)&&(r=0);this.data.maxLen=r;this.data.multiLine=this.hasFieldFlag(ie);this.data.comb=this.hasFieldFlag(de)&&!this.data.multiLine&&!this.data.password&&!th\ is.hasFieldFlag(le)&&0!==this.data.maxLen;this.data.doNotScroll=this.hasFieldFlag(ue);const{data:{actions:i}}=this;if(!i)return;const n=/^AF(Date|Time)_(?:Keystroke|Format)(?:Ex)?\\([\'"]?([^\'"]+)[\'"]?\\);$/;let s=!1;(1===i.Format?.length&&1===i.Keystroke?.length&&n.test(i.Format[0])&&n.test(i.Keystroke[0])||0===i.Format?.length&&1===i.Keystroke?.length&&n.test(i.Keystroke[0])||0===i.Keystroke?.length&&1===i.Format?.length&&n.test(i.Format[0]))&&(s=!0);const o=[];i.Format&&o.push(...i.Format);i.Key\ stroke&&o.push(...i.Keystroke);if(s){delete i.Keystroke;i.Format=o}for(const e of o){const t=e.match(n);if(!t)continue;const a="Date"===t[1];let r=t[2];const i=parseInt(r,10);isNaN(i)||Math.floor(Math.log10(i))+1!==t[2].length||(r=(a?Pn:Ln)[i]??r);this.data.datetimeFormat=r;if(!s)break;if(a){if(/HH|MM|ss|h/.test(r)){this.data.datetimeType="datetime-local";this.data.timeStep=/ss/.test(r)?1:60}else this.data.datetimeType="date";break}this.data.datetimeType="time";this.data.timeStep=/ss/.test(r)?1:\ 60;break}}get hasTextContent(){return!!this.appearance&&!this._needAppearances}_getCombAppearance(e,t,a,r,i,n,s,o,c,l,h){const u=i/this.data.maxLen,d=this.getBorderAndBackgroundAppearances(h),f=[],g=t.getCharPositions(a);for(const[e,t]of g)f.push(`(${escapeString(a.substring(e,t))}) Tj`);const p=f.join(` ${numberToString(u)} 0 Td `);return`/Tx BMC q ${d}BT `+e+` 1 0 0 1 ${numberToString(s)} ${numberToString(o+c)} Tm ${p} ET Q EMC`}_getMultilineAppearance(e,t,a,r,i,n,s,o,c,l,h,u){const d=[],f=i-2\ *o,g={shift:0};for(let e=0,n=t.length;er){c.push(e.substring(d,a));d=a;f=p;l=-1;u=-1}else{f+=p;l=a;h=i;u=t}else if(f+p>r)if(-1!==l){c.push(e.substring(d,h));d=h;t=u+1;l=-1;f=0}else{c.push(e.substring(d,a));d=a;f=p}else f+=p}dt?`\\\\${t}`:"\\\\s+"));new RegExp(`^\\\\s*${n}\\\\s*$`).test(this.data.fieldValue)&&(this.data.textContent=this.data.fieldValue.split("\\n"))}getFieldObject(){return{id:this.data.id,value:this.data.fieldValue,defaultValue:this.data.defaultFieldValue||"",multiline:this.data.multiLine,password:this.data.password,charLimit:this.data.maxLen,comb:this.data.comb,editable:!this.data.readOnly,hidden:this.data.hidden,name:this\ .data.fieldName,rect:this.data.rect,actions:this.data.actions,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,datetimeFormat:this.data.datetimeFormat,hasDatetimeHTML:!!this.data.datetimeType,type:"text"}}}class ButtonWidgetAnnotation extends WidgetAnnotation{constructor(e){super(e);this.checkedAppearance=null;this.uncheckedAppearance=null;const t=this.hasFieldFlag(se),a=this.hasFieldFlag(oe);this.data.checkBox=!t&&!a;this.data\ .radioButton=t&&!a;this.data.pushButton=a;this.data.isTooltipOnly=!1;if(this.data.checkBox)this._processCheckBox(e);else if(this.data.radioButton)this._processRadioButton(e);else if(this.data.pushButton){this.data.hasOwnCanvas=!0;this.data.noHTML=!1;this._processPushButton(e)}else warn("Invalid field flags for button widget annotation")}async getOperatorList(e,t,a,r){if(this.data.pushButton)return super.getOperatorList(e,t,a,!1,r);let i=null,n=null;if(r){const e=r.get(this.data.id);i=e?e.value:n\ ull;n=e?e.rotation:null}if(null===i&&this.appearance)return super.getOperatorList(e,t,a,r);null==i&&(i=this.data.checkBox?this.data.fieldValue===this.data.exportValue:this.data.fieldValue===this.data.buttonValue);const s=i?this.checkedAppearance:this.uncheckedAppearance;if(s){const i=this.appearance,o=lookupMatrix(s.dict.getArray("Matrix"),Fa);n&&s.dict.set("Matrix",this.getRotationMatrix(r));this.appearance=s;const c=super.getOperatorList(e,t,a,r);this.appearance=i;s.dict.set("Matrix",o);return\ c}return{opList:new OperatorList,separateForm:!1,separateCanvas:!1}}async save(e,t,a,r){this.data.checkBox?this._saveCheckbox(e,t,a,r):this.data.radioButton&&this._saveRadioButton(e,t,a,r)}async _saveCheckbox(e,t,a,r){if(!a)return;const i=a.get(this.data.id),n=this._buildFlags(i?.noView,i?.noPrint);let s=i?.rotation,o=i?.value;if(void 0===s&&void 0===n){if(void 0===o)return;if(this.data.fieldValue===this.data.exportValue===o)return}let c=e.xref.fetchIfRef(this.ref);if(!(c instanceof Dict))retur\ n;c=c.clone();void 0===s&&(s=this.rotation);void 0===o&&(o=this.data.fieldValue===this.data.exportValue);const l={path:this.data.fieldName,value:o?this.data.exportValue:""},h=Name.get(o?this.data.exportValue:"Off");this.setValue(c,h,e.xref,r);c.set("AS",h);c.set("M",`D:${getModificationDate()}`);void 0!==n&&c.set("F",n);const u=this._getMKDict(s);u&&c.set("MK",u);r.put(this.ref,{data:c,xfa:l,needAppearances:!1})}async _saveRadioButton(e,t,a,r){if(!a)return;const i=a.get(this.data.id),n=this._bui\ ldFlags(i?.noView,i?.noPrint);let s=i?.rotation,o=i?.value;if(void 0===s&&void 0===n){if(void 0===o)return;if(this.data.fieldValue===this.data.buttonValue===o)return}let c=e.xref.fetchIfRef(this.ref);if(!(c instanceof Dict))return;c=c.clone();void 0===o&&(o=this.data.fieldValue===this.data.buttonValue);void 0===s&&(s=this.rotation);const l={path:this.data.fieldName,value:o?this.data.buttonValue:""},h=Name.get(o?this.data.buttonValue:"Off");o&&this.setValue(c,h,e.xref,r);c.set("AS",h);c.set("M",`\ D:${getModificationDate()}`);void 0!==n&&c.set("F",n);const u=this._getMKDict(s);u&&c.set("MK",u);r.put(this.ref,{data:c,xfa:l,needAppearances:!1})}_getDefaultCheckedAppearance(e,t){const{width:a,height:r}=this,i=[0,0,a,r],n=.8*Math.min(a,r);let s,o;if("check"===t){s={width:.755*n,height:.705*n};o="3"}else if("disc"===t){s={width:.791*n,height:.705*n};o="l"}else unreachable(`_getDefaultCheckedAppearance - unsupported type: ${t}`);const c=`q BT /PdfJsZaDb ${n} Tf 0 g ${numberToString((a-s.width)/\ 2)} ${numberToString((r-s.height)/2)} Td (${o}) Tj ET Q`,l=new Dict(e.xref);l.set("FormType",1);l.setIfName("Subtype","Form");l.setIfName("Type","XObject");l.set("BBox",i);l.set("Matrix",[1,0,0,1,0,0]);l.set("Length",c.length);const h=new Dict(e.xref),u=new Dict(e.xref);u.set("PdfJsZaDb",this.fallbackFontDict);h.set("Font",u);l.set("Resources",h);this.checkedAppearance=new StringStream(c);this.checkedAppearance.dict=l;this._streams.push(this.checkedAppearance)}_processCheckBox(e){const t=e.dict.\ get("AP");if(!(t instanceof Dict))return;const a=t.get("N");if(!(a instanceof Dict))return;const r=this._decodeFormValue(e.dict.get("AS"));"string"==typeof r&&(this.data.fieldValue=r);const i=null!==this.data.fieldValue&&"Off"!==this.data.fieldValue?this.data.fieldValue:"Yes",n=this._decodeFormValue(a.getKeys());if(0===n.length)n.push("Off",i);else if(1===n.length)"Off"===n[0]?n.push(i):n.unshift("Off");else if(n.includes(i)){n.length=0;n.push("Off",i)}else{const e=n.find((e=>"Off"!==e));n.lengt\ h=0;n.push("Off",e)}n.includes(this.data.fieldValue)||(this.data.fieldValue="Off");this.data.exportValue=n[1];const s=a.get(this.data.exportValue);this.checkedAppearance=s instanceof BaseStream?s:null;const o=a.get("Off");this.uncheckedAppearance=o instanceof BaseStream?o:null;this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(e,"check");this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance);this._fallbackFontDict=this.fallbackFont\ Dict;null===this.data.defaultFieldValue&&(this.data.defaultFieldValue="Off")}_processRadioButton(e){this.data.buttonValue=null;const t=e.dict.get("Parent");if(t instanceof Dict){this.parent=e.dict.getRaw("Parent");const a=t.get("V");a instanceof Name&&(this.data.fieldValue=this._decodeFormValue(a))}const a=e.dict.get("AP");if(!(a instanceof Dict))return;const r=a.get("N");if(!(r instanceof Dict))return;for(const e of r.getKeys())if("Off"!==e){this.data.buttonValue=this._decodeFormValue(e);break}\ const i=r.get(this.data.buttonValue);this.checkedAppearance=i instanceof BaseStream?i:null;const n=r.get("Off");this.uncheckedAppearance=n instanceof BaseStream?n:null;this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(e,"disc");this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance);this._fallbackFontDict=this.fallbackFontDict;null===this.data.defaultFieldValue&&(this.data.defaultFieldValue="Off")}_processPushButton(e){const{dict:t\ ,annotationGlobals:a}=e;if(t.has("A")||t.has("AA")||this.data.alternativeText){this.data.isTooltipOnly=!t.has("A")&&!t.has("AA");Catalog.parseDestDictionary({destDict:t,resultObj:this.data,docBaseUrl:a.baseUrl,docAttachments:a.attachments})}else warn("Push buttons without action dictionaries are not supported")}getFieldObject(){let e,t="button";if(this.data.checkBox){t="checkbox";e=this.data.exportValue}else if(this.data.radioButton){t="radiobutton";e=this.data.buttonValue}return{id:this.data.id\ ,value:this.data.fieldValue||"Off",defaultValue:this.data.defaultFieldValue,exportValues:e,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,hidden:this.data.hidden,actions:this.data.actions,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:t}}get fallbackFontDict(){const e=new Dict;e.setIfName("BaseFont","ZapfDingbats");e.setIfName("Type","FallbackType");e.setIfName("Subtype","FallbackType");e.setIf\ Name("Encoding","ZapfDingbatsEncoding");return shadow(this,"fallbackFontDict",e)}}class ChoiceWidgetAnnotation extends WidgetAnnotation{constructor(e){super(e);const{dict:t,xref:a}=e;this.indices=t.getArray("I");this.hasIndices=Array.isArray(this.indices)&&this.indices.length>0;this.data.options=[];const r=getInheritableProperty({dict:t,key:"Opt"});if(Array.isArray(r))for(let e=0,t=r.length;e=0&&t0&&(this.data.options=this.data.fieldValue.m\ ap((e=>({exportValue:e,displayValue:e}))));this.data.combo=this.hasFieldFlag(ce);this.data.multiSelect=this.hasFieldFlag(he);this._hasText=!0}getFieldObject(){const e=this.data.combo?"combobox":"listbox",t=this.data.fieldValue.length>0?this.data.fieldValue[0]:null;return{id:this.data.id,value:t,defaultValue:this.data.defaultFieldValue,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,numItems:this.data.fieldValue.length,multipleSelection:this.data.multiSelect,hidden:this.\ data.hidden,actions:this.data.actions,items:this.data.options,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:e}}amendSavedDict(e,t){if(!this.hasIndices)return;let a=e?.get(this.data.id)?.value;Array.isArray(a)||(a=[a]);const r=[],{options:i}=this.data;for(let e=0,t=0,n=i.length;ea){a=r;t=e}}[f,g]=this._computeFontSize(e,c-4,t,d,-1)}const p=g*a,m=(p-g)/2,b=Math.floor(l/p);let y=0;if(u.length>0){const e=Math.min(...u),t=Math.max(...u);y=Math.max(0,t-b+1);y\ >e&&(y=e)}const w=Math.min(y+b+1,h),x=["/Tx BMC q",`1 1 ${c} ${l} re W n`];if(u.length){x.push("0.600006 0.756866 0.854904 rg");for(const e of u)y<=e&&ee.trimEnd()));const{coords:e,bbox:t,matrix:r}=FakeUnicodeFont.getFirstPositionInfo(this.rectangle,this.rotation,a);this.data.textPosition=this._transformPoint(e,t,r)}if(this._isOffscreenCanvasSupported){const i=e.dict.get("CA"),n=new FakeUnico\ deFont(r,"sans-serif");this.appearance=n.createAppearance(this._contents.str,this.rectangle,this.rotation,a,t,i);this._streams.push(this.appearance)}else warn("FreeTextAnnotation: OffscreenCanvas is not supported, annotation may not render correctly.")}}get hasTextContent(){return this._hasAppearance}static createNewDict(e,t,{apRef:a,ap:r}){const{color:i,date:n,fontSize:s,oldAnnotation:o,rect:c,rotation:l,user:h,value:u}=e,d=o||new Dict(t);d.setIfNotExists("Type",Name.get("Annot"));d.setIfNotExi\ sts("Subtype",Name.get("FreeText"));d.set(o?"M":"CreationDate",`D:${getModificationDate(n)}`);o&&d.delete("RC");d.setIfArray("Rect",c);const f=`/Helv ${s} Tf ${getPdfColor(i,!0)}`;d.set("DA",f);d.setIfDefined("Contents",stringToAsciiOrUTF16BE(u));d.setIfNotExists("F",4);d.setIfNotExists("Border",[0,0,0]);d.setIfNumber("Rotate",l);d.setIfDefined("T",stringToAsciiOrUTF16BE(h));if(a||r){const e=new Dict(t);d.set("AP",e);e.set("N",a||r)}return d}static async createNewAppearanceStream(e,t,r){const{ba\ seFontRef:i,evaluator:n,task:s}=r,{color:o,fontSize:c,rect:l,rotation:h,value:u}=e;if(!o)return null;const d=new Dict(t),f=new Dict(t);if(i)f.set("Helv",i);else{const e=new Dict(t);e.setIfName("BaseFont","Helvetica");e.setIfName("Type","Font");e.setIfName("Subtype","Type1");e.setIfName("Encoding","WinAnsiEncoding");f.set("Helv",e)}d.set("Font",f);const g=await WidgetAnnotation._getFontData(n,s,{fontName:"Helv",fontSize:c},d),[p,m,b,y]=l;let w=b-p,x=y-m;h%180!=0&&([w,x]=[x,w]);const S=u.split("\\n\ "),k=c/1e3;let C=-1/0;const v=[];for(let e of S){const t=g.encodeString(e);if(t.length>1)return null;e=t.join("");v.push(e);let a=0;const r=g.charsToGlyphs(e);for(const e of r)a+=e.width*k;C=Math.max(C,a)}let F=1;C>w&&(F=w/C);let T=1;const O=a*c,M=1*c,D=O*S.length;D>x&&(T=x/D);const R=c*Math.min(F,T);let N,E,L;switch(h){case 0:L=[1,0,0,1];E=[l[0],l[1],w,x];N=[l[0],l[3]-M];break;case 90:L=[0,1,-1,0];E=[l[1],-l[2],w,x];N=[l[1],-l[0]-M];break;case 180:L=[-1,0,0,-1];E=[-l[2],-l[3],w,x];N=[-l[2],-l[1\ ]-M];break;case 270:L=[0,-1,1,0];E=[-l[3],l[0],w,x];N=[-l[3],l[2]-M]}const j=["q",`${L.join(" ")} 0 0 cm`,`${E.join(" ")} re W n`,"BT",`${getPdfColor(o,!0)}`,`0 Tc /Helv ${numberToString(R)} Tf`];j.push(`${N.join(" ")} Td (${escapeString(v[0])}) Tj`);const _=numberToString(O);for(let e=1,t=v.length;e{e.push(`${r[0]} ${r[1]} m`,`${r[2]} ${r[\ 3]} l`,"S");return[t[0]-o,t[7]-o,t[2]+o,t[3]+o]}})}}}class SquareAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t,xref:a}=e;this.data.annotationType=D;this.data.hasOwnCanvas=this.data.noRotate;this.data.noHTML=!1;if(!this.appearance){const e=getPdfColorArray(this.color,[0,0,0]),r=t.get("CA"),i=getPdfColorArray(getRgbColor(t.getArray("IC"),null)),n=i?r:null;if(0===this.borderStyle.width&&!i)return;this._setDefaultAppearance({xref:a,extra:`${this.borderStyle.width} w`,strok\ eColor:e,fillColor:i,strokeAlpha:r,fillAlpha:n,pointsCallback:(e,t)=>{const a=t[4]+this.borderStyle.width/2,r=t[5]+this.borderStyle.width/2,n=t[6]-t[4]-this.borderStyle.width,s=t[3]-t[7]-this.borderStyle.width;e.push(`${a} ${r} ${n} ${s} re`);i?e.push("B"):e.push("S");return[t[0],t[7],t[2],t[3]]}})}}}class CircleAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t,xref:a}=e;this.data.annotationType=R;if(!this.appearance){const e=getPdfColorArray(this.color,[0,0,0]),r=t.get("C\ A"),i=getPdfColorArray(getRgbColor(t.getArray("IC"),null)),n=i?r:null;if(0===this.borderStyle.width&&!i)return;const s=4/3*Math.tan(Math.PI/8);this._setDefaultAppearance({xref:a,extra:`${this.borderStyle.width} w`,strokeColor:e,fillColor:i,strokeAlpha:r,fillAlpha:n,pointsCallback:(e,t)=>{const a=t[0]+this.borderStyle.width/2,r=t[1]-this.borderStyle.width/2,n=t[6]-this.borderStyle.width/2,o=t[7]+this.borderStyle.width/2,c=a+(n-a)/2,l=r+(o-r)/2,h=(n-a)/2*s,u=(o-r)/2*s;e.push(`${c} ${o} m`,`${c+h} \ ${o} ${n} ${l+u} ${n} ${l} c`,`${n} ${l-u} ${c+h} ${r} ${c} ${r} c`,`${c-h} ${r} ${a} ${l-u} ${a} ${l} c`,`${a} ${l+u} ${c-h} ${o} ${c} ${o} c`,"h");i?e.push("B"):e.push("S");return[t[0],t[7],t[2],t[3]]}})}}}class PolylineAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t,xref:a}=e;this.data.annotationType=E;this.data.hasOwnCanvas=this.data.noRotate;this.data.noHTML=!1;this.data.vertices=null;if(!(this instanceof PolygonAnnotation)){this.setLineEndings(t.getArray("LE"));thi\ s.data.lineEndings=this.lineEndings}const r=t.getArray("Vertices");if(!isNumberArray(r,null))return;const i=this.data.vertices=Float32Array.from(r);if(!this.appearance){const e=getPdfColorArray(this.color,[0,0,0]),r=t.get("CA");let n,s=getRgbColor(t.getArray("IC"),null);s&&(s=getPdfColorArray(s));n=s?this.color?s.every(((t,a)=>t===e[a]))?"f":"B":"f":"S";const o=this.borderStyle.width||1,c=2*o,l=[1/0,1/0,-1/0,-1/0];for(let e=0,t=i.length;e{for(let t=0,a=i.length;t{for(const t of this.data.inkLists){for(let a=0,r=t.length;a0){const e=new Dict(t);g.set("BS",e);e.set("W",d)}g.setIfArray("C",getPdfColorArray(n));g.setIfNumber("CA",o);if(r||a){const e=new Dict(t);g.set("AP",e);e.set("N",a||r)}return g}static async createNewAppearanceStream(e,t,a){if(e.outlines)return this.createNewAppearanceStream\ ForHighlight(e,t,a);const{color:r,rect:i,paths:n,thickness:s,opacity:o}=e;if(!r)return null;const c=[`${s} w 1 J 1 j`,`${getPdfColor(r,!1)}`];1!==o&&c.push("/R0 gs");for(const e of n.lines){c.push(`${numberToString(e[4])} ${numberToString(e[5])} m`);for(let t=6,a=e.length;t{e.push(`${t[0]} ${t[1]} m`,`${t[2]} ${t[3]} l`,`${t[6]} ${t[7]} l`,`${t[4]} ${t[5]} l`,"f");return[t[0],t[7],t[2],t[3]]}})}}else this.data.popu\ pRef=null}get overlaysTextContent(){return!0}static createNewDict(e,t,{apRef:a,ap:r}){const{color:i,date:n,oldAnnotation:s,opacity:o,rect:c,rotation:l,user:h,quadPoints:u}=e,d=s||new Dict(t);d.setIfNotExists("Type",Name.get("Annot"));d.setIfNotExists("Subtype",Name.get("Highlight"));d.set(s?"M":"CreationDate",`D:${getModificationDate(n)}`);d.setIfArray("Rect",c);d.setIfNotExists("F",4);d.setIfNotExists("Border",[0,0,0]);d.setIfNumber("Rotate",l);d.setIfArray("QuadPoints",u);d.setIfArray("C",getP\ dfColorArray(i));d.setIfNumber("CA",o);d.setIfDefined("T",stringToAsciiOrUTF16BE(h));if(a||r){const e=new Dict(t);d.set("AP",e);e.set("N",a||r)}return d}static async createNewAppearanceStream(e,t,a){const{color:r,rect:i,outlines:n,opacity:s}=e;if(!r)return null;const o=[`${getPdfColor(r,!0)}`,"/R0 gs"],c=[];for(const e of n){c.length=0;c.push(`${numberToString(e[0])} ${numberToString(e[1])} m`);for(let t=2,a=e.length;t{e.push(`${t[4]} ${t[5]+1.3} m`,`${t[6]} ${t[7]+1.3} l`,"S");return[t[0],t[7],t[2],t[3]]}})}}else this.data.popupRef=null}get overlaysTextContent(){return!0}}class SquigglyAnnotation extends MarkupAnnotat\ ion{constructor(e){super(e);const{dict:t,xref:a}=e;this.data.annotationType=_;if(this.data.quadPoints=getQuadPoints(t,null)){if(!this.appearance){const e=getPdfColorArray(this.color,[0,0,0]),r=t.get("CA");this._setDefaultAppearance({xref:a,extra:"[] 0 d 1 w",strokeColor:e,strokeAlpha:r,pointsCallback:(e,t)=>{const a=(t[1]-t[5])/6;let r=a,i=t[4];const n=t[5],s=t[6];e.push(`${i} ${n+r} m`);do{i+=2;r=0===r?a:0;e.push(`${i} ${n+r} l`)}while(i{e.push((t[0]+t[4])/2+" "+(t[1]+t[5])/2+" m",(t[2]+t[6])/2+" "+(t[3]+t[7])/2+" l","S");ret\ urn[t[0],t[7],t[2],t[3]]}})}}else this.data.popupRef=null}get overlaysTextContent(){return!0}}class StampAnnotation extends MarkupAnnotation{#pe=null;constructor(e){super(e);this.data.annotationType=X;this.data.hasOwnCanvas=this.data.noRotate;this.data.isEditable=!this.data.noHTML;this.data.noHTML=!1}mustBeViewedWhenEditing(e,t=null){if(e){if(!this.data.isEditable)return!0;this.#pe??=this.data.hasOwnCanvas;this.data.hasOwnCanvas=!0;return!0}if(null!==this.#pe){this.data.hasOwnCanvas=this.#pe;thi\ s.#pe=null}return!t?.has(this.data.id)}static async createImage(e,t){const{width:a,height:r}=e,i=new OffscreenCanvas(a,r),n=i.getContext("2d",{alpha:!0});n.drawImage(e,0,0);const s=n.getImageData(0,0,a,r).data,o=new Uint32Array(s.buffer),c=o.some(FeatureTest.isLittleEndian?e=>e>>>24!=255:e=>!!(255&~e));if(c){n.fillStyle="white";n.fillRect(0,0,a,r);n.drawImage(e,0,0)}const l=i.convertToBlob({type:"image/jpeg",quality:1}).then((e=>e.arrayBuffer())),h=Name.get("XObject"),u=Name.get("Image"),d=new D\ ict(t);d.set("Type",h);d.set("Subtype",u);d.set("BitsPerComponent",8);d.setIfName("ColorSpace","DeviceRGB");d.setIfName("Filter","DCTDecode");d.set("BBox",[0,0,a,r]);d.set("Width",a);d.set("Height",r);let f=null;if(c){const e=new Uint8Array(o.length);if(FeatureTest.isLittleEndian)for(let t=0,a=o.length;t>>24;else for(let t=0,a=o.length;t=0&&n<=1?n:null}}const pc={get r(){return shadow(this,"r",new Uint8Array([7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,\ 21,6,10,15,21]))},get k(){return shadow(this,"k",new Int32Array([-680876936,-389564586,606105819,-1044525330,-176418897,1200080426,-1473231341,-45705983,1770035416,-1958414417,-42063,-1990404162,1804603682,-40341101,-1502002290,1236535329,-165796510,-1069501632,643717713,-373897302,-701558691,38016083,-660478335,-405537848,568446438,-1019803690,-187363961,1163531501,-1444681467,-51403784,1735328473,-1926607734,-378558,-2022574463,1839030562,-35309556,-1530992060,1272893353,-155497632,-1094730640\ ,681279174,-358537222,-722521979,76029189,-640364487,-421815835,530742520,-995338651,-198630844,1126891415,-1416354905,-57434055,1700485571,-1894986606,-1051523,-2054922799,1873313359,-30611744,-1560198380,1309151649,-145523070,-1120210379,718787259,-343485551]))}};function calculateMD5(e,t,a){let r=1732584193,i=-271733879,n=-1732584194,s=271733878;const o=a+72&-64,c=new Uint8Array(o);let l,h;for(l=0;l>5&255;c[l++]=a>>\ 13&255;c[l++]=a>>21&255;c[l++]=a>>>29&255;l+=3;const d=new Int32Array(16),{k:f,r:g}=pc;for(l=0;l>>32-n)|0;a=r}r=r+a|0;i=i+o|0;n=n+u|0;s=s+p|0}return new Uint8Array([255&r,r>>8&255,r>>16&255,r>>>24&255,255&i,i>>8&255,\ i>>16&255,i>>>24&255,255&n,n>>8&255,n>>16&255,n>>>24&255,255&s,s>>8&255,s>>16&255,s>>>24&255])}function decodeString(e){try{return stringToUTF8String(e)}catch(t){warn(`UTF-8 decoding failed: "${t}".`);return e}}class DatasetXMLParser extends SimpleXMLParser{constructor(e){super(e);this.node=null}onEndElement(e){const t=super.onEndElement(e);if(t&&"xfa:datasets"===e){this.node=t;throw new Error("Aborting DatasetXMLParser.")}}}class DatasetReader{constructor(e){if(e.datasets)this.node=new SimpleXM\ LParser({hasAttributes:!0}).parseFromString(e.datasets).documentElement;else{const t=new DatasetXMLParser({hasAttributes:!0});try{t.parseFromString(e["xdp:xdp"])}catch{}this.node=t.node}}getValue(e){if(!this.node||!e)return"";const t=this.node.searchNode(parseXFAPath(e),0);if(!t)return"";const a=t.firstChild;return"value"===a?.nodeName?t.children.map((e=>decodeString(e.textContent))):decodeString(t.textContent)}}class SingleIntersector{#be;#ye=1/0;#we=1/0;#xe=-1/0;#Se=-1/0;#Ae=null;#ke=[];#Ce=[]\ ;#ve=-1;#Fe=!1;constructor(e){this.#be=e;const t=e.data.quadPoints;if(t){for(let e=0,a=t.length;e8&&(this.#Ae=t)}else[this.#ye,this.#we,this.#xe,this.#Se]=e.data.rect}overlaps(e){return!(this.#ye>=e.#xe||this.#xe<=e.#ye||this.#we>=e.#Se||this.#Se<=e.#we)}#Ie(e,t){if(this.#ye>=e||this.#xe<=e||this.#we>=t||this.#Se<=t)return!1;const a=this.#Ae;\ if(!a)return!0;if(this.#ve>=0){const r=this.#ve;if(!(a[r]>=e||a[r+2]<=e||a[r+5]>=t||a[r+1]<=t))return!0;this.#ve=-1}for(let r=0,i=a.length;r=e||a[r+2]<=e||a[r+5]>=t||a[r+1]<=t)){this.#ve=r;return!0}return!1}addGlyph(e,t,a){if(!this.#Ie(e,t)){this.disableExtraChars();return!1}if(this.#Ce.length>0){this.#ke.push(this.#Ce.join(""));this.#Ce.length=0}this.#ke.push(a);this.#Fe=!0;return!0}addExtraChar(e){this.#Fe&&this.#Ce.push(e)}disableExtraChars(){if(this.#Fe){this.#Fe=!1;this.#C\ e.length=0}}setText(){this.#be.data.overlaidText=this.#ke.join("")}}class Intersector{#Te=new Map;constructor(e){for(const t of e){if(!t.data.quadPoints&&!t.data.rect)continue;const e=new SingleIntersector(t);for(const[t,a]of this.#Te)t.overlaps(e)&&(a?a.add(e):this.#Te.set(t,new Set([e])));this.#Te.set(e,null)}}addGlyph(e,t,a,r){const i=e[4]+t/2,n=e[5]+a/2;let s;for(const[e,t]of this.#Te)s?s.has(e)?e.addGlyph(i,n,r):e.disableExtraChars():e.addGlyph(i,n,r)&&(s=t)}addExtraChar(e){for(const t of t\ his.#Te.keys())t.addExtraChar(e)}setText(){for(const e of this.#Te.keys())e.setText()}}class Word64{constructor(e,t){this.high=0|e;this.low=0|t}and(e){this.high&=e.high;this.low&=e.low}xor(e){this.high^=e.high;this.low^=e.low}shiftRight(e){if(e>=32){this.low=this.high>>>e-32|0;this.high=0}else{this.low=this.low>>>e|this.high<<32-e;this.high=this.high>>>e|0}}rotateRight(e){let t,a;if(32&e){a=this.low;t=this.high}else{t=this.low;a=this.high}e&=31;this.low=t>>>e|a<<32-e;this.high=a>>>e|t<<32-e}not(\ ){this.high=~this.high;this.low=~this.low}add(e){const t=(this.low>>>0)+(e.low>>>0);let a=(this.high>>>0)+(e.high>>>0);t>4294967295&&(a+=1);this.low=0|t;this.high=0|a}copyTo(e,t){e[t]=this.high>>>24&255;e[t+1]=this.high>>16&255;e[t+2]=this.high>>8&255;e[t+3]=255&this.high;e[t+4]=this.low>>>24&255;e[t+5]=this.low>>16&255;e[t+6]=this.low>>8&255;e[t+7]=255&this.low}assign(e){this.high=e.high;this.low=e.low}}const mc={get k(){return shadow(this,"k",[new Word64(1116352408,3609767458),new Word64(18994\ 47441,602891725),new Word64(3049323471,3964484399),new Word64(3921009573,2173295548),new Word64(961987163,4081628472),new Word64(1508970993,3053834265),new Word64(2453635748,2937671579),new Word64(2870763221,3664609560),new Word64(3624381080,2734883394),new Word64(310598401,1164996542),new Word64(607225278,1323610764),new Word64(1426881987,3590304994),new Word64(1925078388,4068182383),new Word64(2162078206,991336113),new Word64(2614888103,633803317),new Word64(3248222580,3479774868),new Word64(3\ 835390401,2666613458),new Word64(4022224774,944711139),new Word64(264347078,2341262773),new Word64(604807628,2007800933),new Word64(770255983,1495990901),new Word64(1249150122,1856431235),new Word64(1555081692,3175218132),new Word64(1996064986,2198950837),new Word64(2554220882,3999719339),new Word64(2821834349,766784016),new Word64(2952996808,2566594879),new Word64(3210313671,3203337956),new Word64(3336571891,1034457026),new Word64(3584528711,2466948901),new Word64(113926993,3758326383),new Word\ 64(338241895,168717936),new Word64(666307205,1188179964),new Word64(773529912,1546045734),new Word64(1294757372,1522805485),new Word64(1396182291,2643833823),new Word64(1695183700,2343527390),new Word64(1986661051,1014477480),new Word64(2177026350,1206759142),new Word64(2456956037,344077627),new Word64(2730485921,1290863460),new Word64(2820302411,3158454273),new Word64(3259730800,3505952657),new Word64(3345764771,106217008),new Word64(3516065817,3606008344),new Word64(3600352804,1432725776),new \ Word64(4094571909,1467031594),new Word64(275423344,851169720),new Word64(430227734,3100823752),new Word64(506948616,1363258195),new Word64(659060556,3750685593),new Word64(883997877,3785050280),new Word64(958139571,3318307427),new Word64(1322822218,3812723403),new Word64(1537002063,2003034995),new Word64(1747873779,3602036899),new Word64(1955562222,1575990012),new Word64(2024104815,1125592928),new Word64(2227730452,2716904306),new Word64(2361852424,442776044),new Word64(2428436474,593698344),new\ Word64(2756734187,3733110249),new Word64(3204031479,2999351573),new Word64(3329325298,3815920427),new Word64(3391569614,3928383900),new Word64(3515267271,566280711),new Word64(3940187606,3454069534),new Word64(4118630271,4000239992),new Word64(116418474,1914138554),new Word64(174292421,2731055270),new Word64(289380356,3203993006),new Word64(460393269,320620315),new Word64(685471733,587496836),new Word64(852142971,1086792851),new Word64(1017036298,365543100),new Word64(1126000580,2618297676),new\ Word64(1288033470,3409855158),new Word64(1501505948,4234509866),new Word64(1607167915,987167468),new Word64(1816402316,1246189591)])}};function ch(e,t,a,r,i){e.assign(t);e.and(a);i.assign(t);i.not();i.and(r);e.xor(i)}function maj(e,t,a,r,i){e.assign(t);e.and(a);i.assign(t);i.and(r);e.xor(i);i.assign(a);i.and(r);e.xor(i)}function sigma(e,t,a){e.assign(t);e.rotateRight(28);a.assign(t);a.rotateRight(34);e.xor(a);a.assign(t);a.rotateRight(39);e.xor(a)}function sigmaPrime(e,t,a){e.assign(t);e.rotate\ Right(14);a.assign(t);a.rotateRight(18);e.xor(a);a.assign(t);a.rotateRight(41);e.xor(a)}function littleSigma(e,t,a){e.assign(t);e.rotateRight(1);a.assign(t);a.rotateRight(8);e.xor(a);a.assign(t);a.shiftRight(7);e.xor(a)}function littleSigmaPrime(e,t,a){e.assign(t);e.rotateRight(19);a.assign(t);a.rotateRight(61);e.xor(a);a.assign(t);a.shiftRight(6);e.xor(a)}function calculateSHA512(e,t,a,r=!1){let i,n,s,o,c,l,h,u;if(r){i=new Word64(3418070365,3238371032);n=new Word64(1654270250,914150663);s=new W\ ord64(2438529370,812702999);o=new Word64(355462360,4144912697);c=new Word64(1731405415,4290775857);l=new Word64(2394180231,1750603025);h=new Word64(3675008525,1694076839);u=new Word64(1203062813,3204075428)}else{i=new Word64(1779033703,4089235720);n=new Word64(3144134277,2227873595);s=new Word64(1013904242,4271175723);o=new Word64(2773480762,1595750129);c=new Word64(1359893119,2917565137);l=new Word64(2600822924,725511199);h=new Word64(528734635,4215389547);u=new Word64(1541459225,327033209)}con\ st d=128*Math.ceil((a+17)/128),f=new Uint8Array(d);let g,p;for(g=0;g>>29&255;f[g++]=a>>21&255;f[g++]=a>>13&255;f[g++]=a>>5&255;f[g++]=a<<3&255;const b=new Array(80);for(g=0;g<80;g++)b[g]=new Word64(0,0);const{k:y}=mc;let w=new Word64(0,0),x=new Word64(0,0),S=new Word64(0,0),k=new Word64(0,0),C=new Word64(0,0),v=new Word64(0,0),F=new Word64(0,0),T=new Word64(0,0);const O=new Word64(0,0),M=new Word64(0,0),D=new Word64(0,0),R=new \ Word64(0,0);let N,E;for(g=0;g>>t|e<<32-t}function calculate_sha256_ch(e,t,a){return e&t^~e&a}function calculate_sha256_maj(e,t,a){return e&t^e&a^t&a}function calculate_sha256_sigma(e){return rotr(e,2)^rotr(e,13)^rotr(e,22)}function calculate_sha256_sigmaPrime(e){return rotr(e,6)^rotr(e,11)^rotr(e,25)}function calculate_sha256_littleSigma(e){return rotr\ (e,7)^rotr(e,18)^e>>>3}function calculateSHA256(e,t,a){let r=1779033703,i=3144134277,n=1013904242,s=2773480762,o=1359893119,c=2600822924,l=528734635,h=1541459225;const u=64*Math.ceil((a+9)/64),d=new Uint8Array(u);let f,g;for(f=0;f>>29&255;d[f++]=a>>21&255;d[f++]=a>>13&255;d[f++]=a>>5&255;d[f++]=a<<3&255;const m=new Uint32Array(64),{k:b}=bc;for(f=0;f>>10)+m[g-7]+calculate_sha256_littleSigma(m[g-15])+m[g-16]|0;let e,t,a=r,u=i,p=n,w=s,x=o,S=c,k=l,C=h;for(g=0;g<64;++g){e=C+calculate_sha256_sigmaPrime(x)+calculate_sha256_ch(x,S,k)+b[g]+m[g];t=calculate_sha256_sigma(a)+calculate_sha256_maj(a,u,p);C=k;k=S;S=x;x=w+e|0;w=p;p=u;u=a;a=e+t|0}r=r+a|0;i=i+u|0;n=n+p|0;s=s+w|0;o=o+x|0;c=c+S|0;l=l+k|0;h=h+C|0}var y;return new Uint8Array([r>>24&255,r>>16&255,r>>8&255,255&r,i>>24&255,i>>16&255,i>>8&255,255&i,n>>24&2\ 55,n>>16&255,n>>8&255,255&n,s>>24&255,s>>16&255,s>>8&255,255&s,o>>24&255,o>>16&255,o>>8&255,255&o,c>>24&255,c>>16&255,c>>8&255,255&c,l>>24&255,l>>16&255,l>>8&255,255&l,h>>24&255,h>>16&255,h>>8&255,255&h])}class DecryptStream extends DecodeStream{constructor(e,t,a){super(t);this.str=e;this.dict=e.dict;this.decrypt=a;this.nextChunk=null;this.initialized=!1}readBlock(){let e;if(this.initialized)e=this.nextChunk;else{e=this.str.getBytes(512);this.initialized=!0}if(!e?.length){this.eof=!0;return}this\ .nextChunk=this.str.getBytes(512);const t=this.nextChunk?.length>0;e=(0,this.decrypt)(e,!t);const a=this.bufferLength,r=a+e.length;this.ensureBuffer(r).set(e,a);this.bufferLength=r}}class ARCFourCipher{constructor(e){this.a=0;this.b=0;const t=new Uint8Array(256),a=e.length;for(let e=0;e<256;++e)t[e]=e;for(let r=0,i=0;r<256;++r){const n=t[r];i=i+n+e[r%a]&255;t[r]=t[i];t[i]=n}this.s=t}encryptBlock(e){let t=this.a,a=this.b;const r=this.s,i=e.length,n=new Uint8Array(i);for(let s=0;st<128?t<<1:t<<1^27));constructor(){this.buffer=new U\ int8Array(16);this.bufferPosition=0}_expandKey(e){unreachable("Cannot call `_expandKey` on the base class")}_decrypt(e,t){let a,r,i;const n=new Uint8Array(16);n.set(e);for(let e=0,a=this._keySize;e<16;++e,++a)n[e]^=t[a];for(let e=this._cyclesOfRepetition-1;e>=1;--e){a=n[13];n[13]=n[9];n[9]=n[5];n[5]=n[1];n[1]=a;a=n[14];r=n[10];n[14]=n[6];n[10]=n[2];n[6]=a;n[2]=r;a=n[15];r=n[11];i=n[7];n[15]=n[3];n[11]=a;n[7]=r;n[3]=i;for(let e=0;e<16;++e)n[e]=this._inv_s[n[e]];for(let a=0,r=16*e;a<16;++a,++r)n[a\ ]^=t[r];for(let e=0;e<16;e+=4){const t=this._mix[n[e]],r=this._mix[n[e+1]],i=this._mix[n[e+2]],s=this._mix[n[e+3]];a=t^r>>>8^r<<24^i>>>16^i<<16^s>>>24^s<<8;n[e]=a>>>24&255;n[e+1]=a>>16&255;n[e+2]=a>>8&255;n[e+3]=255&a}}a=n[13];n[13]=n[9];n[9]=n[5];n[5]=n[1];n[1]=a;a=n[14];r=n[10];n[14]=n[6];n[10]=n[2];n[6]=a;n[2]=r;a=n[15];r=n[11];i=n[7];n[15]=n[3];n[11]=a;n[7]=r;n[3]=i;for(let e=0;e<16;++e){n[e]=this._inv_s[n[e]];n[e]^=t[e]}return n}_encrypt(e,t){const a=this._s;let r,i,n;const s=new Uint8Array\ (16);s.set(e);for(let e=0;e<16;++e)s[e]^=t[e];for(let e=1;e=r;--a)if(e[a]!==t){t=0;break}o-=t;n[n.length-1]=e.subarray(0,16-t)}}const c=new Uint8Array(o);for(let e=0,t=0,a=n.length;e=256&&(o=255&(27^o))}for(let t=0;t<4;++t){a[e]=r^=a[e-32];e++;a[e]=i^=a[e-32];e++;a[e]=n^=a[e-32];e++;a[e]=s^=a[e-32];e++}}return a}}\ class PDFBase{_hash(e,t,a){unreachable("Abstract method `_hash` called")}checkOwnerPassword(e,t,a,r){const i=new Uint8Array(e.length+56);i.set(e,0);i.set(t,e.length);i.set(a,e.length+t.length);return isArrayEqual(this._hash(e,i,a),r)}checkUserPassword(e,t,a){const r=new Uint8Array(e.length+8);r.set(e,0);r.set(t,e.length);return isArrayEqual(this._hash(e,r,[]),a)}getOwnerKey(e,t,a,r){const i=new Uint8Array(e.length+56);i.set(e,0);i.set(t,e.length);i.set(a,e.length+t.length);const n=this._hash(e,i\ ,a);return new AES256Cipher(n).decryptBlock(r,!1,new Uint8Array(16))}getUserKey(e,t,a){const r=new Uint8Array(e.length+8);r.set(e,0);r.set(t,e.length);const i=this._hash(e,r,[]);return new AES256Cipher(i).decryptBlock(a,!1,new Uint8Array(16))}}class PDF17 extends PDFBase{_hash(e,t,a){return calculateSHA256(t,0,t.length)}}class PDF20 extends PDFBase{_hash(e,t,a){let r=calculateSHA256(t,0,t.length).subarray(0,32),i=[0],n=0;for(;n<64||i.at(-1)>n-32;){const t=e.length+r.length+a.length,l=new Uint8Ar\ ray(t);let h=0;l.set(e,h);h+=e.length;l.set(r,h);h+=r.length;l.set(a,h);const u=new Uint8Array(64*t);for(let e=0,a=0;e<64;e++,a+=t)u.set(l,a);i=new AES128Cipher(r.subarray(0,16)).encrypt(u,r.subarray(16,32));const d=Math.sumPrecise(i.slice(0,16))%3;0===d?r=calculateSHA256(i,0,i.length):1===d?r=(s=i,o=0,c=i.length,calculateSHA512(s,o,c,!0)):2===d&&(r=calculateSHA512(i,0,i.length));n++}var s,o,c;return r.subarray(0,32)}}class CipherTransform{constructor(e,t){this.StringCipherConstructor=e;this.Str\ eamCipherConstructor=t}createStream(e,t){const a=new this.StreamCipherConstructor;return new DecryptStream(e,t,(function cipherTransformDecryptStream(e,t){return a.decryptBlock(e,t)}))}decryptString(e){const t=new this.StringCipherConstructor;let a=stringToBytes(e);a=t.decryptBlock(a,!0);return bytesToString(a)}encryptString(e){const t=new this.StringCipherConstructor;if(t instanceof AESBaseCipher){const a=16-e.length%16;e+=String.fromCharCode(a).repeat(a);const r=new Uint8Array(16);crypto.getRa\ ndomValues(r);let i=stringToBytes(e);i=t.encrypt(i,r);const n=new Uint8Array(16+i.length);n.set(r);n.set(i,16);return bytesToString(n)}let a=stringToBytes(e);a=t.encrypt(a);return bytesToString(a)}}class CipherTransformFactory{static get _defaultPasswordBytes(){return shadow(this,"_defaultPasswordBytes",new Uint8Array([40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122]))}#Oe(e,t,a,r,i,n,s,o,c,l,h,u){if(t){const e=Math.min(127,t.length);t=t\ .subarray(0,e)}else t=[];const d=6===e?new PDF20:new PDF17;return d.checkUserPassword(t,o,s)?d.getUserKey(t,c,h):t.length&&d.checkOwnerPassword(t,r,n,a)?d.getOwnerKey(t,i,n,l):null}#Me(e,t,a,r,i,n,s,o){const c=40+a.length+e.length,l=new Uint8Array(c);let h,u,d=0;if(t){u=Math.min(32,t.length);for(;d>8&255;l[d++]=i>>16&255;l[d++]=i>>>24&255;l.set(e,d);d+=e.length;if\ (n>=4&&!o){l.fill(255,d,d+4);d+=4}let f=calculateMD5(l,0,d);const g=s>>3;if(n>=3)for(h=0;h<50;++h)f=calculateMD5(f,0,g);const p=f.subarray(0,g);let m,b;if(n>=3){d=0;l.set(CipherTransformFactory._defaultPasswordBytes,d);d+=32;l.set(e,d);d+=e.length;m=new ARCFourCipher(p);b=m.encryptBlock(calculateMD5(l,0,d));u=p.length;const t=new Uint8Array(u);for(h=1;h<=19;++h){for(let e=0;er[t]===e))?p:null}#De(e,t,a,r){const i=new Uint8Array(32);let n=0;const s=Math.min(32,e.length);for(;n>3;if(a>=3)for(o=0;o<50;++o)c=calculateMD5(c,0,c.length);let h,u;if(a>=3){u=t;const e=new Uint8Array(l);for(o=19;o>=0;o--){for(let t=0;t>8&255;n[s++]=e>>16&255;n[s++]=255&t;n[s++]=t>>8&255;if(r){n[s++]=115;n[s++]=65;n[s++]=108;n[s++]=84}return calculateMD5(n,0,s).subarray(0,Math.min(i+5,16))}#Re(e,t,a,r,i){if(!(t instanceof Name))throw new FormatError("Invalid crypt filter name.");const n=this,s=e.get(t.name),o=s?.get("CFM");if(!o||"None"===o.name)return function(){return new NullC\ ipher};if("V2"===o.name)return function(){return new ARCFourCipher(n.#Be(a,r,i,!1))};if("AESV2"===o.name)return function(){return new AES128Cipher(n.#Be(a,r,i,!0))};if("AESV3"===o.name)return function(){return new AES256Cipher(i)};throw new FormatError("Unknown crypto method")}constructor(e,t,a){const r=e.get("Filter");if(!isName(r,"Standard"))throw new FormatError("unknown encryption method");this.filterName=r.name;this.dict=e;const i=e.get("V");if(!Number.isInteger(i)||1!==i&&2!==i&&4!==i&&5!=\ =i)throw new FormatError("unsupported encryption algorithm");this.algorithm=i;let n=e.get("Length");if(!n)if(i<=3)n=40;else{const t=e.get("CF"),a=e.get("StmF");if(t instanceof Dict&&a instanceof Name){t.suppressEncryption=!0;const e=t.get(a.name);n=e?.get("Length")||128;n<40&&(n<<=3)}}if(!Number.isInteger(n)||n<40||n%8!=0)throw new FormatError("invalid key length");const s=stringToBytes(e.get("O")),o=stringToBytes(e.get("U")),c=s.subarray(0,32),l=o.subarray(0,32),h=e.get("P"),u=e.get("R"),d=(4==\ =i||5===i)&&!1!==e.get("EncryptMetadata");this.encryptMetadata=d;const f=stringToBytes(t);let g,p;if(a){if(6===u)try{a=utf8StringToString(a)}catch{warn("CipherTransformFactory: Unable to convert UTF8 encoded password.")}g=stringToBytes(a)}if(5!==i)p=this.#Me(f,g,c,l,h,u,n,d);else{const t=s.subarray(32,40),a=s.subarray(40,48),r=o.subarray(0,48),i=o.subarray(32,40),n=o.subarray(40,48),h=stringToBytes(e.get("OE")),d=stringToBytes(e.get("UE")),f=stringToBytes(e.get("Perms"));p=this.#Oe(u,g,c,t,a,r,l\ ,i,n,h,d,f)}if(!p){if(!a)throw new PasswordException("No password given",ha);const e=this.#De(g,c,u,n);p=this.#Me(f,e,c,l,h,u,n,d)}if(!p)throw new PasswordException("Incorrect Password",ua);if(4===i&&p.length<16){this.encryptionKey=new Uint8Array(16);this.encryptionKey.set(p)}else this.encryptionKey=p;if(i>=4){const t=e.get("CF");t instanceof Dict&&(t.suppressEncryption=!0);this.cf=t;this.stmf=e.get("StmF")||Name.get("Identity");this.strf=e.get("StrF")||Name.get("Identity");this.eff=e.get("EFF")\ ||this.stmf}}createCipherTransform(e,t){if(4===this.algorithm||5===this.algorithm)return new CipherTransform(this.#Re(this.cf,this.strf,e,t,this.encryptionKey),this.#Re(this.cf,this.stmf,e,t,this.encryptionKey));const a=this.#Be(e,t,this.encryptionKey,!1),cipherConstructor=function(){return new ARCFourCipher(a)};return new CipherTransform(cipherConstructor,cipherConstructor)}}class XRef{#Ne=null;constructor(e,t){this.stream=e;this.pdfManager=t;this.entries=[];this._xrefStms=new Set;this._cacheMa\ p=new Map;this._pendingRefs=new RefSet;this._newPersistentRefNum=null;this._newTemporaryRefNum=null;this._persistentRefsCache=null}getNewPersistentRef(e){null===this._newPersistentRefNum&&(this._newPersistentRefNum=this.entries.length||1);const t=this._newPersistentRefNum++;this._cacheMap.set(t,e);return Ref.get(t,0)}getNewTemporaryRef(){if(null===this._newTemporaryRefNum){this._newTemporaryRefNum=this.entries.length||1;if(this._newPersistentRefNum){this._persistentRefsCache=new Map;for(let e=th\ is._newTemporaryRefNum;e0;){const[s,o]=n;if(!Number.isInteger(s)||!Number.isInteger(o))throw new FormatError(`Invalid XRef range fields: ${s}, ${o}`);if(!Number.isInteger(a)||!Number.isInteger(r)||!Number.isInteger(i))throw new FormatError(`Invalid XRef entry fields length: ${s}, ${o}`);for(let n=t.entryNum;n=e.length);){a+=String.fromCharCode(r);r=e[t]}return a}function skipUntil(e,t,a){const r=a.length,i=e.length;let n=0;for(;t=r)break;t++;n++}return n}const e=/\\b(endobj|\\d+\\s+\\d+\\s+obj|xref|trailer\\\ s*<<)\\b/g,t=/\\b(startxref|\\d+\\s+\\d+\\s+obj)\\b/g,a=/^(\\d+)\\s+(\\d+)\\s+obj\\b/,r=new Uint8Array([116,114,97,105,108,101,114]),i=new Uint8Array([115,116,97,114,116,120,114,101,102]),n=new Uint8Array([47,88,82,101,102]);this.entries.length=0;this._cacheMap.clear();const s=this.stream;s.pos=0;const o=s.getBytes(),c=bytesToString(o),l=o.length;let h=s.start;const u=[],d=[];for(;h=l)break;f=o[h]}while(10!==f&&13!==f);con\ tinue}const g=readToken(o,h);let p;if(g.startsWith("xref")&&(4===g.length||/\\s/.test(g[4]))){h+=skipUntil(o,h,r);u.push(h);h+=skipUntil(o,h,i)}else if(p=a.exec(g)){const t=0|p[1],a=0|p[2],r=h+g.length;let i,u=!1;if(this.entries[t]){if(this.entries[t].gen===a)try{new Parser({lexer:new Lexer(s.makeSubStream(r))}).getObj();u=!0}catch(e){e instanceof ParserEOFException?warn(`indexObjects -- checking object (${g}): "${e}".`):u=!0}}else u=!0;u&&(this.entries[t]={offset:h-s.start,gen:a,uncompressed:!0}\ );e.lastIndex=r;const f=e.exec(c);if(f){i=e.lastIndex+1-h;if("endobj"!==f[1]){warn(`indexObjects: Found "${f[1]}" inside of another "obj", caused by missing "endobj" -- trying to recover.`);i-=f[1].length+1}}else i=l-h;const m=o.subarray(h,h+i),b=skipUntil(m,0,n);if(b0?Math.max(...this._xrefStms):null)}getEntry(e){const t=this.entries[\ e];return t&&!t.free&&t.offset?t:null}fetchIfRef(e,t=!1){return e instanceof Ref?this.fetch(e,t):e}fetch(e,t=!1){if(!(e instanceof Ref))throw new Error("ref object is not a reference");const a=e.num,r=this._cacheMap.get(a);if(void 0!==r){r instanceof Dict&&!r.objId&&(r.objId=e.toString());return r}let i=this.getEntry(a);if(null===i)return i;if(this._pendingRefs.has(e)){this._pendingRefs.remove(e);warn(`Ignoring circular reference: ${e}.`);return ya}this._pendingRefs.put(e);try{i=i.uncompressed?t\ his.fetchUncompressed(e,i,t):this.fetchCompressed(e,i,t);this._pendingRefs.remove(e)}catch(t){this._pendingRefs.remove(e);throw t}i instanceof Dict?i.objId=e.toString():i instanceof BaseStream&&(i.dict.objId=e.toString());return i}fetchUncompressed(e,t,a=!1){const r=e.gen;let i=e.num;if(t.gen!==r){const n=`Inconsistent generation in XRef: ${e}`;if(this._generationFallback&&t.gen0&&t[3]-t[1]>0)return t;warn(`Empty, or invalid, /${e} entry.`)}return null}get mediaBox(){return shadow(this,"mediaBox",this.#je("MediaBox")||yc)}get cropBox(){return shadow(this,"cropBox",this.#je("CropBox")||this.mediaBox)}get userUnit(){const e=this.pageDict.get("UserUnit");return shadow(this,"userUnit","number"\ ==typeof e&&e>0?e:1)}get view(){const{cropBox:e,mediaBox:t}=this;if(e!==t&&!isArrayEqual(e,t)){const a=Util.intersect(e,t);if(a&&a[2]-a[0]>0&&a[3]-a[1]>0)return shadow(this,"view",a);warn("Empty /CropBox and /MediaBox intersection.")}return shadow(this,"view",t)}get rotate(){let e=this.#Le("Rotate")||0;e%90!=0?e=0:e>=360?e%=360:e<0&&(e=(e%360+360)%360);return shadow(this,"rotate",e)}#_e(e,t){if(!this.evaluatorOptions.ignoreErrors)throw e;warn(`getContentStream - ignoring sub-stream (${t}): "${e}\ ".`)}async getContentStream(){const e=await this.pdfManager.ensure(this,"content");return e instanceof BaseStream?e:Array.isArray(e)?new StreamsSequenceStream(e,this.#_e.bind(this)):new NullStream}get xfaData(){return shadow(this,"xfaData",this.xfaFactory?{bbox:this.xfaFactory.getBoundingBox(this.pageIndex)}:null)}async#Ue(e,t,a){const r=[];for(const i of e)if(i.id){const e=Ref.fromString(i.id);if(!e){warn(`A non-linked annotation cannot be modified: ${i.id}`);continue}if(i.deleted){t.put(e,e);i\ f(i.popupRef){const e=Ref.fromString(i.popupRef);e&&t.put(e,e)}continue}if(i.popup?.deleted){const e=Ref.fromString(i.popupRef);e&&t.put(e,e)}a?.put(e);i.ref=e;r.push(this.xref.fetchAsync(e).then((e=>{e instanceof Dict&&(i.oldAnnotation=e.clone())}),(()=>{warn(`Cannot fetch \\`oldAnnotation\\` for: ${e}.`)})));delete i.id}await Promise.all(r)}async saveNewAnnotations(e,t,a,r,i){if(this.xfaFactory)throw new Error("XFA: Cannot save new annotations.");const n=this.#Pe(e),s=new RefSetCache,o=new RefSe\ t;await this.#Ue(a,s,o);const c=this.pageDict,l=this.annotations.filter((e=>!(e instanceof Ref&&s.has(e)))),h=await AnnotationFactory.saveNewAnnotations(n,t,a,r,i);for(const{ref:e}of h.annotations)e instanceof Ref&&!o.has(e)&&l.push(e);const u=c.clone();u.set("Annots",l);i.put(this.ref,{data:u});for(const e of s)i.put(e,{data:null})}async save(e,t,a,r){const i=this.#Pe(e),n=await this._parsedAnnotations,s=[];for(const e of n)s.push(e.save(i,t,a,r).catch((function(e){warn(`save - ignoring annotat\ ion data during "${t.name}" task: "${e}".`);return null})));return Promise.all(s)}async loadResources(e){await(this.#Ee??=this.pdfManager.ensure(this,"resources"));await ObjectLoader.load(this.resources,e,this.xref)}async#Xe(e,t){const a=e?.get("Resources");if(!(a instanceof Dict&&a.size))return this.resources;await ObjectLoader.load(a,t,this.xref);return Dict.merge({xref:this.xref,dictArray:[a,this.resources],mergeSubDicts:!0})}async getOperatorList({handler:e,sink:t,task:a,intent:r,cacheKey:i,\ annotationStorage:c=null,modifiedIds:d=null}){const g=this.getContentStream(),p=this.loadResources(Ia),m=this.#Pe(e),b=this.xfaFactory?null:getNewAnnotationsMap(c),y=b?.get(this.pageIndex);let w=Promise.resolve(null),x=null;if(y){const e=this.pdfManager.ensureDoc("annotationGlobals");let t;const r=new Set;for(const{bitmapId:e,bitmap:t}of y)!e||t||r.has(e)||r.add(e);const{isOffscreenCanvasSupported:i}=this.evaluatorOptions;if(r.size>0){const e=y.slice();for(const[t,a]of c)t.startsWith(f)&&a.bitma\ p&&r.has(a.bitmapId)&&e.push(a);t=AnnotationFactory.generateImages(e,this.xref,i)}else t=AnnotationFactory.generateImages(y,this.xref,i);x=new RefSet;w=Promise.all([e,this.#Ue(y,x,null)]).then((([e])=>e?AnnotationFactory.printNewAnnotations(e,m,a,y,t):null))}const S=Promise.all([g,p]).then((async([n])=>{const s=await this.#Xe(n.dict,Ia),o=new OperatorList(r,t);e.send("StartRenderPage",{transparency:m.hasBlendModes(s,this.nonBlendModesSet),pageIndex:this.pageIndex,cacheKey:i});await m.getOperator\ List({stream:n,task:a,resources:s,operatorList:o});return o}));let[k,C,v]=await Promise.all([S,this._parsedAnnotations,w]);if(v){C=C.filter((e=>!(e.ref&&x.has(e.ref))));for(let e=0,t=v.length;ee.ref&&isRefsEqual(e.ref,a.refToReplace)));if(r>=0){C.splice(r,1,a);v.splice(e--,1);t--}}}C=C.concat(v)}if(0===C.length||r&h){k.flush(!0);return{length:k.totalLength}}const F=!!(r&l),T=!!(r&u),O=!!(r&n),M=!!(r&s),D=!!(r&o),R=[];for(const e of \ C)(O||M&&e.mustBeViewed(c,F)&&e.mustBeViewedWhenEditing(T,d)||D&&e.mustBePrinted(c))&&R.push(e.getOperatorList(m,a,r,c).catch((function(e){warn(`getOperatorList - ignoring annotation data during "${a.name}" task: "${e}".`);return{opList:null,separateForm:!1,separateCanvas:!1}})));const N=await Promise.all(R);let E=!1,L=!1;for(const{opList:e,separateForm:t,separateCanvas:a}of N){k.addOpList(e);E||=t;L||=a}k.flush(!0,{form:E,canvas:L});return{length:k.totalLength}}async extractTextContent({handler\ :e,task:t,includeMarkedContent:a,disableNormalization:r,sink:i,intersector:n=null}){const s=this.getContentStream(),o=this.loadResources(Ta),c=this.pdfManager.ensureCatalog("lang"),[l,,h]=await Promise.all([s,o,c]),u=await this.#Xe(l.dict,Ta);return this.#Pe(e).getTextContent({stream:l,task:t,resources:u,includeMarkedContent:a,disableNormalization:r,sink:i,viewBox:this.view,lang:h,intersector:n})}async getStructTree(){const e=await this.pdfManager.ensureCatalog("structTreeRoot");if(!e)return nul\ l;await this._parsedAnnotations;try{const t=await this.pdfManager.ensure(this,"_parseStructTree",[e]);return await this.pdfManager.ensure(t,"serializable")}catch(e){warn(`getStructTree: "${e}".`);return null}}_parseStructTree(e){const t=new StructTreePage(e,this.pageDict);t.parse(this.ref);return t}async getAnnotationsData(e,t,a){const r=await this._parsedAnnotations;if(0===r.length)return r;const i=[],c=[];let l;const h=!!(a&n),u=!!(a&s),d=!!(a&o),f=[];for(const a of r){const r=h||u&&a.viewable\ ;(r||d&&a.printable)&&i.push(a.data);if(a.hasTextContent&&r){l??=this.#Pe(e);c.push(a.extractTextContent(l,t,[-1/0,-1/0,1/0,1/0]).catch((function(e){warn(`getAnnotationsData - ignoring textContent during "${t.name}" task: "${e}".`)})))}else a.overlaysTextContent&&r&&f.push(a)}if(f.length>0){const a=new Intersector(f);c.push(this.extractTextContent({handler:e,task:t,includeMarkedContent:!1,disableNormalization:!1,sink:null,viewBox:this.view,lang:null,intersector:a}).then((()=>{a.setText()})))}awa\ it Promise.all(c);return i}get annotations(){const e=this.#Le("Annots");return shadow(this,"annotations",Array.isArray(e)?e:[])}get _parsedAnnotations(){return shadow(this,"_parsedAnnotations",this.pdfManager.ensure(this,"annotations").then((async e=>{if(0===e.length)return e;const[t,a]=await Promise.all([this.pdfManager.ensureDoc("annotationGlobals"),this.pdfManager.ensureDoc("fieldObjects")]);if(!t)return[];const r=a?.orphanFields,i=[];for(const a of e)i.push(AnnotationFactory.create(this.xref\ ,a,t,this._localIdFactory,!1,r,this.ref).catch((function(e){warn(`_parsedAnnotations: "${e}".`);return null})));const n=[];let s,o;for(const e of await Promise.all(i))e&&(e instanceof WidgetAnnotation?(o||=[]).push(e):e instanceof PopupAnnotation?(s||=[]).push(e):n.push(e));o&&n.push(...o);s&&n.push(...s);return n})))}get jsActions(){return shadow(this,"jsActions",collectActions(this.xref,this.pageDict,xe))}}const wc=new Uint8Array([37,80,68,70,45]),xc=new Uint8Array([115,116,97,114,116,120,114,\ 101,102]),Sc=new Uint8Array([101,110,100,111,98,106]);function find(e,t,a=1024,r=!1){const i=t.length,n=e.peekBytes(a),s=n.length-i;if(s<=0)return!1;if(r){const a=i-1;let r=n.length-1;for(;r>=a;){let s=0;for(;s=i){e.pos+=r-a;return!0}r--}}else{let a=0;for(;a<=s;){let r=0;for(;r=i){e.pos+=a;return!0}a++}}return!1}class PDFDocument{#qe=new Map;#He=null;constructor(e,t){if(t.length<=0)throw new InvalidPDFException("The PDF file is empty, i.e\ . its size is zero bytes.");this.pdfManager=e;this.stream=t;this.xref=new XRef(t,e);const a={font:0};this._globalIdFactory=class{static getDocId(){return`g_${e.docId}`}static createFontId(){return"f"+ ++a.font}static createObjId(){unreachable("Abstract method `createObjId` called.")}static getPageObjId(){unreachable("Abstract method `getPageObjId` called.")}}}parse(e){this.xref.parse(e);this.catalog=new Catalog(this.pdfManager,this.xref)}get linearization(){let e=null;try{e=Linearization.create(\ this.stream)}catch(e){if(e instanceof MissingDataException)throw e;info(e)}return shadow(this,"linearization",e)}get startXRef(){const e=this.stream;let t=0;if(this.linearization){e.reset();if(find(e,Sc)){e.skip(6);let a=e.peekByte();for(;isWhiteSpace(a);){e.pos++;a=e.peekByte()}t=e.pos-e.start}}else{const a=1024,r=xc.length;let i=!1,n=e.end;for(;!i&&n>0;){n-=a-r;n<0&&(n=0);e.pos=n;i=find(e,xc,a,!0)}if(i){e.skip(9);let a;do{a=e.getByte()}while(isWhiteSpace(a));let r="";for(;a>=32&&a<=57;){r+=Str\ ing.fromCharCode(a);a=e.getByte()}t=parseInt(r,10);isNaN(t)&&(t=0)}}return shadow(this,"startXRef",t)}checkHeader(){const e=this.stream;e.reset();if(!find(e,wc))return;e.moveStart();e.skip(wc.length);let t,a="";for(;(t=e.getByte())>32&&a.length<7;)a+=String.fromCharCode(t);Ca.test(a)?this.#He=a:warn(`Invalid PDF header version: ${a}`)}parseStartXRef(){this.xref.setStartXRef(this.startXRef)}get numPages(){let e=0;e=this.catalog.hasActualNumPages?this.catalog.numPages:this.xfaFactory?this.xfaFacto\ ry.getNumPages():this.linearization?this.linearization.numPages:this.catalog.numPages;return shadow(this,"numPages",e)}#We(e,t=0){return!!Array.isArray(e)&&e.every((e=>{if(!((e=this.xref.fetchIfRef(e))instanceof Dict))return!1;if(e.has("Kids")){if(++t>10){warn("#hasOnlyDocumentSignatures: maximum recursion depth reached");return!1}return this.#We(e.get("Kids"),t)}const a=isName(e.get("FT"),"Sig"),r=e.get("Rect"),i=Array.isArray(r)&&r.every((e=>0===e));return a&&i}))}#ze(e,t,a=new RefSet){if(Arra\ y.isArray(e))for(let r of e){if(r instanceof Ref){if(a.has(r))continue;a.put(r)}r=this.xref.fetchIfRef(r);if(!(r instanceof Dict))continue;if(r.has("Kids")){this.#ze(r.get("Kids"),t,a);continue}if(!isName(r.get("FT"),"Sig"))continue;const e=r.get("V");if(!(e instanceof Dict))continue;const i=e.get("SubFilter");i instanceof Name&&t.add(i.name)}}get _xfaStreams(){const{acroForm:e}=this.catalog;if(!e)return null;const t=e.get("XFA"),a=new Map(["xdp:xdp","template","datasets","config","connectionSet\ ","localeSet","stylesheet","/xdp:xdp"].map((e=>[e,null])));if(t instanceof BaseStream&&!t.isEmpty){a.set("xdp:xdp",t);return a}if(!Array.isArray(t)||0===t.length)return null;for(let e=0,r=t.length;el.handleSetFont(r,[Name.get(e),1],null,h,t,d,a,i).catch((e=>{warn(`loadXfaFonts: "${e}".`);return null})),f=[];for(const[e,t]of i){const a=t.get("FontDescriptor");if(!(a instanceof Dict))continue;let r=a.get("FontFamily");r=r.replaceAll(/[ ]+(\\d)/g,"$1");const i={fontFamily:r,fontWeight:a.get("FontWeight"),italicAngle:-a.get("ItalicAngle")};validateCSSFont(i)&&f.push(parseFont(e,null,i))}await Promise.all(f);const g=this.xfaFactory.se\ tFonts(u);if(!g)return;n.ignoreErrors=!0;f.length=0;u.length=0;const p=new Set;for(const e of g)getXfaFontName(`${e}-Regular`)||p.add(e);p.size&&g.push("PdfJS-Fallback");for(const e of g)if(!p.has(e))for(const t of[{name:"Regular",fontWeight:400,italicAngle:0},{name:"Bold",fontWeight:700,italicAngle:0},{name:"Italic",fontWeight:400,italicAngle:12},{name:"BoldItalic",fontWeight:700,italicAngle:12}]){const a=`${e}-${t.name}`;f.push(parseFont(a,getXfaFontDict(a),{fontFamily:e,fontWeight:t.fontWeigh\ t,italicAngle:t.italicAngle}))}await Promise.all(f);this.xfaFactory.appendFonts(u,p)}loadXfaResources(e,t){return Promise.all([this.#Ge(e,t).catch((()=>{})),this.#$e()])}serializeXfaData(e){return this.xfaFactory?this.xfaFactory.serializeData(e):null}get version(){return this.catalog.version||this.#He}get formInfo(){const e={hasFields:!1,hasAcroForm:!1,hasXfa:!1,hasSignatures:!1},{acroForm:t}=this.catalog;if(!t)return shadow(this,"formInfo",e);try{const a=t.get("Fields"),r=Array.isArray(a)&&a.le\ ngth>0;e.hasFields=r;const i=t.get("XFA");e.hasXfa=Array.isArray(i)&&i.length>0||i instanceof BaseStream&&!i.isEmpty;const n=!!(1&t.get("SigFlags")),s=n&&this.#We(a);e.hasAcroForm=r&&!s;e.hasSignatures=n}catch(e){if(e instanceof MissingDataException)throw e;warn(`Cannot fetch form information: "${e}".`)}return shadow(this,"formInfo",e)}get documentInfo(){const{catalog:e,formInfo:t,xref:a}=this,r={PDFFormatVersion:this.version,Language:e.lang,EncryptFilterName:a.encrypt?.filterName??null,IsLinear\ ized:!!this.linearization,IsAcroFormPresent:t.hasAcroForm,IsXFAPresent:t.hasXfa,IsCollectionPresent:!!e.collection,IsSignaturesPresent:t.hasSignatures};let i;try{i=a.trailer.get("Info")}catch(e){if(e instanceof MissingDataException)throw e;info("The document information dictionary is invalid.")}if(!(i instanceof Dict))return shadow(this,"documentInfo",r);for(const[e,t]of i){switch(e){case"Title":case"Author":case"Subject":case"Keywords":case"Creator":case"Producer":case"CreationDate":case"ModDat\ e":if("string"==typeof t){r[e]=stringToPDFString(t);continue}break;case"Trapped":if(t instanceof Name){r[e]=t;continue}break;default:let a;switch(typeof t){case"string":a=stringToPDFString(t);break;case"number":case"boolean":a=t;break;default:t instanceof Name&&(a=t)}if(void 0===a){warn(`Bad value, for custom key "${e}", in Info: ${t}.`);continue}r.Custom??=Object.create(null);r.Custom[e]=a;continue}warn(`Bad value, for key "${e}", in Info: ${t}.`)}return shadow(this,"documentInfo",r)}get finger\ prints(){const e="\\0".repeat(16);function validate(t){return"string"==typeof t&&16===t.length&&t!==e}const t=this.xref.trailer.get("ID");let a,r;if(Array.isArray(t)&&validate(t[0])){a=stringToBytes(t[0]);t[1]!==t[0]&&validate(t[1])&&(r=stringToBytes(t[1]))}else a=calculateMD5(this.stream.getByteRange(0,1024),0,1024);return shadow(this,"fingerprints",[toHexUtil(a),r?toHexUtil(r):null])}async#Ve(e){const{catalog:t,linearization:a,xref:r}=this,i=Ref.get(a.objectNumberFirst,0);try{const e=await r.fe\ tchAsync(i);if(e instanceof Dict){let a=e.getRaw("Type");a instanceof Ref&&(a=await r.fetchAsync(a));if(isName(a,"Page")||!e.has("Type")&&!e.has("Kids")&&e.has("Contents")){t.pageKidsCountCache.has(i)||t.pageKidsCountCache.put(i,1);t.pageIndexCache.has(i)||t.pageIndexCache.put(i,0);return[e,i]}}throw new FormatError("The Linearization dictionary doesn\'t point to a valid Page dictionary.")}catch(a){warn(`_getLinearizationPage: "${a.message}".`);return t.getPageDict(e)}}getPage(e){const t=this.#qe\ .get(e);if(t)return t;const{catalog:a,linearization:r,xfaFactory:i}=this;let n;n=i?Promise.resolve([Dict.empty,null]):r?.pageFirst===e?this.#Ve(e):a.getPageDict(e);n=n.then((([t,r])=>new Page({pdfManager:this.pdfManager,xref:this.xref,pageIndex:e,pageDict:t,ref:r,globalIdFactory:this._globalIdFactory,fontCache:a.fontCache,builtInCMapCache:a.builtInCMapCache,standardFontDataCache:a.standardFontDataCache,globalColorSpaceCache:a.globalColorSpaceCache,globalImageCache:a.globalImageCache,systemFontCa\ che:a.systemFontCache,nonBlendModesSet:a.nonBlendModesSet,xfaFactory:i})));this.#qe.set(e,n);return n}async checkFirstPage(e=!1){if(!e)try{await this.getPage(0)}catch(e){if(e instanceof XRefEntryException){this.#qe.delete(0);await this.cleanup();throw new XRefParseException}}}async checkLastPage(e=!1){const{catalog:t,pdfManager:a}=this;t.setActualNumPages();let r;try{await Promise.all([a.ensureDoc("xfaFactory"),a.ensureDoc("linearization"),a.ensureCatalog("numPages")]);if(this.xfaFactory)return;\ r=this.linearization?this.linearization.numPages:t.numPages;if(!Number.isInteger(r))throw new FormatError("Page count is not an integer.");if(r<=1)return;await this.getPage(r-1)}catch(i){this.#qe.delete(r-1);await this.cleanup();if(i instanceof XRefEntryException&&!e)throw new XRefParseException;warn(`checkLastPage - invalid /Pages tree /Count: ${r}.`);let n;try{n=await t.getAllPageDicts(e)}catch(a){if(a instanceof XRefEntryException&&!e)throw new XRefParseException;t.setActualNumPages(1);return\ }for(const[e,[r,i]]of n){let n;if(r instanceof Error){n=Promise.reject(r);n.catch((()=>{}))}else n=Promise.resolve(new Page({pdfManager:a,xref:this.xref,pageIndex:e,pageDict:r,ref:i,globalIdFactory:this._globalIdFactory,fontCache:t.fontCache,builtInCMapCache:t.builtInCMapCache,standardFontDataCache:t.standardFontDataCache,globalColorSpaceCache:this.globalColorSpaceCache,globalImageCache:t.globalImageCache,systemFontCache:t.systemFontCache,nonBlendModesSet:t.nonBlendModesSet,xfaFactory:null}));th\ is.#qe.set(e,n)}t.setActualNumPages(n.size)}}async fontFallback(e,t){const{catalog:a,pdfManager:r}=this;for(const i of await Promise.all(a.fontCache))if(i.loadedName===e){i.fallback(t,r.evaluatorOptions);return}}async cleanup(e=!1){return this.catalog?this.catalog.cleanup(e):clearGlobalCaches()}async#Ke(e,t,a,r,i,n,s){const{xref:o}=this;if(!(a instanceof Ref)||n.has(a))return;n.put(a);const c=await o.fetchAsync(a);if(!(c instanceof Dict))return;let l=await c.getAsync("Subtype");l=l instanceof Na\ me?l.name:null;if("Link"===l)return;if(c.has("T")){const t=stringToPDFString(await c.getAsync("T"));e=""===e?t:`${e}.${t}`}else{let a=c;for(;;){a=a.getRaw("Parent")||t;if(a instanceof Ref){if(n.has(a))break;a=await o.fetchAsync(a)}if(!(a instanceof Dict))break;if(a.has("T")){const t=stringToPDFString(await a.getAsync("T"));e=""===e?t:`${e}.${t}`;break}}}t&&!c.has("Parent")&&isName(c.get("Subtype"),"Widget")&&s.put(a,t);r.has(e)||r.set(e,[]);r.get(e).push(AnnotationFactory.create(o,a,i,null,!0,s,\ null).then((e=>e?.getFieldObject())).catch((function(e){warn(`#collectFieldObjects: "${e}".`);return null})));if(!c.has("Kids"))return;const h=await c.getAsync("Kids");if(Array.isArray(h))for(const t of h)await this.#Ke(e,a,t,r,i,n,s)}get fieldObjects(){return shadow(this,"fieldObjects",this.pdfManager.ensureDoc("formInfo").then((async e=>{if(!e.hasFields)return null;const t=await this.annotationGlobals;if(!t)return null;const{acroForm:a}=t,r=new RefSet,i=Object.create(null),n=new Map,s=new RefS\ etCache;for(const e of a.get("Fields"))await this.#Ke("",null,e,n,t,r,s);const o=[];for(const[e,t]of n)o.push(Promise.all(t).then((t=>{(t=t.filter((e=>!!e))).length>0&&(i[e]=t)})));await Promise.all(o);return{allFields:objectSize(i)>0?i:null,orphanFields:s}})))}get hasJSActions(){return shadow(this,"hasJSActions",this.pdfManager.ensureDoc("_parseHasJSActions"))}async _parseHasJSActions(){const[e,t]=await Promise.all([this.pdfManager.ensureCatalog("jsActions"),this.pdfManager.ensureDoc("fieldObje\ cts")]);return!!e||!!t?.allFields&&Object.values(t.allFields).some((e=>e.some((e=>null!==e.actions))))}get calculationOrderIds(){const e=this.catalog.acroForm?.get("CO");if(!Array.isArray(e)||0===e.length)return shadow(this,"calculationOrderIds",null);const t=[];for(const a of e)a instanceof Ref&&t.push(a.toString());return shadow(this,"calculationOrderIds",t.length?t:null)}get annotationGlobals(){return shadow(this,"annotationGlobals",AnnotationFactory.createGlobals(this.pdfManager))}}class Bas\ ePdfManager{constructor({docBaseUrl:e,docId:t,enableXfa:a,evaluatorOptions:r,handler:i,password:n}){this._docBaseUrl=function parseDocBaseUrl(e){if(e){const t=createValidAbsoluteUrl(e);if(t)return t.href;warn(`Invalid absolute docBaseUrl: "${e}".`)}return null}(e);this._docId=t;this._password=n;this.enableXfa=a;r.isOffscreenCanvasSupported&&=FeatureTest.isOffscreenCanvasSupported;r.isImageDecoderSupported&&=FeatureTest.isImageDecoderSupported;this.evaluatorOptions=Object.freeze(r);ImageResizer.s\ etOptions(r);JpegStream.setOptions(r);OperatorList.setOptions(r);const s={...r,handler:i};JpxImage.setOptions(s);IccColorSpace.setOptions(s);CmykICCBasedCS.setOptions(s)}get docId(){return this._docId}get password(){return this._password}get docBaseUrl(){return this._docBaseUrl}ensureDoc(e,t){return this.ensure(this.pdfDocument,e,t)}ensureXRef(e,t){return this.ensure(this.pdfDocument.xref,e,t)}ensureCatalog(e,t){return this.ensure(this.pdfDocument.catalog,e,t)}getPage(e){return this.pdfDocument.\ getPage(e)}fontFallback(e,t){return this.pdfDocument.fontFallback(e,t)}cleanup(e=!1){return this.pdfDocument.cleanup(e)}async ensure(e,t,a){unreachable("Abstract method `ensure` called")}requestRange(e,t){unreachable("Abstract method `requestRange` called")}requestLoadedStream(e=!1){unreachable("Abstract method `requestLoadedStream` called")}sendProgressiveData(e){unreachable("Abstract method `sendProgressiveData` called")}updatePassword(e){this._password=e}terminate(e){unreachable("Abstract met\ hod `terminate` called")}}class LocalPdfManager extends BasePdfManager{constructor(e){super(e);const t=new Stream(e.source);this.pdfDocument=new PDFDocument(this,t);this._loadedStreamPromise=Promise.resolve(t)}async ensure(e,t,a){const r=e[t];return"function"==typeof r?r.apply(e,a):r}requestRange(e,t){return Promise.resolve()}requestLoadedStream(e=!1){return this._loadedStreamPromise}terminate(e){}}class NetworkPdfManager extends BasePdfManager{constructor(e){super(e);this.streamManager=new Chun\ kedStreamManager(e.source,{msgHandler:e.handler,length:e.length,disableAutoFetch:e.disableAutoFetch,rangeChunkSize:e.rangeChunkSize});this.pdfDocument=new PDFDocument(this,this.streamManager.getStream())}async ensure(e,t,a){try{const r=e[t];return"function"==typeof r?r.apply(e,a):r}catch(r){if(!(r instanceof MissingDataException))throw r;await this.requestRange(r.begin,r.end);return this.ensure(e,t,a)}}requestRange(e,t){return this.streamManager.requestRange(e,t)}requestLoadedStream(e=!1){return\ this.streamManager.requestAllChunks(e)}sendProgressiveData(e){this.streamManager.onReceiveData({chunk:e})}terminate(e){this.streamManager.abort(e)}}const Ac=1,kc=2,Cc=1,vc=2,Fc=3,Ic=4,Tc=5,Oc=6,Mc=7,Dc=8;function onFn(){}function wrapReason(e){if(e instanceof AbortException||e instanceof InvalidPDFException||e instanceof PasswordException||e instanceof ResponseException||e instanceof UnknownErrorException)return e;e instanceof Error||"object"==typeof e&&null!==e||unreachable(\'wrapReason: Expect\ ed "reason" to be a (possibly cloned) Error.\');switch(e.name){case"AbortException":return new AbortException(e.message);case"InvalidPDFException":return new InvalidPDFException(e.message);case"PasswordException":return new PasswordException(e.message,e.code);case"ResponseException":return new ResponseException(e.message,e.status,e.missing);case"UnknownErrorException":return new UnknownErrorException(e.message,e.details)}return new UnknownErrorException(e.message,e.toString())}class MessageHandle\ r{#Je=new AbortController;constructor(e,t,a){this.sourceName=e;this.targetName=t;this.comObj=a;this.callbackId=1;this.streamId=1;this.streamSinks=Object.create(null);this.streamControllers=Object.create(null);this.callbackCapabilities=Object.create(null);this.actionHandler=Object.create(null);a.addEventListener("message",this.#Ye.bind(this),{signal:this.#Je.signal})}#Ye({data:e}){if(e.targetName!==this.sourceName)return;if(e.stream){this.#Ze(e);return}if(e.callback){const t=e.callbackId,a=this.c\ allbackCapabilities[t];if(!a)throw new Error(`Cannot resolve callback ${t}`);delete this.callbackCapabilities[t];if(e.callback===Ac)a.resolve(e.data);else{if(e.callback!==kc)throw new Error("Unexpected callback case");a.reject(wrapReason(e.reason))}return}const t=this.actionHandler[e.action];if(!t)throw new Error(`Unknown action from worker: ${e.action}`);if(e.callbackId){const a=this.sourceName,r=e.sourceName,i=this.comObj;Promise.try(t,e.data).then((function(t){i.postMessage({sourceName:a,targ\ etName:r,callback:Ac,callbackId:e.callbackId,data:t})}),(function(t){i.postMessage({sourceName:a,targetName:r,callback:kc,callbackId:e.callbackId,reason:wrapReason(t)})}))}else e.streamId?this.#Qe(e):t(e.data)}on(e,t){const a=this.actionHandler;if(a[e])throw new Error(`There is already an actionName called "${e}"`);a[e]=t}send(e,t,a){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},a)}sendWithPromise(e,t,a){const r=this.callbackId++,i=Promise.withRe\ solvers();this.callbackCapabilities[r]=i;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:r,data:t},a)}catch(e){i.reject(e)}return i.promise}sendWithStream(e,t,a,r){const i=this.streamId++,n=this.sourceName,s=this.targetName,o=this.comObj;return new ReadableStream({start:a=>{const c=Promise.withResolvers();this.streamControllers[i]={controller:a,startCall:c,pullCall:null,cancelCall:null,isClosed:!1};o.postMessage({sourceName:n,targetName:s,ac\ tion:e,streamId:i,data:t,desiredSize:a.desiredSize},r);return c.promise},pull:e=>{const t=Promise.withResolvers();this.streamControllers[i].pullCall=t;o.postMessage({sourceName:n,targetName:s,stream:Oc,streamId:i,desiredSize:e.desiredSize});return t.promise},cancel:e=>{assert(e instanceof Error,"cancel must have a valid reason");const t=Promise.withResolvers();this.streamControllers[i].cancelCall=t;this.streamControllers[i].isClosed=!0;o.postMessage({sourceName:n,targetName:s,stream:Cc,streamId:\ i,reason:wrapReason(e)});return t.promise}},a)}#Qe(e){const t=e.streamId,a=this.sourceName,r=e.sourceName,i=this.comObj,n=this,s=this.actionHandler[e.action],o={enqueue(e,n=1,s){if(this.isCancelled)return;const o=this.desiredSize;this.desiredSize-=n;if(o>0&&this.desiredSize<=0){this.sinkCapability=Promise.withResolvers();this.ready=this.sinkCapability.promise}i.postMessage({sourceName:a,targetName:r,stream:Ic,streamId:t,chunk:e},s)},close(){if(!this.isCancelled){this.isCancelled=!0;i.postMessage\ ({sourceName:a,targetName:r,stream:Fc,streamId:t});delete n.streamSinks[t]}},error(e){assert(e instanceof Error,"error must have a valid reason");if(!this.isCancelled){this.isCancelled=!0;i.postMessage({sourceName:a,targetName:r,stream:Tc,streamId:t,reason:wrapReason(e)})}},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};o.sinkCapability.resolve();o.ready=o.sinkCapability.promise;this.streamSinks[t]=o;Promise.try(s,e.data,o).t\ hen((function(){i.postMessage({sourceName:a,targetName:r,stream:Dc,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:a,targetName:r,stream:Dc,streamId:t,reason:wrapReason(e)})}))}#Ze(e){const t=e.streamId,a=this.sourceName,r=e.sourceName,i=this.comObj,n=this.streamControllers[t],s=this.streamSinks[t];switch(e.stream){case Dc:e.success?n.startCall.resolve():n.startCall.reject(wrapReason(e.reason));break;case Mc:e.success?n.pullCall.resolve():n.pullCall.reject(wrapReason(e.reason));\ break;case Oc:if(!s){i.postMessage({sourceName:a,targetName:r,stream:Mc,streamId:t,success:!0});break}s.desiredSize<=0&&e.desiredSize>0&&s.sinkCapability.resolve();s.desiredSize=e.desiredSize;Promise.try(s.onPull||onFn).then((function(){i.postMessage({sourceName:a,targetName:r,stream:Mc,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:a,targetName:r,stream:Mc,streamId:t,reason:wrapReason(e)})}));break;case Ic:assert(n,"enqueue should have stream controller");if(n.isClosed)break;n\ .controller.enqueue(e.chunk);break;case Fc:assert(n,"close should have stream controller");if(n.isClosed)break;n.isClosed=!0;n.controller.close();this.#et(n,t);break;case Tc:assert(n,"error should have stream controller");n.controller.error(wrapReason(e.reason));this.#et(n,t);break;case vc:e.success?n.cancelCall.resolve():n.cancelCall.reject(wrapReason(e.reason));this.#et(n,t);break;case Cc:if(!s)break;const o=wrapReason(e.reason);Promise.try(s.onCancel||onFn,o).then((function(){i.postMessage({s\ ourceName:a,targetName:r,stream:vc,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:a,targetName:r,stream:vc,streamId:t,reason:wrapReason(e)})}));s.sinkCapability.reject(o);s.isCancelled=!0;delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}async#et(e,t){await Promise.allSettled([e.startCall?.promise,e.pullCall?.promise,e.cancelCall?.promise]);delete this.streamControllers[t]}destroy(){this.#Je?.abort();this.#Je=null}}async function writeObject(e,\ t,a,{encrypt:r=null}){const i=r?.createCipherTransform(e.num,e.gen);a.push(`${e.num} ${e.gen} obj\\n`);t instanceof Dict?await writeDict(t,a,i):t instanceof BaseStream?await writeStream(t,a,i):(Array.isArray(t)||ArrayBuffer.isView(t))&&await writeArray(t,a,i);a.push("\\nendobj\\n")}async function writeDict(e,t,a){t.push("<<");for(const r of e.getKeys()){t.push(` /${escapePDFName(r)} `);await writeValue(e.getRaw(r),t,a)}t.push(">>")}async function writeStream(e,t,a){let r=e.getBytes();const{dict:i}=\ e,[n,s]=await Promise.all([i.getAsync("Filter"),i.getAsync("DecodeParms")]),o=isName(Array.isArray(n)?await i.xref.fetchIfRefAsync(n[0]):n,"FlateDecode");if(r.length>=256||o)try{const e=new CompressionStream("deflate"),t=e.writable.getWriter();await t.ready;t.write(r).then((async()=>{await t.ready;await t.close()})).catch((()=>{}));const a=await new Response(e.readable).arrayBuffer();r=new Uint8Array(a);let c,l;if(n){if(!o){c=Array.isArray(n)?[Name.get("FlateDecode"),...n]:[Name.get("FlateDecode\ "),n];s&&(l=Array.isArray(s)?[null,...s]:[null,s])}}else c=Name.get("FlateDecode");c&&i.set("Filter",c);l&&i.set("DecodeParms",l)}catch(e){info(`writeStream - cannot compress data: "${e}".`)}let c=bytesToString(r);a&&(c=a.encryptString(c));i.set("Length",c.length);await writeDict(i,t,a);t.push(" stream\\n",c,"\\nendstream")}async function writeArray(e,t,a){t.push("[");let r=!0;for(const i of e){r?r=!1:t.push(" ");await writeValue(i,t,a)}t.push("]")}async function writeValue(e,t,a){if(e instanceof \ Name)t.push(`/${escapePDFName(e.name)}`);else if(e instanceof Ref)t.push(`${e.num} ${e.gen} R`);else if(Array.isArray(e)||ArrayBuffer.isView(e))await writeArray(e,t,a);else if("string"==typeof e){a&&(e=a.encryptString(e));t.push(`(${escapeString(e)})`)}else"number"==typeof e?t.push(numberToString(e)):"boolean"==typeof e?t.push(e.toString()):e instanceof Dict?await writeDict(e,t,a):e instanceof BaseStream?await writeStream(e,t,a):null===e?t.push("null"):warn(`Unhandled value in writer: ${typeof e\ }, please file a bug.`)}function writeInt(e,t,a,r){for(let i=t+a-1;i>a-1;i--){r[i]=255&e;e>>=8}return a+t}function writeString(e,t,a){const r=e.length;for(let i=0;i1&&(n=a.documentElement.searchNode([i.at(-1)],0));n?n.childNodes=Array.isArray(r)?r.map((e=>new SimpleDOMNode("value",e))):[new SimpleDOMNode("#text",r)]:warn(`Node not found for path: ${t}`)}const r=[];a.documentElement.dump(r);return r.join("")}(r.fetchIfRef(t).getString(),a)}const i=new StringStream(e);i.dict=new Dict(r);i.dict.setIfName("Type","EmbeddedFile");a.put(t,{data:i})}function getIndexes(e){const t=[];for(const{ref:a}of e)a.num===t.at(\ -2)+t.at(-1)?t[t.length-1]+=1:t.push(a.num,1);return t}function computeIDs(e,t,a){if(Array.isArray(t.fileIds)&&t.fileIds.length>0){const r=function computeMD5(e,t){const a=Math.floor(Date.now()/1e3),r=t.filename||"",i=[a.toString(),r,e.toString(),...t.infoMap.values()],n=Math.sumPrecise(i.map((e=>e.length))),s=new Uint8Array(n);let o=0;for(const e of i)o=writeString(e,o,s);return bytesToString(calculateMD5(s,0,s.length))}(e,t);a.set("ID",[t.fileIds[0],r])}}async function incrementalUpdate({origi\ nalData:e,xrefInfo:t,changes:a,xref:r=null,hasXfa:i=!1,xfaDatasetsRef:n=null,hasXfaDatasetsEntry:s=!1,needAppearances:o,acroFormRef:c=null,acroForm:l=null,xfaData:h=null,useXrefStream:u=!1}){await async function updateAcroform({xref:e,acroForm:t,acroFormRef:a,hasXfa:r,hasXfaDatasetsEntry:i,xfaDatasetsRef:n,needAppearances:s,changes:o}){!r||i||n||warn("XFA - Cannot save it");if(!s&&(!r||!n||i))return;const c=t.clone();if(r&&!i){const e=t.get("XFA").slice();e.splice(2,0,"datasets");e.splice(3,0,n)\ ;c.set("XFA",e)}s&&c.set("NeedAppearances",!0);o.put(a,{data:c})}({xref:r,acroForm:l,acroFormRef:c,hasXfa:i,hasXfaDatasetsEntry:s,xfaDatasetsRef:n,needAppearances:o,changes:a});i&&updateXFA({xfaData:h,xfaDatasetsRef:n,changes:a,xref:r});const d=function getTrailerDict(e,t,a){const r=new Dict(null);r.set("Prev",e.startXRef);const i=e.newRef;if(a){t.put(i,{data:""});r.set("Size",i.num+1);r.setIfName("Type","XRef")}else r.set("Size",i.num);null!==e.rootRef&&r.set("Root",e.rootRef);null!==e.infoRef&\ &r.set("Info",e.infoRef);null!==e.encryptRef&&r.set("Encrypt",e.encryptRef);return r}(t,a,u),f=[],g=await async function writeChanges(e,t,a=[]){const r=[];for(const[i,{data:n}]of e.items())if(null!==n&&"string"!=typeof n){await writeObject(i,n,a,t);r.push({ref:i,data:a.join("")});a.length=0}else r.push({ref:i,data:n});return r.sort(((e,t)=>e.ref.num-t.ref.num))}(a,r,f);let p=e.length;const m=e.at(-1);if(10!==m&&13!==m){f.push("\\n");p+=1}for(const{data:e}of g)null!==e&&f.push(e);await(u?async fun\ ction getXRefStreamTable(e,t,a,r,i){const n=[];let s=0,o=0;for(const{ref:e,data:r}of a){let a;s=Math.max(s,t);if(null!==r){a=Math.min(e.gen,65535);n.push([1,t,a]);t+=r.length}else{a=Math.min(e.gen+1,65535);n.push([0,0,a])}o=Math.max(o,a)}r.set("Index",getIndexes(a));const c=[1,getSizeInBytes(s),getSizeInBytes(o)];r.set("W",c);computeIDs(t,e,r);const l=Math.sumPrecise(c),h=new Uint8Array(l*n.length),u=new Stream(h);u.dict=r;let d=0;for(const[e,t,a]of n){d=writeInt(e,c[0],d,h);d=writeInt(t,c[1],d,\ h);d=writeInt(a,c[2],d,h)}await writeObject(e.newRef,u,i,{});i.push("startxref\\n",t.toString(),"\\n%%EOF\\n")}(t,p,g,d,f):async function getXRefTable(e,t,a,r,i){i.push("xref\\n");const n=getIndexes(a);let s=0;for(const{ref:e,data:r}of a){if(e.num===n[s]){i.push(`${n[s]} ${n[s+1]}\\n`);s+=2}if(null!==r){i.push(`${t.toString().padStart(10,"0")} ${Math.min(e.gen,65535).toString().padStart(5,"0")} n\\r\\n`);t+=r.length}else i.push(`0000000000 ${Math.min(e.gen+1,65535).toString().padStart(5,"0")} f\\r\\n`)}c\ omputeIDs(t,e,r);i.push("trailer\\n");await writeDict(r,i);i.push("\\nstartxref\\n",t.toString(),"\\n%%EOF\\n")}(t,p,g,d,f));const b=e.length+Math.sumPrecise(f.map((e=>e.length))),y=new Uint8Array(b);y.set(e);let w=e.length;for(const e of f)w=writeString(e,w,y);return y}class PDFWorkerStream{constructor(e){this._msgHandler=e;this._contentLength=null;this._fullRequestReader=null;this._rangeRequestReaders=[]}getFullReader(){assert(!this._fullRequestReader,"PDFWorkerStream.getFullReader can only be call\ ed once.");this._fullRequestReader=new PDFWorkerStreamReader(this._msgHandler);return this._fullRequestReader}getRangeReader(e,t){const a=new PDFWorkerStreamRangeReader(e,t,this._msgHandler);this._rangeRequestReaders.push(a);return a}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}}class PDFWorkerStreamReader{constructor(e){this._msgHandler=e;this.onProgress=null;this._contentLength=null;this._isRangeSupported=!1;this._isStrea\ mingSupported=!1;const t=this._msgHandler.sendWithStream("GetReader");this._reader=t.getReader();this._headersReady=this._msgHandler.sendWithPromise("ReaderHeadersReady").then((e=>{this._isStreamingSupported=e.isStreamingSupported;this._isRangeSupported=e.isRangeSupported;this._contentLength=e.contentLength}))}get headersReady(){return this._headersReady}get contentLength(){return this._contentLength}get isStreamingSupported(){return this._isStreamingSupported}get isRangeSupported(){return this.\ _isRangeSupported}async read(){const{value:e,done:t}=await this._reader.read();return t?{value:void 0,done:!0}:{value:e.buffer,done:!1}}cancel(e){this._reader.cancel(e)}}class PDFWorkerStreamRangeReader{constructor(e,t,a){this._msgHandler=a;this.onProgress=null;const r=this._msgHandler.sendWithStream("GetRangeReader",{begin:e,end:t});this._reader=r.getReader()}get isStreamingSupported(){return!1}async read(){const{value:e,done:t}=await this._reader.read();return t?{value:void 0,done:!0}:{value:e\ .buffer,done:!1}}cancel(e){this._reader.cancel(e)}}class WorkerTask{constructor(e){this.name=e;this.terminated=!1;this._capability=Promise.withResolvers()}get finished(){return this._capability.promise}finish(){this._capability.resolve()}terminate(){this.terminated=!0}ensureNotTerminated(){if(this.terminated)throw new Error("Worker task was terminated")}}class WorkerMessageHandler{static{"undefined"==typeof window&&!e&&"undefined"!=typeof self&&"function"==typeof self.postMessage&&"onmessage"in \ self&&this.initializeFromPort(self)}static setup(e,t){let a=!1;e.on("test",(t=>{if(!a){a=!0;e.send("test",t instanceof Uint8Array)}}));e.on("configure",(e=>{!function setVerbosityLevel(e){Number.isInteger(e)&&(da=e)}(e.verbosity)}));e.on("GetDocRequest",(e=>this.createDocumentHandler(e,t)))}static createDocumentHandler(e,t){let a,r=!1,i=null;const n=new Set,s=getVerbosityLevel(),{docId:o,apiVersion:c}=e,l="5.4.54";if(c!==l)throw new Error(`The API version "${c}" does not match the Worker version\ "${l}".`);const buildMsg=(e,t)=>`The \\`${e}.prototype\\` contains unexpected enumerable property "${t}", thus breaking e.g. \\`for...in\\` iteration of ${e}s.`;for(const e in{})throw new Error(buildMsg("Object",e));for(const e in[])throw new Error(buildMsg("Array",e));const h=o+"_worker";let u=new MessageHandler(h,o,t);function ensureNotTerminated(){if(r)throw new Error("Worker was terminated")}function startWorkerTask(e){n.add(e)}function finishWorkerTask(e){e.finish();n.delete(e)}async function \ loadDocument(e){await a.ensureDoc("checkHeader");await a.ensureDoc("parseStartXRef");await a.ensureDoc("parse",[e]);await a.ensureDoc("checkFirstPage",[e]);await a.ensureDoc("checkLastPage",[e]);const t=await a.ensureDoc("isPureXfa");if(t){const e=new WorkerTask("loadXfaResources");startWorkerTask(e);await a.ensureDoc("loadXfaResources",[u,e]);finishWorkerTask(e)}const[r,i]=await Promise.all([a.ensureDoc("numPages"),a.ensureDoc("fingerprints")]);return{numPages:r,fingerprints:i,htmlForXfa:t?awai\ t a.ensureDoc("htmlForXfa"):null}}function setupDoc(e){function onSuccess(e){ensureNotTerminated();u.send("GetDoc",{pdfInfo:e})}function onFailure(e){ensureNotTerminated();if(e instanceof PasswordException){const t=new WorkerTask(`PasswordException: response ${e.code}`);startWorkerTask(t);u.sendWithPromise("PasswordRequest",e).then((function({password:e}){finishWorkerTask(t);a.updatePassword(e);pdfManagerReady()})).catch((function(){finishWorkerTask(t);u.send("DocException",e)}))}else u.send("Do\ cException",wrapReason(e))}function pdfManagerReady(){ensureNotTerminated();loadDocument(!1).then(onSuccess,(function(e){ensureNotTerminated();e instanceof XRefParseException?a.requestLoadedStream().then((function(){ensureNotTerminated();loadDocument(!0).then(onSuccess,onFailure)})):onFailure(e)}))}ensureNotTerminated();(async function getPdfManager({data:e,password:t,disableAutoFetch:a,rangeChunkSize:r,length:n,docBaseUrl:s,enableXfa:c,evaluatorOptions:l}){const h={source:null,disableAutoFetch:\ a,docBaseUrl:s,docId:o,enableXfa:c,evaluatorOptions:l,handler:u,length:n,password:t,rangeChunkSize:r};if(e){h.source=e;return new LocalPdfManager(h)}const d=new PDFWorkerStream(u),f=d.getFullReader(),g=Promise.withResolvers();let p,m=[],b=0;f.headersReady.then((function(){if(f.isRangeSupported){h.source=d;h.length=f.contentLength;h.disableAutoFetch||=f.isStreamingSupported;p=new NetworkPdfManager(h);for(const e of m)p.sendProgressiveData(e);m=[];g.resolve(p);i=null}})).catch((function(e){g.rejec\ t(e);i=null}));new Promise((function(e,t){const readChunk=function({value:e,done:a}){try{ensureNotTerminated();if(a){if(!p){const e=arrayBuffersToBytes(m);m=[];n&&e.length!==n&&warn("reported HTTP length is different from actual");h.source=e;p=new LocalPdfManager(h);g.resolve(p)}i=null;return}b+=e.byteLength;f.isStreamingSupported||u.send("DocProgress",{loaded:b,total:Math.max(b,f.contentLength||0)});p?p.sendProgressiveData(e):m.push(e);f.read().then(readChunk,t)}catch(e){t(e)}};f.read().then(re\ adChunk,t)})).catch((function(e){g.reject(e);i=null}));i=e=>{d.cancelAllRequests(e)};return g.promise})(e).then((function(e){if(r){e.terminate(new AbortException("Worker was terminated."));throw new Error("Worker was terminated")}a=e;a.requestLoadedStream(!0).then((e=>{u.send("DataLoaded",{length:e.bytes.byteLength})}))})).then(pdfManagerReady,onFailure)}u.on("GetPage",(function(e){return a.getPage(e.pageIndex).then((function(e){return Promise.all([a.ensure(e,"rotate"),a.ensure(e,"ref"),a.ensure\ (e,"userUnit"),a.ensure(e,"view")]).then((function([e,t,a,r]){return{rotate:e,ref:t,refStr:t?.toString()??null,userUnit:a,view:r}}))}))}));u.on("GetPageIndex",(function(e){const t=Ref.get(e.num,e.gen);return a.ensureCatalog("getPageIndex",[t])}));u.on("GetDestinations",(function(e){return a.ensureCatalog("destinations")}));u.on("GetDestination",(function(e){return a.ensureCatalog("getDestination",[e.id])}));u.on("GetPageLabels",(function(e){return a.ensureCatalog("pageLabels")}));u.on("GetPageLa\ yout",(function(e){return a.ensureCatalog("pageLayout")}));u.on("GetPageMode",(function(e){return a.ensureCatalog("pageMode")}));u.on("GetViewerPreferences",(function(e){return a.ensureCatalog("viewerPreferences")}));u.on("GetOpenAction",(function(e){return a.ensureCatalog("openAction")}));u.on("GetAttachments",(function(e){return a.ensureCatalog("attachments")}));u.on("GetDocJSActions",(function(e){return a.ensureCatalog("jsActions")}));u.on("GetPageJSActions",(function({pageIndex:e}){return a.\ getPage(e).then((e=>a.ensure(e,"jsActions")))}));u.on("GetOutline",(function(e){return a.ensureCatalog("documentOutline")}));u.on("GetOptionalContentConfig",(function(e){return a.ensureCatalog("optionalContentConfig")}));u.on("GetPermissions",(function(e){return a.ensureCatalog("permissions")}));u.on("GetMetadata",(function(e){return Promise.all([a.ensureDoc("documentInfo"),a.ensureCatalog("metadata")])}));u.on("GetMarkInfo",(function(e){return a.ensureCatalog("markInfo")}));u.on("GetData",(func\ tion(e){return a.requestLoadedStream().then((e=>e.bytes))}));u.on("GetAnnotations",(function({pageIndex:e,intent:t}){return a.getPage(e).then((function(a){const r=new WorkerTask(`GetAnnotations: page ${e}`);startWorkerTask(r);return a.getAnnotationsData(u,r,t).then((e=>{finishWorkerTask(r);return e}),(e=>{finishWorkerTask(r);throw e}))}))}));u.on("GetFieldObjects",(function(e){return a.ensureDoc("fieldObjects").then((e=>e?.allFields||null))}));u.on("HasJSActions",(function(e){return a.ensureDoc(\ "hasJSActions")}));u.on("GetCalculationOrderIds",(function(e){return a.ensureDoc("calculationOrderIds")}));u.on("SaveDocument",(async function({isPureXfa:e,numPages:t,annotationStorage:r,filename:i}){const n=[a.requestLoadedStream(),a.ensureCatalog("acroForm"),a.ensureCatalog("acroFormRef"),a.ensureDoc("startXRef"),a.ensureDoc("xref"),a.ensureDoc("linearization"),a.ensureCatalog("structTreeRoot")],s=new RefSetCache,o=[],c=e?null:getNewAnnotationsMap(r),[l,h,d,f,g,p,m]=await Promise.all(n),b=g.tr\ ailer.getRaw("Root")||null;let y;if(c){m?await m.canUpdateStructTree({pdfManager:a,newAnnotationsByPage:c})&&(y=m):await StructTreeRoot.canCreateStructureTree({catalogRef:b,pdfManager:a,newAnnotationsByPage:c})&&(y=null);const e=AnnotationFactory.generateImages(r.values(),g,a.evaluatorOptions.isOffscreenCanvasSupported),t=void 0===y?o:[];for(const[r,i]of c)t.push(a.getPage(r).then((t=>{const a=new WorkerTask(`Save (editor): page ${r}`);startWorkerTask(a);return t.saveNewAnnotations(u,a,i,e,s).fi\ nally((function(){finishWorkerTask(a)}))})));null===y?o.push(Promise.all(t).then((async()=>{await StructTreeRoot.createStructureTree({newAnnotationsByPage:c,xref:g,catalogRef:b,pdfManager:a,changes:s})}))):y&&o.push(Promise.all(t).then((async()=>{await y.updateStructureTree({newAnnotationsByPage:c,pdfManager:a,changes:s})})))}if(e)o.push(a.ensureDoc("serializeXfaData",[r]));else for(let e=0;ee.needAppearances)),k=h instanceof Dict&&h.get("XFA")||null;let C=null,v=!1;if(Array.isArray(k)){for(let e=0,t=k.length;e{g.resetNewTemporaryRef()}))}));u.on("GetOperatorList",(function(e,t){const r=e.pageIndex;a.getPage(r).then((function(a){const i=new WorkerTask(`GetOperatorList: page ${r}`);startWorkerTask(i);const n=s>=Ae?Date.now():0;a.getOperatorList({handler:u,sink:t,task:i,intent:e.intent,cacheKey:e.cacheKey,annotationStorage:e.annotationStorage,modifiedIds:e.modifiedIds}).then((function(e){finishWorkerTask(i);\ n&&info(`page=${r+1} - getOperatorList: time=${Date.now()-n}ms, len=${e.length}`);t.close()}),(function(e){finishWorkerTask(i);i.terminated||t.error(e)}))}))}));u.on("GetTextContent",(function(e,t){const{pageIndex:r,includeMarkedContent:i,disableNormalization:n}=e;a.getPage(r).then((function(e){const a=new WorkerTask("GetTextContent: page "+r);startWorkerTask(a);const o=s>=Ae?Date.now():0;e.extractTextContent({handler:u,task:a,sink:t,includeMarkedContent:i,disableNormalization:n}).then((function\ (){finishWorkerTask(a);o&&info(`page=${r+1} - getTextContent: time=`+(Date.now()-o)+"ms");t.close()}),(function(e){finishWorkerTask(a);a.terminated||t.error(e)}))}))}));u.on("GetStructTree",(function(e){return a.getPage(e.pageIndex).then((e=>a.ensure(e,"getStructTree")))}));u.on("FontFallback",(function(e){return a.fontFallback(e.id,u)}));u.on("Cleanup",(function(e){return a.cleanup(!0)}));u.on("Terminate",(function(e){r=!0;const t=[];if(a){a.terminate(new AbortException("Worker was terminated."\ ));const e=a.cleanup();t.push(e);a=null}else clearGlobalCaches();i?.(new AbortException("Worker was terminated."));for(const e of n){t.push(e.finished);e.terminate()}return Promise.all(t).then((function(){u.destroy();u=null}))}));u.on("Ready",(function(t){setupDoc(e);e=null}));return h}static initializeFromPort(e){const t=new MessageHandler("worker","main",e);this.setup(t,e);t.send("ready",null)}}globalThis.pdfjsWorker={WorkerMessageHandler};export{WorkerMessageHandler};',pdf_worker_min$1=Object. freeze(Object.defineProperty({__proto__:null,default:pdf_worker_min},Symbol.toStringTag,{value:"Module"}));export{app,start};